From eeb3284f1b011f16ec667d6c3c8de461fc49c6b3 Mon Sep 17 00:00:00 2001 From: Adam Pantel <> Date: Wed, 17 Feb 2021 12:34:18 -0500 Subject: [PATCH] Impatient Iguana --- forge-game/src/main/java/forge/game/GameAction.java | 10 ++++++++-- forge-gui/res/cardsfolder/i/impatient_iguana.txt | 8 ++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 forge-gui/res/cardsfolder/i/impatient_iguana.txt diff --git a/forge-game/src/main/java/forge/game/GameAction.java b/forge-game/src/main/java/forge/game/GameAction.java index e3ab22417dc..f03f525cac5 100644 --- a/forge-game/src/main/java/forge/game/GameAction.java +++ b/forge-game/src/main/java/forge/game/GameAction.java @@ -1756,7 +1756,7 @@ public class GameAction { first.initPlane(); } - runOpeningHandActions(first); + first = runOpeningHandActions(first); checkStateEffects(true); // why? // Run Trigger beginning of the game @@ -1861,8 +1861,10 @@ public class GameAction { } while (takesAction != first); } - private void runOpeningHandActions(final Player first) { + // Returns the new player to go first + private Player runOpeningHandActions(final Player first) { Player takesAction = first; + Player newFirst = first; do { List usableFromOpeningHand = Lists.newArrayList(); @@ -1896,10 +1898,14 @@ public class GameAction { } takesAction.getController().playSpellAbilityNoStack(sa, true); + if (sa.hasParam("BecomeStartingPlayer")) { + newFirst = takesAction; + } } takesAction = game.getNextPlayerAfter(takesAction); } while (takesAction != first); // state effects are checked only when someone gets priority + return newFirst; } // Invokes given runnable in Game thread pool - used to start game and perform actions from UI (when game-0 waits for input) diff --git a/forge-gui/res/cardsfolder/i/impatient_iguana.txt b/forge-gui/res/cardsfolder/i/impatient_iguana.txt new file mode 100644 index 00000000000..dc38d635645 --- /dev/null +++ b/forge-gui/res/cardsfolder/i/impatient_iguana.txt @@ -0,0 +1,8 @@ +Name:Impatient Iguana +ManaCost:1 R +Types:Creature Lizard Wizard +PT:2/1 +K:MayEffectFromOpeningHand:RevealCard:!PlayFirst +SVar:RevealCard:DB$ Reveal | RevealDefined$ Self | BecomeStartingPlayer$ True | SpellDescription$ If CARDNAME is in your opening hand and you’re not the starting player, you may reveal it. If you do, you become the starting player. +K:Haste +Oracle:If Impatient Iguana is in your opening hand and you’re not the starting player, you may reveal it. If you do, you become the starting player.\nHaste