From 93eb2fd48f3bbdfe86bce6257155b8f78aad4cb5 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Sat, 10 Sep 2011 01:44:11 +0000 Subject: [PATCH] "Wreathed in Shadow" --- .../lotro/cards/set1/wraith/Card1_238.java | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/wraith/Card1_238.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/wraith/Card1_238.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/wraith/Card1_238.java new file mode 100644 index 000000000..d4a752699 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/wraith/Card1_238.java @@ -0,0 +1,65 @@ +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.AddUntilEndOfPhaseModifierEffect; +import com.gempukku.lotro.cards.effects.RemoveTwilightEffect; +import com.gempukku.lotro.cards.modifiers.ArcheryTotalModifier; +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.timing.Action; + +import java.util.Collections; +import java.util.List; + +/** + * Set: The Fellowship of the Ring + * Side: Shadow + * Culture: Wraith + * Twilight Cost: 0 + * Type: Condition + * Game Text: To play, spot a Nazgul. Plays to your support area. Archery: Remove (1) to make the fellowship + * archery total -1. + */ +public class Card1_238 extends AbstractLotroCardBlueprint { + public Card1_238() { + super(Side.SHADOW, CardType.CONDITION, Culture.WRAITH, "Wreathed in Shadow"); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return PlayConditions.canPayForShadowCard(game, self, twilightModifier) + && Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.NAZGUL)); + } + + @Override + public Action getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return new PlayPermanentAction(self, Zone.SHADOW_SUPPORT, twilightModifier); + } + + @Override + public int getTwilightCost() { + return 0; + } + + @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)); + + if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.ARCHERY, self, 1)) { + DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, Keyword.ARCHERY, "Remove (1) to make the fellowship archery total -1."); + action.addCost(new RemoveTwilightEffect(1)); + action.addEffect( + new AddUntilEndOfPhaseModifierEffect( + new ArcheryTotalModifier(self, Side.FREE_PEOPLE, -1), Phase.ARCHERY)); + return Collections.singletonList(action); + } + return null; + } +}