38 lines
585 B
Go
38 lines
585 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
/**
|
|
* 额外增加n点固定伤害
|
|
*/
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 29, &Effect29{
|
|
EffectNode: node.EffectNode{},
|
|
})
|
|
|
|
}
|
|
|
|
type Effect29 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect29) OnSkill() bool {
|
|
if !e.Hit() {
|
|
return true
|
|
}
|
|
|
|
e.Ctx().Opp.Damage(&info.DamageZone{
|
|
|
|
Type: info.DamageType.Fixed,
|
|
Damage: decimal.NewFromInt(int64(e.SideEffectArgs[0])),
|
|
})
|
|
return true
|
|
}
|