function spellcond takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function act takes nothing returns nothing
local unit d
local unit c2 = GetTriggerUnit()
local real r1 = GetRandomReal(GetUnitFacing(c2) - 40.00, GetUnitFacing(c2) + 40.00)
local location p3 = GetUnitLoc(c2)
local location p4 = PolarProjectionBJ(p3, 200.00, r1)
set d = CreateUnitAtLoc(GetOwningPlayer(c2), 'e000',p3,r1)
call UnitApplyTimedLifeBJ (1.00,'BTLF', d)
call IssuePointOrderLocBJ(d, "shockwave",p4 )
endfunction
function spellact takes nothing returns nothing
local timer t
set t = CreateTimer()
call TimerStart(t,0.02,true, function act)
call TriggerSleepAction(1.00)
call PauseTimer(t)
call DestroyTimer(t)
endfunction
//===========================================================================
function InitTrig_Spell takes nothing returns nothing
set gg_trg_Spell = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spell, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Spell, Condition (function spellcond))
call TriggerAddAction( gg_trg_Spell, function spellact )
endfunction