diff --git a/Mage.Sets/src/mage/cards/w/WorldAtWar.java b/Mage.Sets/src/mage/cards/w/WorldAtWar.java index 76b8a95b9d2..c8378775a25 100644 --- a/Mage.Sets/src/mage/cards/w/WorldAtWar.java +++ b/Mage.Sets/src/mage/cards/w/WorldAtWar.java @@ -58,7 +58,7 @@ public class WorldAtWar extends CardImpl { // After the first postcombat main phase this turn, there's an additional combat phase followed by an additional main phase. At the beginning of that combat, untap all creatures that attacked this turn. this.getSpellAbility().addEffect(new WorldAtWarEffect()); - // Rebound + // Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) this.addAbility(new ReboundAbility(), new AttackedThisTurnWatcher()); } diff --git a/Mage/src/main/java/mage/game/turn/Turn.java b/Mage/src/main/java/mage/game/turn/Turn.java index 6b910ad1e62..7c2c8429dcf 100644 --- a/Mage/src/main/java/mage/game/turn/Turn.java +++ b/Mage/src/main/java/mage/game/turn/Turn.java @@ -223,40 +223,41 @@ public class Turn implements Serializable { } private boolean playExtraPhases(Game game, TurnPhase afterPhase) { - TurnMod extraPhaseTurnMod = game.getState().getTurnMods().extraPhase(activePlayerId, afterPhase); - if (extraPhaseTurnMod == null) { - return false; + while (true) { + TurnMod extraPhaseTurnMod = game.getState().getTurnMods().extraPhase(activePlayerId, afterPhase); + if (extraPhaseTurnMod == null) { + return false; + } + TurnPhase extraPhase = extraPhaseTurnMod.getExtraPhase(); + if (extraPhase == null) { + return false; + } + Phase phase; + switch (extraPhase) { + case BEGINNING: + phase = new BeginningPhase(); + break; + case PRECOMBAT_MAIN: + phase = new PreCombatMainPhase(); + break; + case COMBAT: + phase = new CombatPhase(); + break; + case POSTCOMBAT_MAIN: + phase = new PostCombatMainPhase(); + break; + default: + phase = new EndPhase(); + } + currentPhase = phase; + game.fireEvent(new GameEvent(GameEvent.EventType.PHASE_CHANGED, activePlayerId, extraPhaseTurnMod.getId(), activePlayerId)); + Player activePlayer = game.getPlayer(activePlayerId); + if (activePlayer != null && !game.isSimulation()) { + game.informPlayers(activePlayer.getLogName() + " starts an additional " + phase.getType().toString() + " phase"); + } + phase.play(game, activePlayerId); + afterPhase = extraPhase; } - TurnPhase extraPhase = extraPhaseTurnMod.getExtraPhase(); - if (extraPhase == null) { - return false; - } - Phase phase; - switch (extraPhase) { - case BEGINNING: - phase = new BeginningPhase(); - break; - case PRECOMBAT_MAIN: - phase = new PreCombatMainPhase(); - break; - case COMBAT: - phase = new CombatPhase(); - break; - case POSTCOMBAT_MAIN: - phase = new PostCombatMainPhase(); - break; - default: - phase = new EndPhase(); - } - currentPhase = phase; - game.fireEvent(new GameEvent(GameEvent.EventType.PHASE_CHANGED, activePlayerId, extraPhaseTurnMod.getId(), activePlayerId)); - Player activePlayer = game.getPlayer(activePlayerId); - if (activePlayer != null && !game.isSimulation()) { - game.informPlayers(activePlayer.getLogName() + " starts an additional " + phase.getType().toString() + " phase"); - } - phase.play(game, activePlayerId); - - return true; } /*protected void playExtraTurns(Game game) {