Files
TravianZ/GameEngine
Ferywir 33da9fdad5 refactor(sendunitsComplete): extract handlePrisoners() and buildCombatReport() [#155]
Phase C of the sendunitsComplete() refactor (issue #155).

- handlePrisoners(): extracts the ~100-line block that releases troops
  trapped in the defender's traps during a conquest attack (type 3),
  sends them home with 25% casualties, repairs destroyed traps, and
  returns the HTML fragment for the battle-report trap line.

- buildCombatReport(): extracts the assembly of the $data2 (main report)
  and $data_fail (all-attacker-dead fallback) CSV strings, including the
  "village destroyed" annotation in $info_cat and the final appending of
  $info_trap / $info_troop / $info_hero.

Pure behaviour-preserving extractions — no logic change.
Validated by deterministic A/B harness (infantry, evasion, conquest).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 17:28:54 +03:00
..
2026-06-09 15:15:27 +03:00
2026-05-15 08:17:14 +03:00
2026-05-15 08:17:14 +03:00
2026-05-07 08:24:40 +03:00
2026-05-18 09:26:19 +03:00
2026-05-28 12:25:28 +03:00
2026-05-18 11:12:15 +03:00
2026-05-15 08:17:14 +03:00
2026-05-25 10:23:39 +03:00
2026-05-15 08:17:14 +03:00
2026-06-09 15:15:27 +03:00
2026-05-15 08:17:14 +03:00
2026-05-15 08:17:14 +03:00
2026-05-21 13:12:21 +03:00