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 20782b9f154..5fe42d70cc4 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java @@ -162,6 +162,12 @@ public class DamageDealAi extends DamageAiBase { String logic = sa.getParamOrDefault("AILogic", ""); if ("DiscardLands".equals(logic)) { dmg = 2; + } else if ("OpponentHasCreatures".equals(logic)) { + for (Player opp : ai.getOpponents()) { + if (!opp.getCreaturesInPlay().isEmpty()){ + return true; + } + } } else if (logic.startsWith("ProcRaid.")) { if (ai.getGame().getPhaseHandler().isPlayerTurn(ai) && ai.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS)) { for (Card potentialAtkr : ai.getCreaturesInPlay()) { diff --git a/forge-ai/src/main/java/forge/ai/ability/DamageEachAi.java b/forge-ai/src/main/java/forge/ai/ability/DamageEachAi.java index 443acaadc69..4d2e0dd4467 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DamageEachAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/DamageEachAi.java @@ -47,7 +47,6 @@ public class DamageEachAi extends DamageAiBase { */ @Override protected boolean doTriggerAINoCost(Player ai, SpellAbility sa, boolean mandatory) { - return mandatory || canPlayAI(ai, sa); } diff --git a/forge-gui/res/cardsfolder/c/crackling_doom.txt b/forge-gui/res/cardsfolder/c/crackling_doom.txt index a67d51f64be..c569c2750a1 100644 --- a/forge-gui/res/cardsfolder/c/crackling_doom.txt +++ b/forge-gui/res/cardsfolder/c/crackling_doom.txt @@ -1,7 +1,7 @@ Name:Crackling Doom ManaCost:R W B Types:Instant -A:SP$ DealDamage | Cost$ R B W | Defined$ Player.Opponent | NumDmg$ 2 | SubAbility$ DBRepeat | SpellDescription$ CARDNAME deals 2 damage to each opponent. Each opponent sacrifices a creature with the greatest power among creatures that player controls. +A:SP$ DealDamage | Cost$ R B W | Defined$ Player.Opponent | NumDmg$ 2 | SubAbility$ DBRepeat | AILogic$ OpponentHasCreatures | SpellDescription$ CARDNAME deals 2 damage to each opponent. Each opponent sacrifices a creature with the greatest power among creatures that player controls. SVar:DBRepeat:DB$ RepeatEach | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ DBChooseCard | SubAbility$ DBSac SVar:DBChooseCard:DB$ ChooseCard | Defined$ Player.IsRemembered | Choices$ Creature.greatestPowerControlledByRemembered | ChoiceTitle$ Choose a creature you control with the greatest power | Mandatory$ True | RememberChosen$ True SVar:DBSac:DB$ SacrificeAll | ValidCards$ Card.IsRemembered | SubAbility$ DBCleanup | StackDescription$ Each opponent sacrifices a creature with the greatest power among creatures they control.