From 37f4c7214648c1e46b6bbffcffbf7221e5c60684 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 25 Jan 2012 17:45:41 +0000 Subject: [PATCH] "Desperate Move" --- .../lotro/cards/set15/gollum/Card15_042.java | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/gollum/Card15_042.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/gollum/Card15_042.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/gollum/Card15_042.java new file mode 100644 index 000000000..795e6d20c --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/gollum/Card15_042.java @@ -0,0 +1,61 @@ +package com.gempukku.lotro.cards.set15.gollum; + +import com.gempukku.lotro.cards.AbstractEvent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayEventAction; +import com.gempukku.lotro.cards.effects.AddUntilEndOfTurnModifierEffect; +import com.gempukku.lotro.cards.effects.PreventableEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect; +import com.gempukku.lotro.cards.modifiers.MoveLimitModifier; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Phase; +import com.gempukku.lotro.common.Side; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.actions.SubAction; +import com.gempukku.lotro.logic.timing.Effect; + +/** + * Set: The Hunters + * Side: Shadow + * Culture: Gollum + * Twilight Cost: 3 + * Type: Event • Regroup + * Game Text: Discard a [GOLLUM] minion from play to discard a companion. The Free Peoples player may make the move + * limit -1 this turn to prevent that. + */ +public class Card15_042 extends AbstractEvent { + public Card15_042() { + super(Side.SHADOW, 3, Culture.GOLLUM, "Desperate Move", Phase.REGROUP); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) { + return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile) + && PlayConditions.canDiscardFromPlay(self, game, Culture.GOLLUM, CardType.MINION); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Culture.GOLLUM, CardType.MINION)); + action.appendEffect( + new PreventableEffect(action, + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.COMPANION), game.getGameState().getCurrentPlayerId(), + new PreventableEffect.PreventionCost() { + @Override + public Effect createPreventionCostForPlayer(SubAction subAction, String playerId) { + return new AddUntilEndOfTurnModifierEffect( + new MoveLimitModifier(self, -1)) { + @Override + public String getText(LotroGame game) { + return "Make the move limit -1"; + } + }; + } + })); + return action; + } +}