From 5d8a15d3f1387b1a14f5fb68433a1206b712ccc6 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 21 Oct 2011 10:47:12 +0000 Subject: [PATCH] "Fires and Foul Fumes" --- .../gempukku/lotro/cards/PlayConditions.java | 8 +++- .../lotro/cards/set6/isengard/Card6_062.java | 41 +++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/isengard/Card6_062.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/PlayConditions.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/PlayConditions.java index 0afe03865..bb3e01102 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/PlayConditions.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/PlayConditions.java @@ -168,14 +168,18 @@ public class PlayConditions { return canBeDiscarded(source, game, source); } - public static boolean canBeDiscarded(final PhysicalCard source, LotroGame game, final Filterable... filters) { + public static boolean canBeDiscarded(final PhysicalCard source, LotroGame game, int count, final Filterable... filters) { return Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, new Filter() { @Override public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) { return modifiersQuerying.canBeDiscardedFromPlay(gameState, physicalCard, source); } - })) > 0; + })) >= count; + } + + public static boolean canBeDiscarded(final PhysicalCard source, LotroGame game, final Filterable... filters) { + return canBeDiscarded(source, game, 1, filters); } public static boolean canExert(final PhysicalCard source, final GameState gameState, final ModifiersQuerying modifiersQuerying, Filterable... filters) { diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/isengard/Card6_062.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/isengard/Card6_062.java new file mode 100644 index 000000000..898c4d78a --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/isengard/Card6_062.java @@ -0,0 +1,41 @@ +package com.gempukku.lotro.cards.set6.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.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; +import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect; + +/** + * Set: Ents of Fangorn + * Side: Shadow + * Culture: Isengard + * Twilight Cost: 4 + * Type: Event + * Game Text: Regroup: Discard 4 [ISENGARD] orcs to wound a companion 4 times (except the Ring-bearer). + */ +public class Card6_062 extends AbstractEvent { + public Card6_062() { + super(Side.SHADOW, 4, Culture.ISENGARD, "Fires and Foul Fumes", Phase.REGROUP); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canBeDiscarded(self, game, 4, Culture.ISENGARD, Race.ORC); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 4, 4, Culture.ISENGARD, Race.ORC)); + action.appendEffect( + new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, 4, CardType.COMPANION, Filters.not(Keyword.RING_BEARER))); + return action; + } +}