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

42 lines
739 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/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/shopspring/decimal"
)
/**
* 若造成的伤害低于n则所有技能的PP值提高m点
*/
func init() {
input.InitEffect(input.EffectType.Skill, 134, &Effect134{})
}
type Effect134 struct {
node.EffectNode
}
func (e *Effect134) Damage_Floor(t *info.DamageZone) bool {
if !e.Hit() {
return true
}
// fmt.Println("Effect134_old", t.Damage.IntPart())
if t.Type == info.DamageType.Red {
is := t.Damage.Cmp(decimal.NewFromInt(int64(e.Args()[0])))
if is == -1 {
e.Ctx().Our.HealPP(e.Args()[1])
}
}
//fmt.Println("Effect134_new", t.Damage.IntPart())
return true
}