Files
bl/logic/service/fight/effect/518.go
xinian 6c75b106b3
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 重构战斗效果实现
2026-03-08 15:26:07 +08:00

34 lines
792 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/input"
"blazing/logic/service/fight/node"
)
// 518 - 若伤害高于m则自身XX等级+n
type Effect518 struct {
node.EffectNode
}
func (e *Effect518) SkillHit_ex() bool {
damageThreshold := int(e.Args()[0].IntPart())
damageDone := e.Ctx().Our.SumDamage
if damageDone.IntPart() > int64(damageThreshold) {
effectType := int(e.Args()[1].IntPart()) // XX类型
effectValue := int(e.Args()[2].IntPart()) // 等级+n
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, effectType)
if statusEffect != nil {
statusEffect.SetArgs(e.Ctx().Our, effectValue)
e.Ctx().Our.AddEffect(e.Ctx().Our, statusEffect)
}
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 518, &Effect518{})
}