Files
bl/logic/service/fight/effect/198.go
xinian 78a68148ce
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
chore: update fight logic and effect implementations
2026-04-05 02:25:44 +08:00

30 lines
616 B
Go

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/gogf/gf/v2/util/grand"
)
// Effect 198: 随机使对手{0}种能力等级-{1}
type Effect198 struct {
node.EffectNode
}
func (e *Effect198) OnSkill() bool {
numStats := int(e.Args()[0].IntPart()) // n种能力
reduction := int8(e.Args()[1].IntPart()) // 等级-m
// 随机选择n种能力
for i := 0; i < numStats; i++ {
e.TargetInput().SetProp(e.CarrierInput(), int8(grand.Intn(5)), reduction)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 198, &Effect198{})
}