feat(mana): 魔力虹吸多来源(Core base + 卡组 meta.mana_leech 求和,换杖重算)

This commit is contained in:
2026-07-21 15:16:37 +08:00
parent 6b60f6e073
commit b55e6eaadf
3 changed files with 7 additions and 0 deletions
+5
View File
@@ -256,6 +256,11 @@ func _rebuild_wand() -> void:
continue
nodes.append(SpellRegistry.get_spell(sid)) # 纯数据驱动;未知 id → null(下游按位置跳过)
_equipped_compiled = SpellEvaluator.compile_wand(_equipped_core, nodes)
var leech: float = _equipped_core.base_mana_leech if _equipped_core else 0.0
for n in nodes:
if n != null:
leech += float(n.meta.get("mana_leech", 0.0))
PlayerStats.mana_leech = leech
# ── 法杖存档(ProfileManager A/B 槽,ADR-A2)─────────────────
func get_wand_save_data() -> Dictionary:
@@ -30,3 +30,4 @@ var topology: int = Topology.LINEAR
## 魔力池(MVP)——由 WandPreset 从 cores.json 读入
@export var base_mana_max: float = 100.0
@export var base_mana_regen: float = 5.0 # 每秒回复
@export var base_mana_leech: float = 0.0 # 击杀回蓝基础值(可叠加卡组内 meta.mana_leech