From cb7107c24c27e26ba4649c8041d6140cfc454a16 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 2 Nov 2011 11:15:35 +0000 Subject: [PATCH] "Serving the Precious" --- .../lotro/cards/set7/gollum/Card7_070.java | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gollum/Card7_070.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gollum/Card7_070.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gollum/Card7_070.java new file mode 100644 index 000000000..7551cc8cf --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gollum/Card7_070.java @@ -0,0 +1,45 @@ +package com.gempukku.lotro.cards.set7.gollum; + +import com.gempukku.lotro.cards.AbstractEvent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayEventAction; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffect; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Phase; +import com.gempukku.lotro.common.Side; +import com.gempukku.lotro.filters.Filters; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; + +/** + * Set: The Return of the King + * Side: Free + * Culture: Gollum + * Twilight Cost: 3 + * Type: Event • Fellowship + * Game Text: Discard Smeagol to play a companion from your discard pile. + */ +public class Card7_070 extends AbstractEvent { + public Card7_070() { + super(Side.FREE_PEOPLE, 3, Culture.GOLLUM, "Serving the Precious", Phase.FELLOWSHIP); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canDiscardFromPlay(self, game, Filters.smeagol) + && PlayConditions.canPlayFromDiscard(playerId, game, CardType.COMPANION); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Filters.smeagol)); + action.appendEffect( + new ChooseAndPlayCardFromDiscardEffect(playerId, game.getGameState().getDiscard(playerId), CardType.COMPANION)); + return action; + } +}