mirror of
https://github.com/correl/mage.git
synced 2025-03-16 17:00:13 -09: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());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
MageObject sourceObject = source.getSourceObject(game);
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
Spell spell = game.getStack().getSpell(getTargetPointer().getFirst(game, source));
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||||
|
@ -114,10 +116,12 @@ class AshioksErasureReplacementEffect extends ContinuousRuleModifyingEffectImpl
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Card card = game.getCard(event.getSourceId());
|
Card card = game.getCard(event.getSourceId());
|
||||||
if (sourcePermanent == null || card == null) {
|
if (sourcePermanent == null
|
||||||
|
|| card == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
UUID exileZone = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
UUID exileZone = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||||
|
|
||||||
if (exileZone == null) {
|
if (exileZone == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -132,7 +136,11 @@ class AshioksErasureReplacementEffect extends ContinuousRuleModifyingEffectImpl
|
||||||
if (exile == null) {
|
if (exile == null) {
|
||||||
return false;
|
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
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue