function Trig_Move_Unit_Func002002003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Move_Unit_Func002002003002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Move_Unit_Func002002003002002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_Caster)) == true )
endfunction
function Trig_Move_Unit_Func002002003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Move_Unit_Func002002003002001(), Trig_Move_Unit_Func002002003002002() )
endfunction
function Trig_Move_Unit_Func002002003 takes nothing returns boolean
return GetBooleanAnd( Trig_Move_Unit_Func002002003001(), Trig_Move_Unit_Func002002003002() )
endfunction
function Trig_Move_Unit_Func003A takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), GetUnitLoc(udg_Caster) )
endfunction
function Trig_Move_Unit_Func005Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 1000) <= udg_Chance_Bash ) ) then
return false
endif
return true
endfunction
function Trig_Move_Unit_Func005A takes nothing returns nothing
if ( Trig_Move_Unit_Func005Func001C() ) then
call UnitAddAbilityBJ( 'A000', udg_Dummy_Unit )
call SetUnitAbilityLevelSwapped( 'A000', udg_Dummy_Unit, GetUnitAbilityLevelSwapped('A002', udg_Caster) )
call IssueTargetOrderBJ( udg_Dummy_Unit, "thunderbolt", GetEnumUnit() )
call UnitRemoveAbilityBJ( 'A000', udg_Dummy_Unit )
else
call DoNothing( )
endif
endfunction
function Trig_Move_Unit_Func007C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Caster, udg_Stone_Armor_Buff) == false ) ) then
return false
endif
return true
endfunction
function Trig_Move_Unit_Actions takes nothing returns nothing
set udg_Dummy_Group = GetUnitsOfTypeIdAll('n000')
set udg_Stun_Group = GetUnitsInRangeOfLocMatching(200.00, GetUnitLoc(udg_Dummy_Unit), Condition(function Trig_Move_Unit_Func002002003))
call ForGroupBJ( udg_Dummy_Group, function Trig_Move_Unit_Func003A )
call DestroyGroup (udg_Dummy_Group)
call ForGroupBJ( udg_Stun_Group, function Trig_Move_Unit_Func005A )
call DestroyGroup (udg_Stun_Group)
if ( Trig_Move_Unit_Func007C() ) then
call RemoveUnit( udg_Dummy_Unit )
call DisableTrigger( GetTriggeringTrigger() )
call DisableTrigger( gg_trg_Damage )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Move_Unit takes nothing returns nothing
set gg_trg_Move_Unit = CreateTrigger( )
call DisableTrigger( gg_trg_Move_Unit )
call TriggerRegisterTimerEventPeriodic( gg_trg_Move_Unit, 0.01 )
call TriggerAddAction( gg_trg_Move_Unit, function Trig_Move_Unit_Actions )
endfunction