From 4d9de5470cddf70882485dc0e56995b86a125cbd Mon Sep 17 00:00:00 2001 From: marcins78 Date: Wed, 20 Nov 2013 16:44:02 +0000 Subject: [PATCH] Easterling Soldier --- .../src/main/web/js/gemp-019/set20.js | 2 +- .../cards/set20/fallenRealms/Card20_120.java | 39 +++++++++++++------ 2 files changed, 28 insertions(+), 13 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 28bf9d107..6579e70f7 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 @@ -116,7 +116,7 @@ var set20 = { '20_117': 'http://lotrtcg.org/coreset/fallenrealms/easterlingrecruit.jpg', '20_118': 'http://lotrtcg.org/coreset/fallenrealms/easterlingregiment.jpg', '20_119': 'http://lotrtcg.org/coreset/fallenrealms/easterlingscout.jpg', - '20_120': 'http://lotrtcg.org/coreset/fallenrealms/easterlingsoldier.jpg', + '20_120': 'http://lotrtcg.org/coreset/fallenrealms/easterlingsoldier(r3).jpg', '20_121': 'http://lotrtcg.org/coreset/fallenrealms/easterlingstrategist.jpg', '20_123': 'http://lotrtcg.org/coreset/fallenrealms/freshreinforcements.jpg', '20_124': 'http://lotrtcg.org/coreset/fallenrealms/halberdofrhun.jpg', diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/fallenRealms/Card20_120.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/fallenRealms/Card20_120.java index 0e6bff129..0eda38301 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/fallenRealms/Card20_120.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/fallenRealms/Card20_120.java @@ -1,41 +1,56 @@ package com.gempukku.lotro.cards.set20.fallenRealms; +import com.gempukku.lotro.cards.AbstractAttachable; import com.gempukku.lotro.cards.AbstractMinion; +import com.gempukku.lotro.cards.ExtraFilters; import com.gempukku.lotro.cards.TriggerConditions; -import com.gempukku.lotro.cards.effects.choose.ChooseAndPutCardFromDiscardOnBottomOfDeckEffect; +import com.gempukku.lotro.cards.actions.AttachPermanentAction; +import com.gempukku.lotro.common.CardType; import com.gempukku.lotro.common.Culture; import com.gempukku.lotro.common.Keyword; import com.gempukku.lotro.common.Race; +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.OptionalTriggerAction; +import com.gempukku.lotro.logic.effects.ChooseArbitraryCardsEffect; import com.gempukku.lotro.logic.timing.EffectResult; +import java.util.Collection; import java.util.Collections; import java.util.List; /** - * 3 - * Easterling Soldier - * Fallen Realms Minion • Man - * 6 1 4 - * Easterling. Toil 1. - * When you play this minion, you may place an Easterling from your discard pile at the bottom of your draw deck. + * ❸ Easterling Soldier [Fal] + * Minion • Man + * Strength: 8 Vitality: 2 Roaming: 4 + * Easterling. Toil 1. (When you play this card, you may reduce its twilight cost by 1. You do this by exerting one of your characters of the same culture as this card.) + * Each time this minion exerts, you may play a [Fal] possession on him from your draw deck. + *

+ * http://lotrtcg.org/coreset/fallenrealms/easterlingsoldier(r3).jpg */ public class Card20_120 extends AbstractMinion { public Card20_120() { - super(3, 6, 1, 4, Race.MAN, Culture.FALLEN_REALMS, "Easterling Soldier"); + super(3, 8, 2, 4, Race.MAN, Culture.FALLEN_REALMS, "Easterling Soldier"); addKeyword(Keyword.EASTERLING); addKeyword(Keyword.TOIL, 1); } @Override - public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { - if (TriggerConditions.played(game, effectResult, self)) { + public List getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) { + if (TriggerConditions.forEachExerted(game, effectResult, self)) { OptionalTriggerAction action = new OptionalTriggerAction(self); action.appendEffect( - new ChooseAndPutCardFromDiscardOnBottomOfDeckEffect( - action, playerId, 1, 1, Keyword.EASTERLING)); + new ChooseArbitraryCardsEffect(playerId, "Choose card to play", game.getGameState().getDeck(playerId), Filters.and(Culture.FALLEN_REALMS, CardType.POSSESSION, ExtraFilters.attachableTo(game, self)), 1, 1) { + @Override + protected void cardsSelected(LotroGame game, Collection selectedCards) { + if (selectedCards.size() > 0) { + PhysicalCard selectedCard = selectedCards.iterator().next(); + AttachPermanentAction attachPermanentAction = ((AbstractAttachable) selectedCard.getBlueprint()).getPlayCardAction(playerId, game, selectedCard, Filters.and(self), 0); + game.getActionsEnvironment().addActionToStack(attachPermanentAction); + } + } + }); return Collections.singletonList(action); } return null;