- Implemented AI for Triskelion

This commit is contained in:
excessum
2017-01-28 09:47:17 +00:00
parent 226fc544de
commit f27ffb7eca
2 changed files with 20 additions and 2 deletions

View File

@@ -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 // This dummy ability will just deal 0 damage, but holds the logic for the AI for Master of Wild Hunt
List<Card> wolves = CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), "Creature.Wolf+untapped+YouCtrl+Other", ai, source); List<Card> wolves = CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), "Creature.Wolf+untapped+YouCtrl+Other", ai, source);
dmg = Aggregates.sum(wolves, CardPredicates.Accessors.fnGetNetPower); 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")) { if (source.getName().equals("Sorin, Grim Nemesis")) {

View File

@@ -3,7 +3,6 @@ ManaCost:6
Types:Artifact Creature Construct Types:Artifact Creature Construct
PT:1/1 PT:1/1
K:etbCounter:P1P1:3 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. 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:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/triskelion.jpg 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. 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.