Files
bl/logic/service/fight/effect/443.go
xinian 875ad668aa
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
feat: 实现战斗效果逻辑和接口重构
2026-03-28 21:57:22 +08:00

34 lines
796 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// Effect 443: {0}回合内若受到的伤害超过{1}则对手疲惫{2}回合
type Effect443 struct {
RoundEffectArg0Base
}
func (e *Effect443) Skill_Use_ex() bool {
damageThreshold := alpacadecimal.NewFromInt(int64(e.Args()[1].IntPart()))
if e.Ctx().Our.SumDamage.Cmp(damageThreshold) > 0 {
// 对手疲惫x回合
tiredEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Tired))
if tiredEffect != nil {
tiredEffect.Duration(int(e.Args()[2].IntPart())) // x回合
e.Ctx().Opp.AddEffect(e.Ctx().Our, tiredEffect)
}
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 443, &Effect443{})
}