From 9750ffb6b8a38f8752a495b2ec94cf507c9b3108 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Thu, 20 Oct 2011 15:43:53 +0000 Subject: [PATCH] "Naith Troop" --- .../lotro/cards/set6/elven/Card6_022.java | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/elven/Card6_022.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/elven/Card6_022.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/elven/Card6_022.java new file mode 100644 index 000000000..2bbc101e3 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/elven/Card6_022.java @@ -0,0 +1,64 @@ +package com.gempukku.lotro.cards.set6.elven; + +import com.gempukku.lotro.cards.AbstractCompanion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.DiscardTopCardFromDeckEffect; +import com.gempukku.lotro.cards.effects.ExertCharactersEffect; +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.timing.Action; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Ents of Fangorn + * Side: Free + * Culture: Elven + * Twilight Cost: 3 + * Type: Companion • Elf + * Strength: 8 + * Vitality: 3 + * Resistance: 6 + * Game Text: To play, spot 3 Elf companions. Skirmish: Exert Naith Troop to discard the top card of your draw deck. + * If it is an [ELVEN] card, make a minion skirmishing Naith Troop strength -2. + */ +public class Card6_022 extends AbstractCompanion { + public Card6_022() { + super(3, 8, 3, Culture.ELVEN, Race.ELF, null, "Naith Troop", true); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canSpot(game, 3, Race.ELF, CardType.COMPANION); + } + + @Override + protected List getExtraInPlayPhaseActions(final String playerId, LotroGame game, final PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self) + && PlayConditions.canSelfExert(self, game)) { + final ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new ExertCharactersEffect(self, self)); + action.appendEffect( + new DiscardTopCardFromDeckEffect(self, playerId, false) { + @Override + protected void cardDiscardedCallback(PhysicalCard card) { + if (card.getBlueprint().getCulture() == Culture.ELVEN) + action.appendEffect( + new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, -2, CardType.MINION, Filters.inSkirmishAgainst(self))); + } + }); + return Collections.singletonList(action); + } + return null; + } +}