"Vilya", "Elven Ring of Power"

This commit is contained in:
marcins78@gmail.com
2013-01-07 19:44:44 +00:00
parent d8f772c03a
commit 2735f7c93a

View File

@@ -0,0 +1,50 @@
package com.gempukku.lotro.cards.set20.elven;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
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.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* 0
* •Vilya, Elven Ring of Power
* Elven Artifact • Ring
* 1
* Bearer must be Elrond:
* Maneuver: Exert Elrond twice to discard a condition borne by a companion.
*/
public class Card20_105 extends AbstractAttachableFPPossession {
public Card20_105() {
super(0, 0, 1, Culture.ELVEN, PossessionClass.RING, "Vilya", "Elven Ring of Power", true);
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.name("Elrond");
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self)
&& PlayConditions.canExert(self, game, 2, Filters.name("Elrond"))) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.name("Elrond")));
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.name("Elrond")));
action.appendEffect(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.CONDITION, Filters.attachedTo(CardType.COMPANION)));
return Collections.singletonList(action);
}
return null;
}
}