feat(fight): 重构战斗效果触发机制与ID管理
- 统一将 Skill_Hit_Pre 和 Skill_Hit_Pre_ex 方法重命名为 Action_start 和 Action_start_ex - 新增 Action_end 和 Action_end_ex 接口方法,完善行动周期控制 - 修改效果ID生成逻辑,使用 EffectIDCombiner 替代简单整数运算,提升扩展性 - 调整状态类效果判断方式,通过前缀匹配识别状态类型 - 增加随机持续时间和参数设置功能,增强部分效果的表现力 - 优化战斗流程中效果执行时机,确保行为前后逻辑完整闭环
This commit is contained in:
@@ -13,7 +13,7 @@ type EffectNode struct {
|
||||
|
||||
Input *input.Input
|
||||
stacks int // 当前层数
|
||||
id int
|
||||
id int64
|
||||
canStack bool // 最大叠加层数 ,正常都是不允许叠加的,除了衰弱特殊效果 ,异常和能力的叠层
|
||||
SideEffectArgs []int // 附加效果参数
|
||||
// owner bool //是否作用自身
|
||||
@@ -53,7 +53,7 @@ func (e *EffectNode) Stack(t ...int) int {
|
||||
return e.stacks
|
||||
|
||||
}
|
||||
func (e *EffectNode) ID(t ...int) int {
|
||||
func (e *EffectNode) ID(t ...int64) int64 {
|
||||
if len(t) > 0 {
|
||||
e.id = t[0]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user