战斗逻辑
parent
b6747e3746
commit
521edb1bfe
|
@ -142,7 +142,7 @@ function Skill:Cast()
|
||||||
|
|
||||||
if not self.isTeamSkill then
|
if not self.isTeamSkill then
|
||||||
local type = BattleLogic.Type
|
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
|
local time = 0
|
||||||
if isPVEMonster then
|
if isPVEMonster then
|
||||||
if self.owner.superSkill == self then
|
if self.owner.superSkill == self then
|
||||||
|
|
|
@ -12,7 +12,7 @@ local curFrame
|
||||||
local playerSkillUsable
|
local playerSkillUsable
|
||||||
local enemySkillUsable
|
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.IsEnd = false
|
||||||
BattleLogic.Result = -1
|
BattleLogic.Result = -1
|
||||||
BattleLogic.Event = BattleEvent.New()
|
BattleLogic.Event = BattleEvent.New()
|
||||||
|
@ -28,7 +28,7 @@ local record
|
||||||
local optionRecord
|
local optionRecord
|
||||||
|
|
||||||
--是否开启战斗日志
|
--是否开启战斗日志
|
||||||
BattleLogic.IsOpenBattleRecord = false
|
BattleLogic.IsOpenBattleRecord = true
|
||||||
--逻辑帧频
|
--逻辑帧频
|
||||||
BattleLogic.GameFrameRate = 30
|
BattleLogic.GameFrameRate = 30
|
||||||
BattleLogic.GameDeltaTime = 1 / BattleLogic.GameFrameRate
|
BattleLogic.GameDeltaTime = 1 / BattleLogic.GameFrameRate
|
||||||
|
@ -450,10 +450,19 @@ function BattleLogic.GetAggro(role)
|
||||||
end
|
end
|
||||||
return target
|
return target
|
||||||
end
|
end
|
||||||
--获取对位相邻站位的人 chooseType 1 我方 2 敌方(若对位的敌人死亡,则选取相邻最近的作为目标)
|
--获取对位相邻站位的人 chooseType 1 我方 2 敌方(对位的敌人受到嘲讽的影响,若对位的敌人死亡,则选取相邻最近的作为目标)
|
||||||
function BattleLogic.GetNeighbor(role, chooseType)
|
function BattleLogic.GetNeighbor(role, chooseType)
|
||||||
local posList = {}
|
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
|
if target then
|
||||||
local list = BattleLogic.Query(function (r) return r.camp == target.camp end)
|
local list = BattleLogic.Query(function (r) return r.camp == target.camp end)
|
||||||
for i=1, #list do
|
for i=1, #list do
|
||||||
|
|
Loading…
Reference in New Issue