spjspj - Implement Guardian Beast (ARN)

This commit is contained in:
spjspj 2016-08-11 23:03:22 +10:00
parent 5ee29a14e6
commit f46c06066a
4 changed files with 232 additions and 7 deletions

View file

@ -613,6 +613,13 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
@Override
public boolean changeControllerId(UUID controllerId, Game game) {
Player newController = game.getPlayer(controllerId);
GameEvent loseControlEvent = GameEvent.getEvent(GameEvent.EventType.LOSE_CONTROL, this.getId(), null, controllerId);
if (game.replaceEvent(loseControlEvent)) {
return false;
}
if (newController != null && (!newController.hasLeft() || !newController.hasLost())) {
this.controllerId = controllerId;
return true;