add 脱战血量低就地吃面包

This commit is contained in:
王鹏
2026-03-25 10:51:25 +08:00
parent 9b4a9d5ab8
commit 9ab1e8737c
7 changed files with 174 additions and 2 deletions

View File

@@ -56,11 +56,16 @@ class CoordinatePatrol:
已上马返回 True。
未上马则松开移动键、按住上马键 MOUNT_HOLD_SEC本帧不走路返回 False。
state 无 mounted 字段时视为无法判断,不拦巡逻(兼容未开 LogicBeacon
尸体/灵魂不按上马键,但返回 True 以便寻路继续(跑尸时 navigate_to_point 依赖此项)。
"""
if "mounted" not in state:
return True
if state.get("mounted"):
return True
# game_state.death_state: 0 存活 / 1 尸体 / 2 灵魂 — 幽灵无法/不需上马,不得拦走路
ds = state.get("death_state")
if ds in (1, 2):
return True
self.stop_all()
now = time.time()
if now < self._next_mount_allowed: