From dd24fd36ac060bea5acccf05be01bbc28d30ae86 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Tue, 15 Nov 2011 12:34:35 +0000 Subject: [PATCH] "Their Marching Companies" --- .../lotro/cards/set8/sauron/Card8_107.java | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set8/sauron/Card8_107.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set8/sauron/Card8_107.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set8/sauron/Card8_107.java new file mode 100644 index 000000000..54b678bf5 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set8/sauron/Card8_107.java @@ -0,0 +1,75 @@ +package com.gempukku.lotro.cards.set8.sauron; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.StackCardFromPlayEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromStackedEffect; +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.actions.ActivateCardAction; +import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.effects.RemoveThreatsEffect; +import com.gempukku.lotro.logic.timing.Action; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Siege of Gondor + * Side: Shadow + * Culture: Sauron + * Twilight Cost: 1 + * Type: Condition • Support Area + * Game Text: Engine. To play, spot a [SAURON] minion. Regroup: Remove a threat to stack your [SAURON] minion on a site + * you control. Shadow: Remove a threat to play a [SAURON] minion stacked on a site you control. + */ +public class Card8_107 extends AbstractPermanent { + public Card8_107() { + super(Side.SHADOW, 1, CardType.CONDITION, Culture.SAURON, Zone.SUPPORT, "Their Marching Companies"); + addKeyword(Keyword.ENGINE); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier, ignoreRoamingPenalty) + && PlayConditions.canSpot(game, Culture.SAURON, CardType.MINION); + } + + @Override + protected List getExtraPhaseActions(final String playerId, LotroGame game, final PhysicalCard self) { + if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.REGROUP, self, 0) + && PlayConditions.canRemoveThreat(game, self, 1)) { + final ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new RemoveThreatsEffect(self, 1)); + action.appendEffect( + new ChooseActiveCardEffect(self, playerId, "Choose a site you control", Filters.siteControlled(playerId)) { + @Override + protected void cardSelected(LotroGame game, final PhysicalCard site) { + action.insertEffect( + new ChooseActiveCardEffect(self, playerId, "Choose your SAURON minion", Filters.owner(playerId), Culture.SAURON, CardType.MINION) { + @Override + protected void cardSelected(LotroGame game, PhysicalCard minion) { + action.insertEffect( + new StackCardFromPlayEffect(minion, site)); + } + }); + } + }); + return Collections.singletonList(action); + } + if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 0) + && PlayConditions.canRemoveThreat(game, self, 1) + && PlayConditions.canPlayFromStacked(playerId, game, Filters.siteControlled(playerId), Culture.SAURON, CardType.MINION)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new RemoveThreatsEffect(self, 1)); + action.appendEffect( + new ChooseAndPlayCardFromStackedEffect(playerId, Filters.siteControlled(playerId), Culture.SAURON, CardType.MINION)); + return Collections.singletonList(action); + } + return null; + } +}