Spoiler:
Code: Select all
function O112219 takes nothing returns boolean
return(DistanceBetweenPoints(GetUnitLoc(udg_unit102),udg_location29)<=100.00)
endfunction
function O112321 takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(udg_unit102),GetOwningPlayer(GetFilterUnit()))==true)
endfunction
function O112387 takes nothing returns boolean
return(DistanceBetweenPoints(GetUnitLoc(udg_unit102),GetUnitLoc(GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(100.00,GetUnitLoc(udg_unit102),Condition(function O112321)))))<=100.00)
endfunction
function O112467 takes nothing returns boolean
return GetBooleanOr(O112219(),O112387())
endfunction
function O112526 takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0BT'))then
return false
endif
return true
endfunction
function O112549 takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0C0'))then
return false
endif
return true
endfunction
function O112648 takes nothing returns nothing
if(O112526())then
set udg_location29=GetSpellTargetLoc()
set udg_Loc1=GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc(1,'h01Q',GetOwningPlayer(GetSpellAbilityUnit()),udg_Loc1,GetUnitFacing(GetSpellAbilityUnit()))
call RemoveLocation(udg_Loc1)
set udg_unit102=GetLastCreatedUnit()
call SetUnitVertexColorBJ(udg_unit102,0.00,0.00,100.00,0)
call SetUnitScalePercent(udg_unit102,100.00,100.00,100.00)
call IssuePointOrderLocBJ(udg_unit102,"move",udg_location29)
loop
exitwhen(O112467())
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,0.10))
endloop
call RemoveLocation(udg_location29)
set udg_location29=GetUnitLoc(udg_unit102)
call RemoveUnit(udg_unit102)
call CreateNUnitsAtLoc(1,'h01R',GetOwningPlayer(GetSpellAbilityUnit()),udg_location29,bj_UNIT_FACING)
call UnitAddAbilityBJ('A0BU',GetLastCreatedUnit())
call SetUnitAbilityLevelSwapped('A0BU',GetLastCreatedUnit(),GetUnitAbilityLevelSwapped('A0BT',GetSpellAbilityUnit()))
call IssueImmediateOrderBJ(GetLastCreatedUnit(),"thunderclap")
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=15
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
set udg_Loc1=PolarProjectionBJ(udg_location29,GetRandomReal(1.00,500.00),GetRandomReal(1.00,360.00))
call AddSpecialEffectLocBJ(udg_Loc1,"Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl")
call DestroyEffectBJ(GetLastCreatedEffectBJ())
call RemoveLocation(udg_Loc1)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call RemoveLocation(udg_location29)
else
endif
if(O112549())then
set udg_unit103=GetSpellAbilityUnit()
call UnitAddAbilityBJ('A0BZ',udg_unit103)
call SetUnitAbilityLevelSwapped('A0BZ',udg_unit103,GetUnitAbilityLevelSwapped('A0C0',udg_unit103))
call PolledWait((4.00*I2R(GetUnitAbilityLevelSwapped('A0C0',udg_unit103))))
call UnitRemoveAbilityBJ('A0BZ',udg_unit103)
set udg_unit103=null
else
endif
endfunction
function InitTrig_nuke takes nothing returns nothing
set gg_trg_nuke=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_nuke,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_nuke,function O112648)
endfunction