```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(fight): 添加技能实体空值检查

为Effect93的Skill_Use方法添加空值检查,当技能实体为空时直接返回true,
避免潜在的空指针引用错误
```
This commit is contained in:
昔念
2026-03-12 01:17:02 +08:00
parent 7f3bfff542
commit 5e007894ea

View File

@@ -20,6 +20,9 @@ type Effect93 struct {
}
func (e *Effect93) Skill_Use() bool {
if e.Ctx().SkillEntity == nil {
return true
}
// 概率判定
ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)