diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/rohan/Card17_098.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/rohan/Card17_098.java index 492705430..af268b482 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/rohan/Card17_098.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/rohan/Card17_098.java @@ -3,12 +3,14 @@ package com.gempukku.lotro.cards.set17.rohan; import com.gempukku.lotro.cards.AbstractPermanent; import com.gempukku.lotro.cards.PlayConditions; import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.cards.effects.PreventCardEffect; import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; -import com.gempukku.lotro.cards.effects.choose.ChooseAndPreventCardEffect; 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.GameUtils; import com.gempukku.lotro.logic.actions.ActivateCardAction; import com.gempukku.lotro.logic.effects.AddTwilightEffect; import com.gempukku.lotro.logic.effects.WoundCharactersEffect; @@ -16,7 +18,8 @@ import com.gempukku.lotro.logic.modifiers.CantBeAssignedToSkirmishModifier; import com.gempukku.lotro.logic.modifiers.Modifier; import com.gempukku.lotro.logic.timing.Effect; -import java.util.Collections; +import java.util.Collection; +import java.util.LinkedList; import java.util.List; /** @@ -49,14 +52,24 @@ public class Card17_098 extends AbstractPermanent { public List getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) { if (TriggerConditions.isGettingWounded(effect, game, Culture.ROHAN, Race.MAN) && PlayConditions.canExert(self, game, Culture.ROHAN, Race.MAN)) { - ActivateCardAction action = new ActivateCardAction(self); - action.appendCost( - new AddTwilightEffect(self, 2)); - action.appendCost( - new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.ROHAN, Race.MAN)); - action.appendEffect( - new ChooseAndPreventCardEffect(self, (WoundCharactersEffect) effect, playerId, "Choose character to prevent wound to", Culture.ROHAN, Race.MAN)); - return Collections.singletonList(action); + final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect; + Collection woundedCharacters = Filters.filter(woundEffect.getAffectedCardsMinusPrevented(game), game.getGameState(), game.getModifiersQuerying(), Culture.ROHAN, Race.MAN); + List actions = new LinkedList(); + for (PhysicalCard woundedCharacter : woundedCharacters) { + if (PlayConditions.canExert(self, game, Culture.ROHAN, Race.MAN, Filters.not(woundedCharacter))) { + ActivateCardAction action = new ActivateCardAction(self); + action.setText("Prevent for " + GameUtils.getFullName(woundedCharacter)); + action.appendCost( + new AddTwilightEffect(self, 2)); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.ROHAN, Race.MAN, Filters.not(woundedCharacter))); + action.appendEffect( + new PreventCardEffect(woundEffect, woundedCharacter)); + actions.add(action); + + } + } + return actions; } return null; }