Files
bl/logic/service/fight/effect/488.go
xinian 986c7f7b83
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
refactor: 重构战斗效果逻辑至独立文件
2026-03-08 14:07:36 +08:00

33 lines
654 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// 488 - 若对手的体力小于400则造成的伤害增加10%
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{})
}