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

49 lines
968 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package node
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
)
func (e *EffectNode) OnSkillPP() bool {
return true
}
// 使用技能前
func (e *EffectNode) CanSkill(opp *input.Input) bool {
return e.Input.CurrentPet.HP != 0
}
// 命中前 攻击伤害结算
func (e *EffectNode) PreSkill(opp *input.Input, skill *info.SkillEntity) {
}
func (e *EffectNode) PreAttacked(*input.Input, *info.SkillEntity) {
}
func (e *EffectNode) BeforeSkill(opp *input.Input, skill *info.SkillEntity) {
}
// 使用技能时不可被继承继承Miss和Hit就行
func (e *EffectNode) OnSkill(opp *input.Input, skill *info.SkillEntity) {
if e.Hit() { //没命中
e.OnHit(opp, skill)
} else {
e.OnMiss(opp, skill)
}
}
// miss
func (e *EffectNode) OnMiss(opp *input.Input, skill *info.SkillEntity) {
}
type Effect interface {
OnMiss(opp *input.Input, skill *info.SkillEntity)
OnHit(opp *input.Input, skill *info.SkillEntity)
}