From 521b573ad23f4cc98e4eeed44eade6a956ea621d Mon Sep 17 00:00:00 2001 From: Derek Monturo Date: Fri, 21 Jul 2017 07:29:14 -0400 Subject: [PATCH] fixes #3707 minds desire npe --- Mage.Sets/src/mage/cards/m/MindsDesire.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/m/MindsDesire.java b/Mage.Sets/src/mage/cards/m/MindsDesire.java index 213fc9ec8f7..12081133c19 100644 --- a/Mage.Sets/src/mage/cards/m/MindsDesire.java +++ b/Mage.Sets/src/mage/cards/m/MindsDesire.java @@ -55,7 +55,6 @@ public class MindsDesire extends CardImpl { public MindsDesire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{U}{U}"); - // Shuffle your library. Then exile the top card of your library. Until end of turn, you may play that card without paying its mana cost. this.getSpellAbility().addEffect(new MindsDesireEffect()); @@ -135,13 +134,10 @@ class MindsDesireCastFromExileEffect extends AsThoughEffectImpl { public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { UUID targetId = getTargetPointer().getFirst(game, source); Player player = game.getPlayer(affectedControllerId); - if (targetId != null - && targetId.equals(sourceId) - && player != null) { + if (targetId != null && sourceId != null && targetId.equals(sourceId) && player != null) { if (affectedControllerId.equals(source.getControllerId())) { Card card = game.getCard(sourceId); - if (card != null - && game.getState().getZone(sourceId) == Zone.EXILED) { + if (card != null && game.getState().getZone(sourceId) == Zone.EXILED) { player.setCastSourceIdWithAlternateMana(sourceId, null, card.getSpellAbility().getCosts()); return true; }