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

feat(fight/boss): 添加技能实体致命一击检查逻辑

在NewSeIdx_409中新增对SkillEntity的空指针检查,
并实现通过Crit字段判断是否为致命一击的逻辑,
只有当Crit等于1且随机判定成功时才执行后续操作
```
This commit is contained in:
昔念
2026-03-04 01:33:32 +08:00
parent dffd6a63a6
commit 3ddecce241

View File

@@ -15,11 +15,12 @@ func (e *NewSel409) ActionEndEx() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
// TODO: 检查是否是致命一击
// 目前没有找到相应的API可能需要在Ctx或其他地方添加isCrit标记
// n%几率触发
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Crit != 1 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if !success {
return true