mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
* Fixed possible class cast exception.
This commit is contained in:
parent
367f692194
commit
e8eaf49280
1 changed files with 3 additions and 0 deletions
|
@ -18,6 +18,7 @@ import mage.constants.TargetController;
|
|||
import mage.constants.TimingRule;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.Commander;
|
||||
import mage.game.command.Emblem;
|
||||
import mage.game.command.Plane;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -235,6 +236,8 @@ public abstract class ActivatedAbilityImpl extends AbilityImpl implements Activa
|
|||
return ((Emblem) mageObject).isControlledBy(playerId);
|
||||
} else if (mageObject instanceof Plane) {
|
||||
return ((Plane) mageObject).isControlledBy(playerId);
|
||||
} else if (mageObject instanceof Commander) {
|
||||
return ((Commander) mageObject).isControlledBy(playerId);
|
||||
} else if (game.getState().getZone(this.sourceId) != Zone.BATTLEFIELD) {
|
||||
return ((Card) mageObject).isOwnedBy(playerId);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue