Fixed syntax error of cascadeAbility.

This commit is contained in:
LevelX2 2017-02-06 22:02:44 +01:00
parent b8cc0120cb
commit b6a66f1aba

View file

@ -119,25 +119,26 @@ class CascadeEffect extends OneShotEffect {
break;
}
controller.moveCardsToExile(card, source, game, true, exile.getId(), exile.getName());
}
while (controller.isInGame() && (card.getCardType().contains(CardType.LAND) || !cardThatCostsLess(sourceCost, card, game)));
} while (controller.isInGame() && (card.getCardType().contains(CardType.LAND) || !cardThatCostsLess(sourceCost, card, game)));
controller.getLibrary().reset(); // set back empty draw state if that caused an empty draw
if (card != null) {
if (controller.chooseUse(outcome, "Use cascade effect on " + card.getLogName() + "?", source, game)) {
if (controller.chooseUse(outcome, "Use cascade effect on " + card.getLogName() + '?', source, game)) {
controller.cast(card.getSpellAbility(), game, true);
}
// Move the remaining cards to the buttom of the library in a random order
Cards cardsFromExile = new CardsImpl();
Cards cardsToLibrary = new CardsImpl();
cardsFromExile.addAll(exile);
while (!cardsFromExile.isEmpty()) {
card = cardsFromExile.getRandom(game);
cardsFromExile.remove(card.getId());
cardsToLibrary.add(card);
}
controller.putCardsOnBottomOfLibrary(cardsToLibrary, game, source, false);
}
// Move the remaining cards to the buttom of the library in a random order
Cards cardsFromExile = new CardsImpl();
Cards cardsToLibrary = new CardsImpl();
cardsFromExile.addAll(exile);
while (!cardsFromExile.isEmpty()) {
card = cardsFromExile.getRandom(game);
cardsFromExile.remove(card.getId());
cardsToLibrary.add(card);
}
controller.putCardsOnBottomOfLibrary(cardsToLibrary, game, source, false);
return true;
}