2025-11-08 16:38:41 +08:00
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"blazing/logic/service/fight/action"
|
|
|
|
|
"blazing/logic/service/fight/input"
|
|
|
|
|
"blazing/logic/service/fight/node"
|
|
|
|
|
|
2025-12-05 00:24:02 +08:00
|
|
|
"github.com/alpacahq/alpacadecimal"
|
2025-11-08 16:38:41 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 恢复自身最大体力的1/n
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
func init() {
|
2025-11-13 23:06:55 +08:00
|
|
|
input.InitEffect(input.EffectType.Skill, 43, &Effect43{})
|
2025-11-08 16:38:41 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Effect43 struct {
|
|
|
|
|
node.EffectNode
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-11 05:54:24 +00:00
|
|
|
func (e *Effect43) OnSkill() bool {
|
2026-01-04 21:41:10 +08:00
|
|
|
|
2025-12-05 00:24:02 +08:00
|
|
|
tt := alpacadecimal.NewFromInt(int64(e.Ctx().Our.CurrentPet.Info.MaxHp)).Div(alpacadecimal.NewFromInt(int64(e.SideEffectArgs[0])))
|
2025-11-13 02:43:00 +08:00
|
|
|
//fmt.Println("恢复自身最大体量的1/n", tt.IntPart())
|
|
|
|
|
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, tt)
|
2025-11-08 16:38:41 +08:00
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
}
|