Files
bl/logic/service/fight/effect/effect_1.go
昔念 9d87ce9e46 refactor(fight): 重构战斗系统
- 移除 NodeManager 相关代码,改为使用 input 包中的 Effect
- 重构 FightC 结构,添加 GetRand 方法
- 新增 BaseAction 结构和 NewBaseAction 函数
- 更新 effect 包中的 Effect 结构和相关方法
- 调整 BattleSkillEntity 中的 AttackTime 方法,增加 Hit 字段
- 更新 AttackValue 结构,保留原有的 AttackTime 字段
- 重构战斗逻辑,包括回合开始前的处理、技能使用、伤害计算等
2025-09-14 03:36:26 +08:00

28 lines
574 B
Go

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
/**
* 给予对象损伤一半,会回复自己的体力
*/
type Effect1 struct {
node.EffectNode
}
func init() {
input.InitEffect(1, &Effect1{})
}
// 重写POST_DAMAGE ,伤害结束后触发回血
func (this *Effect1) PostDamage() bool {
// off := this.GetSkill().DamageValue.Div(decimal.NewFromInt(2)) //伤害的一半
//this.GetOwnerPet().HP += int(off.IntPart()) //这里是effect在对方挂载,故回血给自己回血
//待重写实现
return true
}