mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
33da9fdad5
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>