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

33 lines
692 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"
)
// 附加额外伤害,自身等级越高,附加的伤害越高
// 固定伤害∈[100%200%]*精灵等级
type Effect111 struct {
node.EffectNode
}
func (e *Effect111) OnSkill() bool {
if !e.Hit() {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: alpacadecimal.NewFromInt(int64(e.Ctx().Opp.CurrentPet.Info.Level)),
})
return true
}
// ---- 注册所有效果 ----
func init() {
input.InitEffect(input.EffectType.Skill, 111, &Effect111{})
}