diff --git a/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java b/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java index 90dec2c7905..178b4abc91f 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java @@ -107,6 +107,25 @@ public class DamageDealAi extends DamageAiBase { // This dummy ability will just deal 0 damage, but holds the logic for the AI for Master of Wild Hunt List wolves = CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), "Creature.Wolf+untapped+YouCtrl+Other", ai, source); dmg = Aggregates.sum(wolves, CardPredicates.Accessors.fnGetNetPower); + } else if ("Triskelion".equals(logic)) { + final int n = source.getCounters(CounterType.P1P1); + if (n > 0) { + if (ComputerUtil.playImmediately(ai, sa)) { + /* + * Mostly used to ping the player with remaining counters. The issue with + * stacked effects might appear here. + */ + return damageTargetAI(ai, sa, n, true); + } else { + /* + * Only ping when stack is clear to avoid hassle of evaluating stacked effects + * like protection/pumps or over-killing target. + */ + return ai.getGame().getStack().isEmpty() && damageTargetAI(ai, sa, n, false); + } + } else { + return false; + } } if (source.getName().equals("Sorin, Grim Nemesis")) { diff --git a/forge-gui/res/cardsfolder/t/triskelion.txt b/forge-gui/res/cardsfolder/t/triskelion.txt index 5de93e88086..a117fb198d9 100644 --- a/forge-gui/res/cardsfolder/t/triskelion.txt +++ b/forge-gui/res/cardsfolder/t/triskelion.txt @@ -3,7 +3,6 @@ ManaCost:6 Types:Artifact Creature Construct PT:1/1 K:etbCounter:P1P1:3 -A:AB$ DealDamage | Cost$ SubCounter<1/P1P1> | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. -SVar:RemAIDeck:True +A:AB$ DealDamage | AILogic$ Triskelion | Cost$ SubCounter<1/P1P1> | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. SVar:Picture:http://www.wizards.com/global/images/magic/general/triskelion.jpg Oracle:Triskelion enters the battlefield with three +1/+1 counters on it.\nRemove a +1/+1 counter from Triskelion: Triskelion deals 1 damage to target creature or player.