mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Fixed some possible null pointer exceptions.
This commit is contained in:
parent
1ef74f3293
commit
65ff88d244
1 changed files with 4 additions and 2 deletions
|
@ -899,10 +899,10 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void entersBattlefield(UUID sourceId, Game game, Zone fromZone, boolean fireEvent) {
|
public boolean entersBattlefield(UUID sourceId, Game game, Zone fromZone, boolean fireEvent) {
|
||||||
controlledFromStartOfControllerTurn = false;
|
controlledFromStartOfControllerTurn = false;
|
||||||
if (this.isFaceDown(game)) {
|
if (this.isFaceDown(game)) {
|
||||||
// remove some attributes here, bceause first apply effects comes later otherwise abilities (e.g. color related) will unintended trigger
|
// remove some attributes here, because first apply effects comes later otherwise abilities (e.g. color related) will unintended trigger
|
||||||
MorphAbility.setPermanentToFaceDownCreature(this);
|
MorphAbility.setPermanentToFaceDownCreature(this);
|
||||||
}
|
}
|
||||||
EntersTheBattlefieldEvent event = new EntersTheBattlefieldEvent(this, sourceId, getControllerId(), fromZone);
|
EntersTheBattlefieldEvent event = new EntersTheBattlefieldEvent(this, sourceId, getControllerId(), fromZone);
|
||||||
|
@ -914,7 +914,9 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
||||||
game.addSimultaneousEvent(event);
|
game.addSimultaneousEvent(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue