* Etali, Primal Storm - fixed rollback error on empty library;
@@ -78,7 +78,8 @@ 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();
+ Card topCard = player.getLibrary().getFromTop(game);
+ if (topCard != null) {
if (filter.match(topCard, source.getSourceId(), source.getControllerId(), game)) {
currentExiledCards.add(topCard);
}
@@ -86,6 +87,7 @@ class EtaliPrimalStormEffect extends OneShotEffect {
}
}
}
+ }
// cast the possible cards without paying the mana
Cards cardsToCast = new CardsImpl();
