From e98ed29e291c0afff41051217472d4a4c352eba4 Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Wed, 15 Feb 2023 13:05:55 +0000 Subject: [PATCH] Fix Mirrex --- Mage.Sets/src/mage/cards/m/Mirrex.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Mage.Sets/src/mage/cards/m/Mirrex.java b/Mage.Sets/src/mage/cards/m/Mirrex.java index 5df314478dc..5b191db9c6a 100644 --- a/Mage.Sets/src/mage/cards/m/Mirrex.java +++ b/Mage.Sets/src/mage/cards/m/Mirrex.java @@ -1,7 +1,5 @@ package mage.cards.m; -import java.util.Objects; -import java.util.Optional; import java.util.UUID; import mage.abilities.Ability; @@ -64,15 +62,12 @@ enum MirrexCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - return Optional - .ofNullable(source.getSourcePermanentIfItStillExists(game)) - .filter(Objects::nonNull) - .map(Permanent::getTurnsOnBattlefield) - .equals(0); + Permanent permanent = source.getSourcePermanentIfItStillExists(game); + return permanent != null && permanent.getTurnsOnBattlefield() == 0; } @Override public String toString() { - return "if {this} entered the battlefield this turn"; + return "{this} entered the battlefield this turn"; } } \ No newline at end of file