From 91c084dc0d7bc9cc4455a00f086e7464ccf78afc Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 7 Oct 2011 14:30:49 +0000 Subject: [PATCH] "Long I Fell" --- .../lotro/cards/set4/gandalf/Card4_097.java | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/gandalf/Card4_097.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/gandalf/Card4_097.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/gandalf/Card4_097.java new file mode 100644 index 000000000..479637337 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/gandalf/Card4_097.java @@ -0,0 +1,65 @@ +package com.gempukku.lotro.cards.set4.gandalf; + +import com.gempukku.lotro.cards.AbstractEvent; +import com.gempukku.lotro.cards.actions.PlayEventAction; +import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect; +import com.gempukku.lotro.cards.effects.PreventableEffect; +import com.gempukku.lotro.cards.modifiers.CantTakeWoundsModifier; +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.GameUtils; +import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect; + +import java.util.Arrays; + +/** + * Set: The Two Towers + * Side: Free + * Culture: Gandalf + * Twilight Cost: 2 + * Type: Event + * Game Text: Spell. + * Skirmish: Spot Gandalf to prevent all wounds to him. Any Shadow player may make you wound a minion to prevent this. + */ +public class Card4_097 extends AbstractEvent { + public Card4_097() { + super(Side.FREE_PEOPLE, Culture.GANDALF, "Long I Fell", Phase.SKIRMISH); + addKeyword(Keyword.SPELL); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name("Gandalf")); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + PlayEventAction action = new PlayEventAction(self); + action.appendEffect( + new PreventableEffect(action, + new AddUntilEndOfPhaseModifierEffect( + new CantTakeWoundsModifier(self, Filters.name("Gandalf")), Phase.SKIRMISH) { + @Override + public String getText(LotroGame game) { + return "Prevent all wounds to Gandalf"; + } + }, + Arrays.asList(GameUtils.getOpponents(game, playerId)), + new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Filters.type(CardType.MINION)) { + @Override + public String getText(LotroGame game) { + return "Make fellowship player wound a minion"; + } + } + )); + return action; + } + + @Override + public int getTwilightCost() { + return 2; + } +}