mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +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;
|
||||
|
||||
do {
|
||||
|
||||
boolean addedAnythingToStack;
|
||||
do {
|
||||
addedAnythingToStack = false;
|
||||
// Rule 704.3 Whenever a player would get priority, the game checks ... for state-based actions,
|
||||
game.getAction().checkStateEffects();
|
||||
if (game.isGameOver())
|
||||
return; // state-based effects check could lead to game over
|
||||
|
||||
Player whoAddsToStack = pPlayerPriority;
|
||||
Player whoAddsToStack = playerTurn;
|
||||
do {
|
||||
game.getStack().chooseOrderOfSimultaneousStackEntry(whoAddsToStack);
|
||||
addedAnythingToStack |= game.getStack().chooseOrderOfSimultaneousStackEntry(whoAddsToStack);
|
||||
whoAddsToStack = game.getNextPlayerAfter(whoAddsToStack);
|
||||
} while( whoAddsToStack != null && whoAddsToStack != pPlayerPriority);
|
||||
} while(!addedAnythingToStack);
|
||||
|
||||
chosenSa = pPlayerPriority.getController().chooseSpellAbilityToPlay();
|
||||
if( null == chosenSa )
|
||||
|
||||
Reference in New Issue
Block a user