167 lines
3.0 KiB
Lua
167 lines
3.0 KiB
Lua
|
--------------------------------------------------------------------------------
|
|||
|
-- Seiren Castle Sub Functions --
|
|||
|
--------------------------------------------------------------------------------
|
|||
|
|
|||
|
function DummyFunc( Var )
|
|||
|
cExecCheck "DummyFunc"
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
function GoToNextStep( Var )
|
|||
|
cExecCheck "GoToNextStep"
|
|||
|
|
|||
|
if Var == nil
|
|||
|
then
|
|||
|
ErrorLog( "GoToNextStep::Var == nil" )
|
|||
|
return false
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
-- StepIndex <20><> nil <20≯<EFBFBD> <20>δ<EFBFBD> <20>ʱ<EFBFBD>ȭ <20><><EFBFBD><EFBFBD>
|
|||
|
if Var["StepIndex"] == nil and Var["StepFunc"] == nil
|
|||
|
then
|
|||
|
Var["StepIndex"] = "InitDungeon"
|
|||
|
Var["StepFunc"] = ID_StepsList["InitDungeon"]["Function"]
|
|||
|
return true
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
-- StepIndex <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ܰ<EFBFBD> <20><><EFBFBD><EFBFBD> Ȯ<><C8AE>
|
|||
|
local StepIndex = Var["StepIndex"]
|
|||
|
if ID_StepsList[ StepIndex ] == nil
|
|||
|
then
|
|||
|
ErrorLog( "GoToNextStep : StepInfo nil : "..StepIndex )
|
|||
|
|
|||
|
Var["StepFunc"] = DummyFunc
|
|||
|
return true
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
-- <20><><EFBFBD><EFBFBD> <20>ܰ谡 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD> Ȯ<><C8AE>
|
|||
|
local NextStepIndex = ID_StepsList[ StepIndex ]["NextStep"]
|
|||
|
|
|||
|
if NextStepIndex == nil
|
|||
|
then
|
|||
|
|
|||
|
-- <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>, <20>ܰ<EFBFBD> <20><><EFBFBD><EFBFBD>ó<EFBFBD><C3B3>
|
|||
|
local DoorOpenCheckList = Step_DoorOpenCheckList[ StepIndex ]
|
|||
|
|
|||
|
if DoorOpenCheckList ~= nil
|
|||
|
then
|
|||
|
for i = 1, #DoorOpenCheckList
|
|||
|
do
|
|||
|
local DoorName = DoorOpenCheckList[ i ]["DoorName"]
|
|||
|
local nDoorHandle = Var["Door"][ DoorName ]
|
|||
|
|
|||
|
if nDoorHandle ~= nil
|
|||
|
then
|
|||
|
if Var["Door"][ nDoorHandle ]["IsOpen"] == true
|
|||
|
then
|
|||
|
NextStepIndex = DoorOpenCheckList[ i ]["NextStep"]
|
|||
|
break
|
|||
|
end
|
|||
|
end
|
|||
|
end
|
|||
|
|
|||
|
-- <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ܰ<EFBFBD><DCB0><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
if NextStepIndex == nil
|
|||
|
then
|
|||
|
return false
|
|||
|
end
|
|||
|
end
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
-- <20><><EFBFBD><EFBFBD> <20>ܰ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
if NextStepIndex == nil
|
|||
|
then
|
|||
|
Var["StepIndex"] = nil
|
|||
|
Var["StepFunc"] = DummyFunc
|
|||
|
return true
|
|||
|
else
|
|||
|
Var["StepIndex"] = NextStepIndex
|
|||
|
StepIndex = NextStepIndex
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
-- <20><><EFBFBD><EFBFBD> <20>ܰ<EFBFBD> <20><><EFBFBD><EFBFBD> Ȯ<><C8AE>
|
|||
|
if ID_StepsList[ StepIndex ] == nil
|
|||
|
then
|
|||
|
ErrorLog( "GoToNextStep : StepInfo nil : "..StepIndex )
|
|||
|
|
|||
|
Var["StepFunc"] = DummyFunc
|
|||
|
return true
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
-- <20>ܰ<EFBFBD> <20>Լ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
if ID_StepsList[ StepIndex ]["Function"] == nil
|
|||
|
then
|
|||
|
Var["StepFunc"] = DummyFunc
|
|||
|
else
|
|||
|
Var["StepFunc"] = ID_StepsList[ StepIndex ]["Function"]
|
|||
|
end
|
|||
|
|
|||
|
return true
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
function EnemyBufferClear( Var, Handle )
|
|||
|
cExecCheck "EnemyBufferClear"
|
|||
|
|
|||
|
if Var == nil
|
|||
|
then
|
|||
|
ErrorLog( "EnemyBufferClear::Var == nil" )
|
|||
|
return
|
|||
|
end
|
|||
|
|
|||
|
if Var["Enemy"] == nil
|
|||
|
then
|
|||
|
ErrorLog( "EnemyBufferClear::Var[\"Enemy\"] == nil" )
|
|||
|
return
|
|||
|
end
|
|||
|
|
|||
|
if Var["Enemy"][ Handle ] == nil
|
|||
|
then
|
|||
|
ErrorLog( "EnemyBufferClear::Var[\"Enemy\"][Handle] == nil" )
|
|||
|
return
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
local EnemyIndex = Var["Enemy"][ Handle ]["Index"]
|
|||
|
|
|||
|
if EnemyIndex ~= nil
|
|||
|
then
|
|||
|
Var["Enemy"][ EnemyIndex ] = nil
|
|||
|
end
|
|||
|
|
|||
|
Var["Enemy"][ Handle ] = nil
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
function DebugLog( String )
|
|||
|
|
|||
|
if String == nil
|
|||
|
then
|
|||
|
cAssertLog( "DebugLog::String == nil" )
|
|||
|
return
|
|||
|
end
|
|||
|
|
|||
|
-- cAssertLog( "Debug - "..String )
|
|||
|
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
function ErrorLog( String )
|
|||
|
|
|||
|
if String == nil
|
|||
|
then
|
|||
|
cAssertLog( "ErrorLog::String == nil" )
|
|||
|
return
|
|||
|
end
|
|||
|
|
|||
|
cAssertLog( "Error - "..String )
|
|||
|
|
|||
|
end
|
|||
|
|