Repository navigation
Conversation
CombatRollResult keeps the modifier lines, body, total line and after-total notes apart, so roll notes and the Mass Hypnosis and Leviathan totals no longer splice or regex-replace the text; the Thalnos offer is a flag. CombatMessageHelper.rollHeading gives the combat name and subject, so Fog of War mirroring and the replay header no longer regex the summary, and the "Total hits" substring callers read totalHits(). English output is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Row 1-5c of the localization plan (
docs/LOCALIZATION_PLAN.md§5.0): stop logic reading the combat roll message, so the roll output can be translated next. Stacked on #6310 (1-5b); this PR targets the 1-5b branch, so the diff shows 1-5c only.TextAsLogicGuardTestlooks for label and content comparisons, so it missed these: they read the roll text withindexOf, regexes andsubstringAfter.What changed
CombatRollService.CombatRollResultkeeps the parts apart: modifier lines, body, total line and after-total notes.message()joins them as before."With modifiers: \n".**Total hits N**(the pattern constant is gone).thalnosRerollOfferedflag instead ofmessage.contains("adding +1, at the risk of your").startsWith("**Total hits").CombatMessageHelper.rollHeadingreturns the combat name, the subject (name plus dice emoji) and the summary line.displayCombatSummarystill returns the line.FOWCombatThreadMirroring.mirrorCombatMessage/combatRollResult) takes the subject and hit count instead of regex-readingrolls forandTotal hits.RollHeading.name()instead ofsubstringBetween(summary, "rolls for ", ...).rollForUnitsResult(public) returns the result;ButtonHelper,ButtonHelperFactionSpecificandBastionTechService(twice) readtotalHits()instead ofsubstringAfter(message, "Total hits ").Visible changes
None in English. One edge improves: a Fog of War mirror of a BOMBARDMENT roll aimed at a planet used to be cut at the first
>of the planet's emoji; it now shows the whole subject.Tests
CombatRollResultTest: the joined message against the old splice for every mix of notes and modifiers, the total-line replacement against the old regex, the Fog of War mirror text against the old parse, and the replay header name against the oldsubstringBetweenfor every roll type.CombatRollPayloadRendererParityTest(replay renderer vs Discord text) still passes.mvn verifywith the Postgres tests: 3951 tests, 0 failures.🤖 Generated with Claude Code