-------------------------------------------------------------------------------- -- 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 -- ù Ç÷¹À̾îÀÇ ¸Ê ·Î±×ÀΠüũ 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 -- ÇØ´ç ¿­¼è°¡ ÀÖÀ» ¶§¸¸ °¨¿ÁÀ» ¿­°í ¿­¼è¸¦ »ç¶óÁö°Ô ÇÔ 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Ãʸ¶´Ù üũÇÏ´Â ·çƾ 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 »ç¸Á if cIsObjectDead( Handle ) == 1 then cAIScriptSet( Handle ) Var["Enemy"][ Handle ] = nil return ReturnAI["END"] end -- ¾Æ·¡ ÆÄÆ®´Â ÀÌ ¸÷ÀÌ »ìÀÌÀÖÀ» °æ¿ìÀÓ. 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 -- ¾È°É·ÁÀÖ´Â »óÅ : ±ú¾î³­ »óÅ ȤÀº Á×À½ÀÌ ¿¹¾àµÈ »óÅ if cIsObjectDead( Handle ) == nil then -- ÀÌ »óȲ¿¡¼­ ¹«ÀûÀÌ °É·È´Ù´Â °ÍÀº Á×À½ÀÌ ¿¹¾àµÇ¾ú´Ù´Â ¾ê±â 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 -- ¹«ÀûÀÌ ¾È°É·È´Ù¸é ±ú¾î³­ »óŸ¦ ¾ê±âÇÔ. Var["EachFloor"..CurStepNo ]["bSemiBossAwakened"] = true --ÇѸ¶¸®¶óµµ ±ú¾î³ª¸é Ưº° º¸»óÀ» ¹ÞÀ» ¼ö ¾ø´Ù. Var["bSpecialRewardMode"] = false end end -- Áß°£ °æ°í¸¦ ¸ðµÎ ÇØÁ¦ÇÑ´Ù.( ±ú¾î³µÀ¸¹Ç·Î.. ) Var["EachFloor"..CurStepNo ]["bSemiBossWarned60Sec"] = true Var["EachFloor"..CurStepNo ]["bSemiBossWarned30Sec"] = true elseif AbstateStrength == 2 then -- ÇÑ´ë ¸ÂÀº »óÅ : Áß°£ °æ°í¸¦ ¸ðµÎ ÇØÁ¦ÇÑ´Ù.( ³²Àº ½Ã°£ÀÌ ´Þ¶óÁö°í ¸îÃʾȿ¡ Æø¹ßÇϹǷÎ.. ) Var["EachFloor"..CurStepNo ]["bSemiBossWarned60Sec"] = true Var["EachFloor"..CurStepNo ]["bSemiBossWarned30Sec"] = true end -- »óÅÂÀÌ»óÀÌ °É·ÁÀÖ´Â »óÅ¿¡¼­ ÁÖº¯¸÷µéÀÌ ´Ù Á×À¸¸é ÀÌ ¸÷µµ Á״´Ù.(´ÙÀ½·çƾ¿¡¼­ ¸÷Àº ÀÚ»ì󸮵Ê) if AbstateStrength == 1 or AbstateStrength == 2 then -- ´Ù¸¥ ¸÷µéÀÌ Á¨ µÇ´Â ½Ã°£À» ±â´Ù·È´Ù°¡ üũ 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 ) -- Áß°£ °æ°í¸¦ ¸ðµÎ ÇØÁ¦ÇÑ´Ù.( Á×À»°ÍÀ̹ǷÎ.. ) 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Ãʸ¶´Ù üũÇÏ´Â ·çƾ 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 »ç¸Á if cIsObjectDead( Handle ) == 1 then -- Àܸ÷ ¸ðµÎ ÀÚ»ì 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 -- ½ÃÀüÁß¿¡ ´ëÇÑ Á¤º¸¸¦ ÀúÀåÇÏ°í °øÀ¯Çϱâ À§ÇÔ if Var["BossBattle"]["Casting"] == nil then Var["BossBattle"]["Casting"] = {} end local HP_Rate = ( CurHP * 1000 ) / MaxHP local nBossType = Var["StageInfo"]["BossTypeNo"] -- ½ºÅ³º°·Î Çѹø ¾¿ Ž»ö for nIndex, sSkillName in pairs ( BossSkillNameTable ) do -- ¾øÀ»°æ¿ì ½ºÅ³ÆäÀÌÁî¼ø¹ø ÃʱâÈ­ if Var["BossBattle"][ sSkillName.."PhaseNo"] == nil then Var["BossBattle"][ sSkillName.."PhaseNo"] = 1 end -- ½ÇÁ¦ ½ºÅ³ ½ÃÀüÀ» À§ÇÑ Å×À̺íÀÌ ¾øÀ»°æ¿ì »ý¼º if Var["BossBattle"][ sSkillName ] == nil then Var["BossBattle"][ sSkillName ] = {} end -- ½ºÅ³ ÆäÀÌÁî ¼ø¹ø 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 -- ÇöÀç HP¿Í ½ºÅ³ÀÇ Threshold ¿Í ºñ±³ÇÏ¿© ¼øÂ÷ÀûÀ¸·Î ¼Ò±Þ Àû¿ëÇÏ¿© ½ÃÀü while ThresholdTable[ sThresholdTableIndex ][ nCurPhase ] >= HP_Rate do -- ½ÃÀüÇÒ ½ºÅ³ÀÇ Å×ÀÌºí ³» À妽º ¹Þ¾Æ¿À±â local sCurSkillIndex = "HP"..ThresholdTable[ sThresholdTableIndex ][ nCurPhase ] -- ex) "HP800" local sBossSkillTableIndex = sThresholdTableIndex -- µ¿ÀÏÇÏ°Ô ¼³Á¤ÇÔ if BossSkill[ sBossSkillTableIndex ][ sCurSkillIndex ] ~= nil then -- ½ºÅ³À» ·çƾ¿¡¼­ ½ÃÀüÇϵµ·Ï ¼³Á¤ 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 -- ½ºÅ³À» ½ÃÀüÇ϶ó°í ¼ø¼­´ë·Î ¼ÂÆÃÇØÁÖ´Â ·çÇÁ -- ¸Þ¸ð¸®ÀÇ ½ºÅ³ ÆäÀÌÁî ¼ø¹ø °ª °»½Å Var["BossBattle"][ sSkillName.."PhaseNo"] = nCurPhase end -- °¢ ½ºÅ³ÀÇ ¼ø¹øÀÌ ÃÊ°úÇß´ÂÁö È®ÀÎÇØÁÖ´Â Á¶°Ç¹® // end -- ÁÖ±âÀûÀÎ ½ºÅ³ üũ´Â ·çƾ¿¡¼­ ÇÔ // end -- ½ºÅ³º°·Î Çѹø¾¿ Ž»öÇÏ´Â ·çÇÁ // 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Ãʸ¶´Ù üũÇÏ´Â ·çƾ 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 »ç¸Á if cIsObjectDead( Handle ) ~= nil then DebugLog( "BossRoutine::BossDead" ) cMobSuicide( Var["MapIndex"] ) -- ½ºÅ³°ü·Ã ¸Þ¸ð¸® ÃʱâÈ­ 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"] --///////---------------------- ÁÖ±âÀû ½ÃÀüÀ» ¼ÂÆÃÇϱâ À§ÇÑ ·çƾ ¼Ó üũ ------------------------------------ -- ½ÃÀüÁß¿¡ ´ëÇÑ Á¤º¸¸¦ ÀúÀåÇÏ°í °øÀ¯Çϱâ À§ÇÔ if Var["BossBattle"]["Casting"] == nil then Var["BossBattle"]["Casting"] = {} end local CurHP, MaxHP = cObjectHP( Handle ) -- HP ºÒ·¯¿À±â ½ÇÆнà Full·Î °£ÁÖ local HP_Rate = 1000 if CurHP ~= nil then if MaxHP > 0 then HP_Rate = ( CurHP * 1000 ) / MaxHP end end if #BossSkillNameTable >= 2 then -- ÁÖ±âÀû ¼Òȯ ½ºÅ³¸¸ Ž»ö local sSkillName = BossSkillNameTable[2] -- ex) sSkillName = "PeriodicSummon" -- ¾øÀ»°æ¿ì ½ºÅ³ÆäÀÌÁî¼ø¹ø ÃʱâÈ­ if Var["BossBattle"][ sSkillName.."PhaseNo"] == nil then Var["BossBattle"][ sSkillName.."PhaseNo"] = 1 end -- ½ÇÁ¦ ½ºÅ³ ½ÃÀüÀ» À§ÇÑ Å×À̺íÀÌ ¾øÀ»°æ¿ì »ý¼º if Var["BossBattle"][ sSkillName ] == nil then Var["BossBattle"][ sSkillName ] = {} end -- ½ºÅ³ ÆäÀÌÁî ¼ø¹ø local sThresholdTableIndex = sSkillName.."HP_Boss"..nBossType -- ex ) "PeriodicSummonHP_Boss1" -- ÀÌ ÁÖ±âÀûÀÎ ½ºÅ³Àº ±ÔÄ¢ÀÌ ´ÙÀ½°ú °°´Ù -- HP°¡ ÀÏÁ¤ ÀÌÇÏÀÏ ¶§ ¹ßµ¿ -- ¿¬ÀÌ¾î ½ºÅ³ÀÌ HP ¿¡ µû¶ó ¹ßµ¿ÀÌ µÈ´Ù¸é ÇÑ°¡Áö¸¸ ¹ßµ¿ -- HP°¡ ÇØ´ç ½ºÅ³ÀÌ ¹ßµ¿µÇ´Â ¹üÀ§¸¦ ¹þ¾î³ª¸é ¹«Á¶°Ç ±× ½ºÅ³Àº ÃʱâÈ­ -- ÃʱâÈ­ µÈ »óÅ´ óÀ½°ú °°¾Æ¼­ ´Ù½Ã HP°¡ ½ºÅ³¹ßµ¿¿¡ ÇØ´çµÇ´Â »óȲÀÌ¸é ±×´ë·Î ¹ßµ¿ -- for nCurPhase = 1, #ThresholdTable[ sThresholdTableIndex ] do -- ½ºÅ³ ½ÃÀü °¢ ÆäÀÌÁî Å×À̺í if Var["BossBattle"][ sSkillName ][ nCurPhase ] == nil then Var["BossBattle"][ sSkillName ][ nCurPhase ] = {} end local CurPhaseCastingInfo = Var["BossBattle"][ sSkillName ][ nCurPhase ] -- ÇöÀç HP¿Í ½ºÅ³ÀÇ Threshold ¿Í ºñ±³ÇÏ¿© ÇØ´çµÇ´Â ºÎºÐ ½ÃÀü ¿äû local bCastCurPhaseSkill = false -- HP ¹üÀ§ üũ 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 ¹üÀ§°¡ ÇØ´ç ÆäÀÌÁ ¹þ¾î³ª¸é ½ÃÀü ÁÖ±â´Â ÃʱâÈ­ µÈ´Ù. CurPhaseCastingInfo["dLastCastedTime"] = 0 -- ¼Òȯ °ü·Ã ÆäÀ̽ºÄÆÀÌ ³¡³­ »óȲÀÎ °æ¿ì¿¡¸¸ ÃʱâÈ­ÇØÁÜ 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 ¹üÀ§°¡ ÇØ´ç ÆäÀÌÁ ¹þ¾î³ª¸é ½ÃÀü ÁÖ±â´Â ÃʱâÈ­ µÈ´Ù. CurPhaseCastingInfo["dLastCastedTime"] = 0 -- ¼Òȯ °ü·Ã ÆäÀ̽ºÄÆÀÌ ³¡³­ »óȲÀÎ °æ¿ì¿¡¸¸ ÃʱâÈ­ÇØÁÜ if Var["EachFloor"..CurStepNo ]["bBossSummonDialogEnd"] == true then Var["EachFloor"..CurStepNo ]["bBossSummonDialogEnd"] = nil Var["EachFloor"..CurStepNo ]["nHP_BossSummonDialog"] = nil end end -- ½ÃÀüÇÒ ½ºÅ³ÀÇ Å×ÀÌºí ³» À妽º ¹Þ¾Æ¿À±â local sBossSkillTableIndex = sThresholdTableIndex -- µ¿ÀÏÇÏ°Ô ¼³Á¤ÇÔ ex ) "SummonHP_Boss1" local sCurSkillIndex = "HP"..ThresholdTable[ sThresholdTableIndex ][ nCurPhase ] -- ex) "HP800" -- HP ¹üÀ§ üũ °á°ú ½ºÅ³À» ¾µ ŸÀ̹ÖÀÏ °æ¿ì 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 ] -- ÃÑ ¼Òȯ Ƚ¼ö°¡ 0À¸·Î ¼³Á¤µÇ¾îÀÖÀ¸¸é ¹«Á¦ÇÑ ¼Òȯ / 0ÀÌ ¾Æ´Ï¶ó¸é ÇØ´ç Ƚ¼ö¸¸Å­ ¼Òȯ if CurPhaseCastingInfo["nSummonCount"] < CurSubPhaseInfo["SummonCount"] or CurSubPhaseInfo["SummonCount"] == 0 then if Var["CurSec"] >= CurPhaseCastingInfo["dLastCastedTime"] + CurSubPhaseInfo["Interval"] then if CurPhaseCastingInfo["bCasting"] ~= true then -- ½ºÅ³À» ·çƾ¿¡¼­ ½ÃÀüÇϵµ·Ï ¼³Á¤ 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 ---------------------- ÁÖ±âÀû ½ÃÀüÀ» ¼ÂÆÃÇϱâ À§ÇÑ ·çƾ ¼Ó üũ ------------------------------------///// -------------½ÃÀü´Ü°è--------------------------------------------------------- -- ÀÌÀü ¼Òȯ½ºÅ³ °ü·Ã ÆäÀ̽ºÄÆÀÌ ¾È³¡³µ´Ù¸é ³¡³¯¶§±îÁö ±â´Ù¸°´Ù. if Var["EachFloor"..CurStepNo ]["bBossSummonDialogEnd"] ~= false -- true or nil À϶§ ÁøÇà then -- ½ºÅ³º°·Î Çѹø ¾¿ Ž»ö for nIndex, sSkillName in pairs ( BossSkillNameTable ) do -- ½ºÅ³ ÆäÀÌÁî ¼ø¹ø local sThresholdTableIndex = sSkillName.."HP_Boss"..nBossType -- ex ) "PeriodicSummonHP_Boss1" -- ´ÙÀ½ ½ºÅ³ ¼ø¹ø°ú ÇØ´ç ½ºÅ³ ½ÃÀüÅ×À̺íÀÌ ¾ø´Ù¸é ¾ÆÁ÷ ½ÃÀüµµ ¾ÈµÈ °ÍÀ̹ǷΠÆнº if Var["BossBattle"][ sSkillName.."PhaseNo"] ~= nil and Var["BossBattle"][ sSkillName ] ~= nil then -- ½ÃÀü½ÂÀÎµÈ ½ºÅ³µé¸¸ ¼ø¼­´ë·Î ½ÃÀüÇؾßÇÔ. for nCurPhase = 1, #Var["BossBattle"][ sSkillName ] do -- ¿¡·¯Ã¼Å© if Var["BossBattle"][ sSkillName ][ nCurPhase ] == nil then break end local CurPhaseCastingInfo = Var["BossBattle"][ sSkillName ][ nCurPhase ] -- ÁغñµÈ ½ºÅ³ ½ÃÀü 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 ] -- Àܸ÷ ¼Òȯ 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 -- ÇØ´ç ȸÂ÷ ½ÃÀü ¿Ï·á ó¸® CurPhaseCastingInfo["dLastCastedTime"] = Var["CurSec"] CurPhaseCastingInfo["nSummonCount"] = CurPhaseCastingInfo["nSummonCount"] + 1 else ErrorLog( "BossRoutine::This name of skill("..sSkillName..") is invalid." ) end -- ½ºÅ³ À̸§ °ü·Ã Á¶°Ç¹® // -- ½ÃÀü ¿Ï·á ó¸® CurPhaseCastingInfo["bCasting"] = false DebugLog( "BossRoutine::EndSkillCasting-"..sSkillName.." "..sCurSkillTableIndex.." "..nCurPhase ) -- ÆäÀ̽ºÄÆ ½ÃÀÛ Var["EachFloor"..CurStepNo ]["bBossSummonDialogEnd"] = false Var["EachFloor"..CurStepNo ]["nHP_BossSummonDialog"] = ThresholdTable[ sThresholdTableIndex ][ nCurPhase ] end -- ½ºÅ³ ½ÃÀüÀÌ Áغñ µÇ¾ú´ÂÁö È®ÀÎÇÏ´Â Á¶°Ç¹® // end -- ÇÑ ½ºÅ³¿¡ ´ëÇÑ ¼øÂ÷Àû ½ÃÀü ·çÇÁ // end -- ½ºÅ³ ½ÃÀü ÀÚü¸¦ Çߴ°¡ È®ÀÎÇÏ´Â Á¶°Ç¹® // end -- °¢ ½ºÅ³À» Çѹø¾¿ Ž»öÇÏ´Â ·çÇÁ // end -- ¼Òȯ½ºÅ³ »ç¿ë °ü·Ã ÆäÀ̽ºÄÆÀÌ ÁøÇàÁßÀÎÁö È®ÀÎÇÏ´Â Á¶°Ç¹® // return ReturnAI["CPP"] end