Files
spellforge/scripts/domain/spell_system/spell_node.gd
T
2026-07-20 10:56:52 +08:00

28 lines
1.0 KiB
GDScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## SpellNode — 法术节点 Resource(可加载 .tres
## 权威来源:architecture_design.md §3.2
extends Resource
class_name SpellNode
## 法术节点类型枚举
## 使用方式:SpellNode.SpellType.ACTION
enum SpellType {
ACTION = 0, # 发射弹道
MODIFIER = 1, # 修改 CastStatsS3 实现)
TRIGGER = 2, # 命中触发 SubPayloadS3 实现)
LOGIC = 3, # 条件指令(S5 实现)
SCOPE_CLOSE = 4, # 虚拟节点:SCOPE 边界标记(预编译时注入)
}
## 全局唤一法术 ID(格式建议: category_name
@export var id: String = ""
@export var type: int = SpellType.ACTION
@export var display_name: String = ""
@export var description: String = ""
## 法术类型相关参数(不同类型内容不同)
@export var meta: Dictionary = {}
## 元素亲和标签(供共鸣系统 §3.4.C 模式匹配,如 ["tag:water"]、["tag:lightning"]
@export var element_tags: Array = []
func _to_string() -> String:
return "SpellNode(%s, type=%d)" % [id, type]