"Namarie"

This commit is contained in:
marcins78@gmail.com
2012-02-09 22:29:55 +00:00
parent fee0f8ac62
commit db51cef2b7

View File

@@ -0,0 +1,68 @@
package com.gempukku.lotro.cards.set17.elven;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.AddTokenEffect;
import com.gempukku.lotro.cards.effects.ChoiceEffect;
import com.gempukku.lotro.cards.effects.RemoveTokenEffect;
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
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.actions.ActivateCardAction;
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
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: Rise of Saruman
* Side: Free
* Culture: Elven
* Twilight Cost: 2
* Type: Condition • Support Area
* Game Text: When you play this condition, add an [ELVEN] token here for each hunter you can spot.
* Maneuver: Discard this or remove a token from here and spot an [ELVEN] hunter to discard a condition.
*/
public class Card17_010 extends AbstractPermanent {
public Card17_010() {
super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.ELVEN, Zone.SUPPORT, "Namarie");
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new AddTokenEffect(self, self, Token.ELVEN, Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), Keyword.HUNTER)));
return Collections.singletonList(action);
}
return null;
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self)
&& PlayConditions.canSpot(game, Culture.ELVEN, Keyword.HUNTER)) {
ActivateCardAction action = new ActivateCardAction(self);
List<Effect> possibleCosts = new LinkedList<Effect>();
possibleCosts.add(
new SelfDiscardEffect(self));
possibleCosts.add(
new RemoveTokenEffect(self, self, Token.ELVEN));
action.appendCost(
new ChoiceEffect(action, playerId, possibleCosts));
action.appendEffect(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.CONDITION));
return Collections.singletonList(action);
}
return null;
}
}