- Added AI support for Crackling Doom.

This commit is contained in:
Sloth
2014-09-21 20:08:01 +00:00
parent 2270b047bc
commit b1c07c8f7a
2 changed files with 8 additions and 1 deletions

View File

@@ -111,6 +111,13 @@ public class RepeatEachAi extends SpellAbilityAi {
return false;
}
}
} else if ("OpponentHasCreatures".equals(logic)) {
for (Player opp : aiPlayer.getOpponents()) {
if (!opp.getCreaturesInPlay().isEmpty()){
return true;
}
}
return false;
}
// TODO Add some normal AI variability here

View File

@@ -1,7 +1,7 @@
Name:Crackling Doom
ManaCost:R W B
Types:Instant
A:SP$ RepeatEach | Cost$ R B W | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ DBDealDamage | SpellDescription$ CARDNAME deals 2 damage to each opponent. Each opponent sacrifices a creature with the greatest power among creatures he or she controls.
A:SP$ RepeatEach | Cost$ R B W | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ DBDealDamage | AILogic$ OpponentHasCreatures | SpellDescription$ CARDNAME deals 2 damage to each opponent. Each opponent sacrifices a creature with the greatest power among creatures he or she controls.
SVar:DBDealDamage:DB$ DealDamage | Defined$ Player.IsRemembered | NumDmg$ 2 | SubAbility$ DBChooseCard
SVar:DBChooseCard:DB$ ChooseCard | Defined$ Player.IsRemembered | Choices$ Creature.greatestPowerControlledByRemembered | Mandatory$ True | SubAbility$ DBSac
SVar:DBSac:DB$ Sacrifice | Defined$ Player.IsRemembered | SacValid$ Card.ChosenCard | SacMessage$ the creature with the highest power