From ab2ebcd56dd2d21fcd01e5a836de52b20e5bd576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <12574910+72wo@users.noreply.github.com> Date: Tue, 10 Mar 2026 16:02:38 +0800 Subject: [PATCH] =?UTF-8?q?```=20fix(fight):=20=E4=BF=AE=E5=A4=8D=E6=88=98?= =?UTF-8?q?=E6=96=97=E6=95=88=E6=9E=9C=E5=92=8C=E5=B1=9E=E6=80=A7=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E7=9A=84=E8=BE=B9=E7=95=8C=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复Effect468中负值处理后提前返回的问题 - 重命名Effect470的SkillHit方法为Skill_Use_ex以匹配实际功能 - 注释掉调试用的println语句 - 在SetProp方法中添加属性值边界检查,确保属性值在-6到6范围内 ``` --- logic/service/fight/effect/468.go | 2 +- logic/service/fight/effect/470.go | 2 +- logic/service/fight/input/fight.go | 2 +- logic/service/fight/input/prop.go | 6 ++++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/logic/service/fight/effect/468.go b/logic/service/fight/effect/468.go index b7cf58cc5..64b7f335a 100644 --- a/logic/service/fight/effect/468.go +++ b/logic/service/fight/effect/468.go @@ -19,7 +19,7 @@ func (e *Effect468) SkillHit() bool { if v < 0 { e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0) ispwoer = true - return true + } } diff --git a/logic/service/fight/effect/470.go b/logic/service/fight/effect/470.go index f245aa1c4..96c218aad 100644 --- a/logic/service/fight/effect/470.go +++ b/logic/service/fight/effect/470.go @@ -11,7 +11,7 @@ type Effect470 struct { node.EffectNode } -func (e *Effect470) SkillHit() bool { +func (e *Effect470) Skill_Use_ex() bool { if e.Ctx().SkillEntity != nil && e.Ctx().SkillEntity.Category() != info.Category.STATUS { chance := e.Args()[1].IntPart() // m% success, _, _ := e.Input.Player.Roll(int(chance), 100) diff --git a/logic/service/fight/input/fight.go b/logic/service/fight/input/fight.go index 984e2edaa..492c7b85d 100644 --- a/logic/service/fight/input/fight.go +++ b/logic/service/fight/input/fight.go @@ -257,7 +257,7 @@ func (our *Input) CalculatePower(deftype *Input, skill *info.SkillEntity) alpaca Mul(typeRate). // 克制系数 Mul(skill.Criticalrandom()) //随机波动 - println(baseDamage.IntPart(), damage.IntPart(), attackDec.IntPart(), defenseDec.IntPart(), "技能伤害") + //println(baseDamage.IntPart(), damage.IntPart(), attackDec.IntPart(), defenseDec.IntPart(), "技能伤害") return damage } diff --git a/logic/service/fight/input/prop.go b/logic/service/fight/input/prop.go index 26f645c35..49aa33846 100644 --- a/logic/service/fight/input/prop.go +++ b/logic/service/fight/input/prop.go @@ -34,6 +34,9 @@ func (target *Input) SetProp(source *Input, index, level int8) bool { case level < 0: if target.AttackValue.Prop[index] > -6 { target.AttackValue.Prop[index] += level + if target.AttackValue.Prop[index] < -6 { + target.AttackValue.Prop[index] = -6 + } } else { return false } @@ -41,6 +44,9 @@ func (target *Input) SetProp(source *Input, index, level int8) bool { case level > 0: if target.AttackValue.Prop[index] < 6 { target.AttackValue.Prop[index] += level + if target.AttackValue.Prop[index] > 6 { + target.AttackValue.Prop[index] = 6 + } } else { return false }