mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
initial setup for phasing fix
This commit is contained in:
parent
17b7de4e87
commit
a63e024ea4
2 changed files with 16 additions and 0 deletions
|
@ -80,8 +80,12 @@ public interface Permanent extends Card, Controllable {
|
|||
|
||||
boolean phaseIn(Game game);
|
||||
|
||||
boolean phaseIn(Game game, boolean indirectPhase);
|
||||
|
||||
boolean phaseOut(Game game);
|
||||
|
||||
boolean phaseOut(Game game, boolean indirectPhase);
|
||||
|
||||
boolean isMonstrous();
|
||||
|
||||
void setMonstrous(boolean value);
|
||||
|
|
|
@ -89,6 +89,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
protected boolean controlledFromStartOfControllerTurn;
|
||||
protected int turnsOnBattlefield;
|
||||
protected boolean phasedIn = true;
|
||||
protected boolean indirectPhase = false;
|
||||
protected boolean faceDown;
|
||||
protected boolean attacking;
|
||||
protected int blocking;
|
||||
|
@ -138,6 +139,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
this.controlledFromStartOfControllerTurn = permanent.controlledFromStartOfControllerTurn;
|
||||
this.turnsOnBattlefield = permanent.turnsOnBattlefield;
|
||||
this.phasedIn = permanent.phasedIn;
|
||||
this.indirectPhase = permanent.indirectPhase;
|
||||
this.faceDown = permanent.faceDown;
|
||||
this.attacking = permanent.attacking;
|
||||
this.blocking = permanent.blocking;
|
||||
|
@ -463,6 +465,11 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
|
||||
@Override
|
||||
public boolean phaseIn(Game game) {
|
||||
return phaseIn(game, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean phaseIn(Game game, boolean indirectPhase) {
|
||||
if (!phasedIn) {
|
||||
if (!replaceEvent(EventType.PHASE_IN, game)) {
|
||||
this.phasedIn = true;
|
||||
|
@ -478,6 +485,11 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
|
||||
@Override
|
||||
public boolean phaseOut(Game game) {
|
||||
return phaseOut(game, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean phaseOut(Game game, boolean indirectPhase) {
|
||||
if (phasedIn) {
|
||||
if (!replaceEvent(EventType.PHASE_OUT, game)) {
|
||||
this.phasedIn = false;
|
||||
|
|
Loading…
Reference in a new issue