diff --git a/logic/service/fight/boss/NewSeIdx_70.go b/logic/service/fight/boss/NewSeIdx_70.go index 6a26dfbac..439baaafd 100644 --- a/logic/service/fight/boss/NewSeIdx_70.go +++ b/logic/service/fight/boss/NewSeIdx_70.go @@ -2,7 +2,6 @@ package effect import ( "blazing/logic/service/fight/action" - "blazing/logic/service/fight/info" "blazing/logic/service/fight/input" ) @@ -18,12 +17,13 @@ func (e *NewSel70) TurnStart(fattack *action.SelectSkillAction, sattack *action. } // 将对手的能力提升同时加给自己 - for i := 0; i < 6; i++ { - e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 1, info.AbilityOpType.COPY) + for i, v := range e.Ctx().Opp.Prop[:] { + if v > 0 { + e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v) + } } - } func init() { diff --git a/logic/service/fight/effect/143.go b/logic/service/fight/effect/143.go new file mode 100644 index 000000000..eac737ad5 --- /dev/null +++ b/logic/service/fight/effect/143.go @@ -0,0 +1,32 @@ +package effect + +import ( + "blazing/logic/service/fight/input" + "blazing/logic/service/fight/node" +) + +type Effect143 struct { + node.EffectNode +} + +// ---------------------- +// 执行时逻辑 +// ---------------------- +func (e *Effect143) OnSkill() bool { + + for i, v := range e.Ctx().Opp.Prop[:] { + if v > 0 { + e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), -2*v) + } + + } + + return true +} + +// ---------------------- +// 注册所有效果 +// ---------------------- +func init() { + input.InitEffect(input.EffectType.Skill, 143, &Effect143{}) +} diff --git a/logic/service/fight/effect/63.go b/logic/service/fight/effect/63.go new file mode 100644 index 000000000..0d641e9f8 --- /dev/null +++ b/logic/service/fight/effect/63.go @@ -0,0 +1,32 @@ +package effect + +import ( + "blazing/logic/service/fight/input" + "blazing/logic/service/fight/node" +) + +type Effect63 struct { + node.EffectNode +} + +// ---------------------- +// 执行时逻辑 +// ---------------------- +func (e *Effect63) OnSkill() bool { + + for i, v := range e.Ctx().Our.Prop[:] { + if v < 0 { + e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), v) + } + + } + + return true +} + +// ---------------------- +// 注册所有效果 +// ---------------------- +func init() { + input.InitEffect(input.EffectType.Skill, 63, &Effect63{}) +} diff --git a/logic/service/fight/effect/85.go b/logic/service/fight/effect/85.go new file mode 100644 index 000000000..acb8d7bf6 --- /dev/null +++ b/logic/service/fight/effect/85.go @@ -0,0 +1,32 @@ +package effect + +import ( + "blazing/logic/service/fight/input" + "blazing/logic/service/fight/node" +) + +type Effect85 struct { + node.EffectNode +} + +// ---------------------- +// 执行时逻辑 +// ---------------------- +func (e *Effect85) OnSkill() bool { + + for i, v := range e.Ctx().Opp.Prop[:] { + if v > 0 { + e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v) + } + + } + + return true +} + +// ---------------------- +// 注册所有效果 +// ---------------------- +func init() { + input.InitEffect(input.EffectType.Skill, 85, &Effect85{}) +} diff --git a/logic/service/fight/effect/EffectDefeatTrigger.go b/logic/service/fight/effect/EffectDefeatTrigger.go index 272b616d6..2e362dff4 100644 --- a/logic/service/fight/effect/EffectDefeatTrigger.go +++ b/logic/service/fight/effect/EffectDefeatTrigger.go @@ -180,9 +180,11 @@ func (e *EffectDefeatTrigger) triggerNextEnemyStatusOnDefeat(at model.AttackValu // triggerTransferBoostsOnDefeat:击败对手后,复制其所有能力提升效果到自身(对应Effect421) func (e *EffectDefeatTrigger) triggerTransferBoostsOnDefeat(at model.AttackValue) { // 复制被击败对手的能力提升 - for i, v := range at.Prop { + + for i, v := range at.Prop[:] { if v > 0 { - e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v, info.AbilityOpType.COPY) + e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v) } + } } diff --git a/logic/service/fight/effect/effect_91.go b/logic/service/fight/effect/effect_91.go index 17802ea6c..839f4f1bb 100644 --- a/logic/service/fight/effect/effect_91.go +++ b/logic/service/fight/effect/effect_91.go @@ -2,7 +2,6 @@ package effect import ( "blazing/logic/service/fight/action" - "blazing/logic/service/fight/info" "blazing/logic/service/fight/input" "blazing/logic/service/fight/node" ) @@ -34,9 +33,9 @@ func (e *Effect91) SetArgs(t *input.Input, a ...int) { } func (e *Effect91) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) { - for i, v := range e.Ctx().Opp.Prop { + for i, v := range e.Ctx().Opp.Prop[:] { - e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v, info.AbilityOpType.COPY) + e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v) } diff --git a/logic/service/fight/effect/effect_prop.go b/logic/service/fight/effect/effect_prop.go index 1d9f74b24..e4329a697 100644 --- a/logic/service/fight/effect/effect_prop.go +++ b/logic/service/fight/effect/effect_prop.go @@ -1,7 +1,6 @@ package effect import ( - "blazing/logic/service/fight/info" "blazing/logic/service/fight/input" "blazing/logic/service/fight/node" ) @@ -35,7 +34,7 @@ func (e *Effect3) OnSkill() bool { // ---------------------- // 工厂函数 // ---------------------- -func newEffect3(reverse bool, level int) *Effect3 { +func newEffect3(reverse bool, level int8) *Effect3 { return &Effect3{ Reverse: reverse, Level: level, @@ -50,16 +49,15 @@ func init() { id int reverse bool level int8 - opType info.EnumAbilityOpType }{ - {3, false, -1, info.AbilityOpType.RESET}, // 解除自身能力下降状态 - {33, true, 1, info.AbilityOpType.RESET}, // 消除对手能力提升状态 - {63, false, 0, info.AbilityOpType.BounceWeaken}, // 将能力下降反馈给对手 - {85, false, -1, info.AbilityOpType.StealStrengthen}, // 将对手提升效果转移到自己 - {143, true, 1, info.AbilityOpType.Reverse}, // 反转对手能力提升为下降 + {3, false, 0}, // 解除自身能力下降状态 + {33, true, 0}, // 消除对手能力提升状态 + // {63, false, 0, info.AbilityOpType.BounceWeaken}, // 将能力下降反馈给对手 + // {85, false, -1, info.AbilityOpType.StealStrengthen}, // 将对手提升效果转移到自己 + // {143, true, 1, info.AbilityOpType.Reverse}, // 反转对手能力提升为下降 } for _, e := range effects { - input.InitEffect(input.EffectType.Skill, e.id, newEffect3(e.reverse, e.level, e.opType)) + input.InitEffect(input.EffectType.Skill, e.id, newEffect3(e.reverse, e.level)) } }