From a01c1077ad0cd5f82d5d00858a44ff472ed18918 Mon Sep 17 00:00:00 2001 From: "Alex W. Jackson" Date: Sun, 30 Oct 2022 04:05:27 -0400 Subject: [PATCH] GameEvent: remove TRANSFORM which is no longer used, and UNFLIP which is explicitly impossible under the rules --- .../src/main/java/mage/game/events/GameEvent.java | 3 +-- .../main/java/mage/game/permanent/Permanent.java | 2 -- .../java/mage/game/permanent/PermanentImpl.java | 15 +-------------- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Mage/src/main/java/mage/game/events/GameEvent.java b/Mage/src/main/java/mage/game/events/GameEvent.java index 8c32bbdd68..0c56fbb1ea 100644 --- a/Mage/src/main/java/mage/game/events/GameEvent.java +++ b/Mage/src/main/java/mage/game/events/GameEvent.java @@ -342,8 +342,7 @@ public class GameEvent implements Serializable { */ UNTAP, UNTAPPED, FLIP, FLIPPED, - UNFLIP, UNFLIPPED, - TRANSFORM, TRANSFORMING, TRANSFORMED, + TRANSFORMING, TRANSFORMED, ADAPT, BECOMES_MONSTROUS, /* BECOMES_EXERTED diff --git a/Mage/src/main/java/mage/game/permanent/Permanent.java b/Mage/src/main/java/mage/game/permanent/Permanent.java index 7bbc6a9082..29e67ea0e8 100644 --- a/Mage/src/main/java/mage/game/permanent/Permanent.java +++ b/Mage/src/main/java/mage/game/permanent/Permanent.java @@ -43,8 +43,6 @@ public interface Permanent extends Card, Controllable { boolean isFlipped(); - boolean unflip(Game game); - boolean flip(Game game); boolean transform(Ability source, Game game); diff --git a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java index f41bceb0ec..4bc81c5389 100644 --- a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java @@ -565,18 +565,6 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { return flipped; } - @Override - public boolean unflip(Game game) { - if (flipped) { - if (!replaceEvent(EventType.UNFLIP, game)) { - this.flipped = false; - fireEvent(EventType.UNFLIPPED, game); - return true; - } - } - return false; - } - @Override public boolean flip(Game game) { if (!flipped) { @@ -618,8 +606,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { || (!ignoreDayNight && this.checkDayNightBound()) || this.getOtherFace().isInstantOrSorcery() || !this.checkTransformRestrictionEffects(game) - || (source != null && !source.checkTransformCount(this, game)) - || this.replaceEvent(EventType.TRANSFORM, game)) { + || (source != null && !source.checkTransformCount(this, game))) { return false; } if (this.transformed) {