diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/ChooseAndWoundCharactersEffect.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/ChooseAndWoundCharactersEffect.java index 6b3e9843a..51627cd22 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/ChooseAndWoundCharactersEffect.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/ChooseAndWoundCharactersEffect.java @@ -14,6 +14,8 @@ public class ChooseAndWoundCharactersEffect extends ChooseActiveCardsEffect { private Action _action; private int _count; + private String _sourceText; + public ChooseAndWoundCharactersEffect(Action action, String playerId, int minimum, int maximum, Filterable... filters) { this(action, playerId, minimum, maximum, 1, filters); } @@ -24,6 +26,10 @@ public class ChooseAndWoundCharactersEffect extends ChooseActiveCardsEffect { _count = count; } + public void setSourceText(String sourceText) { + _sourceText = sourceText; + } + @Override protected Filter getExtraFilter(LotroGame game) { return Filters.canTakeWound; @@ -32,8 +38,12 @@ public class ChooseAndWoundCharactersEffect extends ChooseActiveCardsEffect { @Override protected void cardsSelected(LotroGame game, Collection cards) { SubAction subAction = new SubAction(_action); - for (int i = 0; i < _count; i++) - subAction.appendEffect(new WoundCharactersEffect(_action.getActionSource(), Filters.in(cards))); + for (int i = 0; i < _count; i++) { + WoundCharactersEffect woundEffect = new WoundCharactersEffect(_action.getActionSource(), Filters.in(cards)); + if (_sourceText != null) + woundEffect.setSourceText(_sourceText); + subAction.appendEffect(woundEffect); + } game.getActionsEnvironment().addActionToStack(subAction); woundedCardsCallback(cards); } diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/WoundCharactersEffect.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/WoundCharactersEffect.java index f56405821..0395d33fc 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/WoundCharactersEffect.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/WoundCharactersEffect.java @@ -17,22 +17,33 @@ import java.util.Collections; public class WoundCharactersEffect extends AbstractPreventableCardEffect { private Collection _sources; + private String _sourceText; public WoundCharactersEffect(Collection sources, Filterable... filter) { super(filter); _sources = sources; + if (sources != null) + _sourceText = GameUtils.getAppendedNames(sources); } public WoundCharactersEffect(PhysicalCard source, PhysicalCard... cards) { super(cards); - if (source != null) + if (source != null) { _sources = Collections.singleton(source); + _sourceText = GameUtils.getCardLink(source); + } } public WoundCharactersEffect(PhysicalCard source, Filterable... filter) { super(filter); - if (source != null) + if (source != null) { _sources = Collections.singleton(source); + _sourceText = GameUtils.getCardLink(source); + } + } + + public void setSourceText(String sourceText) { + _sourceText = sourceText; } public Collection getSources() { @@ -63,10 +74,7 @@ public class WoundCharactersEffect extends AbstractPreventableCardEffect { @Override protected Collection playoutEffectOn(LotroGame game, Collection cards) { if (cards.size() > 0) - if (_sources != null) - game.getGameState().sendMessage(getAppendedNames(cards) + " " + GameUtils.be(cards) + " wounded by - " + getAppendedNames(_sources)); - else - game.getGameState().sendMessage(getAppendedNames(cards) + " " + GameUtils.be(cards) + " wounded"); + game.getGameState().sendMessage(getAppendedNames(cards) + " " + GameUtils.be(cards) + " wounded by " + _sourceText); for (PhysicalCard woundedCard : cards) { game.getGameState().addWound(woundedCard); diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/processes/turn/archery/FellowshipPlayerAssignsArcheryDamageGameProcess.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/processes/turn/archery/FellowshipPlayerAssignsArcheryDamageGameProcess.java index efddc6a63..d355eb4e6 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/processes/turn/archery/FellowshipPlayerAssignsArcheryDamageGameProcess.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/processes/turn/archery/FellowshipPlayerAssignsArcheryDamageGameProcess.java @@ -63,6 +63,7 @@ public class FellowshipPlayerAssignsArcheryDamageGameProcess implements GameProc for (int i = 0; i < _woundsToAssign; i++) { final int woundsLeft = _woundsToAssign - i; ChooseAndWoundCharactersEffect woundCharacter = new ChooseAndWoundCharactersEffect(action, _game.getGameState().getCurrentPlayerId(), 1, 1, filter); + woundCharacter.setSourceText("Archery Fire"); woundCharacter.setChoiceText("Choose character to assign archery wound to - remaining wounds: " + woundsLeft); action.appendEffect(woundCharacter); } diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/processes/turn/archery/ShadowPlayerAssignsArcheryDamageGameProcess.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/processes/turn/archery/ShadowPlayerAssignsArcheryDamageGameProcess.java index 62066a424..f1a48a305 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/processes/turn/archery/ShadowPlayerAssignsArcheryDamageGameProcess.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/processes/turn/archery/ShadowPlayerAssignsArcheryDamageGameProcess.java @@ -44,6 +44,7 @@ public class ShadowPlayerAssignsArcheryDamageGameProcess implements GameProcess for (int i = 0; i < _woundsToAssign; i++) { final int woundsLeft = _woundsToAssign - i; ChooseAndWoundCharactersEffect woundCharacter = new ChooseAndWoundCharactersEffect(action, _playerId, 1, 1, filter); + woundCharacter.setSourceText("Archery Fire"); woundCharacter.setChoiceText("Choose minion to assign archery wound to - remaining wounds: " + woundsLeft); action.appendEffect(woundCharacter); } diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/rules/ThreatRule.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/rules/ThreatRule.java index fce721102..3846c68ec 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/rules/ThreatRule.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/rules/ThreatRule.java @@ -55,8 +55,9 @@ public class ThreatRule { if (game.getModifiersQuerying().hasFlagActive(game.getGameState(), ModifierFlag.RING_BEARER_CANT_TAKE_THREAT_WOUNDS)) filter = Filters.and(filter, Filters.not(Keyword.RING_BEARER)); - action.appendEffect( - new ChooseAndWoundCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1, filter)); + ChooseAndWoundCharactersEffect woundCharacter = new ChooseAndWoundCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1, filter); + woundCharacter.setSourceText("Threat Rule"); + action.appendEffect(woundCharacter); } return Collections.singletonList(action); }