From ab2d9afbf6f9f740efd68ce80d3689a2beac7953 Mon Sep 17 00:00:00 2001 From: Agetian Date: Sun, 19 May 2019 18:52:46 +0300 Subject: [PATCH] - Basic Teferi's Time Twist AI logic (currently only uses it to flicker-save its permanents) --- forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java | 5 +++-- forge-gui/res/cardsfolder/t/teferis_time_twist.txt | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) 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 69d55bb9281..9085d922e54 100644 --- a/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java @@ -676,7 +676,8 @@ public class ChangeZoneAi extends SpellAbilityAi { } // only use blink or bounce effects - if (!(destination.equals(ZoneType.Exile) && (subApi == ApiType.DelayedTrigger || subApi == ApiType.ChangeZone)) + if (!(destination.equals(ZoneType.Exile) + && (subApi == ApiType.DelayedTrigger || subApi == ApiType.ChangeZone || "DelayedBounce".equals(sa.getParam("AILogic")))) && !destination.equals(ZoneType.Hand)) { return false; } @@ -936,7 +937,7 @@ public class ChangeZoneAi extends SpellAbilityAi { // if it's blink or bounce, try to save my about to die stuff final boolean blink = (destination.equals(ZoneType.Exile) && (subApi == ApiType.DelayedTrigger - || (subApi == ApiType.ChangeZone && subAffected.equals("Remembered")))); + || "DelayedBounce".equals(sa.getParam("AILogic")) || (subApi == ApiType.ChangeZone && subAffected.equals("Remembered")))); if ((destination.equals(ZoneType.Hand) || blink) && (tgt.getMinTargets(sa.getHostCard(), sa) <= 1)) { // save my about to die stuff Card tobounce = canBouncePermanent(ai, sa, list); diff --git a/forge-gui/res/cardsfolder/t/teferis_time_twist.txt b/forge-gui/res/cardsfolder/t/teferis_time_twist.txt index 8b3a1a64cc3..cfa594d4401 100644 --- a/forge-gui/res/cardsfolder/t/teferis_time_twist.txt +++ b/forge-gui/res/cardsfolder/t/teferis_time_twist.txt @@ -1,9 +1,9 @@ Name:Teferi's Time Twist ManaCost:1 U Types:Instant -A:SP$ ChangeZone | Cost$ 1 U | ValidTgts$ Permanent.YouCtrl | Mandatory$ True | TgtPrompt$ Select target permanent you control | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | SubAbility$ DBAnimate | SpellDescription$ Exile target permanent you control. Return that card to the battlefield under its owner’s control at the beginning of the next end step. If it enters the battlefield as a creature, it enters with an additional +1/+1 counter on it. -SVar:DBAnimate:DB$ Animate | Defined$ Remembered | Keywords$ etbCounter:P1P1:1:ValidCard$ Creature.IsRemembered | RememberObjects$ Remembered | SubAbility$ DelTrig -SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigBounce | RememberObjects$ Remembered | TriggerDescription$ Return that card to the battlefield under its owner’s control at the beginning of the next end step. If it enters the battlefield as a creature, it enters with an additional +1/+1 counter on it. +A:SP$ ChangeZone | Cost$ 1 U | ValidTgts$ Permanent.YouCtrl | TgtPrompt$ Select target permanent you control | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | AILogic$ DelayedBounce | SubAbility$ DBAnimate | SpellDescription$ Exile target permanent you control. Return that card to the battlefield under its owner’s control at the beginning of the next end step. If it enters the battlefield as a creature, it enters with an additional +1/+1 counter on it. +SVar:DBAnimate:DB$ Animate | Defined$ Remembered | Keywords$ etbCounter:P1P1:1:ValidCard$ Creature.IsRemembered | RememberObjects$ Remembered | SubAbility$ DelTrig | AILogic$ Always +SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigBounce | RememberObjects$ Remembered | AILogic$ Always | TriggerDescription$ Return that card to the battlefield under its owner’s control at the beginning of the next end step. If it enters the battlefield as a creature, it enters with an additional +1/+1 counter on it. SVar:TrigBounce:DB$ ChangeZone | Origin$ Exile | Destination$ Battlefield | Defined$ DelayTriggerRemembered SVar:Picture:https://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=460999&type=card DeckHas:Ability$Counters