function IsUnitInRect takes unit u, rect r returns boolean
local region reg = CreateRegion()
local boolean b
call RegionAddRect( reg, r )
set b = IsUnitInRegion( reg, u )
call RemoveRegion( reg )
set reg = null
return b
endfunction
Name | Type | is_array | initial_value |
AdvTowers | unitcode | Yes | |
Attackable | group | No | |
Attackers | unitcode | Yes | |
AttackersName | string | Yes | |
BaseTowers | unitcode | Yes | |
Blue | group | No | |
Bonus | integer | No | 10 |
Builders | unitcode | Yes | |
Built | group | No | |
CedeAbility | abilcode | Yes | |
CedePlayer | player | No | |
COGroup | group | No | |
CoolingDown | group | No | |
COPoint | location | No | |
CreepGroup | integer | No | |
CurrentTerrain | integer | No | |
Death | integer | No | |
Defeat | timer | No | |
DieInfernals | boolean | No | |
DieVillagers | boolean | No | false |
Diff | integer | No | |
Difficulty | integer | Yes | |
Elim | boolean | Yes | |
EndGame | boolean | No | |
Epidemic | group | No | |
Governors | unitcode | Yes | |
GovString | string | Yes | |
HasVoted | boolean | Yes | |
HexedUndead | group | No | |
Kills | integer | Yes | |
Level | integer | No | 0 |
LevelsExpert | quest | No | |
Lives | integer | No | |
MaxLevel | integer | No | |
MaxVillagerID | integer | No | |
MissedBounty | integer | No | 0 |
NewTerrain | integer | No | |
Number | integer | Yes | |
OnOffSelected | group | Yes | |
PaintSelected | group | Yes | |
PaintValues | integer | Yes | |
PrepTime | timer | No | |
PsaveBlue | integer | Yes | 255 |
PsaveGreen | integer | Yes | 255 |
PsaveRed | integer | Yes | 255 |
Purple | group | No | |
RandomInt | integer | No | |
Red | group | No | |
RedVote | string | No | |
Regions | rect | Yes | |
Revertable | group | No | |
SecretComs | quest | No | |
Selected | group | Yes | |
Sell | integer | No | |
SetB | unitcode | Yes | |
SetBName | string | Yes | |
SetC | unitcode | Yes | |
SetCName | string | Yes | |
Siege | boolean | No | false |
SiegePath | integer | Yes | |
SiegeRegions | rect | Yes | |
Teal | group | No | |
TempestSlow | group | No | |
TempGroup | group | No | |
TempPoint | location | No | |
TempPoint2 | location | No | |
Time | integer | No | |
TimeChange | boolean | Yes | |
Tip | integer | No | |
TipGroup | force | No | |
Towers | unitcode | Yes | |
Transmuters | group | No | |
Victory | timer | No | |
VictoryMusic | timer | No | |
VictRandInt | integer | No | |
VillagerRegions | rect | Yes | |
Villagers | integer | No | |
VillagerTypes | unitcode | Yes | |
Vote | boolean | No | false |
VotingTime | timer | No | |
VotingTimeLength | timer | No | |
Weather | weathereffect | No | |
Wrath | unitcode | Yes |
function Trig_Limits_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 4
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'odoc', 2 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'ushd', 3 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'nvul', 2 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'hgyr', 3 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'hpea', 1 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'nchg', 1 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'ncpn', 1 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'ohun', 1 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'ewsp', 1 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'opeo', 1 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'uaco', 1 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'nemi', 1 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'ogru', 1 )
call SetPlayerTechMaxAllowed( ConvertedPlayer(GetForLoopIndexA()), 'edot', 1 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DestroyTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Limits takes nothing returns nothing
set gg_trg_Limits = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Limits, 1.00 )
call TriggerAddAction( gg_trg_Limits, function Trig_Limits_Actions )
endfunction
function Trig_Level_41_Func014002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Level_41_Func015002 takes nothing returns nothing
call SetUnitAcquireRangeBJ( GetEnumUnit(), 601.00 )
endfunction
function Trig_Level_41_Func016002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Level_41_Func017002 takes nothing returns nothing
call SetUnitAcquireRangeBJ( GetEnumUnit(), 601.00 )
endfunction
function Trig_Level_41_Func018002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Level_41_Func019002 takes nothing returns nothing
call SetUnitAcquireRangeBJ( GetEnumUnit(), 601.00 )
endfunction
function Trig_Level_41_Func020002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Level_41_Func021002 takes nothing returns nothing
call SetUnitAcquireRangeBJ( GetEnumUnit(), 601.00 )
endfunction
function Trig_Level_41_Func022002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_GREEN )
endfunction
function Trig_Level_41_Func023002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_CYAN )
endfunction
function Trig_Level_41_Func024002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_LIGHT_BLUE )
endfunction
function Trig_Level_41_Func025002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_RED )
endfunction
function Trig_Level_41_Func026002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_PURPLE )
endfunction
function Trig_Level_41_Func027002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_BLUE )
endfunction
function Trig_Level_41_Func028002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_ORANGE )
endfunction
function Trig_Level_41_Func029002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_LIGHT_GRAY )
endfunction
function Trig_Level_41_Func030002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_YELLOW )
endfunction
function Trig_Level_41_Func034002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_PINK )
endfunction
function Trig_Level_41_Func035002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_BROWN )
endfunction
function Trig_Level_41_Func045002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), ConvertPlayerColor(12) )
endfunction
function Trig_Level_41_Func046002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_CYAN )
endfunction
function Trig_Level_41_Func047002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_ORANGE )
endfunction
function Trig_Level_41_Func048002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_AQUA )
endfunction
function Trig_Level_41_Func036001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(0)) != PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Level_41_Func036002002 takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Level_41_Func037001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(0)) != PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Level_41_Func037002002 takes nothing returns nothing
call GroupRemoveUnitSimple( GetEnumUnit(), udg_Red )
endfunction
function Trig_Level_41_Func038001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(1)) != PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Level_41_Func038002002 takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Level_41_Func039001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(1)) != PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Level_41_Func039002002 takes nothing returns nothing
call GroupRemoveUnitSimple( GetEnumUnit(), udg_Blue )
endfunction
function Trig_Level_41_Func040001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(2)) != PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Level_41_Func040002002 takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Level_41_Func041001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(2)) != PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Level_41_Func041002002 takes nothing returns nothing
call GroupRemoveUnitSimple( GetEnumUnit(), udg_Teal )
endfunction
function Trig_Level_41_Func042001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(3)) != PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Level_41_Func042002002 takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Level_41_Func043001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(3)) != PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Level_41_Func043002002 takes nothing returns nothing
call GroupRemoveUnitSimple( GetEnumUnit(), udg_Purple )
endfunction
function Trig_Level_41_Func044002002 takes nothing returns nothing
call SetPlayerAbilityAvailableBJ( true, 'Atau', GetEnumPlayer() )
endfunction
function Trig_Level_41_Actions takes nothing returns nothing
local integer i = 1
local integer iEnd = udg_Number[41]
set udg_Siege = true
set udg_SiegePath[1] = 1
set udg_SiegePath[3] = 13
set udg_SiegePath[2] = 25
set udg_SiegePath[4] = 37
call ForForce( GetPlayersAll(), function Trig_Level_41_Func044002002 )
call GroupRemoveGroup( udg_Red, udg_Red )
call GroupRemoveGroup( udg_Teal, udg_Teal )
call GroupRemoveGroup( udg_Blue, udg_Blue )
call GroupRemoveGroup( udg_Purple, udg_Purple )
loop
exitwhen i > iEnd
call CreateNUnitsAtLoc( 1, udg_Wrath[i], Player(11), GetRectCenter(gg_rct_Red_Start), 0.00 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_Red )
call CreateNUnitsAtLoc( 1, udg_Wrath[i], Player(11), GetRectCenter(gg_rct_Teal_Start), 270.00 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_Teal )
call CreateNUnitsAtLoc( 1, udg_Wrath[i], Player(11), GetRectCenter(gg_rct_Blue_Start), 180.00 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_Blue )
call CreateNUnitsAtLoc( 1, udg_Wrath[i], Player(11), GetRectCenter(gg_rct_Purple_Start), 90.00 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_Purple )
set i = i + 1
endloop
call ForGroup( udg_Red, function Trig_Level_41_Func014002 )
call ForGroup( udg_Red, function Trig_Level_41_Func015002 )
call ForGroup( udg_Teal, function Trig_Level_41_Func016002 )
call ForGroup( udg_Teal, function Trig_Level_41_Func017002 )
call ForGroup( udg_Blue, function Trig_Level_41_Func018002 )
call ForGroup( udg_Blue, function Trig_Level_41_Func019002 )
call ForGroup( udg_Purple, function Trig_Level_41_Func020002 )
call ForGroup( udg_Purple, function Trig_Level_41_Func021002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('hkni'), function Trig_Level_41_Func022002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('zmar'), function Trig_Level_41_Func023002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('hhdl'), function Trig_Level_41_Func024002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('osw2'), function Trig_Level_41_Func025002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('otau'), function Trig_Level_41_Func026002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('owar'), function Trig_Level_41_Func027002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('uabo'), function Trig_Level_41_Func028002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('echm'), function Trig_Level_41_Func029002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('edoc'), function Trig_Level_41_Func030002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('ndqs'), function Trig_Level_41_Func034002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('npn3'), function Trig_Level_41_Func035002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('otbk'), function Trig_Level_41_Func045002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('hrif'), function Trig_Level_41_Func046002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('nbdo'), function Trig_Level_41_Func047002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('nsoc'), function Trig_Level_41_Func048002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('nnsw'), function Trig_Level_41_Func022002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('hsor'), function Trig_Level_41_Func023002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('nmyr'), function Trig_Level_41_Func047002 )
set bj_wantDestroyGroup = true
call ForGroup( GetUnitsOfTypeIdAll('ubdd'), function Trig_Level_41_Func025002 )
call EnableTrigger( gg_trg_Next_Round )
call DisableTrigger( gg_trg_Unknown_Kill )
if ( Trig_Level_41_Func036001() ) then
call ForGroup( udg_Red, function Trig_Level_41_Func036002002 )
endif
if ( Trig_Level_41_Func037001() ) then
call ForGroup( udg_Red, function Trig_Level_41_Func037002002 )
else
call TriggerExecute( gg_trg_RedSiege )
endif
if ( Trig_Level_41_Func038001() ) then
call ForGroup( udg_Blue, function Trig_Level_41_Func038002002 )
endif
if ( Trig_Level_41_Func039001() ) then
call ForGroup( udg_Blue, function Trig_Level_41_Func039002002 )
else
call TriggerExecute( gg_trg_BlueSiege )
endif
if ( Trig_Level_41_Func040001() ) then
call ForGroup( udg_Teal, function Trig_Level_41_Func040002002 )
endif
if ( Trig_Level_41_Func041001() ) then
call ForGroup( udg_Teal, function Trig_Level_41_Func041002002 )
else
call TriggerExecute( gg_trg_TealSiege )
endif
if ( Trig_Level_41_Func042001() ) then
call ForGroup( udg_Purple, function Trig_Level_41_Func042002002 )
endif
if ( Trig_Level_41_Func043001() ) then
call ForGroup( udg_Purple, function Trig_Level_41_Func043002002 )
else
call TriggerExecute( gg_trg_PurpleSiege )
endif
call EnableTrigger( gg_trg_Unknown_Kill )
call PolledWait(20.00)
call TriggerExecute( gg_trg_Straggler_Fix )
endfunction
//===========================================================================
function InitTrig_Level_41 takes nothing returns nothing
set gg_trg_Level_41 = CreateTrigger( )
call TriggerAddAction( gg_trg_Level_41, function Trig_Level_41_Actions )
endfunction
function Trig_Lisk_Hero_Limits_Actions takes nothing returns nothing
call SetPlayerTechMaxAllowed( GetOwningPlayer(GetTriggerUnit()), 'Hamg', 0 )
call SetPlayerTechMaxAllowed( GetOwningPlayer(GetTriggerUnit()), 'HC03', 0 )
call SetPlayerTechMaxAllowed( GetOwningPlayer(GetTriggerUnit()), 'Obla', 0 )
call SetPlayerTechMaxAllowed( GetOwningPlayer(GetTriggerUnit()), 'Ofar', 0 )
call SetPlayerTechMaxAllowed( GetOwningPlayer(GetTriggerUnit()), 'OC72', 0 )
call SetPlayerTechMaxAllowed( GetOwningPlayer(GetTriggerUnit()), 'Udea', 0 )
call SetPlayerTechMaxAllowed( GetOwningPlayer(GetTriggerUnit()), 'Ulic', 0 )
call SetPlayerTechMaxAllowed( GetOwningPlayer(GetTriggerUnit()), 'Udre', 0 )
call SetPlayerTechMaxAllowed( GetOwningPlayer(GetTriggerUnit()), 'Ekee', 0 )
call SetPlayerTechMaxAllowed( GetOwningPlayer(GetTriggerUnit()), 'Emoo', 0 )
endfunction
//===========================================================================
function InitTrig_Lisk_Hero_Limits takes nothing returns nothing
set gg_trg_Lisk_Hero_Limits = CreateTrigger( )
call TriggerAddAction( gg_trg_Lisk_Hero_Limits, function Trig_Lisk_Hero_Limits_Actions )
endfunction
function Trig_Transmuters_Func001002 takes nothing returns nothing
call GroupRemoveUnitSimple( GetEnumUnit(), udg_Transmuters )
call ReplaceUnitBJ( GetEnumUnit(), udg_AdvTowers[GetRandomInt(1, 39)], bj_UNIT_STATE_METHOD_DEFAULTS )
call SetUnitVertexColorBJ( GetLastReplacedUnitBJ(), 100, 100, 100.00, 50.00 )
call SetUnitAcquireRangeBJ( GetLastCreatedUnit(), GetUnitDefaultAcquireRange(GetLastCreatedUnit()) )
call SetUnitInvulnerable( GetLastReplacedUnitBJ(), true )
call GroupAddUnitSimple( GetLastReplacedUnitBJ(), udg_Transmuters )
endfunction
function Trig_Transmuters_Actions takes nothing returns nothing
call ForGroup( udg_Transmuters, function Trig_Transmuters_Func001002 )
endfunction
//===========================================================================
function InitTrig_Transmuters takes nothing returns nothing
set gg_trg_Transmuters = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Transmuters, 40.00 )
call TriggerAddAction( gg_trg_Transmuters, function Trig_Transmuters_Actions )
endfunction
function Trig_Ring_of_Greater_Magnetism_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'jdrn') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ring_of_Greater_Magnetism_Func008002003001 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_Ring_of_Greater_Magnetism_Func008002003002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Ring_of_Greater_Magnetism_Func008002003 takes nothing returns boolean
return GetBooleanAnd( Trig_Ring_of_Greater_Magnetism_Func008002003001(), Trig_Ring_of_Greater_Magnetism_Func008002003002() )
endfunction
function Trig_Ring_of_Greater_Magnetism_Func010001 takes nothing returns boolean
return ( udg_Siege == false )
endfunction
function Trig_Ring_of_Greater_Magnetism_Actions takes nothing returns nothing
local location AttackingPoint = GetUnitLoc(GetAttacker())
local location AttackedPoint = GetUnitLoc(GetAttackedUnitBJ())
local location NewPoint = PolarProjectionBJ(AttackingPoint, ( DistanceBetweenPoints(AttackingPoint, AttackedPoint) / 8.00 ), AngleBetweenPoints(AttackingPoint, AttackedPoint))
set udg_TempPoint = GetRectCenter(udg_Regions[GetUnitUserData(GetAttackedUnitBJ())])
set udg_TempGroup = GetUnitsInRangeOfLocMatching(512, AttackedPoint, Condition(function Trig_Ring_of_Greater_Magnetism_Func008002003))
call SetUnitPositionLoc( GetAttackedUnitBJ(), NewPoint )
call RemoveLocation(AttackingPoint)
call RemoveLocation(AttackedPoint)
call RemoveLocation(NewPoint)
set AttackingPoint = null
set AttackedPoint = null
set NewPoint = null
call TriggerExecute( gg_trg_Burbenog_Outpost )
endfunction
//===========================================================================
function InitTrig_Ring_of_Greater_Magnetism takes nothing returns nothing
set gg_trg_Ring_of_Greater_Magnetism = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Ring_of_Greater_Magnetism, Player(11), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Ring_of_Greater_Magnetism, Condition( function Trig_Ring_of_Greater_Magnetism_Conditions ) )
call TriggerAddAction( gg_trg_Ring_of_Greater_Magnetism, function Trig_Ring_of_Greater_Magnetism_Actions )
endfunction
function Trig_PathingGeneral_Func003C takes nothing returns boolean
if ( ( IsUnitInGroup(GetEnteringUnit(), udg_Red) == true ) ) then
return true
endif
if ( ( IsUnitInGroup(GetEnteringUnit(), udg_Teal) == true ) ) then
return true
endif
if ( ( IsUnitInGroup(GetEnteringUnit(), udg_Blue) == true ) ) then
return true
endif
if ( ( IsUnitInGroup(GetEnteringUnit(), udg_Purple) == true ) ) then
return true
endif
return false
endfunction
function Trig_PathingGeneral_Conditions takes nothing returns boolean
if ( not Trig_PathingGeneral_Func003C() ) then
return false
endif
if ( not ( udg_Siege == false ) ) then
return false
endif
return true
endfunction
function Trig_PathingGeneral_Actions takes nothing returns nothing
if ( IsUnitInRect( GetEnteringUnit(), udg_Regions[GetUnitUserData(GetEnteringUnit())] ) ) then
call SetUnitUserData( GetEnteringUnit(), ( GetUnitUserData(GetEnteringUnit()) + 1 ) )
endif
set udg_TempPoint = GetRectCenter(udg_Regions[GetUnitUserData(GetEnteringUnit())])
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", udg_TempPoint )
call RemoveLocation(udg_TempPoint)
endfunction
//===========================================================================
function InitTrig_PathingGeneral takes nothing returns nothing
set gg_trg_PathingGeneral = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Red_001 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Red_002 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Red_003 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Teal_001 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Teal_002 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Teal_003 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Blue_001 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Blue_002 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Blue_003 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Purple_001 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Purple_002 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Purple_003 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Red_104 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Red_105 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Teal_104 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Teal_105 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Blue_104 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Blue_105 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Purple_104 )
call TriggerRegisterEnterRectSimple( gg_trg_PathingGeneral, gg_rct_Purple_105 )
call TriggerAddCondition( gg_trg_PathingGeneral, Condition( function Trig_PathingGeneral_Conditions ) )
call TriggerAddAction( gg_trg_PathingGeneral, function Trig_PathingGeneral_Actions )
endfunction
function Trig_RedSiege_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetKillingUnitBJ(), udg_Red) == true ) ) then
return false
endif
if ( not ( udg_Siege == true ) ) then
return false
endif
return true
endfunction
function Trig_RedSiege_Func003002002001 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_RedSiege_Func003002002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_RedSiege_Func003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_RedSiege_Func003002002001(), Trig_RedSiege_Func003002002002() )
endfunction
function Trig_RedSiege_Func010Func002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", udg_COPoint )
endfunction
function Trig_RedSiege_Func010Func005Func004002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", udg_COPoint )
endfunction
function Trig_RedSiege_Actions takes nothing returns nothing
local group TempGroup = CreateGroup()
local location udg_TempPoint = null
set TempGroup = GetUnitsInRectMatching(udg_SiegeRegions[udg_SiegePath[1]], Condition(function Trig_RedSiege_Func003002002))
if ( CountUnitsInGroup(TempGroup) == 0 ) then
if ( ModuloInteger(udg_SiegePath[1], 12) == 0 ) then
set udg_TempPoint = GetRectCenter(gg_rct_Center)
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Red, function Trig_RedSiege_Func010Func005Func004002 )
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Red, function Trig_RedSiege_Func010Func005Func004002 )
call RemoveLocation(udg_TempPoint)
else
set udg_SiegePath[1] = ( udg_SiegePath[1] + 1 )
call TriggerExecute( GetTriggeringTrigger() )
endif
else
set udg_TempPoint = GetUnitLoc(GroupPickRandomUnit(TempGroup))
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Red, function Trig_RedSiege_Func010Func002002 )
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Red, function Trig_RedSiege_Func010Func002002 )
call RemoveLocation(udg_TempPoint)
endif
call DestroyGroup(TempGroup)
set TempGroup = null
set udg_TempPoint = null
endfunction
//===========================================================================
function InitTrig_RedSiege takes nothing returns nothing
set gg_trg_RedSiege = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_RedSiege, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_RedSiege, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_RedSiege, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_RedSiege, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_RedSiege, Condition( function Trig_RedSiege_Conditions ) )
call TriggerAddAction( gg_trg_RedSiege, function Trig_RedSiege_Actions )
endfunction
function Trig_TealSiege_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetKillingUnitBJ(), udg_Teal) == true ) ) then
return false
endif
if ( not ( udg_Siege == true ) ) then
return false
endif
return true
endfunction
function Trig_TealSiege_Func009002002001 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_TealSiege_Func009002002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_TealSiege_Func009002002 takes nothing returns boolean
return GetBooleanAnd( Trig_TealSiege_Func009002002001(), Trig_TealSiege_Func009002002002() )
endfunction
function Trig_TealSiege_Func010Func002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", udg_COPoint )
endfunction
function Trig_TealSiege_Func010Func005Func004002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", udg_COPoint )
endfunction
function Trig_TealSiege_Actions takes nothing returns nothing
local group TempGroup = CreateGroup()
local location udg_TempPoint = null
set TempGroup = GetUnitsInRectMatching(udg_SiegeRegions[udg_SiegePath[3]], Condition(function Trig_TealSiege_Func009002002))
if ( CountUnitsInGroup(TempGroup) == 0 ) then
if ( ModuloInteger(udg_SiegePath[3], 12) == 0 ) then
set udg_TempPoint = GetRectCenter(gg_rct_Center)
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Teal, function Trig_TealSiege_Func010Func005Func004002 )
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Teal, function Trig_TealSiege_Func010Func005Func004002 )
call RemoveLocation(udg_TempPoint)
else
set udg_SiegePath[3] = ( udg_SiegePath[3] + 1 )
call TriggerExecute( GetTriggeringTrigger() )
endif
else
set udg_TempPoint = GetUnitLoc(GroupPickRandomUnit(TempGroup))
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Teal, function Trig_TealSiege_Func010Func002002 )
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Teal, function Trig_TealSiege_Func010Func002002 )
call RemoveLocation(udg_TempPoint)
endif
call DestroyGroup(TempGroup)
set TempGroup = null
set udg_TempPoint = null
endfunction
//===========================================================================
function InitTrig_TealSiege takes nothing returns nothing
set gg_trg_TealSiege = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_TealSiege, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_TealSiege, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_TealSiege, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_TealSiege, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_TealSiege, Condition( function Trig_TealSiege_Conditions ) )
call TriggerAddAction( gg_trg_TealSiege, function Trig_TealSiege_Actions )
endfunction
function Trig_BlueSiege_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetKillingUnitBJ(), udg_Blue) == true ) ) then
return false
endif
if ( not ( udg_Siege == true ) ) then
return false
endif
return true
endfunction
function Trig_BlueSiege_Func009002002001 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_BlueSiege_Func009002002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_BlueSiege_Func009002002 takes nothing returns boolean
return GetBooleanAnd( Trig_BlueSiege_Func009002002001(), Trig_BlueSiege_Func009002002002() )
endfunction
function Trig_BlueSiege_Func010Func002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", udg_COPoint )
endfunction
function Trig_BlueSiege_Func010Func005Func004002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", udg_COPoint )
endfunction
function Trig_BlueSiege_Actions takes nothing returns nothing
local group TempGroup = CreateGroup()
local location udg_TempPoint = null
set TempGroup = GetUnitsInRectMatching(udg_SiegeRegions[udg_SiegePath[2]], Condition(function Trig_BlueSiege_Func009002002))
if ( CountUnitsInGroup(TempGroup) == 0 ) then
if ( ModuloInteger(udg_SiegePath[2], 12) == 0 ) then
set udg_TempPoint = GetRectCenter(gg_rct_Center)
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Blue, function Trig_BlueSiege_Func010Func005Func004002 )
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Blue, function Trig_BlueSiege_Func010Func005Func004002 )
call RemoveLocation(udg_TempPoint)
else
set udg_SiegePath[2] = ( udg_SiegePath[2] + 1 )
call TriggerExecute( GetTriggeringTrigger() )
endif
else
set udg_TempPoint = GetUnitLoc(GroupPickRandomUnit(TempGroup))
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Blue, function Trig_BlueSiege_Func010Func002002 )
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Blue, function Trig_BlueSiege_Func010Func002002 )
call RemoveLocation(udg_TempPoint)
endif
call DestroyGroup(TempGroup)
set TempGroup = null
set udg_TempPoint = null
endfunction
//===========================================================================
function InitTrig_BlueSiege takes nothing returns nothing
set gg_trg_BlueSiege = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_BlueSiege, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_BlueSiege, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_BlueSiege, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_BlueSiege, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_BlueSiege, Condition( function Trig_BlueSiege_Conditions ) )
call TriggerAddAction( gg_trg_BlueSiege, function Trig_BlueSiege_Actions )
endfunction
function Trig_PurpleSiege_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetKillingUnitBJ(), udg_Purple) == true ) ) then
return false
endif
if ( not ( udg_Siege == true ) ) then
return false
endif
return true
endfunction
function Trig_PurpleSiege_Func009002002001 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_PurpleSiege_Func009002002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_PurpleSiege_Func009002002 takes nothing returns boolean
return GetBooleanAnd( Trig_PurpleSiege_Func009002002001(), Trig_PurpleSiege_Func009002002002() )
endfunction
function Trig_PurpleSiege_Func010Func002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", udg_COPoint )
endfunction
function Trig_PurpleSiege_Func010Func005Func004002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", udg_COPoint )
endfunction
function Trig_PurpleSiege_Actions takes nothing returns nothing
local group TempGroup = CreateGroup()
local location udg_TempPoint = null
set TempGroup = GetUnitsInRectMatching(udg_SiegeRegions[udg_SiegePath[4]], Condition(function Trig_PurpleSiege_Func009002002))
if ( CountUnitsInGroup(TempGroup) == 0 ) then
if ( ModuloInteger(udg_SiegePath[4], 12) == 0 ) then
set udg_TempPoint = GetRectCenter(gg_rct_Center)
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Purple, function Trig_PurpleSiege_Func010Func005Func004002 )
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Purple, function Trig_PurpleSiege_Func010Func005Func004002 )
call RemoveLocation(udg_TempPoint)
else
set udg_SiegePath[4] = ( udg_SiegePath[4] + 1 )
call TriggerExecute( GetTriggeringTrigger() )
endif
else
set udg_TempPoint = GetUnitLoc(GroupPickRandomUnit(TempGroup))
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Purple, function Trig_PurpleSiege_Func010Func002002 )
set udg_COPoint = udg_TempPoint
call ForGroupBJ( udg_Purple, function Trig_PurpleSiege_Func010Func002002 )
call RemoveLocation(udg_TempPoint)
endif
call DestroyGroup(TempGroup)
set TempGroup = null
set udg_TempPoint = null
endfunction
//===========================================================================
function InitTrig_PurpleSiege takes nothing returns nothing
set gg_trg_PurpleSiege = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_PurpleSiege, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_PurpleSiege, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_PurpleSiege, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_PurpleSiege, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_PurpleSiege, Condition( function Trig_PurpleSiege_Conditions ) )
call TriggerAddAction( gg_trg_PurpleSiege, function Trig_PurpleSiege_Actions )
endfunction
function Trig_VillagerPathing_Conditions takes nothing returns boolean
if ( GetOwningPlayer(GetEnteringUnit()) == Player(PLAYER_NEUTRAL_PASSIVE) ) then
return true
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) then
return true
endif
return true
endfunction
function Trig_VillagerPathing_Actions takes nothing returns nothing
if ( IsUnitInRect( GetEnteringUnit(), udg_VillagerRegions[GetUnitUserData(GetEnteringUnit())] ) ) then
call SetUnitUserData( GetEnteringUnit(), ( GetUnitUserData(GetEnteringUnit()) + 1 ) )
endif
set udg_TempPoint = GetRectCenter(udg_VillagerRegions[GetUnitUserData(GetEnteringUnit())])
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", udg_TempPoint )
call RemoveLocation( udg_TempPoint )
endfunction
//===========================================================================
function InitTrig_VillagerPathing takes nothing returns nothing
set gg_trg_VillagerPathing = CreateTrigger( )
call DisableTrigger( gg_trg_VillagerPathing )
call TriggerRegisterEnterRectSimple( gg_trg_VillagerPathing, gg_rct_Villager_1A )
call TriggerRegisterEnterRectSimple( gg_trg_VillagerPathing, gg_rct_Villager_1B )
call TriggerRegisterEnterRectSimple( gg_trg_VillagerPathing, gg_rct_Villager_1C )
call TriggerRegisterEnterRectSimple( gg_trg_VillagerPathing, gg_rct_Villager_2A )
call TriggerRegisterEnterRectSimple( gg_trg_VillagerPathing, gg_rct_Villager_2B )
call TriggerRegisterEnterRectSimple( gg_trg_VillagerPathing, gg_rct_Villager_2C )
call TriggerRegisterEnterRectSimple( gg_trg_VillagerPathing, gg_rct_Villager_3A )
call TriggerRegisterEnterRectSimple( gg_trg_VillagerPathing, gg_rct_Villager_3B )
call TriggerRegisterEnterRectSimple( gg_trg_VillagerPathing, gg_rct_Villager_3C )
call TriggerRegisterEnterRectSimple( gg_trg_VillagerPathing, gg_rct_Villager_4A )
call TriggerRegisterEnterRectSimple( gg_trg_VillagerPathing, gg_rct_Villager_4B )
call TriggerRegisterEnterRectSimple( gg_trg_VillagerPathing, gg_rct_Villager_4C )
call TriggerAddCondition( gg_trg_VillagerPathing, Condition( function Trig_VillagerPathing_Conditions ) )
call TriggerAddAction( gg_trg_VillagerPathing, function Trig_VillagerPathing_Actions )
endfunction
function Trig_Fireworks_Actions takes nothing returns nothing
local location TempLoc = GetRandomLocInRect(GetPlayableMapRect())
local location TempLoc2 = PolarProjectionBJ(TempLoc, GetRandomReal(300.00, 800.00), GetRandomDirectionDeg())
call DestroyEffect( AddSpecialEffectLocBJ( TempLoc, "Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl" ) )
call PolledWait( 2 )
call DestroyEffect( AddSpecialEffectLocBJ( TempLoc2, "Abilities\\Spells\\Human\\Flare\\FlareTarget.mdl" ) )
call RemoveLocation( TempLoc )
call RemoveLocation( TempLoc2 )
set TempLoc = null
set TempLoc2 = null
endfunction
//===========================================================================
function InitTrig_Fireworks takes nothing returns nothing
set gg_trg_Fireworks = CreateTrigger( )
call DisableTrigger( gg_trg_Fireworks )
call TriggerRegisterTimerEventPeriodic( gg_trg_Fireworks, 0.25 )
call TriggerAddAction( gg_trg_Fireworks, function Trig_Fireworks_Actions )
endfunction
function Trig_Infernal_Loop_Actions takes nothing returns nothing
local location TempLoc = GetRandomLocInRect(GetPlayableMapRect())
local location TempLoc2 = PolarProjectionBJ(TempLoc, GetRandomReal(100.00, 200.00), GetRandomDirectionDeg())
local unit dummy = CreateUnitAtLoc( Player(11), 'uloc', TempLoc, GetRandomDirectionDeg() )
call IssuePointOrderLocBJ( dummy, "inferno", TempLoc2 )
call PolledWait( 1.00 )
call TerrainDeformationCraterBJ( 0.50, true, TempLoc, 256.00, 256.00 )
call RemoveLocation( TempLoc )
call RemoveLocation( TempLoc2 )
set TempLoc = null
set TempLoc2 = null
set dummy = null
endfunction
//===========================================================================
function InitTrig_Infernal_Loop takes nothing returns nothing
set gg_trg_Infernal_Loop = CreateTrigger( )
call DisableTrigger( gg_trg_Infernal_Loop )
call TriggerRegisterTimerEventPeriodic( gg_trg_Infernal_Loop, 1.00 )
call TriggerAddAction( gg_trg_Infernal_Loop, function Trig_Infernal_Loop_Actions )
endfunction
function Trig_Felhound_Loop_Actions takes nothing returns nothing
local effect LocalFX
set udg_TempPoint = GetRandomLocInRect(GetPlayableMapRect())
call CreateNUnitsAtLoc( 1, 'nfel', Player(11), udg_TempPoint, GetRandomDirectionDeg() )
if ( udg_DieInfernals == false ) then
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
else
call SetUnitOwner( GetLastCreatedUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), false )
endif
call RemoveLocation( udg_TempPoint )
set LocalFX = AddSpecialEffectTarget( "Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl", GetLastCreatedUnit(), "origin" )
call PolledWait( 2.00 )
call DestroyEffectBJ( LocalFX )
endfunction
//===========================================================================
function InitTrig_Felhound_Loop takes nothing returns nothing
set gg_trg_Felhound_Loop = CreateTrigger( )
call DisableTrigger( gg_trg_Felhound_Loop )
call TriggerRegisterTimerEventPeriodic( gg_trg_Felhound_Loop, 1.50 )
call TriggerAddAction( gg_trg_Felhound_Loop, function Trig_Felhound_Loop_Actions )
endfunction
function Trig_Mind_Ripper_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'h000' ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetAttacker()) >= 50.00 ) ) then
return false
endif
if ( not ( GetUnitUserData(GetAttacker()) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Mind_Ripper_Func002003003001003 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_Mind_Ripper_Actions takes nothing returns nothing
local unit LocalUnit = GetAttackedUnitBJ()
call PolledWait( 0.30 )
call IssueTargetOrderBJ( GetAttacker(), "banish", LocalUnit )
call PolledWait( 0.10 )
call IssueTargetOrderBJ( GetAttacker(), "attackonce", LocalUnit )
call PolledWait( 4.00 )
if udg_Siege then
call IssueTargetOrderBJ( LocalUnit, "attack", GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(512, GetUnitLoc(LocalUnit), Condition(function Trig_Mind_Ripper_Func002003003001003))) )
endif
endfunction
//===========================================================================
function InitTrig_Mind_Ripper takes nothing returns nothing
set gg_trg_Mind_Ripper = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mind_Ripper, Player(11), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Mind_Ripper, Condition( function Trig_Mind_Ripper_Conditions ) )
call TriggerAddAction( gg_trg_Mind_Ripper, function Trig_Mind_Ripper_Actions )
endfunction
function Trig_Cryogenics_Lab_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'oC89' ) ) then
return false
endif
return true
endfunction
function Trig_Cryogenics_Lab_Func009Func002002003001 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_Cryogenics_Lab_Func009Func002002003002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Cryogenics_Lab_Func009Func002002003 takes nothing returns boolean
return GetBooleanAnd( Trig_Cryogenics_Lab_Func009Func002002003001(), Trig_Cryogenics_Lab_Func009Func002002003002() )
endfunction
function Trig_Cryogenics_Lab_Actions takes nothing returns nothing
local unit LocalUnit = GetAttackedUnitBJ()
local location TempLoc
local location TempLoc2
local group TempGroup
set TempLoc = GetUnitLoc(GetAttacker())
set TempLoc2 = GetUnitLoc(LocalUnit)
call PolledWait( ( 5.00 + ( ( DistanceBetweenPoints(TempLoc, TempLoc2) + 150.00 ) / 600.00 ) ) )
call RemoveLocation( TempLoc )
call RemoveLocation( TempLoc2 )
if ( udg_Siege == false ) then
set TempLoc = GetRectCenter(udg_Regions[GetUnitUserData(GetAttackedUnitBJ())])
call IssuePointOrderLocBJ( LocalUnit, "move", TempLoc )
else
set TempLoc = GetUnitLoc(LocalUnit)
set TempGroup = GetUnitsInRangeOfLocMatching(512, TempLoc, Condition(function Trig_Cryogenics_Lab_Func009Func002002003))
call IssueTargetOrderBJ( LocalUnit, "attack", GroupPickRandomUnit(TempGroup) )
call DestroyGroup(TempGroup)
endif
call RemoveLocation(TempLoc)
set TempLoc = null
set TempLoc2 = null
set TempGroup = null
set LocalUnit = null
endfunction
//===========================================================================
function InitTrig_Cryogenics_Lab takes nothing returns nothing
set gg_trg_Cryogenics_Lab = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cryogenics_Lab, Player(11), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Cryogenics_Lab, Condition( function Trig_Cryogenics_Lab_Conditions ) )
call TriggerAddAction( gg_trg_Cryogenics_Lab, function Trig_Cryogenics_Lab_Actions )
endfunction
function Trig_Owl_Scout_Cyclone_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ACcy' ) ) then
return false
endif
return true
endfunction
function Trig_Owl_Scout_Cyclone_Func003003003001003 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_Owl_Scout_Cyclone_Actions takes nothing returns nothing
local unit LocalUnit = GetSpellTargetUnit()
local location TempLoc
local group TempGroup
call PolledWait( 15.02 )
if ( udg_Siege == false ) then
set TempLoc = GetRectCenter(udg_Regions[GetUnitUserData(LocalUnit)])
call IssuePointOrderLocBJ( LocalUnit, "move", TempLoc )
else
set TempLoc = GetUnitLoc(LocalUnit)
set TempGroup = GetUnitsInRangeOfLocMatching(512, TempLoc, Condition(function Trig_Owl_Scout_Cyclone_Func003003003001003))
call IssueTargetOrderBJ( LocalUnit, "attack", GroupPickRandomUnit(TempGroup) )
call DestroyGroup( TempGroup )
endif
call RemoveLocation( TempLoc )
set LocalUnit = null
set TempLoc = null
set TempGroup = null
endfunction
//===========================================================================
function InitTrig_Owl_Scout_Cyclone takes nothing returns nothing
set gg_trg_Owl_Scout_Cyclone = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Owl_Scout_Cyclone, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Owl_Scout_Cyclone, Condition( function Trig_Owl_Scout_Cyclone_Conditions ) )
call TriggerAddAction( gg_trg_Owl_Scout_Cyclone, function Trig_Owl_Scout_Cyclone_Actions )
endfunction
function Trig_Freezing_Breath_Antistuck_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'Ulic' ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A009', GetAttacker()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Freezing_Breath_Antistuck_Func005003003001003 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_Freezing_Breath_Antistuck_Actions takes nothing returns nothing
local unit LocalUnit = GetAttackedUnitBJ()
local location TempLoc
local location TempLoc2
local group TempGroup
set TempLoc = GetUnitLoc(GetAttacker())
set TempLoc2 = GetUnitLoc(LocalUnit)
call PolledWait( ( ( I2R(GetUnitAbilityLevelSwapped('A009', GetAttacker())) * 0.70 ) + ( ( DistanceBetweenPoints(TempLoc, TempLoc2) + 100.00 ) / 350.00 ) ) )
call RemoveLocation( TempLoc )
call RemoveLocation( TempLoc2 )
if ( udg_Siege == false ) then
set TempLoc = GetRectCenter(udg_Regions[GetUnitUserData(LocalUnit)])
call IssuePointOrderLocBJ( LocalUnit, "move", TempLoc )
else
set TempLoc = GetUnitLoc(LocalUnit)
set TempGroup = GetUnitsInRangeOfLocMatching(512, TempLoc, Condition(function Trig_Freezing_Breath_Antistuck_Func005003003001003))
call IssueTargetOrderBJ( LocalUnit, "attack", GroupPickRandomUnit(TempGroup) )
call DestroyGroup( TempGroup )
endif
set TempLoc = null
set TempLoc2 = null
set TempGroup = null
set LocalUnit = null
endfunction
//===========================================================================
function InitTrig_Freezing_Breath_Antistuck takes nothing returns nothing
set gg_trg_Freezing_Breath_Antistuck = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Freezing_Breath_Antistuck, Player(11), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Freezing_Breath_Antistuck, Condition( function Trig_Freezing_Breath_Antistuck_Conditions ) )
call TriggerAddAction( gg_trg_Freezing_Breath_Antistuck, function Trig_Freezing_Breath_Antistuck_Actions )
endfunction
function Trig_Entangling_Roots_Antistuck_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AEer' ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetSpellTargetUnit()) == Player(11) ) ) then
return false
endif
return true
endfunction
function Trig_Entangling_Roots_Antistuck_Func004C takes nothing returns boolean
if ( not ( GetUnitLevel(GetSpellTargetUnit()) >= 6 ) ) then
return false
endif
return true
endfunction
function Trig_Entangling_Roots_Antistuck_Func005001 takes nothing returns boolean
return ( udg_Siege == false )
endfunction
function Trig_Entangling_Roots_Antistuck_Func005003003001003 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_Entangling_Roots_Antistuck_Actions takes nothing returns nothing
local unit LocalUnit = GetSpellTargetUnit()
local location TempLoc
local group TempGroup
if ( Trig_Entangling_Roots_Antistuck_Func004C() ) then
call PolledWait( ( 5.00 * I2R(GetUnitAbilityLevelSwapped('AEer', GetSpellAbilityUnit())) ) )
else
call PolledWait( ( 10.00 * I2R(GetUnitAbilityLevelSwapped('AEer', GetSpellAbilityUnit())) ) )
endif
if ( Trig_Entangling_Roots_Antistuck_Func005001() ) then
set TempLoc = GetRectCenter(udg_Regions[GetUnitUserData(LocalUnit)])
call IssuePointOrderLocBJ( LocalUnit, "move", TempLoc )
else
set TempLoc = GetUnitLoc(LocalUnit)
set TempGroup = GetUnitsInRangeOfLocMatching(512, TempLoc, Condition(function Trig_Entangling_Roots_Antistuck_Func005003003001003))
call IssueTargetOrderBJ( LocalUnit, "attack", GroupPickRandomUnit(TempGroup) )
call DestroyGroup( TempGroup )
endif
call RemoveLocation( TempLoc )
set LocalUnit = null
set TempLoc = null
set TempGroup = null
endfunction
//===========================================================================
function InitTrig_Entangling_Roots_Antistuck takes nothing returns nothing
set gg_trg_Entangling_Roots_Antistuck = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Entangling_Roots_Antistuck, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Entangling_Roots_Antistuck, Condition( function Trig_Entangling_Roots_Antistuck_Conditions ) )
call TriggerAddAction( gg_trg_Entangling_Roots_Antistuck, function Trig_Entangling_Roots_Antistuck_Actions )
endfunction
function Trig_Negate_Resistance_Effect_Actions takes nothing returns nothing
local effect LocalFX
local unit LocalUnit = GetEnumUnit()
call UnitRemoveBuffBJ( 'Bams', LocalUnit )
if ( GetUnitAbilityLevel( LocalUnit, 'ACmi' ) > 0 ) then
call UnitRemoveAbility( LocalUnit, 'ACmi' )
call DestroyEffect(AddSpecialEffectTarget( "Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl", LocalUnit, "origin" ))
call AddSpecialEffectTargetUnitBJ( "overhead", LocalUnit, "Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl" )
set LocalFX = GetLastCreatedEffectBJ()
loop
exitwhen ( IsUnitAliveBJ(LocalUnit) == false )
call PolledWait(5.00)
endloop
call DestroyEffect( LocalFX )
endif
set LocalFX = null
set LocalUnit = null
endfunction
//===========================================================================
function InitTrig_Negate_Resistance_Effect takes nothing returns nothing
set gg_trg_Negate_Resistance_Effect = CreateTrigger( )
call TriggerAddAction( gg_trg_Negate_Resistance_Effect, function Trig_Negate_Resistance_Effect_Actions )
endfunction
function Trig_Celestial_Winds_Conditions takes nothing returns boolean
if ( not ( udg_Siege == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetAttacker()) == 'hC66' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetAttacker(), udg_CoolingDown) == false ) ) then
return false
endif
return true
endfunction
function Trig_Celestial_Winds_Func004Func004C takes nothing returns boolean
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 1 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 5 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 9 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 11 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 14 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 18 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 22 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 27 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 31 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 40 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 44 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 48 ) ) then
return true
endif
return false
endfunction
function Trig_Celestial_Winds_Func004C takes nothing returns boolean
if ( not Trig_Celestial_Winds_Func004Func004C() ) then
return false
endif
return true
endfunction
function Trig_Celestial_Winds_Func005Func004C takes nothing returns boolean
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 2 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 6 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 10 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 15 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 19 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 28 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 32 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 36 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 37 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 41 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 45 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 47 ) ) then
return true
endif
return false
endfunction
function Trig_Celestial_Winds_Func005C takes nothing returns boolean
if ( not Trig_Celestial_Winds_Func005Func004C() ) then
return false
endif
return true
endfunction
function Trig_Celestial_Winds_Func006Func004C takes nothing returns boolean
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 3 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 7 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 16 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 20 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 24 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 25 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 29 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 33 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 35 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 38 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 42 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 46 ) ) then
return true
endif
return false
endfunction
function Trig_Celestial_Winds_Func006C takes nothing returns boolean
if ( not Trig_Celestial_Winds_Func006Func004C() ) then
return false
endif
return true
endfunction
function Trig_Celestial_Winds_Func007Func004C takes nothing returns boolean
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 4 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 8 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 12 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 13 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 17 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 21 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 23 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 26 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 30 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 34 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 39 ) ) then
return true
endif
if ( ( GetUnitUserData(GetAttackedUnitBJ()) == 43 ) ) then
return true
endif
return false
endfunction
function Trig_Celestial_Winds_Func007C takes nothing returns boolean
if ( not Trig_Celestial_Winds_Func007Func004C() ) then
return false
endif
return true
endfunction
function Trig_Celestial_Winds_Actions takes nothing returns nothing
local location udg_TempPoint = GetUnitLoc(GetAttackedUnitBJ())
call GroupAddUnitSimple( GetAttacker(), udg_CoolingDown )
call PolledWait( 0.30 )
if ( Trig_Celestial_Winds_Func004C() ) then
set udg_TempPoint = OffsetLocation(udg_TempPoint, -600.00, 0)
if ( RectContainsLoc(gg_rct_Celestial_Winds_Fix_W, udg_TempPoint) ) then
set udg_TempPoint = Location(GetRectMaxX(gg_rct_Celestial_Winds_Fix_W), GetLocationY(udg_TempPoint))
endif
call SetUnitPositionLoc( GetAttackedUnitBJ(), udg_TempPoint )
endif
if ( Trig_Celestial_Winds_Func005C() ) then
set udg_TempPoint = OffsetLocation(udg_TempPoint, 0.00, -600.00)
if ( RectContainsLoc(gg_rct_Celestial_Winds_Fix_S, udg_TempPoint) ) then
set udg_TempPoint = Location(GetLocationX(udg_TempPoint), GetRectMaxY(gg_rct_Celestial_Winds_Fix_S))
endif
call SetUnitPositionLoc( GetAttackedUnitBJ(), udg_TempPoint )
endif
if ( Trig_Celestial_Winds_Func006C() ) then
set udg_TempPoint = OffsetLocation(udg_TempPoint, 600.00, 0.00)
if ( RectContainsLoc(gg_rct_Celestial_Winds_Fix_E, udg_TempPoint) ) then
set udg_TempPoint = Location(GetRectMinX(gg_rct_Celestial_Winds_Fix_E), GetLocationY(udg_TempPoint))
endif
call SetUnitPositionLoc( GetAttackedUnitBJ(), udg_TempPoint )
endif
if ( Trig_Celestial_Winds_Func007C() ) then
set udg_TempPoint = OffsetLocation(udg_TempPoint, 0.00, 600.00)
if ( RectContainsLoc(gg_rct_Celestial_Winds_Fix_N, udg_TempPoint) ) then
set udg_TempPoint = Location(GetLocationX(udg_TempPoint), GetRectMinY(gg_rct_Celestial_Winds_Fix_N))
endif
call SetUnitPositionLoc( GetAttackedUnitBJ(), udg_TempPoint )
endif
call RemoveLocation(udg_TempPoint)
set udg_TempPoint = GetRectCenter(udg_Regions[GetUnitUserData(GetAttackedUnitBJ())])
call IssuePointOrderLocBJ( GetAttackedUnitBJ(), "move", udg_TempPoint )
call RemoveLocation(udg_TempPoint)
set udg_TempPoint = null
call PolledWait( 1.00 )
call GroupRemoveUnitSimple( GetAttacker(), udg_CoolingDown )
endfunction
//===========================================================================
function InitTrig_Celestial_Winds takes nothing returns nothing
set gg_trg_Celestial_Winds = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Celestial_Winds, Player(11), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Celestial_Winds, Condition( function Trig_Celestial_Winds_Conditions ) )
call TriggerAddAction( gg_trg_Celestial_Winds, function Trig_Celestial_Winds_Actions )
endfunction
function Trig_Tempestuous_Detonator_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'oC67' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetAttacker(), udg_CoolingDown) == false ) ) then
return false
endif
return true
endfunction
function Trig_Tempestuous_Detonator_Func004001003001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(11) )
endfunction
function Trig_Tempestuous_Detonator_Func004001003002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_FLYING) == true )
endfunction
function Trig_Tempestuous_Detonator_Func004001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Tempestuous_Detonator_Func004001003001(), Trig_Tempestuous_Detonator_Func004001003002() )
endfunction
function Trig_Tempestuous_Detonator_Func008002001 takes nothing returns boolean
return ( udg_Siege == false )
endfunction
function Trig_Tempestuous_Detonator_Func008002003003001003 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_Tempestuous_Detonator_Func005002 takes nothing returns nothing
local location TempLoc
local location TempLocAttacked
local location TempLocPicked
local group TempGroup
call SetUnitMoveSpeed( GetEnumUnit(), ( GetUnitDefaultMoveSpeed(GetEnumUnit()) * 0.50 ) )
call GroupAddUnitSimple( GetEnumUnit(), udg_TempestSlow )
set TempLocPicked = GetUnitLoc(GetEnumUnit())
set TempLocAttacked = GetUnitLoc(GetAttackedUnitBJ())
set TempLoc = PolarProjectionBJ(TempLocPicked, 300.00, AngleBetweenPoints(TempLocAttacked, TempLocPicked))
call SetUnitPositionLocFacingBJ( GetEnumUnit(), TempLoc, AngleBetweenPoints(TempLocAttacked, TempLocPicked) )
call RemoveLocation( TempLocPicked )
call RemoveLocation( TempLocAttacked )
call RemoveLocation( TempLoc )
if ( Trig_Tempestuous_Detonator_Func008002001() ) then
set TempLoc = GetRectCenter(udg_Regions[GetUnitUserData(GetEnumUnit())])
call IssuePointOrderLocBJ( GetEnumUnit(), "move", TempLoc )
else
set TempLoc = GetUnitLoc(GetEnumUnit())
set TempGroup = GetUnitsInRangeOfLocMatching(512, TempLoc, Condition(function Trig_Entangling_Roots_Antistuck_Func005003003001003))
call IssueTargetOrderBJ( GetEnumUnit(), "attack", GroupPickRandomUnit(TempGroup) )
call DestroyGroup( TempGroup )
endif
call RemoveLocation( TempLoc )
set TempLoc = null
set TempLocPicked = null
set TempLocAttacked = null
set TempGroup = null
endfunction
function Trig_Tempestuous_Detonator_Actions takes nothing returns nothing
local location TempPoint = GetUnitLoc(GetAttackedUnitBJ())
local group TempGroup
local group MainGroup = CreateGroup()
call GroupAddUnitSimple( GetAttacker(), udg_CoolingDown )
call PolledWait( 0.30 )
set TempGroup = GetUnitsInRangeOfLocMatching(300.00, TempPoint, Condition(function Trig_Tempestuous_Detonator_Func004001003))
call GroupAddGroup( TempGroup, MainGroup )
call ForGroupBJ( MainGroup, function Trig_Tempestuous_Detonator_Func005002 )
call RemoveLocation(TempPoint)
call DestroyGroup(TempGroup)
call DestroyGroup(MainGroup)
set TempPoint = null
set TempGroup = null
set MainGroup = null
call PolledWait( 1.00 )
call GroupRemoveUnitSimple( GetAttacker(), udg_CoolingDown )
endfunction
//===========================================================================
function InitTrig_Tempestuous_Detonator takes nothing returns nothing
set gg_trg_Tempestuous_Detonator = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Tempestuous_Detonator, Player(11), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Tempestuous_Detonator, Condition( function Trig_Tempestuous_Detonator_Conditions ) )
call TriggerAddAction( gg_trg_Tempestuous_Detonator, function Trig_Tempestuous_Detonator_Actions )
endfunction
function Trig_Epidemic_Catalyst_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'oC68' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetAttacker(), udg_CoolingDown) == false ) ) then
return false
endif
return true
endfunction
function Trig_Epidemic_Catalyst_Func003001003001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(11) )
endfunction
function Trig_Epidemic_Catalyst_Func003001003002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL) == false )
endfunction
function Trig_Epidemic_Catalyst_Func003001003002002 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Epidemic) == false )
endfunction
function Trig_Epidemic_Catalyst_Func003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Epidemic_Catalyst_Func003001003002001(), Trig_Epidemic_Catalyst_Func003001003002002() )
endfunction
function Trig_Epidemic_Catalyst_Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Epidemic_Catalyst_Func003001003001(), Trig_Epidemic_Catalyst_Func003001003002() )
endfunction
function Trig_Epidemic_Catalyst_Func004A takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Epidemic_Effect )
endfunction
function Trig_Epidemic_Catalyst_Actions takes nothing returns nothing
local location TempPoint = GetUnitLoc(GetAttackedUnitBJ())
local group TempGroup = GetUnitsInRangeOfLocMatching(250.00, TempPoint, Condition(function Trig_Epidemic_Catalyst_Func003001003))
local group MainGroup = CreateGroup()
call GroupAddGroup( TempGroup, MainGroup )
call ForGroupBJ( MainGroup, function Trig_Epidemic_Catalyst_Func004A )
call RemoveLocation(TempPoint)
call DestroyGroup(TempGroup)
call DestroyGroup(MainGroup)
set TempPoint = null
set TempGroup = null
set MainGroup = null
call GroupAddUnitSimple( GetAttacker(), udg_CoolingDown )
call PolledWait( 1.00 )
call GroupRemoveUnitSimple( GetAttacker(), udg_CoolingDown )
endfunction
//===========================================================================
function InitTrig_Epidemic_Catalyst takes nothing returns nothing
set gg_trg_Epidemic_Catalyst = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Epidemic_Catalyst, Player(11), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Epidemic_Catalyst, Condition( function Trig_Epidemic_Catalyst_Conditions ) )
call TriggerAddAction( gg_trg_Epidemic_Catalyst, function Trig_Epidemic_Catalyst_Actions )
endfunction
function Trig_Epidemic_Effect_Actions takes nothing returns nothing
local effect LocalFX
local unit LocalUnit = GetEnumUnit()
call GroupAddUnitSimple( LocalUnit, udg_Epidemic )
call AddSpecialEffectTargetUnitBJ( "overhead", LocalUnit, "Abilities\\Spells\\NightElf\\CorrosiveBreath\\ChimaeraAcidTargetArt.mdl" )
set LocalFX = GetLastCreatedEffectBJ()
loop
exitwhen ( IsUnitAliveBJ(LocalUnit) == false )
call PolledWait(5.00)
endloop
call GroupRemoveUnitSimple( LocalUnit, udg_Epidemic )
call DestroyEffect( LocalFX )
set LocalFX = null
set LocalUnit = null
endfunction
//===========================================================================
function InitTrig_Epidemic_Effect takes nothing returns nothing
set gg_trg_Epidemic_Effect = CreateTrigger( )
call TriggerAddAction( gg_trg_Epidemic_Effect, function Trig_Epidemic_Effect_Actions )
endfunction
function Trig_Infection_Intensifier_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'oC71' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetAttacker(), udg_CoolingDown) == false ) ) then
return false
endif
return true
endfunction
function Trig_Infection_Intensifier_Func001001001 takes nothing returns boolean
return ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_PLAGUED) == true )
endfunction
function Trig_Infection_Intensifier_Func002001001 takes nothing returns boolean
return ( IsUnitInGroup(GetAttackedUnitBJ(), udg_Epidemic) == true )
endfunction
function Trig_Infection_Intensifier_Actions takes nothing returns nothing
if ( Trig_Infection_Intensifier_Func001001001() ) then
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), 500.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
endif
if ( Trig_Infection_Intensifier_Func002001001() ) then
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), 500.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
endif
call GroupAddUnitSimple( GetAttacker(), udg_CoolingDown )
call PolledWait( 1.00 )
call GroupRemoveUnitSimple( GetAttacker(), udg_CoolingDown )
endfunction
//===========================================================================
function InitTrig_Infection_Intensifier takes nothing returns nothing
set gg_trg_Infection_Intensifier = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Infection_Intensifier, Player(11), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Infection_Intensifier, Condition( function Trig_Infection_Intensifier_Conditions ) )
call TriggerAddAction( gg_trg_Infection_Intensifier, function Trig_Infection_Intensifier_Actions )
endfunction
function Trig_Holy_Hand_Grenadier_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'hC76' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetAttacker(), udg_CoolingDown) == false ) ) then
return false
endif
return true
endfunction
function Trig_Holy_Hand_Grenadier_Func003001003001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(11) )
endfunction
function Trig_Holy_Hand_Grenadier_Func003001003002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_UNDEAD) == true )
endfunction
function Trig_Holy_Hand_Grenadier_Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Holy_Hand_Grenadier_Func003001003001(), Trig_Holy_Hand_Grenadier_Func003001003002() )
endfunction
function Trig_Holy_Hand_Grenadier_Func004002 takes nothing returns nothing
call UnitDamageTargetBJ( GetAttacker(), GetEnumUnit(), 300.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Holy_Hand_Grenadier_Func006001003 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(11) )
endfunction
function Trig_Holy_Hand_Grenadier_Func007002 takes nothing returns nothing
call UnitRemoveBuffsBJ( bj_REMOVEBUFFS_POSITIVE, GetEnumUnit() )
endfunction
function Trig_Holy_Hand_Grenadier_Actions takes nothing returns nothing
local location TempPoint = GetUnitLoc(GetAttackedUnitBJ())
local group TempGroup
local group MainGroup = CreateGroup()
set TempGroup = GetUnitsInRangeOfLocMatching(200.00, TempPoint, Condition(function Trig_Holy_Hand_Grenadier_Func003001003))
call GroupAddGroup( TempGroup, MainGroup )
call ForGroupBJ( MainGroup, function Trig_Holy_Hand_Grenadier_Func004002 )
call DestroyGroup( TempGroup )
call GroupClear( MainGroup )
set TempGroup = GetUnitsInRangeOfLocMatching(200.00, TempPoint, Condition(function Trig_Holy_Hand_Grenadier_Func006001003))
call GroupAddGroup( TempGroup, MainGroup )
call ForGroupBJ( MainGroup, function Trig_Holy_Hand_Grenadier_Func007002 )
call DestroyGroup(TempGroup)
call DestroyGroup(MainGroup)
call RemoveLocation(TempPoint)
set TempPoint = null
set TempGroup = null
set MainGroup = null
call GroupAddUnitSimple( GetAttacker(), udg_CoolingDown )
call PolledWait( 1.00 )
call GroupRemoveUnitSimple( GetAttacker(), udg_CoolingDown )
endfunction
//===========================================================================
function InitTrig_Holy_Hand_Grenadier takes nothing returns nothing
set gg_trg_Holy_Hand_Grenadier = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Holy_Hand_Grenadier, Player(11), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Holy_Hand_Grenadier, Condition( function Trig_Holy_Hand_Grenadier_Conditions ) )
call TriggerAddAction( gg_trg_Holy_Hand_Grenadier, function Trig_Holy_Hand_Grenadier_Actions )
endfunction
function Trig_Hex_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AChx' ) ) then
return false
endif
return true
endfunction
function Trig_Hex_Cast_Func002003003001003 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_Hex_Cast_Actions takes nothing returns nothing
local unit LocalUnit = GetSpellTargetUnit()
local location TempLoc
local group TempGroup
if ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_UNDEAD) ) then
call GroupAddUnitSimple( GetSpellTargetUnit(), udg_HexedUndead )
call UnitRemoveTypeBJ( UNIT_TYPE_UNDEAD, GetSpellTargetUnit() )
endif
call PolledWait( 0.50 )
if ( udg_Siege == false ) then
set TempLoc = GetRectCenter(udg_Regions[GetUnitUserData(LocalUnit)])
call IssuePointOrderLocBJ( LocalUnit, "move", TempLoc )
else
set TempLoc = GetUnitLoc(LocalUnit)
set TempGroup = GetUnitsInRangeOfLocMatching(512, TempLoc, Condition(function Trig_Hex_Cast_Func002003003001003))
call IssueTargetOrderBJ( LocalUnit, "attack", GroupPickRandomUnit(TempGroup) )
call DestroyGroup( TempGroup )
endif
call RemoveLocation( TempLoc )
call PolledWait( 9.52 )
if ( udg_Siege == false ) then
set TempLoc = GetRectCenter(udg_Regions[GetUnitUserData(LocalUnit)])
call IssuePointOrderLocBJ( LocalUnit, "move", TempLoc )
else
set TempLoc = GetUnitLoc(LocalUnit)
set TempGroup = GetUnitsInRangeOfLocMatching(512, TempLoc, Condition(function Trig_Hex_Cast_Func002003003001003))
call IssueTargetOrderBJ( LocalUnit, "attack", GroupPickRandomUnit(TempGroup) )
call DestroyGroup( TempGroup )
endif
call RemoveLocation( TempLoc )
set LocalUnit = null
set TempLoc = null
set TempGroup = null
endfunction
//===========================================================================
function InitTrig_Hex_Cast takes nothing returns nothing
set gg_trg_Hex_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hex_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Hex_Cast, Condition( function Trig_Hex_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Hex_Cast, function Trig_Hex_Cast_Actions )
endfunction
function Trig_Aerial_Shackles_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'Amls' ) ) then
return false
endif
return true
endfunction
function Trig_Aerial_Shackles_Cast_Func002003003001003 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_Aerial_Shackles_Cast_Actions takes nothing returns nothing
local unit LocalUnit = GetSpellTargetUnit()
local location TempLoc
local group TempGroup
call PolledWait( 8.02 )
if ( udg_Siege == false ) then
set TempLoc = GetRectCenter(udg_Regions[GetUnitUserData(LocalUnit)])
call IssuePointOrderLocBJ( LocalUnit, "move", TempLoc )
else
set TempLoc = GetUnitLoc(LocalUnit)
set TempGroup = GetUnitsInRangeOfLocMatching(512, TempLoc, Condition(function Trig_Aerial_Shackles_Cast_Func002003003001003))
call IssueTargetOrderBJ( LocalUnit, "attack", GroupPickRandomUnit(TempGroup) )
call DestroyGroup( TempGroup )
endif
call RemoveLocation(TempLoc)
set LocalUnit = null
set TempLoc = null
set TempGroup = null
endfunction
//===========================================================================
function InitTrig_Aerial_Shackles_Cast takes nothing returns nothing
set gg_trg_Aerial_Shackles_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Aerial_Shackles_Cast, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_Aerial_Shackles_Cast, Condition( function Trig_Aerial_Shackles_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Aerial_Shackles_Cast, function Trig_Aerial_Shackles_Cast_Actions )
endfunction
function Trig_Web_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ACwb' ) ) then
return false
endif
return true
endfunction
function Trig_Web_Cast_Func002003003001003 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_Attackable) == true )
endfunction
function Trig_Web_Cast_Actions takes nothing returns nothing
local unit LocalUnit = GetSpellTargetUnit()
local location TempLoc
local group TempGroup
call PolledWait( 20.10 )
if ( udg_Siege == false ) then
set TempLoc = GetRectCenter(udg_Regions[GetUnitUserData(LocalUnit)])
call IssuePointOrderLocBJ( LocalUnit, "move", TempLoc )
else
set TempLoc = GetUnitLoc(LocalUnit)
set TempGroup = GetUnitsInRangeOfLocMatching(512, TempLoc, Condition(function Trig_Web_Cast_Func002003003001003))
call IssueTargetOrderBJ( LocalUnit, "attack", GroupPickRandomUnit(TempGroup) )
call DestroyGroup( TempGroup )
endif
call RemoveLocation( TempLoc )
set LocalUnit = null
set TempLoc = null
set TempGroup = null
endfunction
//===========================================================================
function InitTrig_Web_Cast takes nothing returns nothing
set gg_trg_Web_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Web_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Web_Cast, Condition( function Trig_Web_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Web_Cast, function Trig_Web_Cast_Actions )
endfunction
function Trig_Random_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'hhou')) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Random_Actions takes nothing returns nothing
local integer Random
local boolean Invalid = true
local boolean AllElimed = true
local integer i = 1
local integer iEnd = 12
local group TempGroup
loop
exitwhen i > iEnd
if ( udg_Elim[( ( ( GetConvertedPlayerId(GetTriggerPlayer()) - 1 ) * 12 ) + i )] == false ) then
set AllElimed = false
endif
set i = i + 1
endloop
set Random = GetRandomInt(1,12)
loop
exitwhen (Invalid == false)
exitwhen (AllElimed == true)
set Random = GetRandomInt(1,12)
set Invalid = udg_Elim[( ( ( GetConvertedPlayerId(GetTriggerPlayer()) - 1 ) * 12 ) + Random )]
endloop
set TempGroup = GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'hhou')
call IssueTrainOrderByIdBJ( GroupPickRandomUnit(TempGroup), udg_Governors[Random] )
call DestroyGroup( TempGroup )
set TempGroup = null
endfunction
//===========================================================================
function InitTrig_Old_Random takes nothing returns nothing
set gg_trg_Old_Random = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Old_Random, Player(0), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Old_Random, Player(1), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Old_Random, Player(2), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Old_Random, Player(3), "-random", true )
call TriggerAddCondition( gg_trg_Old_Random, Condition( function Trig_Random_Conditions ) )
call TriggerAddAction( gg_trg_Old_Random, function Trig_Random_Actions )
endfunction
function Trig_Random_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'hhou')) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Random_Actions takes nothing returns nothing
local integer Random
local integer i = 1
local integer iEnd = 10
local group TempGroup
set Random = GetRandomInt(1,10)
set TempGroup = GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'hhou')
call IssueTrainOrderByIdBJ( GroupPickRandomUnit(TempGroup), udg_Governors[Random] )
call DestroyGroup( TempGroup )
set TempGroup = null
endfunction
//===========================================================================
function InitTrig_Random takes nothing returns nothing
set gg_trg_Random = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Random, Player(0), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Random, Player(1), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Random, Player(2), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Random, Player(3), "-random", true )
call TriggerAddCondition( gg_trg_Random, Condition( function Trig_Random_Conditions ) )
call TriggerAddAction( gg_trg_Random, function Trig_Random_Actions )
endfunction