diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/gondor/Card15_067.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/gondor/Card15_067.java new file mode 100644 index 000000000..b2a11ec22 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/gondor/Card15_067.java @@ -0,0 +1,96 @@ +package com.gempukku.lotro.cards.set15.gondor; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.ChoiceEffect; +import com.gempukku.lotro.cards.effects.SpotEffect; +import com.gempukku.lotro.cards.effects.TransferPermanentEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.cards.modifiers.MinionSiteNumberModifier; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.filters.Filters; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.GameState; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.actions.ActivateCardAction; +import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.modifiers.Modifier; +import com.gempukku.lotro.logic.modifiers.ModifiersQuerying; +import com.gempukku.lotro.logic.modifiers.StrengthModifier; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.Effect; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +/** + * Set: The Hunters + * Side: Free + * Culture: Gondor + * Twilight Cost: 3 + * Type: Condition • Support Area + * Strength: -2 + * Site: +2 + * Game Text: Fortification. This condition is twilight cost -1 for each [GONDOR] ranger you spot. Skirmish: Exert + * a [GONDOR] Man or spot 2 rangers to transfer this condition from your support area to a minion skirmishing + * a [GONDOR] Man. + */ +public class Card15_067 extends AbstractPermanent { + public Card15_067() { + super(Side.FREE_PEOPLE, 3, CardType.CONDITION, Culture.GONDOR, Zone.SUPPORT, "Portico"); + addKeyword(Keyword.FORTIFICATION); + } + + @Override + public List getAlwaysOnModifiers(LotroGame game, PhysicalCard self) { + List modifiers = new LinkedList(); + modifiers.add( + new StrengthModifier(self, Filters.hasAttached(self), -2)); + modifiers.add( + new MinionSiteNumberModifier(self, Filters.hasAttached(self), null, 2)); + return modifiers; + } + + @Override + public int getTwilightCostModifier(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard self) { + return -Filters.countSpottable(gameState, modifiersQuerying, Culture.GONDOR, Keyword.RANGER); + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self) + && (PlayConditions.canExert(self, game, Culture.GONDOR, Race.MAN) + || PlayConditions.canSpot(game, 2, Keyword.RANGER)) + && self.getZone() == Zone.SUPPORT) { + final ActivateCardAction action = new ActivateCardAction(self); + List possibleCosts = new LinkedList(); + possibleCosts.add( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.GONDOR, Race.MAN) { + @Override + public String getText(LotroGame game) { + return "Exert a GONDOR Man"; + } + }); + possibleCosts.add( + new SpotEffect(2, Keyword.RANGER) { + @Override + public String getText(LotroGame game) { + return "Spot 2 rangers"; + } + }); + action.appendCost( + new ChoiceEffect(action, playerId, possibleCosts)); + action.appendEffect( + new ChooseActiveCardEffect(self, playerId, "Choose a minion", CardType.MINION, Filters.inSkirmishAgainst(Culture.GONDOR, Race.MAN)) { + @Override + protected void cardSelected(LotroGame game, PhysicalCard card) { + action.appendEffect( + new TransferPermanentEffect(self, card)); + } + }); + return Collections.singletonList(action); + } + return null; + } +}