mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
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:
parent
232ad196eb
commit
642de722f6
2 changed files with 3 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue