【测试战斗】添加总伤害数值打印

dev_chengFeng
gaoxin 2020-11-14 17:37:24 +08:00
parent e6ac0a8845
commit ede48e5063
3 changed files with 20 additions and 0 deletions

View File

@ -829,6 +829,14 @@ function this.GetBattleSorting()
end
end
-- 判断是否是战斗测试
function this.IsBattleTestPanel()
if UIManager.IsOpen(UIName.BattleTestPanel) then
return true
end
end
-- 获取战斗背景
function this.GetBattleBg(fightType)
local index = 1

View File

@ -374,6 +374,9 @@ function EnemyView:OnDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotType,
d = dmg
count = 1
end
if BattleManager.IsBattleTestPanel() then
LogYellow(string.format("目标阵营:%s, 位置:%s, 总伤害:%s, 伤害段数:%s每段伤害%s", self.camp, self.role.position, dmg, count, d))
end
if count ~= 1 then
-- 后续伤害延迟打出
self:LoopFunc(space, count - 1, function()
@ -386,6 +389,9 @@ function EnemyView:OnDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotType,
self:OnceDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotType, skill)
end
else
if BattleManager.IsBattleTestPanel() then
LogYellow(string.format("目标阵营:%s, 位置:%s, 总伤害:%s", self.camp, self.role.position, dmg))
end
self:OnceDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotType, skill)
end
end

View File

@ -418,6 +418,9 @@ function PlayerView:OnDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotType
d = dmg
count = 1
end
if BattleManager.IsBattleTestPanel() then
LogYellow(string.format("目标阵营:%s, 位置:%s, 总伤害:%s, 伤害段数:%s每段伤害%s", self.camp, self.role.position, dmg, count, d))
end
if count ~= 1 then
-- 后续伤害延迟打出
self:LoopFunc(space, count - 1, function()
@ -430,6 +433,9 @@ function PlayerView:OnDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotType
self:OnceDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotType, skill)
end
else
if BattleManager.IsBattleTestPanel() then
LogYellow(string.format("目标阵营:%s, 位置:%s, 总伤害:%s", self.camp, self.role.position, dmg))
end
self:OnceDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotType, skill)
end
end