forked from External/mage
[SWS] Fixed some problems.
This commit is contained in:
parent
da685472d8
commit
6554102367
7 changed files with 36 additions and 66 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue