feat(fight/boss): 添加技能实体致命一击检查逻辑 在NewSeIdx_409中新增对SkillEntity的空指针检查, 并实现通过Crit字段判断是否为致命一击的逻辑, 只有当Crit等于1且随机判定成功时才执行后续操作 ```
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user