41
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-03-07 23:54:01 +08:00
parent 54a4876beb
commit d367f9d1d4
26 changed files with 3761 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 509 - 恢复当前受损体力值1/m的体力
type Effect509 struct {
node.EffectNode
}
func (e *Effect509) OnSkill() bool {
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
currentHp := e.Ctx().Our.CurrentPet.GetHP()
lostHp := maxHp.Sub(currentHp)
healAmount := lostHp.Div(e.Args()[0]) // 受损体力值的1/m
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, healAmount)
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 509, &Effect509{})
}