- Fixed the hidden origin ChangeZone abilities that use a target (stack descriptions still need to be reworked but that has been an issue for a while)

This commit is contained in:
moomarc
2013-04-02 10:33:19 +00:00
parent 69978b40e9
commit 18266580a3
2 changed files with 4 additions and 4 deletions

View File

@@ -1071,7 +1071,7 @@ public class ChangeZoneAi extends SpellAbilityAi {
if (tgt != null) {
if (!tgt.getTargetPlayers().isEmpty()) {
player = player != null ? player : tgt.getTargetPlayers().get(0);
player = sa.hasParam("DefinedPlayer") ? player : tgt.getTargetPlayers().get(0);
if (!player.canBeTargetedBy(sa)) {
return;
}

View File

@@ -528,7 +528,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
if (decider instanceof AIPlayer) {
ChangeZoneAi.hiddenOriginResolveAI(decider, sa, player);
} else {
changeHiddenOriginResolveHuman((HumanPlayer)decider, sa, player);
changeHiddenOriginResolveHuman((HumanPlayer) decider, sa, player);
}
}
}
@@ -554,7 +554,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
final Target tgt = sa.getTarget();
if (tgt != null) {
final List<Player> players = tgt.getTargetPlayers();
player = player != null ? player : players.get(0);
player = sa.hasParam("DefinedPlayer") ? player : players.get(0);
if (players.contains(player) && !player.canBeTargetedBy(sa)) {
return;
}
@@ -623,7 +623,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
}
// Look at opponents hand before moving onto choosing a card
if (origin.contains(ZoneType.Hand) && player.isOpponentOf(player)) {
if (origin.contains(ZoneType.Hand) && player.isOpponentOf(decider)) {
GuiChoose.oneOrNone(sa.getSourceCard().getName() + " - Looking at Opponent's Hand", player
.getCardsIn(ZoneType.Hand));
}