mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 15:32:08 -08:00
Merge pull request #5351 from magefree/plane-and-emblem-implements-controllable
Refactor: make plane and emblem implement Controllable
This commit is contained in:
commit
08e88b8a65
8 changed files with 13 additions and 11 deletions
|
|
@ -135,7 +135,7 @@ class CelestialDawnToWhiteEffect extends ContinuousEffectImpl {
|
|||
// Command
|
||||
for (CommandObject commandObject : game.getState().getCommand()) {
|
||||
if (commandObject instanceof Commander) {
|
||||
if (commandObject.getControllerId().equals(controller.getId())) {
|
||||
if (commandObject.isControlledBy(controller.getId())) {
|
||||
setColor(commandObject.getColor(game), game);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class CoverOfWinterEffect extends PreventionEffectImpl {
|
|||
|
||||
if (event.getType() == GameEvent.EventType.DAMAGE_CREATURE) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent != null && permanent.getControllerId().equals(source.getControllerId())) {
|
||||
if (permanent != null && permanent.isControlledBy(source.getControllerId())) {
|
||||
return super.applies(event, source, game);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,11 +94,11 @@ class EmissaryOfGrudgesEffect extends OneShotEffect {
|
|||
Mode mode = stackObject.getStackAbility().getModes().get(modeId);
|
||||
for (Target target : mode.getTargets()) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
if (source.getControllerId().equals(targetId)) {
|
||||
if (source.isControlledBy(targetId)) {
|
||||
targetsYouOrAPermanentYouControl = true;
|
||||
}
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null && source.getControllerId().equals(permanent.getControllerId())) {
|
||||
if (permanent != null && source.isControlledBy(permanent.getControllerId())) {
|
||||
targetsYouOrAPermanentYouControl = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class SavageSummoningAsThoughEffect extends AsThoughEffectImpl {
|
|||
MageObject mageObject = game.getBaseObject(objectId);
|
||||
if (mageObject instanceof Commander) {
|
||||
Commander commander = (Commander) mageObject;
|
||||
if (commander.isCreature() && commander.getControllerId().equals(source.getControllerId())) {
|
||||
if (commander.isCreature() && commander.isControlledBy(source.getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
} else if (mageObject instanceof Card) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue