Name | Type | is_array | initial_value |
hj | unit | Yes | |
Target | unit | No |
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_____________________________________001_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AHtb' ) ) then
return false
endif
return true
endfunction
function Trig_____________________________________001_Actions takes nothing returns nothing
local unit array u
local integer i
local unit t
set i = 0
set udg_Target = GetSpellTargetUnit()
set t = udg_Target
call PauseUnitBJ( true, t )
call TriggerSleepAction( 0.5 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 20
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(udg_Target), 300.00, ( I2R(GetForLoopIndexA()) * 18.00 )), bj_UNIT_FACING )
set i = GetForLoopIndexA()
set u[i] = GetLastCreatedUnit()
call IssueTargetOrderBJ( u[i], "deathcoil", t )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 0.75 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 20
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call RemoveUnit( u[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 20
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set u[GetForLoopIndexA()] = null
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set t = udg_Target
call PauseUnitBJ( false, udg_Target )
endfunction
//===========================================================================
function InitTrig_DeathCoil takes nothing returns nothing
set gg_trg_DeathCoil = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DeathCoil, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_DeathCoil, Condition( function Trig_____________________________________001_Conditions ) )
call TriggerAddAction( gg_trg_DeathCoil, function Trig_____________________________________001_Actions )
endfunction