fix(attr): 修复调试场景因 cpu_limit 基准改为 0 而退化;记录 cast_delay_mod 快照时序
combat_test 绕过 CombatManager 直接 equip_wand,拿不到 _rebuild_wand 注入的 "core" 份额,导致 cpu_limit=0 触发守卫报错、MAX_OPS 由 200 退化为 40。 镜像 _rebuild_wand 的做法在该场景自行注入(先 remove 再 add),仅修本次弄坏 的部分;该场景整体绕过 CombatManager(如从不设 mana_leech)属既有分歧,不在 本次范围内。 _cast_interval 仅在 equip_wand 时快照,install_spell 只调 _rebuild_wand 不调 equip_wand,实际再同步点是每波开战的 _transition_to_battle。行为不改,加注释 记下时序,免得后续属性商店的实现者误以为购买即时生效。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,9 @@ func _ready() -> void:
|
||||
PlayerManager.set_player_node(_player_node)
|
||||
# 装备法杯:wand_basic + spark_bolt
|
||||
var loadout: Dictionary = WandPreset.make_default_loadout()
|
||||
# 本场景绕过 CombatManager,故须自行注入法杖运算力份额(否则 cpu_limit=0 → MAX_OPS 退化)
|
||||
PlayerStats.remove_modifiers_from("core")
|
||||
PlayerStats.add_modifier("cpu_limit", "flat", float(loadout["core"].cpu_limit), "core")
|
||||
PlayerManager.equip_wand(loadout["core"], loadout["compiled"])
|
||||
_run_spawn()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user