This commit is contained in:
jeffwadsworth 2020-01-27 15:27:35 -06:00
parent 0525463faf
commit 331c3ce0a0

View file

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