29 lines
634 B
Go
29 lines
634 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{})
|
|
|
|
}
|
|
|
|
// Effect 436: 附加已损失体力值{0}%的百分比伤害
|
|
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
|
|
}
|