You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SigFiesta/LuaScript/KQ/KDArena/KDArena.lua

133 lines
2.7 KiB

--------------------------------------------------------------------------------
-- Arena Main File --
--------------------------------------------------------------------------------
function Main( Field )
cExecCheck "Main"
local Var = InstanceField[ Field ]
if Var == nil
then
------------------------------------------------------------
-- <EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
------------------------------------------------------------
InstanceField[ Field ] = {} -- <EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var = InstanceField[ Field ]
Var[ "MapIndex" ] = Field -- <EFBFBD><EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD>( <EFBFBD>ʵ<EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> )
Var[ "KQLimitTime" ] = 0 -- <EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
Var[ "InitialSec" ] = cCurrentSecond() -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
Var[ "CurSec" ] = Var["InitialSec"] -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
Var[ "StepFunc" ] = InitArena -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Լ<EFBFBD>-
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var[ "ArenaFlag" ] = {}
Var[ "ArenaFlag" ][ RED_TEAM ] = {}
Var[ "ArenaFlag" ][ BLUE_TEAM ] = {}
--[[
Var[ "ArenaFlag" ][ RED_TEAM ] =
{
Handle = nil,
PlayerHandle = nil,
PlayerTeam = nil,
Drop_LifeTime = nil,
X = 0,
Y = 0,
GoalConditionNoticeTime = 0,
Penalty =
{
Step = 0,
CheckTime = 0,
},
}
--]]
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
Var[ "ArenaGate" ] = {}
Var[ "ArenaGate" ][ "Count" ] = 0
-- ũ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ż <EFBFBD><EFBFBD>ȣ<EFBFBD><EFBFBD>
Var[ "ArenaStone" ] = {}
Var[ "ArenaStone" ][ "Count" ] = 0
Var[ "ArenaStone" ][ "SkillUseTime" ] = {}
-- ũ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ż
Var[ "ArenaCrystal" ] =
{
Handle = nil,
VanishTime = nil,
SkillUseTime = 0,
}
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var[ "AncientArenaWarrior" ] = {}
--[[
Var[ "AncientArenaWarrior" ][ 1 ] =
{
Handle = nil,
RegenTime = nil,
}
--]]
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
Var[ "Player" ] = {}
--[[
Var[ "Player" ][ 1 ] =
{
Handle = nil,
CharNo = nil,
FlagPickSec = 0,
InMap = false,
TeamNumber = DEF_TEAM
}
--]]
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
Var[ "Team" ] =
{
[ RED_TEAM ] =
{
Score = 0,
Member = {},
},
[ BLUE_TEAM ] =
{
Score = 0,
Member = {},
},
}
-- <EFBFBD><EFBFBD> <EFBFBD>α<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Լ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cSetFieldScript ( Var["MapIndex"], MainLuaScriptPath )
cFieldScriptFunc( Var["MapIndex"], "MapLogin", "PlayerMapLogin" )
-- <EFBFBD>ʵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cSetCanUseReviveItem( Field, false ) -- <EFBFBD><EFBFBD>Ȱ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ұ<EFBFBD>
cSetCanUseReviveSkill( Field, false ) -- <EFBFBD><EFBFBD>Ȱ <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ұ<EFBFBD>
cSetReviveDelayTime( Field, DelayTime[ "ReviveWaitTime" ] ) -- <EFBFBD><EFBFBD>Ȱ <EFBFBD>ð<EFBFBD> 3<EFBFBD><EFBFBD>
end
-- 0.1<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Var["CurSec"] + 0.1 > cCurrentSecond()
then
return
else
Var["CurSec"] = cCurrentSecond()
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ( Functions/Progress.lua )
Var["StepFunc"] ( Var )
end