From 1c60b69d1a168d97aa1924875f6e6df83e45ab03 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Fri, 24 Feb 2023 11:02:14 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=3D=3D=3D=3D?= =?UTF-8?q?=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=E6=AF=8F=E5=9B=9E?= =?UTF-8?q?=E5=90=88=E6=B7=BB=E5=8A=A0=E6=9C=80=E5=A4=A7buff=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=95=B0=EF=BC=8C=E4=BC=A4=E5=AE=B3=E6=95=B0=EF=BC=8C?= =?UTF-8?q?=E6=B2=BB=E7=96=97=E5=BE=A1=E7=94=B2=E6=95=B0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/BattleLogic.lua | 14 +++++++++++++- .../~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua | 4 +++- .../~Lua/Modules/Battle/Logic/Role/RoleLogic.lua | 1 + .../~Lua/Modules/Battle/Logic/Role/Skill.lua | 4 ++-- .../~Lua/Modules/Battle/View/Unit/BuffCtrl.lua | 12 +++++++++++- .../~Lua/Modules/Guild/GuildMainCityPanel.lua | 8 +++++++- 6 files changed, 37 insertions(+), 6 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/BattleLogic.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/BattleLogic.lua index b6689f89e4..fe4cf35baa 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/BattleLogic.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/BattleLogic.lua @@ -37,6 +37,8 @@ BattleLogic.GameDeltaTime = 1 / BattleLogic.GameFrameRate BattleLogic.TotalOrder = 0 --当前波次 BattleLogic.CurOrder = 0 +--当前回合触发总次数(添加buff,伤害,治疗) +local curRoundTriggerTime=0 local actionPool = BattleObjectPool.New(function () return { 0, 0 } end) @@ -46,6 +48,9 @@ local rolePool = BattleObjectPool.New(function () return RoleLogic.New() end) +function BattleLogic.AddRoundTriggerTime() + curRoundTriggerTime=curRoundTriggerTime+1 +end function BattleLogic.Init(data, _userData, maxRound) if BattleLogic.IsOpenBattleRecord then record = {} @@ -96,7 +101,9 @@ function BattleLogic.Init(data, _userData, maxRound) allEnemyDamage=allEnemyDamage+damage end end) - + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,function() + curRoundTriggerTime=0 + end) end @@ -481,6 +488,11 @@ function BattleLogic.Update() BattleLogic.BattleEnd(-1) return end + if curRoundTriggerTime>2000 then + --assert(false, "Battle Round Time Out !!!") + BattleLogic.BattleEnd(-2) + return + end local roleResult = RoleManager.GetResult() if roleResult == 0 then BattleLogic.BattleEnd(0) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index d486543b50..7fd5b47b7a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -939,7 +939,7 @@ function BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageTy "damage", damage, "dotType", tostring(dotType) ) - + BattleLogic.AddRoundTriggerTime() return finalDmg end @@ -1391,6 +1391,7 @@ function BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamag "tpos", targetRole.position, "value", value ) + BattleLogic.AddRoundTriggerTime() end @@ -1432,6 +1433,7 @@ function BattleUtil.AddBlood(target,value) else target.Event:DispatchEvent(BattleEventName.ShowHintText, BattleArtFontType.Blood) end + BattleLogic.AddRoundTriggerTime() end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua index debe497548..2b9743ef33 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua @@ -411,6 +411,7 @@ function RoleLogic:AddBuff(buff,_ignorePro) end end BattleLogic.BuffMgr:AddBuff(self, buff) + BattleLogic.AddRoundTriggerTime() end end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua index 8dbfc65cf2..782387bf74 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua @@ -91,7 +91,7 @@ function Skill:Cast(func) --技能的施法时间计算,根据当前目标id关联的持续时间,取其中时间最长的一个 local duration = self.hitTime + self.continueTime -- 结算时间向后延长0.2秒,避免在效果结算完成前就结束了技能释放 - local time=0.8 + local time=1.2 -- if self.id==1282 then -- time=1 -- end @@ -148,7 +148,7 @@ end function Skill:EndSkill() -- 技能后摇 -- 技能结束后摇后结束技能释放 - BattleLogic.WaitForTrigger(0.3, function() + BattleLogic.WaitForTrigger(0.5, function() -- 结束回调 self.isTriggePassivity=false self.triggerPassivityId={} diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/BuffCtrl.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/BuffCtrl.lua index 1b29005a5b..72737ce124 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/BuffCtrl.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/BuffCtrl.lua @@ -262,7 +262,9 @@ function BuffCtrl:AddBuffIcon(buff, icon) -- if self.BuffIconList[key].buffSignType==currBuff.signType then self.BuffIconList[key]:SetCount(self.BuffIconList[key].count+1) return - --end + elseif buffType ==BuffName.BuDongSign then + self.BuffIconList[key]:SetCount(self.BuffIconList[key].count+1) + return end end end @@ -383,6 +385,14 @@ function BuffCtrl:RemoveBuffIcon(buff) end return --end + elseif buffType == BuffName.BuDongSign then + if floor==1 then + self.BuffIconList[key]:Dispose() + self.BuffIconList[key] = nil + else + self.BuffIconList[key]:SetCount(floor-1) + end + return else self.BuffIconList[key]:Dispose() self.BuffIconList[key] = nil diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/GuildMainCityPanel.lua b/Assets/ManagedResources/~Lua/Modules/Guild/GuildMainCityPanel.lua index b203fdd9a0..4052cdeadb 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/GuildMainCityPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/GuildMainCityPanel.lua @@ -432,7 +432,13 @@ function this._TimeUpdate() return end if not ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.CARDELAY) then - this.timeText.text = "46级开启" + local config=ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,FUNCTION_OPEN_TYPE.CARDELAY) + if config then + this.timeText.text = config.OpenRules[1][2].."级开启" + else + this.timeText.text = "50级开启" + end + return end if GuildCarDelayManager.progress == GuildCarDelayProType.Challenge then