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.

849 lines
22 KiB

--------------------------------------------------------------------------------
-- Secret Laboratory Routine --
--------------------------------------------------------------------------------
function PlayerMapLogin( MapIndex, Handle )
cExecCheck "PlayerMapLogin"
if MapIndex == nil
then
DebugLog( "PlayerMapLogin::MapIndex == nil")
return
end
if Handle == nil
then
DebugLog( "PlayerMapLogin::Handle == nil")
return
end
local Var = InstanceField[ MapIndex ]
if Var == nil
then
DebugLog( "PlayerMapLogin::Var == nil")
return
end
-- ù <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>α<EFBFBD><EFBFBD><EFBFBD> üũ
Var["bPlayerMapLogin"] = true
end
function ExitGateClick( NPCHandle, PlyHandle, RegistNumber )
cExecCheck "ExitGateClick"
DebugLog( "ExitGateClick::Start" )
if NPCHandle == nil
then
ErrorLog( "ExitGateClick::NPCHandle == nil" )
return
end
if PlyHandle == nil
then
ErrorLog( "ExitGateClick::PlyHandle == nil" )
return
end
cLinkTo( PlyHandle, LinkInfo["ReturnMapOnGateClick"]["MapIndex"], LinkInfo["ReturnMapOnGateClick"]["x"], LinkInfo["ReturnMapOnGateClick"]["y"] )
DebugLog( "ExitGateClick::End" )
end
function PrisonClick( NPCHandle, PlyHandle, RegistNumber )
cExecCheck "PrisonClick"
DebugLog( "PrisonClick::Start" )
if NPCHandle == nil
then
ErrorLog( "PrisonClick::NPCHandle == nil" )
return
end
if PlyHandle == nil
then
ErrorLog( "PrisonClick::PlyHandle == nil" )
return
end
local MapIndex = cGetCurMapIndex( PlyHandle )
if MapIndex == nil
then
ErrorLog( "PrisonClick::MapIndex == nil" )
return
end
local Var = InstanceField[ MapIndex ]
if Var == nil
then
ErrorLog( "PrisonClick::Var == nil" )
return
end
if Var["Prison"] == nil
then
ErrorLog( "PrisonClick::Var[\"Prison\"] == nil" )
return
end
if Var["Prison"]["RegenInfo"] == nil
then
ErrorLog( "PrisonClick::Var[\"Prison\"][\"RegenInfo\"] == nil" )
return
end
-- <EFBFBD>ش<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
local nLotKey = cGetItemLot( PlyHandle, PrisonKeyIndex )
if nLotKey > 0
then
if cInvenItemDestroy( PlyHandle, PrisonKeyIndex, nLotKey ) ~= 1
then
return
end
cDoorAction( NPCHandle, Var["Prison"]["RegenInfo"]["Block"], "open" )
Var["Prison"]["bOpened"] = true
end
DebugLog( "PrisonClick::End" )
end
function SemiBossRoutine( Handle, MapIndex )
cExecCheck "SemiBossRoutine"
if Handle == nil
then
ErrorLog( "SemiBossRoutine::Handle == nil" )
return ReturnAI["END"]
end
if MapIndex == nil
then
ErrorLog( "SemiBossRoutine::MapIndex == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
local Var = InstanceField[ MapIndex ]
if Var == nil
then
ErrorLog( "SemiBossRoutine::Var == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
-- 0.2<EFBFBD>ʸ<EFBFBD><EFBFBD><EFBFBD> üũ<EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD>ƾ
if Var["RoutineTime"][ Handle ] <= cCurrentSecond()
then
Var["RoutineTime"][ Handle ] = cCurrentSecond() + 0.2
else
return ReturnAI["CPP"]
end
if Var["Enemy"] == nil
then
ErrorLog( "SemiBossRoutine::Var[\"Enemy\"] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
if Var["Enemy"][ Handle ] == nil
then
ErrorLog( "SemiBossRoutine::Var[\"Enemy\"]["..Handle.."] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
-- SemiBoss <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if cIsObjectDead( Handle ) == 1
then
cAIScriptSet( Handle )
Var["Enemy"][ Handle ] = nil
return ReturnAI["END"]
end
-- <EFBFBD>Ʒ<EFBFBD> <EFBFBD><EFBFBD>Ʈ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
if Var["EachFloor"] == nil
then
ErrorLog( "SemiBossRoutine::Var[\"EachFloor\"] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
Var["Enemy"][ Handle ] = nil
return ReturnAI["END"]
end
local CurStepNo = Var["EachFloor"]["StepNumber"]
if Var["EachFloor"..CurStepNo ] == nil
then
ErrorLog( "SemiBossRoutine::Var[\"EachFloor\""..CurStepNo.."] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
Var["Enemy"][ Handle ] = nil
return ReturnAI["END"]
end
local sAbstateIndex
if Var["Enemy"][ Handle ]["Index"] == "Lab_Slime"
then
sAbstateIndex = SemiBossAbstate["TimeAttackMini"]["Index"]
else
sAbstateIndex = SemiBossAbstate["TimeAttack"]["Index"]
end
local AbstateStrength, AbstateRestTime = cGetAbstate( Handle, sAbstateIndex )
if AbstateStrength == nil or AbstateStrength == 0 or AbstateRestTime == nil or AbstateRestTime == 0
then
-- <EFBFBD>Ȱɷ<EFBFBD><EFBFBD>ִ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> : <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȥ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if cIsObjectDead( Handle ) == nil
then
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>Ȳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ɷȴٴ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><EFBFBD>ٴ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local ImmortalStrength, ImmortalRestTime = cGetAbstate( Handle, SemiBossAbstate["Immortal"]["Index"] )
if ImmortalStrength == 1
then
cMobSuicide( Var["MapIndex"], Handle )
cAIScriptSet( Handle )
Var["Enemy"][ Handle ] = nil
return ReturnAI["END"]
else
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ȱɷȴٸ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
Var["EachFloor"..CurStepNo ]["bSemiBossAwakened"] = true
--<EFBFBD>Ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ư<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
Var["bSpecialRewardMode"] = false
end
end
-- <EFBFBD>߰<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.( <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>.. )
Var["EachFloor"..CurStepNo ]["bSemiBossWarned60Sec"] = true
Var["EachFloor"..CurStepNo ]["bSemiBossWarned30Sec"] = true
elseif AbstateStrength == 2
then
-- <EFBFBD>Ѵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> : <EFBFBD>߰<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.( <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>޶<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ʾȿ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϹǷ<EFBFBD>.. )
Var["EachFloor"..CurStepNo ]["bSemiBossWarned60Sec"] = true
Var["EachFloor"..CurStepNo ]["bSemiBossWarned30Sec"] = true
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̻<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ɷ<EFBFBD><EFBFBD>ִ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>¿<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ֺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>״´<EFBFBD>.(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ڻ<EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
if AbstateStrength == 1 or AbstateStrength == 2
then
-- <EFBFBD>ٸ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>Ǵ<EFBFBD> <EFBFBD>ð<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ٷȴٰ<EFBFBD> üũ
if Var["CurSec"] >= Var["EachFloor"..CurStepNo ]["WaitMobGenSec"]
then
if cObjectCount( Var["MapIndex"], ObjectType["Mob"] ) == 1
then
cSetAbstate( Handle, SemiBossAbstate["Immortal"]["Index"], SemiBossAbstate["Immortal"]["Strength"], SemiBossAbstate["Immortal"]["KeepTime"] )
cResetAbstate( Handle, sAbstateIndex )
-- <EFBFBD>߰<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.( <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̹Ƿ<EFBFBD>.. )
Var["EachFloor"..CurStepNo ]["bSemiBossWarned60Sec"] = true
Var["EachFloor"..CurStepNo ]["bSemiBossWarned30Sec"] = true
end
end
end
return ReturnAI["CPP"]
end
function MidBossRoutine( Handle, MapIndex )
cExecCheck "MidBossRoutine"
if Handle == nil
then
ErrorLog( "MidBossRoutine::Handle == nil" )
return ReturnAI["END"]
end
if MapIndex == nil
then
ErrorLog( "MidBossRoutine::MapIndex == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
local Var = InstanceField[ MapIndex ]
if Var == nil
then
ErrorLog( "MidBossRoutine::Var == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
-- 0.2<EFBFBD>ʸ<EFBFBD><EFBFBD><EFBFBD> üũ<EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD>ƾ
if Var["RoutineTime"][ Handle ] <= cCurrentSecond()
then
Var["RoutineTime"][ Handle ] = cCurrentSecond() + 0.2
else
return ReturnAI["CPP"]
end
if Var["Enemy"] == nil
then
ErrorLog( "MidBossRoutine::Var[\"Enemy\"] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
if Var["Enemy"][ Handle ] == nil
then
ErrorLog( "MidBossRoutine::Var[\"Enemy\"]["..Handle.."] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
-- Mid Boss <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if cIsObjectDead( Handle ) == 1
then
-- <EFBFBD>ܸ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ڻ<EFBFBD>
cMobSuicide( Var["MapIndex"] )
cAIScriptSet( Handle )
Var["Enemy"][ Handle ] = nil
return ReturnAI["END"]
end
if Var["EachFloor"] == nil
then
ErrorLog( "MidBossRoutine::Var[\"EachFloor\"] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
return ReturnAI["CPP"]
end
-------------------------------------------------------------------------------------------------------
function BossDamaged( MapIndex, AttackerHandle, MaxHP, CurHP, DefenderHandle )
cExecCheck "BossDamaged"
if DefenderHandle == nil
then
ErrorLog( "BossDamaged::DefenderHandle == nil" )
return
end
if MapIndex == nil
then
ErrorLog( "BossDamaged::MapIndex == nil" )
return
end
if MaxHP == nil or CurHP == nil
then
ErrorLog( "BossDamaged::HP Info is nil" )
return
end
local Var = InstanceField[ MapIndex ]
if Var == nil
then
ErrorLog( "BossDamaged::Var == nil" )
return
end
if Var["Enemy"] == nil
then
ErrorLog( "BossDamaged::Var[\"Enemy\"] == nil" )
return
end
if Var["Enemy"][ DefenderHandle ] == nil
then
ErrorLog( "BossDamaged::Var[\"Enemy\"]["..DefenderHandle.."] == nil" )
return
end
if Var["StageInfo"]["BossTypeNo"] == nil
then
ErrorLog( "BossDamaged::Var[\"StageInfo\"][\"BossTypeNo\"] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
if Var["BossBattle"] == nil
then
ErrorLog( "BossDamaged::Var[\"BossBattle\"] == nil" )
return
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Var["BossBattle"]["Casting"] == nil
then
Var["BossBattle"]["Casting"] = {}
end
local HP_Rate = ( CurHP * 1000 ) / MaxHP
local nBossType = Var["StageInfo"]["BossTypeNo"]
-- <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD> Ž<EFBFBD><EFBFBD>
for nIndex, sSkillName in pairs ( BossSkillNameTable )
do
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
if Var["BossBattle"][ sSkillName.."PhaseNo"] == nil
then
Var["BossBattle"][ sSkillName.."PhaseNo"] = 1
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Var["BossBattle"][ sSkillName ] == nil
then
Var["BossBattle"][ sSkillName ] = {}
end
-- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local sThresholdTableIndex = sSkillName.."HP_Boss"..nBossType -- ex ) "SummonHP_Boss1"
local nCurPhase = Var["BossBattle"][ sSkillName.."PhaseNo"]
local nMaxPhase = #ThresholdTable[ sThresholdTableIndex ]
if sSkillName ~= "PeriodicSummon"
then
if nCurPhase <= nMaxPhase
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> HP<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> Threshold <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ұ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
while ThresholdTable[ sThresholdTableIndex ][ nCurPhase ] >= HP_Rate
do
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>޾ƿ<EFBFBD><EFBFBD><EFBFBD>
local sCurSkillIndex = "HP"..ThresholdTable[ sThresholdTableIndex ][ nCurPhase ] -- ex) "HP800"
local sBossSkillTableIndex = sThresholdTableIndex -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if BossSkill[ sBossSkillTableIndex ][ sCurSkillIndex ] ~= nil
then
-- <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ƾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Var["BossBattle"][ sSkillName ][ nCurPhase ] == nil
then
Var["BossBattle"][ sSkillName ][ nCurPhase ] = {}
Var["BossBattle"][ sSkillName ][ nCurPhase ]["bCasting"] = true
Var["BossBattle"][ sSkillName ][ nCurPhase ]["sSkillTableIndex"] = sCurSkillIndex
DebugLog( "BossDamaged::SetSkillCasting-"..sSkillName.." "..sCurSkillIndex.." "..nCurPhase )
end
end
nCurPhase = nCurPhase + 1
if nCurPhase > nMaxPhase
then
break
end
end -- <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>϶<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
-- <EFBFBD>޸<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var["BossBattle"][ sSkillName.."PhaseNo"] = nCurPhase
end -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʰ<EFBFBD><EFBFBD>ߴ<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ǹ<EFBFBD> //
end -- <EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų üũ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ƾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> //
end -- <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD> Ž<EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> //
end
function BossRoutine( Handle, MapIndex )
cExecCheck "BossRoutine"
if Handle == nil
then
ErrorLog( "BossRoutine::Handle == nil" )
return ReturnAI["END"]
end
if MapIndex == nil
then
ErrorLog( "BossRoutine::MapIndex == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
local Var = InstanceField[ MapIndex ]
if Var == nil
then
ErrorLog( "BossRoutine::Var == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
-- 0.2<EFBFBD>ʸ<EFBFBD><EFBFBD><EFBFBD> üũ<EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD>ƾ
if Var["RoutineTime"][ Handle ] <= cCurrentSecond()
then
Var["RoutineTime"][ Handle ] = cCurrentSecond() + 0.2
else
return ReturnAI["CPP"]
end
if Var["Enemy"] == nil
then
ErrorLog( "BossRoutine::Var[\"Enemy\"] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
if Var["Enemy"][ Handle ] == nil
then
ErrorLog( "BossRoutine::Var[\"Enemy\"]["..Handle.."] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
return ReturnAI["END"]
end
if Var["StageInfo"]["BossTypeNo"] == nil
then
ErrorLog( "BossRoutine::Var[\"StageInfo\"][\"BossTypeNo\"] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
Var["Enemy"][ Handle ] = nil
return ReturnAI["END"]
end
if Var["BossBattle"] == nil
then
ErrorLog( "BossRoutine::Var[\"BossBattle\"] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
Var["Enemy"][ Handle ] = nil
return ReturnAI["END"]
end
if Var["EachFloor"] == nil
then
ErrorLog( "BossRoutine::Var[\"EachFloor\"] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
Var["Enemy"][ Handle ] = nil
return ReturnAI["END"]
end
if Var["EachFloor"..Var["EachFloor"]["StepNumber"] ] == nil
then
ErrorLog( "BossRoutine::Var[ EachFloor"..Var["EachFloor"]["StepNumber"].."] == nil" )
cAIScriptSet( Handle )
cNPCVanish( Handle )
Var["Enemy"][ Handle ] = nil
return ReturnAI["END"]
end
-- Boss <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if cIsObjectDead( Handle ) ~= nil
then
DebugLog( "BossRoutine::BossDead" )
cMobSuicide( Var["MapIndex"] )
-- <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>޸<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
for nIndex, sSkillName in pairs ( BossSkillNameTable )
do
Var["BossBattle"][ sSkillName ] = nil
Var["BossBattle"][ sSkillName.."PhaseNo"] = nil
end
cAIScriptSet( Handle )
Var["Enemy"][ Handle ] = nil
return ReturnAI["END"]
end
local CurStepNo = Var["EachFloor"]["StepNumber"]
local nBossType = Var["StageInfo"]["BossTypeNo"]
--///////---------------------- <EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ƾ <EFBFBD><EFBFBD> üũ ------------------------------------
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Var["BossBattle"]["Casting"] == nil
then
Var["BossBattle"]["Casting"] = {}
end
local CurHP, MaxHP = cObjectHP( Handle )
-- HP <EFBFBD>ҷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>н<EFBFBD> Full<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local HP_Rate = 1000
if CurHP ~= nil
then
if MaxHP > 0
then
HP_Rate = ( CurHP * 1000 ) / MaxHP
end
end
if #BossSkillNameTable >= 2
then
-- <EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> Ž<EFBFBD><EFBFBD>
local sSkillName = BossSkillNameTable[2] -- ex) sSkillName = "PeriodicSummon"
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
if Var["BossBattle"][ sSkillName.."PhaseNo"] == nil
then
Var["BossBattle"][ sSkillName.."PhaseNo"] = 1
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Var["BossBattle"][ sSkillName ] == nil
then
Var["BossBattle"][ sSkillName ] = {}
end
-- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local sThresholdTableIndex = sSkillName.."HP_Boss"..nBossType -- ex ) "PeriodicSummonHP_Boss1"
-- <EFBFBD><EFBFBD> <EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>Ģ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
-- HP<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ߵ<EFBFBD>
-- <EFBFBD><EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> HP <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ߵ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ȴٸ<EFBFBD> <EFBFBD>Ѱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ߵ<EFBFBD>
-- HP<EFBFBD><EFBFBD> <EFBFBD>ش<EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD>ߵ<EFBFBD><EFBFBD>Ǵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
-- <EFBFBD>ʱ<EFBFBD>ȭ <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>´<EFBFBD> ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD> <EFBFBD>ٽ<EFBFBD> HP<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD>ߵ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ش<EFBFBD><EFBFBD>Ǵ<EFBFBD> <EFBFBD><EFBFBD>Ȳ<EFBFBD≯<EFBFBD> <EFBFBD>״<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ߵ<EFBFBD>
--
for nCurPhase = 1, #ThresholdTable[ sThresholdTableIndex ]
do
-- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD>
if Var["BossBattle"][ sSkillName ][ nCurPhase ] == nil
then
Var["BossBattle"][ sSkillName ][ nCurPhase ] = {}
end
local CurPhaseCastingInfo = Var["BossBattle"][ sSkillName ][ nCurPhase ]
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> HP<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> Threshold <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <EFBFBD>ش<EFBFBD><EFBFBD>Ǵ<EFBFBD> <EFBFBD>κ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>û
local bCastCurPhaseSkill = false
-- HP <EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ
if ThresholdTable[ sThresholdTableIndex ][ nCurPhase ] >= HP_Rate
then
if ThresholdTable[ sThresholdTableIndex ][ nCurPhase + 1 ] ~= nil
then
if ThresholdTable[ sThresholdTableIndex ][ nCurPhase + 1 ] < HP_Rate
then
bCastCurPhaseSkill = true
else
-- HP <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ش<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ <EFBFBD>ȴ<EFBFBD>.
CurPhaseCastingInfo["dLastCastedTime"] = 0
-- <EFBFBD><EFBFBD>ȯ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>Ȳ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Var["EachFloor"..CurStepNo ]["bBossSummonDialogEnd"] == true
then
Var["EachFloor"..CurStepNo ]["bBossSummonDialogEnd"] = nil
Var["EachFloor"..CurStepNo ]["nHP_BossSummonDialog"] = nil
end
end
else
bCastCurPhaseSkill = true
end
else
-- HP <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ش<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ <EFBFBD>ȴ<EFBFBD>.
CurPhaseCastingInfo["dLastCastedTime"] = 0
-- <EFBFBD><EFBFBD>ȯ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>Ȳ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Var["EachFloor"..CurStepNo ]["bBossSummonDialogEnd"] == true
then
Var["EachFloor"..CurStepNo ]["bBossSummonDialogEnd"] = nil
Var["EachFloor"..CurStepNo ]["nHP_BossSummonDialog"] = nil
end
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>޾ƿ<EFBFBD><EFBFBD><EFBFBD>
local sBossSkillTableIndex = sThresholdTableIndex -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ex ) "SummonHP_Boss1"
local sCurSkillIndex = "HP"..ThresholdTable[ sThresholdTableIndex ][ nCurPhase ] -- ex) "HP800"
-- HP <EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> Ÿ<EFBFBD>̹<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if bCastCurPhaseSkill == true
then
if CurPhaseCastingInfo["dLastCastedTime"] == nil
then
CurPhaseCastingInfo["dLastCastedTime"] = 0
end
if BossSkill[ sBossSkillTableIndex ] ~= nil
then
local CurBossSkillInfo = BossSkill[ sBossSkillTableIndex ][ sCurSkillIndex ]
if CurPhaseCastingInfo["nSummonCount"] == nil
then
CurPhaseCastingInfo["nSummonCount"] = 0
end
if CurBossSkillInfo ~= nil and CurBossSkillInfo["SummonMobs"] ~= nil
then
for nCurSubPhase = 1, #CurBossSkillInfo["SummonMobs"]
do
if CurBossSkillInfo["SummonMobs"][ nCurSubPhase ] ~= nil
then
local CurSubPhaseInfo = CurBossSkillInfo["SummonMobs"][ nCurSubPhase ]
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ Ƚ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ / 0<EFBFBD><EFBFBD> <EFBFBD>ƴ϶<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ش<EFBFBD> Ƚ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŭ <EFBFBD><EFBFBD>ȯ
if CurPhaseCastingInfo["nSummonCount"] < CurSubPhaseInfo["SummonCount"] or CurSubPhaseInfo["SummonCount"] == 0
then
if Var["CurSec"] >= CurPhaseCastingInfo["dLastCastedTime"] + CurSubPhaseInfo["Interval"]
then
if CurPhaseCastingInfo["bCasting"] ~= true
then
-- <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ƾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CurPhaseCastingInfo["bCasting"] = true
CurPhaseCastingInfo["sSkillTableIndex"] = sCurSkillIndex
DebugLog( "BossRoutine::SetSkillCasting-"..sSkillName.." "..sCurSkillIndex.." "..nCurPhase )
end
end
end
end
end
else
ErrorLog( "BossRoutine::CurBossSkillInfo does not exist.")
end
else
ErrorLog( "BossRoutine::BossSkillInfo does not exist.")
end
end
end
end
---------------------- <EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ƾ <EFBFBD><EFBFBD> üũ ------------------------------------/////
-------------<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܰ<EFBFBD>---------------------------------------------------------
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ<EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ȳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٸ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ٸ<EFBFBD><EFBFBD><EFBFBD>.
if Var["EachFloor"..CurStepNo ]["bBossSummonDialogEnd"] ~= false -- true or nil <EFBFBD>϶<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
then
-- <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD> Ž<EFBFBD><EFBFBD>
for nIndex, sSkillName in pairs ( BossSkillNameTable )
do
-- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local sThresholdTableIndex = sSkillName.."HP_Boss"..nBossType -- ex ) "PeriodicSummonHP_Boss1"
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ش<EFBFBD> <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ٸ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ȵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̹Ƿ<EFBFBD> <EFBFBD>н<EFBFBD>
if Var["BossBattle"][ sSkillName.."PhaseNo"] ~= nil and Var["BossBattle"][ sSkillName ] ~= nil
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ε<EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD><EFBFBD><EFBFBD>.
for nCurPhase = 1, #Var["BossBattle"][ sSkillName ]
do
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>üũ
if Var["BossBattle"][ sSkillName ][ nCurPhase ] == nil
then
break
end
local CurPhaseCastingInfo = Var["BossBattle"][ sSkillName ][ nCurPhase ]
-- <EFBFBD>غ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if CurPhaseCastingInfo["bCasting"] == true
then
local sCurSkillTableIndex = CurPhaseCastingInfo["sSkillTableIndex"] -- ex) "HP800"
local sBossSkillTableIndex = sSkillName.."HP_Boss"..nBossType -- ex ) "SummonHP_Boss1"
local CurSkillInfo = BossSkill[ sBossSkillTableIndex ][ sCurSkillTableIndex ]
-- <EFBFBD>ܸ<EFBFBD> <EFBFBD><EFBFBD>ȯ
if sSkillName == "Summon"
then
DebugLog( "BossRoutine::StartSkillCasting-"..sSkillName.." "..sCurSkillTableIndex.." "..nCurPhase )
for nCurSubPhase = 1, #CurSkillInfo["SummonMobs"]
do
for k = 1, CurSkillInfo["SummonMobs"][ nCurSubPhase ]["Count"]
do
cMobRegen_Obj( CurSkillInfo["SummonMobs"][ nCurSubPhase ]["Index"], Handle )
DebugLog( "BossRoutine::CastSkill-"..sSkillName.." "..sCurSkillTableIndex.." ("..k.."/"..CurSkillInfo["SummonMobs"][ nCurSubPhase ]["Count"]..") :"..CurSkillInfo["SummonMobs"][ nCurSubPhase ]["Index"] )
end
end
elseif sSkillName == "PeriodicSummon"
then
DebugLog( "BossRoutine::StartSkillCasting-"..sSkillName.." "..sCurSkillTableIndex.." "..nCurPhase )
for nCurSubPhase = 1, #CurSkillInfo["SummonMobs"]
do
for k = 1, CurSkillInfo["SummonMobs"][ nCurSubPhase ]["CountPerSummon"]
do
cMobRegen_Obj( CurSkillInfo["SummonMobs"][ nCurSubPhase ]["Index"], Handle )
DebugLog( "BossRoutine::CastSkill-"..sSkillName.." "..sCurSkillTableIndex.." ("..k.."/"..CurSkillInfo["SummonMobs"][ nCurSubPhase ]["CountPerSummon"]..") :"..CurSkillInfo["SummonMobs"][ nCurSubPhase ]["Index"] )
end
end
if CurPhaseCastingInfo["nSummonCount"] == nil
then
CurPhaseCastingInfo["nSummonCount"] = 0
end
-- <EFBFBD>ش<EFBFBD> ȸ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ϸ<EFBFBD> ó<EFBFBD><EFBFBD>
CurPhaseCastingInfo["dLastCastedTime"] = Var["CurSec"]
CurPhaseCastingInfo["nSummonCount"] = CurPhaseCastingInfo["nSummonCount"] + 1
else
ErrorLog( "BossRoutine::This name of skill("..sSkillName..") is invalid." )
end -- <EFBFBD><EFBFBD>ų <EFBFBD≯<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ǹ<EFBFBD> //
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ϸ<EFBFBD> ó<EFBFBD><EFBFBD>
CurPhaseCastingInfo["bCasting"] = false
DebugLog( "BossRoutine::EndSkillCasting-"..sSkillName.." "..sCurSkillTableIndex.." "..nCurPhase )
-- <EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var["EachFloor"..CurStepNo ]["bBossSummonDialogEnd"] = false
Var["EachFloor"..CurStepNo ]["nHP_BossSummonDialog"] = ThresholdTable[ sThresholdTableIndex ][ nCurPhase ]
end -- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>غ<EFBFBD> <EFBFBD>Ǿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ǹ<EFBFBD> //
end -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> //
end -- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ü<EFBFBD><EFBFBD> <EFBFBD>ߴ°<EFBFBD> Ȯ<EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ǹ<EFBFBD> //
end -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD> Ž<EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> //
end -- <EFBFBD><EFBFBD>ȯ<EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ǹ<EFBFBD> //
return ReturnAI["CPP"]
end