From f0fcd144f29e801303282e7ac141b6dd06b5c6d1 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Thu, 14 Oct 2021 13:54:07 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=3D=3D=3D=3D?= =?UTF-8?q?=3D=3D=E8=A2=AB=E5=8A=A8=E6=B7=BB=E5=8A=A0=20=20354=20355?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Battle/Logic/Base/Passivity.lua | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index bfb6623363..1c7db109e5 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -8423,6 +8423,60 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,role) end, + --回合开始前给自身增加[a][b]%的御甲,每场战斗触发[c]次 + --a[int 属性id], b[flaot], c[int] + [354]=function(role,args,id,judge) + local pro = args[1] + local v1 = args[2] + local num = args[3] + local time=0 + local onRoundStart= function(round) + if time>=num then + return + end + local val = floor(BattleUtil.FP_Mul(v1, role:GetRoleData(BattlePropList[pro]))) + --如果身上有御甲就添加御甲的值 + if role.bloodShield then + role.bloodShield:AddValue(val) + else--没有就上御甲buff + role:AddBuff(Buff.Create(role, BuffName.Blood,0, val)) + end + time=time+1 + end + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart,onRoundStart,nil,nil,role) + end, + + --[a]数回合,自身释放技能,己方全体神将 [b]属性[c]改变[d]%,持续[e]回合(e:0为永久) + --a[int 1:奇数 0:偶数 ] b[int 属性id], c[int 改变类型], d[float],e[int] + [355]=function(role,args,id,judge) + local type = args[1] + local pro = args[2] + local ct = args[3] + local v1 = args[4] + local round = args[5] + + local onSkillCast = function(skill) + if not skill then + return + end + local r=BattleLogic.GetCurRound() + if r%2~=type then + return + end + if skill and not skill.isTriggerJudge and judge==1 then + return + end + if skill.type==BattleSkillType.Special + or skill.type==BattleSkillType.Extra + or skill.type==BattleSkillType.DeadSkill then + local list = RoleManager.Query(function(v) return role.camp == v.camp end) + for _, r in pairs(list) do + r:AddBuff(Buff.Create(role, BuffName.PropertyChange, round, BattlePropList[pro],v1, ct)) + end + end + end + role.Event:AddEvent(BattleEventName.SkillCastBefore,onSkillCast,nil,nil,role) + end, } return passivityList \ No newline at end of file