diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gollum/Card7_068.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gollum/Card7_068.java new file mode 100644 index 000000000..f5f5acfb8 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gollum/Card7_068.java @@ -0,0 +1,104 @@ +package com.gempukku.lotro.cards.set7.gollum; + +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.PreventableEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.filters.Filters; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.GameUtils; +import com.gempukku.lotro.logic.actions.ActivateCardAction; +import com.gempukku.lotro.logic.actions.RequiredTriggerAction; +import com.gempukku.lotro.logic.actions.SubAction; +import com.gempukku.lotro.logic.effects.AddThreatsEffect; +import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.Effect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +/** + * Set: The Return of the King + * Side: Free + * Culture: Gollum + * Twilight Cost: 2 + * Type: Condition • Support Area + * Game Text: To play, spot Smeagol. Each time the fellowship moves, add a threat or discard this condition. + * Maneuver: Discard Smeagol to discard a minion. An opponent may exert a minion twice to prevent this. + */ +public class Card7_068 extends AbstractPermanent { + public Card7_068() { + super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.GOLLUM, Zone.SUPPORT, "Scouting"); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canSpot(game, Filters.smeagol); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (effectResult.getType() == EffectResult.Type.WHEN_FELLOWSHIP_MOVES) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + List possibleEffects = new LinkedList(); + possibleEffects.add( + new AddThreatsEffect(self.getOwner(), self, 1) { + @Override + public String getText(LotroGame game) { + return "Add a threat"; + } + }); + possibleEffects.add( + new DiscardCardsFromPlayEffect(self, self) { + @Override + public String getText(LotroGame game) { + return "Discard this condition"; + } + }); + action.appendEffect( + new ChoiceEffect(action, self.getOwner(), possibleEffects)); + return Collections.singletonList(action); + } + return null; + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.MANEUVER, self) + && PlayConditions.canDiscardFromPlay(self, game, Filters.smeagol)) { + final ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Filters.smeagol)); + action.appendEffect( + new PreventableEffect(action, + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.MINION) { + @Override + public String getText(LotroGame game) { + return "Discard a minion"; + } + }, GameUtils.getOpponents(game, playerId), + new PreventableEffect.PreventionCost() { + @Override + public Effect createPreventionCostForPlayer(SubAction subAction, String playerId) { + return new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, CardType.MINION) { + @Override + public String getText(LotroGame game) { + return "Exert a minion twice"; + } + }; + } + } + )); + return Collections.singletonList(action); + } + return null; + } +}