Files
bl/logic/service/fight/effect/425.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

32 lines
717 B
Go

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/gogf/gf/v2/util/grand"
)
// Effect 425: 随机吸取对手{0}项属性{1},并将该属性附加给自己
type Effect425 struct {
node.EffectNode
}
func (e *Effect425) Skill_Use() bool {
numStats := int(e.Args()[0].IntPart()) // n项属性
changeValue := int8(e.Args()[1].IntPart()) // m
// 随机选择n项属性
for i := 0; i < numStats; i++ {
t := int8(grand.Intn(6))
e.TargetInput().SetProp(e.CarrierInput(), t, changeValue)
e.CarrierInput().SetProp(e.CarrierInput(), t, -changeValue)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 425, &Effect425{})
}