From 4c5c5be4584f47b3b9f052881348eae98ca11994 Mon Sep 17 00:00:00 2001 From: marcins78 Date: Thu, 21 Feb 2013 12:25:07 +0000 Subject: [PATCH] "Not a Defeat" --- .../lotro/cards/set20/rohan/Card20_474.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/rohan/Card20_474.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/rohan/Card20_474.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/rohan/Card20_474.java new file mode 100644 index 000000000..8ce256885 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/rohan/Card20_474.java @@ -0,0 +1,39 @@ +package com.gempukku.lotro.cards.set20.rohan; + +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.CancelSkirmishEffect; +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.LotroGame; + +/** + * 0 + * Not A Defeat + * Rohan Event • Skirmish + * Discard a [Rohan] fortification to cancel a skirmish involving a [Rohan] Man and an exhausted minion. + */ +public class Card20_474 extends AbstractEvent { + public Card20_474() { + super(Side.FREE_PEOPLE, 0, Culture.ROHAN, "Not a Defeat", Phase.SKIRMISH); + } + + @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.canDiscardFromPlay(self, game, Culture.ROHAN, Keyword.FORTIFICATION); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Culture.ROHAN, Keyword.FORTIFICATION)); + action.appendEffect( + new CancelSkirmishEffect(Culture.ROHAN, Race.MAN, Filters.inSkirmishAgainst(CardType.MINION, Filters.exhausted))); + return action; + } +}