mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-02 02:24:21 +00:00
76aa781ee6
Move the ram-damage handling out of sendunitsComplete() into a dedicated private method applyRamDamage(). For a normal attack (type 3) with rams, it computes the new wall level, updates it in the database (recounting the village population when the wall is destroyed), builds the report fragment, and recalculates the battle when the wall level changed. Pure behaviour-preserving extraction: the battle-recalc context is passed in a single $ctx array; the call site keeps the t7 guard and assigns the returned battlepart / info_ram, so all downstream usages remain unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>