From a47efef42063348fc6abbec29dd7f897333c3012 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Thu, 17 Nov 2011 15:41:42 +0000 Subject: [PATCH] "Dark Swooping Shadows" --- .../gempukku/lotro/cards/PlayConditions.java | 12 ++++- .../lotro/cards/set10/raider/Card10_040.java | 2 +- .../lotro/cards/set10/wraith/Card10_058.java | 51 +++++++++++++++++++ .../lotro/cards/set6/rohan/Card6_095.java | 2 +- 4 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set10/wraith/Card10_058.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 d1cc31a35..249258aaf 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 @@ -172,7 +172,7 @@ public class PlayConditions { return game.getGameState().getBurdens() >= count && game.getModifiersQuerying().canRemoveBurden(game.getGameState(), card); } - public static boolean canWound(final LotroGame game, final int times, final int count, Filterable... filters) { + public static boolean canWound(PhysicalCard source, final LotroGame game, final int times, final int count, Filterable... filters) { final GameState gameState = game.getGameState(); final ModifiersQuerying modifiersQuerying = game.getModifiersQuerying(); final Filter filter = Filters.and(filters); @@ -191,6 +191,16 @@ public class PlayConditions { }); } + public static boolean canHeal(PhysicalCard source, LotroGame game, Filterable... filters) { + return Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.wounded, Filters.and(filters), + new Filter() { + @Override + public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) { + return modifiersQuerying.canBeHealed(gameState, physicalCard); + } + }) >= 1; + } + public static boolean canPlayFromHand(String playerId, LotroGame game, Filterable... filters) { return Filters.filter(game.getGameState().getHand(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, Filters.playable(game))).size() > 0; } diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set10/raider/Card10_040.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set10/raider/Card10_040.java index e0968e302..53f57e1c6 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set10/raider/Card10_040.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set10/raider/Card10_040.java @@ -60,7 +60,7 @@ public class Card10_040 extends AbstractMinion { @Override protected List getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SKIRMISH, self, 0) - && PlayConditions.canWound(game, 1, 2, Filters.not(self), Culture.RAIDER, Race.MAN)) { + && PlayConditions.canWound(self, game, 1, 2, Filters.not(self), Culture.RAIDER, Race.MAN)) { ActivateCardAction action = new ActivateCardAction(self); action.appendCost( new ChooseAndWoundCharactersEffect(action, playerId, 2, 2, Filters.not(self), Culture.RAIDER, Race.MAN)); diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set10/wraith/Card10_058.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set10/wraith/Card10_058.java new file mode 100644 index 000000000..ea75c777b --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set10/wraith/Card10_058.java @@ -0,0 +1,51 @@ +package com.gempukku.lotro.cards.set10.wraith; + +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.AddBurdenEffect; +import com.gempukku.lotro.cards.effects.ChoiceEffect; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.effects.AddThreatsEffect; +import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect; +import com.gempukku.lotro.logic.timing.Effect; + +import java.util.LinkedList; +import java.util.List; + +/** + * Set: Mount Doom + * Side: Shadow + * Culture: Wraith + * Twilight Cost: 1 + * Type: Event • Skirmish + * Game Text: Heal an enduring [WRAITH] minion to add a burden or 2 threats. + */ +public class Card10_058 extends AbstractEvent { + public Card10_058() { + super(Side.SHADOW, 1, Culture.WRAITH, "Dark Swooping Shadows", Phase.SKIRMISH); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier, ignoreRoamingPenalty) + && PlayConditions.canHeal(self, game, Culture.WRAITH, CardType.MINION, Keyword.ENDURING); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndHealCharactersEffect(action, playerId, 1, 1, Culture.WRAITH, CardType.MINION, Keyword.ENDURING)); + List possibleEffects = new LinkedList(); + possibleEffects.add( + new AddBurdenEffect(self, 1)); + possibleEffects.add( + new AddThreatsEffect(playerId, self, 2)); + action.appendEffect( + new ChoiceEffect(action, playerId, possibleEffects)); + return action; + } +} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/rohan/Card6_095.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/rohan/Card6_095.java index 82e7cf96d..35d06face 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/rohan/Card6_095.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/rohan/Card6_095.java @@ -45,7 +45,7 @@ public class Card6_095 extends AbstractCompanion { @Override protected List getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) { if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self) - && Filters.inSkirmishAgainst(CardType.MINION, Filters.wounded).accepts(game.getGameState(), game.getModifiersQuerying(), self)) { + && PlayConditions.canHeal(self, game, CardType.MINION, Filters.inSkirmishAgainst(self))) { ActivateCardAction action = new ActivateCardAction(self); action.appendCost( new ChooseAndHealCharactersEffect(action, playerId, 1, 1, CardType.MINION, Filters.inSkirmishAgainst(self)));