From 521edb1bfe3f2d1c436f541d0cdd1c0ba98bdfbc Mon Sep 17 00:00:00 2001 From: lvxinran Date: Thu, 31 Oct 2019 14:49:13 +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/Skill.lua | 2 +- luafight/Modules/Battle/Logic/BattleLogic.lua | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/luafight/Modules/Battle/Logic/Base/Skill.lua b/luafight/Modules/Battle/Logic/Base/Skill.lua index 760049e17..bd9d51746 100644 --- a/luafight/Modules/Battle/Logic/Base/Skill.lua +++ b/luafight/Modules/Battle/Logic/Base/Skill.lua @@ -142,7 +142,7 @@ function Skill:Cast() if not self.isTeamSkill then local type = BattleLogic.Type - local isPVEMonster = self.owner.camp == 1 and (type == 1 or type == 2 or type == 4 or type == 5) + local isPVEMonster = self.owner.camp == 1 and (type == 1 or type == 2 or type == 4 or type == 5 or type == 8) local time = 0 if isPVEMonster then if self.owner.superSkill == self then diff --git a/luafight/Modules/Battle/Logic/BattleLogic.lua b/luafight/Modules/Battle/Logic/BattleLogic.lua index a8602ef71..310a295eb 100644 --- a/luafight/Modules/Battle/Logic/BattleLogic.lua +++ b/luafight/Modules/Battle/Logic/BattleLogic.lua @@ -12,7 +12,7 @@ local curFrame local playerSkillUsable local enemySkillUsable -BattleLogic.Type = 0 --1 故事副本 2 地图探索 3 竞技场 4 秘境boss 5 解锁秘境 6 公会战 7 血战 +BattleLogic.Type = 0 --1 故事副本 2 地图探索 3 竞技场 4 秘境boss 5 解锁秘境 6 公会战 7 血战 8 兽潮 BattleLogic.IsEnd = false BattleLogic.Result = -1 BattleLogic.Event = BattleEvent.New() @@ -28,7 +28,7 @@ local record local optionRecord --是否开启战斗日志 -BattleLogic.IsOpenBattleRecord = false +BattleLogic.IsOpenBattleRecord = true --逻辑帧频 BattleLogic.GameFrameRate = 30 BattleLogic.GameDeltaTime = 1 / BattleLogic.GameFrameRate @@ -450,10 +450,19 @@ function BattleLogic.GetAggro(role) end return target end ---获取对位相邻站位的人 chooseType 1 我方 2 敌方(若对位的敌人死亡,则选取相邻最近的作为目标) +--获取对位相邻站位的人 chooseType 1 我方 2 敌方(对位的敌人受到嘲讽的影响,若对位的敌人死亡,则选取相邻最近的作为目标) function BattleLogic.GetNeighbor(role, chooseType) local posList = {} - local target = chooseType == 1 and role or BattleLogic.GetAggro(role) + local target + if chooseType == 1 then + target = role + else + if role.lockTarget and not role.lockTarget.isDead then + target = role.lockTarget + else + target = BattleLogic.GetAggro(role) + end + end if target then local list = BattleLogic.Query(function (r) return r.camp == target.camp end) for i=1, #list do