"Celebring"

This commit is contained in:
marcins78@gmail.com
2012-02-29 13:42:08 +00:00
parent 672af4d8aa
commit 7e797608ed

View File

@@ -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<OptionalTriggerAction> 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;
}
}