diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/PlayConditions.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/PlayConditions.java index da38b803d..98ad9470c 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/PlayConditions.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/PlayConditions.java @@ -276,6 +276,16 @@ public class PlayConditions { return false; } + public static boolean canPlayFromStacked(String playerId, LotroGame game, int withTwilightRemoved, int twilightModifier, Filterable stackedOn, Filterable... filters) { + final Collection matchingStackedOn = Filters.filterActive(game.getGameState(), game.getModifiersQuerying(), stackedOn); + for (PhysicalCard stackedOnCard : matchingStackedOn) { + if (Filters.filter(game.getGameState().getStackedCards(stackedOnCard), game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, Filters.playable(game, withTwilightRemoved, twilightModifier, false, false))).size() > 0) + return true; + } + + return false; + } + public static boolean canPlayFromDiscard(String playerId, LotroGame game, Filterable... filters) { if (game.getModifiersQuerying().hasFlagActive(game.getGameState(), ModifierFlag.CANT_PLAY_FROM_DISCARD_OR_DECK)) return false; diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/orc/Card13_106.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/orc/Card13_106.java new file mode 100644 index 000000000..3e8bccaaa --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/orc/Card13_106.java @@ -0,0 +1,59 @@ +package com.gempukku.lotro.cards.set13.orc; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.RemoveBurdenEffect; +import com.gempukku.lotro.cards.effects.StackCardFromPlayEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromStackedEffect; +import com.gempukku.lotro.common.*; +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.timing.Action; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Bloodlines + * Side: Shadow + * Culture: Orc + * Twilight Cost: 1 + * Type: Condition • Support Area + * Game Text: Regroup: Spot an [ORC] lurker minion to stack that minion here. Shadow: Remove a burden to play a lurker + * minion stacked here as if from hand. That minion is twilight cost -3. + */ +public class Card13_106 extends AbstractPermanent { + public Card13_106() { + super(Side.SHADOW, 1, CardType.CONDITION, Culture.ORC, Zone.SUPPORT, "Enemy Upon Enemy"); + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) { + if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.REGROUP, self, 0) + && PlayConditions.canSpot(game, Culture.ORC, Keyword.LURKER, CardType.MINION)) { + final ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new ChooseActiveCardEffect(self, playerId, "Choose an ORC lurker minion", Culture.ORC, Keyword.LURKER, CardType.MINION) { + @Override + protected void cardSelected(LotroGame game, PhysicalCard card) { + action.appendEffect( + new StackCardFromPlayEffect(card, self)); + } + }); + return Collections.singletonList(action); + } + if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 0) + && PlayConditions.canRemoveBurdens(game, self, 1) + && PlayConditions.canPlayFromStacked(playerId, game, 0, -3, self, CardType.MINION, Keyword.LURKER)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new RemoveBurdenEffect(playerId, self, 1)); + action.appendEffect( + new ChooseAndPlayCardFromStackedEffect(playerId, self, -3, CardType.MINION, Keyword.LURKER)); + return Collections.singletonList(action); + } + return null; + } +}