From 7b7879ce892d630129853a76412eb57311f69972 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Wed, 20 Oct 2021 22:00:01 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=3D=3D=3D=3D?= =?UTF-8?q?=E6=95=88=E6=9E=9C130=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/Effect.lua | 4 ++- .../~Lua/Modules/Battle/Logic/Buff/DOT.lua | 8 ++--- .../Logic/Monster/MonsterSkill/MCondition.lua | 31 +++++++++---------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua index 6a20d820fa..9f2294ecb0 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua @@ -2442,7 +2442,9 @@ local effectList = { local round = args[3] BattleLogic.WaitForTrigger(interval, function () local damage=floor(caster.teamDamage*f1)+v1 - target:AddBuff(Buff.Create(caster, BuffName.DOT,round, 1,3,damage)) + local buff=Buff.Create(caster, BuffName.DOT,round, 1,3,damage) + buff.isRealDamage=true + target:AddBuff(buff) end) end, --对目标造成神佑状态,造成主角战斗力[a]%+[b]的血量,持续[c]回合,溢出部分转化为御甲 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/DOT.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/DOT.lua index c4c03b4024..449d7304f4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/DOT.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/DOT.lua @@ -19,14 +19,14 @@ function DOT:SetData(...) -- 刷新排序等级 self.sort = 2 - if self.damageType == 3 then -- 流血buff在行动之后刷新 - self.sort = 3 - end + -- if self.damageType == 3 then -- 流血buff在行动之后刷新 + -- self.sort = 3 + -- end end --初始化后调用一次 function DOT:OnStart() - if self.caster.isTeam then + if self.caster.isTeam or self.caster.type == BattleUnitType.Player then self.isRealDamage = true end end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MCondition.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MCondition.lua index 598eb00eac..7feb4d77fc 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MCondition.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MCondition.lua @@ -1,7 +1,7 @@ MCondition = {} local this = MCondition -local castRound=0 +local skillRound={} local _ConditionConfig = { [0] = function(skill, condition) --0:无限制条件 return true @@ -141,19 +141,18 @@ local _ConditionConfig = { -- 获取当前回合 - return true - -- local curRound = BattleLogic.GetCurRound() - -- if castRound==0 then - -- castRound=curRound - -- return true - -- else - -- if curRound==castRound+comValue then - -- castRound=curRound - -- LogError("22222") - -- return true - -- end - -- end - -- return false + --return true + local curRound = BattleLogic.GetCurRound() + if not skillRound[skill.id] then + skillRound[skill.id]=curRound + return true + else + if curRound==skillRound[skill.id]+comValue then + skillRound[skill.id]=curRound + return true + end + end + return false end, } @@ -170,8 +169,8 @@ end -- 清除缓存 function MCondition.ClearCache() - if castRound then - castRound=0 + if skillRound then + skillRound={} end end