refactor(fight): 重构战斗系统效果处理逻辑
- 移除 Effect0 基类效果 - 调整 Input 结构,删除未使用的属性 - 优化 Effect 接口,增加 GetMaxStack 方法 - 重构效果初始化逻辑,支持不同类型效果的初始化 - 优化效果的添加和移除操作 - 调整宠物效果信息结构,合并参数
This commit is contained in:
@@ -16,7 +16,7 @@ type EffectNode struct {
|
||||
Input *input.Input
|
||||
stacks int // 当前层数
|
||||
ArgSize int
|
||||
maxStack int // 最大叠加层数 ,正常都是不允许叠加的,除了衰弱特殊效果 ,异常和能力的叠层
|
||||
MaxStack int // 最大叠加层数 ,正常都是不允许叠加的,除了衰弱特殊效果 ,异常和能力的叠层
|
||||
SideEffectArgs []int // 附加效果参数
|
||||
Owner bool //是否作用自身
|
||||
Success bool // 是否执行成功 成功XXX,失败XXX
|
||||
@@ -59,9 +59,9 @@ func (this *EffectNode) Stack(t int) int {
|
||||
return this.stacks
|
||||
|
||||
}
|
||||
func (this *EffectNode) MaxStack() int {
|
||||
func (this *EffectNode) GetMaxStack() int {
|
||||
|
||||
return this.maxStack
|
||||
return this.MaxStack
|
||||
|
||||
}
|
||||
func (this *EffectNode) Duration(t int) int {
|
||||
|
||||
Reference in New Issue
Block a user