[SWS] Fixed some problems.

This commit is contained in:
LevelX2 2016-10-02 22:50:34 +02:00
parent da685472d8
commit 6554102367
7 changed files with 36 additions and 66 deletions

View file

@ -75,16 +75,14 @@ public class DiscardTargetCost extends CostImpl {
int amount = this.getTargets().get(0).getNumberOfTargets();
if (randomDiscard) {
this.cards.addAll(player.discard(amount, true, ability, game).getCards(game));
} else {
if (targets.choose(Outcome.Discard, controllerId, sourceId, game)) {
for (UUID targetId : targets.get(0).getTargets()) {
Card card = player.getHand().get(targetId, game);
if (card == null) {
return false;
}
player.discard(card, ability, game);
this.cards.add(card);
} else if (targets.choose(Outcome.Discard, controllerId, sourceId, game)) {
for (UUID targetId : targets.get(0).getTargets()) {
Card card = player.getHand().get(targetId, game);
if (card == null) {
return false;
}
player.discard(card, ability, game);
this.cards.add(card);
}
}
paid = cards.size() >= amount;