diff --git a/game/core/action_economy.gd b/game/core/action_economy.gd index 9912d707..a80b0455 100644 --- a/game/core/action_economy.gd +++ b/game/core/action_economy.gd @@ -164,4 +164,7 @@ func _finish_round(path_tag: String, continuation_hint: String) -> void: func _reject(source: String) -> void: - push_warning("[行动经济] 动作被拒(%s 相位守卫/资源)" % source if source == "phase" else "[行动经济] 资源不足拒绝") + if source == "phase": + push_warning("[行动经济] 动作被拒(%s 相位守卫/资源)" % source) + else: + push_warning("[行动经济] 资源不足拒绝") diff --git a/game/core/battle_orchestrator.gd b/game/core/battle_orchestrator.gd index 60ef62b6..2bce5d59 100644 --- a/game/core/battle_orchestrator.gd +++ b/game/core/battle_orchestrator.gd @@ -54,7 +54,7 @@ var _damage: DamageController # 伤害控制器(伤害管线单据化批 202 var encounter: Dictionary = {} var round_index := 0 -var battle_result := "" # "" / "victory" / "defeat" +var battle_result := "" # "" / "victory" / "defeat" / "fatal_error" var escrow := 0 # 战斗内 GP 缓冲(战斗域中间态——begin_battle 清零;gp_gain/gp_loss 兑付累记;随 gp_dropped 上抛即弃,不入钱包) var _facts_reveals: Array = [] @@ -802,7 +802,8 @@ func query_reward_identity(cell: Vector2i): # 诊断观测面(组合根诊断转储 / 行为探针消费):私有编排状态的成文只读出口—— # 消费方禁止再直读本类下划线字段(code-review 2026-09-12 封装收口批) -func diagnostic_snapshot() -> Dictionary: return { +func diagnostic_snapshot() -> Dictionary: + return { "battle_result": battle_result, "round": round_index, "settling": _settling, @@ -861,4 +862,5 @@ func _assert_row_source(type: String, source_class: String, origin_cell: Vector2 func _fatal(msg: String) -> void: push_error("[战斗结算/fatal] " + msg) + battle_result = "fatal_error" # release 构建剥离 assert 后的唯一阻断面——受理/结算/刷新入口全查 battle_result == "" assert(false, msg)