diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/gandalf/Card4_108.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/gandalf/Card4_108.java new file mode 100644 index 000000000..93cade05a --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/gandalf/Card4_108.java @@ -0,0 +1,59 @@ +package com.gempukku.lotro.cards.set4.gandalf; + +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.ChooseAndDiscardCardsFromPlayEffect; +import com.gempukku.lotro.cards.effects.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.cards.effects.ChooseOpponentEffect; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Phase; +import com.gempukku.lotro.common.Side; +import com.gempukku.lotro.filters.Filters; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; + +/** + * Set: The Two Towers + * Side: Free + * Culture: Gandalf + * Twilight Cost: 4 + * Type: Event + * Game Text: Maneuver: If you can spot more minions than companions, exert Gandalf to make an opponent discard + * a minion. + */ +public class Card4_108 extends AbstractEvent { + public Card4_108() { + super(Side.FREE_PEOPLE, Culture.GANDALF, "Wizardry Indeed", Phase.MANEUVER); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), Filters.name("Gandalf")) + && Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), Filters.type(CardType.MINION)) + > Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), Filters.type(CardType.COMPANION)); + } + + @Override + public int getTwilightCost() { + return 4; + } + + @Override + public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + final PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.name("Gandalf"))); + action.appendEffect( + new ChooseOpponentEffect(playerId) { + @Override + protected void opponentChosen(String opponentId) { + action.insertEffect( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Filters.type(CardType.MINION))); + } + }); + return action; + } +}