From c99fb3b1781eb5c42acf4e1e5fae8a7a23e25943 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 31 May 2015 19:37:59 +0200 Subject: [PATCH] * Possibility Storm - Fixed that if the card that shares a card type could not be cast (because it's a land or there were no valid targets) causing java error if the player confirmed he wants to cast it. --- Mage.Sets/src/mage/sets/dragonsmaze/PossibilityStorm.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/PossibilityStorm.java b/Mage.Sets/src/mage/sets/dragonsmaze/PossibilityStorm.java index 24f21aa767a..0b751240674 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/PossibilityStorm.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/PossibilityStorm.java @@ -54,7 +54,6 @@ import mage.target.targetpointer.FixedTarget; * @author LevelX2 */ - public class PossibilityStorm extends CardImpl { public PossibilityStorm(UUID ownerId) { @@ -123,7 +122,7 @@ class PossibilityStormEffect extends OneShotEffect { public PossibilityStormEffect() { super(Outcome.Neutral); - staticText = "that player exiles it, then exiles cards from the top of his or her library until he or she exiles a card that shares a card type with it. That player may cast that card without paying its mana cost. Then he or she puts all cards exiled with Possibility Storm on the bottom of his or her library in a random order"; + staticText = "that player exiles it, then exiles cards from the top of his or her library until he or she exiles a card that shares a card type with it. That player may cast that card without paying its mana cost. Then he or she puts all cards exiled with {this} on the bottom of his or her library in a random order"; } public PossibilityStormEffect(final PossibilityStormEffect effect) { @@ -148,7 +147,9 @@ class PossibilityStormEffect extends OneShotEffect { } } while (library.size() > 0 && card != null && !sharesType(card, spell.getCardType())); - if (card != null && sharesType(card, spell.getCardType())) { + if (card != null && sharesType(card, spell.getCardType()) && + !card.getCardType().contains(CardType.LAND) && + card.getSpellAbility().getTargets().canChoose(spellController.getId(), game)) { if (spellController.chooseUse(Outcome.PlayForFree, "Cast " + card.getLogName() + " without paying cost?", game)) { spellController.cast(card.getSpellAbility(), game, true); }