From d83cf97ae2997c7bd59a023cfbe54a7ea701425a Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Fri, 24 Sep 2021 17:40:08 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=3D=3D=3D?= =?UTF-8?q?=3D=3D=3D=3D=3D=3D=3D=E8=A2=AB=E5=8A=A893=20=20=20307=20=20=203?= =?UTF-8?q?09=20=20=20351=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Battle/Logic/Base/Passivity.lua | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 4d1ec51847..64105d42c4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -1609,7 +1609,7 @@ local passivityList = { if skill and not skill.isTriggerJudge and judge==1 then return end - if skill.type == BattleSkillType.Special then + if skill.type == BattleSkillType.Special or skill.type == BattleSkillType.DeadSkill then role.Event:AddEvent(BattleEventName.PassiveTreating, passiveTreating,nil,nil,role) end end @@ -1617,7 +1617,7 @@ local passivityList = { if skill and not skill.isTriggerJudge and judge==1 then return end - if skill.type == BattleSkillType.Special then + if skill.type == BattleSkillType.Special or skill.type == BattleSkillType.DeadSkill then role.Event:RemoveEvent(BattleEventName.PassiveTreating, passiveTreating) end end @@ -7023,18 +7023,16 @@ local passivityList = { if role:IsDead() then return end - -- if skill and not skill.isTriggerJudge and judge==1 then - -- return - -- end - -- LogYellow("307 1") - if skill and (skill.type==BattleSkillType.Special or skill.type== BattleSkillType.Extra or skill.type== BattleSkillType.Monster) then --技能造成的直接伤害 + if skill and (skill.type==BattleSkillType.Special or skill.type== BattleSkillType.Extra or skill.type== BattleSkillType.DeadSkill) then --技能造成的直接伤害 local list = RoleManager.NoOrder(function(v) return v.camp == role.camp end) BattleUtil.SortByHpFactor(list, 1) - -- LogYellow("307 2") if list[1] then - -- LogYellow("307 3") local val = floor(BattleUtil.FP_Mul(f1, list[1]:GetRoleData(BattlePropList[pro]))) - BattleUtil.CalTreat(role, list[1], val) + if pro==12 then + BattleUtil.FinalTreat(role, list[1], val) + else + BattleUtil.CalTreat(role, list[1], val) + end end end end @@ -7089,11 +7087,26 @@ local passivityList = { local ctr2 = args[3] local ctr3 = args[4] local ctr4 = args[5] - local SkillCast = function(damagingFunc, defRole, damage, skill) + local ctrls={} + if ctrl then + table.insert(ctrls,ctrl) + end + if ctr2 then + table.insert(ctrls,ctr2) + end + if ctr3 then + table.insert(ctrls,ctr3) + end + local SkillCast = function(skill) + if not skill then + return + end + if skill.type ~= BattleSkillType.Special and skill.type ~= BattleSkillType.Extra and skill.type ~= BattleSkillType.DeadSkill then + return + end local list = RoleManager.Query(function(v) return v.camp == role.camp end) BattleUtil.SortByHpFactor(list, 1) local target = nil - -- LogYellow("309 1: "..#list) for i = 1, #list do if not list[i]:IsRealDead() then target = list[i] @@ -7101,10 +7114,8 @@ local passivityList = { end end if target and target.roleData.element==ele then - -- LogYellow("309 2") BattleLogic.BuffMgr:ClearBuff(target, function(buff) - -- LogYellow("309 3: "..buff.type.." "..buff.ctrlType) - return buff.type == BuffName.Control and (buff.ctrlType == ctrl or buff.immuneType == ctr2 or buff.immuneType == ctr3 or buff.immuneType == ctr4) + return buff.type == BuffName.Control and BattleUtil.ChecklistIsContainValue(ctrls,buff.ctrlType) end) end end @@ -8287,7 +8298,7 @@ local passivityList = { end, - --每回合开始,为自己添加[a][b]%的御甲 + --自身行动回合开始前,为自己添加[a][b]%的御甲 --a[int],b[float] [351] = function(role, args,id,judge) local pro = args[1] @@ -8301,7 +8312,7 @@ local passivityList = { role:AddBuff(Buff.Create(role, BuffName.Blood,0, val)) end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart, onRoundChange,nil,nil,role) + role.Event:AddEvent(BattleEventName.RoleTurnStart, onRoundChange,nil,nil,role) end, -- 行动击杀目标,追加[a]次普攻 -- a[int]