From 88cb225379f4c081f0fec4b20e504a8f4037bdf4 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 29 Feb 2012 14:20:52 +0000 Subject: [PATCH] "Haldir" --- .../lotro/cards/set18/elven/Card18_014.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/elven/Card18_014.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/elven/Card18_014.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/elven/Card18_014.java new file mode 100644 index 000000000..2e02dcd3e --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/elven/Card18_014.java @@ -0,0 +1,63 @@ +package com.gempukku.lotro.cards.set18.elven; + +import com.gempukku.lotro.cards.AbstractCompanion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.ChoiceEffect; +import com.gempukku.lotro.cards.effects.SelfExertEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect; +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 com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect; +import com.gempukku.lotro.logic.timing.Effect; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +/** + * Set: Treachery & Deceit + * Side: Free + * Culture: Elven + * Twilight Cost: 2 + * Type: Companion • Elf + * Strength: 6 + * Vitality: 3 + * Resistance: 6 + * Game Text: Skirmish: Exert Haldir or discard an [ELVEN] card from hand to make a minion skirmishing Haldir + * strength -2. + */ +public class Card18_014 extends AbstractCompanion { + public Card18_014() { + super(2, 6, 3, 6, Culture.ELVEN, Race.ELF, null, "Haldir", true); + } + + @Override + protected List getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self) + && (PlayConditions.canSelfExert(self, game) || PlayConditions.canDiscardFromHand(game, playerId, 1, Culture.ELVEN))) { + ActivateCardAction action = new ActivateCardAction(self); + List possibleCosts = new LinkedList(); + possibleCosts.add( + new SelfExertEffect(self)); + possibleCosts.add( + new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1, Culture.ELVEN) { + @Override + public String getText(LotroGame game) { + return "Discard an ELVEN card from hand"; + } + }); + action.appendCost( + new ChoiceEffect(action, playerId, possibleCosts)); + action.appendEffect( + new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, -2, CardType.MINION, Filters.inSkirmishAgainst(self))); + return Collections.singletonList(action); + } + return null; + } +}