- Fixed a NPE in DiscardEffect.

git-svn-id: http://svn.slightlymagic.net/forge/trunk@35801 269b9781-a132-4a9b-9d4e-f004f1b56b58
This commit is contained in:
Agetian 2017-09-27 17:02:23 +00:00
parent 86b62623e3
commit 9bcfced7d2

View File

@ -293,11 +293,11 @@ public class DiscardEffect extends SpellAbilityEffect {
CardCollectionView toBeDiscarded = validCards.isEmpty() ? null : chooser.getController().chooseCardsToDiscardFrom(p, sa, validCards, min, max);
if (toBeDiscarded.size() > 1) {
toBeDiscarded = GameActionUtil.orderCardsByTheirOwners(p.getGame(), toBeDiscarded, ZoneType.Graveyard);
}
if (toBeDiscarded != null) {
if (toBeDiscarded.size() > 1) {
toBeDiscarded = GameActionUtil.orderCardsByTheirOwners(p.getGame(), toBeDiscarded, ZoneType.Graveyard);
}
if (mode.startsWith("Reveal") ) {
p.getController().reveal(toBeDiscarded, ZoneType.Hand, p,
chooser + " has chosen " + (toBeDiscarded.size() == 1 ? "this card" : "these cards") + " from ");