mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
fixed issue 13
This commit is contained in:
parent
83074c9b1a
commit
10cdf10da6
1 changed files with 7 additions and 2 deletions
|
|
@ -55,8 +55,13 @@ public class DiscardSourceCost extends CostImpl<DiscardSourceCost> {
|
||||||
@Override
|
@Override
|
||||||
public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) {
|
public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) {
|
||||||
Player player = game.getPlayer(controllerId);
|
Player player = game.getPlayer(controllerId);
|
||||||
Card card = player.getHand().get(sourceId, game);
|
if (player != null) {
|
||||||
return player.discard(card, null, game);
|
Card card = player.getHand().get(sourceId, game);
|
||||||
|
if (card != null) {
|
||||||
|
paid = player.discard(card, null, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return paid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue