Merge branch 'master' of http://60.1.1.230/backend/jieling_server into robottest
parent
5b576dac17
commit
1bab175888
|
@ -84,6 +84,20 @@ function BattleLogic.Init(data, optionData, maxRound)
|
||||||
BattleLogManager.Init(fightData)
|
BattleLogManager.Init(fightData)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 检测先手阵营
|
||||||
|
function BattleLogic.CheckFirstCamp()
|
||||||
|
-- 默认我方先手
|
||||||
|
BattleLogic.FirstCamp = 0
|
||||||
|
-- 数据不存在时,兼容老战斗数据
|
||||||
|
if not fightData.playerData.firstCamp and not fightData.enemyData[BattleLogic.CurOrder].firstCamp then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- 敌方先手
|
||||||
|
if fightData.playerData.firstCamp == 0 and fightData.enemyData[BattleLogic.CurOrder].firstCamp == 1 then
|
||||||
|
BattleLogic.FirstCamp = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function BattleLogic.StartOrder()
|
function BattleLogic.StartOrder()
|
||||||
--
|
--
|
||||||
BattleLogic.CurOrder = BattleLogic.CurOrder + 1
|
BattleLogic.CurOrder = BattleLogic.CurOrder + 1
|
||||||
|
@ -104,7 +118,8 @@ function BattleLogic.StartOrder()
|
||||||
RoleManager.AddRole(orderList[i], orderList[i].position)
|
RoleManager.AddRole(orderList[i], orderList[i].position)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- 检测先后手
|
||||||
|
BattleLogic.CheckFirstCamp()
|
||||||
-- 开始战斗,延时一帧执行,避免战斗还没开始就释放了技能
|
-- 开始战斗,延时一帧执行,避免战斗还没开始就释放了技能
|
||||||
BattleLogic.TurnRoundNextFrame()
|
BattleLogic.TurnRoundNextFrame()
|
||||||
end
|
end
|
||||||
|
@ -156,7 +171,7 @@ function BattleLogic.TurnRound(debugTurn)
|
||||||
-- 第一次进入 或者 本轮结束 初始化流程状态
|
-- 第一次进入 或者 本轮结束 初始化流程状态
|
||||||
if CurRound == 0 or (CurSkillPos[0] == 6 and CurSkillPos[1] == 6) then
|
if CurRound == 0 or (CurSkillPos[0] == 6 and CurSkillPos[1] == 6) then
|
||||||
CurRound = CurRound + 1
|
CurRound = CurRound + 1
|
||||||
CurCamp = 0
|
CurCamp = BattleLogic.FirstCamp -- 判断先手阵营
|
||||||
CurSkillPos[0] = 0
|
CurSkillPos[0] = 0
|
||||||
CurSkillPos[1] = 0
|
CurSkillPos[1] = 0
|
||||||
--
|
--
|
||||||
|
|
Loading…
Reference in New Issue