"Valorous Leader"

This commit is contained in:
marcins78@gmail.com
2011-12-12 11:12:46 +00:00
parent 2c53d7aa2c
commit 6feed8241b

View File

@@ -0,0 +1,49 @@
package com.gempukku.lotro.cards.set12.gondor;
import com.gempukku.lotro.cards.AbstractAttachable;
import com.gempukku.lotro.cards.PlayConditions;
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.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: Black Rider
* Side: Free
* Culture: Gondor
* Twilight Cost: 2
* Type: Condition
* Game Text: Bearer must be a [GONDOR] companion. Limit 1 per bearer. Skirmish: Discard this condition to discard
* a possession borne by a minion skirmishing bearer.
*/
public class Card12_053 extends AbstractAttachable {
public Card12_053() {
super(Side.FREE_PEOPLE, CardType.CONDITION, 2, Culture.GONDOR, null, "Valorous Leader");
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.and(Culture.GONDOR, CardType.COMPANION, Filters.not(Filters.hasAttached(Filters.name(getName()))));
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canSelfDiscard(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfDiscardEffect(self));
action.appendEffect(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.POSSESSION, Filters.attachedTo(CardType.MINION, Filters.inSkirmishAgainst(self.getAttachedTo()))));
return Collections.singletonList(action);
}
return null;
}
}