From 002c855e475e14e27e06deae9ac7fc0bbf4d5a81 Mon Sep 17 00:00:00 2001 From: 1 <1@72wo.cn> Date: Thu, 18 Dec 2025 10:57:59 +0000 Subject: [PATCH] =?UTF-8?q?feat(fight):=20=E6=96=B0=E5=A2=9E=E8=AF=95?= =?UTF-8?q?=E7=82=BC=E4=B9=8B=E5=A1=94=E5=92=8C=E5=8B=87=E8=80=85=E4=B9=8B?= =?UTF-8?q?=E5=A1=94=E5=9C=B0=E5=9B=BE=E5=88=87=E6=8D=A2=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E6=88=98=E6=96=97=E6=95=88=E6=9E=9C?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logic/controller/fight_tawor.go | 14 ++++++++++++++ logic/service/fight/boss/NewSeIdx_1.go | 3 +++ .../fight/effect/{effect_38.go => effect_attr.go} | 6 +++++- logic/service/fight/loop.go | 5 +++-- 4 files changed, 25 insertions(+), 3 deletions(-) rename logic/service/fight/effect/{effect_38.go => effect_attr.go} (87%) diff --git a/logic/controller/fight_tawor.go b/logic/controller/fight_tawor.go index 15be8e24..a53a3c4a 100644 --- a/logic/controller/fight_tawor.go +++ b/logic/controller/fight_tawor.go @@ -15,16 +15,30 @@ func (h Controller) FRESH_CHOICE_FIGHT_LEVEL(data *fight.C2S_FRESH_CHOICE_FIGHT_ switch data.Head.CMD { case 2428: //试炼之塔 c.Info.CurrentFreshStage = utils.Max(c.Info.CurrentFreshStage, 1) + c.Info.MapID = 500 result.CurFightLevel = uint(c.Info.CurrentFreshStage) case 2414: //勇者之塔 c.Info.CurrentStage = utils.Max(c.Info.CurrentStage, 1) + c.Info.MapID = 600 result.CurFightLevel = uint(c.Info.CurrentStage) } result.BossId = []uint32{10} atomic.StoreUint32(&c.Canmon, 0) + defer c.GetSpace().EnterMap(c) return result, 0 } func (h Controller) FRESH_LEAVE_FIGHT_LEVEL(data *fight.FRESH_LEAVE_FIGHT_LEVEL, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) { + switch data.Head.CMD { + case 2430: //试炼之塔 + + c.Info.MapID = 101 + + case 2416: //勇者之塔 + + c.Info.MapID = 108 + + } + defer c.GetSpace().LeaveMap(c) //玩家离开地图 return result, 0 } diff --git a/logic/service/fight/boss/NewSeIdx_1.go b/logic/service/fight/boss/NewSeIdx_1.go index a8366b4f..03e617db 100644 --- a/logic/service/fight/boss/NewSeIdx_1.go +++ b/logic/service/fight/boss/NewSeIdx_1.go @@ -33,6 +33,9 @@ func (e *NewSel1) Prop_Befer(in *input.Input, prop int8, level int8, ptype info. if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { return true } + if in == e.Ctx().Our { + return true + } //能力下降类 if ptype == info.AbilityOpType.SUB { diff --git a/logic/service/fight/effect/effect_38.go b/logic/service/fight/effect/effect_attr.go similarity index 87% rename from logic/service/fight/effect/effect_38.go rename to logic/service/fight/effect/effect_attr.go index 1562e3cb..88220667 100644 --- a/logic/service/fight/effect/effect_38.go +++ b/logic/service/fight/effect/effect_attr.go @@ -26,6 +26,7 @@ func (e *Effect38) OnSkill() bool { tt := e.ID() tt.SetEffectType(input.EffectType.Sub) + tt.SetCatchTime(e.Ctx().Opp.CurrentPet.Info.CatchTime) ee.ID(tt) ee.SetArgs(e.Ctx().Our, e.SideEffectArgs...) @@ -35,7 +36,10 @@ func (e *Effect38) OnSkill() bool { // 命中之后 func (e *Effect38_sub) Turn_Start(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) { - + //魂印特性有不在场的情况,绑定时候将精灵和特性绑定 + if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { + return + } if e.Args()[0].Cmp(e.Ctx().Our.CurrentPet.GetMaxHP()) == -1 { e.l.Do(func() { diff --git a/logic/service/fight/loop.go b/logic/service/fight/loop.go index dec32f7d..68d2a9bf 100644 --- a/logic/service/fight/loop.go +++ b/logic/service/fight/loop.go @@ -2,6 +2,7 @@ package fight import ( "blazing/common/data/xmlres" + "blazing/common/utils" "blazing/cool" "context" @@ -62,8 +63,8 @@ func (f *FightC) battleLoop() { } } - - ff.Player.GetInfo().PetList[j].Hp = ff.AllPet[i].Info.Hp + + ff.Player.GetInfo().PetList[j].Hp = utils.Max(ff.Player.GetInfo().PetList[j].MaxHp,ff.AllPet[i].Info.Hp) ff.Player.GetInfo().PetList[j].SkillList = ff.AllPet[i].Info.SkillList }