From 292df633085903f8e67410851045a3066f29b0a1 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Mon, 6 Dec 2021 14:34:23 +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=E8=A2=AB=E5=8A=A8=20187=20=20276=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Base/Passivity.lua | 14 +++++++++++--- .../~Lua/Modules/Battle/Logic/Role/RoleLogic.lua | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 664473e330..47173bb648 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -3917,16 +3917,20 @@ local passivityList = { -- a[float] [187] = function(role, args,id,judge) local f1 = args[1] + local isMustCrit=false local function onSkillCast(skill) if skill.type == BattleSkillType.Normal then - role.data:AddValue(RoleDataName.Crit, f1) + -- role.data:AddValue(RoleDataName.Crit, f1) + isMustCrit=role.mustCrit + role.mustCrit=true end end role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) local function onSkillCastEnd(skill) if skill.type == BattleSkillType.Normal then - role.data:SubValue(RoleDataName.Crit, f1) + --role.data:SubValue(RoleDataName.Crit, f1) + role.mustCrit=isMustCrit end end role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) @@ -6277,7 +6281,11 @@ local passivityList = { for i = 1, #list do if i<=num then if not list[i]:IsDead() then - local buff=Buff.Create(role, BuffName.Immune,round,1) + local ctrls={1,2,7} + local immune = function(buff) + return buff.type == BuffName.Control and (BattleUtil.ChecklistIsContainValue(ctrls,buff.ctrlType)),role + end + local buff=Buff.Create(role, BuffName.Immune,round,4,immune) list[i]:AddBuff(buff) end end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua index 8735dbd58e..51cb324e07 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua @@ -136,7 +136,7 @@ function RoleLogic:Init(uid, data, position) if #coverArgs>=i+i+1 then value=coverArgs[i+i+1] end - if id~=0 and value~=0 and #args>=id and args[id] then + if id~=0 and #args>=id and args[id] then args[id]=value end end @@ -371,6 +371,7 @@ function RoleLogic:AddBuff(buff,_ignorePro) "id", buff.id, "type", buff.type) BattleLogic.BuffMgr:PutBuff(buff) + self.Event:DispatchEvent(BattleEventName.ShowHintText, BattleArtFontType.Immune) BattleLogic.Event:DispatchEvent(BattleEventName.ImmuneDebuffSuccess,buff,self,immCaster) BattleLogic.Event:DispatchEvent(BattleEventName.RoleAddBuffFail,buff,self) return