Files
bl/logic/service/fight/effect/425.go
昔念 ce279cd992
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
根据提供的code differences信息,我无法看到具体的代码变更内容。由于code differences部分为空白,我将提供一个通用的示例格式:
```
docs(readme): 更新文档说明

- 添加了项目使用说明
- 补充了配置项解释
- 修正了错误的示例代码
```

注意:由于没有具体的代码差异信息,无法生成准确的commit
2026-03-09 22:36:30 +08:00

32 lines
685 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/input"
"blazing/logic/service/fight/node"
"github.com/gogf/gf/v2/util/grand"
)
// 425 - 随机使对手n项属性m并将该属性附加给自己
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.Ctx().Opp.SetProp(e.Ctx().Our, t, changeValue)
e.Ctx().Our.SetProp(e.Ctx().Our, t, -changeValue)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 425, &Effect425{})
}