From a1333573b90fd612da1c6c6840fcdbc8cc31a674 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Sat, 10 Sep 2011 22:06:32 +0000 Subject: [PATCH] "Seeking It Always" --- .../lotro/cards/set1/sauron/Card1_275.java | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/sauron/Card1_275.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/sauron/Card1_275.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/sauron/Card1_275.java new file mode 100644 index 000000000..da652da75 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/sauron/Card1_275.java @@ -0,0 +1,72 @@ +package com.gempukku.lotro.cards.set1.sauron; + +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.CancelEffect; +import com.gempukku.lotro.cards.effects.ChooseAndExertCharacterEffect; +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 com.gempukku.lotro.logic.timing.Effect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: The Fellowship of the Ring + * Side: Shadow + * Culture: Sauron + * Twilight Cost: 1 + * Type: Condition + * Game Text: Search. Plays to your support area. Response: If a stealth event is played, exert a [SAURON] tracker + * to cancel that event. + */ +public class Card1_275 extends AbstractLotroCardBlueprint { + public Card1_275() { + super(Side.SHADOW, CardType.CONDITION, Culture.SAURON, "Seeking It Always"); + 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 getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, EffectResult effectResult, PhysicalCard self) { + if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), null, self, 0) + && Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.SAURON), Filters.keyword(Keyword.TRACKER), Filters.canExert()) + && PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.type(CardType.EVENT), Filters.keyword(Keyword.STEALTH)))) { + DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, null, "Exert a SAURON tracker to cancel that event."); + action.addCost( + new ChooseAndExertCharacterEffect(action, playerId, "Choose a SAURON tracker", true, Filters.culture(Culture.SAURON), Filters.keyword(Keyword.TRACKER), Filters.canExert())); + action.addEffect( + new CancelEffect(effect)); + return Collections.singletonList(action); + } + return null; + } +}