30 lines
607 B
Go
30 lines
607 B
Go
|
|
package effect
|
||
|
|
|
||
|
|
import (
|
||
|
|
"blazing/logic/service/fight/info"
|
||
|
|
"blazing/logic/service/fight/input"
|
||
|
|
"blazing/logic/service/fight/node"
|
||
|
|
|
||
|
|
"github.com/alpacahq/alpacadecimal"
|
||
|
|
)
|
||
|
|
|
||
|
|
func init() {
|
||
|
|
input.InitEffect(input.EffectType.Skill, 436, &Effect436{
|
||
|
|
EffectNode: node.EffectNode{},
|
||
|
|
})
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
type Effect436 struct {
|
||
|
|
node.EffectNode
|
||
|
|
}
|
||
|
|
|
||
|
|
func (e *Effect436) OnSkill() bool {
|
||
|
|
|
||
|
|
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||
|
|
Type: info.DamageType.Fixed,
|
||
|
|
Damage: e.Ctx().Our.CurrentPet.GetMaxHP().Sub(e.Ctx().Our.CurrentPet.GetHP()).Mul(e.Args()[0].Div(alpacadecimal.NewFromInt(100))),
|
||
|
|
})
|
||
|
|
return true
|
||
|
|
}
|