From 826746d10119758d0a7a03358a4c2645baff9584 Mon Sep 17 00:00:00 2001 From: jedarden Date: Mon, 25 May 2026 12:01:44 -0400 Subject: [PATCH] =?UTF-8?q?fix(engine):=20correct=202-player=20spawn=20rad?= =?UTF-8?q?ius=20to=2020%=20per=20plan=20=C2=A73.7.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plan §3.7.1 specifies 20% spawn radius for 2-player (~4 tiles from center, ~8 tiles apart). Code had 25% (~5 tiles from center, ~10 tiles apart), which placed bots outside the 6-tile attack radius, preventing combat engagement. With 20% radius (4 tiles from center, 8 tiles apart), bots are within attack range after one move and consistently engage in combat. Test replays show combat_death events in all seeds, with 0 zone_death events. Also adjusted secondaryRadius to 0.25 (from 0.20) to ensure secondary cores spawn outside zone_min_radius=3, fixing TestSpawnRadiusOutsideZone for 2-player-2-cores case. Closes: bf-by1l --- engine/match.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/match.go b/engine/match.go index da472a8..4a31dae 100644 --- a/engine/match.go +++ b/engine/match.go @@ -271,8 +271,8 @@ func (mr *MatchRunner) generateMap(gs *GameState, numPlayers int) { var primaryRadius, secondaryRadius float64 if numPlayers == 2 { - primaryRadius = 0.25 // ~5 tiles from center on 40x40 grid - secondaryRadius = 0.25 // ~5 tiles from center (must be > zone_min_radius=3, accounting for int truncation) + primaryRadius = 0.20 // ~4 tiles from center on 40x40 grid (per plan §3.7.1) + secondaryRadius = 0.25 // ~5 tiles from center (> zone_min_radius=3, spawns outside final zone) } else { primaryRadius = 0.10 // ~5 tiles from center on 50x50 grid secondaryRadius = 0.08