This commit is contained in:
BetaSteward 2010-12-13 23:56:55 -05:00
commit 77936865c3
2 changed files with 8 additions and 2 deletions

View file

@ -7,3 +7,4 @@ syntax: regexp
target
nbactions.xml
glob:Mage.Client/cheat.dck
glob:Mage.Client/test.dck

View file

@ -55,8 +55,13 @@ public class DiscardSourceCost extends CostImpl<DiscardSourceCost> {
@Override
public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) {
Player player = game.getPlayer(controllerId);
Card card = player.getHand().get(sourceId, game);
return player.discard(card, null, game);
if (player != null) {
Card card = player.getHand().get(sourceId, game);
if (card != null) {
paid = player.discard(card, null, game);
}
}
return paid;
}
@Override