diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index e3c68f8bc8..c73422277a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -6256,13 +6256,22 @@ local passivityList = { if func then func(v1, CountTypeName.AddPencent) end end end + local disposeCtrlNoHeal = function(caster,target) + if caster==role and target.ctrl_noheal and target.roleData.element==ele then + BattleLogic.BuffMgr:ClearBuff(target, function (buff) + return buff.type == BuffName.Control and buff.ctrlType==4 + end) + end + end local OnSkillCast = function(skill) curSkill=skill role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, passiveTreating) + BattleLogic.Event:AddEvent(BattleEventName.DisposeRoleCtrl_noheal,disposeCtrlNoHeal) end local OnSkillCastEnd = function(skill) curSkill=nil - role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, passiveTreating) + role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, passiveTreating) + BattleLogic.Event:RemoveEvent(BattleEventName.DisposeRoleCtrl_noheal,disposeCtrlNoHeal) end role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast) role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua index 745aede39e..d748317693 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua @@ -163,7 +163,7 @@ BattleEventName = { RecordTransRage = indexAdd(), -- 转移怒气 RecordBuff = indexAdd(), -- buff RecordSecKill = indexAdd(), -- 斩杀 - + DisposeRoleCtrl_noheal = indexAdd(),--处理角色禁疗 } BattleMaxFrame = 1000000 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index 1965278410..5f4d7a55f8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -779,6 +779,7 @@ function BattleUtil.CalTreat(castRole, targetRole, value, baseFactor) if targetRole.type == BattleUnitType.Monster then return end + BattleLogic.Event:DispatchEvent(BattleEventName.DisposeRoleCtrl_noheal, castRole,targetRole) if targetRole.ctrl_noheal or targetRole:IsDead() then --禁疗和死亡无法加血 --禁疗并且没有死亡的单位显示血量+0 不走后面代码,防止触发后面的被动 by:王振兴 2021/1/27 if targetRole.ctrl_noheal and not targetRole:IsDead() then @@ -810,6 +811,7 @@ function BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamag if targetRole.type == BattleUnitType.Monster then return end + BattleLogic.Event:DispatchEvent(BattleEventName.DisposeRoleCtrl_noheal, castRole,targetRole) if targetRole.ctrl_noheal or targetRole:IsDead() then --禁疗和死亡无法加血 --禁疗并且没有死亡的单位显示血量+0 不走后面代码,防止触发后面的被动 by:王振兴 2021/1/27 if targetRole.ctrl_noheal and not targetRole:IsDead() then diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua index ab93bdedbf..c7ac53b309 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -308,6 +308,9 @@ function this.InitOption() --显示倒计时 local curRound, maxRound = BattleLogic.GetCurRound() curRound = curRound <= 0 and 1 or curRound -- 最小显示第一回合 + if curRound>maxRound then + curRound=maxRound + end this.roundText.text = string.format(Language[10252], curRound, maxRound) hadCounted = 0 @@ -594,6 +597,9 @@ function this.OnRoundChanged(round) --显示波次 local curRound, maxRound = BattleLogic.GetCurRound() curRound = curRound <= 0 and 1 or curRound -- 最小显示第一回合 + if curRound>maxRound then + curRound=maxRound + end this.roundText.text = string.format(Language[10252], curRound, maxRound) end