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 }