Merge pull request #5351 from magefree/plane-and-emblem-implements-controllable

Refactor: make plane and emblem implement Controllable
This commit is contained in:
Oleg Agafonov 2018-11-04 23:38:54 +04:00 committed by GitHub
commit 08e88b8a65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 11 deletions

View file

@ -219,9 +219,9 @@ public abstract class ActivatedAbilityImpl extends AbilityImpl implements Activa
} else {
MageObject mageObject = game.getObject(this.sourceId);
if (mageObject instanceof Emblem) {
return ((Emblem) mageObject).getControllerId().equals(playerId);
return ((Emblem) mageObject).isControlledBy(playerId);
} else if (mageObject instanceof Plane) {
return ((Plane) mageObject).getControllerId().equals(playerId);
return ((Plane) mageObject).isControlledBy(playerId);
} else if (game.getState().getZone(this.sourceId) != Zone.BATTLEFIELD) {
return ((Card) mageObject).isOwnedBy(playerId);
}