Files
bl/logic/service/fight/effect/effect_130.go
昔念 ffe3ff18bf
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
1
2026-02-08 17:57:42 +08:00

37 lines
975 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/alpacahq/alpacadecimal"
)
type Effect130 struct {
node.EffectNode // 仅继承基础效果节点,不嵌入条件函数
}
// -----------------------------------------------------------
// 核心共性逻辑:命中且满足条件时,附加固定伤害
// -----------------------------------------------------------
func (e *Effect130) OnSkill() bool {
// 1. 命中判定失败,不触发
if e.Ctx().Opp.CurrentPet.Info.Gender != int(e.Args()[0].IntPart()) {
return true
}
// 4. 附加固定伤害从SideEffectArgs[0]获取伤害值)
damageValue := alpacadecimal.NewFromInt(int64(e.SideEffectArgs[1]))
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damageValue,
})
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 130, &Effect130{})
}