* Force Away - Fixed that the draw / discard effect was not optional (fixes #651).

This commit is contained in:
LevelX2 2014-12-29 13:39:26 +01:00
parent f00001aca2
commit 73c9b8c911

View file

@ -57,6 +57,7 @@ public class DrawDiscardControllerEffect extends OneShotEffect {
super(Outcome.DrawCard);
this.cardsToDraw = cardsToDraw;
this.cardsToDiscard = cardsToDiscard;
this.optional = optional;
staticText = new StringBuilder("Draw ")
.append(cardsToDraw == 1?"a": CardUtil.numberToText(cardsToDraw))
.append(" card").append(cardsToDraw == 1?" ": "s")
@ -81,9 +82,9 @@ public class DrawDiscardControllerEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
if (!optional || player.chooseUse(outcome, "User draw, then discard effect?", game)) {
if (!optional || player.chooseUse(outcome, "Use draw, then discard effect?", game)) {
player.drawCards(cardsToDraw, game);
player.discard(cardsToDiscard, source, game);
player.discard(cardsToDiscard, false, source, game);
}
return true;
}