updated Spellskite

This commit is contained in:
BetaSteward 2011-09-14 12:44:27 -04:00
parent d9f846f783
commit 37cec55493

View file

@ -92,8 +92,11 @@ class SpellskiteEffect extends OneShotEffect<SpellskiteEffect> {
if (spell != null) {
Targets targets = spell.getSpellAbility().getTargets();
if (targets.size() == 1 && targets.get(0).getTargets().size() == 1) {
targets.get(0).clearChosen();
targets.get(0).add(source.getSourceId(), game);
Target target = targets.get(0);
if (target.canTarget(source.getSourceId(), game)) {
target.clearChosen();
target.add(source.getSourceId(), game);
}
}
else {
Player player = game.getPlayer(source.getControllerId());
@ -108,9 +111,11 @@ class SpellskiteEffect extends OneShotEffect<SpellskiteEffect> {
name = object.getName();
}
if (name != null && player.chooseUse(Outcome.Neutral, "Change target from " + name + " to {this}?", game)) {
target.remove(targetId);
target.addTarget(source.getSourceId(), source, game);
break;
if (target.canTarget(source.getSourceId(), game)) {
target.remove(targetId);
target.addTarget(source.getSourceId(), source, game);
break;
}
}
}
}