/** * 116.5. Each time a player would get priority, the game first performs all * applicable state-based actions as a single event (see rule 704, * “State-Based Actions”), then repeats this process until no state-based * actions are performed. Then triggered abilities are put on the stack (see * rule 603, “Handling Triggered Abilities”). These steps repeat in order * until no further state-based actions are performed and no abilities * trigger. Then the player who would have received priority does so. * * @return */ @Override public boolean checkStateAndTriggered() { boolean somethingHappened = false; //20091005 - 115.5 while (!isPaused() && !checkIfGameIsOver()) { if (!checkStateBasedActions()) { // nothing happened so check triggers state.handleSimultaneousEvent(this); if (isPaused() || checkIfGameIsOver() || getTurn().isEndTurnRequested() || !checkTriggered()) { break; } } state.handleSimultaneousEvent(this); applyEffects(); // needed e.g if boost effects end and cause creatures to die somethingHappened = true; } checkConcede(); return somethingHappened; }