From 6068702130038627cc8b53c2bb3db77b091d0c94 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Sun, 6 Nov 2011 12:50:47 +0000 Subject: [PATCH] "Disposable Servants" --- .../lotro/cards/set7/wraith/Card7_176.java | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/wraith/Card7_176.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/wraith/Card7_176.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/wraith/Card7_176.java new file mode 100644 index 000000000..68a94dc65 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/wraith/Card7_176.java @@ -0,0 +1,64 @@ +package com.gempukku.lotro.cards.set7.wraith; + +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.choose.ChooseAndDiscardCardsFromHandEffect; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Phase; +import com.gempukku.lotro.common.Race; +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.effects.AddThreatsEffect; + +import java.util.Collection; + +/** + * Set: The Return of the King + * Side: Shadow + * Culture: Wraith + * Twilight Cost: 1 + * Type: Event • Regroup + * Game Text: Spot a Nazgul to discard any number of cards from your hand. The Free Peoples player then discards any + * number of cards from his or her hand. For each card you discarded more than the Free Peoples player, add a threat. + */ +public class Card7_176 extends AbstractEvent { + public Card7_176() { + super(Side.SHADOW, 1, Culture.WRAITH, "Disposable Servants", Phase.REGROUP); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canSpot(game, self, Race.NAZGUL); + } + + @Override + public PlayEventAction getPlayCardAction(final String playerId, final LotroGame game, final PhysicalCard self, int twilightModifier) { + final PlayEventAction action = new PlayEventAction(self); + action.appendEffect( + new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 0, Integer.MAX_VALUE, Filters.any) { + @Override + protected void cardsBeingDiscardedCallback(Collection cardsBeingDiscarded) { + final int shadowDiscardCount = cardsBeingDiscarded.size(); + + action.appendEffect( + new ChooseAndDiscardCardsFromHandEffect(action, game.getGameState().getCurrentPlayerId(), false, 0, Integer.MAX_VALUE, Filters.any) { + @Override + protected void cardsBeingDiscardedCallback(Collection cardsBeingDiscarded) { + int fpDiscardCount = cardsBeingDiscarded.size(); + + int diff = shadowDiscardCount - fpDiscardCount; + if (diff > 0) { + action.appendEffect( + new AddThreatsEffect(playerId, self, diff)); + } + } + }); + } + }); + return action; + } +}