From b4d1ecd97aea98cb4100a5fa7d10867db45f4b24 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 21 Sep 2011 12:38:23 +0000 Subject: [PATCH] Fixing exertion so it doesn't kill the character if it is forced. --- .../lotro/cards/effects/ExertCharacterEffect.java | 3 +-- .../gempukku/lotro/cards/set1/site/Card1_355.java | 14 +++++--------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/ExertCharacterEffect.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/ExertCharacterEffect.java index 7ecf20dc9..dcc061965 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/ExertCharacterEffect.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/ExertCharacterEffect.java @@ -30,9 +30,8 @@ public class ExertCharacterEffect extends AbstractEffect { public List getCardsToBeExerted(LotroGame game) { List cardsToExert = new LinkedList(); - for (PhysicalCard physicalCard : Filters.filterActive(game.getGameState(), game.getModifiersQuerying(), _filter)) { + for (PhysicalCard physicalCard : Filters.filterActive(game.getGameState(), game.getModifiersQuerying(), _filter, Filters.canExert())) cardsToExert.add(physicalCard); - } cardsToExert.removeAll(_prevented); return cardsToExert; } diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/site/Card1_355.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/site/Card1_355.java index 43f6e1a8f..90c8e895e 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/site/Card1_355.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/site/Card1_355.java @@ -10,7 +10,7 @@ import com.gempukku.lotro.game.state.LotroGame; import com.gempukku.lotro.logic.actions.RequiredTriggerAction; import com.gempukku.lotro.logic.timing.EffectResult; -import java.util.LinkedList; +import java.util.Collections; import java.util.List; /** @@ -31,14 +31,10 @@ public class Card1_355 extends AbstractSite { if (effectResult.getType() == EffectResult.Type.WHEN_MOVE_TO && game.getGameState().getCurrentSite() == self && !Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.RANGER))) { - List companions = Filters.filterActive(game.getGameState(), game.getModifiersQuerying(), Filters.type(CardType.COMPANION)); - List actions = new LinkedList(); - for (PhysicalCard companion : companions) { - RequiredTriggerAction action = new RequiredTriggerAction(self, null, "Exert companion"); - action.addEffect(new ExertCharacterEffect(companion.getOwner(), companion)); - actions.add(action); - } - return actions; + RequiredTriggerAction action = new RequiredTriggerAction(self, null, "Every companion must exert"); + action.addEffect( + new ExertCharacterEffect(game.getGameState().getCurrentPlayerId(), Filters.type(CardType.COMPANION))); + return Collections.singletonList(action); } return null; }