refactor(fight): 重构战斗模块代码

- 优化了 FightC 结构体,将 Info 字段改为指针类型
- 添加了 EffectNode 类型的 Type 方法,用于获取效果类型
- 修改了 BattlePetEntity 中的 Attribute 结构,移除了未使用的枚举类型
- 删除了 info.go 文件中未使用的结构体定义
- 在 effect_1.go 中更新了 Effect1 类的 PostDamage 方法,待重写实现
This commit is contained in:
2025-09-04 02:11:55 +08:00
parent adfe5f17e7
commit 8e690dacd4
7 changed files with 14 additions and 20 deletions

View File

@@ -28,6 +28,7 @@ func (this *Effect1) ID() int {
func (this *Effect1) PostDamage() bool {
off := this.GetSkill().DamageValue.Div(decimal.NewFromInt(2)) //伤害的一半
this.GetOwnerPet().Hp += uint32(off.IntPart()) //这里是effect在对方挂载,故回血给自己回血
this.GetOwnerPet().HP += int(off.IntPart()) //这里是effect在对方挂载,故回血给自己回血
//待重写实现
return true
}