From d54fb77bdabeba9f66654aa797d8afaca4ab57e8 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Wed, 11 Nov 2020 16:38:37 +0900 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=A7=89=E9=86=92=E8=A2=AB=E5=8A=A8=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Battle/Logic/Base/Passivity.lua | 279 +++++++++++++++++- .../~Lua/Modules/Battle/Logic/Buff/Immune.lua | 18 +- 2 files changed, 284 insertions(+), 13 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 5286ff914f..045776ef3a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -664,7 +664,7 @@ local passivityList = { local OnPassiveDamaging = function(damagingFunc) damagingFunc(-f1) end - role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamiaging, OnPassiveDamaging) end, --进入战斗[a]秒后,造成的伤害提升[b],持续[c]秒 @@ -1706,7 +1706,7 @@ local passivityList = { local arr = RoleManager.Query(function (r) return r.camp == role.camp end) BattleUtil.SortByHpFactor(arr, 1) - -- 检测技能伤害治疗加成 + -- 检测技能伤害��疗加成 local f = BattleUtil.CheckSkillDamageHeal(f1, role, arr[1]) -- 治疗血量最低队友实际伤害的f1% BattleUtil.ApplyTreat(role, arr[1], floor(BattleUtil.ErrorCorrection(allDamage*f))) @@ -3794,20 +3794,28 @@ local passivityList = { local immune = function(buff) return buff.type == BuffName.Control and (BattleUtil.ChecklistIsContainValue(ctrls,buff.ctrlType)) end - + local curBuff=nil BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, function(curRound) -- 第i1回合开始 if curRound == 1 then - role.buffFilter:Add(immune) + -- role.buffFilter:Add(immune) + curBuff=Buff.Create(role, BuffName.Immune, 1,4,immune) + role:AddBuff(curBuff) end -- 第i1+i2回合结束 if curRound == 2 then - for i = 1, role.buffFilter.size do - if role.buffFilter.buffer[i] == immune then - role.buffFilter:Remove(i) - break - end + -- for i = 1, role.buffFilter.size do + -- if role.buffFilter.buffer[i] == immune then + -- role.buffFilter:Remove(i) + -- break + -- end + -- end + if curBuff then + BattleLogic.BuffMgr:ClearBuff(role, function (buff) + return buff==curBuff + end) end + end end) end, @@ -5007,7 +5015,7 @@ local passivityList = { local dt = args[2] -- 直接伤害后 local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill) - --如果是技能并且这个被动已经被触发过 return + --如果是技能并且这个被动已经被触发����� return if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,253) then return end @@ -5096,5 +5104,256 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) end, + --技能击杀目标溢出伤害的[a]%将对生命百分比最高的攻击目标造成伤害 + [257]=function(role,args) + local f1 = args[1] + local dt = args[2] + -- 直接伤害后 + local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill) + if skill and skill.owner==role and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra) and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then + local dmg= floor(BattleUtil.ErrorCorrection((finalDmg-damage)*f1)) + LogError("溢出伤害:"..dmg) + local list = RoleManager.Query(function(v) return v.camp ~= role.camp end) + list = BattleUtil.SortByHpFactor(list,0) + if not list[1]:IsDead() then + BattleUtil.ApplyDamage(nil,target,list[1],dmg) + end + end + end + role.Event:AddEvent(BattleEventName.RoleBeHit, onRoleHit) + end, + --技能追加的普攻额外造成目标[a][b]%的伤害。 + [258]=function(role,args) + local f1 = args[1] + local dt = args[2] + -- 直接伤害后 + local onPassiveDamaging = function(func, defRole, damage,skill) + if skill and skill.type == BattleSkillType.Normal and skill.isAdd then + local val = -floor(BattleUtil.FP_Mul(dt, defRole:GetRoleData(BattlePropList[f1]))) + if func then + func(val) + end + end + end + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + end, + -- 释放技能[a][b]%概率命中 + -- a[int], b[float] + [259] = function(role, args) + local pro = args[1] + local f1 = args[2] + local function onSkillCast(skill) + if skill.type ~= BattleSkillType.Normal then + role.data:AddValue(BattlePropList[pro], f1) + end + end + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) + + local function onSkillCastEnd(skill) + if skill.type ~= BattleSkillType.Normal then + role.data:SubValue(BattlePropList[pro], f1) + end + end + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + end, + --释放技能时,如果目标怒气不足[a]点,技能伤害额外[b] [c]% + -- a[a,怒气值]b[改变类型]c[float] + [260]=function(role,args) + local anger = args[1] + local type = args[2] + local v1 = args[3] + local onPassiveDamaging = function(func, defRole, damage,skill) + --怒气小于规定值 + if defRole.Rage0 and releaseNum%num==0 and addNum