From 19274504bcbf046e1433ef7ef1ad4dd1c154e8fd Mon Sep 17 00:00:00 2001 From: marcins78 Date: Mon, 7 Jan 2013 14:14:40 +0000 Subject: [PATCH] "Coordinated Strike --- .../lotro/cards/set20/elven/Card20_078.java | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/elven/Card20_078.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/elven/Card20_078.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/elven/Card20_078.java new file mode 100644 index 000000000..76d97263f --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/elven/Card20_078.java @@ -0,0 +1,55 @@ +package com.gempukku.lotro.cards.set20.elven; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect; +import com.gempukku.lotro.cards.effects.SelfDiscardEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +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.GameState; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.actions.ActivateCardAction; +import com.gempukku.lotro.logic.modifiers.ModifiersQuerying; +import com.gempukku.lotro.logic.timing.Action; + +import java.util.Collections; +import java.util.List; + +/** + * 3 + * Coordinated Strike + * Elven Condition • Support Area + * The twilight cost of this condition is -1 for each unwounded [Elven] archer you can spot. + * Archery: Exert two [Elven] archers and discard this condition to make the fellowship archery total +2. + */ +public class Card20_078 extends AbstractPermanent { + public Card20_078() { + super(Side.FREE_PEOPLE, 3, CardType.CONDITION, Culture.ELVEN, Zone.SUPPORT, "Coordinated Strike"); + } + + @Override + public int getTwilightCostModifier(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard self) { + return -Filters.countActive(gameState, modifiersQuerying, Culture.ELVEN, Keyword.ARCHER, Filters.unwounded); + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.ARCHERY, self) + && PlayConditions.canExert(self,game, 1, 2, Culture.ELVEN, Keyword.ARCHER) + && PlayConditions.canSelfDiscard(self, game)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 2, 2, 1, Culture.ELVEN, Keyword.ARCHER)); + action.appendCost( + new SelfDiscardEffect(self)); + action.appendEffect( + new AddUntilEndOfPhaseModifierEffect( + new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 2), Phase.ARCHERY)); + return Collections.singletonList(action); + } + return null; + } +}