[战斗] 被动处理 舍身济世200 ,及伏虎罗汉特性被动添加额外技能屏蔽

dev_chengFeng
wangzhenxing 2020-11-17 17:35:25 +09:00
parent 8980c6be4a
commit 3308ce4479
1 changed files with 38 additions and 7 deletions

View File

@ -1537,6 +1537,10 @@ local passivityList = {
local f1 = args[1]
local ct = args[2]
local passivityDamaging = function(func, caster, damage,skill, dotType, bCrit)
--处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing
if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 then
return
end
if func and skill and (skill.type == BattleSkillType.Special or skill.type == BattleSkillType.Extra) then
local dd = BattleUtil.CountValue(damage, f1, ct) - damage
func(-floor(BattleUtil.ErrorCorrection(dd)))
@ -1960,7 +1964,11 @@ local passivityList = {
target.isFlagCrit = false
role.Event:RemoveEvent(BattleEventName.RoleDamageAfter, onRoleDamageAfter)
end
local function onRoleDamageBefore(target)
local function onRoleDamageBefore(targetfactorFunc, damageType, skill)
--处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing
if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 then
return
end
if BattleLogic.GetCurRound() == i1 then
target.isFlagCrit = true
role.Event:AddEvent(BattleEventName.RoleDamageAfter, onRoleDamageAfter)
@ -2015,7 +2023,11 @@ local passivityList = {
-- 如果是技能的伤害则判断加成
local onPassiveDamaging = function(func, target, damage, skill)
if skill then
--处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing
if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 then
return
end
if skill and skill.type==BattleSkillType.Special then
local dd = BattleUtil.CountValue(damage, f1, ct) - damage
if func then func(-floor(BattleUtil.ErrorCorrection(dd))) end
end
@ -3617,8 +3629,8 @@ local passivityList = {
table.insert(cl, {v, ct})
end
end
role.Event:DispatchEvent(BattleEventName.PassiveDamageShare, _CallBack)
atkRole.Event:DispatchEvent(BattleEventName.PassiveDamageBeShare, _CallBack)
role.Event:DispatchEvent(BattleEventName.PassiveDamageShare, _CallBack,skill)
atkRole.Event:DispatchEvent(BattleEventName.PassiveDamageBeShare, _CallBack,skill)
ff = BattleUtil.CountChangeList(ff, cl)
-- 计算分摊伤害
@ -3825,7 +3837,11 @@ local passivityList = {
-- a[float]
[196] = function(role, args)
local f1 = args[1]
local onDamageBeShare = function(func)
local onDamageBeShare = function(func,skill)
--处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing
if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 then
return
end
if func then func(f1, CountTypeName.Sub) end
end
role.Event:AddEvent(BattleEventName.PassiveDamageBeShare, onDamageBeShare)
@ -3900,7 +3916,18 @@ local passivityList = {
local onFinalDamage = function(damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit, damageType)
if not role:IsDead() and skill and role.position ~= defRole.position and defRole.camp == role.camp and defRole.element == role.element then
local shareDamage = floor(BattleUtil.ErrorCorrection(damage * f1))
local ff = 1 -- 分摊比
-- 检测被动对分摊比的影响
local cl = {}
local function _CallBack(v, ct)
if v then
table.insert(cl, {v, ct})
end
end
role.Event:DispatchEvent(BattleEventName.PassiveDamageShare, _CallBack,skill)
atkRole.Event:DispatchEvent(BattleEventName.PassiveDamageBeShare, _CallBack,skill)
ff = BattleUtil.CountChangeList(ff, cl)
local shareDamage = floor(BattleUtil.ErrorCorrection(damage * f1*ff))
-- 被攻击武将自身伤害
if damagingFunc then
damagingFunc(shareDamage)
@ -3910,7 +3937,7 @@ local passivityList = {
end
end
BattleLogic.Event:AddEvent(BattleEventName.FinalDamage, onFinalDamage)
end,
-- 初始怒气增加[a]点并且目标血量低于[b]%时即有概率秒杀(对应秒杀技能)
@ -5091,6 +5118,10 @@ local passivityList = {
--如果是技能并且这个被动已经被触发过 return
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,256) then
return
end
--处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing
if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 then
return
end
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) and not role:IsDead() then
-- local target = RoleManager.GetAliveAggro(role)