同步战斗

back_recharge
zhangshanxue 2020-06-17 14:45:45 +08:00
parent 6519567756
commit c9f8fe8099
1 changed files with 27 additions and 2 deletions

View File

@ -1,6 +1,7 @@
-- windows
package.path = package.path ..';luafight/?.lua';
-- linux
-- package.path = package.path ..';../luafight/?.lua';
package.path = package.path ..';../luafight/?.lua';
require("Modules.Battle.Logic.Misc.BattleDefine")
require("Modules.Battle.Logic.Misc.BattleUtil")
@ -20,6 +21,12 @@ require("Modules.Battle.Logic.Base.Passivity")
require("Modules.Battle.Logic.BattleLogic")
require("Modules.Battle.Logic.RoleLogic")
require("Modules.Battle.Logic.SkillManager")
require("Modules.Battle.Logic.RoleManager")
require("Modules.Battle.Logic.OutDataManager")
require("Modules.Battle.Logic.BattleLogManager")
local BattleMain = {}
local BattleLogic = BattleLogic
local Random = Random
@ -291,7 +298,25 @@ function BattleMain.Execute(args, fightData, optionData)
os.date("%H"),
os.date("%M"),
os.date("%S"))
local file = io.open("luafight/LogError/"..time..".txt", "a")
local file
local platform
-- linux
if not file then
file = io.open("../luafight/LogError/"..time..".txt", "a")
platform = "Linux"
end
-- local window server
if not file then
file = io.open("luafight/LogError/"..time..".txt", "a")
platform = "Local Windows Server"
end
-- local
if not file then
file = io.open("LogError/"..time..".txt", "a")
platform = "Local"
end
file:write(platform..":\n\n\n")
file:write(errorCache)
file:write("seed:\n"..tostring(args.seed).."\n")
file:write("type:\n"..tostring(args.type).."\n")