阎罗王被动根据异常类型加伤修改

dev_chengFeng
wangzhenxing 2020-08-18 20:07:00 +09:00
parent e261370ff4
commit 0e6c9ce414
3 changed files with 42 additions and 6 deletions

View File

@ -1980,6 +1980,7 @@ local effectList = {
-- 检测技能伤害治疗加成
f2 = BattleUtil.CheckSkillDamageHeal(f2, caster, arr[1])
-- 治疗血量最低队友实际伤害的f2%
--之前是finaldag 改成 damage
BattleUtil.ApplyTreat(caster, arr[1], floor(damage*f2))
end
target.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit)

View File

@ -3030,12 +3030,35 @@ local passivityList = {
-- a[float]
[161] = function(role, args)
local f1 = args[1]
--之前为根据异常效果的数量改为根据异常效果的类型 by:王振兴
local function onPassiveDamaging(damagingFunc, target, damage)
local list = BattleLogic.BuffMgr:GetBuff(target, function(buff)
return buff.type == BuffName.DOT or buff.type == BuffName.Control
end)
if list and damagingFunc then
local num = #list
--local list = BattleLogic.BuffMgr:GetBuff(target, function(buff)
--return buff.type == BuffName.DOT or buff.type == BuffName.Control
--end)
local dotList={}
local controlList={}
local list=BattleLogic.BuffMgr:GetBuff(target)
for i = 1, #list do
local buff=list[i]
if buff.type== BuffName.DOT and buff.damageType and dotList and not BattleUtil.ChecklistIsContainValue(dotList,buff.damageType) then
table.insert(dotList,buff.damageType)
end
if buff.type== BuffName.Control and buff.ctrlType and controlList and not BattleUtil.ChecklistIsContainValue(controlList,buff.ctrlType) then
table.insert(controlList,buff.ctrlType)
end
end
local num = 0
if dotList then
num = num + #dotList
end
if controlList then
num=num+ #controlList
end
LogError("异常效果的数量为:".. num)
if num>0 and damagingFunc then
local dd = BattleUtil.CountValue(damage, f1 * num, CountTypeName.AddPencent) - damage
damagingFunc(-floor(BattleUtil.ErrorCorrection(dd)))
end

View File

@ -354,7 +354,19 @@ function BattleUtil.CheckIsNoDead(target)
return false
end
--检测列表是否包含值
function BattleUtil.ChecklistIsContainValue(_list,_value)
if _list and _value then
for key, value in pairs(_list) do
if value==_value then
return true
else
return false
end
end
end
return false
end
function BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageType, dotType)
if damage < 0 then damage = 0 end