diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/moria/Card20_254.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/moria/Card20_254.java new file mode 100644 index 000000000..70babc2ea --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/moria/Card20_254.java @@ -0,0 +1,69 @@ +package com.gempukku.lotro.cards.set20.moria; + +import com.gempukku.lotro.cards.AbstractMinion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.SelfExertEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.filters.Filters; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.GameState; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.actions.ActivateCardAction; +import com.gempukku.lotro.logic.modifiers.ModifiersQuerying; +import com.gempukku.lotro.logic.timing.Action; + +import java.util.Collections; +import java.util.List; + +/** + * 14 + * •The Balrog, Dread Servant of Melkor + * Moria Minion • Balrog + * 17 5 4 + * Damage +1. Fierce. + * To play, spot a [Moria] minion. + * If the fellowship has moved more than once this turn, the Balrog's twilight cost is -4. + * Regroup: If you can spot more companions than minions, exert the Balrog four times to make the Free Peoples player + * discard a companion (except the Ring-bearer). + */ +public class Card20_254 extends AbstractMinion { + public Card20_254() { + super(14, 17, 5, 4, Race.BALROG, Culture.MORIA, "The Balrog", "Dread Servant of Melkor", true); + addKeyword(Keyword.DAMAGE, 1); + addKeyword(Keyword.FIERCE); + } + + @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, Culture.MORIA, CardType.MINION); + } + + @Override + public int getTwilightCostModifier(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard self) { + return (gameState.getMoveCount() > 1) ? -4 : 0; + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.REGROUP, self, 0) + && Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), CardType.COMPANION)> + Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), CardType.MINION) + && PlayConditions.canSelfExert(self, 4, game)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new SelfExertEffect(action, self)); + action.appendCost( + new SelfExertEffect(action, self)); + action.appendCost( + new SelfExertEffect(action, self)); + action.appendCost( + new SelfExertEffect(action, self)); + action.appendEffect( + new ChooseAndDiscardCardsFromPlayEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1, CardType.COMPANION, Filters.not(Filters.ringBearer))); + return Collections.singletonList(action); + } + return null; + } +}