forked from External/mage
spjspj - Implement Guardian Beast (ARN)
This commit is contained in:
parent
5ee29a14e6
commit
f46c06066a
4 changed files with 232 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue