From 071b7e62de536611217c84b1fd93e09b1e5ccf54 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Thu, 18 Nov 2021 11:06:19 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=3D=E8=A2=AB?= =?UTF-8?q?=E5=8A=A8362=20=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 | 48 +++++++++++++++++-- .../Battle/Logic/Misc/BattleDefine.lua | 1 + 2 files changed, 45 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 fa02a54f36..ee568d4e69 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -8797,14 +8797,18 @@ local passivityList = { role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging,nil,nil,role) end, - --处于[a]类型[b]效果的目标,获得御甲时得效果改变[c][d]%,[e](e 1:自身释放) - --a[int buff类型],b[int 具体类型],c[int 改变类型],d[float],e[int] + --处于[a]类型[b]效果的目标,获得御甲时得效果改变[c][d]%,[e](e 1:自身释放),改变概率[f](f不填为100%,a填0:为没有buff限制) + --a[int buff类型],b[int 具体类型],c[int 改变类型],d[float],e[int],f[float] [362]=function(role, args,id,judge) local type1 = args[1] local type2 = args[2] local ct = args[3] local v1 = args[4] local type3 = args[5] + local p1 = args[6] + if not p1 then + p1=1 + end local onPassiveBlood=function(func,trigger,caster,value) if not func then return @@ -8819,10 +8823,14 @@ local passivityList = { if BattleLogic.BuffMgr:HasBuff(trigger, type1, nil) then isPlay=true end + elseif type1==0 then + isPlay=true end if isPlay and func then - local dd = BattleUtil.CountValue(value,v1, ct) - value - func(floor(BattleUtil.ErrorCorrection(dd))) + BattleUtil.RandomAction(p1,function() + local dd = BattleUtil.CountValue(value,v1, ct) - value + func(floor(BattleUtil.ErrorCorrection(dd))) + end) end end BattleLogic.Event:AddEvent(BattleEventName.BloodValuePassiveChange,onPassiveBlood,nil,nil,role) @@ -9635,6 +9643,38 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.RoleTurnStart,onSkillCast,nil,nil,role) end, + --非[a]职业神将[b]怒气时,有[c]概率使目标[d]属性[e]改变[f]%,持续[g]回合 + --a[int],b[int],c[float],d[int],e[int],f[float],g[int] + [388]=function(role,args,id,judge) + local prof = args[1] + local ct1 = args[2] + local pro = args[3] + local p1 = args[4] + local ct2 = args[5] + local v1 = args[6] + local round = args[7] + local onRageChange = function(caster, target, deltaRage, countType, value) + if caster~=role then + return + end + + if countType~=ct1 then + return + end + if target.camp~=role.camp then + return + end + if prof~=0 and caster.job==prof then + return + end + + BattleUtil.RandomAction(pro,function() + target:AddBuff(Buff.Create(role, BuffName.PropertyChange,round, BattlePropList[p1],v1, ct2)) + end) + + end + BattleLogic.Event:AddEvent(BattleEventName.RecordRageChange, onRageChange,nil,nil,role) + end, } diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua index 0bcafc3cf2..9ffb438f61 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua @@ -183,6 +183,7 @@ BattleEventName = { TemporaryChangeCrit = indexAdd(),--临时改变暴击率 RoleAddCtrlBuff = indexAdd(),--角色添加控制类buff CastRageBrfore = indexAdd(),--扣除怒气之前 + PassiveAddCritDamageFactor = indexAdd(), --被动增加爆伤系数 } BattleMaxFrame = 1000000