From 9728d221b5c00899b228b944346ef51eab4235b9 Mon Sep 17 00:00:00 2001 From: marcins78 Date: Mon, 25 Mar 2013 10:40:55 +0000 Subject: [PATCH] 20_100 --- .../src/main/web/js/gemp-019/set20.js | 2 +- .../lotro/cards/set20/elven/Card20_100.java | 24 ++++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-019/set20.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-019/set20.js index 99cc5277b..ac6076e24 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-019/set20.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-019/set20.js @@ -97,7 +97,7 @@ var set20 = { '20_97': 'http://www.lotrtcg.org/coreset/elven/naryaerop(r2).jpg', '20_98': 'http://lotrtcg.org/coreset/elven/nenyaroa.jpg', '20_99': 'http://lotrtcg.org/coreset/elven/orophinls.jpg', - '20_100': 'http://lotrtcg.org/coreset/elven/peeringforward.jpg', + '20_100': 'http://www.lotrtcg.org/coreset/elven/peeringforward(r2).jpg', '20_101': 'http://lotrtcg.org/coreset/elven/phialofgaladriellidp.jpg', '20_102': 'http://lotrtcg.org/coreset/elven/pushbackthedarkness.jpg', '20_103': 'http://lotrtcg.org/coreset/elven/silentscouts.jpg', diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/elven/Card20_100.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/elven/Card20_100.java index 62ccf8026..9cf6a4623 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/elven/Card20_100.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/elven/Card20_100.java @@ -4,23 +4,25 @@ import com.gempukku.lotro.cards.AbstractPermanent; import com.gempukku.lotro.cards.TriggerConditions; import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseModifierEffect; import com.gempukku.lotro.common.*; -import com.gempukku.lotro.filters.Filters; import com.gempukku.lotro.game.PhysicalCard; import com.gempukku.lotro.game.state.LotroGame; -import com.gempukku.lotro.logic.actions.RequiredTriggerAction; +import com.gempukku.lotro.logic.actions.OptionalTriggerAction; import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; import com.gempukku.lotro.logic.modifiers.StrengthModifier; import com.gempukku.lotro.logic.timing.EffectResult; import com.gempukku.lotro.logic.timing.results.RevealCardFromTopOfDeckResult; +import java.util.Collection; import java.util.LinkedList; import java.util.List; /** * 0 * •Peering Forward - * Elven Condition • Support Area - * Each time you reveal an [Elven] card from the top of your draw deck, make a minion strength -1 until the regroup phase. + * Condition • Support Area + * Each time you reveal the top card of your draw deck, you may make a minion strength -1 until the regroup phase + * (or -2 if you reveal an [Elven] card). + * http://www.lotrtcg.org/coreset/elven/peeringforward(r2).jpg */ public class Card20_100 extends AbstractPermanent { public Card20_100() { @@ -28,14 +30,18 @@ public class Card20_100 extends AbstractPermanent { } @Override - public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, final PhysicalCard self) { + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) { if (TriggerConditions.revealedCardsFromTopOfDeck(effectResult, self.getOwner())) { RevealCardFromTopOfDeckResult revealedCardsResult = (RevealCardFromTopOfDeckResult) effectResult; - List actions = new LinkedList(); - for (PhysicalCard revealedElvenCard : Filters.filter(revealedCardsResult.getRevealedCards(), game.getGameState(), game.getModifiersQuerying(), Culture.ELVEN)) { - final RequiredTriggerAction action = new RequiredTriggerAction(self); + List actions = new LinkedList(); + final Collection revealedCards = revealedCardsResult.getRevealedCards(); + for (PhysicalCard revealedCard : revealedCards) { + int penalty = revealedCard.getBlueprint().getCulture() == Culture.ELVEN ? -2 : -1; + final OptionalTriggerAction action = new OptionalTriggerAction(self); + action.setText("Give minion "+penalty+" strength"); + action.setTriggerIdentifier(self.getCardId() + "-" + revealedCard.getCardId()); action.appendEffect( - new ChooseActiveCardEffect(self, self.getOwner(), "Choose a minion for strength -1 penalty", CardType.MINION) { + new ChooseActiveCardEffect(self, self.getOwner(), "Choose a minion for strength " + penalty + " penalty", CardType.MINION) { @Override protected void cardSelected(LotroGame game, PhysicalCard card) { action.appendEffect(