技能代码
function azgalor_skill_04_DAMAGE takes real x, real y returns nothing
local unit u = CreateUnit(GetOwningPlayer(udg_azgalor), 'e000', x, y, 0)
call RemoveGuardPosition(u)
call UnitApplyTimedLife(u, 'BHwe', 1.5)
call UnitAddAbility(u, 'A009')
call SetUnitAbilityLevel(u, 'A009', GMode)
call IssuePointOrder(u, "flamestrike", x, y)
set u = null
endfunction
function azgalor_skill_04_TIMER3 takes nothing returns nothing
call SetUnitAnimation(udg_azgalor, "stand")
call PauseUnit(udg_azgalor, false)
call DestroyTimer(GetExpiredTimer())
endfunction
function azgalor_skill_04_TIMER2 takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer ht = GetHandleId(t)
local unit u = LoadUnitHandle(HT, ht, 2100)
local real angle = LoadReal(HT, ht, 2300)
local integer step = LoadInteger(HT, ht, 2400)
local integer step_index = LoadInteger(HT, ht, 2401)
local integer step_index2 = LoadInteger(HT, ht, 2402)
set step = step+1
call SaveInteger(HT, ht, 2400, step)
if (step <= step_index) then
if (step <= step_index2) then
call SetX(u, GetUnitX(u)+10*CosBJ(angle))
call SetY(u, GetUnitY(u)+10*SinBJ(angle))
else
call SetX(u, GetUnitX(u)-10*CosBJ(angle))
call SetY(u, GetUnitY(u)-10*SinBJ(angle))
endif
if (ModuloInteger(step, 10) == 0) then
call azgalor_skill_04_DAMAGE(GetUnitX(u), GetUnitY(u))
endif
else
call KillUnit(u)
call SetUnitAnimation(udg_azgalor, "spell")
call TimerStart(CreateTimer(), 1, false, function azgalor_skill_04_TIMER3)
call FlushChildHashtable(HT, ht)
call DestroyTimer(t)
endif
set u = null
set t = null
endfunction
function azgalor_skill_04_TIMER takes nothing returns nothing
local timer t = GetExpiredTimer()
local timer t2 = CreateTimer()
local integer ht = GetHandleId(t)
local integer ht2 = GetHandleId(t2)
local real angle = LoadReal(HT, ht, 2300)
local unit u = CreateUnit(GetOwningPlayer(udg_azgalor), 'e008', GetUnitX(udg_azgalor)+150*CosBJ(angle-45), GetUnitY(udg_azgalor)+150*SinBJ(angle-45), angle)
call SaveUnitHandle(HT, ht2, 2100, u)
call SaveReal(HT, ht2, 2300, angle)
call SaveInteger(HT, ht2, 2400, 0)
call SaveInteger(HT, ht2, 2401, 100)
call SaveInteger(HT, ht2, 2402, 50)
call TimerStart(t2, 0.02, true, function azgalor_skill_04_TIMER2)
call FlushChildHashtable(HT, ht)
call DestroyTimer(t)
set u = null
set t =null
set t2 = null
endfunction
function azgalor_skill_04 takes real angle returns nothing
local timer t = CreateTimer()
local integer ht = GetHandleId(t)
call PauseUnit(udg_azgalor, true)
call SetUnitFacing(udg_azgalor, angle)
call SetUnitAnimation(udg_azgalor, "spell throw")
call SaveReal(HT, ht, 2300, angle)
call TimerStart(t, 0.5, false, function azgalor_skill_04_TIMER)
set t = null
endfunction
2011年06月25日 06点06分
8