Files
bl/logic/service/fight/node/skill.go

61 lines
1.2 KiB
Go
Raw Normal View History

2025-09-29 02:40:35 +08:00
package node
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
)
2025-11-11 05:54:24 +00:00
func (e *EffectNode) Skill_Pre() bool {
2025-09-30 18:32:15 +08:00
return true
2025-09-29 02:40:35 +08:00
}
// func (e *EffectNode) Calculate_Pre() bool {
// return true
// }
2025-09-29 02:40:35 +08:00
2025-11-11 05:54:24 +00:00
func (e *EffectNode) Skill_Hit() bool {
return true
}
2025-11-11 05:54:24 +00:00
func (e *EffectNode) Skill_Hit_ex() bool {
return true
}
2025-11-11 05:54:24 +00:00
func (e *EffectNode) OnSkill() bool {
// if e.Effect != nil {
// if e.Hit() { //没命中
// e.Effect.OnHit(ctx.Input, ctx.SkillEntity)
// } else {
// e.Effect.OnMiss(ctx.Input, ctx.SkillEntity)
// }
// }
2025-09-30 18:32:15 +08:00
return true
2025-09-29 02:40:35 +08:00
}
2025-11-11 05:54:24 +00:00
func (e *EffectNode) Skill_Can() bool {
2025-09-29 02:40:35 +08:00
return e.Input.CurrentPet.HP != 0
}
2025-11-11 05:54:24 +00:00
func (e *EffectNode) Skill_Use_ex() bool {
2025-09-29 02:40:35 +08:00
return true
}
2025-11-11 05:54:24 +00:00
func (e *EffectNode) Skill_Useed() bool {
// if e.Effect != nil {
// if e.Input.CurrentPet.Info.Hp == 0 {
// e.OnDefeat(ctx.Input, ctx.SkillEntity) //死亡
2025-09-29 02:40:35 +08:00
// } else {
// e.OnAlive(ctx.Input, ctx.SkillEntity) //存活
// }
2025-09-29 02:40:35 +08:00
// }
// return true
2025-09-29 02:40:35 +08:00
return true
}
type Effect interface {
OnMiss(opp *input.Input, skill *info.SkillEntity)
OnHit(opp *input.Input, skill *info.SkillEntity)
OnDefeat(opp *input.Input, skill *info.SkillEntity) bool //如果需要死亡
OnAlive(opp *input.Input, skill *info.SkillEntity) bool //如果需要存活
}