阎罗王被动根据异常类型加伤修改
parent
e261370ff4
commit
0e6c9ce414
|
@ -1980,6 +1980,7 @@ local effectList = {
|
||||||
-- 检测技能伤害治疗加成
|
-- 检测技能伤害治疗加成
|
||||||
f2 = BattleUtil.CheckSkillDamageHeal(f2, caster, arr[1])
|
f2 = BattleUtil.CheckSkillDamageHeal(f2, caster, arr[1])
|
||||||
-- 治疗血量最低队友实际伤害的f2%
|
-- 治疗血量最低队友实际伤害的f2%
|
||||||
|
--之前是finaldag 改成 damage
|
||||||
BattleUtil.ApplyTreat(caster, arr[1], floor(damage*f2))
|
BattleUtil.ApplyTreat(caster, arr[1], floor(damage*f2))
|
||||||
end
|
end
|
||||||
target.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit)
|
target.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit)
|
||||||
|
|
|
@ -3030,12 +3030,35 @@ local passivityList = {
|
||||||
-- a[float]
|
-- a[float]
|
||||||
[161] = function(role, args)
|
[161] = function(role, args)
|
||||||
local f1 = args[1]
|
local f1 = args[1]
|
||||||
|
|
||||||
|
--之前为根据异常效果的数量改为根据异常效果的类型 by:王振兴
|
||||||
local function onPassiveDamaging(damagingFunc, target, damage)
|
local function onPassiveDamaging(damagingFunc, target, damage)
|
||||||
local list = BattleLogic.BuffMgr:GetBuff(target, function(buff)
|
--local list = BattleLogic.BuffMgr:GetBuff(target, function(buff)
|
||||||
return buff.type == BuffName.DOT or buff.type == BuffName.Control
|
--return buff.type == BuffName.DOT or buff.type == BuffName.Control
|
||||||
end)
|
--end)
|
||||||
if list and damagingFunc then
|
local dotList={}
|
||||||
local num = #list
|
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
|
local dd = BattleUtil.CountValue(damage, f1 * num, CountTypeName.AddPencent) - damage
|
||||||
damagingFunc(-floor(BattleUtil.ErrorCorrection(dd)))
|
damagingFunc(-floor(BattleUtil.ErrorCorrection(dd)))
|
||||||
end
|
end
|
||||||
|
|
|
@ -354,7 +354,19 @@ function BattleUtil.CheckIsNoDead(target)
|
||||||
return false
|
return false
|
||||||
end
|
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)
|
function BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageType, dotType)
|
||||||
if damage < 0 then damage = 0 end
|
if damage < 0 then damage = 0 end
|
||||||
|
|
Loading…
Reference in New Issue