diff --git a/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java b/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java index 04de4ad5cf0..f4d45e5029c 100644 --- a/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java @@ -55,12 +55,17 @@ public class ChangeZoneAi extends SpellAbilityAi { } if (sa.hasParam("AILogic")) { - if (sa.getParam("AILogic").equals("Always")) { + String logic = sa.getParam("AILogic"); + if (logic.equals("Always")) { return true; - } else if (sa.getParam("AILogic").equals("BeforeCombat")) { + } else if (logic.equals("BeforeCombat")) { if (aiPlayer.getGame().getPhaseHandler().getPhase().isAfter(PhaseType.COMBAT_BEGIN)) { return false; } + } else if (logic.equals("SurpriseBlock")) { + if (aiPlayer.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.COMBAT_DECLARE_ATTACKERS)) { + return false; + } } } diff --git a/forge-gui/res/cardsfolder/c/cauldron_dance.txt b/forge-gui/res/cardsfolder/c/cauldron_dance.txt index 2792de4e285..9e7f17fe79d 100644 --- a/forge-gui/res/cardsfolder/c/cauldron_dance.txt +++ b/forge-gui/res/cardsfolder/c/cauldron_dance.txt @@ -1,7 +1,7 @@ Name:Cauldron Dance ManaCost:4 B R Types:Instant -A:SP$ ChangeZone | Cost$ 4 B R | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature from your graveyard | ActivationPhases$ BeginCombat->EndCombat | SubAbility$ DBAnimate | SpellDescription$ Cast CARDNAME only during combat. Return target creature card from your graveyard to the battlefield. That creature gains haste. Return it to your hand at the beginning of the next end step. You may put a creature card from your hand onto the battlefield. That creature gains haste. Its controller sacrifices it at the beginning of the next end step. +A:SP$ ChangeZone | Cost$ 4 B R | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature from your graveyard | ActivationPhases$ BeginCombat->EndCombat | AILogic$ SurpriseBlock | SubAbility$ DBAnimate | SpellDescription$ Cast CARDNAME only during combat. Return target creature card from your graveyard to the battlefield. That creature gains haste. Return it to your hand at the beginning of the next end step. You may put a creature card from your hand onto the battlefield. That creature gains haste. Its controller sacrifices it at the beginning of the next end step. SVar:DBAnimate:DB$ Animate | Defined$ Targeted | Keywords$ Haste | Triggers$ TrigBounce | sVars$ TrigReturn | SubAbility$ DBChangeZone SVar:TrigBounce:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | Execute$ TrigReturn | TriggerDescription$ At the beginning of the next end step, return CARDNAME to its owner's hand. SVar:TrigReturn:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Battlefield | Destination$ Hand diff --git a/forge-gui/res/cardsfolder/s/surprise_deployment.txt b/forge-gui/res/cardsfolder/s/surprise_deployment.txt index 86964f48d56..e6ff2c43700 100644 --- a/forge-gui/res/cardsfolder/s/surprise_deployment.txt +++ b/forge-gui/res/cardsfolder/s/surprise_deployment.txt @@ -1,7 +1,7 @@ Name:Surprise Deployment ManaCost:3 W Types:Instant -A:SP$ ChangeZone | Cost$ 3 W | Origin$ Hand | Destination$ Battlefield | Optional$ You | ChangeType$ Creature.nonWhite | ChangeNum$ 1 | RememberChanged$ True | ForgetOtherRemembered$ True | TgtPrompt$ Select target creature | ActivationPhases$ BeginCombat->EndCombat | SubAbility$ DBAnimate | SpellDescription$ Cast CARDNAME only during combat. You may put a nonwhite creature card from your hand onto the battlefield. At the beginning of the next end step, return that creature to your hand. (Return it only if it's on the battlefield.) +A:SP$ ChangeZone | Cost$ 3 W | Origin$ Hand | Destination$ Battlefield | Optional$ You | ChangeType$ Creature.nonWhite | ChangeNum$ 1 | RememberChanged$ True | ForgetOtherRemembered$ True | TgtPrompt$ Select target creature | ActivationPhases$ BeginCombat->EndCombat | AILogic$ SurpriseBlock | SubAbility$ DBAnimate | SpellDescription$ Cast CARDNAME only during combat. You may put a nonwhite creature card from your hand onto the battlefield. At the beginning of the next end step, return that creature to your hand. (Return it only if it's on the battlefield.) SVar:DBAnimate:DB$ Animate | Defined$ Remembered | Triggers$ TrigBounce | sVars$ TrigReturn SVar:TrigBounce:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | Execute$ TrigReturn | TriggerDescription$ At the beginning of the next end step, return CARDNAME to its owner's hand. SVar:TrigReturn:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Battlefield | Destination$ Hand | SubAbility$ DBCleanup