From 8d60ee795f5b5cbb42852d28994cb6cf9738f5b8 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 9 Sep 2011 19:54:52 +0000 Subject: [PATCH] "The Nine Servants of Sauron" --- .../lotro/cards/set1/wraith/Card1_219.java | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/wraith/Card1_219.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/wraith/Card1_219.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/wraith/Card1_219.java new file mode 100644 index 000000000..562da4dc3 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/wraith/Card1_219.java @@ -0,0 +1,73 @@ +package com.gempukku.lotro.cards.set1.wraith; + +import com.gempukku.lotro.cards.AbstractLotroCardBlueprint; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayPermanentAction; +import com.gempukku.lotro.cards.effects.ExertCharacterEffect; +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.DefaultCostToEffectAction; +import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: The Fellowship of the Ring + * Side: Shadow + * Culture: Wraith + * Twilight Cost: 1 + * Type: Condition + * Game Text: Search. Plays to your support area. Each time you play a Nazgul, you may exert a Hobbit (except + * the Ring-bearer). + */ +public class Card1_219 extends AbstractLotroCardBlueprint { + public Card1_219() { + super(Side.SHADOW, CardType.CONDITION, Culture.WRAITH, "The Nine Servants of Sauron"); + addKeyword(Keyword.SEARCH); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return PlayConditions.canPayForShadowCard(game, self, twilightModifier); + } + + @Override + public Action getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return new PlayPermanentAction(self, Zone.SHADOW_SUPPORT); + } + + @Override + public int getTwilightCost() { + return 1; + } + + @Override + public List getPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canPlayCardDuringPhase(game, Phase.SHADOW, self) + && checkPlayRequirements(playerId, game, self, 0)) + return Collections.singletonList(getPlayCardAction(playerId, game, self, 0)); + return null; + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.owner(self.getOwner()), Filters.keyword(Keyword.NAZGUL)))) { + final DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, null, "Exert a Hobbit (except the Ring-Bearer)"); + action.addEffect( + new ChooseActiveCardEffect(playerId, "Choose a Hobbit (except the Ring-Bearer)", Filters.keyword(Keyword.HOBBIT), Filters.not(Filters.keyword(Keyword.RING_BEARER))) { + @Override + protected void cardSelected(PhysicalCard card) { + action.addEffect( + new ExertCharacterEffect(card)); + } + }); + return Collections.singletonList(action); + } + return null; + } +}