Name | Type | is_array | initial_value |
function Trig_Bombardment_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then // 'A000' is the spell
return false
endif
return true
endfunction
function Trig_Bombardment_Actions takes nothing returns nothing
local unit a = GetSpellAbilityUnit()
local location s = GetSpellTargetLoc()
local real r = AngleBetweenPoints(GetUnitLoc(a), s)
local real r2 = r - 180
local unit L = null
local unit Bomber = null
local integer m = 0
call CreateNUnitsAtLoc( 1, 'n000', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(a), 100.00, r2), r )
set Bomber = GetLastCreatedUnit()
call IssuePointOrderLocBJ( Bomber, "move", PolarProjectionBJ(GetUnitLoc(a), 1200.00, r) )
call TriggerSleepAction(0.75)
loop
call CreateNUnitsAtLoc( 1, 'n001', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(Bomber), 155.00, r), r )
set L = GetLastCreatedUnit()
call IssuePointOrderLocBJ( L, "attackground", PolarProjectionBJ(GetUnitLoc(Bomber), 245.00, r) )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', L )
call TriggerSleepAction(.50)
set m = m +1
exitwhen (m==7)
endloop
call TriggerSleepAction(0.60)
call RemoveUnit( Bomber )
endfunction
//===========================================================================
function InitTrig_Bombardment takes nothing returns nothing
set gg_trg_Bombardment = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bombardment, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Bombardment, Condition( function Trig_Bombardment_Conditions ) )
call TriggerAddAction( gg_trg_Bombardment, function Trig_Bombardment_Actions )
endfunction
function Trig_Bombardment_A_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A003' ) ) then
return false
endif
return true
endfunction
function Trig_Bombardment_A_Actions takes nothing returns nothing
local unit a = GetSpellAbilityUnit()
local location s = GetSpellTargetLoc()
local real r = AngleBetweenPoints(GetUnitLoc(a), s)
local real r2 = r - 180
local real rt1 = r - 90
local real rt2 = r + 90
local unit L = null
local unit Bomber = null
local integer m = 0
call CreateNUnitsAtLoc( 1, 'n000', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(a), 100.00, r2), r )
set Bomber = GetLastCreatedUnit()
call IssuePointOrderLocBJ( Bomber, "move", PolarProjectionBJ(GetUnitLoc(a), 1200.00, r) )
call TriggerSleepAction(0.75)
loop
call CreateNUnitsAtLoc( 1, 'n001', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(Bomber), 155.00, r), r )
set L = GetLastCreatedUnit()
call IssuePointOrderLocBJ( L, "attackground", PolarProjectionBJ(GetUnitLoc(Bomber), 145.00, rt1) )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', L )
call CreateNUnitsAtLoc( 1, 'n001', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(Bomber), 155.00, r), r )
set L = GetLastCreatedUnit()
call IssuePointOrderLocBJ( L, "attackground", PolarProjectionBJ(GetUnitLoc(Bomber), 145.00, rt2) )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', L )
call TriggerSleepAction(.50)
set m = m +1
exitwhen (m==7)
endloop
call TriggerSleepAction(0.60)
call RemoveUnit( Bomber )
endfunction
//===========================================================================
function InitTrig_Bombardment_A takes nothing returns nothing
set gg_trg_Bombardment_A = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bombardment_A, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Bombardment_A, Condition( function Trig_Bombardment_A_Conditions ) )
call TriggerAddAction( gg_trg_Bombardment_A, function Trig_Bombardment_A_Actions )
endfunction
function Trig_Bombardment_B_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A004' ) ) then
return false
endif
return true
endfunction
function Trig_Bombardment_B_Actions takes nothing returns nothing
local unit a = GetSpellAbilityUnit()
local location s = GetSpellTargetLoc()
local real r = AngleBetweenPoints(GetUnitLoc(a), s)
local real r2 = r - 180
local unit L = null
local unit Bomber = null
local integer m = 0
call CreateNUnitsAtLoc( 1, 'n000', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(a), 100.00, r2), r )
set Bomber = GetLastCreatedUnit()
call IssuePointOrderLocBJ( Bomber, "move", PolarProjectionBJ(GetUnitLoc(a), 1200.00, r) )
call TriggerSleepAction(0.75)
loop
call CreateNUnitsAtLoc( 1, 'n001', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(Bomber), 155.00, r), r )
set L = GetLastCreatedUnit()
call IssuePointOrderLocBJ( L, "attackground", PolarProjectionBJ(GetUnitLoc(Bomber), 245.00, r) )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', L )
call CreateNUnitsAtLoc( 1, 'n001', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(Bomber), 105.00, r), r )
set L = GetLastCreatedUnit()
call IssuePointOrderLocBJ( L, "attackground", PolarProjectionBJ(GetUnitLoc(Bomber), 195.00, r) )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', L )
call CreateNUnitsAtLoc( 1, 'n001', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(Bomber), 205.00, r), r )
set L = GetLastCreatedUnit()
call IssuePointOrderLocBJ( L, "attackground", PolarProjectionBJ(GetUnitLoc(Bomber), 295.00, r) )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', L )
call TriggerSleepAction(.50)
set m = m +1
exitwhen (m==7)
endloop
call TriggerSleepAction(0.60)
call RemoveUnit( Bomber )
endfunction
//===========================================================================
function InitTrig_Bombardment_B takes nothing returns nothing
set gg_trg_Bombardment_B = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bombardment_B, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Bombardment_B, Condition( function Trig_Bombardment_B_Conditions ) )
call TriggerAddAction( gg_trg_Bombardment_B, function Trig_Bombardment_B_Actions )
endfunction
function Trig_Bombardment_Ult_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A002' ) ) then
return false
endif
return true
endfunction
function Strike takes unit a, real r returns nothing
local unit L = null
call CreateNUnitsAtLoc( 1, 'n001', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(a), 155.00, r), r )
set L = GetLastCreatedUnit()
call IssuePointOrderLocBJ( L, "attackground", PolarProjectionBJ(GetUnitLoc(a), 245.00, r) )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', L )
endfunction
function Trig_Bombardment_Ult_Actions takes nothing returns nothing
local unit a = GetSpellAbilityUnit()
local location s = GetSpellTargetLoc()
local real r = AngleBetweenPoints(GetUnitLoc(a), s)
local real r2 = r - 90
local real r3 = r + 90
local unit Bomber = null
local unit Bomber2 = null
local unit Bomber3 = null
local unit Bomber4 = null
local unit Bomber5 = null
local integer m = 0
call CreateNUnitsAtLoc( 1, 'n000', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(a), 500.00, r2), r )
set Bomber = GetLastCreatedUnit()
call IssuePointOrderLocBJ( Bomber, "move", PolarProjectionBJ(GetUnitLoc(Bomber), 1300.00, r) )
call CreateNUnitsAtLoc( 1, 'n000', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(a), 250.00, r2), r )
set Bomber2 = GetLastCreatedUnit()
call IssuePointOrderLocBJ( Bomber2, "move", PolarProjectionBJ(GetUnitLoc(Bomber2), 1300.00, r) )
call CreateNUnitsAtLoc( 1, 'n000', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(a), 0, r2), r )
set Bomber3 = GetLastCreatedUnit()
call IssuePointOrderLocBJ( Bomber3, "move", PolarProjectionBJ(GetUnitLoc(Bomber3), 1300.00, r) )
call CreateNUnitsAtLoc( 1, 'n000', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(a), 250.00, r3), r )
set Bomber4 = GetLastCreatedUnit()
call IssuePointOrderLocBJ( Bomber4, "move", PolarProjectionBJ(GetUnitLoc(Bomber4), 1300.00, r) )
call CreateNUnitsAtLoc( 1, 'n000', GetOwningPlayer(a), PolarProjectionBJ(GetUnitLoc(a), 500.00, r3), r )
set Bomber5 = GetLastCreatedUnit()
call IssuePointOrderLocBJ( Bomber5, "move", PolarProjectionBJ(GetUnitLoc(Bomber5), 1300.00, r) )
call TriggerSleepAction(0.75)
loop
call Strike(Bomber,r)
call Strike(Bomber2,r)
call Strike(Bomber3,r)
call Strike(Bomber4,r)
call Strike(Bomber5,r)
call TriggerSleepAction(0.50)
set m = m + 1
exitwhen (m==7)
endloop
call TriggerSleepAction(0.60)
call RemoveUnit( Bomber )
call RemoveUnit( Bomber2 )
call RemoveUnit( Bomber3 )
call RemoveUnit( Bomber4 )
call RemoveUnit( Bomber5 )
endfunction
//===========================================================================
function InitTrig_Bombardment_Ult takes nothing returns nothing
set gg_trg_Bombardment_Ult = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bombardment_Ult, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Bombardment_Ult, Condition( function Trig_Bombardment_Ult_Conditions ) )
call TriggerAddAction( gg_trg_Bombardment_Ult, function Trig_Bombardment_Ult_Actions )
endfunction