From 693ff487574d742691d4b68158dceda33237c038 Mon Sep 17 00:00:00 2001 From: marcins78 Date: Wed, 30 Jan 2013 13:58:58 +0000 Subject: [PATCH] "Saruman", "The White Wizard" --- .../cards/set20/isengard/Card20_236.java | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_236.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_236.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_236.java new file mode 100644 index 000000000..88561a51f --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_236.java @@ -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 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; + } +}