diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/dwarven/Card5_006.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/dwarven/Card5_006.java new file mode 100644 index 000000000..dc3a2e7ed --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/dwarven/Card5_006.java @@ -0,0 +1,50 @@ +package com.gempukku.lotro.cards.set5.dwarven; + +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.ChoiceEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffect; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.effects.DrawCardEffect; +import com.gempukku.lotro.logic.timing.Effect; + +import java.util.LinkedList; +import java.util.List; + +/** + * Set: Battle of Helm's Deep + * Side: Free + * Culture: Dwarven + * Twilight Cost: 0 + * Type: Event + * Game Text: Fellowship: Spot a Dwarf to Draw a card or play a [DWARVEN] condition from your discard pile. + */ +public class Card5_006 extends AbstractEvent { + public Card5_006() { + super(Side.FREE_PEOPLE, 0, Culture.DWARVEN, "Defending the Keep", Phase.FELLOWSHIP); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canSpot(game, Race.DWARF); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + PlayEventAction action = new PlayEventAction(self); + + List possibleEffects = new LinkedList(); + possibleEffects.add( + new DrawCardEffect(playerId, 1)); + possibleEffects.add( + new ChooseAndPlayCardFromDiscardEffect(playerId, game.getGameState().getDiscard(playerId), Culture.DWARVEN, CardType.CONDITION)); + + action.appendEffect( + new ChoiceEffect(action, playerId, possibleEffects)); + return action; + } +}