Files
bl/logic/service/fight/effect/effect_136.go
昔念 6afae2c704 fix(fight): 调整技能命中逻辑与效果触发时机
移除冗余的 Calculate_Pre 调用注释,优化技能命中判断流程。
将 SkillID 赋值操作移动至命中条件判断内部,确保仅在技能命中时记录。
注释掉部分不再使用的接口方法定义,保持代码整洁。
2025-11-14 04:23:50 +08:00

34 lines
594 B
Go

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/shopspring/decimal"
)
/**
* 若Miss则自己恢复1/n体力
*/
type Effect136 struct {
node.EffectNode
}
func init() {
ret := &Effect136{}
input.InitEffect(input.EffectType.Skill, 136, ret)
}
// 命中之后
func (e *Effect136) OnSkill() bool {
if !e.Hit() {
heal := e.Ctx().Our.CurrentPet.GetMaxHP().Div(decimal.NewFromInt(int64(e.Args()[0])))
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, heal)
}
return true
}