From 18dcae0a9b30652862c1c59ec3563eef9aa0b8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <1@72wo.cn> Date: Sun, 9 Nov 2025 00:56:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(logic/service/fight/effect):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=8A=80=E8=83=BD=E6=95=88=E6=9E=9C=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增概率判定机制,使技能效果触发具有随机性。当概率判定失败时,直接返回 true, 不添加疲惫状态效果 --- logic/service/fight/effect/effect_20.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/logic/service/fight/effect/effect_20.go b/logic/service/fight/effect/effect_20.go index 4f109e82d..6d5d14fa1 100644 --- a/logic/service/fight/effect/effect_20.go +++ b/logic/service/fight/effect/effect_20.go @@ -21,6 +21,12 @@ type Effect20 struct { // 使用技能时,不可被继承,继承Miss和Hit就行 func (e *Effect20) OnSkill(input.Ctx) bool { - e.Input.AddEffect(input.Geteffect(input.EffectType.Status, int(info.PetStatus.Tired))) + ok, _, _ := e.Input.Player.Roll(e.SideEffectArgs[0], 100) + if !ok { + return true + } + t := input.Geteffect(input.EffectType.Status, int(info.PetStatus.Tired)) + t.Duration(e.SideEffectArgs[1]) + e.Input.AddEffect(t) return true }