Files
bl/logic/service/fight/effect/407.go
昔念 1fa1ae848d
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
```
feat(fight): 实现技能PP消耗Hook机制并优化效果处理

- 在Effect475中添加子效果时通过Ctx().Our.AddEffect正确添加效果
- 删除已废弃的Effect407、Effect440和Effect412效果类型
- 在fightc.go中实现技能使用后的PP消耗Hook机制,支持效果修改PP消耗数量
- 添加HookPP接口方法用于处理技能使用的PP消耗逻辑
- 在SkillInfo中添加Use方法用于实际消耗PP值
```
2026-03-09 23:44:09 +08:00

43 lines
990 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 407 - 下回合起每回合XX等级+n持续m回合
type Effect407 struct {
node.EffectNode
}
func (e *Effect407) Skill_Use() bool {
// 创建一个延迟生效的效果,在下一回合开始生效
effectType := int8(e.Args()[0].IntPart()) // XX类型
effectValue := int8(e.Args()[1].IntPart()) // 等级+n
duration := int(e.Args()[2].IntPart()) // 持续m回合
e.GenSub(&Effect407_sub{
effectType: effectType,
effectValue: effectValue,
}, duration)
return true
}
type Effect407_sub struct {
node.EffectNode
effectType int8
effectValue int8
}
func (e *Effect407_sub) ActionStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
e.Ctx().Our.SetProp(e.Ctx().Our, e.effectType, e.effectValue)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 138, &Effect407{})
}