【战斗】======被动427提交
parent
1c0ce769c3
commit
e9f73fb70e
|
@ -10965,6 +10965,40 @@ local passivityList = {
|
||||||
|
|
||||||
BattleLogic.Event:AddEvent(BattleEventName.PassiveTreatingFactor,onPassiveTreatFactor,nil,nil,role)
|
BattleLogic.Event:AddEvent(BattleEventName.PassiveTreatingFactor,onPassiveTreatFactor,nil,nil,role)
|
||||||
end,
|
end,
|
||||||
|
-- 主动攻击目标时,额外对目标造成[a]属性[b]%/目标最大数量的伤害
|
||||||
|
-- a[int]b[float]
|
||||||
|
[427] = function(role, args,id,judge)
|
||||||
|
local pro = args[1]
|
||||||
|
local v1 = args[2]
|
||||||
|
local onHit = function(target, damage, bCrit, finalDmg,damageType,skill)
|
||||||
|
--只对技能的直接目标生效,分摊出去的不会回血 2020/12/17 王振兴
|
||||||
|
if not skill then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
--如果是boss 并且额外伤害是根据最大生命则返回
|
||||||
|
local isBoss=BattleUtil.CheckIsBoss(target)
|
||||||
|
if isBoss and pro==12 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local val = floor( BattleUtil.FP_Mul(v1, target:GetRoleData(BattlePropList[pro]))/skill:GetMaxTargetNum())
|
||||||
|
BattleUtil.FinalDamageCountShield(nil,role, target, val)
|
||||||
|
end
|
||||||
|
local onSkillCast = function(skill)
|
||||||
|
if skill and not skill.isTriggerJudge and judge==1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role)
|
||||||
|
end
|
||||||
|
-- 技能后后
|
||||||
|
local onSkillCastEnd = function(skill)
|
||||||
|
if skill and not skill.isTriggerJudge and judge==1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
role.Event:RemoveEvent(BattleEventName.RoleHit, onHit)
|
||||||
|
end
|
||||||
|
role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role)
|
||||||
|
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role)
|
||||||
|
end,
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue