diff --git a/luafight/Modules/Battle/Logic/BattleLogic.lua b/luafight/Modules/Battle/Logic/BattleLogic.lua index e7a6ca993..8fe676ea0 100644 --- a/luafight/Modules/Battle/Logic/BattleLogic.lua +++ b/luafight/Modules/Battle/Logic/BattleLogic.lua @@ -43,6 +43,8 @@ BattleLogic.TotalOrder = 0 --当前波次 BattleLogic.CurOrder = 0 +local maxFrame = BattleLogic.GameFrameRate * 300 --战斗最大用时5分钟,超时判负 + local actionPool = BattleObjectPool.New(function () return { 0, 0 } end) @@ -317,6 +319,10 @@ local tmpObj, index, bMyAllDead, bEnemyAllDead function BattleLogic.Update() curFrame = curFrame + 1 + if curFrame > maxFrame then + BattleLogic.BattleEnd(0) + return + end for i=1, #optionRecord do if optionRecord[i][1] == curFrame then