Merge branch 'iguana' into 'master'

Impatient Iguana

See merge request core-developers/forge!3884
This commit is contained in:
Michael Kamensky
2021-02-18 05:16:06 +00:00
2 changed files with 16 additions and 2 deletions

View File

@@ -1756,7 +1756,7 @@ public class GameAction {
first.initPlane(); first.initPlane();
} }
runOpeningHandActions(first); first = runOpeningHandActions(first);
checkStateEffects(true); // why? checkStateEffects(true); // why?
// Run Trigger beginning of the game // Run Trigger beginning of the game
@@ -1861,8 +1861,10 @@ public class GameAction {
} while (takesAction != first); } 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 takesAction = first;
Player newFirst = first;
do { do {
List<SpellAbility> usableFromOpeningHand = Lists.newArrayList(); List<SpellAbility> usableFromOpeningHand = Lists.newArrayList();
@@ -1896,10 +1898,14 @@ public class GameAction {
} }
takesAction.getController().playSpellAbilityNoStack(sa, true); takesAction.getController().playSpellAbilityNoStack(sa, true);
if (sa.hasParam("BecomeStartingPlayer")) {
newFirst = takesAction;
}
} }
takesAction = game.getNextPlayerAfter(takesAction); takesAction = game.getNextPlayerAfter(takesAction);
} while (takesAction != first); } while (takesAction != first);
// state effects are checked only when someone gets priority // 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) // Invokes given runnable in Game thread pool - used to start game and perform actions from UI (when game-0 waits for input)

View File

@@ -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 youre 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 youre not the starting player, you may reveal it. If you do, you become the starting player.\nHaste