[战斗]=======================每回合添加最大buff添加数,伤害数,治疗御甲数限制

dev_chengFeng
wangzhenxing 2023-02-24 11:02:14 +08:00
parent 171fbe8d90
commit 1c60b69d1a
6 changed files with 37 additions and 6 deletions

View File

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

View File

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

View File

@ -411,6 +411,7 @@ function RoleLogic:AddBuff(buff,_ignorePro)
end
end
BattleLogic.BuffMgr:AddBuff(self, buff)
BattleLogic.AddRoundTriggerTime()
end
end

View File

@ -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={}

View File

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

View File

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