2025-11-13 23:06:55 +08:00
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"blazing/logic/service/fight/input"
|
|
|
|
|
"blazing/logic/service/fight/node"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// 自身体力小于1/n时威力为m倍
|
|
|
|
|
type Effect37 struct {
|
|
|
|
|
node.EffectNode
|
|
|
|
|
can bool
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-04 22:10:34 +08:00
|
|
|
func (e *Effect37) SkillHit() bool {
|
2025-11-14 03:21:00 +08:00
|
|
|
|
2025-12-06 15:11:42 +08:00
|
|
|
cmphp := e.GetInput().CurrentPet.GetMaxHP().Div(e.Args()[0])
|
2025-11-13 23:06:55 +08:00
|
|
|
if e.GetInput().CurrentPet.GetHP().Cmp(cmphp) == -1 {
|
2025-12-06 15:11:42 +08:00
|
|
|
e.Ctx().SkillEntity.Power *= int(e.Args()[1].IntPart())
|
2025-11-13 23:06:55 +08:00
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ---- 注册所有效果 ----
|
|
|
|
|
func init() {
|
|
|
|
|
input.InitEffect(input.EffectType.Skill, 37, &Effect37{})
|
|
|
|
|
}
|