feat(mana): 游戏设计器支持 mana 字段(补 Mana MVP 配套)

- Core 编辑器加「蓝上限/回蓝」两栏(_on_select 读 / _on_apply 写 / _on_new 默认),
  修复此前编辑 Core 保存会静默丢失 mana_max/mana_regen 的数据丢失洞
- 法术编辑器 4 个 meta 模板加 mana_cost,新法术默认有合理蓝耗
- handbook 07 补 Core 蓝池字段 + 法术 mana_cost 说明

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-21 10:31:01 +08:00
co-authored by Claude Opus 4.8
parent 022017e551
commit 7bc13a7be6
3 changed files with 17 additions and 6 deletions
+9 -1
View File
@@ -16,6 +16,8 @@ var _slots: SpinBox
var _topo: OptionButton
var _cpu: SpinBox
var _interval: SpinBox
var _mana_max: SpinBox
var _mana_regen: SpinBox
var _feat: OptionButton
var _rows: SpinBox
var _cols: SpinBox
@@ -39,6 +41,8 @@ func _ready() -> void:
_topo = _row("拓扑", UI.opt(TOPO, 0))
_cpu = _row("CPU 上限", UI.spin(1, 40, 1, 5))
_interval = _row("施法间隔(s)", UI.spin(0.05, 5, 0.05, 0.5))
_mana_max = _row("蓝上限(Mana Max)", UI.spin(0, 1000, 5, 100))
_mana_regen = _row("回蓝/秒(Mana Regen)", UI.spin(0, 100, 0.5, 5))
_feat = _row("特性", UI.opt(FEAT, 0))
_rows = _row("矩阵行(MATRIX)", UI.spin(1, 8, 1, 1))
_cols = _row("矩阵列(MATRIX)", UI.spin(1, 16, 1, 5))
@@ -81,6 +85,8 @@ func _on_select(idx: int) -> void:
_topo.selected = int(d.get("topology", 0))
_cpu.value = float(d.get("cpu_limit", 5))
_interval.value = float(d.get("cast_interval", 0.5))
_mana_max.value = float(d.get("mana_max", 100))
_mana_regen.value = float(d.get("mana_regen", 5))
_feat.selected = int(d.get("feature_tags", 0))
_rows.value = float(d.get("grid_rows", 1))
_cols.value = float(d.get("grid_cols", 5))
@@ -99,6 +105,7 @@ func _on_apply() -> void:
"display_name": _name.text, "slot_count": int(_slots.value),
"topology": _topo.selected, "cpu_limit": int(_cpu.value),
"cast_interval": _interval.value, "feature_tags": _feat.selected,
"mana_max": int(_mana_max.value), "mana_regen": _mana_regen.value,
"grid_rows": int(_rows.value), "grid_cols": int(_cols.value), "edges": edges,
}
_cur = cid
@@ -110,7 +117,8 @@ func _on_new() -> void:
var i := 1
while _data.has(cid): cid = "new_core_%d" % i; i += 1
_data[cid] = {"display_name": cid, "slot_count": 5, "topology": 0,
"cpu_limit": 5, "cast_interval": 0.5, "feature_tags": 0, "edges": []}
"cpu_limit": 5, "cast_interval": 0.5, "feature_tags": 0,
"mana_max": 100, "mana_regen": 5, "edges": []}
_refresh()
func _on_delete() -> void: