28 lines
598 B
Go
28 lines
598 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
/**
|
|
* 给予对象损伤一半,会回复自己的体力
|
|
*/
|
|
type Effect1 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 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
|
|
}
|