Files
TravianZ/GameEngine
Ferywir 596f007139 Refactor(Units): extract resolveCatapultTargets() from sendTroops() [#219] (#284)
sendTroops() inlined ~65 lines deciding the catapult targets ctar1/ctar2: the
"Rivals great confusion" artefact lookup, the rally-point-level-driven list of
invalid target buildings, the troop/level eligibility rules and the Teuton
Brewery / artefact adjustments. Move that whole block into
resolveCatapultTargets(&$post, $data), which mutates $post['ctar1']/['ctar2'] by
reference exactly as before; sendTroops() now calls it before building the
attack. None of the block's locals were used afterwards. Behaviour-preserving.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 13:44:42 +03:00
..
2026-05-15 08:17:14 +03:00
2026-06-22 10:41:25 +03:00
2026-05-07 08:24:40 +03:00
2026-05-28 12:25:28 +03:00
2026-05-15 08:17:14 +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