fix(combat): summon spawns only on passable cells

This commit is contained in:
2026-09-04 22:56:05 +02:00
parent f4fc66a6ab
commit c5f31c30d1
2 changed files with 70 additions and 2 deletions
+1 -2
View File
@@ -2040,8 +2040,7 @@ class CombatEngine:
if dr == 0 and dc == 0:
continue
pos = (center[0] + dr, center[1] + dc)
if (0 <= pos[0] < self._grid.height and
0 <= pos[1] < self._grid.width and
if (self._grid.passable(pos) and
not any(s.pos == pos for s in self._states if s.active)):
spawn_pos = pos
break