Files
bl/logic/service/fight/effect/effect_37.go

27 lines
534 B
Go
Raw Normal View History

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 自身体力小于1/n时威力为m倍
type Effect37 struct {
node.EffectNode
can bool
}
func (e *Effect37) SkillHit() bool {
cmphp := e.GetInput().CurrentPet.GetMaxHP().Div(e.Args()[0])
if e.GetInput().CurrentPet.GetHP().Cmp(cmphp) == -1 {
e.Ctx().SkillEntity.Power *= int(e.Args()[1].IntPart())
}
return true
}
// ---- 注册所有效果 ----
func init() {
input.InitEffect(input.EffectType.Skill, 37, &Effect37{})
}