From 49f31f88ae027ad214d9acdad3daedc7bdcd83bf Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Tue, 17 Jan 2012 12:55:14 +0000 Subject: [PATCH] "Mighty Shot" --- .../lotro/cards/set15/elven/Card15_021.java | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/elven/Card15_021.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/elven/Card15_021.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/elven/Card15_021.java new file mode 100644 index 000000000..0b3823ed4 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/elven/Card15_021.java @@ -0,0 +1,51 @@ +package com.gempukku.lotro.cards.set15.elven; + +import com.gempukku.lotro.cards.AbstractEvent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayEventAction; +import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect; +import com.gempukku.lotro.cards.modifiers.ArcheryTotalModifier; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.filters.Filter; +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.modifiers.ModifiersQuerying; + +/** + * Set: The Hunters + * Side: Free + * Culture: Elven + * Twilight Cost: 2 + * Type: Event • Archery + * Game Text: Spot an Elf to make the fellowship archery total +1 for each minion with twilight cost 2 or less that + * you can spot. + */ +public class Card15_021 extends AbstractEvent { + public Card15_021() { + super(Side.FREE_PEOPLE, 2, Culture.ELVEN, "Mighty Shot", Phase.ARCHERY); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) { + return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile) + && PlayConditions.canSpot(game, Race.ELF); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + PlayEventAction action = new PlayEventAction(self); + int count = Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), CardType.MINION, + new Filter() { + @Override + public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) { + return physicalCard.getBlueprint().getTwilightCost() <= 2; + } + }); + action.appendEffect( + new AddUntilEndOfPhaseModifierEffect( + new ArcheryTotalModifier(self, Side.FREE_PEOPLE, count), Phase.ARCHERY)); + return action; + } +}