From fb89a67edbabfaa01be1b1ebf48059dca7fd9322 Mon Sep 17 00:00:00 2001 From: 1 <1@72wo.cn> Date: Tue, 23 Sep 2025 19:50:11 +0000 Subject: [PATCH] =?UTF-8?q?refactor(fight/input):=20=E5=B0=86Prop=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E9=87=8D=E5=91=BD=E5=90=8D=E4=B8=BASetProp=E4=BB=A5?= =?UTF-8?q?=E6=98=8E=E7=A1=AE=E5=85=B6=E8=AE=BE=E7=BD=AE=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=B9=B6=E5=90=8C=E6=AD=A5=E6=9B=B4?= =?UTF-8?q?=E6=96=B0effect=5F4=5F5.go=E4=B8=AD=E7=9A=84=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logic/service/fight/effect/effect_4_5.go | 4 ++-- logic/service/fight/input/attr.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/logic/service/fight/effect/effect_4_5.go b/logic/service/fight/effect/effect_4_5.go index b0e0a2ddd..f1579b7b3 100644 --- a/logic/service/fight/effect/effect_4_5.go +++ b/logic/service/fight/effect/effect_4_5.go @@ -46,10 +46,10 @@ func (e *EffectStat) SkillUseEnd(opp *input.Input) { t, _, _ := e.Input.Player.Roll(e.EffectNode.SideEffectArgs[1], 100) if t { if !e.etype { //自身 - e.Input.Prop(e.EffectNode.SideEffectArgs[0], e.EffectNode.SideEffectArgs[2]) + e.Input.SetProp(e.EffectNode.SideEffectArgs[0], e.EffectNode.SideEffectArgs[2]) } else { //对方 - opp.Prop(e.EffectNode.SideEffectArgs[0], e.EffectNode.SideEffectArgs[2]) + opp.SetProp(e.EffectNode.SideEffectArgs[0], e.EffectNode.SideEffectArgs[2]) } } diff --git a/logic/service/fight/input/attr.go b/logic/service/fight/input/attr.go index 0bc4c40a0..71a2d2055 100644 --- a/logic/service/fight/input/attr.go +++ b/logic/service/fight/input/attr.go @@ -9,7 +9,7 @@ func (u *Input) Death() { } // 1是添加,-1是减少,0是清除 -func (u *Input) Prop(prop, level int) { +func (u *Input) SetProp(prop, level int) { //todo 待交互 u.AttackValue.Prop[prop] = u.AttackValue.Prop[prop] + int8(level)