Add sentry pacing to opening battle

This commit is contained in:
2026-06-20 07:06:47 +09:00
parent 345ed20e4a
commit c26b052c90
7 changed files with 277 additions and 12 deletions

View File

@@ -63,6 +63,18 @@ func hydrate_deployment(deployment: Dictionary) -> Dictionary:
unit["ai_guard_radius"] = int(deployment.get("ai_guard_radius", 0))
elif unit["ai_behavior"] == "guard":
unit["ai_guard_radius"] = 2
if deployment.has("ai_sentry_anchor"):
unit["ai_sentry_anchor"] = deployment["ai_sentry_anchor"]
elif unit["ai_behavior"] == "sentry":
unit["ai_sentry_anchor"] = deployment.get("pos", [0, 0])
if deployment.has("ai_sentry_radius"):
unit["ai_sentry_radius"] = int(deployment.get("ai_sentry_radius", 0))
elif unit["ai_behavior"] == "sentry":
unit["ai_sentry_radius"] = 4
if deployment.has("ai_sentry_activation_turn"):
unit["ai_sentry_activation_turn"] = int(deployment.get("ai_sentry_activation_turn", 0))
if deployment.has("ai_awake"):
unit["ai_awake"] = bool(deployment.get("ai_awake", false))
unit["level"] = int(deployment.get("level", officer.get("level", 1)))
unit["exp"] = int(deployment.get("exp", officer.get("exp", 0)))
unit["max_hp"] = int(stats.get("hp", stats.get("max_hp", 1)))