From 4ad29abdd7a230e4090cae9ce36a13c7dfb8ed4c Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sat, 1 Feb 2020 11:37:45 +0400 Subject: [PATCH] Fixed name compare --- Mage.Sets/src/mage/cards/e/ExclusionRitual.java | 9 +++++---- Mage.Sets/src/mage/cards/i/IxalansBinding.java | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/e/ExclusionRitual.java b/Mage.Sets/src/mage/cards/e/ExclusionRitual.java index 240d9bb650..d65d82bd0c 100644 --- a/Mage.Sets/src/mage/cards/e/ExclusionRitual.java +++ b/Mage.Sets/src/mage/cards/e/ExclusionRitual.java @@ -1,7 +1,5 @@ - package mage.cards.e; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -21,6 +19,9 @@ import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; +import mage.util.CardUtil; + +import java.util.UUID; /** * @author Loki @@ -34,7 +35,7 @@ public final class ExclusionRitual extends CardImpl { } public ExclusionRitual(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}{W}"); // Imprint - When Exclusion Ritual enters the battlefield, exile target nonland permanent. Ability ability = new EntersBattlefieldTriggeredAbility(new ExclusionRitualImprintEffect(), false); @@ -107,7 +108,7 @@ class ExclusionRitualReplacementEffect extends ContinuousRuleModifyingEffectImpl if (!sourcePermanent.getImprinted().isEmpty()) { Card imprintedCard = game.getCard(sourcePermanent.getImprinted().get(0)); if (imprintedCard != null) { - return card.getName().equals(imprintedCard.getName()); + return CardUtil.haveSameNames(card, imprintedCard); } } } diff --git a/Mage.Sets/src/mage/cards/i/IxalansBinding.java b/Mage.Sets/src/mage/cards/i/IxalansBinding.java index 3699616220..6399fb057a 100644 --- a/Mage.Sets/src/mage/cards/i/IxalansBinding.java +++ b/Mage.Sets/src/mage/cards/i/IxalansBinding.java @@ -90,8 +90,8 @@ class IxalansBindingReplacementEffect extends ContinuousRuleModifyingEffectImpl } } if (exile != null) { - for (Card crad : exile.getCards(game)) { - if (crad.getName().equals(card.getName())) { + for (Card e : exile.getCards(game)) { + if (CardUtil.haveSameNames(e, card)) { return true; } }