mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Ensure undo stack cleared when phase changes
This commit is contained in:
@@ -183,6 +183,8 @@ public class PhaseHandler implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
game.getStack().clearUndoStack(); //can't undo action from previous phase
|
||||||
|
|
||||||
String phaseType = oldPhase == phase ? "Repeat" : phase == PhaseType.getNext(oldPhase) ? "" : "Additional";
|
String phaseType = oldPhase == phase ? "Repeat" : phase == PhaseType.getNext(oldPhase) ? "" : "Additional";
|
||||||
|
|
||||||
if (this.phase == PhaseType.UNTAP) {
|
if (this.phase == PhaseType.UNTAP) {
|
||||||
|
|||||||
@@ -256,6 +256,15 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* clearUndoStack.
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
public final void clearUndoStack() {
|
||||||
|
undoStack.clear();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* add.
|
* add.
|
||||||
|
|||||||
Reference in New Issue
Block a user