diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/gollum/Card9_030.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/gollum/Card9_030.java new file mode 100644 index 000000000..da3cef083 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/gollum/Card9_030.java @@ -0,0 +1,86 @@ +package com.gempukku.lotro.cards.set9.gollum; + +import com.gempukku.lotro.cards.AbstractCompanion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayPermanentAction; +import com.gempukku.lotro.cards.effects.AddBurdenEffect; +import com.gempukku.lotro.cards.effects.PutCharacterFromPlayInDeadPileEffect; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Keyword; +import com.gempukku.lotro.common.Phase; +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.actions.RequiredTriggerAction; +import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Reflections + * Side: Free + * Culture: Gollum + * Twilight Cost: 0 + * Type: Companion + * Strength: 3 + * Vitality: 4 + * Resistance: 7 + * Game Text: Ring-bound. To play, add a burden. Each time the fellowship moves, place an unbound companion in the dead + * pile. Regroup: If Smeagol is the Ring-bearer, add 2 burdens to discard each minion. + */ +public class Card9_030 extends AbstractCompanion { + public Card9_030() { + super(0, 3, 4, Culture.GOLLUM, null, null, "Smeagol", true); + addKeyword(Keyword.CAN_START_WITH_RING); + addKeyword(Keyword.RING_BOUND); + } + + @Override + public int getResistance() { + return 7; + } + + @Override + public PlayPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + PlayPermanentAction permanentAction = super.getPlayCardAction(playerId, game, self, twilightModifier, ignoreRoamingPenalty); + permanentAction.appendCost( + new AddBurdenEffect(self, 1)); + return permanentAction; + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (effectResult.getType() == EffectResult.Type.WHEN_FELLOWSHIP_MOVES) { + final RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new ChooseActiveCardEffect(self, self.getOwner(), "Choose unbound companion", Filters.unboundCompanion) { + @Override + protected void cardSelected(LotroGame game, PhysicalCard card) { + action.appendEffect( + new PutCharacterFromPlayInDeadPileEffect(card)); + } + }); + return Collections.singletonList(action); + } + return null; + } + + @Override + protected List getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self) + && game.getModifiersQuerying().hasKeyword(game.getGameState(), self, Keyword.RING_BEARER)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new AddBurdenEffect(self, 2)); + action.appendEffect( + new DiscardCardsFromPlayEffect(self, CardType.MINION)); + return Collections.singletonList(action); + } + return null; + } +}