From 17c1b359e26f04d302cdb8f9bac92fc28904345f Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Mon, 17 Oct 2011 13:18:35 +0000 Subject: [PATCH] "Evil-smelling Fens" --- .../lotro/cards/set5/gollum/Card5_022.java | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/gollum/Card5_022.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/gollum/Card5_022.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/gollum/Card5_022.java new file mode 100644 index 000000000..fe8a11d5d --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/gollum/Card5_022.java @@ -0,0 +1,60 @@ +package com.gempukku.lotro.cards.set5.gollum; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffect; +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.ActivateCardAction; +import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect; +import com.gempukku.lotro.logic.modifiers.KeywordModifier; +import com.gempukku.lotro.logic.modifiers.Modifier; +import com.gempukku.lotro.logic.timing.Action; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Battle of Helm's Deep + * Side: Shadow + * Culture: Gollum + * Twilight Cost: 1 + * Type: Condition + * Game Text: Plays to your support area. Each site on the adventure path is a marsh. Shadow: Exert Gollum twice + * and discard this condition to play a minion from your discard pile. + */ +public class Card5_022 extends AbstractPermanent { + public Card5_022() { + super(Side.SHADOW, 1, CardType.CONDITION, Culture.GOLLUM, Zone.SUPPORT, "Evil-smelling Fens"); + } + + @Override + public List getAlwaysOnModifiers(LotroGame game, PhysicalCard self) { + return Collections.singletonList( + new KeywordModifier(self, + Filters.and( + CardType.SITE, + Zone.ADVENTURE_PATH + ), Keyword.MARSH)); + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.SHADOW, self, 0) + && PlayConditions.canExert(self, game, 2, Filters.name("Gollum")) + && PlayConditions.canPlayFromDiscard(playerId, game, CardType.MINION)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Filters.name("Gollum"))); + action.appendCost( + new DiscardCardsFromPlayEffect(self, self)); + action.appendEffect( + new ChooseAndPlayCardFromDiscardEffect(playerId, game.getGameState().getDiscard(playerId), CardType.MINION)); + return Collections.singletonList(action); + } + return null; + } +}