mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
- Fixed #6228
This commit is contained in:
parent
0525463faf
commit
331c3ce0a0
1 changed files with 11 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue