"Wizardry Indeed"

This commit is contained in:
marcins78@gmail.com
2011-10-08 01:33:36 +00:00
parent a2e053166b
commit 0137752d84

View File

@@ -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;
}
}