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