diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 4404162e43..ac098a0586 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -50,10 +50,7 @@ local passivityList = { local pro1 = args[2] local f2 = args[3] local pro2 = args[4] - local OnSkillCast = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end + local OnSkillCast = function(skill) BattleUtil.RandomAction(f1, function () local duration = 0 for i=1, #skill.effectCaster.effectList do @@ -73,9 +70,6 @@ local passivityList = { local dt = args[3] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f1, function () local arr = BattleUtil.ChooseTarget(role, 20001) if arr[1] then @@ -94,9 +88,6 @@ local passivityList = { local f3 = args[3] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f3, function () local arr = BattleUtil.ChooseTarget(role, 40000) if arr[1] then @@ -116,9 +107,6 @@ local passivityList = { local ct = args[4] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end role:AddBuff(Buff.Create(role, BuffName.PropertyChange, f2, BattlePropList[pro], f1, ct)) end role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) @@ -133,9 +121,6 @@ local passivityList = { local f3 = args[4] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f1, function () local arr = BattleUtil.ChooseTarget(role, 10321) if arr[1] then @@ -157,9 +142,6 @@ local passivityList = { local f3 = args[5] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f1, function () local arr = BattleUtil.ChooseTarget(role, 10001) if arr[1] then @@ -193,9 +175,6 @@ local passivityList = { local f2 = args[3] local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f1, function () local val = floor(BattleUtil.FP_Mul(f2, role:GetRoleData(BattlePropList[pro]))) BattleUtil.CalTreat(role, role, val) @@ -213,9 +192,6 @@ local passivityList = { local triggerUid = {} local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if atkRole.isTeam then return end @@ -243,9 +219,6 @@ local passivityList = { local dt = args[5] local OnRoleBeDamagedBefore = function(atkRole, factorFunc, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if damageType == dt then BattleUtil.RandomAction(f1, function () role:AddPropertyTransfer(BattlePropList[pro1], f2, BattlePropList[pro2], 2, BattleLogic.GameDeltaTime) @@ -263,9 +236,6 @@ local passivityList = { local f2 = args[3] local OnPassiveDamaging = function(damagingFunc, atkRole, damage,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f1, function () damagingFunc(floor(BattleUtil.FP_Mul(f2, role:GetRoleData(BattlePropList[pro])))) end) @@ -282,9 +252,6 @@ local passivityList = { local lastTrigger = 0 local OnBeHit = function(atkRole,damage, aaa, finalDmg, bbb, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if atkRole.isTeam then return end @@ -312,9 +279,6 @@ local passivityList = { local lastTrigger = 0 local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if atkRole.isTeam then return end @@ -345,9 +309,6 @@ local passivityList = { local dt = args[6] local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if damageType == dt then BattleUtil.RandomAction(f1, function () role:AddPropertyTransfer(BattlePropList[pro1], f2, BattlePropList[pro2], 2, f3) @@ -388,9 +349,6 @@ local passivityList = { local f3 = args[5] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f1, function () role:AddPropertyTransfer(BattlePropList[pro1], f2, BattlePropList[pro2], 2, f3) end) @@ -407,9 +365,6 @@ local passivityList = { local ct = args[4] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local arr = BattleUtil.ChooseTarget(role, 40000) if arr[1] then arr[1]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f2, BattlePropList[pro1], f1, ct)) @@ -427,9 +382,6 @@ local passivityList = { local ct = args[4] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local arr = BattleUtil.ChooseTarget(role, 10000) for i=1, #arr do arr[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f2, BattlePropList[pro1], f1, ct)) @@ -511,9 +463,6 @@ local passivityList = { local triggerCount = 0 local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if BattleUtil.GetHPPencent(role) < f1 then if triggerCount < 1 then BattleUtil.RandomAction(f2, function () @@ -533,9 +482,6 @@ local passivityList = { local f1 = args[2] local OnDead = function(atkRole,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local arr = BattleUtil.ChooseTarget(role, 10000) for i=1, #arr do local val = floor(BattleUtil.FP_Mul(f1, role:GetRoleData(BattlePropList[pro]))) @@ -592,9 +538,6 @@ local passivityList = { local triggerUid = {} local OnRoleCrit = function(defRole, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if triggerUid[defRole.uid] then --加入限定避免循环触发 return end @@ -617,9 +560,6 @@ local passivityList = { local f2 = args[3] local OnRoleCrit = function(defRole, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f1, function () local val = floor(BattleUtil.FP_Mul(f2, role:GetRoleData(BattlePropList[pro]))) BattleUtil.CalTreat(role, role, val) @@ -635,9 +575,6 @@ local passivityList = { local f2 = args[2] local OnPassiveDamaging = function(damagingFunc, defRole, damage,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if BattleUtil.GetHPPencent(defRole) > f1 then damagingFunc(-floor(f2 * damage)) end @@ -652,9 +589,6 @@ local passivityList = { local f2 = args[2] local OnPassiveDamaging = function(damagingFunc, defRole, damage,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if BattleUtil.GetHPPencent(defRole) < f1 then damagingFunc(-floor(f2 * damage)) end @@ -671,9 +605,6 @@ local passivityList = { local ct = args[4] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local arr = BattleUtil.ChooseTarget(role, 20000) for i=1, #arr do arr[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f2, BattlePropList[pro], f1, ct)) @@ -689,9 +620,6 @@ local passivityList = { local f2 = args[2] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local arr = BattleUtil.ChooseTarget(role, 20001) if arr[1] then BattleUtil.RandomControl(f1, 1, role, arr[1], f2) @@ -733,9 +661,6 @@ local passivityList = { local f1 = args[1] local OnPassiveDamaging = function(damagingFunc,defRole, damage, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end damagingFunc(-f1) end role.Event:AddEvent(BattleEventName.PassiveDamiaging, OnPassiveDamaging) @@ -826,9 +751,6 @@ local passivityList = { local f1 = args[2] local OnBeHit = function(atkRole,damage, bCrit, finalDmg, damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if atkRole.isTeam then return end @@ -845,9 +767,6 @@ local passivityList = { local f1 = args[1] local OnDamage = function(defRole, damage, bCrit, finalDmg, damageType, dotType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.CalTreat(role, role, floor(f1 * finalDmg)) end role.Event:AddEvent(BattleEventName.RoleDamage, OnDamage) @@ -860,9 +779,6 @@ local passivityList = { local f2 = args[2] local OnPassiveCriting = function(crit,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f1, function () crit(f2) end) @@ -879,9 +795,6 @@ local passivityList = { local ct = args[4] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local arr = BattleUtil.ChooseTarget(role, 40000) if arr[1] then local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[pro], f1, ct) @@ -903,9 +816,6 @@ local passivityList = { local ct = args[5] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f1, function () role:AddBuff(Buff.Create(role, BuffName.PropertyChange, f3, BattlePropList[pro], f2, ct)) end) @@ -998,9 +908,6 @@ local passivityList = { local ct = args[5] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f1, function () local arr = BattleUtil.ChooseTarget(role, 20000) for i=1, #arr do @@ -1085,9 +992,6 @@ local passivityList = { local f1 = args[1] local f2 = args[2] local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if atkRole.isTeam then return end @@ -1103,9 +1007,6 @@ local passivityList = { local lastTrigger = 0 local OnDamage = function(defRole, damage, bCrit, finalDmg,aaa,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end lastTrigger = lastTrigger + 1 if lastTrigger > 1 then --加入限定避免循环触发 return @@ -1125,9 +1026,6 @@ local passivityList = { local lastTrigger = 0 local OnRoleCrit = function(defRole, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end lastTrigger = lastTrigger + 1 if lastTrigger > 1 then --加入限定避免循环触发 return @@ -1148,9 +1046,6 @@ local passivityList = { local damageDic = {} local lastDamageDic = {} local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end for k in pairs(damageDic) do if lastDamageDic[k] then damageDic[k] = damageDic[k] + 1 @@ -1182,9 +1077,6 @@ local passivityList = { local f3 = args[5] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local arr = BattleUtil.ChooseTarget(role, 20000) for i=1, #arr do BattleUtil.RandomAction(f1, function ()-- @@ -1281,9 +1173,6 @@ local passivityList = { local f3 = args[4] local OnSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f1, function () local list = RoleManager.GetNeighbor(role, 1) for i=1, #list do @@ -1403,9 +1292,6 @@ local passivityList = { local lastTrigger = 0 local OnDamage = function(defRole, damage, bCrit, finalDmg,damageType,dotType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end lastTrigger = lastTrigger + 1 if lastTrigger > 1 then --加入限定避免循环触发 return @@ -1432,9 +1318,6 @@ local passivityList = { local f2 = args[3] local OnKill = function(defRole,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local buff = Buff.Create(role, BuffName.PropertyChange, f2, BattlePropList[pro], f1, 2) buff.cover = true buff.clear = false @@ -1472,9 +1355,6 @@ local passivityList = { local f2 = args[2] local OnPassiveCriting = function(crit,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(f1, function () crit(role:GetRoleData(RoleDataName.CritDamageFactor)+f2) end) @@ -1492,9 +1372,6 @@ local passivityList = { end local OnSkillCast, OnSkillCastEnd OnSkillCast = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end hp = floor(BattleUtil.FP_Mul(role:GetRoleData(RoleDataName.Hp), f1)) role.data:SubValue(RoleDataName.Hp, hp) @@ -1700,9 +1577,6 @@ local passivityList = { -- buff.cover = true -- 可以叠加 -- buff.clear = false -- 不可驱散 -- role:AddBuff(buff) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill and not skill.isAdd and defRole:IsDead() and not BattleUtil.CheckIsNoDead(defRole) then BattleUtil.CalRage(role, role, i1, CountTypeName.Add) end @@ -1801,9 +1675,6 @@ local passivityList = { local dt = args[3] -- 释放技能后 local onSkillEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill and skill.type == BattleSkillType.Special then BattleUtil.RandomAction(f1, function() BattleLogic.WaitForTrigger(0.1, function() @@ -1822,10 +1693,13 @@ local passivityList = { -- 释放技能[a]概率不消耗怒气 -- a[float] - [98] = function(role, args) + [98] = function(role, args,id,judge) local f1 = args[1] - local onRageCost = function(noCostRate, costRage, func) + local onRageCost = function(noCostRate, costRage, func,skill) + if skill and not skill.isTriggerJudge and judge==1 then + return + end local dRate = f1 local dCost = 0 if func then func(dRate, dCost) end @@ -2188,9 +2062,6 @@ local passivityList = { local i1 = args[1] -- 释放技能后 local onRoleHit = function(target,damage,bcrit,finalDmg,damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then for i = 1, i1 do role:AddSkill(BattleSkillType.Normal, false, true, nil) @@ -2211,6 +2082,9 @@ local passivityList = { -- 如果是技能的伤害则判断加成 local onPassiveDamaging = function(func, target, damage, skill) + if skill and not skill.isTriggerJudge and judge==1 then + return + end --处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 and judge==1 then return @@ -2239,9 +2113,6 @@ local passivityList = { local f1 = args[1] -- 释放技能后 local onRoleHit = function(target,damage,bCrit,finalDmg,damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then local treat = floor(BattleUtil.FP_Mul(role:GetRoleData(RoleDataName.MaxHp), f1)) BattleUtil.CalTreat(role, role, treat) @@ -2457,9 +2328,6 @@ local passivityList = { local f1 = args[1] -- 释放技能后 local onRoleHit = function(target,damage,bCrit,finalDmg,damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then local buff = Buff.Create(role, BuffName.PropertyChange, 1, RoleDataName.Crit, f1, CountTypeName.Add) role:AddBuff(buff) @@ -2672,17 +2540,11 @@ local passivityList = { local index, tran local OnRoleDamageBefore = function(target,factorFunc,damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then index, tran = role:AddPropertyTransfer(BattlePropList[pro], f1, BattlePropList[pro], ct) end end local OnRoleDamageAfter = function(defRole,damageFunc,fixDamage,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if index and tran then role:RemovePropertyTransfer(index, tran) end @@ -2840,17 +2702,11 @@ local passivityList = { factorFunc(f1, dt) end role.Event:AddEvent(BattleEventName.SkillCast, function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill.type == BattleSkillType.Special then role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, tFactor) end end) role.Event:AddEvent(BattleEventName.SkillCastEnd, function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill.type == BattleSkillType.Special then role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, tFactor) end @@ -3079,9 +2935,6 @@ local passivityList = { local dot = args[1] local f1 = args[2] local function onHit(target,damage,bCrit,finalDmg,damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then local maxHp = role:GetRoleData(RoleDataName.MaxHp) local value = floor(BattleUtil.ErrorCorrection(maxHp* f1)) @@ -3090,9 +2943,6 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.RoleHit, onHit) end local onDamaging = function(func, target,damage,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then role.Event:AddEvent(BattleEventName.RoleHit, onHit) end @@ -3183,10 +3033,7 @@ local passivityList = { local f1 = args[2] local f2 = args[3] -- - local onRoleHit = function(defRole, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end + local onRoleHit = function(defRole, damage, bCrit, finalDmg, damageType, skill) if skill and skill.type == BattleSkillType.Normal and not defRole:IsDead() then if BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end) then local isBoss=BattleUtil.CheckIsBoss(defRole) @@ -3571,9 +3418,6 @@ local passivityList = { local i2 = args[2] -- 释放技能后 local onSkillEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local targets = skill:GetDirectTargets() if targets and #targets > i1 then BattleUtil.CalRage(role, role, i2, 1) @@ -3588,9 +3432,6 @@ local passivityList = { local i1 = args[1] -- 释放技能后 local onSkillEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill.type == BattleSkillType.Special then local list = RoleManager.Query(function(v) return v.camp == role.camp end) --生命最少改成生命百分比最少 2020/09/29 by:王振兴 @@ -3632,9 +3473,6 @@ local passivityList = { local dt = args[2] -- 直接伤害后 local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill and not skill.isAdd and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then local list = RoleManager.Query(function(v) return v.camp ~= role.camp end) BattleUtil.SortByHpFactor(list, 1) @@ -3659,9 +3497,6 @@ local passivityList = { local af = 0 local onSkillCast = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local maxNum = skill:GetMaxTargetNum() if maxNum and maxNum > 0 then af = BattleUtil.ErrorCorrection(f1/maxNum) @@ -3715,17 +3550,11 @@ local passivityList = { end local function onSkillCast(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill.type == BattleSkillType.Special then role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor) end end local function onSkillCastEnd(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill.type == BattleSkillType.Special then role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor) end @@ -3770,17 +3599,11 @@ local passivityList = { end local function onSkillCast(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.DeadSkill then role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor) end end local function onSkillCastEnd(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.DeadSkill then role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor) -- 对每个目标附加减伤盾 @@ -3804,9 +3627,6 @@ local passivityList = { local af = 0 local onSkillCast = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local maxNum = skill:GetMaxTargetNum() if maxNum and maxNum > 0 then af = BattleUtil.ErrorCorrection(f1/maxNum) @@ -3829,9 +3649,6 @@ local passivityList = { local dot = DotType.Poison local onRoleDamage = function(defRole, damage, bCrit, finalDmg, damageType, dotType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if dotType == dot then BattleUtil.ApplyTreat(role, role, floor(BattleUtil.ErrorCorrection(finalDmg * f1))) end @@ -3862,9 +3679,6 @@ local passivityList = { local i1 = args[1] local function onSkillCastEnd(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end -- 对每个目标附加减伤盾 local targets = skill:GetDirectTargetsNoMiss() if targets and #targets == 1 then @@ -3884,9 +3698,6 @@ local passivityList = { local af = 0 local onSkillCast = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local maxNum = skill:GetMaxTargetNum() if maxNum and maxNum > 0 then af = BattleUtil.ErrorCorrection(f1/maxNum) @@ -3934,9 +3745,6 @@ local passivityList = { local f1 = args[1] local onRoleHit = function(target,damage,bCrit,finalDmg,damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then local target = RoleManager.GetAliveAggro(role) BattleUtil.CalDamage(nil, role, target, 1, f1) @@ -3973,9 +3781,6 @@ local passivityList = { local i1 = args[1] local onSkillCastEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local effectGroup = skill.effectCaster.effectList[1] local chooseId = effectGroup.chooseId local chooseLimit = floor(chooseId / 10000) % 10 @@ -3996,9 +3801,6 @@ local passivityList = { [187] = function(role, args,id,judge) local f1 = args[1] local function onSkillCast(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill.type == BattleSkillType.Normal then role.data:AddValue(RoleDataName.Crit, f1) end @@ -4006,9 +3808,6 @@ local passivityList = { role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) local function onSkillCastEnd(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill.type == BattleSkillType.Normal then role.data:SubValue(RoleDataName.Crit, f1) end @@ -4104,9 +3903,6 @@ local passivityList = { local pro = args[1] local function onSkillTargetCheck(func,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local list = RoleManager.Query(function(r) return r.camp == (role.camp + 1) % 2 end) @@ -4124,9 +3920,6 @@ local passivityList = { local f1 = args[1] local onHit = function(target, damage, bCrit, finalDmg, dtype, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill and skill.type == BattleSkillType.Special then -- 检测技能伤害治疗加成 local f = BattleUtil.CheckSkillDamageHeal(f1, role, target) @@ -4198,9 +3991,6 @@ local passivityList = { local f1 = args[1] local OnRoleDamageBefore = function(defRole, factorFunc, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill then -- 计算概率 local cf = f1 @@ -4299,9 +4089,6 @@ local passivityList = { [197] = function(role, args,id,judge) local f1 = args[1] local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra) and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then BattleUtil.RandomAction(f1, function() BattleUtil.CalRage(role, role, target.Rage, CountTypeName.Add) @@ -4438,9 +4225,6 @@ local passivityList = { -- 直接伤害概率无法复活 local function onRoleHit(target,damage,bCrit,finalDmg,damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if target:IsDead() then if not BattleLogic.BuffMgr:HasBuff(role, BuffName.DOT, function (buff) return buff.damageType == dot or dot == 0 end) then BattleUtil.RandomAction(f2, function() @@ -4507,9 +4291,6 @@ local passivityList = { local f1 = args[1] local ct = args[2] local passivityDamaging = function(func, caster, damage, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill and func then local dd = BattleUtil.CountValue(damage, f1, ct) - damage func(-floor(BattleUtil.ErrorCorrection(dd))) @@ -4552,9 +4333,6 @@ local passivityList = { local dt = args[3] -- 释放技能后 local onSkillEnd = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill.type == BattleSkillType.Special then BattleUtil.RandomAction(f1, function() BattleLogic.WaitForTrigger(0.1, function() @@ -4697,9 +4475,6 @@ local passivityList = { local f1 = args[2] local function OnDamage(func, atkRole, defRole, damage, skill, dotType, bCrit, damageType) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if defRole.camp ~= role.camp then if skill or dotType then local list = RoleManager.Query(function(r) return r.camp == defRole.camp and r ~= defRole end) @@ -4888,9 +4663,6 @@ local passivityList = { role:AddBuff(Buff.Create(role, BuffName.Brand, 0, "YUAN")) -- 鸳 -- local function _OnRoleHit(target,damage,bCrit,finalDmg,damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(rand, function() local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[pro], f1, CountTypeName.Sub) buff.cover = true @@ -4922,9 +4694,6 @@ local passivityList = { role:AddBuff(Buff.Create(role, BuffName.Brand, 0, "YANG")) -- 鸯 -- local function _OnRoleHit(target,damage,bCrit,finalDmg,damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(rand, function() local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[pro], f1, CountTypeName.Sub) buff.cover = true @@ -4958,9 +4727,6 @@ local passivityList = { local i1 = args[3] local function _OnRoleHit(target, damage, _, finalDmg, _, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end -- BattleUtil.RandomDot(rand, dot, role, target, i1, 1, ) if skill and skill.type == BattleSkillType.Normal then BattleUtil.RandomAction(rand, function() @@ -4978,9 +4744,6 @@ local passivityList = { local f1 = args[2] local function _OnRoleHit(target,damage,bCrit,finalDmg,damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end BattleUtil.RandomAction(rand, function() -- local dd = floor(BattleUtil.ErrorCorrection(role:GetRoleData(RoleDataName.Attack)*f1)) BattleUtil.CalDamage(nil, role, target, 1, f1, 1) @@ -5010,9 +4773,6 @@ local passivityList = { local f1 = args[1] -- local onRoleHit = function(defRole, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end local isBoss=BattleUtil.CheckIsBoss(defRole) if isBoss then return @@ -5039,9 +4799,6 @@ local passivityList = { -- 杀敌回血 local onRoleHit = function(defRole, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill and defRole:IsDead() then -- 回血 local dd = floor(BattleUtil.ErrorCorrection(role:GetRoleData(BattlePropList[pro])*f1)) @@ -5057,9 +4814,6 @@ local passivityList = { local f1 = args[1] local OnPassiveDamaging = function(damagingFunc, target, damage,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end damagingFunc(-floor(BattleUtil.FP_Mul(f1, damage, BattleUtil.GetHPPencent(target)))) end role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging) @@ -5071,9 +4825,6 @@ local passivityList = { local f1 = args[1] local OnPassiveDamaging = function(damagingFunc, target, damage,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end damagingFunc(-floor(BattleUtil.FP_Mul(f1, damage, 1 - BattleUtil.GetHPPencent(role)))) end role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging) @@ -5322,9 +5073,6 @@ local passivityList = { local f1 = args[1] local f2=args[2] local onRoleHit = function(target,damage,bCrit,finalDmg,damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if target:IsDead() and not BattleUtil.CheckIsNoDead(target) and not role:IsDead() then -- local target = RoleManager.GetAliveAggro(role) --BattleUtil.CalDamage(nil, role, target, 1, f1) @@ -5486,9 +5234,6 @@ local passivityList = { -- 击杀数量累加 local OnRoleHit = function(defRole, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end --如果是技能并且这个被动已经被触发过 return if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then return @@ -5505,9 +5250,6 @@ local passivityList = { -- 释放技能时计算额外伤害 local OnSkillCast = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill then extra = f1 * killNum end @@ -5517,9 +5259,6 @@ local passivityList = { -- 造成伤害时判断额外伤害 local passivityDamaging = function(func, caster, damage, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill then if func then local dd = BattleUtil.CountValue(damage, extra, ct) - damage @@ -5536,9 +5275,6 @@ local passivityList = { local dot = args[1] local f1 = args[2] local function onHit(target, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end --如果是技能并且这个被动已经被触发过 return if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then return @@ -5567,9 +5303,6 @@ local passivityList = { [252] = function(role, args,id,judge) local i1 = args[1] local onHit = function(target, damage, bCrit, finalDmg,damageType,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end --如果是技能并且这个被动已经被触发过 return if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then return @@ -5592,9 +5325,6 @@ local passivityList = { local dt = args[2] -- 直接伤害后 local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end --如果是技能并且这个被动已经被触发����� return if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then return @@ -5623,9 +5353,6 @@ local passivityList = { [254] = function(role, args,id,judge) local f1 = args[1] local onRoleHit = function(target,damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end --如果是技能并且这个被动已经被触发过 return if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then return @@ -5647,9 +5374,6 @@ local passivityList = { [255] = function(role, args,id,judge) local f1 = args[1] local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end --如果是技能并且这个被动已经被触发过 return if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then return @@ -6456,9 +6180,6 @@ local passivityList = { local num=0 -- 直接伤害后 local onPassiveDamaging = function(func, defRole, damage,skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end --如果是boss 并且额外伤害是根据最大生命则返回 local isBoss=BattleUtil.CheckIsBoss(defRole) if isBoss and f1==12 then @@ -6474,10 +6195,7 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) --记录技能混乱敌人的数量 - local OnRoleHit = function(skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end + local OnRoleHit = function(skill) if skill and skill.owner==role and skill.type==BattleSkillType.Special then local list=skill:GetDirectTargetsNoMiss() if not list then @@ -6578,9 +6296,6 @@ local passivityList = { local f1 = args[2] local f2=args[3] local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill) - if skill and not skill.isTriggerJudge and judge==1 then - return - end --如果是技能并且这个被动已经被触发过 return if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then return @@ -6610,9 +6325,6 @@ local passivityList = { local ct3 = args[5] local f3 = args[6] local onSkillEffectBefore = function(skill, e, func) - if skill and not skill.isTriggerJudge and judge==1 then - return - end if skill.type == BattleSkillType.Special then if e.type == 120 then -- 当前只对技能效果103生效 local factor = BattleUtil.ErrorCorrection(BattleUtil.CountValue(e.args[8], f1, ct)) @@ -6811,9 +6523,6 @@ local passivityList = { if not skill or skill.type~= BattleSkillType.Special then return end - if skill and judge==1 and not skill.isTriggerJudge then - return - end BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function () --延迟一帧移除事件,才能抓到添加效果字典里面的效果 local tv = floor(BattleUtil.ErrorCorrection(role:GetRoleData(BattlePropList[pro]) * v1)) if tv and tv<=0 then diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua index 46920b10e8..32dad4a356 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua @@ -331,7 +331,7 @@ function RoleLogic:SkillCast(skill, func) noRageRate = noRageRate + rate costRage = costRage + cost end - self.Event:DispatchEvent(BattleEventName.RoleRageCost, costRage, noRageRate, _RageCostPassivity) + self.Event:DispatchEvent(BattleEventName.RoleRageCost, costRage, noRageRate, _RageCostPassivity,skill) -- 计算消耗怒气的概率,并消耗怒气 local costRate = 1 - noRageRate costRate = costRate > 1 and 1 or costRate