From 092640abcfbc0b9c9daf2ab48639dbd69521b7af Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 9 Dec 2011 11:59:14 +0000 Subject: [PATCH] "Introspection" --- .../lotro/cards/set12/gandalf/Card12_029.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set12/gandalf/Card12_029.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set12/gandalf/Card12_029.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set12/gandalf/Card12_029.java new file mode 100644 index 000000000..881d75664 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set12/gandalf/Card12_029.java @@ -0,0 +1,63 @@ +package com.gempukku.lotro.cards.set12.gandalf; + +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.ChoiceEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseOpponentEffect; +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.timing.Effect; + +import java.util.LinkedList; +import java.util.List; + +/** + * Set: Black Rider + * Side: Free + * Culture: Gandalf + * Twilight Cost: 2 + * Type: Event • Fellowship + * Game Text: Spell. Choose one: Spot a [GANDALF] Wizard to choose an opponent who must discard one of his or her + * conditions from play; or spot a [GANDALF] Wizard at a battleground site to discard a condition from play. + */ +public class Card12_029 extends AbstractEvent { + public Card12_029() { + super(Side.FREE_PEOPLE, 2, Culture.GANDALF, "Introspection", Phase.FELLOWSHIP); + addKeyword(Keyword.SPELL); + } + + @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.canSpot(game, Culture.GANDALF, Race.WIZARD); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + final PlayEventAction action = new PlayEventAction(self); + List possibleEffects = new LinkedList(); + possibleEffects.add( + new ChooseOpponentEffect(playerId) { + @Override + public String getText(LotroGame game) { + return "Make opponent discard condition"; + } + + @Override + protected void opponentChosen(String opponentId) { + action.appendEffect( + new ChooseAndDiscardCardsFromPlayEffect(action, opponentId, 1, 1, Filters.owner(opponentId), CardType.CONDITION)); + } + }); + if (PlayConditions.location(game, Keyword.BATTLEGROUND)) + possibleEffects.add( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.CONDITION)); + action.appendEffect( + new ChoiceEffect(action, playerId, possibleEffects)); + return action; + } +}