- Fixed Outwit. Now handles a player targeted anywhere on the ability. <AVR>

This commit is contained in:
jeffwadsworth 2012-05-24 18:46:23 -05:00
parent 5a3cdee63e
commit 613c4afa8b

View file

@ -43,6 +43,8 @@ import mage.filter.FilterSpell;
import mage.players.Player;
import mage.game.stack.Spell;
import mage.target.TargetObject;
import mage.target.Target;
/**
@ -161,11 +163,13 @@ public class Outwit extends CardImpl<Outwit> {
if (spell != null) {
Ability ability = spell.getStackAbility();
if (ability != null && !ability.getTargets().isEmpty()) {
for (UUID playerId : ability.getTargets().get(0).getTargets()) {
Player player = game.getPlayer(playerId);
if (player != null) {
return true;
}
for (Target target : ability.getTargets()) {
for (UUID playerId : target.getTargets()) {
Player player = game.getPlayer(playerId);
if (player != null) {
return true;
}
}
}
}
}