mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Fixed a NPE in DiscardEffect.
This commit is contained in:
@@ -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 ");
|
||||
|
||||
Reference in New Issue
Block a user