From 18006690a9f3236214cc77ec09c53f1b7fdb1c6e Mon Sep 17 00:00:00 2001 From: marcins78 Date: Mon, 4 Mar 2013 11:29:30 +0000 Subject: [PATCH] - "Elrond", "Herald to Gil-galad" now gives an option, on how many times you wish to heal that ally. --- .../src/main/web/includes/changeLog.html | 3 +++ .../lotro/cards/set3/elven/Card3_013.java | 27 ++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/includes/changeLog.html b/gemp-lotr/gemp-lotr-async/src/main/web/includes/changeLog.html index fbe6df55d..1366b2516 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/includes/changeLog.html +++ b/gemp-lotr/gemp-lotr-async/src/main/web/includes/changeLog.html @@ -1,4 +1,7 @@
+4 Mar. 2013
+- "Elrond", "Herald to Gil-galad" now gives an option, on how many times you wish to heal that ally.
+
 20 Feb. 2013
 - Corruption check at the beginning of the game (after bidding) now takes into account all resistance modifiers.
 
diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set3/elven/Card3_013.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set3/elven/Card3_013.java
index 1c9824b18..18a7ba557 100644
--- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set3/elven/Card3_013.java
+++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set3/elven/Card3_013.java
@@ -10,7 +10,12 @@ import com.gempukku.lotro.game.PhysicalCard;
 import com.gempukku.lotro.game.state.LotroGame;
 import com.gempukku.lotro.logic.actions.ActivateCardAction;
 import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
+import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
+import com.gempukku.lotro.logic.decisions.IntegerAwaitingDecision;
+import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
 import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
+import com.gempukku.lotro.logic.effects.HealCharactersEffect;
+import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
 import com.gempukku.lotro.logic.timing.Action;
 import com.gempukku.lotro.logic.timing.EffectResult;
 
@@ -35,11 +40,27 @@ public class Card3_013 extends AbstractAlly {
     }
 
     @Override
-    public List getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
+    public List getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
         if (TriggerConditions.startOfTurn(game, effectResult)) {
             final OptionalTriggerAction action = new OptionalTriggerAction(self);
-            action.appendEffect(
-                    new ChooseAndHealCharactersEffect(action, playerId, 1, 1, 2, CardType.ALLY, Filters.isAllyHome(3, Block.FELLOWSHIP)));
+            action.appendCost(
+                    new ChooseActiveCardEffect(self, playerId, "Choose an ally", CardType.ALLY, Filters.isAllyHome(3, Block.FELLOWSHIP), Filters.canHeal) {
+                        @Override
+                        protected void cardSelected(LotroGame game, final PhysicalCard card) {
+                            action.appendEffect(
+                                    new PlayoutDecisionEffect(playerId,
+                                            new IntegerAwaitingDecision(1, "How many times do you wish to heal it?", 0, 2, 2) {
+                                                @Override
+                                                public void decisionMade(String result) throws DecisionResultInvalidException {
+                                                    final int heals = getValidatedResult(result);
+                                                    for (int i=0; i