From d4e5f5e7d17acf3dbf7e304f896eedda2d30ebd8 Mon Sep 17 00:00:00 2001 From: Sol Date: Wed, 27 Jan 2016 23:09:11 +0000 Subject: [PATCH] - Added AI Logic to CounterMagic, so AI can at least use Kozilek as a 12/12 body with a strong ETB ability, even though the AI doesn't know how to use it's activated ability --- forge-ai/src/main/java/forge/ai/ability/CounterAi.java | 8 ++++++++ .../res/cardsfolder/k/kozilek_the_great_distortion.txt | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/ability/CounterAi.java b/forge-ai/src/main/java/forge/ai/ability/CounterAi.java index bba32fbc87c..927425f7d21 100644 --- a/forge-ai/src/main/java/forge/ai/ability/CounterAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/CounterAi.java @@ -104,6 +104,14 @@ public class CounterAi extends SpellAbilityAi { // But really it should be more picky about how it counters things + if (sa.hasParam("AILogic")) { + String logic = sa.getParam("AILogic"); + if ("Never".equals(logic)) { + return false; + } + } + + return toReturn; } diff --git a/forge-gui/res/cardsfolder/k/kozilek_the_great_distortion.txt b/forge-gui/res/cardsfolder/k/kozilek_the_great_distortion.txt index d14ee13134d..d1a527537e4 100644 --- a/forge-gui/res/cardsfolder/k/kozilek_the_great_distortion.txt +++ b/forge-gui/res/cardsfolder/k/kozilek_the_great_distortion.txt @@ -7,8 +7,7 @@ SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ Difference | Referenc SVar:Y:Count$InYourHand SVar:Difference:Number$7/Minus.Y K:Menace -A:AB$ Counter | Announce$ X | Cost$ Discard<1/Card.cmcEQX/card with converted mana cost X> | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | SpellDescription$ Counter target spell with converted mana cost X. +A:AB$ Counter | Announce$ X | Cost$ Discard<1/Card.cmcEQX/card with converted mana cost X> | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | AILogic$ Never | SpellDescription$ Counter target spell with converted mana cost X. SVar:X:Targeted$CardManaCost -SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/kozilek_the_great_distortion.jpg Oracle:When you cast Kozilek, the Great Distortion, if you have fewer than seven cards in hand, draw cards equal to the difference.\nMenace\nDiscard a card with converted mana cost X: Counter target spell with converted mana cost X.