"The Pale Blade"

This commit is contained in:
marcins78@gmail.com
2011-12-06 16:38:27 +00:00
parent a91ce885ca
commit 79c0ed5adb

View File

@@ -0,0 +1,58 @@
package com.gempukku.lotro.cards.set11.wraith;
import com.gempukku.lotro.cards.AbstractAttachable;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.AddBurdenEffect;
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
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.OptionalTriggerAction;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 2
* Type: Possession • Hand Weapon
* Strength: +3
* Game Text: Bearer must be a Nazgul. If bearer is The Witch-king, each time he wins a skirmish, you may exert him
* to add a burden.
*/
public class Card11_214 extends AbstractAttachable {
public Card11_214() {
super(Side.SHADOW, CardType.POSSESSION, 2, Culture.WRAITH, PossessionClass.HAND_WEAPON, "The Pale Blade", true);
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Race.NAZGUL;
}
@Override
public Modifier getAlwaysOnModifier(PhysicalCard self) {
return new StrengthModifier(self, Filters.hasAttached(self), 3);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, Filters.hasAttached(self), Filters.witchKing)
&& PlayConditions.canExert(self, game, Filters.hasAttached(self))) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new ExertCharactersEffect(self, self.getAttachedTo()));
action.appendEffect(
new AddBurdenEffect(self, 1));
return Collections.singletonList(action);
}
return null;
}
}