"Saruman", "The White Wizard"

This commit is contained in:
marcins78
2013-01-30 13:58:58 +00:00
parent 3ba2bb1576
commit 693ff48757

View File

@@ -0,0 +1,65 @@
package com.gempukku.lotro.cards.set20.isengard;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.PreventableEffect;
import com.gempukku.lotro.cards.effects.SelfExertEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardStackedCardsEffect;
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.SubAction;
import com.gempukku.lotro.logic.effects.AddThreatsEffect;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.Effect;
import java.util.Collections;
import java.util.List;
/**
* 4
* •Saruman, The White Wizard
* Isengard Minion • Wizard
* 8 4 4
* Cunning.
* Skirmish: Exert Saruman and discard a spell stacked on an artifact to wound a companion skirmishing Saruman.
* The Free Peoples Player may add a threat to prevent this.
*/
public class Card20_236 extends AbstractMinion {
public Card20_236() {
super(4, 8, 4, 4, Race.WIZARD, Culture.ISENGARD, "Saruman", "The White Wizard", true);
addKeyword(Keyword.CUNNING);
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SKIRMISH, self, 0)
&& PlayConditions.canSelfExert(self, game)
&& PlayConditions.isActive(game, CardType.ARTIFACT, Filters.hasStacked(Keyword.SPELL))) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfExertEffect(action, self));
action.appendCost(
new ChooseAndDiscardStackedCardsEffect(action, playerId, 1, 1, CardType.ARTIFACT, Keyword.SPELL));
action.appendEffect(
new PreventableEffect(action,
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.COMPANION, Filters.inSkirmishAgainst(self)) {
@Override
public String getText(LotroGame game) {
return "Wound companion skirmishing Saruman";
}
}, game.getGameState().getCurrentPlayerId(),
new PreventableEffect.PreventionCost() {
@Override
public Effect createPreventionCostForPlayer(SubAction subAction, String playerId) {
return new AddThreatsEffect(playerId, self, 1);
}
}));
return Collections.singletonList(action);
}
return null;
}
}