28 lines
676 B
Go
28 lines
676 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
|
|
"github.com/alpacahq/alpacadecimal"
|
|
)
|
|
|
|
// 323. 每损失N*100血就出手增加M点固伤
|
|
type NewSel323 struct {
|
|
NewSel0
|
|
}
|
|
|
|
func (e *NewSel323) Skill_Use() bool {
|
|
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
|
return true
|
|
}
|
|
r := e.Ctx().Our.CurPet[0].GetMaxHP().Sub(e.Ctx().Our.CurPet[0].GetHP()).Div(alpacadecimal.NewFromInt(100))
|
|
dug := r.Mul(e.Args()[1])
|
|
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed,
|
|
Damage: dug})
|
|
return true
|
|
}
|
|
func init() {
|
|
input.InitEffect(input.EffectType.NewSel, 323, &NewSel323{})
|
|
}
|