From 839ced1b32fe037adf47b31933568e6dade4829f Mon Sep 17 00:00:00 2001 From: Agetian Date: Fri, 28 Jul 2017 07:44:02 +0000 Subject: [PATCH] - Use a separate AI logic for "Detain target nonland permanent". --- forge-ai/src/main/java/forge/ai/ability/PumpAi.java | 4 ++-- forge-gui/res/cardsfolder/a/archon_of_the_triumvirate.txt | 2 +- forge-gui/res/cardsfolder/l/lyev_skyknight.txt | 2 +- forge-gui/res/cardsfolder/n/new_prahv_guildmage.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/ability/PumpAi.java b/forge-ai/src/main/java/forge/ai/ability/PumpAi.java index 49c3c9d64aa..bbfcf08c982 100644 --- a/forge-ai/src/main/java/forge/ai/ability/PumpAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/PumpAi.java @@ -462,9 +462,9 @@ public class PumpAi extends PumpAiBase { } } - // Detain and similar effects: don't target noncreature permanents that don't have + // Detain target nonland permanent: don't target noncreature permanents that don't have // any activated abilities. - if ("HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated.".equals(sa.getParam("KW"))) { + if ("DetainNonLand".equals(sa.getParam("AILogic"))) { list = CardLists.filter(list, Predicates.or(CardPredicates.Presets.CREATURES, new Predicate() { @Override public boolean apply(Card card) { diff --git a/forge-gui/res/cardsfolder/a/archon_of_the_triumvirate.txt b/forge-gui/res/cardsfolder/a/archon_of_the_triumvirate.txt index c2c5a09d9df..c7d9ccefd5f 100644 --- a/forge-gui/res/cardsfolder/a/archon_of_the_triumvirate.txt +++ b/forge-gui/res/cardsfolder/a/archon_of_the_triumvirate.txt @@ -4,7 +4,7 @@ Types:Creature Archon PT:4/5 K:Flying T:Mode$ Attacks | TriggerZones$ Battlefield | ValidCard$ Card.Self | Execute$ Detain | TriggerDescription$ Whenever CARDNAME attacks, detain up to two target nonland permanents your opponents control. (Until your next turn, those permanents can't attack or block and their activated abilities can't be activated.) -SVar:Detain:DB$ Pump | TargetMin$ 0 | TargetMax$ 2 | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | ValidTgts$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent your opponent controls to detain. | UntilYourNextTurn$ True +SVar:Detain:DB$ Pump | TargetMin$ 0 | TargetMax$ 2 | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | ValidTgts$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent your opponent controls to detain. | UntilYourNextTurn$ True | AILogic$ DetainNonLand SVar:HasAttackEffect:TRUE SVar:Picture:http://www.wizards.com/global/images/magic/general/archon_of_the_triumvirate.jpg Oracle:Flying\nWhenever Archon of the Triumvirate attacks, detain up to two target nonland permanents your opponents control. (Until your next turn, those permanents can't attack or block and their activated abilities can't be activated.) diff --git a/forge-gui/res/cardsfolder/l/lyev_skyknight.txt b/forge-gui/res/cardsfolder/l/lyev_skyknight.txt index 9e3b33609ed..a7f5c9418f6 100644 --- a/forge-gui/res/cardsfolder/l/lyev_skyknight.txt +++ b/forge-gui/res/cardsfolder/l/lyev_skyknight.txt @@ -4,7 +4,7 @@ Types:Creature Human Knight PT:3/1 K:Flying T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ Detain | TriggerDescription$ When CARDNAME enters the battlefield, detain target nonland permanent an opponent controls. (Until your next turn, that permanent 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$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent an opponent controls +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$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent an opponent controls | AILogic$ DetainNonLand SVar:PlayMain1:TRUE SVar:Picture:http://www.wizards.com/global/images/magic/general/lyev_skyknight.jpg Oracle:Flying\nWhen Lyev Skyknight enters the battlefield, detain target nonland permanent an opponent controls. (Until your next turn, that permanent can't attack or block and its activated abilities can't be activated.) diff --git a/forge-gui/res/cardsfolder/n/new_prahv_guildmage.txt b/forge-gui/res/cardsfolder/n/new_prahv_guildmage.txt index d62c2b852cc..997dc784c1a 100644 --- a/forge-gui/res/cardsfolder/n/new_prahv_guildmage.txt +++ b/forge-gui/res/cardsfolder/n/new_prahv_guildmage.txt @@ -3,6 +3,6 @@ ManaCost:W U Types:Creature Human Wizard PT:2/2 A:AB$ Pump | Cost$ W U | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ Flying | SpellDescription$ Target creature gains flying until end of turn. -A:AB$ Pump | Cost$ 3 W U | ValidTgts$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent your opponent controls to detain. | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | SpellDescription$ Detain target nonland permanent an opponent controls. (Until your next turn, that permanent can't attack or block and its activated abilities can't be activated.) +A:AB$ Pump | Cost$ 3 W U | ValidTgts$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent your opponent controls to detain. | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | AILogic$ DetainNonLand | SpellDescription$ Detain target nonland permanent an opponent controls. (Until your next turn, that permanent can't attack or block and its activated abilities can't be activated.) SVar:Picture:http://www.wizards.com/global/images/magic/general/new_prahv_guildmage.jpg Oracle:{W}{U}: Target creature gains flying until end of turn.\n{3}{W}{U}: Detain target nonland permanent an opponent controls. (Until your next turn, that permanent can't attack or block and its activated abilities can't be activated.)