function Trig_Psionic_Storm_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A054' ) ) then
return false
endif
return true
endfunction
function Trig_Psionic_Storm_Actions takes nothing returns nothing
local location q = GetSpellTargetLoc()
local unit a //1
local unit b //2
local unit c //3
local unit d //4
local unit e //5
local unit f //6
local unit g //7
local unit h //8
local unit i //9
local unit j //10
local unit k //11
local unit l //12
local unit m //13
local unit n //14
local unit o //15
local unit p //16
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 500.00, 0), bj_UNIT_FACING )
set a = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 500.00, 45.00), bj_UNIT_FACING )
set b = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 500.00, 90.00), bj_UNIT_FACING )
set c = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 500.00, 135.00), bj_UNIT_FACING )
set d = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 500.00, 180.00), bj_UNIT_FACING )
set e = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 500.00, 225.00), bj_UNIT_FACING )
set f = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 500.00, 270.00), bj_UNIT_FACING )
set g = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 500.00, 315.00), bj_UNIT_FACING )
set h = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 250.00, 0), bj_UNIT_FACING )
set i = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 250.00, 45.00), bj_UNIT_FACING )
set j = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 250.00, 90.00), bj_UNIT_FACING )
set k = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 250.00, 135.00), bj_UNIT_FACING )
set l = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 250.00, 180.00), bj_UNIT_FACING )
set m = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 250.00, 225.00), bj_UNIT_FACING )
set n = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 250.00, 270.00), bj_UNIT_FACING )
set o = GetLastCreatedUnit ()
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetSpellTargetLoc(), 250.00, 315.00), bj_UNIT_FACING )
set p = GetLastCreatedUnit ()
call IssueTargetOrderBJ( a, "drain", b )
call IssueTargetOrderBJ( b, "drain", c )
call IssueTargetOrderBJ( c, "drain", d )
call IssueTargetOrderBJ( d, "drain", e )
call IssueTargetOrderBJ( e, "drain", f )
call IssueTargetOrderBJ( f, "drain", g )
call IssueTargetOrderBJ( g, "drain", h )
call IssueTargetOrderBJ( h, "drain", a )
call IssueTargetOrderBJ( i, "drain", j )
call IssueTargetOrderBJ( j, "drain", k )
call IssueTargetOrderBJ( k, "drain", l )
call IssueTargetOrderBJ( l, "drain", m )
call IssueTargetOrderBJ( m, "drain", n )
call IssueTargetOrderBJ( n, "drain", o )
call IssueTargetOrderBJ( o, "drain", p )
call IssueTargetOrderBJ( p, "drain", i )
call DamageUnitsInAOEEx (gg_unit_H001_1025, GetUnitAbilityLevel (gg_unit_H001_1025, A054)* I2R(50), GetLocationX(q), GetLocationY(q), 500, false ,0)
set a = null
set b = null
set c = null
set d = null
set e = null
set f = null
set g = null
set h = null
set i = null
set j = null
set k = null
set l = null
set m = null
set n = null
set o = null
set p = null
call RemoveLocation(q)
endfunction