Files
bl/logic/service/fight/effect/effect_111.go

30 lines
660 B
Go
Raw Normal View History

2025-11-13 23:48:34 +08:00
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
2025-11-13 23:48:34 +08:00
)
// 附加额外伤害,自身等级越高,附加的伤害越高
// 固定伤害∈[100%200%]*精灵等级
type Effect111 struct {
node.EffectNode
}
func (e *Effect111) OnSkill() bool {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: alpacadecimal.NewFromInt(int64(e.Ctx().Opp.CurrentPet.Info.Level)),
2025-11-13 23:48:34 +08:00
})
return true
}
// ---- 注册所有效果 ----
func init() {
input.InitEffect(input.EffectType.Skill, 111, &Effect111{})
}