From 7e797608ed1d747947ae556b240d00d296f6ec14 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 29 Feb 2012 13:42:08 +0000 Subject: [PATCH] "Celebring" --- .../lotro/cards/set18/elven/Card18_007.java | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/elven/Card18_007.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/elven/Card18_007.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/elven/Card18_007.java new file mode 100644 index 000000000..269c7b4b0 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/elven/Card18_007.java @@ -0,0 +1,61 @@ +package com.gempukku.lotro.cards.set18.elven; + +import com.gempukku.lotro.cards.AbstractFollower; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDeckEffect; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Side; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.actions.OptionalTriggerAction; +import com.gempukku.lotro.logic.effects.AddTwilightEffect; +import com.gempukku.lotro.logic.timing.Effect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Treachery & Deceit + * Side: Free + * Culture: Elven + * Twilight Cost: 3 + * Type: Follower + * Strength: +2 + * Game Text: Aid - (2). (At the start of the maneuver phase, you may add (2) to transfer this to a companion.) To play, + * spot 2 [ELVEN] companions. When you play Celebring, you may play an [ELVEN] artifact from your deck. + */ +public class Card18_007 extends AbstractFollower { + public Card18_007() { + super(Side.FREE_PEOPLE, 3, 2, 0, 0, Culture.ELVEN, "Celebring", true); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) { + return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile) + && PlayConditions.canSpot(game, 2, Culture.ELVEN, CardType.COMPANION); + } + + @Override + protected boolean canPayAidCost(LotroGame game, PhysicalCard self) { + return true; + } + + @Override + protected Effect getAidCost(LotroGame game, PhysicalCard self) { + return new AddTwilightEffect(self, 2); + } + + @Override + protected List getExtraOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.played(game, effectResult, self)) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendEffect( + new ChooseAndPlayCardFromDeckEffect(playerId, Culture.ELVEN, CardType.ARTIFACT)); + return Collections.singletonList(action); + } + return null; + } +}