mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Added Sentinel Dispatch
This commit is contained in:
@@ -67,6 +67,7 @@ public class PhaseHandler implements java.io.Serializable {
|
||||
private final transient Map<PhaseType, Stack<PhaseType>> extraPhases = new HashMap<PhaseType, Stack<PhaseType>>();
|
||||
|
||||
private int nUpkeepsThisTurn = 0;
|
||||
private int nUpkeepsThisGame = 0;
|
||||
private int nCombatsThisTurn = 0;
|
||||
private boolean bPreventCombatDamageThisTurn = false;
|
||||
private int planarDiceRolledthisTurn = 0;
|
||||
@@ -259,6 +260,7 @@ public class PhaseHandler implements java.io.Serializable {
|
||||
|
||||
case UPKEEP:
|
||||
this.nUpkeepsThisTurn++;
|
||||
this.nUpkeepsThisGame++;
|
||||
game.getUpkeep().executeUntil(this.getPlayerTurn());
|
||||
game.getUpkeep().executeAt();
|
||||
break;
|
||||
@@ -930,6 +932,17 @@ public class PhaseHandler implements java.io.Serializable {
|
||||
return (this.nUpkeepsThisTurn == 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* isFirstUpkeepThisGame.
|
||||
* </p>
|
||||
*
|
||||
* @return a boolean.
|
||||
*/
|
||||
public final boolean isFirstUpkeepThisGame() {
|
||||
return (this.nUpkeepsThisGame == 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* isPreCombatMain.
|
||||
|
||||
@@ -188,6 +188,12 @@ public abstract class Trigger extends TriggerReplacementBase {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.mapParams.containsKey("FirstUpkeepThisGame")) {
|
||||
if (!phaseHandler.isFirstUpkeepThisGame()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.mapParams.containsKey("FirstCombat")) {
|
||||
if (!phaseHandler.isFirstCombat()) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user