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/AIScript/Chimera.lua

326 lines
10 KiB

-- Ű<EFBFBD>޶<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ
-- <EFBFBD><EFBFBD>ų 1 : <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>̻<EFBFBD> <EFBFBD>޾<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ߵ<EFBFBD>
-- <EFBFBD><EFBFBD>ų 2 : HP<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ߵ<EFBFBD>
-- <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD>
ReturnAI = {}
ReturnAI.END = 1 -- Return_AI_END = 1;// -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> AI<EFBFBD><EFBFBD>ƾ <EFBFBD><EFBFBD>
ReturnAI.CPP = 2 -- Return_AI_CPP = 2;// -- <EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD> <EFBFBD>Ϻ<EFBFBD> ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> cpp<EFBFBD><EFBFBD> AI<EFBFBD><EFBFBD>ƾ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
--<EFBFBD>ι<EFBFBD>° Ű<EFBFBD>޶<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>𼱰<EFBFBD> Fail
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
--Chimera_Skill_W03_2Target.nif <EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD> Ÿ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
--Psy_Chimera_Skill_W03_3DOT.nif <EFBFBD><EFBFBD>Ʈ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
--Psy_Chimera_Skill_W03_3DOTLoop.nif <EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
C = {}
C.Immune = {} -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ų
C.Immune.SkillIndex = "Chimera_Skill_N_ACS" -- <EFBFBD><EFBFBD>ų <EFBFBD≯<EFBFBD>
C.Immune.Interval = 600 -- 600<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 500,000 <EFBFBD>̻<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>޾<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
C.Immune.Damage = 500000 --
C.LethalMoveTime = {} -- <EFBFBD>ʻ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD>
C.LethalMoveTime[1] = 950 -- 95% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[2] = 850 -- 85% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[3] = 750 -- 75% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[4] = 650 -- 65% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[5] = 600 -- 60% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[6] = 550 -- 55% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[7] = 450 -- 45% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[8] = 350 -- 35% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[9] = 300 -- 30% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[10] = 250 -- 25% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[11] = 200 -- 20% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[12] = 150 -- 15% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[13] = 120 -- 12% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[14] = 90 -- 9% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime[15] = 50 -- 5% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime.Instance = {} -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ų
C.LethalMoveTime.Instance.SkillIndexPush = "Chimera_Skill_W03_1" -- <EFBFBD><EFBFBD>ų <EFBFBD≯<EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ߵ<EFBFBD><EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD>ų)
C.LethalMoveTime.Instance.SkillIndexDamage = "Chimera_Skill_W03_2" -- <EFBFBD><EFBFBD>ų <EFBFBD≯<EFBFBD>(<EFBFBD>ߵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų)
C.LethalMoveTime.Instance.Range = 2000 -- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ÿ<EFBFBD>
C.LethalMoveTime.Instance.SpotViewSec = 3 -- <EFBFBD><EFBFBD>ų <EFBFBD>߻<EFBFBD> 3<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime.Instance.SpotLifeTime = 7 -- <EFBFBD>ҵ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ӽð<EFBFBD>
C.LethalMoveTime.Instance.SpotDamageSecond = 4 -- <EFBFBD>ҵ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
C.LethalMoveTime.Instance.DamageArea = 150 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
C.LethalMoveTime.Instance.Meteor = {}
C.LethalMoveTime.Instance.Meteor.Number = 16 -- <EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD> 10 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime.Instance.Meteor.Interval = 0.4 -- 0.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>
C.LethalMoveTime.Instance.MinMA = 10000 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD>
C.LethalMoveTime.Instance.MaxMA = 15000 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD>
C.LethalMoveTime.Instance.MH = 5000 -- <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>
C.LethalMoveTime.Instance.DamageRate = 980 -- MaxHP<EFBFBD><EFBFBD> 98% <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime.MagicFieldSkill = "Chimera_Skill_W03_2" -- <EFBFBD> <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime.MagicFieldLocX = 3677 -- <EFBFBD>ʵ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>߽<EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime.MagicFieldLocY = 18467
C.LethalMoveTime.MagicFieldWhen = "Last" -- ù("First")/<EFBFBD><EFBFBD>("Last") <EFBFBD>ҵ<EFBFBD><EFBFBD>̰<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
C.LethalMoveTime.TotalSecond = 10
MemBlock = {}
function Chimera(Handle, MapIndex)
cExecCheck "Chimera"
if cIsObjectDead(Handle) then -- <EFBFBD>׾<EFBFBD><EFBFBD><EFBFBD>
cAIScriptSet(Handle) -- <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
MemBlock[Handle] = nil -- <EFBFBD>޸<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cDebugLog "Chimera Dead"
return ReturnAI.END
end
local Var = MemBlock[Handle]
if Var == nil then
MemBlock[Handle] = {}
Var = MemBlock[Handle]
Var.Handle = Handle
Var.MapIndex = MapIndex
Var.LastCheck = cCurSec() -- 1<EFBFBD>ʿ<EFBFBD> <EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD> üũ<EFBFBD>ϱ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var.Lethal = {}
Var.Lethal.SkillBlastSec = 0 -- <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD>ߵ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> - <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var.ImmunManage = {} -- HP <EFBFBD><EFBFBD><EFBFBD>Ҹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD>(<EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
Var.ImmunManage.QueueHead = 1
for k = 1, C.Immune.Interval do
Var.ImmunManage[k] = cObjectHP(Var.Handle)
end
Var.MeteorTargetList = {} -- <EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<EFBFBD>ٵ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD>
Var.MeteorTick = 0.0 -- <EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <EFBFBD>ð<EFBFBD>
Var.MeteorNumber = 0 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ҵ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var.NextLethalIndex = 1 -- <EFBFBD>ʻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD> C.LethalMoveTime[1]<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ٸ<EFBFBD>
Var.StepFunc = Chimera_Default
end
return Var.StepFunc(Var)
end
function Chimera_Default(Var)
cExecCheck "Chimera_Default"
local CurSec = cCurSec()
if Var.LastCheck == CurSec then
return ReturnAI.CPP
end
Var.LastCheck = CurSec
-- 1<EFBFBD>ʿ<EFBFBD> <EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD> üũ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local CurHP, MaxHP = cObjectHP(Var.Handle)
-- HP <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var.ImmunManage.QueueHead = Var.ImmunManage.QueueHead + 1
if Var.ImmunManage.QueueHead > C.Immune.Interval then
Var.ImmunManage.QueueHead = 1
end
local LastHP = Var.ImmunManage[Var.ImmunManage.QueueHead]
Var.ImmunManage[Var.ImmunManage.QueueHead] = CurHP
if LastHP - CurHP > C.Immune.Damage then
Var.StepFunc = Chimera_ImmunSkill -- <EFBFBD><EFBFBD><EFBFBD>ų <EFBFBD>ߵ<EFBFBD>
return ReturnAI.CPP
end
-- HP <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if CurHP == MaxHP then
Var.NextLethalIndex = 1
else
local HPRate = CurHP * 1000 / MaxHP
if C.LethalMoveTime[Var.NextLethalIndex] ~= nil and HPRate < C.LethalMoveTime[Var.NextLethalIndex] then
Var.NextLethalIndex = Var.NextLethalIndex + 1
Var.StepFunc = Chimera_LethalMove -- <EFBFBD>ʻ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ߵ<EFBFBD>
return ReturnAI.CPP
end
end
return ReturnAI.CPP
end
function Chimera_ImmunSkill(Var) -- <EFBFBD><EFBFBD><EFBFBD>ų <EFBFBD>ߵ<EFBFBD>
cExecCheck "Chimera_ImmunSkill"
if cSkillBlast(Var.Handle, Var.Handle, C.Immune.SkillIndex) == nil then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cDebugLog "Chimera_ImmunSkill : Other Skill using"
return ReturnAI.CPP -- <EFBFBD>ٸ<EFBFBD> <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><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
cDebugLog "Chimera_ImmunSkill : Blast"
for k = 1, C.Immune.Interval do
Var.ImmunManage[k] = cObjectHP(Var.Handle)
end
Var.StepFunc = Chimera_Default
return ReturnAI.CPP
end
function Chimera_LethalMove(Var) -- <EFBFBD>ʻ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ߵ<EFBFBD>
cExecCheck "Chimera_LethalMove"
if cSkillBlast(Var.Handle, Var.Handle, C.LethalMoveTime.Instance.SkillIndexPush) == nil then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cDebugLog "Chimera_LethalMove : Other Skill using"
return ReturnAI.CPP -- <EFBFBD>ٸ<EFBFBD> <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><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
cDebugLog "Chimera_LethalMove : Blast"
Var.Lethal.SkillBlastSec = cCurSec()
Var.StepFunc = Chimera_Spotting
return ReturnAI.END
end
function Chimera_Spotting(Var)
cExecCheck "Chimera_Spotting"
if cCurSec() < Var.Lethal.SkillBlastSec + C.LethalMoveTime.Instance.SpotViewSec then
return ReturnAI.END
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<EFBFBD>ټ<EFBFBD><EFBFBD><EFBFBD>
Var.MeteorTargetList = {} -- <EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<EFBFBD>ٵ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD>
local TargetList = {cAggroList(Var.Handle, C.LethalMoveTime.Instance.Range)} -- Range <EFBFBD>ȿ<EFBFBD> <EFBFBD>ִ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local TargetNum = C.LethalMoveTime.Instance.Meteor.Number
if TargetNum < #TargetList then
TargetNum = #TargetList
end
for k = 1, TargetNum do
local rnd = cRandomInt(1, #TargetList)
Var.MeteorTargetList[#Var.MeteorTargetList + 1] = TargetList[rnd]
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>Ҹ<EFBFBD> rnd<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
TargetList[rnd] = TargetList[#TargetList]
TargetList[#TargetList] = nil
end
--for k = 1, #Var.MeteorTargetList do
-- cDebugLog("Target : " .. Var.MeteorTargetList[k])
--end
Var.MeteorTick = cCurrentSecond() -- <EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <EFBFBD>ð<EFBFBD>
Var.MeteorNumber = 0 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ҵ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var.StepFunc = Chimera_MeteorShower
return ReturnAI.END
end
function Chimera_MeteorShower(Var)
cExecCheck "Chimera_MeteorShower"
local CurrentSecond = cCurrentSecond()
if CurrentSecond < Var.MeteorTick then
return ReturnAI.END
end
if #Var.MeteorTargetList == 0 then -- Ÿ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var.StepFunc = Chimera_SkillEnd
return ReturnAI.END
end
Var.MeteorTick = Var.MeteorTick + C.LethalMoveTime.Instance.Meteor.Interval
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local TargetHandle = Var.MeteorTargetList[#Var.MeteorTargetList]
Var.MeteorTargetList[#Var.MeteorTargetList] = nil
local X, Y = cObjectLocate(TargetHandle)
if X ~= nil and Y ~= nil then
local SpotHandle = cEffectRegen_XY(Var.MapIndex, "Chimera_Skill_W03_2Target", -- x, y <EFBFBD><EFBFBD>ġ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
-- <EFBFBD><EFBFBD><EFBFBD≯<EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD≯<EFBFBD>,
X, Y, 0, C.LethalMoveTime.Instance.SpotLifeTime, 0)
-- x<EFBFBD><EFBFBD>ǥ, y<EFBFBD><EFBFBD>ǥ, dir, <EFBFBD><EFBFBD><EFBFBD>ӽð<EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, [<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>])
cAIScriptSet(SpotHandle, Var.Handle)
cAIScriptFunc(SpotHandle, "Entrance", "Effect_TargetSpot") --<EFBFBD>Ա<EFBFBD><EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD> HorseMain
MemBlock[SpotHandle] = {}
MemBlock[SpotHandle].Handle = SpotHandle
MemBlock[SpotHandle].X = X
MemBlock[SpotHandle].Y = Y
MemBlock[SpotHandle].Chimera = Var
MemBlock[SpotHandle].ExploseTime = CurrentSecond + C.LethalMoveTime.Instance.SpotDamageSecond
Var.MeteorNumber = Var.MeteorNumber + 1
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD> <EFBFBD>򸮴<EFBFBD> <EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD>?
if Var.MeteorNumber == 1 and C.LethalMoveTime.MagicFieldWhen == "First" then
MemBlock[SpotHandle].MagicField = true
end
if #Var.MeteorTargetList == 0 and C.LethalMoveTime.MagicFieldWhen == "Last" then
MemBlock[SpotHandle].MagicField = true
end
end
return ReturnAI.END
end
function Chimera_SkillEnd(Var)
if cCurSec() > Var.Lethal.SkillBlastSec + C.LethalMoveTime.TotalSecond then
Var.StepFunc = Chimera_Default
cDebugLog "SkillEnd"
end
return ReturnAI.CPP -- SkillEndWait<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><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
--------------------------------------------------------
function Effect_TargetSpot(Handle, MapIndex)
cExecCheck "Effect_TargetSpot"
local Var = MemBlock[Handle]
if Var == nil then
cAIScriptSet(Handle) -- <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
return
end
if cCurrentSecond() < Var.ExploseTime then
return
end
cDebugLog "Effect_TargetSpot : Explose"
local ChimeraHandle = Var.Chimera.Handle
local TargetList = {cGetTargetList(ChimeraHandle, Var.X, Var.Y, C.LethalMoveTime.Instance.DamageArea)}
-- cGetTargetList<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ڵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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 k = 1, #TargetList do
local Target = TargetList[k]
if Target ~= nil then
-- CPP<EFBFBD><EFBFBD> <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 Damage = cSkillDamageCalculate(Var.Handle, C.LethalMoveTime.Instance.SkillIndexDamage, Target, C.LethalMoveTime.Instance)
-- HP<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>޶<EFBFBD><EFBFBD><EFBFBD>
local CurHP, MaxHP = cObjectHP(Target)
local Damage = MaxHP * C.LethalMoveTime.Instance.DamageRate / 1000.
-- target<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Damage ~= nil then
cDamaged(Target, Damage, Var.Handle)
end
end
end
if Var.MagicField then
cDebugLog "MagicField Spread"
cMagicFieldSpread(ChimeraHandle, C.LethalMoveTime.MagicFieldLocX, C.LethalMoveTime.MagicFieldLocY, 0, C.LethalMoveTime.MagicFieldSkill, 1)
-- Tick, Keep, DOT <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
cAIScriptSet(Handle) -- <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
MemBlock[Handle] = nil
end