fix(mana): heat 依真实扣蓝(ctx标记)覆盖 LOOP/CIRCUIT 子路径+卖血不升热;死亡防重入
复审 nit: - heat 之前仅在主循环 cast_fired 记录,LOOP 体/CIRCUIT 分支扣蓝漏记 → 递增蓝耗对这两类拓扑失效。 改为 _charge_mana 真实 spend_mana 成功时置 ctx.mana_spent_this_cast,施法末据此升 heat。 - 顺带修正 infinite 卖血(未真实扣蓝)也升 heat 的问题:卖血不升热。 - combat_manager._on_player_died 加 GAME_OVER 防重入(子弹命中+卖血同帧双死不重复结算)。 MCP 实测:LOOP heat 0.010(修复前0)、卖血 heat 0、线性回归 0.010。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -228,6 +228,8 @@ func close_shop_and_next_wave() -> void:
|
||||
_transition_to_battle(next_wave)
|
||||
|
||||
func _on_player_died(_payload: Dictionary) -> void:
|
||||
if state == GameState.GAME_OVER:
|
||||
return # 防重入:同帧内多路死亡(子弹命中 + 卖血施法)不重复结算战绩/发以太
|
||||
state = GameState.GAME_OVER
|
||||
# 先采集本局战绩(reset 前),写入排行榜
|
||||
var wave_reached: int = max(1, WaveManager.current_wave)
|
||||
|
||||
Reference in New Issue
Block a user