mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
a2f5cfdbac
The attacking army was built by two near-identical inline blocks (village and oasis targets). Extract them into a single private method buildAttackerUnits() that returns the Attacker unit array (u<start..end> + uhero) together with the catapult / ram / chief / scout unit ids used in the report. The oasis target keeps its Nature siege/chief slots (37/38/39) via the $isoasis flag. Pure behaviour-preserving extraction: both call sites now assign the returned bundle, so all downstream usages remain unchanged. The unit-id picks are initialised to null (they are always set for the real attacker tribes 1/2/3/5; only the unreachable Nature-attacker case differs, which silences a latent PHP 8.3 undefined-variable notice). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>