diff --git a/logic/service/fight/effect/effect_stat.go b/logic/service/fight/effect/effect_4_5.go similarity index 80% rename from logic/service/fight/effect/effect_stat.go rename to logic/service/fight/effect/effect_4_5.go index 269013b5..b0e0a2dd 100644 --- a/logic/service/fight/effect/effect_stat.go +++ b/logic/service/fight/effect/effect_4_5.go @@ -46,11 +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.AttackValue.Prop[e.EffectNode.SideEffectArgs[0]] = int8(int(e.Input.AttackValue.Prop[e.EffectNode.SideEffectArgs[0]]) + e.EffectNode.SideEffectArgs[2]) + e.Input.Prop(e.EffectNode.SideEffectArgs[0], e.EffectNode.SideEffectArgs[2]) } else { //对方 - opp.AttackValue.Prop[e.EffectNode.SideEffectArgs[0]] = int8(int(e.Input.AttackValue.Prop[e.EffectNode.SideEffectArgs[0]]) + e.EffectNode.SideEffectArgs[2]) + opp.Prop(e.EffectNode.SideEffectArgs[0], e.EffectNode.SideEffectArgs[2]) } } diff --git a/logic/service/fight/input/attr.go b/logic/service/fight/input/attr.go new file mode 100644 index 00000000..0bc4c40a --- /dev/null +++ b/logic/service/fight/input/attr.go @@ -0,0 +1,19 @@ +package input + +func (u *Input) Death() { + + u.CurrentPet.Info.Hp = 0 + + //todo 待实现死亡effet + +} + +// 1是添加,-1是减少,0是清除 +func (u *Input) Prop(prop, level int) { + //todo 待交互 + + u.AttackValue.Prop[prop] = u.AttackValue.Prop[prop] + int8(level) + + //todo 待交互 + +} diff --git a/logic/service/fight/input/input.go b/logic/service/fight/input/input.go index 6282439e..fd8f8177 100644 --- a/logic/service/fight/input/input.go +++ b/logic/service/fight/input/input.go @@ -57,14 +57,6 @@ func (i *Input) GetPet(id uint32) (ii *info.BattlePetEntity, Reason info.ChangeP } -func (u *Input) Death() { - - - u.CurrentPet.Info.Hp = 0 - - //todo 待实现死亡effet - -} // GetStatusBonus 获取最高的状态倍率 // 遍历状态数组,返回存在的状态中最高的倍率(无状态则返回1.0) func (i *Input) GetStatusBonus() float64 {