Name | Type | is_array | initial_value |
Earth_Crush_Caster | unit | No | |
Earth_Crush_Increment | integer | No | |
Earth_Crush_Point | location | Yes | |
Earth_Crush_UGroup | group | No |
function Trig_Earth_Crush_Loop_Func001Func007Func009Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( IsUnitEnemy(GetEnumUnit(), GetOwningPlayer(udg_Earth_Crush_Caster)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Earth_Crush_Loop_Func001Func007Func009A takes nothing returns nothing
if ( Trig_Earth_Crush_Loop_Func001Func007Func009Func001C() ) then
call UnitDamageTargetBJ( udg_Earth_Crush_Caster, GetEnumUnit(), ( I2R(GetUnitAbilityLevelSwapped('A002', udg_Earth_Crush_Caster)) * ( 3.00 * I2R(GetUnitLevel(udg_Earth_Crush_Caster)) ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Earth_Crush_Loop_Func001C takes nothing returns boolean
if ( not ( udg_Earth_Crush_Increment == 36 ) ) then
return false
endif
return true
endfunction
function Trig_Earth_Crush_Loop_Actions takes nothing returns nothing
if ( Trig_Earth_Crush_Loop_Func001C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call PauseUnitBJ( false, udg_Earth_Crush_Caster )
call ResetUnitAnimation( udg_Earth_Crush_Caster )
set udg_Earth_Crush_Caster = null
call RemoveLocation (udg_Earth_Crush_Point[0])
else
set udg_Earth_Crush_Increment = ( udg_Earth_Crush_Increment + 6 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Earth_Crush_Increment
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Earth_Crush_Point[1] = PolarProjectionBJ(udg_Earth_Crush_Point[0], ( I2R(udg_Earth_Crush_Increment) * 20.00 ), ( I2R(GetForLoopIndexA()) * ( 360.00 / I2R(udg_Earth_Crush_Increment) ) ))
set udg_Earth_Crush_UGroup = GetUnitsInRangeOfLocAll(150.00, udg_Earth_Crush_Point[1])
call AddSpecialEffectLocBJ( udg_Earth_Crush_Point[1], "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectLocBJ( udg_Earth_Crush_Point[1], "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectLocBJ( udg_Earth_Crush_Point[1], "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call ForGroupBJ( udg_Earth_Crush_UGroup, function Trig_Earth_Crush_Loop_Func001Func007Func009A )
call RemoveLocation (udg_Earth_Crush_Point[1])
call DestroyGroup(udg_Earth_Crush_UGroup)
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endif
endfunction
//===========================================================================
function InitTrig_Earth_Crush_Loop takes nothing returns nothing
set gg_trg_Earth_Crush_Loop = CreateTrigger( )
call DisableTrigger( gg_trg_Earth_Crush_Loop )
call TriggerRegisterTimerEventPeriodic( gg_trg_Earth_Crush_Loop, 0.15 )
call TriggerAddAction( gg_trg_Earth_Crush_Loop, function Trig_Earth_Crush_Loop_Actions )
endfunction
function Trig_Earth_Crush_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Earth_Crush_Actions takes nothing returns nothing
set udg_Earth_Crush_Caster = GetSpellAbilityUnit()
set udg_Earth_Crush_Point[0] = GetUnitLoc(udg_Earth_Crush_Caster)
set udg_Earth_Crush_Increment = 0
call PauseUnitBJ( true, udg_Earth_Crush_Caster )
call SetUnitAnimation( GetSpellAbilityUnit(), "slam" )
call TriggerSleepAction( 0.35 )
call EnableTrigger( gg_trg_Earth_Crush_Loop )
endfunction
//===========================================================================
function InitTrig_Earth_Crush takes nothing returns nothing
set gg_trg_Earth_Crush = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Earth_Crush, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Earth_Crush, Condition( function Trig_Earth_Crush_Conditions ) )
call TriggerAddAction( gg_trg_Earth_Crush, function Trig_Earth_Crush_Actions )
endfunction