Repository navigation
Track war losses as wounds and settle them when the war ends - #239
Merged
Merged
Conversation
Battles no longer shrink regiments as they end. Each campaign battle side records what every force brought (faction regiments, subjects' levies including militia, a subject's whole militia on its own province, and mercenaries on the roster) and its deaths. The deaths become wounds: shared between forces by lives brought, militia first inside a force, then law and paid slots in proportion. Law slots are full after every battle; wounded paid slots cannot fight, cost no upkeep and are lost when the war ends. Mercenary companies heal a percentage every few hours and never lose slots. Each faction has one army over all its wars, and recruiting during a war reinforces it. Each war keeps a ledger of its battles, so staff can fix losses with /war admin losses, /war admin army and /war admin wounds, and set a campaign battle's starting lives with /battle lives before it starts. The war commitment snapshot is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 108 files, which is 8 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
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.
Battles no longer shrink regiments when they end. Losses are now wounds that staff can correct during the war, and they are settled when the war ends.
What changes for players
mercenary_heal_percenteverymercenary_heal_hours, counted from the latest new wound.Staff tools
/war admin losses <war>lists recorded battles and what the war's end will take./war admin losses <war> <battle#> attacker|defender set|add|remove <deaths> [reason]corrects a battle's deaths./war admin army <faction>shows each regiment's slots, wounds per war and what can fight./war admin wounds <war> <faction> <regiment> add|remove <lives>and/war admin wounds company <guild> [set <lives>]change wounds directly./battle lives <battle> <side> set|add|remove <n>now works before a campaign battle starts, andautoresets it. Before, it was refused until the battle started, and/battle setlivesrefused campaign battles.Under the hood
WarLedger(saved inWarData.ledger).WarCommitment,WarCommitmentService,LevySnapshotCalculator,BattlePoolService) is gone. Everything reads the live armies throughBattleForces.WarManager.endWarbefore the civil war untangle, and is marked settled before any slots change.war.ymlkeys:war.battle_military.mercenary_heal_percent(25) andmercenary_heal_hours(6).Not in this PR
The website's war pages keep the losses originally reported for a battle. They do not show staff corrections yet.
Testing
mvn verifylocally. All pass except the two known local-only failures, and the only uncovered lines are the known environment-only ones./battle lives campaign_w1_p244 attacker set 95before the start applied 95; the defender went back to 44 withauto./war admin endtook exactly the previewed slots: militia 5 → 1, professional 100 → 98. Law slots were untouched.🤖 Generated with Claude Code