From afd51eb5b104c057879918e407a2776f9b23acf0 Mon Sep 17 00:00:00 2001 From: wangyuan Date: Mon, 19 Aug 2019 10:54:08 +0800 Subject: [PATCH] battle --- luafight/Modules/Battle/Logic/Base/Passivity.lua | 2 +- luafight/Modules/Battle/Logic/Misc/BattleUtil.lua | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/luafight/Modules/Battle/Logic/Base/Passivity.lua b/luafight/Modules/Battle/Logic/Base/Passivity.lua index 6a106f4d1..b35f98d37 100644 --- a/luafight/Modules/Battle/Logic/Base/Passivity.lua +++ b/luafight/Modules/Battle/Logic/Base/Passivity.lua @@ -129,7 +129,7 @@ local passivityList = { BattleUtil.RandomAction(f1, function () local arr = BattleUtil.ChooseTarget(role, 10001) if arr[1] then - arr[1]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f3, propertyList[pro1], floor(role:GetRoleData(propertyList[pro2]) * f2), 1)) + arr[1]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f3, propertyList[pro2], floor(role:GetRoleData(propertyList[pro1]) * f2), 1)) end end) end diff --git a/luafight/Modules/Battle/Logic/Misc/BattleUtil.lua b/luafight/Modules/Battle/Logic/Misc/BattleUtil.lua index ed9779fd0..70c28912f 100644 --- a/luafight/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/luafight/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -194,12 +194,12 @@ function BattleUtil.ApplyDamage(atkRole, defRole, damage, bCrit, damageType, isD atkRole.Event:DispatchEvent(BattleEventName.RoleDamage, defRole, damage, bCrit, finalDmg, damageType) defRole.Event:DispatchEvent(BattleEventName.RoleBeDamaged, atkRole, damage, bCrit, finalDmg, damageType) if bCrit then - atkRole.Event:DispatchEvent(BattleEventName.RoleCrit, defRole) - defRole.Event:DispatchEvent(BattleEventName.RoleBeCrit, atkRole) + atkRole.Event:DispatchEvent(BattleEventName.RoleCrit, defRole, damage, bCrit, finalDmg, damageType) + defRole.Event:DispatchEvent(BattleEventName.RoleBeCrit, atkRole, damage, bCrit, finalDmg, damageType) end if not isDot then - atkRole.Event:DispatchEvent(BattleEventName.RoleHit, defRole) - defRole.Event:DispatchEvent(BattleEventName.RoleBeHit, atkRole) + atkRole.Event:DispatchEvent(BattleEventName.RoleHit, defRole, damage, bCrit, finalDmg, damageType) + defRole.Event:DispatchEvent(BattleEventName.RoleBeHit, atkRole, damage, bCrit, finalDmg, damageType) end end return finalDmg