mirror of
https://github.com/correl/mage.git
synced 2025-04-14 01:01:08 -09:00
* World at War - Fixed that its extra Main Phase was not executed (fixes #4382).
This commit is contained in:
parent
b10182ab29
commit
393f8dc9f4
2 changed files with 35 additions and 34 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue