Files
TravianZ/GameEngine
Ferywir 12badfa84b fix(troops): apply Tournament Square bonus only beyond the threshold [#304] (#317)
procDistanceTime() multiplied the whole travel distance by the Tournament
Square speed factor as soon as the distance reached TS_THRESHOLD. That
made the trip time jump down at the threshold, so a target just past it
arrived dramatically sooner than a nearer one (e.g. a village 41 tiles
away raided faster than one 18 tiles away).

In T3.6 the Tournament Square only speeds up the part of the journey
beyond the threshold: the first TS_THRESHOLD tiles are walked at base
speed and the remainder at the boosted speed. Split the computation
accordingly so travel time stays monotonic with distance while still
rewarding a high-level square.

This is a long-standing bug, unrelated to the Generator refactor (which
only reformatted the same whole-distance multiplication). The same fix is
applied to the duplicate procDistanceTime() in Admin/database.php used by
the admin troop-return helper.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 09:01:16 +03:00
..
2026-06-29 08:02:09 +03:00
2026-05-15 08:17:14 +03:00
2026-06-29 08:02:09 +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-06-29 07:49:49 +03:00
2026-05-15 08:17:14 +03:00
2026-06-30 08:24:37 +03:00
2026-06-29 08:02:09 +03:00
2026-06-29 08:02:09 +03:00