docs(attr): 守卫注释改引函数名而非会腐烂的行号;调试场景补注入顺序理由

Task 3 复审转来的两条 Minor。player_manager 守卫注释里的
「player_stats.gd:173/191」是行号引用,改动一次就失效,改为
_load_attr_definitions / add_modifier 两个函数名。
combat_test 的注入原先只有不变式没有理由,补上 remove→add→equip_wand
三者的先后依据(累积防护 + 守卫读的是注入结果)。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-31 12:55:08 +08:00
co-authored by Claude Opus 5
parent 1aeae19187
commit 9f71108719
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -15,6 +15,8 @@ func _ready() -> void:
# 装备法杯:wand_basic + spark_bolt
var loadout: Dictionary = WandPreset.make_default_loadout()
# 本场景绕过 CombatManager,故须自行注入法杖运算力份额(否则 cpu_limit=0 → MAX_OPS 退化)
# 顺序理由见 combat_manager._rebuild_wandremove 必须先于 add(否则重复进入会累积),
# 而两者又必须都先于 equip_wandequip_wand 里的 cpu_limit<=0 守卫读的就是注入结果)
PlayerStats.remove_modifiers_from("core")
PlayerStats.add_modifier("cpu_limit", "flat", float(loadout["core"].cpu_limit), "core")
PlayerManager.equip_wand(loadout["core"], loadout["compiled"])