From 3ddecce241ed2b460ea5d49462ac96821ffd7a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <12574910+72wo@users.noreply.github.com> Date: Wed, 4 Mar 2026 01:33:32 +0800 Subject: [PATCH] =?UTF-8?q?```=20feat(fight/boss):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8A=80=E8=83=BD=E5=AE=9E=E4=BD=93=E8=87=B4=E5=91=BD=E4=B8=80?= =?UTF-8?q?=E5=87=BB=E6=A3=80=E6=9F=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在NewSeIdx_409中新增对SkillEntity的空指针检查, 并实现通过Crit字段判断是否为致命一击的逻辑, 只有当Crit等于1且随机判定成功时才执行后续操作 ``` --- logic/service/fight/boss/NewSeIdx_409.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/logic/service/fight/boss/NewSeIdx_409.go b/logic/service/fight/boss/NewSeIdx_409.go index 0e22a553f..47be18cf6 100644 --- a/logic/service/fight/boss/NewSeIdx_409.go +++ b/logic/service/fight/boss/NewSeIdx_409.go @@ -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