From 3c42ed49ba9d48d4fdec3e7df81370ed9191cfec Mon Sep 17 00:00:00 2001 From: marcins78 Date: Mon, 4 Feb 2013 14:40:34 +0000 Subject: [PATCH] "Goblin Swarms" --- .../lotro/cards/set20/moria/Card20_274.java | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/moria/Card20_274.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/moria/Card20_274.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/moria/Card20_274.java new file mode 100644 index 000000000..0c582f338 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/moria/Card20_274.java @@ -0,0 +1,54 @@ +package com.gempukku.lotro.cards.set20.moria; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromStackedEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndStackCardFromPlayEffect; +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.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * 1 + * Goblin Swarms + * Moria Condition • Support Area + * Response: If your [Moria] Goblin wins a skirmish, stack that Gobiln here. + * Shadow: Play a Goblin stacked here as if from hand. + */ +public class Card20_274 extends AbstractPermanent { + public Card20_274() { + super(Side.SHADOW, 1, CardType.CONDITION, Culture.MORIA, Zone.SUPPORT, "Goblin Swarms"); + } + + @Override + public List getExtraPhaseActions(final String playerId, final LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 0) + && PlayConditions.canPlayFromStacked(playerId, game, self, Race.GOBLIN)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendEffect( + new ChooseAndPlayCardFromStackedEffect(playerId, self, Race.GOBLIN)); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) { + if (TriggerConditions.winsSkirmish(game, effectResult, Filters.and(Culture.MORIA, Race.GOBLIN)) + && PlayConditions.isActive(game, Culture.MORIA, Race.GOBLIN, Filters.inSkirmish)) { + final ActivateCardAction action = new ActivateCardAction(self); + action.appendEffect( + new ChooseAndStackCardFromPlayEffect(action, playerId, self, Culture.MORIA, Race.GOBLIN, Filters.inSkirmish)); + return Collections.singletonList(action); + } + return null; + } +}