Fixed name compare

This commit is contained in:
Oleg Agafonov 2020-02-01 11:37:45 +04:00
parent 9cd3eeb898
commit 4ad29abdd7
2 changed files with 7 additions and 6 deletions

View file

@ -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);
}
}
}

View file

@ -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;
}
}