diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 7533c25a1e..e2a666d773 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -6956,26 +6956,34 @@ local passivityList = { [318] = function(role, args) local f1 = args[1] local ctrlNum=0 - local isCtrl=false - -- 死亡数量 - local onRoleAddBuffMiss = function(buff) - if buff then - if buff.type==BuffName.Control and buff.caster==role then - isCtrl=true - ctrlNum=ctrlNum+1 - end + + local onBuffCaster = function(buff) + LogGreen("buff type = ".. buff.type) + if buff.type == BuffName.Control then + ctrlNum = ctrlNum + 1 end end - BattleLogic.Event:AddEvent(BattleEventName.RoleAddBuffFail, onRoleAddBuffMiss,nil,nil,role) + + local onSkillCastStart= function(skill) + if skill.owner == role then + ctrlNum = 0 + role.Event:AddEvent(BattleEventName.BuffCaster, onBuffCaster,nil,nil,role) + end + end + local onSkillCastEnd= function(skill) - local maxNum=#skill:GetDirectTargets() - if isCtrl and ctrlNum>=maxNum then - BattleUtil.CalRage(role, role,f1, CountTypeName.Add) + if skill.owner == role then + if ctrlNum == 0 then + if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then + BattleUtil.CalRage(role, role,f1, CountTypeName.Add) + end + end + role.Event:RemoveEvent(BattleEventName.BuffCaster, onBuffCaster,nil,nil,role) end - isCtrl=false - ctrlNum=0 end - role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,role) + -- 这里使用BattleLogic.Event,因为有的技能效果是在人物技能释放完成后生效的 + BattleLogic.Event:AddEvent(BattleEventName.SkillCast,onSkillCastStart,nil,nil,role) + BattleLogic.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,role) end, --死亡时,按剩余怒气乘[a]平均分给存活队友,每人至少[b]点,按站位优先 --a[int],b[int] @@ -7027,7 +7035,7 @@ local passivityList = { local function onRoundChange(round) if round==curRound+1 then p1=args[1] - time=0 + time=0 end curRound=round end diff --git a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelSingleChapterPanel.lua b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelSingleChapterPanel.lua index f47e58ab39..46b8b38488 100644 --- a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelSingleChapterPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelSingleChapterPanel.lua @@ -72,12 +72,14 @@ function FightLevelSingleChapterPanel:OnSortingOrderChange() --特效层级重设 if starListEffect and #starListEffect > 0 then for i=1,#starListEffect do - Util.AddParticleSortLayer(starListEffect[i], self.sortingOrder - sortingOrder) + -- Util.AddParticleSortLayer(starListEffect[i], self.sortingOrder - sortingOrder) + Util.SetParticleSortLayer(starListEffect[i], self.sortingOrder + 1) end end if levelListEffect and #levelListEffect > 0 then for i=1,#levelListEffect do - Util.AddParticleSortLayer(levelListEffect[i], self.sortingOrder - sortingOrder) + -- Util.AddParticleSortLayer(levelListEffect[i], self.sortingOrder - sortingOrder) + Util.SetParticleSortLayer(levelListEffect[i], self.sortingOrder + 1) end sortingOrder = self.sortingOrder end @@ -189,9 +191,11 @@ function this.SetSingleLevel(levelDatas) UI_Effect_Kuang_JinSe:SetActive(isOpen == 0 and levelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel) isFarstEffect:SetActive(levelData.isFirst and levelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel) for j = 1, 3 do - Util.AddParticleSortLayer(Util.GetGameObject(isFarstEffect, "Fx_star_looping ("..j..")"),this.sortingOrder - (sortingOrder - 1)) + -- Util.AddParticleSortLayer(Util.GetGameObject(isFarstEffect, "Fx_star_looping ("..j..")"),this.sortingOrder - (sortingOrder - 1)) + Util.SetParticleSortLayer(Util.GetGameObject(isFarstEffect, "Fx_star_looping ("..j..")"),this.sortingOrder + 1) end - Util.AddParticleSortLayer(UI_Effect_Kuang_JinSe,this.sortingOrder - (sortingOrder - 1)) + -- Util.AddParticleSortLayer(UI_Effect_Kuang_JinSe,this.sortingOrder - (sortingOrder - 1)) + Util.SetParticleSortLayer(UI_Effect_Kuang_JinSe,this.sortingOrder + 1) if levelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then --主关卡 prb1:SetActive(true) Util.GetGameObject(prb1, "nameBg"):GetComponent("Image").sprite = this.spLoader:LoadSprite(isOpen == 0 and LevleTitleBg[1] or LevleTitleBg[2]) diff --git a/Assets/ManagedResources/~Lua/Modules/FightLevel/View/FightLevelInfoPopup_MainLevel.lua b/Assets/ManagedResources/~Lua/Modules/FightLevel/View/FightLevelInfoPopup_MainLevel.lua index 34d7ffa71a..790d6dcd26 100644 --- a/Assets/ManagedResources/~Lua/Modules/FightLevel/View/FightLevelInfoPopup_MainLevel.lua +++ b/Assets/ManagedResources/~Lua/Modules/FightLevel/View/FightLevelInfoPopup_MainLevel.lua @@ -102,9 +102,9 @@ function this:ShoeCondition() this.isFirstEffect:SetActive(fightLevelData.isFirst) if starListEffect and #starListEffect > 0 then for i=1,#starListEffect do - Util.AddParticleSortLayer(starListEffect[i], sortingOrder) + -- Util.AddParticleSortLayer(starListEffect[i], sortingOrder) + Util.SetParticleSortLayer(starListEffect[i], sortingOrder + 1) end - LogYellow("sortingOrder "..sortingOrder) end for i = 1, math.max(#condition, #conditionGo) do local go = conditionGo[i] @@ -149,16 +149,16 @@ function this:FormationAdapter() end function this:OnSortingOrderChange(_sortingOrder) - LogYellow("_sortingOrder ".._sortingOrder) for i = 1, #heroListGo do - Util.AddParticleSortLayer(heroListGo[i], _sortingOrder - sortingOrder) + -- Util.AddParticleSortLayer(heroListGo[i], _sortingOrder - sortingOrder) + Util.SetParticleSortLayer(heroListGo[i], _sortingOrder + 1) end if starListEffect and #starListEffect > 0 then for i=1,#starListEffect do - Util.AddParticleSortLayer(starListEffect[i], _sortingOrder - sortingOrder) + -- Util.AddParticleSortLayer(starListEffect[i], _sortingOrder - sortingOrder) + Util.SetParticleSortLayer(starListEffect[i], _sortingOrder + 1) end sortingOrder = _sortingOrder - LogYellow("sortingOrder "..sortingOrder) end end diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua index 7f0030a3b2..fed5341723 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua @@ -324,12 +324,14 @@ function this.ShowBattleResultByFightLevelType(drop) m_battlePanel:ClosePanel() end this:ClosePanel() + local chapterData = FightLevelManager.GetChapterData(oldBattlefightLevelData.config.Chapter) if FightLevelManager.GetisShowChapterOpenPopup() then - UIManager.OpenPanel(UIName.FightLevelOpenChapterPopup,FightLevelManager.GetCurChapterId(),function() - -- Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh) - end) - else - -- Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh) + if oldBattlefightLevelData.config.Section == LengthOfTable(chapterData.node) then + UIManager.OpenPanel(UIName.FightLevelOpenChapterPopup,FightLevelManager.GetCurChapterId(),function() + end) + else + FightLevelManager.SetisShowChapterOpenPopup(false) + end end end end, 8,true,true) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua index 43d5de0d6f..1ac5355044 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua @@ -321,7 +321,8 @@ function this.FightLevelShow() this.isFirstEffect:SetActive(curBattlefightLevelData.isFirst) if starListEffect and #starListEffect > 0 then for i=1,#starListEffect do - Util.AddParticleSortLayer(starListEffect[i], this.sortingOrder - (sortingOrder - 1)) + -- Util.AddParticleSortLayer(starListEffect[i], this.sortingOrder - (sortingOrder - 1)) + Util.SetParticleSortLayer(starListEffect[i], this.sortingOrder + 1) end end for i = 1, math.max(#condition, #conditionGo) do @@ -383,7 +384,8 @@ function RewardItemPopup:OnSortingOrderChange() end if starListEffect and #starListEffect > 0 then for i=1,#starListEffect do - Util.AddParticleSortLayer(starListEffect[i], self.sortingOrder - (sortingOrder - 1)) + -- Util.AddParticleSortLayer(starListEffect[i], self.sortingOrder - (sortingOrder - 1)) + Util.SetParticleSortLayer(starListEffect[i], self.sortingOrder + 1) end sortingOrder = self.sortingOrder end