diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/PlayConditions.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/PlayConditions.java index e6adfcd57..28bc53e2b 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/PlayConditions.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/PlayConditions.java @@ -118,6 +118,10 @@ public class PlayConditions { return Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), filters) >= count; } + public static boolean canExertMultiple(PhysicalCard source, LotroGame game, int times, int count, Filterable... filters) { + return canExertMultiple(source, game.getGameState(), game.getModifiersQuerying(), times, count, filters); + } + public static boolean canExertMultiple(final PhysicalCard source, final GameState gameState, final ModifiersQuerying modifiersQuerying, final int times, final int count, Filterable... filters) { final Filter filter = Filters.and(filters); return gameState.iterateActiveCards( diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/elven/Card5_011.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/elven/Card5_011.java new file mode 100644 index 000000000..8ddce6b64 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/elven/Card5_011.java @@ -0,0 +1,42 @@ +package com.gempukku.lotro.cards.set5.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.effects.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.cards.modifiers.ArcheryTotalModifier; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; + +/** + * Set: Battle of Helm's Deep + * Side: Free + * Culture: Elven + * Twilight Cost: 2 + * Type: Event + * Game Text: Archery: Exert 3 Elf companions to make the fellowship archery total +2. + */ +public class Card5_011 extends AbstractEvent { + public Card5_011() { + super(Side.FREE_PEOPLE, 2, Culture.ELVEN, "Break the Charge", Phase.ARCHERY); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canExertMultiple(self, game, 1, 3, Race.ELF, CardType.COMPANION); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 3, 3, Race.ELF, CardType.COMPANION)); + action.appendEffect( + new AddUntilEndOfPhaseModifierEffect( + new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 2), Phase.ARCHERY)); + return action; + } +}