"Spectral Sword"

This commit is contained in:
marcins78@gmail.com
2011-11-14 11:30:46 +00:00
parent 7da9ae4f29
commit a0f99733c6

View File

@@ -0,0 +1,49 @@
package com.gempukku.lotro.cards.set8.gondor;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromHandEffect;
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.effects.HealCharactersEffect;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Free
* Culture: Gondor
* Twilight Cost: 0
* Type: Possession • Hand Weapon
* Strength: +1
* Game Text: Bearer must be a [GONDOR] Wraith. Skirmish: Discard 3 cards from hand to heal bearer.
*/
public class Card8_046 extends AbstractAttachableFPPossession {
public Card8_046() {
super(0, 1, 0, Culture.GONDOR, PossessionClass.HAND_WEAPON, "Spectral Sword");
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.and(Culture.GONDOR, Race.WRAITH);
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canDiscardFromHand(game, playerId, 3, Filters.any)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 3));
action.appendEffect(
new HealCharactersEffect(self, self.getAttachedTo()));
return Collections.singletonList(action);
}
return null;
}
}