From 486ff735f76d051ae1ac4f19f2c568c90ab8e56a Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Sun, 6 Nov 2011 17:55:38 +0000 Subject: [PATCH] "Too Late" --- .../lotro/cards/set7/wraith/Card7_209.java | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/wraith/Card7_209.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/wraith/Card7_209.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/wraith/Card7_209.java new file mode 100644 index 000000000..53cc217a5 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/wraith/Card7_209.java @@ -0,0 +1,61 @@ +package com.gempukku.lotro.cards.set7.wraith; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.TransferPermanentEffect; +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.actions.RequiredTriggerAction; +import com.gempukku.lotro.logic.effects.AddTwilightEffect; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; +import com.gempukku.lotro.logic.timing.results.ExertResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: The Return of the King + * Side: Shadow + * Culture: Wraith + * Twilight Cost: 1 + * Type: Condition • Support Area + * Game Text: Skirmish: Transfer this condition from your support area to a character skirmishing a Nazgul. Each time + * bearer exerts, add (1). + */ +public class Card7_209 extends AbstractPermanent { + public Card7_209() { + super(Side.SHADOW, 1, CardType.CONDITION, Culture.WRAITH, Zone.SUPPORT, "Too Late"); + } + + @Override + public List getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) { + if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self, 0) + && self.getZone() == Zone.SUPPORT + && Filters.filter(game.getGameState().getSkirmish().getShadowCharacters(), game.getGameState(), game.getModifiersQuerying(), Filters.race(Race.NAZGUL)).size() > 0 + && game.getGameState().getSkirmish().getFellowshipCharacter() != null) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendEffect( + new TransferPermanentEffect(self, game.getGameState().getSkirmish().getFellowshipCharacter())); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (effectResult.getType() == EffectResult.Type.EXERT) { + ExertResult exertResult = (ExertResult) effectResult; + if (exertResult.getExertedCards().contains(self.getAttachedTo())) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new AddTwilightEffect(self, 1)); + return Collections.singletonList(action); + } + } + return null; + } +}