Files
bl/logic/service/fight/effect/effect_87.go
昔念 79ca4ace98 ```
feat(fight): 调整技能PP恢复逻辑与CD处理方式

- 修改 HealPP 方法,当传入值为 -1 时直接恢复至最大 PP 值
- 将 Move 结构体中的 CD 字段由 int 改为 *int,以支持可空值
- 在战斗回合解析中增加对 CD 指针的判空处理,避免空指针 panic
- 移除 effect_87.go 中未使用的 math 包引入
- 添加 SideEffect 和相关字段到 skill
2025-11-15 16:27:59 +08:00

29 lines
365 B
Go

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
/**
* 恢复自身所有PP值
*/
func init() {
input.InitEffect(input.EffectType.Skill, 87, &Effect87{})
}
type Effect87 struct {
node.EffectNode
}
func (e *Effect87) OnSkill() bool {
if !e.Hit() {
return true
}
e.Ctx().Our.HealPP(-1)
return true
}