【战斗】=============被动56,被动283,被动324修改 不灭修改

dev_chengFeng
wangzhenxing 2021-06-17 14:12:34 +08:00
parent b1425236af
commit 27b3d6e5c7
2 changed files with 22 additions and 12 deletions

View File

@ -1019,21 +1019,23 @@ local passivityList = {
end end
role.Event:AddEvent(BattleEventName.RoleHit, OnDamage,nil,nil,role) role.Event:AddEvent(BattleEventName.RoleHit, OnDamage,nil,nil,role)
end, end,
--造成暴击时,额外造成目标最大生命值[a]%的伤害。 --技能造成暴击时,额外造成目标最大生命值[a]%的伤害。
--a[float] --a[float]
[56] = function(role, args,id,judge) [56] = function(role, args,id,judge)
local f1 = args[1] local f1 = args[1]
local lastTrigger = 0 local lastTrigger = 0
local OnRoleCrit = function(defRole, damage, bCrit, finalDmg, damageType, skill) local OnRoleCrit = function(defRole, damage, bCrit, finalDmg, damageType, skill)
lastTrigger = lastTrigger + 1 -- lastTrigger = lastTrigger + 1
if lastTrigger > 1 then --加入限定避免循环触发 -- if lastTrigger > 1 then --加入限定避免循环触发
return -- return
end -- end
if skill and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill ) then
local ar1 = floor(BattleUtil.FP_Mul(defRole:GetRoleData(RoleDataName.MaxHp), f1)) local ar1 = floor(BattleUtil.FP_Mul(defRole:GetRoleData(RoleDataName.MaxHp), f1))
--local ar2 = BattleUtil.FP_Mul(role:GetRoleData(RoleDataName.Attack), 2.5) --local ar2 = BattleUtil.FP_Mul(role:GetRoleData(RoleDataName.Attack), 2.5)
BattleUtil.FinalDamage(nil, role, defRole, ar1) BattleUtil.FinalDamage(nil, role, defRole, ar1)
lastTrigger = 0 --lastTrigger = 0
end
end end
role.Event:AddEvent(BattleEventName.RoleCrit, OnRoleCrit,nil,nil,role) role.Event:AddEvent(BattleEventName.RoleCrit, OnRoleCrit,nil,nil,role)
end, end,
@ -6287,7 +6289,8 @@ local passivityList = {
--查找敌方燃烧数量 --查找敌方燃烧数量
if num==10 then if num==10 then
num=0 num=0
local arr=RoleManager.Query(function (v) return v.camp~=role.camp end) local arr=skill:GetDirectTargets()
-- local arr=RoleManager.Query(function (v) return v.camp~=role.camp end)
for i = 1, #arr do for i = 1, #arr do
local aaa=BattleLogic.BuffMgr:HasBuff(arr[i], BuffName.DOT, function (buff) return buff.damageType==1 end) local aaa=BattleLogic.BuffMgr:HasBuff(arr[i], BuffName.DOT, function (buff) return buff.damageType==1 end)
if aaa then if aaa then
@ -7373,7 +7376,7 @@ local passivityList = {
return return
end end
--释放者死亡或释放着被沉默 --释放者死亡或释放着被沉默
if caster:IsDead() or caster.ctrl_slient then if caster:IsRealDead() or caster.ctrl_slient then
return return
end end
local num=role.SuperSkillRage-role.Rage local num=role.SuperSkillRage-role.Rage

View File

@ -17,22 +17,28 @@ function NoDead:onPassiveDamaging(func, target, damage, skill)
local dd = BattleUtil.CountValue(damage, self.damageFactor, self.factorCT) - damage local dd = BattleUtil.CountValue(damage, self.damageFactor, self.factorCT) - damage
if func then if func then
func(-math.floor(BattleUtil.ErrorCorrection(dd))-self.recordDamage) func(-math.floor(BattleUtil.ErrorCorrection(dd))-self.recordDamage)
self.recordDamage=0
end end
end end
end end
-- 记录承受伤害 -- 记录承受伤害
function NoDead:OnRoleBeHit(atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect) function NoDead:OnRoleBeHit(atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect)
if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra ) and atkRole.camp~=self.target.camp then if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill ) and atkRole.camp~=self.target.camp then
self.recordDamage=self.recordDamage+math.floor(damage*0.1) self.recordDamage=self.recordDamage+math.floor(damage*0.1)
end end
end end
function NoDead:OnSkillCastEnd(skill)
if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra ) then
self.recordDamage=0
end
end
--初始化后调用一次 --初始化后调用一次
function NoDead:OnStart() function NoDead:OnStart()
-- --
self.target.Event:AddEvent(BattleEventName.PassiveDamaging, self.onPassiveDamaging, self) self.target.Event:AddEvent(BattleEventName.PassiveDamaging, self.onPassiveDamaging, self)
self.target.Event:AddEvent(BattleEventName.SkillCastEnd,self.OnSkillCastEnd,self)
if self.target.star>=11 then if self.target.star>=11 then
self.target.Event:AddEvent(BattleEventName.RoleBeHit,self.OnRoleBeHit,self) self.target.Event:AddEvent(BattleEventName.RoleBeHit,self.OnRoleBeHit,self)
end end
@ -51,6 +57,7 @@ end
--效果结束时调用一次 --效果结束时调用一次
function NoDead:OnEnd() function NoDead:OnEnd()
self.target.Event:RemoveEvent(BattleEventName.PassiveDamaging, self.onPassiveDamaging, self) self.target.Event:RemoveEvent(BattleEventName.PassiveDamaging, self.onPassiveDamaging, self)
self.target.Event:RemoveEvent(BattleEventName.SkillCastEnd,self.OnSkillCastEnd,self)
if self.target.star>=11 then if self.target.star>=11 then
self.target.Event:RemoveEvent(BattleEventName.RoleBeHit,self.OnRoleBeHit,self) self.target.Event:RemoveEvent(BattleEventName.RoleBeHit,self.OnRoleBeHit,self)
end end