From fc71b705f8feacfa84baf7cea4fb55a458a9058c Mon Sep 17 00:00:00 2001 From: Sloth Date: Sat, 23 Aug 2014 11:16:36 +0000 Subject: [PATCH] - Fixed Pale Wayfarer. --- .../java/forge/game/ability/effects/ProtectEffect.java | 8 ++++++-- forge-gui/res/cardsfolder/p/pale_wayfarer.txt | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/ProtectEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ProtectEffect.java index aa60b2de9bb..9672a96da0a 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ProtectEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ProtectEffect.java @@ -34,7 +34,7 @@ public class ProtectEffect extends SpellAbilityEffect { List tgtCards = getTargetCards(sa); - if (tgtCards.size() > 0) { + if (!tgtCards.isEmpty()) { final Iterator it = tgtCards.iterator(); while (it.hasNext()) { @@ -100,8 +100,13 @@ public class ProtectEffect extends SpellAbilityEffect { final boolean isChoice = sa.getParam("Gains").contains("Choice"); final List choices = getProtectionList(sa); final List gains = new ArrayList(); + final List tgtCards = getTargetCards(sa); + if (isChoice && !choices.isEmpty()) { Player choser = sa.getActivatingPlayer(); + if (sa.hasParam("Choser") && sa.getParam("Choser").equals("Controller") && !tgtCards.isEmpty()) { + choser = tgtCards.get(0).getController(); + } final String choice = choser.getController().chooseProtectionType("Choose a protection", sa, choices); if( null == choice) return; @@ -117,7 +122,6 @@ public class ProtectEffect extends SpellAbilityEffect { } } - final List tgtCards = getTargetCards(sa); final ArrayList untargetedCards = new ArrayList(); final TargetRestrictions tgt = sa.getTargetRestrictions(); diff --git a/forge-gui/res/cardsfolder/p/pale_wayfarer.txt b/forge-gui/res/cardsfolder/p/pale_wayfarer.txt index f6863fabfff..6c340ce6cc9 100644 --- a/forge-gui/res/cardsfolder/p/pale_wayfarer.txt +++ b/forge-gui/res/cardsfolder/p/pale_wayfarer.txt @@ -2,7 +2,7 @@ Name:Pale Wayfarer ManaCost:5 W W Types:Creature Spirit Giant PT:4/4 -A:AB$ Protection | Cost$ 2 W W Untap | ValidTgts$ Creature | TgtPrompt$ Select target creature | Gains$ Choice | Choices$ AnyColor | SpellDescription$ Target creature gains protection from the color of your choice until end of turn. +A:AB$ Protection | Cost$ 2 W W Untap | ValidTgts$ Creature | TgtPrompt$ Select target creature | Gains$ Choice | Choices$ AnyColor | Choser$ Controller | SpellDescription$ Target creature gains protection from the color of your choice until end of turn. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/pale_wayfarer.jpg Oracle:{2}{W}{W}, {Q}: Target creature gains protection from the color of its controller's choice until end of turn. ({Q} is the untap symbol.)