Mind Shatter bug fix for #2110. Before a discard effect can happen, checks the amount of cards to be discarded > 0

This commit is contained in:
drmDev 2016-07-24 15:00:07 -04:00
parent 232ad196eb
commit 642de722f6
2 changed files with 3 additions and 2 deletions

View file

@ -723,6 +723,9 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public Cards discard(int amount, boolean random, Ability source, Game game) {
Cards discardedCards = new CardsImpl();
if (amount <= 0) {
return discardedCards;
}
if (this.getHand().size() == 1 || this.getHand().size() == amount) {
discardedCards.addAll(this.getHand());
while (this.getHand().size() > 0) {