diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/fallenRealms/Card20_146.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/fallenRealms/Card20_146.java new file mode 100644 index 000000000..467521d41 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/fallenRealms/Card20_146.java @@ -0,0 +1,53 @@ +package com.gempukku.lotro.cards.set20.fallenRealms; + +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.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffect; +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.RequiredTriggerAction; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * 1 + * •Summoned by Sauron + * Fallen Realms Condition • Support Area + * To play, spot an Easterling. + * At the end of the Shadow phase, if you can spot more companions than minions, exert an Easterling to play + * an Easterling from your discard pile. + */ +public class Card20_146 extends AbstractPermanent { + public Card20_146() { + super(Side.SHADOW, 1, CardType.CONDITION, Culture.FALLEN_REALMS, Zone.SUPPORT, "Summoned by Sauron", null, true); + } + + @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, Keyword.EASTERLING); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.endOfPhase(game, effectResult, Phase.SHADOW) + && Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), CardType.COMPANION)> + Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), CardType.MINION) + && PlayConditions.canExert(self, game, Keyword.EASTERLING) + && PlayConditions.canPlayFromDiscard(self.getOwner(), game, Keyword.EASTERLING)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, self.getOwner(), 1, 1, Keyword.EASTERLING)); + action.appendEffect( + new ChooseAndPlayCardFromDiscardEffect(self.getOwner(), game, Keyword.EASTERLING)); + return Collections.singletonList(action); + } + return null; + } +}