mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Improved AI using Detain abilities.
This commit is contained in:
@@ -5,6 +5,7 @@ Text:no text
|
|||||||
PT:2/1
|
PT:2/1
|
||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ Detain | TriggerDescription$ When CARDNAME enters the battlefield, detain target creature an opponent controls. (Until your next turn, that creature can't attack or block and its activated abilities can't be activated.)
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ Detain | TriggerDescription$ When CARDNAME enters the battlefield, detain target creature an opponent controls. (Until your next turn, that creature can't attack or block and its activated abilities can't be activated.)
|
||||||
SVar:Detain:DB$ Pump | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature your opponent controls to detain.
|
SVar:Detain:DB$ Pump | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature your opponent controls to detain.
|
||||||
|
SVar:PlayMain1:TRUE
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/azorius_arrester.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/azorius_arrester.jpg
|
||||||
SetInfo:RTR|Common|http://magiccards.info/scans/en/rtr/5.jpg
|
SetInfo:RTR|Common|http://magiccards.info/scans/en/rtr/5.jpg
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ PT:3/3
|
|||||||
K:Flying
|
K:Flying
|
||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ Detain | TriggerDescription$ When CARDNAME enters the battlefield, detain target creature an opponent controls. (Until your next turn, that creature can't attack or block and its activated abilities can't be activated.)
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ Detain | TriggerDescription$ When CARDNAME enters the battlefield, detain target creature an opponent controls. (Until your next turn, that creature can't attack or block and its activated abilities can't be activated.)
|
||||||
SVar:Detain:DB$ Pump | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature your opponent controls to detain.
|
SVar:Detain:DB$ Pump | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature your opponent controls to detain.
|
||||||
|
SVar:PlayMain1:TRUE
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/isperias_skywatch.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/isperias_skywatch.jpg
|
||||||
SetInfo:RTR|Common|http://magiccards.info/scans/en/rtr/43.jpg
|
SetInfo:RTR|Common|http://magiccards.info/scans/en/rtr/43.jpg
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ PT:2/1
|
|||||||
K:Unblockable
|
K:Unblockable
|
||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ Detain | TriggerDescription$ When CARDNAME enters the battlefield, detain target creature an opponent controls. (Until your next turn, that creature can't attack or block and its activated abilities can't be activated.)
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ Detain | TriggerDescription$ When CARDNAME enters the battlefield, detain target creature an opponent controls. (Until your next turn, that creature can't attack or block and its activated abilities can't be activated.)
|
||||||
SVar:Detain:DB$ Pump | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature your opponent controls to detain.
|
SVar:Detain:DB$ Pump | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature your opponent controls to detain.
|
||||||
|
SVar:PlayMain1:TRUE
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/soulsworn_spirit.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/soulsworn_spirit.jpg
|
||||||
SetInfo:RTR|Uncommon|http://magiccards.info/scans/en/rtr/51.jpg
|
SetInfo:RTR|Uncommon|http://magiccards.info/scans/en/rtr/51.jpg
|
||||||
|
|||||||
@@ -328,6 +328,12 @@ public class AbilityFactoryPump {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if (keyword.endsWith("CARDNAME can't attack or block.")) {
|
} else if (keyword.endsWith("CARDNAME can't attack or block.")) {
|
||||||
|
if (sa.getAbilityFactory().getMapParams().containsKey("UntilYourNextTurn")) {
|
||||||
|
if (CombatUtil.canAttack(card) || CombatUtil.canBlock(card, true)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (ph.isPlayerTurn(human)) {
|
if (ph.isPlayerTurn(human)) {
|
||||||
if (!CombatUtil.canAttack(card)
|
if (!CombatUtil.canAttack(card)
|
||||||
|| (card.getNetCombatDamage() <= 0)
|
|| (card.getNetCombatDamage() <= 0)
|
||||||
@@ -776,7 +782,6 @@ public class AbilityFactoryPump {
|
|||||||
else if (!list.isEmpty()) {
|
else if (!list.isEmpty()) {
|
||||||
final ArrayList<String> keywords = this.keywords;
|
final ArrayList<String> keywords = this.keywords;
|
||||||
final boolean addsKeywords = this.keywords.size() > 0;
|
final boolean addsKeywords = this.keywords.size() > 0;
|
||||||
|
|
||||||
if (addsKeywords) {
|
if (addsKeywords) {
|
||||||
list = CardLists.filter(list, new Predicate<Card>() {
|
list = CardLists.filter(list, new Predicate<Card>() {
|
||||||
@Override
|
@Override
|
||||||
@@ -966,7 +971,8 @@ public class AbilityFactoryPump {
|
|||||||
&& !sa.isTrigger()
|
&& !sa.isTrigger()
|
||||||
&& Singletons.getModel().getGameState().getPhaseHandler().getPhase().isAfter(PhaseType.COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY)
|
&& Singletons.getModel().getGameState().getPhaseHandler().getPhase().isAfter(PhaseType.COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY)
|
||||||
&& !(this.abilityFactory.isCurse() && (defense < 0))
|
&& !(this.abilityFactory.isCurse() && (defense < 0))
|
||||||
&& !this.containsNonCombatKeyword(this.keywords)) {
|
&& !this.containsNonCombatKeyword(this.keywords)
|
||||||
|
&& !sa.getAbilityFactory().getMapParams().containsKey("UntilYourNextTurn")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user