mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Fix: when ending the turn, remove all additional phases/steps scheduled for this turn.
This commit is contained in:
@@ -900,7 +900,7 @@ public class PhaseHandler implements java.io.Serializable {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public final void addExtraPhase(final PhaseType afterPhase, final PhaseType extraPhase) {
|
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 multiple extra phases are created after the same phase, the most recently created phase will occur first.
|
||||||
if (!this.extraPhases.containsKey(afterPhase)) {
|
if (!this.extraPhases.containsKey(afterPhase)) {
|
||||||
this.extraPhases.put(afterPhase, new Stack<PhaseType>());
|
this.extraPhases.put(afterPhase, new Stack<PhaseType>());
|
||||||
@@ -1062,6 +1062,7 @@ public class PhaseHandler implements java.io.Serializable {
|
|||||||
*/
|
*/
|
||||||
public final void endTurnByEffect() {
|
public final void endTurnByEffect() {
|
||||||
this.combat = null;
|
this.combat = null;
|
||||||
|
this.extraPhases.clear();
|
||||||
this.phase = PhaseType.CLEANUP;
|
this.phase = PhaseType.CLEANUP;
|
||||||
this.onPhaseBegin();
|
this.onPhaseBegin();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user