mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
* Etali, Primal Storm - fixed rollback error on empty library;
This commit is contained in:
parent
24fa917784
commit
9a804810e4
1 changed files with 6 additions and 4 deletions
|
@ -78,11 +78,13 @@ class EtaliPrimalStormEffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
if (!player.getLibrary().getTopCards(game, 1).isEmpty()) {
|
||||
Card topCard = player.getLibrary().getTopCards(game, 1).iterator().next();
|
||||
if (filter.match(topCard, source.getSourceId(), source.getControllerId(), game)) {
|
||||
currentExiledCards.add(topCard);
|
||||
Card topCard = player.getLibrary().getFromTop(game);
|
||||
if (topCard != null) {
|
||||
if (filter.match(topCard, source.getSourceId(), source.getControllerId(), game)) {
|
||||
currentExiledCards.add(topCard);
|
||||
}
|
||||
controller.moveCardsToExile(topCard, source, game, true, source.getSourceId(), sourceObject.getIdName());
|
||||
}
|
||||
controller.moveCardsToExile(topCard, source, game, true, source.getSourceId(), sourceObject.getIdName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue