From c5d3c803b592eb990842636a59120b9644da0f88 Mon Sep 17 00:00:00 2001 From: Loki Date: Wed, 3 Aug 2011 10:17:20 +0300 Subject: [PATCH] fix Spell.chooseNewTargets --- Mage/src/mage/game/stack/Spell.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Mage/src/mage/game/stack/Spell.java b/Mage/src/mage/game/stack/Spell.java index 1214b0ea63..47bd1a29b2 100644 --- a/Mage/src/mage/game/stack/Spell.java +++ b/Mage/src/mage/game/stack/Spell.java @@ -28,31 +28,32 @@ package mage.game.stack; -import mage.Mana; -import mage.abilities.SpellAbility; -import mage.game.*; -import java.util.List; -import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.MageObject; +import mage.Mana; import mage.ObjectColor; import mage.abilities.Abilities; import mage.abilities.Ability; +import mage.abilities.SpellAbility; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; import mage.abilities.effects.Effect; import mage.abilities.effects.PostResolveEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.Card; +import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; import mage.target.Target; import mage.watchers.Watchers; import sun.reflect.generics.reflectiveObjects.NotImplementedException; +import java.util.List; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -145,7 +146,9 @@ public class Spell> implements StackObject, Card { if (object == null) { Player targetPlayer = game.getPlayer(targetId); if (player != null) name = targetPlayer.getName(); - } + } else { + name = object.getName(); + } if (name != null && player.chooseUse(ability.getEffects().get(0).getOutcome(), "Change target from " + name + "?", game)) { if (!player.chooseTarget(ability.getEffects().get(0).getOutcome(), newTarget, ability, game)) newTarget.addTarget(targetId, ability, game);