From 331c3ce0a0e5b446c6a087cfe88e9d7bf7f00336 Mon Sep 17 00:00:00 2001 From: jeffwadsworth Date: Mon, 27 Jan 2020 15:27:35 -0600 Subject: [PATCH] - Fixed #6228 --- Mage.Sets/src/mage/cards/a/AshioksErasure.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AshioksErasure.java b/Mage.Sets/src/mage/cards/a/AshioksErasure.java index 0df5eedae1..d5b3ccd6d1 100644 --- a/Mage.Sets/src/mage/cards/a/AshioksErasure.java +++ b/Mage.Sets/src/mage/cards/a/AshioksErasure.java @@ -83,7 +83,9 @@ class AshioksErasureExileEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = source.getSourceObject(game); Spell spell = game.getStack().getSpell(getTargetPointer().getFirst(game, source)); - if (controller == null || sourceObject == null || spell == null) { + if (controller == null + || sourceObject == null + || spell == null) { return false; } UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); @@ -114,10 +116,12 @@ class AshioksErasureReplacementEffect extends ContinuousRuleModifyingEffectImpl return false; } Card card = game.getCard(event.getSourceId()); - if (sourcePermanent == null || card == null) { + if (sourcePermanent == null + || card == null) { return false; } UUID exileZone = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); + if (exileZone == null) { return false; } @@ -132,7 +136,11 @@ class AshioksErasureReplacementEffect extends ContinuousRuleModifyingEffectImpl if (exile == null) { return false; } - return exile.getCards(game).stream().anyMatch(card.getName()::equals); + Card exiledCard = exile.getCards(game).iterator().next(); + if (exiledCard != null) { + return exiledCard.getName().equals(card.getName()); + } + return false; } @Override