2025-08-26 18:02:32 +00:00
|
|
|
|
package effect
|
|
|
|
|
|
|
2025-08-26 23:18:55 +00:00
|
|
|
|
import (
|
2025-09-24 18:53:54 +00:00
|
|
|
|
"blazing/logic/service/fight/info"
|
2025-09-14 03:36:26 +08:00
|
|
|
|
"blazing/logic/service/fight/input"
|
2025-09-14 01:35:16 +08:00
|
|
|
|
"blazing/logic/service/fight/node"
|
2025-08-26 23:18:55 +00:00
|
|
|
|
)
|
2025-08-26 18:02:32 +00:00
|
|
|
|
|
2025-08-26 22:26:21 +00:00
|
|
|
|
/**
|
|
|
|
|
|
* 给予对象损伤一半,会回复自己的体力
|
|
|
|
|
|
*/
|
2025-08-26 18:02:32 +00:00
|
|
|
|
type Effect1 struct {
|
2025-08-26 22:26:21 +00:00
|
|
|
|
node.EffectNode
|
2025-08-26 18:02:32 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func init() {
|
2025-09-24 16:36:32 +00:00
|
|
|
|
input.InitEffect(input.EffectType.Skill, 1, &Effect1{})
|
2025-08-26 20:01:20 +00:00
|
|
|
|
|
|
|
|
|
|
}
|
2025-09-24 18:53:54 +00:00
|
|
|
|
func (e *Effect1) OnHit(opp *input.Input, skill *info.SkillEntity) {
|
|
|
|
|
|
t := e.Input.GetEffect(input.EffectType.Damage, 0).Stack()
|
|
|
|
|
|
e.Input.CurrentPet.Info.Hp += uint32(t / 2)
|
2025-08-26 22:26:21 +00:00
|
|
|
|
|
|
|
|
|
|
}
|