Files
spellforge/scripts/domain/spell_system/cast_stats.gd
T

28 lines
1.2 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.
## CastStats — 单次施法的可修改弹道参数负载
## 由 MODIFIER 节点在执行间修改;每次 execute_compiled 开始时从 SpellContext 隶新
extends RefCounted
class_name CastStats
var damage_add: float = 0.0 # 加法伤害加成
var damage_mult: float = 1.0 # 乘法伤害倍率
var spread_count: int = 1 # 单 ACTION 同时发射数量(扩散)
var multicast_count: int = 0 # S3:额外可执行的 ACTION 数(0=仅执行1个)
var lifetime: float = 0.0 # 对默认 lifetime 的差値(<0 缩短)
var speed_mult: float = 1.0 # 弹速倍率
var radius_mult: float = 1.0 # 弹体半径倍率
var crit_chance: float = 0.0 # 暴击概率
var pierce_add: int = 0 # MODIFIER 累加的穿透次数(叠加到 ACTION 自带 pierce
var bounce_add: int = 0 # MODIFIER 累加的弹跳次数(叠加到 ACTION 自带 bounce
func reset() -> void:
damage_add = 0.0
damage_mult = 1.0
spread_count = 1
multicast_count = 0
lifetime = 0.0
speed_mult = 1.0
radius_mult = 1.0
crit_chance = 0.0
pierce_add = 0
bounce_add = 0