|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
-- Mini Dragon (Hard Mode) 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
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD>ð<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><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["KQLimitTime"] == nil
|
|
|
|
|
then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if Var["CurSec"] == nil
|
|
|
|
|
then
|
|
|
|
|
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>.
|
|
|
|
|
local nLimitSec = Var["KQLimitTime"] - Var["CurSec"]
|
|
|
|
|
|
|
|
|
|
cShowKQTimerWithLife_Obj( Handle, nLimitSec )
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
cAIScriptSet( Handle )
|
|
|
|
|
Var["Enemy"][ Handle ] = nil
|
|
|
|
|
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["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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <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 nCurPhase = Var["BossBattle"][ sSkillName.."PhaseNo"]
|
|
|
|
|
local nMaxPhase = #ThresholdTable[ sSkillName.."HP"]
|
|
|
|
|
|
|
|
|
|
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[ sSkillName.."HP"][ 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[ sSkillName.."HP"][ nCurPhase ]
|
|
|
|
|
|
|
|
|
|
if BossSkill[ sSkillName ][ 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function MiniDragonRoutine( Handle, MapIndex )
|
|
|
|
|
cExecCheck "MiniDragonRoutine"
|
|
|
|
|
|
|
|
|
|
if Handle == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "MiniDragonRoutine::Handle == nil" )
|
|
|
|
|
return ReturnAI["END"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if MapIndex == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "MiniDragonRoutine::MapIndex == nil" )
|
|
|
|
|
cAIScriptSet( Handle )
|
|
|
|
|
cNPCVanish( Handle )
|
|
|
|
|
return ReturnAI["END"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local Var = InstanceField[ MapIndex ]
|
|
|
|
|
if Var == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "MiniDragonRoutine::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( "MiniDragonRoutine::Var[\"Enemy\"] == nil" )
|
|
|
|
|
cAIScriptSet( Handle )
|
|
|
|
|
cNPCVanish( Handle )
|
|
|
|
|
return ReturnAI["END"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if Var["Enemy"][ Handle ] == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "MiniDragonRoutine::Var[\"Enemy\"]["..Handle.."] == nil" )
|
|
|
|
|
cAIScriptSet( Handle )
|
|
|
|
|
cNPCVanish( Handle )
|
|
|
|
|
return ReturnAI["END"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Mini Dragon <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if cIsObjectDead( Handle ) == 1
|
|
|
|
|
then
|
|
|
|
|
DebugLog( "MiniDragonRoutine::BossDead" )
|
|
|
|
|
cAIScriptSet( Handle )
|
|
|
|
|
Var["Enemy"][ Handle ] = nil
|
|
|
|
|
return ReturnAI["END"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if Var["BossBattle"] == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "MiniDragonRoutine::Var[\"BossBattle\"] == nil" )
|
|
|
|
|
cAIScriptSet( Handle )
|
|
|
|
|
cNPCVanish( Handle )
|
|
|
|
|
return ReturnAI["END"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DetectRange <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if Var["BossBattle"]["BossInitialTargetHandle"] == nil
|
|
|
|
|
then
|
|
|
|
|
Var["BossBattle"]["BossInitialTargetHandle"] = cTargetHandle( Handle )
|
|
|
|
|
if Var["BossBattle"]["BossInitialTargetHandle"] ~= nil
|
|
|
|
|
then
|
|
|
|
|
cMobDetectRange( Handle, BossDetectRange["View"] )
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- MobDamaged <EFBFBD><EFBFBD>ƾ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cAIScriptFunc( Handle, "MobDamaged", "BossDamaged" )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų Ȯ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> MobDamaged <EFBFBD><EFBFBD>ƾ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if Var["BossBattle"]["bInitialSkillRateSet"] == nil
|
|
|
|
|
then
|
|
|
|
|
Var["BossBattle"]["bInitialSkillRateSet"] = true
|
|
|
|
|
|
|
|
|
|
local CurHP, MaxHP = cObjectHP( Handle )
|
|
|
|
|
BossDamaged( MapIndex, 0, MaxHP, CurHP, Handle )
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <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><EFBFBD>̺<EFBFBD><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 i = 1, #Var["BossBattle"][ sSkillName ]
|
|
|
|
|
do
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>üũ
|
|
|
|
|
if Var["BossBattle"][ sSkillName ][ i ] == nil
|
|
|
|
|
then
|
|
|
|
|
break
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD>غ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if Var["BossBattle"][ sSkillName ][ i ]["bCasting"] == true
|
|
|
|
|
then
|
|
|
|
|
local sCurSkillTableIndex = Var["BossBattle"][ sSkillName ][ i ]["sSkillTableIndex"]
|
|
|
|
|
local CurSkillInfo = BossSkill[ sSkillName ][ sCurSkillTableIndex ]
|
|
|
|
|
|
|
|
|
|
if sSkillName == "SkillRateChange" -- <EFBFBD><EFBFBD>ųȮ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ
|
|
|
|
|
then
|
|
|
|
|
DebugLog( "BossDamaged::StartSkillCasting-"..sSkillName.." "..sCurSkillTableIndex.." "..i )
|
|
|
|
|
local Values = CurSkillInfo["SkillRate"]
|
|
|
|
|
cMobWeaponRate( Handle, Values[1], Values[2], Values[3], Values[4] )
|
|
|
|
|
DebugLog( "BossDamaged::CastSkill-"..sSkillName.." "..sCurSkillTableIndex.." "..i..":"..Values[1].." "..Values[2].." "..Values[3].." "..Values[4] )
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ϸ<EFBFBD> ó<EFBFBD><EFBFBD>
|
|
|
|
|
Var["BossBattle"][ sSkillName ][ i ]["bCasting"] = false
|
|
|
|
|
DebugLog( "BossDamaged::EndSkillCasting-"..sSkillName.." "..sCurSkillTableIndex.." "..i )
|
|
|
|
|
|
|
|
|
|
elseif sSkillName == "Summon" -- <EFBFBD>ܸ<EFBFBD> <EFBFBD><EFBFBD>ȯ
|
|
|
|
|
then
|
|
|
|
|
DebugLog( "BossDamaged::StartSkillCasting-"..sSkillName.." "..sCurSkillTableIndex.." "..i )
|
|
|
|
|
for i = 1, #CurSkillInfo["SummonMobs"]
|
|
|
|
|
do
|
|
|
|
|
cMobRegen_Obj( CurSkillInfo["SummonMobs"][ i ], Handle )
|
|
|
|
|
DebugLog( "BossDamaged::CastSkill-"..sSkillName.." "..sCurSkillTableIndex.." "..i..":"..CurSkillInfo["SummonMobs"][ i ] )
|
|
|
|
|
end
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ϸ<EFBFBD> ó<EFBFBD><EFBFBD>
|
|
|
|
|
Var["BossBattle"][ sSkillName ][ i ]["bCasting"] = false
|
|
|
|
|
DebugLog( "BossDamaged::EndSkillCasting-"..sSkillName.." "..sCurSkillTableIndex.." "..i )
|
|
|
|
|
|
|
|
|
|
elseif sSkillName == "Heal" -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
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>
|
|
|
|
|
if Var["BossBattle"]["bBossIsHealingItself"] ~= true
|
|
|
|
|
then
|
|
|
|
|
DebugLog( "BossDamaged::StartSkillCasting-"..sSkillName.." "..sCurSkillTableIndex.." "..i )
|
|
|
|
|
Var["BossBattle"]["bBossIsHealingItself"] = true
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
|
|
|
|
|
Var["BossBattle"]["HealCastingStepNo"] = 1
|
|
|
|
|
Var["BossBattle"]["HealCastingStepSec"] = Var["CurSec"]
|
|
|
|
|
|
|
|
|
|
local BossHealAbstate = BossSkill["Heal"]["Abstate"]
|
|
|
|
|
cSetAbstate( Handle, BossHealAbstate["Index"], BossHealAbstate["Strength"], BossHealAbstate["KeepTime"] )
|
|
|
|
|
cAnimate( Handle, "start", BossSkill["Heal"]["AnimationIndex"] )
|
|
|
|
|
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>
|
|
|
|
|
if Var["BossBattle"]["bBossIsHealingItself"] == true
|
|
|
|
|
then
|
|
|
|
|
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if Var["BossBattle"]["HealCastingStepNo"] <= BossSkill["Heal"]["TickCount"]
|
|
|
|
|
then
|
|
|
|
|
if Var["BossBattle"]["HealCastingStepSec"] <= Var["CurSec"]
|
|
|
|
|
then
|
|
|
|
|
cHeal( Handle, BossSkill["Heal"][ sCurSkillTableIndex ]["HealAmount"] )
|
|
|
|
|
DebugLog( "BossDamaged::CastSkill-"..sSkillName.." "..sCurSkillTableIndex.." "..i..":"..Var["BossBattle"]["HealCastingStepNo"].." "..BossSkill["Heal"][ sCurSkillTableIndex ]["HealAmount"] )
|
|
|
|
|
|
|
|
|
|
Var["BossBattle"]["HealCastingStepNo"] = Var["BossBattle"]["HealCastingStepNo"] + 1
|
|
|
|
|
Var["BossBattle"]["HealCastingStepSec"] = Var["BossBattle"]["HealCastingStepSec"] + BossSkill["Heal"]["TickTimeSec"]
|
|
|
|
|
|
|
|
|
|
break -- <EFBFBD>ش<EFBFBD> <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
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
cAnimate( Handle, "stop" )
|
|
|
|
|
Var["BossBattle"]["bBossIsHealingItself"] = false
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ϸ<EFBFBD> ó<EFBFBD><EFBFBD>
|
|
|
|
|
Var["BossBattle"][ sSkillName ][ i ]["bCasting"] = false
|
|
|
|
|
DebugLog( "BossDamaged::EndSkillCasting-"..sSkillName.." "..sCurSkillTableIndex.." "..i )
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end -- <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> <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> //
|
|
|
|
|
|
|
|
|
|
return ReturnAI["CPP"]
|
|
|
|
|
|
|
|
|
|
end
|