Fixed some possible null pointer exceptions.

This commit is contained in:
LevelX2 2015-07-28 00:07:51 +02:00
parent 1ef74f3293
commit 65ff88d244

View file

@ -899,10 +899,10 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
}
@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;
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);
}
EntersTheBattlefieldEvent event = new EntersTheBattlefieldEvent(this, sourceId, getControllerId(), fromZone);
@ -914,7 +914,9 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
game.addSimultaneousEvent(event);
}
}
return true;
}
return false;
}
@Override