diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/gondor/Card5_040.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/gondor/Card5_040.java new file mode 100644 index 000000000..602d6dc85 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/gondor/Card5_040.java @@ -0,0 +1,44 @@ +package com.gempukku.lotro.cards.set5.gondor; + +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.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffect; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Keyword; +import com.gempukku.lotro.common.Phase; +import com.gempukku.lotro.common.Side; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; + +/** + * Set: Battle of Helm's Deep + * Side: Free + * Culture: Gondor + * Twilight Cost: 0 + * Type: Event + * Game Text: Fellowship: Exert a knight to play a [GONDOR] fortification from your discard pile. + */ +public class Card5_040 extends AbstractEvent { + public Card5_040() { + super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "Take Cover", Phase.FELLOWSHIP); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canExert(self, game, Keyword.KNIGHT) + && PlayConditions.canPlayFromDiscard(playerId, game, Culture.GONDOR, Keyword.FORTIFICATION); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Keyword.KNIGHT)); + action.appendEffect( + new ChooseAndPlayCardFromDiscardEffect(playerId, game.getGameState().getDiscard(playerId), Culture.GONDOR, Keyword.FORTIFICATION)); + return action; + } +}