mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
loop until nothing added to stack, AP is turn owner
This commit is contained in:
@@ -964,16 +964,21 @@ public class PhaseHandler implements java.io.Serializable {
|
|||||||
SpellAbility chosenSa = null;
|
SpellAbility chosenSa = null;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
||||||
|
boolean addedAnythingToStack;
|
||||||
|
do {
|
||||||
|
addedAnythingToStack = false;
|
||||||
// Rule 704.3 Whenever a player would get priority, the game checks ... for state-based actions,
|
// Rule 704.3 Whenever a player would get priority, the game checks ... for state-based actions,
|
||||||
game.getAction().checkStateEffects();
|
game.getAction().checkStateEffects();
|
||||||
if (game.isGameOver())
|
if (game.isGameOver())
|
||||||
return; // state-based effects check could lead to game over
|
return; // state-based effects check could lead to game over
|
||||||
|
|
||||||
Player whoAddsToStack = pPlayerPriority;
|
Player whoAddsToStack = playerTurn;
|
||||||
do {
|
do {
|
||||||
game.getStack().chooseOrderOfSimultaneousStackEntry(whoAddsToStack);
|
addedAnythingToStack |= game.getStack().chooseOrderOfSimultaneousStackEntry(whoAddsToStack);
|
||||||
whoAddsToStack = game.getNextPlayerAfter(whoAddsToStack);
|
whoAddsToStack = game.getNextPlayerAfter(whoAddsToStack);
|
||||||
} while( whoAddsToStack != null && whoAddsToStack != pPlayerPriority);
|
} while( whoAddsToStack != null && whoAddsToStack != pPlayerPriority);
|
||||||
|
} while(!addedAnythingToStack);
|
||||||
|
|
||||||
chosenSa = pPlayerPriority.getController().chooseSpellAbilityToPlay();
|
chosenSa = pPlayerPriority.getController().chooseSpellAbilityToPlay();
|
||||||
if( null == chosenSa )
|
if( null == chosenSa )
|
||||||
|
|||||||
Reference in New Issue
Block a user