Fix: when ending the turn, remove all additional phases/steps scheduled for this turn.

This commit is contained in:
elcnesh
2014-07-11 10:48:54 +00:00
parent 848a9f86f9
commit bf0cc2e926

View File

@@ -900,7 +900,7 @@ public class PhaseHandler implements java.io.Serializable {
*
*/
public final void addExtraPhase(final PhaseType afterPhase, final PhaseType extraPhase) {
// 300.7. Some effects can add phases to a turn. They do this by adding the phases directly after the specified phase.
// 500.8. Some effects can add phases to a turn. They do this by adding the phases directly after the specified phase.
// If multiple extra phases are created after the same phase, the most recently created phase will occur first.
if (!this.extraPhases.containsKey(afterPhase)) {
this.extraPhases.put(afterPhase, new Stack<PhaseType>());
@@ -1062,6 +1062,7 @@ public class PhaseHandler implements java.io.Serializable {
*/
public final void endTurnByEffect() {
this.combat = null;
this.extraPhases.clear();
this.phase = PhaseType.CLEANUP;
this.onPhaseBegin();
}