From b40c0ee0ad1c5464ae21104d2b5d531ff610603f Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 28 Oct 2011 10:23:11 +0000 Subject: [PATCH] "The Board Is Set" --- .../lotro/cards/set7/gandalf/Card7_032.java | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gandalf/Card7_032.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gandalf/Card7_032.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gandalf/Card7_032.java new file mode 100644 index 000000000..05f31817d --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gandalf/Card7_032.java @@ -0,0 +1,57 @@ +package com.gempukku.lotro.cards.set7.gandalf; + +import com.gempukku.lotro.cards.AbstractResponseEvent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayEventAction; +import com.gempukku.lotro.cards.effects.CancelEventEffect; +import com.gempukku.lotro.cards.effects.ChoiceEffect; +import com.gempukku.lotro.cards.effects.RemoveTwilightEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Side; +import com.gempukku.lotro.filters.Filters; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.timing.Effect; +import com.gempukku.lotro.logic.timing.EffectResult; +import com.gempukku.lotro.logic.timing.results.PlayEventResult; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +/** + * Set: The Return of the King + * Side: Free + * Culture: Gandalf + * Twilight Cost: 0 + * Type: Event • Response + * Game Text: Spell. If an event is played, exert Gandalf to make that opponent remove (2) or cancel that event. + */ +public class Card7_032 extends AbstractResponseEvent { + public Card7_032() { + super(Side.FREE_PEOPLE, 0, Culture.GANDALF, "The Board Is Set"); + } + + @Override + public List getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (PlayConditions.played(game, effectResult, CardType.EVENT) + && PlayConditions.canExert(self, game, Filters.name("Gandalf"))) { + PlayEventResult playEventResult = (PlayEventResult) effectResult; + + PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.name("Gandalf"))); + List possibleEffects = new LinkedList(); + possibleEffects.add( + new RemoveTwilightEffect(2)); + possibleEffects.add( + new CancelEventEffect(self, playEventResult)); + action.appendEffect( + new ChoiceEffect(action, playEventResult.getPlayedCard().getOwner(), possibleEffects)); + return Collections.singletonList(action); + } + return null; + } +}