diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_217.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_217.java new file mode 100644 index 000000000..9fb89374f --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_217.java @@ -0,0 +1,60 @@ +package com.gempukku.lotro.cards.set20.isengard; + +import com.gempukku.lotro.cards.AbstractEvent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayEventAction; +import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseModifierEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect; +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.modifiers.KeywordModifier; + +import java.util.Collection; + +/** + * 0 + * Build Me an Army + * Isengard Event • Shadow + * Discard X [Isengard] Orcs to play an Uruk-hai from your discard pile; its twilight cost is -X and it is fierce + * (and damage +1 if you can spot 6 companions) until the regroup phase. + */ +public class Card20_217 extends AbstractEvent { + public Card20_217() { + super(Side.SHADOW, 0, Culture.ISENGARD, "Build Me an Army", Phase.SHADOW); + } + + @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.canPlayFromDiscard(playerId, game, -Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Culture.ISENGARD, Race.ORC), Race.URUK_HAI); + } + + @Override + public PlayEventAction getPlayCardAction(final String playerId, final LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + final PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 0, Integer.MAX_VALUE, Culture.ISENGARD, Race.ORC) { + @Override + protected void cardsToBeDiscardedCallback(Collection cards) { + int count = cards.size(); + action.appendEffect( + new ChooseAndPlayCardFromDiscardEffect(playerId, game, -count, Race.URUK_HAI) { + @Override + protected void afterCardPlayed(PhysicalCard cardPlayed) { + action.appendEffect( + new AddUntilStartOfPhaseModifierEffect( + new KeywordModifier(self, cardPlayed, Keyword.FIERCE), Phase.MANEUVER)); + if (Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), 6, CardType.COMPANION)) + action.appendEffect( + new AddUntilStartOfPhaseModifierEffect( + new KeywordModifier(self, cardPlayed, Keyword.DAMAGE, 1), Phase.MANEUVER)); + } + }); + } + }); + return action; + } +}