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

33 lines
657 B
Go
Raw Normal View History

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// Effect 488: 若对手的HP小于{0},则造成的伤害增加{1}%
type Effect488 struct {
node.EffectNode
}
func (e *Effect488) Damage_Mul(t *info.DamageZone) bool {
if e.Ctx().SkillEntity == nil {
return true
}
opponentHp := e.Ctx().Opp.CurrentPet.GetHP()
if opponentHp.Cmp(alpacadecimal.NewFromInt(400)) < 0 {
t.Damage = t.Damage.Mul(alpacadecimal.NewFromFloat(1.1))
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 488, &Effect488{})
}