cc67364113d30286f749f7df8df3d5d75ce7b5dd
The battle engine diverged from the documented combat model (game/rules.txt "Сражения") in three ways: - the destruction roll was inverted (rand >= p), so a near-certain hit destroyed its target only ~(1-p) of the time; - a whole group fired as a single ship (Armament shots per round) regardless of its ship count, so fleet size never affected offence; - the defending mass used the whole group's full mass instead of one target ship's, weakening grouped ships' shields by ~Number^(1/3). SingleBattle now resolves ship by ship: every living ship fires once per round in random order across all groups, each gun targets a random enemy ship (weighted by group size), and the destruction roll matches the documented probability. FilterBattleOpponents evaluates per-ship mass. Also fixes opponent-map initialisation in ProduceBattles that kept only an attacker's last opponent. The rules already describe this model, so no documentation change is needed. Tests: per-ship one-sided wipe, destruction-roll direction, and the updated per-ship-mass probability expectation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Description
No description provided
Languages
Go
52%
TypeScript
38.1%
Svelte
8.8%
Go Template
0.3%
Makefile
0.3%
Other
0.3%