From 531e61935530b7002edd9c3c03b4e57db3d18103 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Thu, 8 Dec 2011 17:27:37 +0000 Subject: [PATCH] "Elrond" --- .../lotro/cards/set12/elven/Card12_017.java | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set12/elven/Card12_017.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set12/elven/Card12_017.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set12/elven/Card12_017.java new file mode 100644 index 000000000..566287347 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set12/elven/Card12_017.java @@ -0,0 +1,56 @@ +package com.gempukku.lotro.cards.set12.elven; + +import com.gempukku.lotro.cards.AbstractCompanion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.SelfExertEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPutCardFromDiscardOnTopOfDeckEffect; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Phase; +import com.gempukku.lotro.common.Race; +import com.gempukku.lotro.filters.Filters; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.actions.ActivateCardAction; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Black Rider + * Side: Free + * Culture: Elven + * Twilight Cost: 4 + * Type: Companion • Elf + * Strength: 8 + * Vitality: 4 + * Resistance: 7 + * Game Text: To play, spot an Elf. Skirmish: If Elrond is skirmishing a minion, exert him to place an [ELVEN] card from + * your discard pile on top of your draw deck. + */ +public class Card12_017 extends AbstractCompanion { + public Card12_017() { + super(4, 8, 4, 7, Culture.ELVEN, Race.ELF, null, "Elrond", true); + } + + @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 + protected List getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self) + && Filters.inSkirmishAgainst(CardType.MINION).accepts(game.getGameState(), game.getModifiersQuerying(), self) + && PlayConditions.canSelfExert(self, game)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new SelfExertEffect(self)); + action.appendEffect( + new ChooseAndPutCardFromDiscardOnTopOfDeckEffect(action, playerId, 1, 1, Culture.ELVEN)); + return Collections.singletonList(action); + } + return null; + } +}