From 7f9e88d0e3097d89a1e326c5ff71796073291849 Mon Sep 17 00:00:00 2001 From: lvxinran Date: Thu, 31 Oct 2019 14:49:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=98=E6=96=97=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luafight/Modules/Battle/Logic/Base/Effect.lua | 18 ++++++------------ .../Modules/Battle/Logic/Base/Passivity.lua | 14 +++++++++++++- luafight/Modules/Battle/Logic/BattleLogic.lua | 2 +- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/luafight/Modules/Battle/Logic/Base/Effect.lua b/luafight/Modules/Battle/Logic/Base/Effect.lua index 494d6ab39..683d7b9cb 100644 --- a/luafight/Modules/Battle/Logic/Base/Effect.lua +++ b/luafight/Modules/Battle/Logic/Base/Effect.lua @@ -1111,13 +1111,12 @@ local effectList = { end end) end, - --造成[a]%的[b]伤害,自身每种/每层增益状态会提高此技能[c]%的伤害。 + --造成[a]%的[b]伤害,自身每种/每层增益状态会提高此技能[c]%的伤害。【aoe】 --a[float],b[伤害类型],c[float] [64] = function(caster, target, args, interval) local f1 = args[1] local dt = args[2] local f2 = args[3] - caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target) BattleLogic.WaitForTrigger(interval, function () local factor = 0 BattleLogic.BuffMgr:QueryBuff(caster, function (buff) @@ -1163,7 +1162,7 @@ local effectList = { end end) end, - --造成[a]%的[b]伤害,[c]的概率附加一层增伤印记,最大[d]层。目标身上每层印记增加此技能[e]%的伤害。 + --造成[a]%的[b]伤害,[c]的概率附加一层增伤印记,最大[d]层。目标身上每层印记增加此技能[e]%的伤害。【aoe】 --a[float],b[伤害类型],c[float],d[int],e[float] [66] = function(caster, target, args, interval) local f1 = args[1] @@ -1171,7 +1170,6 @@ local effectList = { local f2 = args[3] local i1 = args[4] local f3 = args[5] - caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target) BattleLogic.WaitForTrigger(interval, function () local brand = Buff.Create(caster, BuffName.Brand, 0, "zengshang") brand.maxLayer = i1 @@ -1222,14 +1220,13 @@ local effectList = { end) end end, - --造成[a]%的[b]伤害,附带持续伤害,每秒造成目标最大生命值[c]%的真实伤害,持续[d]秒。(目标最大生命值伤害总上限为施法者2.5倍攻击) + --造成[a]%的[b]伤害,附带持续伤害,每秒造成目标最大生命值[c]%的真实伤害,持续[d]秒。(目标最大生命值伤害总上限为施法者2.5倍攻击)【aoe】 --a[float],b[伤害类型],c[float],d[int] [68] = function(caster, target, args, interval) local f1 = args[1] local dt = args[2] local f2 = args[3] local f3 = args[4] - caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target) BattleLogic.WaitForTrigger(interval, function () BattleUtil.CalDamage(caster, target, dt, f1) local dot = Buff.Create(caster, BuffName.DOT, f3, 1, 0, min(floor(target:GetRoleData(RoleDataName.MaxHp)*f2), floor(caster:GetRoleData(RoleDataName.Attack)*2.5)), 1) @@ -1247,13 +1244,12 @@ local effectList = { target.data:SubValue(RoleDataName.Hp, hp) end) end, - --造成[a]%的[b]伤害,每损失[c]%的生命,增加本技能[d]%的伤害。 + --造成[a]%的[b]伤害,每损失[c]%的生命,增加本技能[d]%的伤害。【aoe】 --a[float],b[伤害类型],c[float],d[float] [70] = function(caster, target, args, interval) local f1 = args[1] local dt = args[2] local f2 = args[3] - caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target) BattleLogic.WaitForTrigger(interval, function () local factor = 1 - BattleUtil.GetHPPencent(caster) local OnPassiveDamaging = function(damagingFunc, defRole, damage) @@ -1306,12 +1302,11 @@ local effectList = { buffRandomAction(f3, target, Buff.Create(caster, BuffName.DOT, f2, 1, d1, dt, f1)) end) end, - --造成[a]%的[b]伤害,立即结算目标身上所有dot的剩余伤害。 + --造成[a]%的[b]伤害,立即结算目标身上所有dot的剩余伤害。【aoe】 --a[float],b[伤害类型] [73] = function(caster, target, args, interval) local f1 = args[1] local dt = args[2] - caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target) BattleLogic.WaitForTrigger(interval, function () BattleUtil.CalDamage(caster, target, dt, f1) BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) @@ -1752,7 +1747,7 @@ local effectList = { end end) end, - --造成[a]%的[b]伤害,若暴击,[c]概率驱散[d]个(0表示所有)[e]状态。 + --造成[a]%的[b]伤害,若暴击,[c]概率驱散[d]个(0表示所有)[e]状态。【aoe】 --a[float],b[伤害类型],c[float],d[int],e[状态类型] [93] = function(caster, target, args, interval) local f1 = args[1] @@ -1760,7 +1755,6 @@ local effectList = { local f2 = args[3] local i1 = args[4] local ct = args[5] - caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target) BattleLogic.WaitForTrigger(interval, function () local dmg, crit = BattleUtil.CalDamage(caster, target, dt, f1) if crit then diff --git a/luafight/Modules/Battle/Logic/Base/Passivity.lua b/luafight/Modules/Battle/Logic/Base/Passivity.lua index 8a0311d2d..a991b9988 100644 --- a/luafight/Modules/Battle/Logic/Base/Passivity.lua +++ b/luafight/Modules/Battle/Logic/Base/Passivity.lua @@ -1281,7 +1281,6 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.RoleKill, OnKill) end, - --受击后,[a]对攻击者造成自身[c]%的[d]伤害。 --a[float],c[float],d[伤害类型] [71] = function(role, args) @@ -1305,5 +1304,18 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) end, + --造成的伤害暴击时,有[a]概率在计算伤害时额外计算[b]的暴击伤害。 + --a[float],b[float] + [72] = function(role, args) + local f1 = args[1] + local f2 = args[2] + + local OnPassiveCriting = function(crit) + BattleUtil.RandomAction(f1, function () + crit(role:GetRoleData(RoleDataName.CritDamageFactor)+f2) + end) + end + role.Event:AddEvent(BattleEventName.PassiveCriting, OnPassiveCriting) + end, } return passivityList \ No newline at end of file diff --git a/luafight/Modules/Battle/Logic/BattleLogic.lua b/luafight/Modules/Battle/Logic/BattleLogic.lua index 310a295eb..a6b9ef3f2 100644 --- a/luafight/Modules/Battle/Logic/BattleLogic.lua +++ b/luafight/Modules/Battle/Logic/BattleLogic.lua @@ -28,7 +28,7 @@ local record local optionRecord --是否开启战斗日志 -BattleLogic.IsOpenBattleRecord = true +BattleLogic.IsOpenBattleRecord = false --逻辑帧频 BattleLogic.GameFrameRate = 30 BattleLogic.GameDeltaTime = 1 / BattleLogic.GameFrameRate