Merge branch '0功能/本周版本优化内容' of http://60.1.1.230/gaoxin/JL_Client into 0功能/本周版本优化内容

dev_chengFeng
jiaoyangna 2021-02-19 17:50:16 +08:00
commit 92e4a4a856
4 changed files with 19 additions and 2 deletions

View File

@ -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)

View File

@ -163,7 +163,7 @@ BattleEventName = {
RecordTransRage = indexAdd(), -- 转移怒气
RecordBuff = indexAdd(), -- buff
RecordSecKill = indexAdd(), -- 斩杀
DisposeRoleCtrl_noheal = indexAdd(),--处理角色禁疗
}
BattleMaxFrame = 1000000

View File

@ -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

View File

@ -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