refactor(fight): 重构战斗模块代码
- 优化了 FightC 结构体,将 Info 字段改为指针类型 - 添加了 EffectNode 类型的 Type 方法,用于获取效果类型 - 修改了 BattlePetEntity 中的 Attribute 结构,移除了未使用的枚举类型 - 删除了 info.go 文件中未使用的结构体定义 - 在 effect_1.go 中更新了 Effect1 类的 PostDamage 方法,待重写实现
This commit is contained in:
@@ -19,6 +19,7 @@ type EffectNode struct {
|
||||
SideEffectArgs []int // 附加效果参数
|
||||
|
||||
Success bool // 是否执行成功 成功XXX,失败XXX
|
||||
efftype int // 传出作用对象,默认0是自身,1是作用于对面
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +27,13 @@ func (this *EffectNode) ID() int {
|
||||
|
||||
return 0
|
||||
|
||||
}
|
||||
|
||||
// 传出作用对象,默认0是自身,1是作用于对面
|
||||
func (this *EffectNode) Type() int {
|
||||
|
||||
return this.efftype
|
||||
|
||||
}
|
||||
func (this *EffectNode) Stack(t int) int {
|
||||
if t != 0 {
|
||||
|
||||
Reference in New Issue
Block a user