From 3209de963165ad13cacb643bf838348ae339128e Mon Sep 17 00:00:00 2001 From: marcins78 Date: Fri, 25 Jan 2013 14:20:54 +0000 Subject: [PATCH] "Defend It and Hope" --- .../lotro/cards/set20/gondor/Card20_188.java | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/gondor/Card20_188.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/gondor/Card20_188.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/gondor/Card20_188.java new file mode 100644 index 000000000..0dbb15748 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/gondor/Card20_188.java @@ -0,0 +1,50 @@ +package com.gempukku.lotro.cards.set20.gondor; + +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.choose.ChooseAndExertCharactersEffect; +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.effects.ChooseAndWoundCharactersEffect; +import com.gempukku.lotro.logic.effects.WoundCharactersEffect; + +import java.util.Collection; + +/** + * 0 + * Defend It and Hope + * Gondor Event • Maneuver + * Exert a [Gondor] man to wound a minion; if that minion is an Uruk-hai, wound it again. + */ +public class Card20_188 extends AbstractEvent { + public Card20_188() { + super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "Defend It and Hope", Phase.MANEUVER); + } + + @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.canExert(self, game, Culture.GONDOR, Race.MAN); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, final LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + final PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.GONDOR, Race.MAN)); + action.appendEffect( + new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.MINION) { + @Override + protected void cardsSelected(LotroGame game, Collection cards) { + super.cardsSelected(game, cards); + if (Filters.filter(cards, game.getGameState(), game.getModifiersQuerying(), Race.URUK_HAI).size()>0) + action.appendEffect( + new WoundCharactersEffect(self, Filters.in(cards))); + } + }); + return action; + } +}