Name | Type | is_array | initial_value |
Boolean_KeepQuitters | boolean | No | false |
Boolean_MortarInTransit | boolean | No | false |
Boolean_TieBreaker | boolean | No | false |
Destructible_Selected | destructable | No | |
Integer_GameLength | integer | No | 20 |
Integer_GamesPlayed | integer | No | 0 |
Integer_Number | integer | No | 0 |
Integers_Scores | integer | Yes | |
Order_Archimonde | integer | No | |
Player_Winner | player | No | |
PlayerGroup_InTrouble | force | No | |
Point_Death | location | No | |
Real_Angle | real | No | 0 |
Real_Speed | real | No | 0 |
Reals_JumpVelocity | real | Yes | |
Regions_Current | rect | Yes | |
SpecialEffect_Special | effect | No | |
Timer_TimeLeft | timer | No | |
Triggers_Current | trigger | Yes | |
Triggers_Events | trigger | Yes | |
Unit_Target | unit | No | |
UnitGroups_Players | group | Yes |
function Trig_Initialization_Func004002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(GetEntireMapRect()), 0 )
endfunction
function Trig_Initialization_Actions takes nothing returns nothing
call SetGameSpeed( MAP_SPEED_FAST )
call LockGameSpeedBJ( )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 0.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
call ForForce( GetPlayersAll(), function Trig_Initialization_Func004002 )
call FogMaskEnableOff( )
call FogEnableOff( )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Integers_Scores[GetForLoopIndexA()] = 0
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerExecute( gg_trg_Set_Variables )
call UseTimeOfDayBJ( false )
call SetTimeOfDay( 12.00 )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_023", "TRIGSTR_024", "ReplaceableTextures\\CommandButtons\\BTNPeon.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_025" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_027", "TRIGSTR_028", "ReplaceableTextures\\CommandButtons\\BTNMilitia.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_029" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_061" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_138" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_063", "TRIGSTR_064", "ReplaceableTextures\\CommandButtons\\BTNSheep.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_090" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_086", "TRIGSTR_087", "ReplaceableTextures\\CommandButtons\\BTNCatapult.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_088" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_091", "TRIGSTR_092", "ReplaceableTextures\\CommandButtons\\BTNCheese.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_093" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_094", "TRIGSTR_095", "ReplaceableTextures\\CommandButtons\\BTNGoblinSapper.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_096" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_097", "TRIGSTR_098", "ReplaceableTextures\\CommandButtons\\BTNMortarTeam.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_099" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_100", "TRIGSTR_101", "ReplaceableTextures\\CommandButtons\\BTNPriest.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_102" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_103", "TRIGSTR_104", "ReplaceableTextures\\CommandButtons\\BTNTreant.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_105" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_106", "TRIGSTR_107", "ReplaceableTextures\\CommandButtons\\BTNMurloc.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_108" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_109", "TRIGSTR_110", "ReplaceableTextures\\CommandButtons\\BTNHuntress.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_113" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_111", "TRIGSTR_112", "ReplaceableTextures\\CommandButtons\\BTNSorceress.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_114" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_115", "TRIGSTR_116", "ReplaceableTextures\\CommandButtons\\BTNTauren.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_117" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_118", "TRIGSTR_119", "ReplaceableTextures\\CommandButtons\\BTNRifleman.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_120" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_121", "TRIGSTR_122", "ReplaceableTextures\\CommandButtons\\BTNDruidOfTheTalon.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_123" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_124", "TRIGSTR_125", "ReplaceableTextures\\CommandButtons\\BTNKotoBeast.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_126" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_127", "TRIGSTR_128", "ReplaceableTextures\\CommandButtons\\BTNRaider.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_129" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_132", "TRIGSTR_133", "ReplaceableTextures\\CommandButtons\\BTNEnt.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_134" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_135", "TRIGSTR_136", "ReplaceableTextures\\CommandButtons\\BTNSkeletonWarrior.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_137" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_140", "TRIGSTR_141", "ReplaceableTextures\\CommandButtons\\BTNForestTroll.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_142" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_145", "TRIGSTR_146", "ReplaceableTextures\\CommandButtons\\BTNZigguratUpgrade.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_147" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_150", "TRIGSTR_151", "ReplaceableTextures\\CommandButtons\\BTNOgre.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_152" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_154", "TRIGSTR_155", "ReplaceableTextures\\CommandButtons\\BTNRallyPointUndead.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_156" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_224", "TRIGSTR_225", "ReplaceableTextures\\CommandButtons\\BTNThunderLizardSalamander.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_226" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_231", "TRIGSTR_232", "ReplaceableTextures\\CommandButtons\\BTNArchimonde.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_233" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_245", "TRIGSTR_246", "ReplaceableTextures\\CommandButtons\\BTNHeroPaladin.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_247" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_251", "TRIGSTR_252", "ReplaceableTextures\\CommandButtons\\BTNRiderlessHorse.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_253" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_255", "TRIGSTR_256", "ReplaceableTextures\\CommandButtons\\BTNHeroDreadlord.blp" )
call CreateQuestItemBJ( GetLastCreatedQuestBJ(), "TRIGSTR_257" )
call SetPlayerOnScoreScreenBJ( false, Player(11) )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_035" )
call TriggerSleepAction( 6.00 )
call TriggerExecute( gg_trg_Next_Event )
endfunction
//===========================================================================
function InitTrig_Initialization takes nothing returns nothing
set gg_trg_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Initialization, function Trig_Initialization_Actions )
endfunction
function Trig_Leaderboard_Func003003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Leaderboard_Actions takes nothing returns nothing
call PlaySoundBJ( gg_snd_HeroPaladinPissed1 )
call CreateLeaderboardBJ( GetPlayersAll(), ( "Game 1 of " + I2S(udg_Integer_GameLength) ) )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Leaderboard_Func003003001() ) then
call LeaderboardAddItemBJ( ConvertedPlayer(GetForLoopIndexA()), GetLastCreatedLeaderboard(), GetPlayerName(ConvertedPlayer(GetForLoopIndexA())), 0 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Leaderboard takes nothing returns nothing
set gg_trg_Leaderboard = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Leaderboard, 0.00 )
call TriggerAddAction( gg_trg_Leaderboard, function Trig_Leaderboard_Actions )
endfunction
function Trig_Set_Variables_Actions takes nothing returns nothing
set udg_Triggers_Events[1] = gg_trg_Peon_Initialization
set udg_Triggers_Events[2] = gg_trg_Rat_Initialization
set udg_Triggers_Events[3] = gg_trg_Kaboom_Initialization
set udg_Triggers_Events[4] = gg_trg_Mortar_Initialization
set udg_Triggers_Events[5] = gg_trg_Cleaning_Initialization
set udg_Triggers_Events[6] = gg_trg_Forest_Initialization
set udg_Triggers_Events[7] = gg_trg_Roadkill_Initialization
set udg_Triggers_Events[8] = gg_trg_Covert_Initialization
set udg_Triggers_Events[9] = gg_trg_Polymorph_Initialization
set udg_Triggers_Events[10] = gg_trg_Horse_Initialization
set udg_Triggers_Events[11] = gg_trg_Uprising_Initialization
set udg_Triggers_Events[12] = gg_trg_Dark_Initialization
set udg_Triggers_Events[13] = gg_trg_Kodos_Initialization
set udg_Triggers_Events[14] = gg_trg_Smite_Initialization
set udg_Triggers_Events[15] = gg_trg_Treant_Initialization
set udg_Triggers_Events[16] = gg_trg_Skeleton_Initialization
set udg_Triggers_Events[17] = gg_trg_Salamander_Initialization
set udg_Triggers_Events[18] = gg_trg_Stop_Initialization
set udg_Triggers_Events[19] = gg_trg_Push_Initialization
set udg_Triggers_Events[20] = gg_trg_Spike_Initialization
endfunction
//===========================================================================
function InitTrig_Set_Variables takes nothing returns nothing
set gg_trg_Set_Variables = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_Variables, function Trig_Set_Variables_Actions )
endfunction
function Trig_Next_Event_Func004002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Next_Event_Func004002 takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(GetEnumPlayer()), function Trig_Next_Event_Func004002002 )
endfunction
function Trig_Next_Event_Func005003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Next_Event_Func006002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), GetCameraBoundsMapRect() )
endfunction
function Trig_Next_Event_Func007001 takes nothing returns boolean
return ( udg_Integer_GamesPlayed >= udg_Integer_GameLength )
endfunction
function Trig_Next_Event_Func008001 takes nothing returns boolean
return ( udg_Integer_GamesPlayed >= udg_Integer_GameLength )
endfunction
function Trig_Next_Event_Func009001 takes nothing returns boolean
return ( udg_Boolean_TieBreaker == true )
endfunction
function Trig_Next_Event_Func011001 takes nothing returns boolean
return ( udg_Boolean_TieBreaker == true )
endfunction
function Trig_Next_Event_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Disable )
set udg_Boolean_KeepQuitters = false
call ClearTextMessagesBJ( GetPlayersAll() )
call ForForce( GetPlayersAll(), function Trig_Next_Event_Func004002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call ForGroup( GetUnitsInRectAll(GetEntireMapRect()), function Trig_Next_Event_Func005003002 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Next_Event_Func006002 )
if ( Trig_Next_Event_Func007001() ) then
call TriggerExecute( gg_trg_Game_End )
else
call DoNothing( )
endif
if ( Trig_Next_Event_Func008001() ) then
return
else
call DoNothing( )
endif
if ( Trig_Next_Event_Func009001() ) then
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_238" )
else
call DoNothing( )
endif
call TriggerExecute( gg_trg_Filter )
if ( Trig_Next_Event_Func011001() ) then
call TriggerExecute( gg_trg_Tiebreaker )
else
call DoNothing( )
endif
call PlaySoundBJ( gg_snd_QuestNew )
call LeaderboardSetLabelBJ( GetLastCreatedLeaderboard(), ( "Game " + ( I2S(( udg_Integer_GamesPlayed + 1 )) + ( " of " + I2S(udg_Integer_GameLength) ) ) ) )
call TriggerSleepAction( 0.00 )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 2.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
endfunction
//===========================================================================
function InitTrig_Next_Event takes nothing returns nothing
set gg_trg_Next_Event = CreateTrigger( )
call TriggerAddAction( gg_trg_Next_Event, function Trig_Next_Event_Actions )
endfunction
function Trig_Filter_Func002001 takes nothing returns boolean
return ( GetTriggerExecCount(udg_Triggers_Events[udg_Integer_Number]) == 1 )
endfunction
function Trig_Filter_Actions takes nothing returns nothing
set udg_Integer_Number = GetRandomInt(1, 20)
if ( Trig_Filter_Func002001() ) then
call TriggerExecute( gg_trg_Filter )
else
call TriggerExecute( udg_Triggers_Events[udg_Integer_Number] )
endif
endfunction
//===========================================================================
function InitTrig_Filter takes nothing returns nothing
set gg_trg_Filter = CreateTrigger( )
call TriggerAddAction( gg_trg_Filter, function Trig_Filter_Actions )
endfunction
function Trig_Win_Func007002 takes nothing returns nothing
call AddSpecialEffectLocBJ( GetUnitLoc(GetEnumUnit()), "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdx" )
endfunction
function Trig_Win_Func008002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Win_Func009002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Win_Actions takes nothing returns nothing
call PlaySoundBJ( gg_snd_QuestCompleted )
call ClearTextMessagesBJ( GetPlayersAll() )
set udg_Integers_Scores[GetConvertedPlayerId(udg_Player_Winner)] = ( udg_Integers_Scores[GetConvertedPlayerId(udg_Player_Winner)] + 1 )
set udg_Integer_GamesPlayed = ( udg_Integer_GamesPlayed + 1 )
call LeaderboardSetPlayerItemValueBJ( udg_Player_Winner, GetLastCreatedLeaderboard(), udg_Integers_Scores[GetConvertedPlayerId(udg_Player_Winner)] )
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(udg_Player_Winner) + ( " wins! " + ( I2S(udg_Integer_GamesPlayed) + ( ( " of " + I2S(udg_Integer_GameLength) ) + " games played." ) ) ) ) )
call ForGroup( GetUnitsOfPlayerAll(udg_Player_Winner), function Trig_Win_Func007002 )
call ForGroup( GetUnitsOfPlayerAll(udg_Player_Winner), function Trig_Win_Func008002 )
call ForGroup( GetUnitsOfPlayerAll(Player(PLAYER_NEUTRAL_PASSIVE)), function Trig_Win_Func009002 )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 4.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
call TriggerSleepAction( 4.00 )
call TriggerExecute( gg_trg_Next_Event )
endfunction
//===========================================================================
function InitTrig_Win takes nothing returns nothing
set gg_trg_Win = CreateTrigger( )
call TriggerAddAction( gg_trg_Win, function Trig_Win_Actions )
endfunction
function Trig_Draw_Actions takes nothing returns nothing
call PlaySoundBJ( gg_snd_QuestFailed )
call ClearTextMessagesBJ( GetPlayersAll() )
set udg_Integer_GamesPlayed = ( udg_Integer_GamesPlayed + 1 )
call DisplayTextToForce( GetPlayersAll(), ( "Draw! " + ( I2S(udg_Integer_GamesPlayed) + ( ( " of " + I2S(udg_Integer_GameLength) ) + " games played." ) ) ) )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 4.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
call TriggerSleepAction( 4.00 )
call TriggerExecute( gg_trg_Next_Event )
endfunction
//===========================================================================
function InitTrig_Draw takes nothing returns nothing
set gg_trg_Draw = CreateTrigger( )
call TriggerAddAction( gg_trg_Draw, function Trig_Draw_Actions )
endfunction
function Trig_Game_End_Func003003001 takes nothing returns boolean
return ( udg_Integers_Scores[GetForLoopIndexA()] > udg_Integer_Number )
endfunction
function Trig_Game_End_Func004003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Game_End_Func004003002001 takes nothing returns boolean
return ( udg_Integers_Scores[GetForLoopIndexA()] == udg_Integer_Number )
endfunction
function Trig_Game_End_Func004003002002003001 takes nothing returns boolean
return ( GetForLoopIndexA() != GetForLoopIndexB() )
endfunction
function Trig_Game_End_Func004003002002003002001 takes nothing returns boolean
return ( udg_Integers_Scores[GetForLoopIndexA()] == udg_Integers_Scores[GetForLoopIndexB()] )
endfunction
function Trig_Game_End_Func005001 takes nothing returns boolean
return ( udg_Boolean_TieBreaker == true )
endfunction
function Trig_Game_End_Func006001 takes nothing returns boolean
return ( udg_Boolean_TieBreaker == true )
endfunction
function Trig_Game_End_Func009003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Game_End_Func009003002001 takes nothing returns boolean
return ( udg_Integers_Scores[GetForLoopIndexA()] == udg_Integer_Number )
endfunction
function Trig_Game_End_Actions takes nothing returns nothing
set udg_Integer_Number = 0
set udg_Boolean_TieBreaker = false
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Game_End_Func003003001() ) then
set udg_Integer_Number = udg_Integers_Scores[GetForLoopIndexA()]
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Game_End_Func004003001() ) then
if ( Trig_Game_End_Func004003002001() ) then
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 8
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Game_End_Func004003002002003001() ) then
if ( Trig_Game_End_Func004003002002003002001() ) then
set udg_Boolean_TieBreaker = true
else
call DoNothing( )
endif
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
else
call DoNothing( )
endif
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Game_End_Func005001() ) then
set udg_Integer_GameLength = ( udg_Integer_GameLength + 1 )
else
call DoNothing( )
endif
if ( Trig_Game_End_Func006001() ) then
return
else
call DoNothing( )
endif
call PlaySoundBJ( gg_snd_UtherReturns )
call LeaderboardSetLabelBJ( GetLastCreatedLeaderboard(), "TRIGSTR_216" )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Game_End_Func009003001() ) then
if ( Trig_Game_End_Func009003002001() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(ConvertedPlayer(GetForLoopIndexA())) + " has won the game!" ) )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 10.00 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_217" )
call TriggerExecute( gg_trg_Lull_Time )
endfunction
//===========================================================================
function InitTrig_Game_End takes nothing returns nothing
set gg_trg_Game_End = CreateTrigger( )
call TriggerAddAction( gg_trg_Game_End, function Trig_Game_End_Actions )
endfunction
function Trig_Tiebreaker_Func002003001 takes nothing returns boolean
return ( udg_Integers_Scores[GetForLoopIndexA()] > udg_Integer_Number )
endfunction
function Trig_Tiebreaker_Func003003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Tiebreaker_Func003003002001 takes nothing returns boolean
return ( udg_Integers_Scores[GetForLoopIndexA()] != udg_Integer_Number )
endfunction
function Trig_Tiebreaker_Func003003002002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Tiebreaker_Actions takes nothing returns nothing
set udg_Integer_Number = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Tiebreaker_Func002003001() ) then
set udg_Integer_Number = udg_Integers_Scores[GetForLoopIndexA()]
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Tiebreaker_Func003003001() ) then
if ( Trig_Tiebreaker_Func003003002001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Tiebreaker_Func003003002002002 )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Tiebreaker takes nothing returns nothing
set gg_trg_Tiebreaker = CreateTrigger( )
call TriggerAddAction( gg_trg_Tiebreaker, function Trig_Tiebreaker_Actions )
endfunction
function Trig_Lull_Time_Func010003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Lull_Time_Func010003002001 takes nothing returns boolean
return ( udg_Integers_Scores[GetForLoopIndexA()] == udg_Integer_Number )
endfunction
function Trig_Lull_Time_Actions takes nothing returns nothing
call TriggerSleepAction( 20.00 )
call DisableTrigger( gg_trg_P1_Quit )
call DisableTrigger( gg_trg_P2_Quit )
call DisableTrigger( gg_trg_P3_Quit )
call DisableTrigger( gg_trg_P4_Quit )
call DisableTrigger( gg_trg_P5_Quit )
call DisableTrigger( gg_trg_P6_Quit )
call DisableTrigger( gg_trg_P7_Quit )
call DisableTrigger( gg_trg_P8_Quit )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Lull_Time_Func010003001() ) then
if ( Trig_Lull_Time_Func010003002001() ) then
call CustomVictoryBJ( ConvertedPlayer(GetForLoopIndexA()), true, true )
else
call CustomDefeatBJ( ConvertedPlayer(GetForLoopIndexA()), "TRIGSTR_220" )
endif
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Lull_Time takes nothing returns nothing
set gg_trg_Lull_Time = CreateTrigger( )
call TriggerAddAction( gg_trg_Lull_Time, function Trig_Lull_Time_Actions )
endfunction
function Trig_Disable_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Peon_Catapult_Spawn )
call DisableTrigger( gg_trg_Peon_Catapult_Fire )
call DisableTrigger( gg_trg_Peon_Death )
call DisableTrigger( gg_trg_Peon_AI )
call DisableTrigger( gg_trg_Rat_Spider_Patrol )
call DisableTrigger( gg_trg_Rat_Finish )
call DisableTrigger( gg_trg_Rat_Death )
call DisableTrigger( gg_trg_Rat_AI )
call DisableTrigger( gg_trg_Kaboom_Wisp_Spawn )
call DisableTrigger( gg_trg_Kaboom_Reset_Base )
call DisableTrigger( gg_trg_Kaboom_Death )
call DisableTrigger( gg_trg_Kaboom_Center_Flame )
call DisableTrigger( gg_trg_Kaboom_Final_Death )
call DisableTrigger( gg_trg_Kaboom_AI )
call DisableTrigger( gg_trg_Mortar_Start )
call DisableTrigger( gg_trg_Mortar_Attack )
call DisableTrigger( gg_trg_Mortar_Attack_2 )
call DisableTrigger( gg_trg_Mortar_Attack_3 )
call DisableTrigger( gg_trg_Mortar_Attack_4 )
call DisableTrigger( gg_trg_Mortar_Attack_Ground )
call DisableTrigger( gg_trg_Mortar_Final_Death )
call DisableTrigger( gg_trg_Mortar_AI )
call DisableTrigger( gg_trg_Cleaning_Dispel )
call DisableTrigger( gg_trg_Cleaning_Degrade )
call DisableTrigger( gg_trg_Cleaning_Death )
call DisableTrigger( gg_trg_Cleaning_AI )
call DisableTrigger( gg_trg_Forest_Spread )
call DisableTrigger( gg_trg_Forest_Finish )
call DisableTrigger( gg_trg_Forest_Death )
call DisableTrigger( gg_trg_Forest_Snuff )
call DisableTrigger( gg_trg_Forest_AI )
call DisableTrigger( gg_trg_Roadkill_Finish )
call DisableTrigger( gg_trg_Roadkill_Death )
call DisableTrigger( gg_trg_Roadkill_Final_Death )
call DisableTrigger( gg_trg_Roadkill_Expire )
call DisableTrigger( gg_trg_Covert_Finish )
call DisableTrigger( gg_trg_Covert_Final_Death )
call DisableTrigger( gg_trg_Covert_Patrol )
call DisableTrigger( gg_trg_Covert_Cripple )
call DisableTrigger( gg_trg_Dawn )
call DisableTrigger( gg_trg_Covert_AI )
call DisableTrigger( gg_trg_Polymorph_Spawn )
call DisableTrigger( gg_trg_Polymorph_Patrol )
call DisableTrigger( gg_trg_Polymorph_Final_Death )
call DisableTrigger( gg_trg_Polymorph_AI )
call DisableTrigger( gg_trg_Tauren_Footman_Spawn )
call DisableTrigger( gg_trg_Tauren_Final_Death )
call DisableTrigger( gg_trg_Tauren_AI )
call DisableTrigger( gg_trg_Uprising_Spawn_Base )
call DisableTrigger( gg_trg_Uprising_Rush )
call DisableTrigger( gg_trg_Uprising_Target )
call DisableTrigger( gg_trg_Uprising_Death )
call DisableTrigger( gg_trg_Uprising_Final_Death )
call DisableTrigger( gg_trg_Uprising_AI )
call DisableTrigger( gg_trg_Dark_Spawn )
call DisableTrigger( gg_trg_Dark_Patrol )
call DisableTrigger( gg_trg_Dark_Final_Death )
call DisableTrigger( gg_trg_Dark_AI )
call DisableTrigger( gg_trg_Kodos_Spawn_Base )
call DisableTrigger( gg_trg_Kodos_Child_Indigestion )
call DisableTrigger( gg_trg_Kodos_Pig_Kill )
call DisableTrigger( gg_trg_Kodos_Atrophy )
call DisableTrigger( gg_trg_Kodos_Final_Death )
call DisableTrigger( gg_trg_Kodos_AI )
call DisableTrigger( gg_trg_Raider_Zeppelin )
call DisableTrigger( gg_trg_Raider_Finish )
call DisableTrigger( gg_trg_Raider_Expire )
call DisableTrigger( gg_trg_Raider_Death )
call DisableTrigger( gg_trg_Raider_Zeppelin_Death )
call DisableTrigger( gg_trg_Treant_Spawn )
call DisableTrigger( gg_trg_Treant_Patrol )
call DisableTrigger( gg_trg_Treant_Death )
call DisableTrigger( gg_trg_Treant_AI )
call DisableTrigger( gg_trg_Skeleton_Spawn )
call DisableTrigger( gg_trg_Skeleton_Death )
call DisableTrigger( gg_trg_Skeleton_AI )
call DisableTrigger( gg_trg_Skeleton_Spawn )
call DisableTrigger( gg_trg_Skeleton_Death )
call DisableTrigger( gg_trg_Skeleton_AI )
call DisableTrigger( gg_trg_Jump_Command )
call DisableTrigger( gg_trg_Jump_Physics )
call DisableTrigger( gg_trg_Jump_Body )
call DisableTrigger( gg_trg_Jump_Death )
call DisableTrigger( gg_trg_Stop_Finish )
call DisableTrigger( gg_trg_Stop_Final_Death )
call DisableTrigger( gg_trg_Stop_AI )
call DisableTrigger( gg_trg_Push_Poison )
call DisableTrigger( gg_trg_Push_Death )
call DisableTrigger( gg_trg_Push_Finish )
call DisableTrigger( gg_trg_Push_Expire )
call DisableTrigger( gg_trg_Push_AI )
call DisableTrigger( gg_trg_Spike_Move )
call DisableTrigger( gg_trg_Spike_Death )
call DisableTrigger( gg_trg_Spike_AI )
call DisableTrigger( gg_trg_Salamander_Fire )
call DisableTrigger( gg_trg_Salamander_Burn )
call DisableTrigger( gg_trg_Salamander_Death )
call DisableTrigger( gg_trg_Salamander_Expire )
call DisableTrigger( gg_trg_Salamander_AI )
call DisableTrigger( gg_trg_Obey_First_Command )
call DisableTrigger( gg_trg_Obey_Archimonde )
call DisableTrigger( gg_trg_Obey_Follow )
call DisableTrigger( gg_trg_Obey_Final_Death )
call DisableTrigger( gg_trg_Obey_AI )
call DisableTrigger( gg_trg_Smite_Kill )
call DisableTrigger( gg_trg_Smite_Finish )
call DisableTrigger( gg_trg_Smite_Spawn )
call DisableTrigger( gg_trg_Smite_Expire )
call DisableTrigger( gg_trg_Horse_Slow )
call DisableTrigger( gg_trg_Horse_Speed )
call DisableTrigger( gg_trg_Horse_Finish )
call DisableTrigger( gg_trg_Horse_Expire )
call DisableTrigger( gg_trg_Masquerade_Kill )
call DisableTrigger( gg_trg_Masquerade_Day )
call DisableTrigger( gg_trg_Masquerade_Night )
call DisableTrigger( gg_trg_Masquerade_Dissipate )
call DisableTrigger( gg_trg_Masquerade_Sunlight )
call DisableTrigger( gg_trg_Masquerade_Death )
call DisableTrigger( gg_trg_Masquerade_AI )
endfunction
//===========================================================================
function InitTrig_Disable takes nothing returns nothing
set gg_trg_Disable = CreateTrigger( )
call TriggerAddAction( gg_trg_Disable, function Trig_Disable_Actions )
endfunction
function Trig_P1_Quit_Conditions takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_LEFT ) ) then
return false
endif
return true
endfunction
function Trig_P1_Quit_Func005001 takes nothing returns boolean
return ( udg_Boolean_KeepQuitters == true )
endfunction
function Trig_P1_Quit_Func006002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_P1_Quit_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(Player(0)) + " has left the game." ) )
call LeaderboardRemovePlayerItemBJ( Player(0), GetLastCreatedLeaderboard() )
set udg_Integers_Scores[1] = 0
call DisableTrigger( GetTriggeringTrigger() )
if ( Trig_P1_Quit_Func005001() ) then
return
else
call DoNothing( )
endif
call ForGroup( GetUnitsOfPlayerAll(Player(0)), function Trig_P1_Quit_Func006002 )
endfunction
//===========================================================================
function InitTrig_P1_Quit takes nothing returns nothing
set gg_trg_P1_Quit = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_P1_Quit, 2 )
call TriggerAddCondition( gg_trg_P1_Quit, Condition( function Trig_P1_Quit_Conditions ) )
call TriggerAddAction( gg_trg_P1_Quit, function Trig_P1_Quit_Actions )
endfunction
function Trig_P2_Quit_Conditions takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_LEFT ) ) then
return false
endif
return true
endfunction
function Trig_P2_Quit_Func005001 takes nothing returns boolean
return ( udg_Boolean_KeepQuitters == true )
endfunction
function Trig_P2_Quit_Func006002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_P2_Quit_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(Player(1)) + " has left the game." ) )
call LeaderboardRemovePlayerItemBJ( Player(1), GetLastCreatedLeaderboard() )
set udg_Integers_Scores[2] = 0
call DisableTrigger( GetTriggeringTrigger() )
if ( Trig_P2_Quit_Func005001() ) then
return
else
call DoNothing( )
endif
call ForGroup( GetUnitsOfPlayerAll(Player(1)), function Trig_P2_Quit_Func006002 )
endfunction
//===========================================================================
function InitTrig_P2_Quit takes nothing returns nothing
set gg_trg_P2_Quit = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_P2_Quit, 2 )
call TriggerAddCondition( gg_trg_P2_Quit, Condition( function Trig_P2_Quit_Conditions ) )
call TriggerAddAction( gg_trg_P2_Quit, function Trig_P2_Quit_Actions )
endfunction
function Trig_P3_Quit_Conditions takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_LEFT ) ) then
return false
endif
return true
endfunction
function Trig_P3_Quit_Func005001 takes nothing returns boolean
return ( udg_Boolean_KeepQuitters == true )
endfunction
function Trig_P3_Quit_Func006002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_P3_Quit_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(Player(2)) + " has left the game." ) )
call LeaderboardRemovePlayerItemBJ( Player(2), GetLastCreatedLeaderboard() )
set udg_Integers_Scores[3] = 0
call DisableTrigger( GetTriggeringTrigger() )
if ( Trig_P3_Quit_Func005001() ) then
return
else
call DoNothing( )
endif
call ForGroup( GetUnitsOfPlayerAll(Player(2)), function Trig_P3_Quit_Func006002 )
endfunction
//===========================================================================
function InitTrig_P3_Quit takes nothing returns nothing
set gg_trg_P3_Quit = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_P3_Quit, 2 )
call TriggerAddCondition( gg_trg_P3_Quit, Condition( function Trig_P3_Quit_Conditions ) )
call TriggerAddAction( gg_trg_P3_Quit, function Trig_P3_Quit_Actions )
endfunction
function Trig_P4_Quit_Conditions takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_LEFT ) ) then
return false
endif
return true
endfunction
function Trig_P4_Quit_Func005001 takes nothing returns boolean
return ( udg_Boolean_KeepQuitters == true )
endfunction
function Trig_P4_Quit_Func006002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_P4_Quit_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(Player(3)) + " has left the game." ) )
call LeaderboardRemovePlayerItemBJ( Player(3), GetLastCreatedLeaderboard() )
set udg_Integers_Scores[4] = 0
call DisableTrigger( GetTriggeringTrigger() )
if ( Trig_P4_Quit_Func005001() ) then
return
else
call DoNothing( )
endif
call ForGroup( GetUnitsOfPlayerAll(Player(3)), function Trig_P4_Quit_Func006002 )
endfunction
//===========================================================================
function InitTrig_P4_Quit takes nothing returns nothing
set gg_trg_P4_Quit = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_P4_Quit, 2 )
call TriggerAddCondition( gg_trg_P4_Quit, Condition( function Trig_P4_Quit_Conditions ) )
call TriggerAddAction( gg_trg_P4_Quit, function Trig_P4_Quit_Actions )
endfunction
function Trig_P5_Quit_Conditions takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_LEFT ) ) then
return false
endif
return true
endfunction
function Trig_P5_Quit_Func005001 takes nothing returns boolean
return ( udg_Boolean_KeepQuitters == true )
endfunction
function Trig_P5_Quit_Func006002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_P5_Quit_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(Player(4)) + " has left the game." ) )
call LeaderboardRemovePlayerItemBJ( Player(4), GetLastCreatedLeaderboard() )
set udg_Integers_Scores[5] = 0
call DisableTrigger( GetTriggeringTrigger() )
if ( Trig_P5_Quit_Func005001() ) then
return
else
call DoNothing( )
endif
call ForGroup( GetUnitsOfPlayerAll(Player(4)), function Trig_P5_Quit_Func006002 )
endfunction
//===========================================================================
function InitTrig_P5_Quit takes nothing returns nothing
set gg_trg_P5_Quit = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_P5_Quit, 2 )
call TriggerAddCondition( gg_trg_P5_Quit, Condition( function Trig_P5_Quit_Conditions ) )
call TriggerAddAction( gg_trg_P5_Quit, function Trig_P5_Quit_Actions )
endfunction
function Trig_P6_Quit_Conditions takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_LEFT ) ) then
return false
endif
return true
endfunction
function Trig_P6_Quit_Func005001 takes nothing returns boolean
return ( udg_Boolean_KeepQuitters == true )
endfunction
function Trig_P6_Quit_Func006002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_P6_Quit_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(Player(5)) + " has left the game." ) )
call LeaderboardRemovePlayerItemBJ( Player(5), GetLastCreatedLeaderboard() )
set udg_Integers_Scores[6] = 0
call DisableTrigger( GetTriggeringTrigger() )
if ( Trig_P6_Quit_Func005001() ) then
return
else
call DoNothing( )
endif
call ForGroup( GetUnitsOfPlayerAll(Player(5)), function Trig_P6_Quit_Func006002 )
endfunction
//===========================================================================
function InitTrig_P6_Quit takes nothing returns nothing
set gg_trg_P6_Quit = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_P6_Quit, 2 )
call TriggerAddCondition( gg_trg_P6_Quit, Condition( function Trig_P6_Quit_Conditions ) )
call TriggerAddAction( gg_trg_P6_Quit, function Trig_P6_Quit_Actions )
endfunction
function Trig_P7_Quit_Conditions takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(6)) == PLAYER_SLOT_STATE_LEFT ) ) then
return false
endif
return true
endfunction
function Trig_P7_Quit_Func005001 takes nothing returns boolean
return ( udg_Boolean_KeepQuitters == true )
endfunction
function Trig_P7_Quit_Func006002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_P7_Quit_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(Player(6)) + " has left the game." ) )
call LeaderboardRemovePlayerItemBJ( Player(6), GetLastCreatedLeaderboard() )
set udg_Integers_Scores[7] = 0
call DisableTrigger( GetTriggeringTrigger() )
if ( Trig_P7_Quit_Func005001() ) then
return
else
call DoNothing( )
endif
call ForGroup( GetUnitsOfPlayerAll(Player(6)), function Trig_P7_Quit_Func006002 )
endfunction
//===========================================================================
function InitTrig_P7_Quit takes nothing returns nothing
set gg_trg_P7_Quit = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_P7_Quit, 2 )
call TriggerAddCondition( gg_trg_P7_Quit, Condition( function Trig_P7_Quit_Conditions ) )
call TriggerAddAction( gg_trg_P7_Quit, function Trig_P7_Quit_Actions )
endfunction
function Trig_P8_Quit_Conditions takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_LEFT ) ) then
return false
endif
return true
endfunction
function Trig_P8_Quit_Func005001 takes nothing returns boolean
return ( udg_Boolean_KeepQuitters == true )
endfunction
function Trig_P8_Quit_Func006002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_P8_Quit_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(Player(7)) + " has left the game." ) )
call LeaderboardRemovePlayerItemBJ( Player(7), GetLastCreatedLeaderboard() )
set udg_Integers_Scores[8] = 0
call DisableTrigger( GetTriggeringTrigger() )
if ( Trig_P8_Quit_Func005001() ) then
return
else
call DoNothing( )
endif
call ForGroup( GetUnitsOfPlayerAll(Player(7)), function Trig_P8_Quit_Func006002 )
endfunction
//===========================================================================
function InitTrig_P8_Quit takes nothing returns nothing
set gg_trg_P8_Quit = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_P8_Quit, 2 )
call TriggerAddCondition( gg_trg_P8_Quit, Condition( function Trig_P8_Quit_Conditions ) )
call TriggerAddAction( gg_trg_P8_Quit, function Trig_P8_Quit_Actions )
endfunction
function Trig_Dawn_Actions takes nothing returns nothing
call UseTimeOfDayBJ( false )
endfunction
//===========================================================================
function InitTrig_Dawn takes nothing returns nothing
set gg_trg_Dawn = CreateTrigger( )
call DisableTrigger( gg_trg_Dawn )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_Dawn, EQUAL, 7.00 )
call TriggerAddAction( gg_trg_Dawn, function Trig_Dawn_Actions )
endfunction
function Trig_Peon_Initialization_Func006003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Peon_Initialization_Func007002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Peon_Pandemonium), 0 )
endfunction
function Trig_Peon_Initialization_Func008002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Peon_Pandemonium )
endfunction
function Trig_Peon_Initialization_Func012003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Peon_Initialization_Actions takes nothing returns nothing
set udg_Regions_Current[1] = gg_rct_Peon_1
set udg_Regions_Current[2] = gg_rct_Peon_2
set udg_Regions_Current[3] = gg_rct_Peon_3
set udg_Regions_Current[4] = gg_rct_Peon_4
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Peon_Initialization_Func006003001() ) then
call CreateNUnitsAtLoc( 1, 'opeo', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Peon_Pandemonium), 300.00, GetRandomDirectionDeg()), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Peon_Initialization_Func007002 )
call ForForce( GetPlayersAll(), function Trig_Peon_Initialization_Func008002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_010" )
call EnableTrigger( gg_trg_Peon_Catapult_Fire )
call EnableTrigger( gg_trg_Peon_Death )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Peon_Initialization_Func012003001() ) then
call EnableTrigger( gg_trg_Peon_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 7.00 )
call EnableTrigger( gg_trg_Peon_Catapult_Spawn )
endfunction
//===========================================================================
function InitTrig_Peon_Initialization takes nothing returns nothing
set gg_trg_Peon_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Peon_Initialization, function Trig_Peon_Initialization_Actions )
endfunction
function Trig_Peon_Catapult_Spawn_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerAll(Player(11))) < 30 ) ) then
return false
endif
return true
endfunction
function Trig_Peon_Catapult_Spawn_Actions takes nothing returns nothing
call TriggerSleepAction( GetRandomReal(0, 2.00) )
call CreateNUnitsAtLocFacingLocBJ( 1, 'ocat', Player(11), GetRandomLocInRect(udg_Regions_Current[GetRandomInt(1, 4)]), GetRectCenter(gg_rct_Peon_Pandemonium) )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdx" )
call TriggerExecute( gg_trg_Peon_Catapult_Fire )
endfunction
//===========================================================================
function InitTrig_Peon_Catapult_Spawn takes nothing returns nothing
set gg_trg_Peon_Catapult_Spawn = CreateTrigger( )
call DisableTrigger( gg_trg_Peon_Catapult_Spawn )
call TriggerRegisterTimerEventPeriodic( gg_trg_Peon_Catapult_Spawn, 12.00 )
call TriggerAddCondition( gg_trg_Peon_Catapult_Spawn, Condition( function Trig_Peon_Catapult_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Peon_Catapult_Spawn, function Trig_Peon_Catapult_Spawn_Actions )
endfunction
function Trig_Peon_Catapult_Fire_Func001002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attackground", GetRandomLocInRect(gg_rct_Peon_Pandemonium) )
endfunction
function Trig_Peon_Catapult_Fire_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Peon_Catapult_Fire_Func001002 )
endfunction
//===========================================================================
function InitTrig_Peon_Catapult_Fire takes nothing returns nothing
set gg_trg_Peon_Catapult_Fire = CreateTrigger( )
call DisableTrigger( gg_trg_Peon_Catapult_Fire )
call TriggerRegisterTimerEventPeriodic( gg_trg_Peon_Catapult_Fire, 2.00 )
call TriggerAddAction( gg_trg_Peon_Catapult_Fire, function Trig_Peon_Catapult_Fire_Actions )
endfunction
function Trig_Peon_Death_Func007001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Peon_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Peon_Pandemonium, Condition(function Trig_Peon_Death_Func007001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Peon_Death_Func005001001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Peon_Death_Func005001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Peon_Pandemonium, Condition(function Trig_Peon_Death_Func005001001001002))) == 1 )
endfunction
function Trig_Peon_Death_Func005002001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Peon_Death_Func005002002 takes nothing returns nothing
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
endfunction
function Trig_Peon_Death_Func006001001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Peon_Death_Func006001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Peon_Pandemonium, Condition(function Trig_Peon_Death_Func006001001001002))) == 1 )
endfunction
function Trig_Peon_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Peon_Catapult_Spawn )
call DisableTrigger( gg_trg_Peon_Catapult_Fire )
call DisableTrigger( gg_trg_Peon_Death )
call DisableTrigger( gg_trg_Peon_AI )
if ( Trig_Peon_Death_Func005001() ) then
call ForGroup( GetUnitsInRectMatching(gg_rct_Peon_Pandemonium, Condition(function Trig_Peon_Death_Func005002001002)), function Trig_Peon_Death_Func005002002 )
else
call DoNothing( )
endif
if ( Trig_Peon_Death_Func006001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Peon_Death takes nothing returns nothing
set gg_trg_Peon_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Peon_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Peon_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Peon_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Peon_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Peon_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Peon_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Peon_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Peon_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Peon_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Peon_Death, Condition( function Trig_Peon_Death_Conditions ) )
call TriggerAddAction( gg_trg_Peon_Death, function Trig_Peon_Death_Actions )
endfunction
function Trig_Peon_AI_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Peon_AI_Func001003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", GetRandomLocInRect(gg_rct_Peon_Pandemonium) )
endfunction
function Trig_Peon_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Peon_AI_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Peon_AI_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Peon_AI takes nothing returns nothing
set gg_trg_Peon_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Peon_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Peon_AI, 4.00 )
call TriggerAddAction( gg_trg_Peon_AI, function Trig_Peon_AI_Actions )
endfunction
function Trig_Rat_Initialization_Func002003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Rat_Initialization_Func003002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Rat_Maze), 0 )
endfunction
function Trig_Rat_Initialization_Func004003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Rat_Initialization_Func005002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Rat_Maze )
endfunction
function Trig_Rat_Initialization_Func006002 takes nothing returns nothing
call UnitAddIndicatorBJ( GetEnumUnit(), 100, 100, 100, 0 )
endfunction
function Trig_Rat_Initialization_Func018003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Rat_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Rat_Initialization_Func002003001() ) then
call CreateNUnitsAtLoc( 1, 'nrat', ConvertedPlayer(GetForLoopIndexA()), OffsetLocation(GetPlayerStartLocationLoc(ConvertedPlayer(GetForLoopIndexA())), 0, 48.00), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Rat_Initialization_Func003002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Rat_Initialization_Func004003001() ) then
call PanCameraToTimedLocForPlayer( ConvertedPlayer(GetForLoopIndexA()), GetPlayerStartLocationLoc(ConvertedPlayer(GetForLoopIndexA())), 0.00 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Rat_Initialization_Func005002 )
call ForGroup( GetUnitsOfTypeIdAll('nrat'), function Trig_Rat_Initialization_Func006002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_021" )
call CreateItemLoc( 'ches', GetRectCenter(gg_rct_Rat_Center) )
call CreateNUnitsAtLoc( 1, 'nspr', Player(11), GetRectCenter(gg_rct_Rat_Center), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nspr', Player(11), OffsetLocation(GetRectCenter(gg_rct_Rat_Center), 128.00, 0), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nspr', Player(11), OffsetLocation(GetRectCenter(gg_rct_Rat_Center), 0.00, 128.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nspr', Player(11), OffsetLocation(GetRectCenter(gg_rct_Rat_Center), -128.00, 0), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nspr', Player(11), OffsetLocation(GetRectCenter(gg_rct_Rat_Center), 0.00, -128.00), bj_UNIT_FACING )
call EnableTrigger( gg_trg_Rat_Finish )
call EnableTrigger( gg_trg_Rat_Death )
call TriggerSleepAction( 4.00 )
call EnableTrigger( gg_trg_Rat_Spider_Patrol )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Rat_Initialization_Func018003001() ) then
call EnableTrigger( gg_trg_Rat_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerExecute( gg_trg_Rat_Spider_Patrol )
endfunction
//===========================================================================
function InitTrig_Rat_Initialization takes nothing returns nothing
set gg_trg_Rat_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Rat_Initialization, function Trig_Rat_Initialization_Actions )
endfunction
function Trig_Rat_Spider_Patrol_Func001002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetRandomLocInRect(gg_rct_Rat_Maze) )
endfunction
function Trig_Rat_Spider_Patrol_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Rat_Spider_Patrol_Func001002 )
endfunction
//===========================================================================
function InitTrig_Rat_Spider_Patrol takes nothing returns nothing
set gg_trg_Rat_Spider_Patrol = CreateTrigger( )
call DisableTrigger( gg_trg_Rat_Spider_Patrol )
call TriggerRegisterTimerEventPeriodic( gg_trg_Rat_Spider_Patrol, 10.00 )
call TriggerAddAction( gg_trg_Rat_Spider_Patrol, function Trig_Rat_Spider_Patrol_Actions )
endfunction
function Trig_Rat_Finish_Conditions takes nothing returns boolean
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) <= 8 ) ) then
return false
endif
return true
endfunction
function Trig_Rat_Finish_Actions takes nothing returns nothing
set udg_Player_Winner = GetOwningPlayer(GetEnteringUnit())
call RemoveItem( GetLastCreatedItem() )
call DisableTrigger( gg_trg_Rat_Spider_Patrol )
call DisableTrigger( gg_trg_Rat_Finish )
call DisableTrigger( gg_trg_Rat_Death )
call DisableTrigger( gg_trg_Rat_AI )
call TriggerExecute( gg_trg_Win )
endfunction
//===========================================================================
function InitTrig_Rat_Finish takes nothing returns nothing
set gg_trg_Rat_Finish = CreateTrigger( )
call DisableTrigger( gg_trg_Rat_Finish )
call TriggerRegisterEnterRectSimple( gg_trg_Rat_Finish, gg_rct_Rat_Center )
call TriggerAddCondition( gg_trg_Rat_Finish, Condition( function Trig_Rat_Finish_Conditions ) )
call TriggerAddAction( gg_trg_Rat_Finish, function Trig_Rat_Finish_Actions )
endfunction
function Trig_Rat_Death_Func001001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Rat_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Rat_Maze, Condition(function Trig_Rat_Death_Func001001001002))) <= 5 ) ) then
return false
endif
return true
endfunction
function Trig_Rat_Death_Actions takes nothing returns nothing
call RemoveItem( GetLastCreatedItem() )
call DisableTrigger( gg_trg_Rat_Spider_Patrol )
call DisableTrigger( gg_trg_Rat_Finish )
call DisableTrigger( gg_trg_Rat_Death )
call DisableTrigger( gg_trg_Rat_AI )
call TriggerExecute( gg_trg_Draw )
endfunction
//===========================================================================
function InitTrig_Rat_Death takes nothing returns nothing
set gg_trg_Rat_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Rat_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Rat_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Rat_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Rat_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Rat_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Rat_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Rat_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Rat_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Rat_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Rat_Death, Condition( function Trig_Rat_Death_Conditions ) )
call TriggerAddAction( gg_trg_Rat_Death, function Trig_Rat_Death_Actions )
endfunction
function Trig_Rat_AI_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Rat_AI_Func001003002002001001001003 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(11) )
endfunction
function Trig_Rat_AI_Func001003002002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(600.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Rat_AI_Func001003002002001001001003))) == 0 )
endfunction
function Trig_Rat_AI_Func001003002002 takes nothing returns nothing
if ( Trig_Rat_AI_Func001003002002001() ) then
call IssuePointOrderLocBJ( GetEnumUnit(), "move", GetRectCenter(gg_rct_Rat_Center) )
else
call IssuePointOrderLocBJ( GetEnumUnit(), "move", GetPlayerStartLocationLoc(ConvertedPlayer(GetForLoopIndexA())) )
endif
endfunction
function Trig_Rat_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Rat_AI_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Rat_AI_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Rat_AI takes nothing returns nothing
set gg_trg_Rat_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Rat_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Rat_AI, 2.00 )
call TriggerAddAction( gg_trg_Rat_AI, function Trig_Rat_AI_Actions )
endfunction
function Trig_Kaboom_Initialization_Func003003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kaboom_Initialization_Func004002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Kaboom_Room), 0 )
endfunction
function Trig_Kaboom_Initialization_Func005002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Kaboom_Initialization_Func006002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Kaboom_Room )
endfunction
function Trig_Kaboom_Initialization_Func014003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Kaboom_Initialization_Actions takes nothing returns nothing
call PlaySoundBJ( gg_snd_LordaeronSummerBrazierLoop1 )
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Kaboom_Initialization_Func003003001() ) then
call CreateNUnitsAtLoc( 1, 'ngsp', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Kaboom_Room), 600.00, GetRandomDirectionDeg()), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Kaboom_Initialization_Func004002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Kaboom_Room), function Trig_Kaboom_Initialization_Func005002 )
call ForForce( GetPlayersAll(), function Trig_Kaboom_Initialization_Func006002 )
call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_Kaboom_Room), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
set udg_SpecialEffect_Special = GetLastCreatedEffectBJ()
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_036" )
call EnableTrigger( gg_trg_Kaboom_Reset_Base )
call EnableTrigger( gg_trg_Kaboom_Death )
call EnableTrigger( gg_trg_Kaboom_Center_Flame )
call EnableTrigger( gg_trg_Kaboom_Final_Death )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Kaboom_Initialization_Func014003001() ) then
call EnableTrigger( gg_trg_Kaboom_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 5.00 )
call EnableTrigger( gg_trg_Kaboom_Wisp_Spawn )
endfunction
//===========================================================================
function InitTrig_Kaboom_Initialization takes nothing returns nothing
set gg_trg_Kaboom_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Kaboom_Initialization, function Trig_Kaboom_Initialization_Actions )
endfunction
function Trig_Kaboom_Wisp_Spawn_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerAll(Player(11))) < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Kaboom_Wisp_Spawn_Actions takes nothing returns nothing
call TriggerSleepAction( GetRandomReal(0, 2.00) )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), GetRectCenter(gg_rct_Kaboom_Room), bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_YELLOW )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", PolarProjectionBJ(GetRectCenter(gg_rct_Kaboom_Room), 900.00, GetRandomDirectionDeg()) )
endfunction
//===========================================================================
function InitTrig_Kaboom_Wisp_Spawn takes nothing returns nothing
set gg_trg_Kaboom_Wisp_Spawn = CreateTrigger( )
call DisableTrigger( gg_trg_Kaboom_Wisp_Spawn )
call TriggerRegisterTimerEventPeriodic( gg_trg_Kaboom_Wisp_Spawn, 10.00 )
call TriggerAddCondition( gg_trg_Kaboom_Wisp_Spawn, Condition( function Trig_Kaboom_Wisp_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Kaboom_Wisp_Spawn, function Trig_Kaboom_Wisp_Spawn_Actions )
endfunction
function Trig_Kaboom_Reset_Base_Func001002001 takes nothing returns boolean
return ( DistanceBetweenPoints(GetRectCenter(gg_rct_Kaboom_Room), GetUnitLoc(GetEnumUnit())) >= 800.00 )
endfunction
function Trig_Kaboom_Reset_Base_Func001002 takes nothing returns nothing
if ( Trig_Kaboom_Reset_Base_Func001002001() ) then
call TriggerExecute( gg_trg_Kaboom_Reset )
else
call DoNothing( )
endif
endfunction
function Trig_Kaboom_Reset_Base_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('ewsp'), function Trig_Kaboom_Reset_Base_Func001002 )
endfunction
//===========================================================================
function InitTrig_Kaboom_Reset_Base takes nothing returns nothing
set gg_trg_Kaboom_Reset_Base = CreateTrigger( )
call DisableTrigger( gg_trg_Kaboom_Reset_Base )
call TriggerRegisterTimerEventPeriodic( gg_trg_Kaboom_Reset_Base, 0.05 )
call TriggerAddAction( gg_trg_Kaboom_Reset_Base, function Trig_Kaboom_Reset_Base_Actions )
endfunction
function Trig_Kaboom_Death_Func002001003 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) != Player(11) )
endfunction
function Trig_Kaboom_Death_Func002002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Kaboom_Death_Func002002 takes nothing returns nothing
if ( Trig_Kaboom_Death_Func002002001() ) then
call KillUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Kaboom_Death_Actions takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "origin", GetDyingUnit(), "Abilities\\Weapons\\Mortar\\ScatterShotTarget.mdx" )
call ForGroup( GetUnitsInRangeOfLocMatching(200.00, GetUnitLoc(GetDyingUnit()), Condition(function Trig_Kaboom_Death_Func002001003)), function Trig_Kaboom_Death_Func002002 )
endfunction
//===========================================================================
function InitTrig_Kaboom_Death takes nothing returns nothing
set gg_trg_Kaboom_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Kaboom_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Kaboom_Death, function Trig_Kaboom_Death_Actions )
endfunction
function Trig_Kaboom_Center_Flame_Func001001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'ngsp' )
endfunction
function Trig_Kaboom_Center_Flame_Func001002 takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 10.00 ) )
endfunction
function Trig_Kaboom_Center_Flame_Actions takes nothing returns nothing
call ForGroup( GetUnitsInRangeOfLocMatching(128.00, GetRectCenter(gg_rct_Kaboom_Room), Condition(function Trig_Kaboom_Center_Flame_Func001001003)), function Trig_Kaboom_Center_Flame_Func001002 )
endfunction
//===========================================================================
function InitTrig_Kaboom_Center_Flame takes nothing returns nothing
set gg_trg_Kaboom_Center_Flame = CreateTrigger( )
call DisableTrigger( gg_trg_Kaboom_Center_Flame )
call TriggerRegisterTimerEventPeriodic( gg_trg_Kaboom_Center_Flame, 1.00 )
call TriggerAddAction( gg_trg_Kaboom_Center_Flame, function Trig_Kaboom_Center_Flame_Actions )
endfunction
function Trig_Kaboom_Final_Death_Func011001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'ngsp' )
endfunction
function Trig_Kaboom_Final_Death_Func011001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Kaboom_Final_Death_Func011001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Kaboom_Final_Death_Func011001001002001(), Trig_Kaboom_Final_Death_Func011001001002002() )
endfunction
function Trig_Kaboom_Final_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Kaboom_Final_Death_Func011001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Kaboom_Final_Death_Func009001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'ewsp' )
endfunction
function Trig_Kaboom_Final_Death_Func009002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Kaboom_Final_Death_Func009002 takes nothing returns nothing
if ( Trig_Kaboom_Final_Death_Func009002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Kaboom_Final_Death_Func010001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'ewsp' )
endfunction
function Trig_Kaboom_Final_Death_Func010001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Kaboom_Final_Death_Func010001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Kaboom_Final_Death_Func010001001001002001(), Trig_Kaboom_Final_Death_Func010001001001002002() )
endfunction
function Trig_Kaboom_Final_Death_Func010001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Kaboom_Room, Condition(function Trig_Kaboom_Final_Death_Func010001001001002))) == 1 )
endfunction
function Trig_Kaboom_Final_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Kaboom_Wisp_Spawn )
call DisableTrigger( gg_trg_Kaboom_Reset_Base )
call DisableTrigger( gg_trg_Kaboom_Death )
call DisableTrigger( gg_trg_Kaboom_Center_Flame )
call DisableTrigger( gg_trg_Kaboom_Final_Death )
call DisableTrigger( gg_trg_Kaboom_AI )
call StopSoundBJ( gg_snd_LordaeronSummerBrazierLoop1, true )
call DestroyEffectBJ( udg_SpecialEffect_Special )
call ForGroup( GetUnitsInRectMatching(gg_rct_Kaboom_Room, Condition(function Trig_Kaboom_Final_Death_Func009001002)), function Trig_Kaboom_Final_Death_Func009002 )
if ( Trig_Kaboom_Final_Death_Func010001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Kaboom_Final_Death takes nothing returns nothing
set gg_trg_Kaboom_Final_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Kaboom_Final_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Final_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Final_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Final_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Final_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Final_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Final_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Final_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kaboom_Final_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Kaboom_Final_Death, Condition( function Trig_Kaboom_Final_Death_Conditions ) )
call TriggerAddAction( gg_trg_Kaboom_Final_Death, function Trig_Kaboom_Final_Death_Actions )
endfunction
function Trig_Kaboom_AI_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Kaboom_AI_Func001003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), GetRandomReal(200.00, 500.00), ( AngleBetweenPoints(GetRectCenter(gg_rct_Kaboom_Room), GetUnitLoc(GetEnumUnit())) + GetRandomReal(-120.00, 120.00) )) )
endfunction
function Trig_Kaboom_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Kaboom_AI_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Kaboom_AI_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Kaboom_AI takes nothing returns nothing
set gg_trg_Kaboom_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Kaboom_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Kaboom_AI, 2.00 )
call TriggerAddAction( gg_trg_Kaboom_AI, function Trig_Kaboom_AI_Actions )
endfunction
function Trig_Kaboom_Reset_Actions takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), GetRectCenter(gg_rct_Kaboom_Room) )
call IssuePointOrderLocBJ( GetEnumUnit(), "move", PolarProjectionBJ(GetRectCenter(gg_rct_Kaboom_Room), 900.00, GetRandomDirectionDeg()) )
endfunction
//===========================================================================
function InitTrig_Kaboom_Reset takes nothing returns nothing
set gg_trg_Kaboom_Reset = CreateTrigger( )
call TriggerAddAction( gg_trg_Kaboom_Reset, function Trig_Kaboom_Reset_Actions )
endfunction
function Trig_Mortar_Initialization_Func011003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Mortar_Initialization_Func014002 takes nothing returns nothing
call SetUnitAcquireRangeBJ( GetEnumUnit(), 100.00 )
endfunction
function Trig_Mortar_Initialization_Func015002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Hot_Potato), 0 )
endfunction
function Trig_Mortar_Initialization_Func017002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Hot_Potato )
endfunction
function Trig_Mortar_Initialization_Actions takes nothing returns nothing
set udg_Boolean_KeepQuitters = true
set udg_Regions_Current[1] = gg_rct_Mortar_1
set udg_Regions_Current[2] = gg_rct_Mortar_2
set udg_Regions_Current[3] = gg_rct_Mortar_3
set udg_Regions_Current[4] = gg_rct_Mortar_4
set udg_Regions_Current[5] = gg_rct_Mortar_5
set udg_Regions_Current[6] = gg_rct_Mortar_6
set udg_Regions_Current[7] = gg_rct_Mortar_7
set udg_Regions_Current[8] = gg_rct_Mortar_8
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Mortar_Initialization_Func011003001() ) then
call CreateNUnitsAtLoc( 1, 'hmtm', ConvertedPlayer(GetForLoopIndexA()), GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call PauseAllUnitsBJ( true )
call CreateNUnitsAtLoc( 1, 'hctw', Player(11), GetRectCenter(gg_rct_Hot_Potato), bj_UNIT_FACING )
call ForGroup( GetUnitsInRectAll(GetEntireMapRect()), function Trig_Mortar_Initialization_Func014002 )
call ForForce( GetPlayersAll(), function Trig_Mortar_Initialization_Func015002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer( ConvertedPlayer(GetForLoopIndexA()), GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), 0 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Mortar_Initialization_Func017002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_038" )
call EnableTrigger( gg_trg_Mortar_Start )
call EnableTrigger( gg_trg_Mortar_Attack )
call EnableTrigger( gg_trg_Mortar_Attack_2 )
call EnableTrigger( gg_trg_Mortar_Attack_3 )
call EnableTrigger( gg_trg_Mortar_Attack_4 )
call EnableTrigger( gg_trg_Mortar_Attack_Ground )
call EnableTrigger( gg_trg_Mortar_Final_Death )
call EnableTrigger( gg_trg_Mortar_AI )
call TriggerExecute( gg_trg_Mortar_Start )
endfunction
//===========================================================================
function InitTrig_Mortar_Initialization takes nothing returns nothing
set gg_trg_Mortar_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Mortar_Initialization, function Trig_Mortar_Initialization_Actions )
endfunction
function Trig_Mortar_Start_Func011002 takes nothing returns nothing
call SetUnitInvulnerable( GetEnumUnit(), true )
endfunction
function Trig_Mortar_Start_Func016002003001002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) != Player(11) )
endfunction
function Trig_Mortar_Start_Func016002 takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "attack", GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Hot_Potato, Condition(function Trig_Mortar_Start_Func016002003001002))) )
endfunction
function Trig_Mortar_Start_Actions takes nothing returns nothing
call SetUserControlForceOn( GetPlayersAll() )
call DestroyEffectBJ( udg_SpecialEffect_Special )
call ForGroup( GetUnitsInRectAll(GetEntireMapRect()), function Trig_Mortar_Start_Func011002 )
call PauseAllUnitsBJ( true )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stop" )
call PauseUnitBJ( false, GetLastCreatedUnit() )
call TriggerSleepAction( 4.00 )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Mortar_Start_Func016002 )
call TriggerExecute( gg_trg_Mortar_Detonate )
endfunction
//===========================================================================
function InitTrig_Mortar_Start takes nothing returns nothing
set gg_trg_Mortar_Start = CreateTrigger( )
call DisableTrigger( gg_trg_Mortar_Start )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Start, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Start, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Start, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Start, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Start, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Start, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Start, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Start, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Mortar_Start, function Trig_Mortar_Start_Actions )
endfunction
function Trig_Mortar_Attack_Func001001 takes nothing returns boolean
return ( IsTriggerEnabled(gg_trg_Mortar_AI) == false )
endfunction
function Trig_Mortar_Attack_Func006001 takes nothing returns boolean
return ( IsUnitDeadBJ(GetAttacker()) == true )
endfunction
function Trig_Mortar_Attack_Actions takes nothing returns nothing
if ( Trig_Mortar_Attack_Func001001() ) then
call TriggerExecute( gg_trg_Mortar_Detonate )
else
call DoNothing( )
endif
call SetUserControlForceOff( GetForceOfPlayer(GetOwningPlayer(GetAttacker())) )
call DisableTrigger( gg_trg_Mortar_AI )
call TriggerSleepAction( ( ( DistanceBetweenPoints(GetUnitLoc(GetAttacker()), GetUnitLoc(GetAttackedUnitBJ())) / 900.00 ) + 1.00 ) )
call EnableTrigger( gg_trg_Mortar_AI )
if ( Trig_Mortar_Attack_Func006001() ) then
return
else
call DoNothing( )
endif
set udg_Boolean_MortarInTransit = false
call AddSpecialEffectTargetUnitBJ( "origin", GetAttackedUnitBJ(), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
set udg_SpecialEffect_Special = GetLastCreatedEffectBJ()
call PauseUnitBJ( false, GetAttackedUnitBJ() )
call IssueImmediateOrderBJ( GetAttackedUnitBJ(), "stop" )
endfunction
//===========================================================================
function InitTrig_Mortar_Attack takes nothing returns nothing
set gg_trg_Mortar_Attack = CreateTrigger( )
call DisableTrigger( gg_trg_Mortar_Attack )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack, Player(0), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack, Player(1), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack, Player(2), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack, Player(3), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack, Player(4), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack, Player(5), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack, Player(6), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack, Player(7), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_Mortar_Attack, function Trig_Mortar_Attack_Actions )
endfunction
function Trig_Mortar_Attack_2_Func003001 takes nothing returns boolean
return ( IsUnitDeadBJ(GetAttacker()) == true )
endfunction
function Trig_Mortar_Attack_2_Actions takes nothing returns nothing
call TriggerSleepAction( 1.05 )
call SetUserControlForceOn( GetForceOfPlayer(GetOwningPlayer(GetAttacker())) )
if ( Trig_Mortar_Attack_2_Func003001() ) then
return
else
call DoNothing( )
endif
call IssueImmediateOrderBJ( GetAttacker(), "stop" )
call PauseUnitBJ( true, GetAttacker() )
endfunction
//===========================================================================
function InitTrig_Mortar_Attack_2 takes nothing returns nothing
set gg_trg_Mortar_Attack_2 = CreateTrigger( )
call DisableTrigger( gg_trg_Mortar_Attack_2 )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_2, Player(0), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_2, Player(1), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_2, Player(2), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_2, Player(3), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_2, Player(4), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_2, Player(5), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_2, Player(6), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_2, Player(7), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_Mortar_Attack_2, function Trig_Mortar_Attack_2_Actions )
endfunction
function Trig_Mortar_Attack_3_Func002001 takes nothing returns boolean
return ( IsUnitDeadBJ(GetAttacker()) == true )
endfunction
function Trig_Mortar_Attack_3_Actions takes nothing returns nothing
call TriggerSleepAction( ( ( DistanceBetweenPoints(GetUnitLoc(GetAttacker()), GetUnitLoc(GetAttackedUnitBJ())) / 900.00 ) + 0.85 ) )
if ( Trig_Mortar_Attack_3_Func002001() ) then
return
else
call DoNothing( )
endif
set udg_Boolean_MortarInTransit = false
endfunction
//===========================================================================
function InitTrig_Mortar_Attack_3 takes nothing returns nothing
set gg_trg_Mortar_Attack_3 = CreateTrigger( )
call DisableTrigger( gg_trg_Mortar_Attack_3 )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_3, Player(0), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_3, Player(1), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_3, Player(2), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_3, Player(3), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_3, Player(4), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_3, Player(5), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_3, Player(6), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_3, Player(7), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_Mortar_Attack_3, function Trig_Mortar_Attack_3_Actions )
endfunction
function Trig_Mortar_Attack_4_Func004001 takes nothing returns boolean
return ( IsUnitDeadBJ(GetAttacker()) == true )
endfunction
function Trig_Mortar_Attack_4_Actions takes nothing returns nothing
call TriggerSleepAction( 0.70 )
call DestroyEffectBJ( udg_SpecialEffect_Special )
set udg_Boolean_MortarInTransit = true
if ( Trig_Mortar_Attack_4_Func004001() ) then
set udg_Boolean_MortarInTransit = false
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Mortar_Attack_4 takes nothing returns nothing
set gg_trg_Mortar_Attack_4 = CreateTrigger( )
call DisableTrigger( gg_trg_Mortar_Attack_4 )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_4, Player(0), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_4, Player(1), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_4, Player(2), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_4, Player(3), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_4, Player(4), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_4, Player(5), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_4, Player(6), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_4, Player(7), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_Mortar_Attack_4, function Trig_Mortar_Attack_4_Actions )
endfunction
function Trig_Mortar_Attack_Ground_Actions takes nothing returns nothing
call TriggerSleepAction( 0.00 )
call IssueImmediateOrderBJ( GetOrderedUnit(), "stop" )
endfunction
//===========================================================================
function InitTrig_Mortar_Attack_Ground takes nothing returns nothing
set gg_trg_Mortar_Attack_Ground = CreateTrigger( )
call DisableTrigger( gg_trg_Mortar_Attack_Ground )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_Ground, Player(0), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_Ground, Player(1), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_Ground, Player(2), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_Ground, Player(3), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_Ground, Player(4), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_Ground, Player(5), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_Ground, Player(6), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Attack_Ground, Player(7), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddAction( gg_trg_Mortar_Attack_Ground, function Trig_Mortar_Attack_Ground_Actions )
endfunction
function Trig_Mortar_Final_Death_Func013001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hmtm' )
endfunction
function Trig_Mortar_Final_Death_Func013001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Mortar_Final_Death_Func013001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Mortar_Final_Death_Func013001001002001(), Trig_Mortar_Final_Death_Func013001001002002() )
endfunction
function Trig_Mortar_Final_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Mortar_Final_Death_Func013001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Mortar_Final_Death_Func001002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Mortar_Final_Death_Func010001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hmtm' )
endfunction
function Trig_Mortar_Final_Death_Func010002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Mortar_Final_Death_Func010002 takes nothing returns nothing
if ( Trig_Mortar_Final_Death_Func010002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Mortar_Final_Death_Func011001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hmtm' )
endfunction
function Trig_Mortar_Final_Death_Func011001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Mortar_Final_Death_Func011001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Mortar_Final_Death_Func011001001001002001(), Trig_Mortar_Final_Death_Func011001001001002002() )
endfunction
function Trig_Mortar_Final_Death_Func011001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Hot_Potato, Condition(function Trig_Mortar_Final_Death_Func011001001001002))) == 1 )
endfunction
function Trig_Mortar_Final_Death_Func012003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_LEFT )
endfunction
function Trig_Mortar_Final_Death_Actions takes nothing returns nothing
call ForGroup( GetUnitsInRectAll(GetEntireMapRect()), function Trig_Mortar_Final_Death_Func001002 )
call DisableTrigger( gg_trg_Mortar_Start )
call DisableTrigger( gg_trg_Mortar_Attack )
call DisableTrigger( gg_trg_Mortar_Attack_2 )
call DisableTrigger( gg_trg_Mortar_Attack_3 )
call DisableTrigger( gg_trg_Mortar_Attack_4 )
call DisableTrigger( gg_trg_Mortar_Attack_Ground )
call DisableTrigger( gg_trg_Mortar_Final_Death )
call DisableTrigger( gg_trg_Mortar_AI )
call ForGroup( GetUnitsInRectMatching(gg_rct_Hot_Potato, Condition(function Trig_Mortar_Final_Death_Func010001002)), function Trig_Mortar_Final_Death_Func010002 )
if ( Trig_Mortar_Final_Death_Func011001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Mortar_Final_Death_Func012003001() ) then
set udg_Integers_Scores[GetForLoopIndexA()] = 0
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Mortar_Final_Death takes nothing returns nothing
set gg_trg_Mortar_Final_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Mortar_Final_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Final_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Final_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Final_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Final_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Final_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Final_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Final_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Mortar_Final_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Mortar_Final_Death, Condition( function Trig_Mortar_Final_Death_Conditions ) )
call TriggerAddAction( gg_trg_Mortar_Final_Death, function Trig_Mortar_Final_Death_Actions )
endfunction
function Trig_Mortar_AI_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Mortar_AI_Func001003002002 takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "attack", GroupPickRandomUnit(GetUnitsOfTypeIdAll('hmtm')) )
endfunction
function Trig_Mortar_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Mortar_AI_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Mortar_AI_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Mortar_AI takes nothing returns nothing
set gg_trg_Mortar_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Mortar_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Mortar_AI, 1.50 )
call TriggerAddAction( gg_trg_Mortar_AI, function Trig_Mortar_AI_Actions )
endfunction
function Trig_Mortar_Detonate_Func001001 takes nothing returns boolean
return ( IsTriggerEnabled(gg_trg_Mortar_AI) == true )
endfunction
function Trig_Mortar_Detonate_Func002001 takes nothing returns boolean
return ( IsTriggerEnabled(gg_trg_Mortar_Start) == false )
endfunction
function Trig_Mortar_Detonate_Func005001002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) != Player(11) )
endfunction
function Trig_Mortar_Detonate_Func005002 takes nothing returns nothing
call SetUnitInvulnerable( GetEnumUnit(), false )
endfunction
function Trig_Mortar_Detonate_Func006001 takes nothing returns boolean
return ( udg_Boolean_MortarInTransit == false )
endfunction
function Trig_Mortar_Detonate_Func006002001002 takes nothing returns boolean
return ( IsUnitPausedBJ(GetFilterUnit()) == false )
endfunction
function Trig_Mortar_Detonate_Func006002002001 takes nothing returns boolean
return ( IsUnitType(GetEnumUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Mortar_Detonate_Func006002002 takes nothing returns nothing
if ( Trig_Mortar_Detonate_Func006002002001() ) then
call AddSpecialEffectLocBJ( GetUnitLoc(GetEnumUnit()), "Abilities\\Weapons\\Mortar\\ScatterShotTarget.mdx" )
else
call DoNothing( )
endif
endfunction
function Trig_Mortar_Detonate_Func007001 takes nothing returns boolean
return ( udg_Boolean_MortarInTransit == false )
endfunction
function Trig_Mortar_Detonate_Func007002001002 takes nothing returns boolean
return ( IsUnitPausedBJ(GetFilterUnit()) == false )
endfunction
function Trig_Mortar_Detonate_Func007002002001 takes nothing returns boolean
return ( IsUnitType(GetEnumUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Mortar_Detonate_Func007002002 takes nothing returns nothing
if ( Trig_Mortar_Detonate_Func007002002001() ) then
call ExplodeUnitBJ( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Mortar_Detonate_Actions takes nothing returns nothing
if ( Trig_Mortar_Detonate_Func001001() ) then
call TriggerSleepAction( GetRandomReal(5.00, 25.00) )
else
call EnableTrigger( gg_trg_Mortar_AI )
endif
if ( Trig_Mortar_Detonate_Func002001() ) then
return
else
call DoNothing( )
endif
call PlaySoundBJ( gg_snd_MortarTeamReady1 )
call SetUserControlForceOn( GetPlayersAll() )
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Mortar_Detonate_Func005001002)), function Trig_Mortar_Detonate_Func005002 )
if ( Trig_Mortar_Detonate_Func006001() ) then
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Mortar_Detonate_Func006002001002)), function Trig_Mortar_Detonate_Func006002002 )
else
call DoNothing( )
endif
if ( Trig_Mortar_Detonate_Func007001() ) then
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Mortar_Detonate_Func007002001002)), function Trig_Mortar_Detonate_Func007002002 )
else
call DoNothing( )
endif
call TriggerExecute( gg_trg_Mortar_Detonate_2 )
endfunction
//===========================================================================
function InitTrig_Mortar_Detonate takes nothing returns nothing
set gg_trg_Mortar_Detonate = CreateTrigger( )
call TriggerAddAction( gg_trg_Mortar_Detonate, function Trig_Mortar_Detonate_Actions )
endfunction
function Trig_Mortar_Detonate_2_Func002001 takes nothing returns boolean
return ( udg_Boolean_MortarInTransit == false )
endfunction
function Trig_Mortar_Detonate_2_Func002002001002 takes nothing returns boolean
return ( IsUnitPausedBJ(GetFilterUnit()) == false )
endfunction
function Trig_Mortar_Detonate_2_Func002002002001 takes nothing returns boolean
return ( IsUnitType(GetEnumUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Mortar_Detonate_2_Func002002002 takes nothing returns nothing
if ( Trig_Mortar_Detonate_2_Func002002002001() ) then
call AddSpecialEffectLocBJ( GetUnitLoc(GetEnumUnit()), "Abilities\\Weapons\\Mortar\\ScatterShotTarget.mdx" )
else
call DoNothing( )
endif
endfunction
function Trig_Mortar_Detonate_2_Func003001 takes nothing returns boolean
return ( udg_Boolean_MortarInTransit == false )
endfunction
function Trig_Mortar_Detonate_2_Func003002001002 takes nothing returns boolean
return ( IsUnitPausedBJ(GetFilterUnit()) == false )
endfunction
function Trig_Mortar_Detonate_2_Func003002002001 takes nothing returns boolean
return ( IsUnitType(GetEnumUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Mortar_Detonate_2_Func003002002 takes nothing returns nothing
if ( Trig_Mortar_Detonate_2_Func003002002001() ) then
call ExplodeUnitBJ( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Mortar_Detonate_2_Actions takes nothing returns nothing
call TriggerSleepAction( 0.20 )
if ( Trig_Mortar_Detonate_2_Func002001() ) then
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Mortar_Detonate_2_Func002002001002)), function Trig_Mortar_Detonate_2_Func002002002 )
else
call DoNothing( )
endif
if ( Trig_Mortar_Detonate_2_Func003001() ) then
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Mortar_Detonate_2_Func003002001002)), function Trig_Mortar_Detonate_2_Func003002002 )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Mortar_Detonate_2 takes nothing returns nothing
set gg_trg_Mortar_Detonate_2 = CreateTrigger( )
call TriggerAddAction( gg_trg_Mortar_Detonate_2, function Trig_Mortar_Detonate_2_Actions )
endfunction
function Trig_Cleaning_Initialization_Func002003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Cleaning_Initialization_Func007002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Cleaning_Crew), 0 )
endfunction
function Trig_Cleaning_Initialization_Func008002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Cleaning_Initialization_Func009002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Cleaning_Crew )
endfunction
function Trig_Cleaning_Initialization_Func013003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Cleaning_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 0.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Cleaning_Initialization_Func002003001() ) then
call CreateNUnitsAtLoc( 1, 'ugho', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Cleaning_Crew), GetRandomReal(200.00, 400.00), GetRandomDirectionDeg()), GetRandomDirectionDeg() )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call CreateNUnitsAtLoc( 1, 'hmpr', Player(11), OffsetLocation(GetRectCenter(gg_rct_Cleaning_Crew), -700.00, 700.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'hmpr', Player(11), OffsetLocation(GetRectCenter(gg_rct_Cleaning_Crew), 700.00, 700.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'hmpr', Player(11), OffsetLocation(GetRectCenter(gg_rct_Cleaning_Crew), -700.00, -700.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'hmpr', Player(11), OffsetLocation(GetRectCenter(gg_rct_Cleaning_Crew), 700.00, -700.00), bj_UNIT_FACING )
call ForForce( GetPlayersAll(), function Trig_Cleaning_Initialization_Func007002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Cleaning_Crew), function Trig_Cleaning_Initialization_Func008002 )
call ForForce( GetPlayersAll(), function Trig_Cleaning_Initialization_Func009002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_039" )
call EnableTrigger( gg_trg_Cleaning_Degrade )
call EnableTrigger( gg_trg_Cleaning_Death )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Cleaning_Initialization_Func013003001() ) then
call EnableTrigger( gg_trg_Cleaning_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 5.00 )
call EnableTrigger( gg_trg_Cleaning_Dispel )
endfunction
//===========================================================================
function InitTrig_Cleaning_Initialization takes nothing returns nothing
set gg_trg_Cleaning_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Cleaning_Initialization, function Trig_Cleaning_Initialization_Actions )
endfunction
function Trig_Cleaning_Dispel_Func001002001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'ugho' )
endfunction
function Trig_Cleaning_Dispel_Func001002001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Cleaning_Dispel_Func001002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Cleaning_Dispel_Func001002001002001(), Trig_Cleaning_Dispel_Func001002001002002() )
endfunction
function Trig_Cleaning_Dispel_Func004003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Cleaning_Dispel_Func004003002002001 takes nothing returns boolean
return ( RectContainsUnit(RectFromCenterSizeBJ(GetUnitLoc(udg_Unit_Target), 650.00, 650.00), GetEnumUnit()) == true )
endfunction
function Trig_Cleaning_Dispel_Func004003002002 takes nothing returns nothing
if ( Trig_Cleaning_Dispel_Func004003002002001() ) then
call IssuePointOrderLocBJ( GetEnumUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), GetRandomReal(500.00, 600.00), GetRandomDirectionDeg()) )
else
call DoNothing( )
endif
endfunction
function Trig_Cleaning_Dispel_Actions takes nothing returns nothing
set udg_Unit_Target = GroupPickRandomUnit(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Cleaning_Dispel_Func001002001002)))
call IssueTargetOrderBJ( GroupPickRandomUnit(GetUnitsOfPlayerAll(Player(11))), "dispel", udg_Unit_Target )
call AddSpecialEffectLocBJ( GetUnitLoc(udg_Unit_Target), "Abilities\\Spells\\Human\\Heal\\HealTarget.mdx" )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Cleaning_Dispel_Func004003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Cleaning_Dispel_Func004003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction
//===========================================================================
function InitTrig_Cleaning_Dispel takes nothing returns nothing
set gg_trg_Cleaning_Dispel = CreateTrigger( )
call DisableTrigger( gg_trg_Cleaning_Dispel )
call TriggerRegisterTimerEventPeriodic( gg_trg_Cleaning_Dispel, 12.00 )
call TriggerAddAction( gg_trg_Cleaning_Dispel, function Trig_Cleaning_Dispel_Actions )
endfunction
function Trig_Cleaning_Degrade_Func001002 takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 3.00 ) )
endfunction
function Trig_Cleaning_Degrade_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('ugho'), function Trig_Cleaning_Degrade_Func001002 )
endfunction
//===========================================================================
function InitTrig_Cleaning_Degrade takes nothing returns nothing
set gg_trg_Cleaning_Degrade = CreateTrigger( )
call DisableTrigger( gg_trg_Cleaning_Degrade )
call TriggerRegisterTimerEventPeriodic( gg_trg_Cleaning_Degrade, 0.05 )
call TriggerAddAction( gg_trg_Cleaning_Degrade, function Trig_Cleaning_Degrade_Actions )
endfunction
function Trig_Cleaning_Death_Func001001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Cleaning_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Cleaning_Crew, Condition(function Trig_Cleaning_Death_Func001001001002))) <= 5 ) ) then
return false
endif
return true
endfunction
function Trig_Cleaning_Death_Func006001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'hmpr' )
endfunction
function Trig_Cleaning_Death_Func006002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Cleaning_Death_Func006002 takes nothing returns nothing
if ( Trig_Cleaning_Death_Func006002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Cleaning_Death_Func007001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'hmpr' )
endfunction
function Trig_Cleaning_Death_Func007001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Cleaning_Death_Func007001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Cleaning_Death_Func007001001001002001(), Trig_Cleaning_Death_Func007001001001002002() )
endfunction
function Trig_Cleaning_Death_Func007001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Cleaning_Crew, Condition(function Trig_Cleaning_Death_Func007001001001002))) == 1 )
endfunction
function Trig_Cleaning_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Cleaning_Dispel )
call DisableTrigger( gg_trg_Cleaning_Degrade )
call DisableTrigger( gg_trg_Cleaning_Death )
call DisableTrigger( gg_trg_Cleaning_AI )
call ForGroup( GetUnitsInRectMatching(gg_rct_Cleaning_Crew, Condition(function Trig_Cleaning_Death_Func006001002)), function Trig_Cleaning_Death_Func006002 )
if ( Trig_Cleaning_Death_Func007001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Cleaning_Death takes nothing returns nothing
set gg_trg_Cleaning_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Cleaning_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cleaning_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cleaning_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cleaning_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cleaning_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cleaning_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cleaning_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cleaning_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cleaning_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Cleaning_Death, Condition( function Trig_Cleaning_Death_Conditions ) )
call TriggerAddAction( gg_trg_Cleaning_Death, function Trig_Cleaning_Death_Actions )
endfunction
function Trig_Cleaning_AI_Func001002001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'ugho' )
endfunction
function Trig_Cleaning_AI_Func001002001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Cleaning_AI_Func001002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Cleaning_AI_Func001002001002001(), Trig_Cleaning_AI_Func001002001002002() )
endfunction
function Trig_Cleaning_AI_Func002001 takes nothing returns boolean
return ( GetPlayerController(GetOwningPlayer(udg_Unit_Target)) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Cleaning_AI_Actions takes nothing returns nothing
set udg_Unit_Target = GroupPickRandomUnit(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Cleaning_AI_Func001002001002)))
if ( Trig_Cleaning_AI_Func002001() ) then
call IssuePointOrderLocBJ( udg_Unit_Target, "move", PolarProjectionBJ(GetUnitLoc(udg_Unit_Target), GetRandomReal(50.00, 200.00), GetRandomDirectionDeg()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Cleaning_AI takes nothing returns nothing
set gg_trg_Cleaning_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Cleaning_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Cleaning_AI, 4.00 )
call TriggerAddAction( gg_trg_Cleaning_AI, function Trig_Cleaning_AI_Actions )
endfunction
function Trig_Forest_Initialization_Func006003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Forest_Initialization_Func008002 takes nothing returns nothing
call IssueImmediateOrderBJ( GetEnumUnit(), "unroot" )
endfunction
function Trig_Forest_Initialization_Func034002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Forest_Initialization_Func035002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Forest_Fire), 0 )
endfunction
function Trig_Forest_Initialization_Func036002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Forest_Fire )
endfunction
function Trig_Forest_Initialization_Func044003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Forest_Initialization_Actions takes nothing returns nothing
set udg_Regions_Current[1] = gg_rct_Forest_1
set udg_Regions_Current[2] = gg_rct_Forest_2
set udg_Regions_Current[3] = gg_rct_Forest_3
set udg_Regions_Current[4] = gg_rct_Forest_4
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Forest_Initialization_Func006003001() ) then
call CreateNUnitsAtLoc( 1, 'etrp', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Forest_Fire), 200.00, GetRandomDirectionDeg()), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 256
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateDestructableLoc( 'LTlt', PolarProjectionBJ(GetRectCenter(gg_rct_Forest_Fire), GetRandomReal(320.00, 1216.00), GetRandomDirectionDeg()), GetRandomDirectionDeg(), GetRandomReal(0.80, 1.20), GetRandomInt(0, 9) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroup( GetUnitsOfTypeIdAll('etrp'), function Trig_Forest_Initialization_Func008002 )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), OffsetLocation(GetRectCenter(gg_rct_Forest_Fire), -704.00, 704.00), bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_YELLOW )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), OffsetLocation(GetRectCenter(gg_rct_Forest_Fire), 704.00, 704.00), bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_YELLOW )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), OffsetLocation(GetRectCenter(gg_rct_Forest_Fire), -704.00, -704.00), bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_YELLOW )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), OffsetLocation(GetRectCenter(gg_rct_Forest_Fire), 704.00, -704.00), bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_YELLOW )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), OffsetLocation(GetRectCenter(gg_rct_Forest_Fire), 960.00, 0.00), bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_YELLOW )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), OffsetLocation(GetRectCenter(gg_rct_Forest_Fire), 0.00, 960.00), bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_YELLOW )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), OffsetLocation(GetRectCenter(gg_rct_Forest_Fire), -960.00, 0.00), bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_YELLOW )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), OffsetLocation(GetRectCenter(gg_rct_Forest_Fire), 0.00, -960.00), bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_YELLOW )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 4
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'ncop', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), bj_UNIT_FACING )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Forest_Initialization_Func034002 )
call ForForce( GetPlayersAll(), function Trig_Forest_Initialization_Func035002 )
call ForForce( GetPlayersAll(), function Trig_Forest_Initialization_Func036002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_044" )
call EnableTrigger( gg_trg_Forest_Finish )
call EnableTrigger( gg_trg_Forest_Death )
call TriggerSleepAction( 2.00 )
call EnableTrigger( gg_trg_Forest_Spread )
call EnableTrigger( gg_trg_Forest_Snuff )
call EnableTrigger( gg_trg_Forest_AI )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Forest_Initialization_Func044003001() ) then
call EnableTrigger( gg_trg_Forest_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Forest_Initialization takes nothing returns nothing
set gg_trg_Forest_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Forest_Initialization, function Trig_Forest_Initialization_Actions )
endfunction
function Trig_Forest_Spread_Func004001003 takes nothing returns boolean
return ( GetFilterUnit() != GetLastCreatedUnit() )
endfunction
function Trig_Forest_Spread_Func004002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Forest_Spread_Func005001 takes nothing returns boolean
return ( RectContainsUnit(gg_rct_Forest_Fire, GetLastCreatedUnit()) == false )
endfunction
function Trig_Forest_Spread_Func006003 takes nothing returns nothing
call KillDestructable( GetEnumDestructable() )
endfunction
function Trig_Forest_Spread_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), GetUnitLoc(GroupPickRandomUnit(GetUnitsOfTypeIdAll('ewsp'))), bj_UNIT_FACING )
call SetUnitPositionLoc( GetLastCreatedUnit(), PolarProjectionBJ(GetUnitLoc(GetLastCreatedUnit()), 144.00, AngleBetweenPoints(GetUnitLoc(GetLastCreatedUnit()), GetUnitLoc(GroupPickRandomUnit(GetUnitsOfTypeIdAll('etrp'))))) )
call ForGroup( GetUnitsInRangeOfLocMatching(100.00, GetUnitLoc(GetLastCreatedUnit()), Condition(function Trig_Forest_Spread_Func004001003)), function Trig_Forest_Spread_Func004002 )
if ( Trig_Forest_Spread_Func005001() ) then
call RemoveUnit( GetLastCreatedUnit() )
else
call DoNothing( )
endif
call EnumDestructablesInCircleBJ( 144.00, GetUnitLoc(GetLastCreatedUnit()), function Trig_Forest_Spread_Func006003 )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_YELLOW )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
endfunction
//===========================================================================
function InitTrig_Forest_Spread takes nothing returns nothing
set gg_trg_Forest_Spread = CreateTrigger( )
call DisableTrigger( gg_trg_Forest_Spread )
call TriggerRegisterTimerEventPeriodic( gg_trg_Forest_Spread, 2.00 )
call TriggerAddAction( gg_trg_Forest_Spread, function Trig_Forest_Spread_Actions )
endfunction
function Trig_Forest_Finish_Conditions takes nothing returns boolean
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) <= 8 ) ) then
return false
endif
return true
endfunction
function Trig_Forest_Finish_Actions takes nothing returns nothing
set udg_Player_Winner = GetOwningPlayer(GetEnteringUnit())
call DisableTrigger( gg_trg_Forest_Spread )
call DisableTrigger( gg_trg_Forest_Finish )
call DisableTrigger( gg_trg_Forest_Death )
call DisableTrigger( gg_trg_Forest_Snuff )
call DisableTrigger( gg_trg_Forest_AI )
call TriggerExecute( gg_trg_Win )
endfunction
//===========================================================================
function InitTrig_Forest_Finish takes nothing returns nothing
set gg_trg_Forest_Finish = CreateTrigger( )
call DisableTrigger( gg_trg_Forest_Finish )
call TriggerRegisterEnterRectSimple( gg_trg_Forest_Finish, gg_rct_Forest_1 )
call TriggerRegisterEnterRectSimple( gg_trg_Forest_Finish, gg_rct_Forest_2 )
call TriggerRegisterEnterRectSimple( gg_trg_Forest_Finish, gg_rct_Forest_3 )
call TriggerRegisterEnterRectSimple( gg_trg_Forest_Finish, gg_rct_Forest_4 )
call TriggerAddCondition( gg_trg_Forest_Finish, Condition( function Trig_Forest_Finish_Conditions ) )
call TriggerAddAction( gg_trg_Forest_Finish, function Trig_Forest_Finish_Actions )
endfunction
function Trig_Forest_Death_Func001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'etrp' )
endfunction
function Trig_Forest_Death_Func001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Forest_Death_Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Forest_Death_Func001001001002001(), Trig_Forest_Death_Func001001001002002() )
endfunction
function Trig_Forest_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Forest_Death_Func001001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Forest_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Forest_Spread )
call DisableTrigger( gg_trg_Forest_Finish )
call DisableTrigger( gg_trg_Forest_Death )
call DisableTrigger( gg_trg_Forest_Snuff )
call DisableTrigger( gg_trg_Forest_AI )
call TriggerExecute( gg_trg_Draw )
endfunction
//===========================================================================
function InitTrig_Forest_Death takes nothing returns nothing
set gg_trg_Forest_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Forest_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Forest_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Forest_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Forest_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Forest_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Forest_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Forest_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Forest_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Forest_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Forest_Death, Condition( function Trig_Forest_Death_Conditions ) )
call TriggerAddAction( gg_trg_Forest_Death, function Trig_Forest_Death_Actions )
endfunction
function Trig_Forest_Snuff_Func001002 takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 2.00 ) )
endfunction
function Trig_Forest_Snuff_Func002002001001001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'ewsp' )
endfunction
function Trig_Forest_Snuff_Func002002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(200.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Forest_Snuff_Func002002001001001003))) > 0 )
endfunction
function Trig_Forest_Snuff_Func002002 takes nothing returns nothing
if ( Trig_Forest_Snuff_Func002002001() ) then
call KillUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Forest_Snuff_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('ewsp'), function Trig_Forest_Snuff_Func001002 )
call ForGroup( GetUnitsOfTypeIdAll('etrp'), function Trig_Forest_Snuff_Func002002 )
endfunction
//===========================================================================
function InitTrig_Forest_Snuff takes nothing returns nothing
set gg_trg_Forest_Snuff = CreateTrigger( )
call DisableTrigger( gg_trg_Forest_Snuff )
call TriggerRegisterTimerEventPeriodic( gg_trg_Forest_Snuff, 1.00 )
call TriggerAddAction( gg_trg_Forest_Snuff, function Trig_Forest_Snuff_Actions )
endfunction
function Trig_Forest_AI_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Forest_AI_Func001003002002 takes nothing returns nothing
call IssueTargetDestructableOrder( GetEnumUnit(), "eattree", RandomDestructableInRectSimpleBJ(RectFromCenterSizeBJ(GetUnitLoc(GetEnumUnit()), 600.00, 600.00)) )
endfunction
function Trig_Forest_AI_Func002001 takes nothing returns boolean
return ( GetRandomInt(1, 4) != 1 )
endfunction
function Trig_Forest_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Forest_AI_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Forest_AI_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Forest_AI_Func002001() ) then
return
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Forest_AI takes nothing returns nothing
set gg_trg_Forest_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Forest_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Forest_AI, 1.00 )
call TriggerAddAction( gg_trg_Forest_AI, function Trig_Forest_AI_Actions )
endfunction
function Trig_Roadkill_Initialization_Func002003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Roadkill_Initialization_Func027002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Roadkill_Challenge), 0 )
endfunction
function Trig_Roadkill_Initialization_Func028003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Roadkill_Initialization_Func029002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Roadkill_Challenge )
endfunction
function Trig_Roadkill_Initialization_Func039003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Roadkill_Initialization_Func039003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", GetRectCenter(gg_rct_Roadkill_Finish) )
endfunction
function Trig_Roadkill_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Roadkill_Initialization_Func002003001() ) then
call CreateNUnitsAtLoc( 1, 'nmrl', ConvertedPlayer(GetForLoopIndexA()), GetRandomLocInRect(gg_rct_Roadkill_Start), 90.00 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call CreateNUnitsAtLoc( 1, 'hmtt', Player(11), OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), -256.00, -448.00), 180.00 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "patrol", OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), -896.00, -448.00) )
call CreateNUnitsAtLoc( 1, 'hmtt', Player(11), OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), -256.00, -64.00), 180.00 )
call SetUnitMoveSpeed( GetLastCreatedUnit(), 280.00 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "patrol", OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), -896.00, -64.00) )
call CreateNUnitsAtLoc( 1, 'hmtt', Player(11), OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), -256.00, 320.00), 180.00 )
call SetUnitMoveSpeed( GetLastCreatedUnit(), 340.00 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "patrol", OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), -896.00, 320.00) )
call CreateNUnitsAtLoc( 1, 'hmtt', Player(11), OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), 256.00, 320.00), 0.00 )
call SetUnitMoveSpeed( GetLastCreatedUnit(), 260.00 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "patrol", OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), 896.00, 320.00) )
call CreateNUnitsAtLoc( 1, 'hmtt', Player(11), OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), 896.00, 192.00), 180.00 )
call SetUnitMoveSpeed( GetLastCreatedUnit(), 260.00 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "patrol", OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), 256.00, 192.00) )
call CreateNUnitsAtLoc( 1, 'hmtt', Player(11), OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), 256.00, -192.00), 0.00 )
call SetUnitMoveSpeed( GetLastCreatedUnit(), 280.00 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "patrol", OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), 896.00, -192.00) )
call CreateNUnitsAtLoc( 1, 'hmtt', Player(11), OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), 896.00, -320.00), 180.00 )
call SetUnitMoveSpeed( GetLastCreatedUnit(), 280.00 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "patrol", OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), 256.00, -320.00) )
call CreateNUnitsAtLoc( 1, 'hmtt', Player(11), OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), 256.00, -448.00), 0.00 )
call SetUnitMoveSpeed( GetLastCreatedUnit(), 280.00 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "patrol", OffsetLocation(GetRectCenter(gg_rct_Roadkill_Challenge), 896.00, -448.00) )
call CreateNUnitsAtLoc( 1, 'ncop', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(gg_rct_Roadkill_Finish), bj_UNIT_FACING )
call ForForce( GetPlayersAll(), function Trig_Roadkill_Initialization_Func027002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Roadkill_Initialization_Func028003001() ) then
call PanCameraToTimedLocForPlayer( ConvertedPlayer(GetForLoopIndexA()), GetRectCenter(gg_rct_Roadkill_Start), 0.00 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Roadkill_Initialization_Func029002 )
call StartTimerBJ( udg_Timer_TimeLeft, false, 90.00 )
call CreateTimerDialogBJ( GetLastCreatedTimerBJ(), "TRIGSTR_079" )
call TimerDialogDisplayBJ( true, GetLastCreatedTimerDialogBJ() )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_045" )
call EnableTrigger( gg_trg_Roadkill_Finish )
call EnableTrigger( gg_trg_Roadkill_Death )
call EnableTrigger( gg_trg_Roadkill_Final_Death )
call EnableTrigger( gg_trg_Roadkill_Expire )
call TriggerSleepAction( 4.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Roadkill_Initialization_Func039003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Roadkill_Initialization_Func039003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Roadkill_Initialization takes nothing returns nothing
set gg_trg_Roadkill_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Roadkill_Initialization, function Trig_Roadkill_Initialization_Actions )
endfunction
function Trig_Roadkill_Finish_Conditions takes nothing returns boolean
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) <= 8 ) ) then
return false
endif
return true
endfunction
function Trig_Roadkill_Finish_Actions takes nothing returns nothing
set udg_Player_Winner = GetOwningPlayer(GetEnteringUnit())
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisableTrigger( gg_trg_Roadkill_Finish )
call DisableTrigger( gg_trg_Roadkill_Death )
call DisableTrigger( gg_trg_Roadkill_Final_Death )
call DisableTrigger( gg_trg_Roadkill_Expire )
call TriggerExecute( gg_trg_Win )
endfunction
//===========================================================================
function InitTrig_Roadkill_Finish takes nothing returns nothing
set gg_trg_Roadkill_Finish = CreateTrigger( )
call DisableTrigger( gg_trg_Roadkill_Finish )
call TriggerRegisterEnterRectSimple( gg_trg_Roadkill_Finish, gg_rct_Roadkill_Finish )
call TriggerAddCondition( gg_trg_Roadkill_Finish, Condition( function Trig_Roadkill_Finish_Conditions ) )
call TriggerAddAction( gg_trg_Roadkill_Finish, function Trig_Roadkill_Finish_Actions )
endfunction
function Trig_Roadkill_Death_Func001002001001001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hmtt' )
endfunction
function Trig_Roadkill_Death_Func001002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(128.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Roadkill_Death_Func001002001001001003))) > 0 )
endfunction
function Trig_Roadkill_Death_Func001002 takes nothing returns nothing
if ( Trig_Roadkill_Death_Func001002001() ) then
call KillUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Roadkill_Death_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('nmrl'), function Trig_Roadkill_Death_Func001002 )
endfunction
//===========================================================================
function InitTrig_Roadkill_Death takes nothing returns nothing
set gg_trg_Roadkill_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Roadkill_Death )
call TriggerRegisterTimerEventPeriodic( gg_trg_Roadkill_Death, 0.05 )
call TriggerAddAction( gg_trg_Roadkill_Death, function Trig_Roadkill_Death_Actions )
endfunction
function Trig_Roadkill_Final_Death_Func002001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Roadkill_Final_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Roadkill_Challenge, Condition(function Trig_Roadkill_Final_Death_Func002001001002))) <= 9 ) ) then
return false
endif
return true
endfunction
function Trig_Roadkill_Final_Death_Actions takes nothing returns nothing
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisableTrigger( gg_trg_Roadkill_Finish )
call DisableTrigger( gg_trg_Roadkill_Death )
call DisableTrigger( gg_trg_Roadkill_Final_Death )
call DisableTrigger( gg_trg_Roadkill_Expire )
call TriggerExecute( gg_trg_Draw )
endfunction
//===========================================================================
function InitTrig_Roadkill_Final_Death takes nothing returns nothing
set gg_trg_Roadkill_Final_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Roadkill_Final_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Roadkill_Final_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Roadkill_Final_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Roadkill_Final_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Roadkill_Final_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Roadkill_Final_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Roadkill_Final_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Roadkill_Final_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Roadkill_Final_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Roadkill_Final_Death, Condition( function Trig_Roadkill_Final_Death_Conditions ) )
call TriggerAddAction( gg_trg_Roadkill_Final_Death, function Trig_Roadkill_Final_Death_Actions )
endfunction
function Trig_Roadkill_Expire_Func001002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Roadkill_Expire_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('nmrl'), function Trig_Roadkill_Expire_Func001002 )
endfunction
//===========================================================================
function InitTrig_Roadkill_Expire takes nothing returns nothing
set gg_trg_Roadkill_Expire = CreateTrigger( )
call DisableTrigger( gg_trg_Roadkill_Expire )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Roadkill_Expire, udg_Timer_TimeLeft )
call TriggerAddAction( gg_trg_Roadkill_Expire, function Trig_Roadkill_Expire_Actions )
endfunction
function Trig_Covert_Initialization_Func003003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Covert_Initialization_Func008002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Covert_Initialization_Func009002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Covert_Kitty), 0 )
endfunction
function Trig_Covert_Initialization_Func010003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Covert_Initialization_Func011002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Covert_Kitty )
endfunction
function Trig_Covert_Initialization_Func019003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Covert_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 0.00 )
call UseTimeOfDayBJ( true )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Covert_Initialization_Func003003001() ) then
call CreateNUnitsAtLoc( 1, 'esen', ConvertedPlayer(GetForLoopIndexA()), GetRandomLocInRect(gg_rct_Covert_Start), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call CreateNUnitsAtLoc( 1, 'nbal', Player(11), OffsetLocation(GetRectCenter(gg_rct_Covert_Kitty), -128.00, 0), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nbal', Player(11), OffsetLocation(GetRectCenter(gg_rct_Covert_Kitty), 256.00, 0), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nbal', Player(11), OffsetLocation(GetRectCenter(gg_rct_Covert_Kitty), 640.00, 0), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(gg_rct_Covert_Finish), bj_UNIT_FACING )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Covert_Initialization_Func008002 )
call ForForce( GetPlayersAll(), function Trig_Covert_Initialization_Func009002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Covert_Initialization_Func010003001() ) then
call PanCameraToTimedLocForPlayer( ConvertedPlayer(GetForLoopIndexA()), GetRectCenter(gg_rct_Covert_Start), 0.00 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Covert_Initialization_Func011002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_062" )
call EnableTrigger( gg_trg_Covert_Finish )
call EnableTrigger( gg_trg_Covert_Final_Death )
call EnableTrigger( gg_trg_Covert_Cripple )
call EnableTrigger( gg_trg_Dawn )
call TriggerSleepAction( 2 )
call EnableTrigger( gg_trg_Covert_Patrol )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Covert_Initialization_Func019003001() ) then
call EnableTrigger( gg_trg_Covert_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Covert_Initialization takes nothing returns nothing
set gg_trg_Covert_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Covert_Initialization, function Trig_Covert_Initialization_Actions )
endfunction
function Trig_Covert_Finish_Conditions takes nothing returns boolean
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) <= 8 ) ) then
return false
endif
return true
endfunction
function Trig_Covert_Finish_Actions takes nothing returns nothing
set udg_Player_Winner = GetOwningPlayer(GetEnteringUnit())
call UseTimeOfDayBJ( false )
call DisableTrigger( gg_trg_Covert_Finish )
call DisableTrigger( gg_trg_Covert_Final_Death )
call DisableTrigger( gg_trg_Covert_Patrol )
call DisableTrigger( gg_trg_Covert_Cripple )
call DisableTrigger( gg_trg_Dawn )
call DisableTrigger( gg_trg_Covert_AI )
call TriggerExecute( gg_trg_Win )
endfunction
//===========================================================================
function InitTrig_Covert_Finish takes nothing returns nothing
set gg_trg_Covert_Finish = CreateTrigger( )
call DisableTrigger( gg_trg_Covert_Finish )
call TriggerRegisterEnterRectSimple( gg_trg_Covert_Finish, gg_rct_Covert_Finish )
call TriggerAddCondition( gg_trg_Covert_Finish, Condition( function Trig_Covert_Finish_Conditions ) )
call TriggerAddAction( gg_trg_Covert_Finish, function Trig_Covert_Finish_Actions )
endfunction
function Trig_Covert_Final_Death_Func002001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Covert_Final_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Covert_Kitty, Condition(function Trig_Covert_Final_Death_Func002001001002))) <= 3 ) ) then
return false
endif
return true
endfunction
function Trig_Covert_Final_Death_Actions takes nothing returns nothing
call UseTimeOfDayBJ( false )
call DisableTrigger( gg_trg_Covert_Finish )
call DisableTrigger( gg_trg_Covert_Final_Death )
call DisableTrigger( gg_trg_Covert_Patrol )
call DisableTrigger( gg_trg_Covert_Cripple )
call DisableTrigger( gg_trg_Dawn )
call DisableTrigger( gg_trg_Covert_AI )
call TriggerExecute( gg_trg_Draw )
endfunction
//===========================================================================
function InitTrig_Covert_Final_Death takes nothing returns nothing
set gg_trg_Covert_Final_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Covert_Final_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Covert_Final_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Covert_Final_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Covert_Final_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Covert_Final_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Covert_Final_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Covert_Final_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Covert_Final_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Covert_Final_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Covert_Final_Death, Condition( function Trig_Covert_Final_Death_Conditions ) )
call TriggerAddAction( gg_trg_Covert_Final_Death, function Trig_Covert_Final_Death_Actions )
endfunction
function Trig_Covert_Patrol_Func001002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetRandomLocInRect(gg_rct_Covert_Kitty) )
endfunction
function Trig_Covert_Patrol_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Covert_Patrol_Func001002 )
endfunction
//===========================================================================
function InitTrig_Covert_Patrol takes nothing returns nothing
set gg_trg_Covert_Patrol = CreateTrigger( )
call DisableTrigger( gg_trg_Covert_Patrol )
call TriggerRegisterTimerEventPeriodic( gg_trg_Covert_Patrol, 7.00 )
call TriggerAddAction( gg_trg_Covert_Patrol, function Trig_Covert_Patrol_Actions )
endfunction
function Trig_Covert_Cripple_Func001002003001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'esen' )
endfunction
function Trig_Covert_Cripple_Func001002 takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "cripple", GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Covert_Cripple_Func001002003001003))) )
endfunction
function Trig_Covert_Cripple_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Covert_Cripple_Func001002 )
endfunction
//===========================================================================
function InitTrig_Covert_Cripple takes nothing returns nothing
set gg_trg_Covert_Cripple = CreateTrigger( )
call DisableTrigger( gg_trg_Covert_Cripple )
call TriggerRegisterTimerEventPeriodic( gg_trg_Covert_Cripple, 2.00 )
call TriggerAddAction( gg_trg_Covert_Cripple, function Trig_Covert_Cripple_Actions )
endfunction
function Trig_Covert_AI_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Covert_AI_Func001003002002001001001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nbal' )
endfunction
function Trig_Covert_AI_Func001003002002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(500.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Covert_AI_Func001003002002001001001003))) == 0 )
endfunction
function Trig_Covert_AI_Func001003002002 takes nothing returns nothing
if ( Trig_Covert_AI_Func001003002002001() ) then
call IssuePointOrderLocBJ( GetEnumUnit(), "move", GetRectCenter(gg_rct_Covert_Finish) )
else
call IssueImmediateOrderBJ( GetEnumUnit(), "ambush" )
endif
endfunction
function Trig_Covert_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Covert_AI_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Covert_AI_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Covert_AI takes nothing returns nothing
set gg_trg_Covert_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Covert_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Covert_AI, 0.50 )
call TriggerAddAction( gg_trg_Covert_AI, function Trig_Covert_AI_Actions )
endfunction
function Trig_Polymorph_Initialization_Func002003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Polymorph_Initialization_Func003002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Polymorph_Ring), 0 )
endfunction
function Trig_Polymorph_Initialization_Func004002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Polymorph_Initialization_Func005002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Polymorph_Ring )
endfunction
function Trig_Polymorph_Initialization_Func013003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Polymorph_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Polymorph_Initialization_Func002003001() ) then
call CreateNUnitsAtLoc( 1, 'hsor', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Polymorph_Ring), 500.00, GetRandomDirectionDeg()), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Polymorph_Initialization_Func003002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Polymorph_Ring), function Trig_Polymorph_Initialization_Func004002 )
call ForForce( GetPlayersAll(), function Trig_Polymorph_Initialization_Func005002 )
call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_Polymorph_Ring), "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdx" )
set udg_SpecialEffect_Special = GetLastCreatedEffectBJ()
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_076" )
call EnableTrigger( gg_trg_Polymorph_Final_Death )
call EnableTrigger( gg_trg_Polymorph_Patrol )
call TriggerSleepAction( 5.00 )
call EnableTrigger( gg_trg_Polymorph_Spawn )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Polymorph_Initialization_Func013003001() ) then
call EnableTrigger( gg_trg_Polymorph_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Polymorph_Initialization takes nothing returns nothing
set gg_trg_Polymorph_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Polymorph_Initialization, function Trig_Polymorph_Initialization_Actions )
endfunction
function Trig_Polymorph_Spawn_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerAll(Player(11))) < 8 ) ) then
return false
endif
return true
endfunction
function Trig_Polymorph_Spawn_Actions takes nothing returns nothing
call TriggerSleepAction( GetRandomReal(0, 5.00) )
call CreateNUnitsAtLoc( 1, 'nsqa', Player(11), GetRectCenter(gg_rct_Polymorph_Ring), bj_UNIT_FACING )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdx" )
endfunction
//===========================================================================
function InitTrig_Polymorph_Spawn takes nothing returns nothing
set gg_trg_Polymorph_Spawn = CreateTrigger( )
call DisableTrigger( gg_trg_Polymorph_Spawn )
call TriggerRegisterTimerEventPeriodic( gg_trg_Polymorph_Spawn, 10.00 )
call TriggerAddCondition( gg_trg_Polymorph_Spawn, Condition( function Trig_Polymorph_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Polymorph_Spawn, function Trig_Polymorph_Spawn_Actions )
endfunction
function Trig_Polymorph_Patrol_Func001002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Polymorph_Patrol_Func002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetRandomLocInRect(gg_rct_Polymorph_Ring) )
endfunction
function Trig_Polymorph_Patrol_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Polymorph_Patrol_Func001002 )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Polymorph_Patrol_Func002002 )
endfunction
//===========================================================================
function InitTrig_Polymorph_Patrol takes nothing returns nothing
set gg_trg_Polymorph_Patrol = CreateTrigger( )
call DisableTrigger( gg_trg_Polymorph_Patrol )
call TriggerRegisterTimerEventPeriodic( gg_trg_Polymorph_Patrol, 2.50 )
call TriggerAddAction( gg_trg_Polymorph_Patrol, function Trig_Polymorph_Patrol_Actions )
endfunction
function Trig_Polymorph_Final_Death_Func008001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hsor' )
endfunction
function Trig_Polymorph_Final_Death_Func008001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Polymorph_Final_Death_Func008001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Polymorph_Final_Death_Func008001001002001(), Trig_Polymorph_Final_Death_Func008001001002002() )
endfunction
function Trig_Polymorph_Final_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Polymorph_Final_Death_Func008001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Polymorph_Final_Death_Func006001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hsor' )
endfunction
function Trig_Polymorph_Final_Death_Func006002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Polymorph_Final_Death_Func006002 takes nothing returns nothing
if ( Trig_Polymorph_Final_Death_Func006002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Polymorph_Final_Death_Func007001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hsor' )
endfunction
function Trig_Polymorph_Final_Death_Func007001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Polymorph_Final_Death_Func007001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Polymorph_Final_Death_Func007001001001002001(), Trig_Polymorph_Final_Death_Func007001001001002002() )
endfunction
function Trig_Polymorph_Final_Death_Func007001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Polymorph_Ring, Condition(function Trig_Polymorph_Final_Death_Func007001001001002))) == 1 )
endfunction
function Trig_Polymorph_Final_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Polymorph_Spawn )
call DisableTrigger( gg_trg_Polymorph_Patrol )
call DisableTrigger( gg_trg_Polymorph_Final_Death )
call DisableTrigger( gg_trg_Polymorph_AI )
call DestroyEffectBJ( udg_SpecialEffect_Special )
call ForGroup( GetUnitsInRectMatching(gg_rct_Polymorph_Ring, Condition(function Trig_Polymorph_Final_Death_Func006001002)), function Trig_Polymorph_Final_Death_Func006002 )
if ( Trig_Polymorph_Final_Death_Func007001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Polymorph_Final_Death takes nothing returns nothing
set gg_trg_Polymorph_Final_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Polymorph_Final_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Polymorph_Final_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Polymorph_Final_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Polymorph_Final_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Polymorph_Final_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Polymorph_Final_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Polymorph_Final_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Polymorph_Final_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Polymorph_Final_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Polymorph_Final_Death, Condition( function Trig_Polymorph_Final_Death_Conditions ) )
call TriggerAddAction( gg_trg_Polymorph_Final_Death, function Trig_Polymorph_Final_Death_Actions )
endfunction
function Trig_Polymorph_AI_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Polymorph_AI_Func001003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), GetRandomReal(200.00, 500.00), ( AngleBetweenPoints(GetRectCenter(gg_rct_Polymorph_Ring), GetUnitLoc(GetEnumUnit())) + GetRandomReal(-120.00, 120.00) )) )
endfunction
function Trig_Polymorph_AI_Func002003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Polymorph_AI_Func002003002002003001003 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_ATTACKS_GROUND) == true )
endfunction
function Trig_Polymorph_AI_Func002003002002 takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "polymorph", GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(500.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Polymorph_AI_Func002003002002003001003))) )
endfunction
function Trig_Polymorph_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Polymorph_AI_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Polymorph_AI_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Polymorph_AI_Func002003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Polymorph_AI_Func002003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Polymorph_AI takes nothing returns nothing
set gg_trg_Polymorph_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Polymorph_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Polymorph_AI, 2.00 )
call TriggerAddAction( gg_trg_Polymorph_AI, function Trig_Polymorph_AI_Actions )
endfunction
function Trig_Tauren_Initialization_Func002003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Tauren_Initialization_Func003002 takes nothing returns nothing
call SetHeroLevel( GetEnumUnit(), 2, false )
endfunction
function Trig_Tauren_Initialization_Func004002 takes nothing returns nothing
call SuspendHeroXPBJ( false, GetEnumUnit() )
endfunction
function Trig_Tauren_Initialization_Func005002 takes nothing returns nothing
call SelectHeroSkill( GetEnumUnit(), 'AOsh' )
endfunction
function Trig_Tauren_Initialization_Func006002 takes nothing returns nothing
call SelectHeroSkill( GetEnumUnit(), 'AOws' )
endfunction
function Trig_Tauren_Initialization_Func008002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Tauren_Tragedy), 0 )
endfunction
function Trig_Tauren_Initialization_Func009002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Tauren_Initialization_Func010002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Tauren_Tragedy )
endfunction
function Trig_Tauren_Initialization_Func015003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Tauren_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Tauren_Initialization_Func002003001() ) then
call CreateNUnitsAtLoc( 1, 'Otch', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Tauren_Tragedy), 400.00, GetRandomDirectionDeg()), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroup( GetUnitsOfTypeIdAll('Otch'), function Trig_Tauren_Initialization_Func003002 )
call ForGroup( GetUnitsOfTypeIdAll('Otch'), function Trig_Tauren_Initialization_Func004002 )
call ForGroup( GetUnitsOfTypeIdAll('Otch'), function Trig_Tauren_Initialization_Func005002 )
call ForGroup( GetUnitsOfTypeIdAll('Otch'), function Trig_Tauren_Initialization_Func006002 )
call CreateNUnitsAtLoc( 1, 'hbar', Player(11), GetRectCenter(gg_rct_Tauren_Tragedy), bj_UNIT_FACING )
call ForForce( GetPlayersAll(), function Trig_Tauren_Initialization_Func008002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Tauren_Tragedy), function Trig_Tauren_Initialization_Func009002 )
call ForForce( GetPlayersAll(), function Trig_Tauren_Initialization_Func010002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_077" )
call EnableTrigger( gg_trg_Tauren_Final_Death )
call TriggerSleepAction( 7.00 )
call EnableTrigger( gg_trg_Tauren_Footman_Spawn )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Tauren_Initialization_Func015003001() ) then
call EnableTrigger( gg_trg_Tauren_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Tauren_Initialization takes nothing returns nothing
set gg_trg_Tauren_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Tauren_Initialization, function Trig_Tauren_Initialization_Actions )
endfunction
function Trig_Tauren_Footman_Spawn_Func003001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Tauren_Footman_Spawn_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerMatching(Player(11), Condition(function Trig_Tauren_Footman_Spawn_Func003001001002))) < 50 ) ) then
return false
endif
return true
endfunction
function Trig_Tauren_Footman_Spawn_Func001003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Tauren_Footman_Spawn_Func002002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Tauren_Footman_Spawn_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Tauren_Footman_Spawn_Func001003001() ) then
call CreateNUnitsAtLoc( 1, 'hfoo', Player(11), PolarProjectionBJ(GetRectCenter(gg_rct_Tauren_Tragedy), 100.00, GetRandomDirectionDeg()), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Tauren_Footman_Spawn_Func002002 )
endfunction
//===========================================================================
function InitTrig_Tauren_Footman_Spawn takes nothing returns nothing
set gg_trg_Tauren_Footman_Spawn = CreateTrigger( )
call DisableTrigger( gg_trg_Tauren_Footman_Spawn )
call TriggerRegisterTimerEventPeriodic( gg_trg_Tauren_Footman_Spawn, 1.50 )
call TriggerAddCondition( gg_trg_Tauren_Footman_Spawn, Condition( function Trig_Tauren_Footman_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Tauren_Footman_Spawn, function Trig_Tauren_Footman_Spawn_Actions )
endfunction
function Trig_Tauren_Final_Death_Func006001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'Otch' )
endfunction
function Trig_Tauren_Final_Death_Func006001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Tauren_Final_Death_Func006001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Tauren_Final_Death_Func006001001002001(), Trig_Tauren_Final_Death_Func006001001002002() )
endfunction
function Trig_Tauren_Final_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Tauren_Final_Death_Func006001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Tauren_Final_Death_Func004001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'Otch' )
endfunction
function Trig_Tauren_Final_Death_Func004002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Tauren_Final_Death_Func004002 takes nothing returns nothing
if ( Trig_Tauren_Final_Death_Func004002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Tauren_Final_Death_Func005001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'Otch' )
endfunction
function Trig_Tauren_Final_Death_Func005001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Tauren_Final_Death_Func005001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Tauren_Final_Death_Func005001001001002001(), Trig_Tauren_Final_Death_Func005001001001002002() )
endfunction
function Trig_Tauren_Final_Death_Func005001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Tauren_Tragedy, Condition(function Trig_Tauren_Final_Death_Func005001001001002))) == 1 )
endfunction
function Trig_Tauren_Final_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Tauren_Footman_Spawn )
call DisableTrigger( gg_trg_Tauren_Final_Death )
call DisableTrigger( gg_trg_Tauren_AI )
call ForGroup( GetUnitsInRectMatching(gg_rct_Tauren_Tragedy, Condition(function Trig_Tauren_Final_Death_Func004001002)), function Trig_Tauren_Final_Death_Func004002 )
if ( Trig_Tauren_Final_Death_Func005001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Tauren_Final_Death takes nothing returns nothing
set gg_trg_Tauren_Final_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Tauren_Final_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Tauren_Final_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Tauren_Final_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Tauren_Final_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Tauren_Final_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Tauren_Final_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Tauren_Final_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Tauren_Final_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Tauren_Final_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Tauren_Final_Death, Condition( function Trig_Tauren_Final_Death_Conditions ) )
call TriggerAddAction( gg_trg_Tauren_Final_Death, function Trig_Tauren_Final_Death_Actions )
endfunction
function Trig_Tauren_AI_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Tauren_AI_Func001003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), GetRandomReal(200.00, 400.00), ( AngleBetweenPoints(GetRectCenter(gg_rct_Tauren_Tragedy), GetUnitLoc(GetEnumUnit())) + GetRandomReal(-120.00, 120.00) )) )
endfunction
function Trig_Tauren_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Tauren_AI_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Tauren_AI_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Tauren_AI takes nothing returns nothing
set gg_trg_Tauren_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Tauren_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Tauren_AI, 4.00 )
call TriggerAddAction( gg_trg_Tauren_AI, function Trig_Tauren_AI_Actions )
endfunction
function Trig_Uprising_Initialization_Func010003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Uprising_Initialization_Func011003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Uprising_Initialization_Func012002 takes nothing returns nothing
call SetUnitAcquireRangeBJ( GetEnumUnit(), 200.00 )
endfunction
function Trig_Uprising_Initialization_Func014002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Uprising), 0 )
endfunction
function Trig_Uprising_Initialization_Func015002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Uprising_Initialization_Func016002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Uprising )
endfunction
function Trig_Uprising_Initialization_Func024003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Uprising_Initialization_Actions takes nothing returns nothing
set udg_Regions_Current[1] = gg_rct_Uprising_1
set udg_Regions_Current[2] = gg_rct_Uprising_2
set udg_Regions_Current[3] = gg_rct_Uprising_3
set udg_Regions_Current[4] = gg_rct_Uprising_4
set udg_Regions_Current[5] = gg_rct_Uprising_5
set udg_Regions_Current[6] = gg_rct_Uprising_6
set udg_Regions_Current[7] = gg_rct_Uprising_7
set udg_Regions_Current[8] = gg_rct_Uprising_8
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_UnitGroups_Players[GetForLoopIndexA()] = GetUnitsOfPlayerAll(Player(11))
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Uprising_Initialization_Func010003001() ) then
call CreateNUnitsAtLoc( 1, 'hcas', ConvertedPlayer(GetForLoopIndexA()), GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Uprising_Initialization_Func011003001() ) then
call CreateNUnitsAtLoc( 1, 'hrif', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), 200.00, AngleBetweenPoints(GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), GetRectCenter(gg_rct_Uprising))), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroup( GetUnitsInRectAll(GetEntireMapRect()), function Trig_Uprising_Initialization_Func012002 )
call CreateNUnitsAtLoc( 1, 'hhou', Player(11), GetRectCenter(gg_rct_Uprising), bj_UNIT_FACING )
call ForForce( GetPlayersAll(), function Trig_Uprising_Initialization_Func014002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Uprising), function Trig_Uprising_Initialization_Func015002 )
call ForForce( GetPlayersAll(), function Trig_Uprising_Initialization_Func016002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_078" )
call EnableTrigger( gg_trg_Uprising_Rush )
call EnableTrigger( gg_trg_Uprising_Target )
call EnableTrigger( gg_trg_Uprising_Death )
call EnableTrigger( gg_trg_Uprising_Final_Death )
call TriggerSleepAction( 5.00 )
call EnableTrigger( gg_trg_Uprising_Spawn_Base )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Uprising_Initialization_Func024003001() ) then
call EnableTrigger( gg_trg_Uprising_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Uprising_Initialization takes nothing returns nothing
set gg_trg_Uprising_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Uprising_Initialization, function Trig_Uprising_Initialization_Actions )
endfunction
function Trig_Uprising_Spawn_Base_Func001001002 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == true )
endfunction
function Trig_Uprising_Spawn_Base_Func001002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Uprising_Spawn_Base_Func002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsOfPlayerAll(Player(11))) > 40 )
endfunction
function Trig_Uprising_Spawn_Base_Func003003001001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Uprising_Spawn_Base_Func003003001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsOfPlayerMatching(ConvertedPlayer(GetForLoopIndexA()), Condition(function Trig_Uprising_Spawn_Base_Func003003001001001002))) > 0 )
endfunction
function Trig_Uprising_Spawn_Base_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerMatching(Player(11), Condition(function Trig_Uprising_Spawn_Base_Func001001002)), function Trig_Uprising_Spawn_Base_Func001002 )
if ( Trig_Uprising_Spawn_Base_Func002001() ) then
return
else
call DoNothing( )
endif
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Uprising_Spawn_Base_Func003003001() ) then
call TriggerExecute( gg_trg_Uprising_Spawn )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Uprising_Spawn_Base takes nothing returns nothing
set gg_trg_Uprising_Spawn_Base = CreateTrigger( )
call DisableTrigger( gg_trg_Uprising_Spawn_Base )
call TriggerRegisterTimerEventPeriodic( gg_trg_Uprising_Spawn_Base, 10.00 )
call TriggerAddAction( gg_trg_Uprising_Spawn_Base, function Trig_Uprising_Spawn_Base_Actions )
endfunction
function Trig_Uprising_Rush_Func001003002001 takes nothing returns boolean
return ( DistanceBetweenPoints(GetRectCenter(gg_rct_Uprising), GetUnitLoc(GetEnumUnit())) <= 200.00 )
endfunction
function Trig_Uprising_Rush_Func001003002 takes nothing returns nothing
if ( Trig_Uprising_Rush_Func001003002001() ) then
call IssueTargetOrderBJ( GetEnumUnit(), "attack", GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(ConvertedPlayer(GetForLoopIndexA()), 'hcas')) )
else
call DoNothing( )
endif
endfunction
function Trig_Uprising_Rush_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call ForGroup( udg_UnitGroups_Players[GetForLoopIndexA()], function Trig_Uprising_Rush_Func001003002 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Uprising_Rush takes nothing returns nothing
set gg_trg_Uprising_Rush = CreateTrigger( )
call DisableTrigger( gg_trg_Uprising_Rush )
call TriggerRegisterTimerEventPeriodic( gg_trg_Uprising_Rush, 2.00 )
call TriggerAddAction( gg_trg_Uprising_Rush, function Trig_Uprising_Rush_Actions )
endfunction
function Trig_Uprising_Target_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetAttackedUnitBJ(), "move", GetRandomLocInRect(RectFromCenterSizeBJ(GetRectCenter(gg_rct_Uprising), 300.00, 300.00)) )
endfunction
//===========================================================================
function InitTrig_Uprising_Target takes nothing returns nothing
set gg_trg_Uprising_Target = CreateTrigger( )
call DisableTrigger( gg_trg_Uprising_Target )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Target, Player(11), EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_Uprising_Target, function Trig_Uprising_Target_Actions )
endfunction
function Trig_Uprising_Death_Func003002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Uprising_Death_Actions takes nothing returns nothing
call AttachSoundToUnitBJ( gg_snd_GateEpicDeath, GetDyingUnit() )
call PlaySoundBJ( gg_snd_GateEpicDeath )
call ForGroup( GetUnitsOfPlayerAll(GetOwningPlayer(GetDyingUnit())), function Trig_Uprising_Death_Func003002 )
endfunction
//===========================================================================
function InitTrig_Uprising_Death takes nothing returns nothing
set gg_trg_Uprising_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Uprising_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Uprising_Death, function Trig_Uprising_Death_Actions )
endfunction
function Trig_Uprising_Final_Death_Func010001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hrif' )
endfunction
function Trig_Uprising_Final_Death_Func010001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Uprising_Final_Death_Func010001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Uprising_Final_Death_Func010001001002001(), Trig_Uprising_Final_Death_Func010001001002002() )
endfunction
function Trig_Uprising_Final_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Uprising_Final_Death_Func010001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Uprising_Final_Death_Func007001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hrif' )
endfunction
function Trig_Uprising_Final_Death_Func007002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Uprising_Final_Death_Func007002 takes nothing returns nothing
if ( Trig_Uprising_Final_Death_Func007002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Uprising_Final_Death_Func008002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Uprising_Final_Death_Func009001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hrif' )
endfunction
function Trig_Uprising_Final_Death_Func009001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Uprising_Final_Death_Func009001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Uprising_Final_Death_Func009001001001002001(), Trig_Uprising_Final_Death_Func009001001001002002() )
endfunction
function Trig_Uprising_Final_Death_Func009001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Uprising, Condition(function Trig_Uprising_Final_Death_Func009001001001002))) == 1 )
endfunction
function Trig_Uprising_Final_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Uprising_Spawn_Base )
call DisableTrigger( gg_trg_Uprising_Rush )
call DisableTrigger( gg_trg_Uprising_Target )
call DisableTrigger( gg_trg_Uprising_Death )
call DisableTrigger( gg_trg_Uprising_Final_Death )
call DisableTrigger( gg_trg_Uprising_AI )
call ForGroup( GetUnitsInRectMatching(gg_rct_Uprising, Condition(function Trig_Uprising_Final_Death_Func007001002)), function Trig_Uprising_Final_Death_Func007002 )
call ForGroup( GetUnitsOfPlayerAll(GetOwningPlayer(GetDyingUnit())), function Trig_Uprising_Final_Death_Func008002 )
if ( Trig_Uprising_Final_Death_Func009001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Uprising_Final_Death takes nothing returns nothing
set gg_trg_Uprising_Final_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Uprising_Final_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Final_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Final_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Final_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Final_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Final_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Final_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Final_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Uprising_Final_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Uprising_Final_Death, Condition( function Trig_Uprising_Final_Death_Conditions ) )
call TriggerAddAction( gg_trg_Uprising_Final_Death, function Trig_Uprising_Final_Death_Actions )
endfunction
function Trig_Uprising_AI_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Uprising_AI_Func001003002002003001003 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(11) )
endfunction
function Trig_Uprising_AI_Func001003002002 takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "attackonce", GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Uprising_AI_Func001003002002003001003))) )
endfunction
function Trig_Uprising_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Uprising_AI_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Uprising_AI_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Uprising_AI takes nothing returns nothing
set gg_trg_Uprising_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Uprising_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Uprising_AI, 2 )
call TriggerAddAction( gg_trg_Uprising_AI, function Trig_Uprising_AI_Actions )
endfunction
function Trig_Uprising_Spawn_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'hpea', Player(11), PolarProjectionBJ(GetRectCenter(gg_rct_Uprising), 50.00, GetRandomDirectionDeg()), bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), GetPlayerColor(ConvertedPlayer(GetForLoopIndexA())) )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_UnitGroups_Players[GetForLoopIndexA()] )
endfunction
//===========================================================================
function InitTrig_Uprising_Spawn takes nothing returns nothing
set gg_trg_Uprising_Spawn = CreateTrigger( )
call TriggerAddAction( gg_trg_Uprising_Spawn, function Trig_Uprising_Spawn_Actions )
endfunction
function Trig_Dark_Initialization_Func002003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Dark_Initialization_Func003002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Dark_Forest), 0 )
endfunction
function Trig_Dark_Initialization_Func004002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Dark_Initialization_Func005002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Dark_Forest )
endfunction
function Trig_Dark_Initialization_Func013003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Dark_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 0.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Dark_Initialization_Func002003001() ) then
call CreateNUnitsAtLoc( 1, 'edot', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Dark_Forest), 300.00, GetRandomDirectionDeg()), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Dark_Initialization_Func003002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Dark_Forest), function Trig_Dark_Initialization_Func004002 )
call ForForce( GetPlayersAll(), function Trig_Dark_Initialization_Func005002 )
call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_Dark_Forest), "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdx" )
set udg_SpecialEffect_Special = GetLastCreatedEffectBJ()
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_080" )
call EnableTrigger( gg_trg_Dark_Final_Death )
call EnableTrigger( gg_trg_Dark_Patrol )
call TriggerSleepAction( 6.00 )
call EnableTrigger( gg_trg_Dark_Spawn )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Dark_Initialization_Func013003001() ) then
call EnableTrigger( gg_trg_Dark_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Dark_Initialization takes nothing returns nothing
set gg_trg_Dark_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Dark_Initialization, function Trig_Dark_Initialization_Actions )
endfunction
function Trig_Dark_Spawn_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerAll(Player(11))) < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Spawn_Func005001001 takes nothing returns boolean
return ( GetTriggerExecCount(GetTriggeringTrigger()) == 1 )
endfunction
function Trig_Dark_Spawn_Func005001002 takes nothing returns boolean
return ( GetRandomInt(1, 2) == 1 )
endfunction
function Trig_Dark_Spawn_Func005001 takes nothing returns boolean
return GetBooleanOr( Trig_Dark_Spawn_Func005001001(), Trig_Dark_Spawn_Func005001002() )
endfunction
function Trig_Dark_Spawn_Actions takes nothing returns nothing
call TriggerSleepAction( GetRandomReal(0, 5.00) )
call CreateNUnitsAtLoc( 1, 'uabo', Player(11), GetRectCenter(gg_rct_Dark_Forest), bj_UNIT_FACING )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdx" )
if ( Trig_Dark_Spawn_Func005001() ) then
call CreateNUnitsAtLoc( 1, 'ugar', Player(11), GetRectCenter(gg_rct_Dark_Forest), bj_UNIT_FACING )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Dark_Spawn takes nothing returns nothing
set gg_trg_Dark_Spawn = CreateTrigger( )
call DisableTrigger( gg_trg_Dark_Spawn )
call TriggerRegisterTimerEventPeriodic( gg_trg_Dark_Spawn, 15.00 )
call TriggerAddCondition( gg_trg_Dark_Spawn, Condition( function Trig_Dark_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Dark_Spawn, function Trig_Dark_Spawn_Actions )
endfunction
function Trig_Dark_Patrol_Func001002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Dark_Patrol_Func002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetRandomLocInRect(gg_rct_Dark_Forest) )
endfunction
function Trig_Dark_Patrol_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Dark_Patrol_Func001002 )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Dark_Patrol_Func002002 )
endfunction
//===========================================================================
function InitTrig_Dark_Patrol takes nothing returns nothing
set gg_trg_Dark_Patrol = CreateTrigger( )
call DisableTrigger( gg_trg_Dark_Patrol )
call TriggerRegisterTimerEventPeriodic( gg_trg_Dark_Patrol, 4.50 )
call TriggerAddAction( gg_trg_Dark_Patrol, function Trig_Dark_Patrol_Actions )
endfunction
function Trig_Dark_Final_Death_Func008001001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) != Player(11) )
endfunction
function Trig_Dark_Final_Death_Func008001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Dark_Final_Death_Func008001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Dark_Final_Death_Func008001001002001(), Trig_Dark_Final_Death_Func008001001002002() )
endfunction
function Trig_Dark_Final_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Dark_Final_Death_Func008001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Final_Death_Func006001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'edot' )
endfunction
function Trig_Dark_Final_Death_Func006001002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'edtm' )
endfunction
function Trig_Dark_Final_Death_Func006001002 takes nothing returns boolean
return GetBooleanOr( Trig_Dark_Final_Death_Func006001002001(), Trig_Dark_Final_Death_Func006001002002() )
endfunction
function Trig_Dark_Final_Death_Func006002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Dark_Final_Death_Func006002 takes nothing returns nothing
if ( Trig_Dark_Final_Death_Func006002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Dark_Final_Death_Func007001001001002001001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'edot' )
endfunction
function Trig_Dark_Final_Death_Func007001001001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'edtm' )
endfunction
function Trig_Dark_Final_Death_Func007001001001002001 takes nothing returns boolean
return GetBooleanOr( Trig_Dark_Final_Death_Func007001001001002001001(), Trig_Dark_Final_Death_Func007001001001002001002() )
endfunction
function Trig_Dark_Final_Death_Func007001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Dark_Final_Death_Func007001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Dark_Final_Death_Func007001001001002001(), Trig_Dark_Final_Death_Func007001001001002002() )
endfunction
function Trig_Dark_Final_Death_Func007001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Dark_Final_Death_Func007001001001002))) == 1 )
endfunction
function Trig_Dark_Final_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Dark_Spawn )
call DisableTrigger( gg_trg_Dark_Patrol )
call DisableTrigger( gg_trg_Dark_Final_Death )
call DisableTrigger( gg_trg_Dark_AI )
call DestroyEffectBJ( udg_SpecialEffect_Special )
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Dark_Final_Death_Func006001002)), function Trig_Dark_Final_Death_Func006002 )
if ( Trig_Dark_Final_Death_Func007001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Dark_Final_Death takes nothing returns nothing
set gg_trg_Dark_Final_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Dark_Final_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Dark_Final_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Dark_Final_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Dark_Final_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Dark_Final_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Dark_Final_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Dark_Final_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Dark_Final_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Dark_Final_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Dark_Final_Death, Condition( function Trig_Dark_Final_Death_Conditions ) )
call TriggerAddAction( gg_trg_Dark_Final_Death, function Trig_Dark_Final_Death_Actions )
endfunction
function Trig_Dark_AI_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Dark_AI_Func001003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), GetRandomReal(200.00, 500.00), ( AngleBetweenPoints(GetRectCenter(gg_rct_Dark_Forest), GetUnitLoc(GetEnumUnit())) + GetRandomReal(-120.00, 120.00) )) )
endfunction
function Trig_Dark_AI_Func002003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Dark_AI_Func002003002002001001001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'ugar' )
endfunction
function Trig_Dark_AI_Func002003002002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(600.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Dark_AI_Func002003002002001001001003))) > 0 )
endfunction
function Trig_Dark_AI_Func002003002002003001001001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'uabo' )
endfunction
function Trig_Dark_AI_Func002003002002003001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Dark_AI_Func002003002002003001001001003))) > 0 )
endfunction
function Trig_Dark_AI_Func002003002002 takes nothing returns nothing
if ( Trig_Dark_AI_Func002003002002001() ) then
call IssueImmediateOrderBJ( GetEnumUnit(), "unravenform" )
else
if ( Trig_Dark_AI_Func002003002002003001() ) then
call IssueImmediateOrderBJ( GetEnumUnit(), "ravenform" )
else
call DoNothing( )
endif
endif
endfunction
function Trig_Dark_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Dark_AI_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Dark_AI_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Dark_AI_Func002003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Dark_AI_Func002003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Dark_AI takes nothing returns nothing
set gg_trg_Dark_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Dark_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Dark_AI, 2.00 )
call TriggerAddAction( gg_trg_Dark_AI, function Trig_Dark_AI_Actions )
endfunction
function Trig_Kodos_Initialization_Func006003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kodos_Initialization_Func007002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Feeding_Time), 0 )
endfunction
function Trig_Kodos_Initialization_Func008002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Kodos_Initialization_Func009002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Feeding_Time )
endfunction
function Trig_Kodos_Initialization_Func015003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Kodos_Initialization_Func017002001001 takes nothing returns boolean
return ( GetDestructableTypeId(GetFilterDestructable()) == 'LTg1' )
endfunction
function Trig_Kodos_Initialization_Func017002001002 takes nothing returns boolean
return ( GetDestructableTypeId(GetFilterDestructable()) == 'LTg3' )
endfunction
function Trig_Kodos_Initialization_Func017002001 takes nothing returns boolean
return GetBooleanOr( Trig_Kodos_Initialization_Func017002001001(), Trig_Kodos_Initialization_Func017002001002() )
endfunction
function Trig_Kodos_Initialization_Func017002 takes nothing returns nothing
if ( Trig_Kodos_Initialization_Func017002001() ) then
call ModifyGateBJ( bj_GATEOPERATION_OPEN, GetEnumDestructable() )
else
call DoNothing( )
endif
endfunction
function Trig_Kodos_Initialization_Actions takes nothing returns nothing
set udg_Regions_Current[1] = gg_rct_Feeding_1
set udg_Regions_Current[2] = gg_rct_Feeding_2
set udg_Regions_Current[3] = gg_rct_Feeding_3
set udg_Regions_Current[4] = gg_rct_Feeding_4
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Kodos_Initialization_Func006003001() ) then
call CreateNUnitsAtLoc( 1, 'okod', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Feeding_Time), 200.00, GetRandomDirectionDeg()), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Kodos_Initialization_Func007002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Feeding_Time), function Trig_Kodos_Initialization_Func008002 )
call ForForce( GetPlayersAll(), function Trig_Kodos_Initialization_Func009002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_082" )
call EnableTrigger( gg_trg_Kodos_Child_Indigestion )
call EnableTrigger( gg_trg_Kodos_Pig_Kill )
call EnableTrigger( gg_trg_Kodos_Atrophy )
call EnableTrigger( gg_trg_Kodos_Final_Death )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Kodos_Initialization_Func015003001() ) then
call EnableTrigger( gg_trg_Kodos_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 6.00 )
call EnumDestructablesInRectAll( GetEntireMapRect(), function Trig_Kodos_Initialization_Func017002 )
call EnableTrigger( gg_trg_Kodos_Spawn_Base )
call TriggerExecute( gg_trg_Kodos_Spawn_Base )
endfunction
//===========================================================================
function InitTrig_Kodos_Initialization takes nothing returns nothing
set gg_trg_Kodos_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Kodos_Initialization, function Trig_Kodos_Initialization_Actions )
endfunction
function Trig_Kodos_Spawn_Base_Func002003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kodos_Spawn_Base_Func002003002001001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Kodos_Spawn_Base_Func002003002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsOfPlayerMatching(ConvertedPlayer(GetForLoopIndexA()), Condition(function Trig_Kodos_Spawn_Base_Func002003002001001001002))) > 0 )
endfunction
function Trig_Kodos_Spawn_Base_Func003001 takes nothing returns boolean
return ( GetTriggerExecCount(GetTriggeringTrigger()) == 1 )
endfunction
function Trig_Kodos_Spawn_Base_Func004001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsOfTypeIdAll('nvlk')) < 8 )
endfunction
function Trig_Kodos_Spawn_Base_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Kodos_Spawn_Base_Func002003001() ) then
if ( Trig_Kodos_Spawn_Base_Func002003002001() ) then
call ConditionalTriggerExecute( gg_trg_Kodos_Spawn )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Kodos_Spawn_Base_Func003001() ) then
return
else
call DoNothing( )
endif
if ( Trig_Kodos_Spawn_Base_Func004001() ) then
call CreateNUnitsAtLoc( 1, 'nvlk', Player(11), GetRandomLocInRect(udg_Regions_Current[GetRandomInt(1, 4)]), bj_UNIT_FACING )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Kodos_Spawn_Base takes nothing returns nothing
set gg_trg_Kodos_Spawn_Base = CreateTrigger( )
call DisableTrigger( gg_trg_Kodos_Spawn_Base )
call TriggerRegisterTimerEventPeriodic( gg_trg_Kodos_Spawn_Base, 10.00 )
call TriggerAddAction( gg_trg_Kodos_Spawn_Base, function Trig_Kodos_Spawn_Base_Actions )
endfunction
function Trig_Kodos_Child_Indigestion_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'nvlk' ) ) then
return false
endif
return true
endfunction
function Trig_Kodos_Child_Indigestion_Actions takes nothing returns nothing
call KillUnit( GetKillingUnitBJ() )
endfunction
//===========================================================================
function InitTrig_Kodos_Child_Indigestion takes nothing returns nothing
set gg_trg_Kodos_Child_Indigestion = CreateTrigger( )
call DisableTrigger( gg_trg_Kodos_Child_Indigestion )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kodos_Child_Indigestion, Player(11), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Kodos_Child_Indigestion, Condition( function Trig_Kodos_Child_Indigestion_Conditions ) )
call TriggerAddAction( gg_trg_Kodos_Child_Indigestion, function Trig_Kodos_Child_Indigestion_Actions )
endfunction
function Trig_Kodos_Pig_Kill_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'npig' ) ) then
return false
endif
return true
endfunction
function Trig_Kodos_Pig_Kill_Actions takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "origin", GetKillingUnitBJ(), "Abilities\\Spells\\Human\\Heal\\HealTarget.mdx" )
call SetUnitLifeBJ( GetKillingUnitBJ(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetKillingUnitBJ()) + 50.00 ) )
endfunction
//===========================================================================
function InitTrig_Kodos_Pig_Kill takes nothing returns nothing
set gg_trg_Kodos_Pig_Kill = CreateTrigger( )
call DisableTrigger( gg_trg_Kodos_Pig_Kill )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kodos_Pig_Kill, Player(11), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Kodos_Pig_Kill, Condition( function Trig_Kodos_Pig_Kill_Conditions ) )
call TriggerAddAction( gg_trg_Kodos_Pig_Kill, function Trig_Kodos_Pig_Kill_Actions )
endfunction
function Trig_Kodos_Atrophy_Func001002 takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 15.00 ) )
endfunction
function Trig_Kodos_Atrophy_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('okod'), function Trig_Kodos_Atrophy_Func001002 )
endfunction
//===========================================================================
function InitTrig_Kodos_Atrophy takes nothing returns nothing
set gg_trg_Kodos_Atrophy = CreateTrigger( )
call DisableTrigger( gg_trg_Kodos_Atrophy )
call TriggerRegisterTimerEventPeriodic( gg_trg_Kodos_Atrophy, 1.00 )
call TriggerAddAction( gg_trg_Kodos_Atrophy, function Trig_Kodos_Atrophy_Actions )
endfunction
function Trig_Kodos_Final_Death_Func009001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'okod' )
endfunction
function Trig_Kodos_Final_Death_Func009001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Kodos_Final_Death_Func009001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Kodos_Final_Death_Func009001001002001(), Trig_Kodos_Final_Death_Func009001001002002() )
endfunction
function Trig_Kodos_Final_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Kodos_Final_Death_Func009001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Kodos_Final_Death_Func007001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'okod' )
endfunction
function Trig_Kodos_Final_Death_Func007002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Kodos_Final_Death_Func007002 takes nothing returns nothing
if ( Trig_Kodos_Final_Death_Func007002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Kodos_Final_Death_Func008001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'okod' )
endfunction
function Trig_Kodos_Final_Death_Func008001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Kodos_Final_Death_Func008001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Kodos_Final_Death_Func008001001001002001(), Trig_Kodos_Final_Death_Func008001001001002002() )
endfunction
function Trig_Kodos_Final_Death_Func008001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Kodos_Final_Death_Func008001001001002))) == 1 )
endfunction
function Trig_Kodos_Final_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Kodos_Spawn_Base )
call DisableTrigger( gg_trg_Kodos_Child_Indigestion )
call DisableTrigger( gg_trg_Kodos_Pig_Kill )
call DisableTrigger( gg_trg_Kodos_Atrophy )
call DisableTrigger( gg_trg_Kodos_Final_Death )
call DisableTrigger( gg_trg_Kodos_AI )
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Kodos_Final_Death_Func007001002)), function Trig_Kodos_Final_Death_Func007002 )
if ( Trig_Kodos_Final_Death_Func008001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Kodos_Final_Death takes nothing returns nothing
set gg_trg_Kodos_Final_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Kodos_Final_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kodos_Final_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kodos_Final_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kodos_Final_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kodos_Final_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kodos_Final_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kodos_Final_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kodos_Final_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Kodos_Final_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Kodos_Final_Death, Condition( function Trig_Kodos_Final_Death_Conditions ) )
call TriggerAddAction( gg_trg_Kodos_Final_Death, function Trig_Kodos_Final_Death_Actions )
endfunction
function Trig_Kodos_AI_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Kodos_AI_Func001003002002 takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "devour", GroupPickRandomUnit(GetUnitsOfTypeIdAll('npig')) )
endfunction
function Trig_Kodos_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Kodos_AI_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Kodos_AI_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Kodos_AI takes nothing returns nothing
set gg_trg_Kodos_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Kodos_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Kodos_AI, 2.00 )
call TriggerAddAction( gg_trg_Kodos_AI, function Trig_Kodos_AI_Actions )
endfunction
function Trig_Kodos_Spawn_Func001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'npig' )
endfunction
function Trig_Kodos_Spawn_Func001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Kodos_Spawn_Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Kodos_Spawn_Func001001001002001(), Trig_Kodos_Spawn_Func001001001002002() )
endfunction
function Trig_Kodos_Spawn_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerMatching(Player(11), Condition(function Trig_Kodos_Spawn_Func001001001002))) < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Kodos_Spawn_Func002001 takes nothing returns boolean
return ( GetRandomInt(1, 2) == 1 )
endfunction
function Trig_Kodos_Spawn_Actions takes nothing returns nothing
if ( Trig_Kodos_Spawn_Func002001() ) then
call CreateNUnitsAtLoc( 1, 'npig', Player(11), GetRandomLocInRect(udg_Regions_Current[GetRandomInt(1, 4)]), bj_UNIT_FACING )
else
call DoNothing( )
endif
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetRandomLocInRect(gg_rct_Feeding_Time) )
endfunction
//===========================================================================
function InitTrig_Kodos_Spawn takes nothing returns nothing
set gg_trg_Kodos_Spawn = CreateTrigger( )
call TriggerAddCondition( gg_trg_Kodos_Spawn, Condition( function Trig_Kodos_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Kodos_Spawn, function Trig_Kodos_Spawn_Actions )
endfunction
function Trig_Raider_Initialization_Func005003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Raider_Initialization_Func006003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Raider_Initialization_Func007002 takes nothing returns nothing
call SetUnitInvulnerable( GetEnumUnit(), true )
endfunction
function Trig_Raider_Initialization_Func008002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Raider_Initialization_Func009002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), GetPlayerColor(Player(PLAYER_NEUTRAL_PASSIVE)) )
endfunction
function Trig_Raider_Initialization_Func017002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Raider_Relay), 0 )
endfunction
function Trig_Raider_Initialization_Func018001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'orai' )
endfunction
function Trig_Raider_Initialization_Func018002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Raider_Initialization_Func019002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Raider_Relay )
endfunction
function Trig_Raider_Initialization_Func030003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Raider_Initialization_Func030003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", GetRectCenter(gg_rct_Raider_Zeppelin) )
endfunction
function Trig_Raider_Initialization_Func031003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Raider_Initialization_Actions takes nothing returns nothing
set udg_Regions_Current[1] = gg_rct_Raider_Start_1
set udg_Regions_Current[2] = gg_rct_Raider_Start_2
set udg_Triggers_Current[1] = gg_trg_Raider_Zeppelin
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Raider_Initialization_Func005003001() ) then
call CreateNUnitsAtLoc( 1, 'orai', ConvertedPlayer(GetForLoopIndexA()), GetRandomLocInRect(udg_Regions_Current[GetRandomInt(1, 2)]), 90.00 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Raider_Initialization_Func006003001() ) then
call CreateNUnitsAtLoc( 1, 'nzep', ConvertedPlayer(GetForLoopIndexA()), GetRandomLocInRect(gg_rct_Raider_Zeppelin), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroup( GetUnitsOfTypeIdAll('nzep'), function Trig_Raider_Initialization_Func007002 )
call ForGroup( GetUnitsOfTypeIdAll('nzep'), function Trig_Raider_Initialization_Func008002 )
call ForGroup( GetUnitsOfTypeIdAll('nzep'), function Trig_Raider_Initialization_Func009002 )
call CreateNUnitsAtLoc( 1, 'edcm', Player(11), OffsetLocation(GetRectCenter(gg_rct_Raider_Relay), -448.00, -128.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'edcm', Player(11), OffsetLocation(GetRectCenter(gg_rct_Raider_Relay), 448.00, -128.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ehip', Player(11), OffsetLocation(GetRectCenter(gg_rct_Raider_Relay), -384.00, -512.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ehip', Player(11), OffsetLocation(GetRectCenter(gg_rct_Raider_Relay), 384.00, -512.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ehip', Player(11), OffsetLocation(GetRectCenter(gg_rct_Raider_Relay), -384.00, -1024.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ehip', Player(11), OffsetLocation(GetRectCenter(gg_rct_Raider_Relay), 384.00, -1024.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(gg_rct_Raider_Finish), bj_UNIT_FACING )
call ForForce( GetPlayersAll(), function Trig_Raider_Initialization_Func017002 )
call ForGroup( GetUnitsInRectMatching(gg_rct_Raider_Relay, Condition(function Trig_Raider_Initialization_Func018001002)), function Trig_Raider_Initialization_Func018002 )
call ForForce( GetPlayersAll(), function Trig_Raider_Initialization_Func019002 )
call StartTimerBJ( udg_Timer_TimeLeft, false, 90.00 )
call CreateTimerDialogBJ( GetLastCreatedTimerBJ(), "TRIGSTR_083" )
call TimerDialogDisplayBJ( true, GetLastCreatedTimerDialogBJ() )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_084" )
call EnableTrigger( gg_trg_Raider_Zeppelin )
call EnableTrigger( gg_trg_Raider_Finish )
call EnableTrigger( gg_trg_Raider_Expire )
call EnableTrigger( gg_trg_Raider_Death )
call EnableTrigger( gg_trg_Raider_Zeppelin_Death )
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Raider_Initialization_Func030003001() ) then
call ForGroup( GetUnitsOfPlayerAndTypeId(ConvertedPlayer(GetForLoopIndexA()), 'orai'), function Trig_Raider_Initialization_Func030003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Raider_Initialization_Func031003001() ) then
call EnableTrigger( gg_trg_Raider_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Raider_Initialization takes nothing returns nothing
set gg_trg_Raider_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Raider_Initialization, function Trig_Raider_Initialization_Actions )
endfunction
function Trig_Raider_Zeppelin_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
return true
endfunction
function Trig_Raider_Zeppelin_Func002002001 takes nothing returns boolean
return ( IsUnitPausedBJ(GetEnumUnit()) == false )
endfunction
function Trig_Raider_Zeppelin_Func002002 takes nothing returns nothing
if ( Trig_Raider_Zeppelin_Func002002001() ) then
return
else
call DoNothing( )
endif
endfunction
function Trig_Raider_Zeppelin_Func003002 takes nothing returns nothing
call PauseUnitBJ( false, GetEnumUnit() )
endfunction
function Trig_Raider_Zeppelin_Func004002 takes nothing returns nothing
call SetUnitInvulnerable( GetEnumUnit(), false )
endfunction
function Trig_Raider_Zeppelin_Func005002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), GetPlayerColor(GetOwningPlayer(GetEnteringUnit())) )
endfunction
function Trig_Raider_Zeppelin_Func006002 takes nothing returns nothing
call UnitAddIndicatorBJ( GetEnumUnit(), 100, 100, 100, 0 )
endfunction
function Trig_Raider_Zeppelin_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetEnteringUnit()), 'nzep'), function Trig_Raider_Zeppelin_Func002002 )
call ForGroup( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetEnteringUnit()), 'nzep'), function Trig_Raider_Zeppelin_Func003002 )
call ForGroup( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetEnteringUnit()), 'nzep'), function Trig_Raider_Zeppelin_Func004002 )
call ForGroup( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetEnteringUnit()), 'nzep'), function Trig_Raider_Zeppelin_Func005002 )
call ForGroup( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetEnteringUnit()), 'nzep'), function Trig_Raider_Zeppelin_Func006002 )
endfunction
//===========================================================================
function InitTrig_Raider_Zeppelin takes nothing returns nothing
set gg_trg_Raider_Zeppelin = CreateTrigger( )
call DisableTrigger( gg_trg_Raider_Zeppelin )
call TriggerRegisterEnterRectSimple( gg_trg_Raider_Zeppelin, gg_rct_Raider_Zeppelin )
call TriggerAddCondition( gg_trg_Raider_Zeppelin, Condition( function Trig_Raider_Zeppelin_Conditions ) )
call TriggerAddAction( gg_trg_Raider_Zeppelin, function Trig_Raider_Zeppelin_Actions )
endfunction
function Trig_Raider_Finish_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'orai' ) ) then
return false
endif
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) <= 8 ) ) then
return false
endif
return true
endfunction
function Trig_Raider_Finish_Actions takes nothing returns nothing
set udg_Player_Winner = GetOwningPlayer(GetEnteringUnit())
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisableTrigger( gg_trg_Raider_Zeppelin )
call DisableTrigger( gg_trg_Raider_Finish )
call DisableTrigger( gg_trg_Raider_Expire )
call DisableTrigger( gg_trg_Raider_Death )
call DisableTrigger( gg_trg_Raider_Zeppelin_Death )
call TriggerExecute( gg_trg_Win )
endfunction
//===========================================================================
function InitTrig_Raider_Finish takes nothing returns nothing
set gg_trg_Raider_Finish = CreateTrigger( )
call DisableTrigger( gg_trg_Raider_Finish )
call TriggerRegisterEnterRectSimple( gg_trg_Raider_Finish, gg_rct_Raider_Finish )
call TriggerAddCondition( gg_trg_Raider_Finish, Condition( function Trig_Raider_Finish_Conditions ) )
call TriggerAddAction( gg_trg_Raider_Finish, function Trig_Raider_Finish_Actions )
endfunction
function Trig_Raider_Expire_Func001002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Raider_Expire_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('orai'), function Trig_Raider_Expire_Func001002 )
endfunction
//===========================================================================
function InitTrig_Raider_Expire takes nothing returns nothing
set gg_trg_Raider_Expire = CreateTrigger( )
call DisableTrigger( gg_trg_Raider_Expire )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Raider_Expire, udg_Timer_TimeLeft )
call TriggerAddAction( gg_trg_Raider_Expire, function Trig_Raider_Expire_Actions )
endfunction
function Trig_Raider_Death_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'orai' ) ) then
return false
endif
return true
endfunction
function Trig_Raider_Death_Func001002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Raider_Death_Func002001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nzep' )
endfunction
function Trig_Raider_Death_Func002001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Raider_Death_Func002001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Raider_Death_Func002001001001002001(), Trig_Raider_Death_Func002001001001002002() )
endfunction
function Trig_Raider_Death_Func002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Raider_Death_Func002001001001002))) == 0 )
endfunction
function Trig_Raider_Death_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetDyingUnit()), 'nzep'), function Trig_Raider_Death_Func001002 )
if ( Trig_Raider_Death_Func002001() ) then
call TriggerExecute( gg_trg_Raider_Final_Death )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Raider_Death takes nothing returns nothing
set gg_trg_Raider_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Raider_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Raider_Death, Condition( function Trig_Raider_Death_Conditions ) )
call TriggerAddAction( gg_trg_Raider_Death, function Trig_Raider_Death_Actions )
endfunction
function Trig_Raider_Zeppelin_Death_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'nzep' ) ) then
return false
endif
return true
endfunction
function Trig_Raider_Zeppelin_Death_Func001002001 takes nothing returns boolean
return ( RectContainsUnit(gg_rct_Raider_Island, GetEnumUnit()) == false )
endfunction
function Trig_Raider_Zeppelin_Death_Func001002 takes nothing returns nothing
if ( Trig_Raider_Zeppelin_Death_Func001002001() ) then
call KillUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Raider_Zeppelin_Death_Func002003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Raider_Zeppelin_Death_Func002003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", GetRectCenter(gg_rct_Raider_Finish) )
endfunction
function Trig_Raider_Zeppelin_Death_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetDyingUnit()), 'orai'), function Trig_Raider_Zeppelin_Death_Func001002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Raider_Zeppelin_Death_Func002003001() ) then
call ForGroup( GetUnitsOfPlayerAndTypeId(ConvertedPlayer(GetForLoopIndexA()), 'orai'), function Trig_Raider_Zeppelin_Death_Func002003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Raider_Zeppelin_Death takes nothing returns nothing
set gg_trg_Raider_Zeppelin_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Raider_Zeppelin_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Zeppelin_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Zeppelin_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Zeppelin_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Zeppelin_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Zeppelin_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Zeppelin_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Zeppelin_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Raider_Zeppelin_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Raider_Zeppelin_Death, Condition( function Trig_Raider_Zeppelin_Death_Conditions ) )
call TriggerAddAction( gg_trg_Raider_Zeppelin_Death, function Trig_Raider_Zeppelin_Death_Actions )
endfunction
function Trig_Raider_AI_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Raider_AI_Func001003002002001 takes nothing returns boolean
return ( RectContainsUnit(gg_rct_Raider_Zeppelin, GetEnumUnit()) == true )
endfunction
function Trig_Raider_AI_Func001003002002 takes nothing returns nothing
if ( Trig_Raider_AI_Func001003002002001() ) then
call IssueTargetOrderBJ( GetEnumUnit(), "board", GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(ConvertedPlayer(GetForLoopIndexA()), 'nzep')) )
else
call DoNothing( )
endif
endfunction
function Trig_Raider_AI_Func002003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Raider_AI_Func002003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "unloadall", GetRectCenter(gg_rct_Raider_Finish) )
endfunction
function Trig_Raider_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Raider_AI_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAndTypeId(ConvertedPlayer(GetForLoopIndexA()), 'orai'), function Trig_Raider_AI_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Raider_AI_Func002003001() ) then
call ForGroup( GetUnitsOfPlayerAndTypeId(ConvertedPlayer(GetForLoopIndexA()), 'nzep'), function Trig_Raider_AI_Func002003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Raider_AI takes nothing returns nothing
set gg_trg_Raider_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Raider_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Raider_AI, 1.00 )
call TriggerAddAction( gg_trg_Raider_AI, function Trig_Raider_AI_Actions )
endfunction
function Trig_Raider_Final_Death_Func008001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'orai' )
endfunction
function Trig_Raider_Final_Death_Func008002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Raider_Final_Death_Func008002 takes nothing returns nothing
if ( Trig_Raider_Final_Death_Func008002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Raider_Final_Death_Func009001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'orai' )
endfunction
function Trig_Raider_Final_Death_Func009001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Raider_Final_Death_Func009001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Raider_Final_Death_Func009001001001002001(), Trig_Raider_Final_Death_Func009001001001002002() )
endfunction
function Trig_Raider_Final_Death_Func009001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Raider_Relay, Condition(function Trig_Raider_Final_Death_Func009001001001002))) == 1 )
endfunction
function Trig_Raider_Final_Death_Actions takes nothing returns nothing
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisableTrigger( gg_trg_Raider_Zeppelin )
call DisableTrigger( gg_trg_Raider_Finish )
call DisableTrigger( gg_trg_Raider_Expire )
call DisableTrigger( gg_trg_Raider_Death )
call DisableTrigger( gg_trg_Raider_Zeppelin_Death )
call DisableTrigger( gg_trg_Raider_Final_Death )
call ForGroup( GetUnitsInRectMatching(gg_rct_Raider_Relay, Condition(function Trig_Raider_Final_Death_Func008001002)), function Trig_Raider_Final_Death_Func008002 )
if ( Trig_Raider_Final_Death_Func009001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Raider_Final_Death takes nothing returns nothing
set gg_trg_Raider_Final_Death = CreateTrigger( )
call TriggerAddAction( gg_trg_Raider_Final_Death, function Trig_Raider_Final_Death_Actions )
endfunction
function Trig_Treant_Initialization_Func002003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Treant_Initialization_Func003002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Treant_Valley), 0 )
endfunction
function Trig_Treant_Initialization_Func004002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Treant_Initialization_Func005002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Treant_Valley )
endfunction
function Trig_Treant_Initialization_Func008003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Treant_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Treant_Initialization_Func002003001() ) then
call CreateNUnitsAtLoc( 1, 'ngno', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Treant_Valley), GetRandomReal(200.00, 400.00), GetRandomDirectionDeg()), GetRandomDirectionDeg() )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Treant_Initialization_Func003002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Treant_Valley), function Trig_Treant_Initialization_Func004002 )
call ForForce( GetPlayersAll(), function Trig_Treant_Initialization_Func005002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_130" )
call EnableTrigger( gg_trg_Treant_Death )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Treant_Initialization_Func008003001() ) then
call EnableTrigger( gg_trg_Treant_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 7.00 )
call EnableTrigger( gg_trg_Treant_Spawn )
call EnableTrigger( gg_trg_Treant_Patrol )
endfunction
//===========================================================================
function InitTrig_Treant_Initialization takes nothing returns nothing
set gg_trg_Treant_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Treant_Initialization, function Trig_Treant_Initialization_Actions )
endfunction
function Trig_Treant_Spawn_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfTypeIdAll('efon')) < 12 ) ) then
return false
endif
return true
endfunction
function Trig_Treant_Spawn_Func002002002 takes nothing returns boolean
return ( IsDestructableAliveBJ(GetFilterDestructable()) == true )
endfunction
function Trig_Treant_Spawn_Actions takes nothing returns nothing
set udg_Destructible_Selected = RandomDestructableInRectBJ(gg_rct_Treant_Valley, Condition(function Trig_Treant_Spawn_Func002002002))
call AddSpecialEffectLocBJ( GetDestructableLoc(udg_Destructible_Selected), "Abilities\\Spells\\NightElf\\TargetArtLumber\\TargetArtLumber.mdx" )
set udg_SpecialEffect_Special = GetLastCreatedEffectBJ()
call TriggerSleepAction( 2 )
call KillDestructable( udg_Destructible_Selected )
call DestroyEffectBJ( udg_SpecialEffect_Special )
call CreateNUnitsAtLoc( 1, 'efon', Player(11), GetDestructableLoc(udg_Destructible_Selected), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Treant_Spawn takes nothing returns nothing
set gg_trg_Treant_Spawn = CreateTrigger( )
call DisableTrigger( gg_trg_Treant_Spawn )
call TriggerRegisterTimerEventPeriodic( gg_trg_Treant_Spawn, 10.00 )
call TriggerAddCondition( gg_trg_Treant_Spawn, Condition( function Trig_Treant_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Treant_Spawn, function Trig_Treant_Spawn_Actions )
endfunction
function Trig_Treant_Patrol_Func001002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Treant_Patrol_Func002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetRandomLocInRect(gg_rct_Treant_Valley) )
endfunction
function Trig_Treant_Patrol_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Treant_Patrol_Func001002 )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Treant_Patrol_Func002002 )
endfunction
//===========================================================================
function InitTrig_Treant_Patrol takes nothing returns nothing
set gg_trg_Treant_Patrol = CreateTrigger( )
call DisableTrigger( gg_trg_Treant_Patrol )
call TriggerRegisterTimerEventPeriodic( gg_trg_Treant_Patrol, 2.50 )
call TriggerAddAction( gg_trg_Treant_Patrol, function Trig_Treant_Patrol_Actions )
endfunction
function Trig_Treant_Death_Func015001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'ngno' )
endfunction
function Trig_Treant_Death_Func015001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Treant_Death_Func015001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Treant_Death_Func015001001002001(), Trig_Treant_Death_Func015001001002002() )
endfunction
function Trig_Treant_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Treant_Death_Func015001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Treant_Death_Func005001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'ngno' )
endfunction
function Trig_Treant_Death_Func005002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Treant_Death_Func005002 takes nothing returns nothing
if ( Trig_Treant_Death_Func005002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Treant_Death_Func006001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'ngno' )
endfunction
function Trig_Treant_Death_Func006001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Treant_Death_Func006001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Treant_Death_Func006001001001002001(), Trig_Treant_Death_Func006001001001002002() )
endfunction
function Trig_Treant_Death_Func006001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Treant_Death_Func006001001001002))) == 1 )
endfunction
function Trig_Treant_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Treant_Spawn )
call DisableTrigger( gg_trg_Treant_Patrol )
call DisableTrigger( gg_trg_Treant_Death )
call DisableTrigger( gg_trg_Treant_AI )
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Treant_Death_Func005001002)), function Trig_Treant_Death_Func005002 )
if ( Trig_Treant_Death_Func006001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Treant_Death takes nothing returns nothing
set gg_trg_Treant_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Treant_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Treant_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Treant_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Treant_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Treant_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Treant_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Treant_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Treant_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Treant_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Treant_Death, Condition( function Trig_Treant_Death_Conditions ) )
call TriggerAddAction( gg_trg_Treant_Death, function Trig_Treant_Death_Actions )
endfunction
function Trig_Treant_AI_Func002003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Treant_AI_Func002003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), GetRandomReal(200.00, 500.00), ( AngleBetweenPoints(GetRectCenter(gg_rct_Treant_Valley), GetUnitLoc(GetEnumUnit())) + GetRandomReal(-120.00, 120.00) )) )
endfunction
function Trig_Treant_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Treant_AI_Func002003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Treant_AI_Func002003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Treant_AI takes nothing returns nothing
set gg_trg_Treant_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Treant_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Treant_AI, 2 )
call TriggerAddAction( gg_trg_Treant_AI, function Trig_Treant_AI_Actions )
endfunction
function Trig_Skeleton_Initialization_Func002003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Skeleton_Initialization_Func004002 takes nothing returns nothing
call SetUnitManaBJ( GetEnumUnit(), 200.00 )
endfunction
function Trig_Skeleton_Initialization_Func005002 takes nothing returns nothing
call UnitRemoveAbilityBJ( 'Awan', GetEnumUnit() )
endfunction
function Trig_Skeleton_Initialization_Func006002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Skeleton_Sonata), 0 )
endfunction
function Trig_Skeleton_Initialization_Func007002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Skeleton_Initialization_Func008002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Skeleton_Sonata )
endfunction
function Trig_Skeleton_Initialization_Func011003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Skeleton_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 0.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Skeleton_Initialization_Func002003001() ) then
call CreateNUnitsAtLoc( 1, 'hmpr', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Skeleton_Sonata), 300.00, GetRandomDirectionDeg()), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 4
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateCorpseLocBJ( 'ugho', Player(11), GetRandomLocInRect(gg_rct_Skeleton_Sonata) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroup( GetUnitsOfTypeIdAll('hmpr'), function Trig_Skeleton_Initialization_Func004002 )
call ForGroup( GetUnitsOfTypeIdAll('hmpr'), function Trig_Skeleton_Initialization_Func005002 )
call ForForce( GetPlayersAll(), function Trig_Skeleton_Initialization_Func006002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Skeleton_Sonata), function Trig_Skeleton_Initialization_Func007002 )
call ForForce( GetPlayersAll(), function Trig_Skeleton_Initialization_Func008002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_131" )
call EnableTrigger( gg_trg_Skeleton_Death )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Skeleton_Initialization_Func011003001() ) then
call EnableTrigger( gg_trg_Skeleton_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 6.00 )
call EnableTrigger( gg_trg_Skeleton_Spawn )
endfunction
//===========================================================================
function InitTrig_Skeleton_Initialization takes nothing returns nothing
set gg_trg_Skeleton_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Skeleton_Initialization, function Trig_Skeleton_Initialization_Actions )
endfunction
function Trig_Skeleton_Spawn_Actions takes nothing returns nothing
set udg_Unit_Target = GroupPickRandomUnit(GetUnitsOfTypeIdAll('ugho'))
call CreateNUnitsAtLoc( 3, 'uske', Player(11), GetUnitLoc(udg_Unit_Target), bj_UNIT_FACING )
call RemoveUnit( udg_Unit_Target )
call AddSpecialEffectLocBJ( GetUnitLoc(udg_Unit_Target), "Doodads\\Cinematic\\Lightningbolt\\Lightningbolt.mdx" )
set udg_SpecialEffect_Special = GetLastCreatedEffectBJ()
call SetSoundPositionLocBJ( gg_snd_LightningBolt, GetUnitLoc(udg_Unit_Target), 0 )
call PlaySoundBJ( gg_snd_LightningBolt )
call TriggerSleepAction( 0.50 )
call DestroyEffectBJ( udg_SpecialEffect_Special )
call CreateCorpseLocBJ( 'ugho', Player(11), GetRandomLocInRect(gg_rct_Skeleton_Sonata) )
endfunction
//===========================================================================
function InitTrig_Skeleton_Spawn takes nothing returns nothing
set gg_trg_Skeleton_Spawn = CreateTrigger( )
call DisableTrigger( gg_trg_Skeleton_Spawn )
call TriggerRegisterTimerEventPeriodic( gg_trg_Skeleton_Spawn, 2.50 )
call TriggerAddAction( gg_trg_Skeleton_Spawn, function Trig_Skeleton_Spawn_Actions )
endfunction
function Trig_Skeleton_Death_Func014001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hmpr' )
endfunction
function Trig_Skeleton_Death_Func014001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Skeleton_Death_Func014001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Skeleton_Death_Func014001001002001(), Trig_Skeleton_Death_Func014001001002002() )
endfunction
function Trig_Skeleton_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Skeleton_Death_Func014001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Skeleton_Death_Func004001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hmpr' )
endfunction
function Trig_Skeleton_Death_Func004002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Skeleton_Death_Func004002 takes nothing returns nothing
if ( Trig_Skeleton_Death_Func004002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Skeleton_Death_Func005001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hmpr' )
endfunction
function Trig_Skeleton_Death_Func005001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Skeleton_Death_Func005001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Skeleton_Death_Func005001001001002001(), Trig_Skeleton_Death_Func005001001001002002() )
endfunction
function Trig_Skeleton_Death_Func005001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Skeleton_Death_Func005001001001002))) == 1 )
endfunction
function Trig_Skeleton_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Skeleton_Spawn )
call DisableTrigger( gg_trg_Skeleton_Death )
call DisableTrigger( gg_trg_Skeleton_AI )
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Skeleton_Death_Func004001002)), function Trig_Skeleton_Death_Func004002 )
if ( Trig_Skeleton_Death_Func005001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Skeleton_Death takes nothing returns nothing
set gg_trg_Skeleton_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Skeleton_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Skeleton_Death, Condition( function Trig_Skeleton_Death_Conditions ) )
call TriggerAddAction( gg_trg_Skeleton_Death, function Trig_Skeleton_Death_Actions )
endfunction
function Trig_Skeleton_AI_Func002003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Skeleton_AI_Func002003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", GetRandomLocInRect(gg_rct_Skeleton_Sonata) )
endfunction
function Trig_Skeleton_AI_Func004003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Skeleton_AI_Func004003002002003001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'uske' )
endfunction
function Trig_Skeleton_AI_Func004003002002 takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "dispel", GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Skeleton_AI_Func004003002002003001003))) )
endfunction
function Trig_Skeleton_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Skeleton_AI_Func002003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Skeleton_AI_Func002003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 1.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Skeleton_AI_Func004003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Skeleton_AI_Func004003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Skeleton_AI takes nothing returns nothing
set gg_trg_Skeleton_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Skeleton_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Skeleton_AI, 2 )
call TriggerAddAction( gg_trg_Skeleton_AI, function Trig_Skeleton_AI_Actions )
endfunction
function Trig_Jump_Initialization_Func002003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Jump_Initialization_Func007002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_LIGHT_GRAY )
endfunction
function Trig_Jump_Initialization_Func008002 takes nothing returns nothing
call SetUnitPathing( GetEnumUnit(), false )
endfunction
function Trig_Jump_Initialization_Func009002 takes nothing returns nothing
call UnitRemoveAbilityBJ( 'ANpi', GetEnumUnit() )
endfunction
function Trig_Jump_Initialization_Func011002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), OffsetLocation(GetRectCenter(gg_rct_Jump_Rope), -384.00, 0), 0 )
endfunction
function Trig_Jump_Initialization_Func012002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Jump_Rope )
endfunction
function Trig_Jump_Initialization_Func017002 takes nothing returns nothing
call SetUnitMoveSpeed( GetEnumUnit(), 200.00 )
endfunction
function Trig_Jump_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Jump_Initialization_Func002003001() ) then
call CreateNUnitsAtLoc( 1, 'nftr', ConvertedPlayer(GetForLoopIndexA()), OffsetLocation(GetRectCenter(gg_rct_Jump_Rope), -384.00, GetRandomReal(-192.00, 192.00)), 0.00 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), OffsetLocation(GetRectCenter(gg_rct_Jump_Rope), 640.00, 192.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), OffsetLocation(GetRectCenter(gg_rct_Jump_Rope), 640.00, 64.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), OffsetLocation(GetRectCenter(gg_rct_Jump_Rope), 640.00, -64.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), OffsetLocation(GetRectCenter(gg_rct_Jump_Rope), 640.00, -192.00), bj_UNIT_FACING )
call ForGroup( GetUnitsOfTypeIdAll('ewsp'), function Trig_Jump_Initialization_Func007002 )
call ForGroup( GetUnitsInRectAll(GetEntireMapRect()), function Trig_Jump_Initialization_Func008002 )
call ForGroup( GetUnitsOfTypeIdAll('ewsp'), function Trig_Jump_Initialization_Func009002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Reals_JumpVelocity[GetForLoopIndexA()] = 75.00
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Jump_Initialization_Func011002 )
call ForForce( GetPlayersAll(), function Trig_Jump_Initialization_Func012002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_139" )
call EnableTrigger( gg_trg_Jump_Command )
call EnableTrigger( gg_trg_Jump_Physics )
call TriggerSleepAction( 7.00 )
call ForGroup( GetUnitsOfTypeIdAll('ewsp'), function Trig_Jump_Initialization_Func017002 )
call EnableTrigger( gg_trg_Jump_Body )
endfunction
//===========================================================================
function InitTrig_Jump_Initialization takes nothing returns nothing
set gg_trg_Jump_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Jump_Initialization, function Trig_Jump_Initialization_Actions )
endfunction
function Trig_Jump_Command_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("stop") ) ) then
return false
endif
if ( not ( udg_Reals_JumpVelocity[GetConvertedPlayerId(GetOwningPlayer(GetOrderedUnit()))] == -50.00 ) ) then
return false
endif
return true
endfunction
function Trig_Jump_Command_Actions takes nothing returns nothing
set udg_Reals_JumpVelocity[GetConvertedPlayerId(GetOwningPlayer(GetOrderedUnit()))] = 75.00
endfunction
//===========================================================================
function InitTrig_Jump_Command takes nothing returns nothing
set gg_trg_Jump_Command = CreateTrigger( )
call DisableTrigger( gg_trg_Jump_Command )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Jump_Command, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Jump_Command, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Jump_Command, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Jump_Command, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Jump_Command, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Jump_Command, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Jump_Command, Player(6), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Jump_Command, Player(7), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Jump_Command, Condition( function Trig_Jump_Command_Conditions ) )
call TriggerAddAction( gg_trg_Jump_Command, function Trig_Jump_Command_Actions )
endfunction
function Trig_Jump_Physics_Func001002001 takes nothing returns boolean
return ( RectContainsUnit(gg_rct_Jump_Rope, GetEnumUnit()) == false )
endfunction
function Trig_Jump_Physics_Func001002 takes nothing returns nothing
if ( Trig_Jump_Physics_Func001002001() ) then
call KillUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Jump_Physics_Func002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nftr' )
endfunction
function Trig_Jump_Physics_Func002002 takes nothing returns nothing
call SetUnitFlyHeightBJ( GetEnumUnit(), ( GetUnitFlyHeight(GetEnumUnit()) + udg_Reals_JumpVelocity[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] ), RAbsBJ(( udg_Reals_JumpVelocity[GetConvertedPlayerId(GetOwningPlayer(GetOrderedUnit()))] * ( 0.40 * udg_Reals_JumpVelocity[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] ) )) )
endfunction
function Trig_Jump_Physics_Func003001002 takes nothing returns boolean
return ( GetUnitFlyHeight(GetFilterUnit()) > 0.01 )
endfunction
function Trig_Jump_Physics_Func003002 takes nothing returns nothing
set udg_Reals_JumpVelocity[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = ( udg_Reals_JumpVelocity[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] - 5.00 )
endfunction
function Trig_Jump_Physics_Func004003001 takes nothing returns boolean
return ( udg_Reals_JumpVelocity[GetForLoopIndexA()] < -50.00 )
endfunction
function Trig_Jump_Physics_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('nftr'), function Trig_Jump_Physics_Func001002 )
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Jump_Physics_Func002001002)), function Trig_Jump_Physics_Func002002 )
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Jump_Physics_Func003001002)), function Trig_Jump_Physics_Func003002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Jump_Physics_Func004003001() ) then
set udg_Reals_JumpVelocity[GetForLoopIndexA()] = -50.00
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Jump_Physics takes nothing returns nothing
set gg_trg_Jump_Physics = CreateTrigger( )
call DisableTrigger( gg_trg_Jump_Physics )
call TriggerRegisterTimerEventPeriodic( gg_trg_Jump_Physics, 0.05 )
call TriggerAddAction( gg_trg_Jump_Physics, function Trig_Jump_Physics_Actions )
endfunction
function Trig_Jump_Body_Func001002 takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), OffsetLocation(GetUnitLoc(GetEnumUnit()), ( GetUnitMoveSpeed(GetEnumUnit()) / -5.00 ), 0) )
endfunction
function Trig_Jump_Body_Func002002001 takes nothing returns boolean
return ( GetLocationX(GetUnitLoc(GetEnumUnit())) < GetLocationX(OffsetLocation(GetRectCenter(gg_rct_Jump_Rope), -640.00, 0)) )
endfunction
function Trig_Jump_Body_Func002002 takes nothing returns nothing
if ( Trig_Jump_Body_Func002002001() ) then
call ConditionalTriggerExecute( gg_trg_Jump_Death )
else
call DoNothing( )
endif
endfunction
function Trig_Jump_Body_Func003002001 takes nothing returns boolean
return ( GetLocationX(GetUnitLoc(GetEnumUnit())) < GetLocationX(OffsetLocation(GetRectCenter(gg_rct_Jump_Rope), -640.00, 0)) )
endfunction
function Trig_Jump_Body_Func003002002001 takes nothing returns boolean
return ( IsUnitHiddenBJ(GetEnumUnit()) == true )
endfunction
function Trig_Jump_Body_Func003002 takes nothing returns nothing
if ( Trig_Jump_Body_Func003002001() ) then
if ( Trig_Jump_Body_Func003002002001() ) then
call ShowUnitShow( GetEnumUnit() )
else
call ShowUnitHide( GetEnumUnit() )
endif
else
call DoNothing( )
endif
endfunction
function Trig_Jump_Body_Func004002001 takes nothing returns boolean
return ( GetLocationX(GetUnitLoc(GetEnumUnit())) < GetLocationX(OffsetLocation(GetRectCenter(gg_rct_Jump_Rope), -640.00, 0)) )
endfunction
function Trig_Jump_Body_Func004002002002 takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), Location(( GetRectCenterX(gg_rct_Jump_Rope) + 640.00 ), GetLocationY(GetUnitLoc(GetEnumUnit()))) )
endfunction
function Trig_Jump_Body_Func004002 takes nothing returns nothing
if ( Trig_Jump_Body_Func004002001() ) then
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Jump_Body_Func004002002002 )
else
call DoNothing( )
endif
endfunction
function Trig_Jump_Body_Func005001 takes nothing returns boolean
return ( IsUnitHiddenBJ(GroupPickRandomUnit(GetUnitsOfTypeIdAll('ewsp'))) == true )
endfunction
function Trig_Jump_Body_Func006002001 takes nothing returns boolean
return ( GetUnitFlyHeight(GetEnumUnit()) < 25.00 )
endfunction
function Trig_Jump_Body_Func006002002001001001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'ewsp' )
endfunction
function Trig_Jump_Body_Func006002002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(96.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Jump_Body_Func006002002001001001003))) > 0 )
endfunction
function Trig_Jump_Body_Func006002 takes nothing returns nothing
if ( Trig_Jump_Body_Func006002001() ) then
if ( Trig_Jump_Body_Func006002002001() ) then
call KillUnit( GetEnumUnit() )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
endfunction
function Trig_Jump_Body_Func007002 takes nothing returns nothing
call SetUnitMoveSpeed( GetEnumUnit(), ( GetUnitMoveSpeed(GetEnumUnit()) + 0.10 ) )
endfunction
function Trig_Jump_Body_Func008003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Jump_Body_Func008003002002001001001003 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(11) )
endfunction
function Trig_Jump_Body_Func008003002002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(512.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Jump_Body_Func008003002002001001001003))) > 0 )
endfunction
function Trig_Jump_Body_Func008003002002002001 takes nothing returns boolean
return ( GetRandomInt(1, 3) == 1 )
endfunction
function Trig_Jump_Body_Func008003002002 takes nothing returns nothing
if ( Trig_Jump_Body_Func008003002002001() ) then
if ( Trig_Jump_Body_Func008003002002002001() ) then
call IssueImmediateOrderBJ( GetEnumUnit(), "stop" )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
endfunction
function Trig_Jump_Body_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Jump_Body_Func001002 )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Jump_Body_Func002002 )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Jump_Body_Func003002 )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Jump_Body_Func004002 )
if ( Trig_Jump_Body_Func005001() ) then
return
else
call DoNothing( )
endif
call ForGroup( GetUnitsOfTypeIdAll('nftr'), function Trig_Jump_Body_Func006002 )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Jump_Body_Func007002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Jump_Body_Func008003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Jump_Body_Func008003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Jump_Body takes nothing returns nothing
set gg_trg_Jump_Body = CreateTrigger( )
call DisableTrigger( gg_trg_Jump_Body )
call TriggerRegisterTimerEventPeriodic( gg_trg_Jump_Body, 0.05 )
call TriggerAddAction( gg_trg_Jump_Body, function Trig_Jump_Body_Actions )
endfunction
function Trig_Jump_Death_Func001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nftr' )
endfunction
function Trig_Jump_Death_Func001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Jump_Death_Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Jump_Death_Func001001001002001(), Trig_Jump_Death_Func001001001002002() )
endfunction
function Trig_Jump_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Jump_Death_Func001001001002))) <= 1 ) ) then
return false
endif
if ( not ( GetTriggerExecCount(GetTriggeringTrigger()) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Jump_Death_Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Jump_Death_Func007001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nftr' )
endfunction
function Trig_Jump_Death_Func007002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Jump_Death_Func007002 takes nothing returns nothing
if ( Trig_Jump_Death_Func007002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Jump_Death_Func008001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nftr' )
endfunction
function Trig_Jump_Death_Func008001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Jump_Death_Func008001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Jump_Death_Func008001001001002001(), Trig_Jump_Death_Func008001001001002002() )
endfunction
function Trig_Jump_Death_Func008001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Jump_Rope, Condition(function Trig_Jump_Death_Func008001001001002))) == 1 )
endfunction
function Trig_Jump_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Jump_Command )
call DisableTrigger( gg_trg_Jump_Death )
call DisableTrigger( gg_trg_Jump_Body )
call ForGroup( GetUnitsOfTypeIdAll('ewsp'), function Trig_Jump_Death_Func006002 )
call ForGroup( GetUnitsInRectMatching(gg_rct_Jump_Rope, Condition(function Trig_Jump_Death_Func007001002)), function Trig_Jump_Death_Func007002 )
if ( Trig_Jump_Death_Func008001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
call TriggerSleepAction( 1.00 )
call DisableTrigger( gg_trg_Jump_Physics )
endfunction
//===========================================================================
function InitTrig_Jump_Death takes nothing returns nothing
set gg_trg_Jump_Death = CreateTrigger( )
call TriggerAddCondition( gg_trg_Jump_Death, Condition( function Trig_Jump_Death_Conditions ) )
call TriggerAddAction( gg_trg_Jump_Death, function Trig_Jump_Death_Actions )
endfunction
function Trig_Stop_Initialization_Func003003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Stop_Initialization_Func015002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Stop_and_Go), 0 )
endfunction
function Trig_Stop_Initialization_Func016003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Stop_Initialization_Func017002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Stop_and_Go )
endfunction
function Trig_Stop_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 0.00 )
call UseTimeOfDayBJ( true )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Stop_Initialization_Func003003001() ) then
call CreateNUnitsAtLoc( 1, 'nsea', ConvertedPlayer(GetForLoopIndexA()), OffsetLocation(GetRectCenter(gg_rct_Stop_and_Go), GetRandomReal(-128.00, 128.00), -512.00), 90.00 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call CreateNUnitsAtLoc( 1, 'uzg1', Player(11), OffsetLocation(GetRectCenter(gg_rct_Stop_and_Go), -384.00, 512.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'uzg1', Player(11), OffsetLocation(GetRectCenter(gg_rct_Stop_and_Go), 384.00, 512.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'uzg1', Player(11), OffsetLocation(GetRectCenter(gg_rct_Stop_and_Go), -384.00, 256.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'uzg1', Player(11), OffsetLocation(GetRectCenter(gg_rct_Stop_and_Go), 384.00, 256.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'uzg1', Player(11), OffsetLocation(GetRectCenter(gg_rct_Stop_and_Go), -384.00, 0.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'uzg1', Player(11), OffsetLocation(GetRectCenter(gg_rct_Stop_and_Go), 384.00, 0.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'uzg1', Player(11), OffsetLocation(GetRectCenter(gg_rct_Stop_and_Go), -384.00, -256.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'uzg1', Player(11), OffsetLocation(GetRectCenter(gg_rct_Stop_and_Go), 384.00, -256.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'uzg1', Player(11), OffsetLocation(GetRectCenter(gg_rct_Stop_and_Go), -384.00, -512.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'uzg1', Player(11), OffsetLocation(GetRectCenter(gg_rct_Stop_and_Go), 384.00, -512.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(gg_rct_Stop_Finish), bj_UNIT_FACING )
call ForForce( GetPlayersAll(), function Trig_Stop_Initialization_Func015002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Stop_Initialization_Func016003001() ) then
call PanCameraToTimedLocForPlayer( ConvertedPlayer(GetForLoopIndexA()), OffsetLocation(GetRectCenter(gg_rct_Stop_and_Go), 0.00, -512.00), 0.00 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Stop_Initialization_Func017002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_144" )
call EnableTrigger( gg_trg_Dawn )
call EnableTrigger( gg_trg_Stop_Finish )
call EnableTrigger( gg_trg_Stop_Final_Death )
call EnableTrigger( gg_trg_Stop_AI )
call TriggerExecute( gg_trg_Stop_Red_Light )
endfunction
//===========================================================================
function InitTrig_Stop_Initialization takes nothing returns nothing
set gg_trg_Stop_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Stop_Initialization, function Trig_Stop_Initialization_Actions )
endfunction
function Trig_Stop_Finish_Conditions takes nothing returns boolean
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) <= 8 ) ) then
return false
endif
return true
endfunction
function Trig_Stop_Finish_Actions takes nothing returns nothing
set udg_Player_Winner = GetOwningPlayer(GetEnteringUnit())
call UseTimeOfDayBJ( false )
call DisableTrigger( gg_trg_Dawn )
call DisableTrigger( gg_trg_Stop_Finish )
call DisableTrigger( gg_trg_Stop_Final_Death )
call TriggerExecute( gg_trg_Win )
endfunction
//===========================================================================
function InitTrig_Stop_Finish takes nothing returns nothing
set gg_trg_Stop_Finish = CreateTrigger( )
call DisableTrigger( gg_trg_Stop_Finish )
call TriggerRegisterEnterRectSimple( gg_trg_Stop_Finish, gg_rct_Stop_Finish )
call TriggerAddCondition( gg_trg_Stop_Finish, Condition( function Trig_Stop_Finish_Conditions ) )
call TriggerAddAction( gg_trg_Stop_Finish, function Trig_Stop_Finish_Actions )
endfunction
function Trig_Stop_Final_Death_Func002001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nsea' )
endfunction
function Trig_Stop_Final_Death_Func002001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Stop_Final_Death_Func002001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Stop_Final_Death_Func002001001002001(), Trig_Stop_Final_Death_Func002001001002002() )
endfunction
function Trig_Stop_Final_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Stop_Final_Death_Func002001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Stop_Final_Death_Actions takes nothing returns nothing
call UseTimeOfDayBJ( false )
call DisableTrigger( gg_trg_Dawn )
call DisableTrigger( gg_trg_Stop_Finish )
call DisableTrigger( gg_trg_Stop_Final_Death )
call TriggerExecute( gg_trg_Draw )
endfunction
//===========================================================================
function InitTrig_Stop_Final_Death takes nothing returns nothing
set gg_trg_Stop_Final_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Stop_Final_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Stop_Final_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Stop_Final_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Stop_Final_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Stop_Final_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Stop_Final_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Stop_Final_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Stop_Final_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Stop_Final_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Stop_Final_Death, Condition( function Trig_Stop_Final_Death_Conditions ) )
call TriggerAddAction( gg_trg_Stop_Final_Death, function Trig_Stop_Final_Death_Actions )
endfunction
function Trig_Stop_AI_Func002003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Stop_AI_Func002003002002001 takes nothing returns boolean
return ( GetRandomInt(1, 4) == 1 )
endfunction
function Trig_Stop_AI_Func002003002002 takes nothing returns nothing
if ( Trig_Stop_AI_Func002003002002001() ) then
call IssueImmediateOrderBJ( GetEnumUnit(), "stop" )
else
call DoNothing( )
endif
endfunction
function Trig_Stop_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Stop_AI_Func002003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Stop_AI_Func002003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Stop_AI takes nothing returns nothing
set gg_trg_Stop_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Stop_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Stop_AI, 0.25 )
call TriggerAddAction( gg_trg_Stop_AI, function Trig_Stop_AI_Actions )
endfunction
function Trig_Stop_Green_Light_Func001002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Stop_Green_Light_Func002002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_GREEN )
endfunction
function Trig_Stop_Green_Light_Func004003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Stop_Green_Light_Func004003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", GetRectCenter(gg_rct_Stop_Finish) )
endfunction
function Trig_Stop_Green_Light_Func006001 takes nothing returns boolean
return ( IsTriggerEnabled(gg_trg_Stop_Finish) == false )
endfunction
function Trig_Stop_Green_Light_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Stop_Green_Light_Func001002 )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Stop_Green_Light_Func002002 )
call DisableTrigger( gg_trg_Stop_AI )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Stop_Green_Light_Func004003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Stop_Green_Light_Func004003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( GetRandomReal(3.00, 5.00) )
if ( Trig_Stop_Green_Light_Func006001() ) then
return
else
call DoNothing( )
endif
call TriggerExecute( gg_trg_Stop_Yellow_Light )
endfunction
//===========================================================================
function InitTrig_Stop_Green_Light takes nothing returns nothing
set gg_trg_Stop_Green_Light = CreateTrigger( )
call TriggerAddAction( gg_trg_Stop_Green_Light, function Trig_Stop_Green_Light_Actions )
endfunction
function Trig_Stop_Yellow_Light_Func001002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_YELLOW )
endfunction
function Trig_Stop_Yellow_Light_Func004001 takes nothing returns boolean
return ( IsTriggerEnabled(gg_trg_Stop_Finish) == false )
endfunction
function Trig_Stop_Yellow_Light_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Stop_Yellow_Light_Func001002 )
call EnableTrigger( gg_trg_Stop_AI )
call TriggerSleepAction( 1.00 )
if ( Trig_Stop_Yellow_Light_Func004001() ) then
return
else
call DoNothing( )
endif
call TriggerExecute( gg_trg_Stop_Red_Light )
endfunction
//===========================================================================
function InitTrig_Stop_Yellow_Light takes nothing returns nothing
set gg_trg_Stop_Yellow_Light = CreateTrigger( )
call TriggerAddAction( gg_trg_Stop_Yellow_Light, function Trig_Stop_Yellow_Light_Actions )
endfunction
function Trig_Stop_Red_Light_Func001002 takes nothing returns nothing
call SetUnitColor( GetEnumUnit(), PLAYER_COLOR_RED )
endfunction
function Trig_Stop_Red_Light_Func002002 takes nothing returns nothing
call PauseUnitBJ( false, GetEnumUnit() )
endfunction
function Trig_Stop_Red_Light_Func004001 takes nothing returns boolean
return ( IsTriggerEnabled(gg_trg_Stop_Finish) == false )
endfunction
function Trig_Stop_Red_Light_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Stop_Red_Light_Func001002 )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Stop_Red_Light_Func002002 )
call TriggerSleepAction( GetRandomReal(5.00, 10.00) )
if ( Trig_Stop_Red_Light_Func004001() ) then
return
else
call DoNothing( )
endif
call TriggerExecute( gg_trg_Stop_Green_Light )
endfunction
//===========================================================================
function InitTrig_Stop_Red_Light takes nothing returns nothing
set gg_trg_Stop_Red_Light = CreateTrigger( )
call TriggerAddAction( gg_trg_Stop_Red_Light, function Trig_Stop_Red_Light_Actions )
endfunction
function Trig_Push_Initialization_Func009003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Push_Initialization_Func010003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Push_Initialization_Func012002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Push_the_Ogre), 0 )
endfunction
function Trig_Push_Initialization_Func013002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Push_Initialization_Func014002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Push_the_Ogre )
endfunction
function Trig_Push_Initialization_Actions takes nothing returns nothing
set udg_Regions_Current[1] = gg_rct_Push_1
set udg_Regions_Current[2] = gg_rct_Push_2
set udg_Regions_Current[3] = gg_rct_Push_3
set udg_Regions_Current[4] = gg_rct_Push_4
set udg_Regions_Current[5] = gg_rct_Push_5
set udg_Regions_Current[6] = gg_rct_Push_6
set udg_Regions_Current[7] = gg_rct_Push_7
set udg_Regions_Current[8] = gg_rct_Push_8
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Push_Initialization_Func009003001() ) then
call CreateNUnitsAtLoc( 1, 'ncop', ConvertedPlayer(GetForLoopIndexA()), GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Push_Initialization_Func010003001() ) then
call CreateNUnitsAtLoc( 1, 'hkni', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), 200.00, AngleBetweenPoints(GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), GetRectCenter(gg_rct_Push_the_Ogre))), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call CreateNUnitsAtLoc( 1, 'nogr', Player(11), GetRectCenter(gg_rct_Push_the_Ogre), bj_UNIT_FACING )
call ForForce( GetPlayersAll(), function Trig_Push_Initialization_Func012002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Push_the_Ogre), function Trig_Push_Initialization_Func013002 )
call ForForce( GetPlayersAll(), function Trig_Push_Initialization_Func014002 )
call StartTimerBJ( udg_Timer_TimeLeft, false, 120.00 )
call CreateTimerDialogBJ( GetLastCreatedTimerBJ(), "TRIGSTR_149" )
call TimerDialogDisplayBJ( true, GetLastCreatedTimerDialogBJ() )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_148" )
call EnableTrigger( gg_trg_Push_Death )
call EnableTrigger( gg_trg_Push_Finish )
call EnableTrigger( gg_trg_Push_Expire )
call TriggerExecute( gg_trg_Push_Gas )
call TriggerSleepAction( 3.00 )
call EnableTrigger( gg_trg_Push_AI )
endfunction
//===========================================================================
function InitTrig_Push_Initialization takes nothing returns nothing
set gg_trg_Push_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Push_Initialization, function Trig_Push_Initialization_Actions )
endfunction
function Trig_Push_Poison_Func001001003 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) != Player(11) )
endfunction
function Trig_Push_Poison_Func001002 takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 100.00 ) )
endfunction
function Trig_Push_Poison_Func002003 takes nothing returns nothing
call KillDestructable( GetEnumDestructable() )
endfunction
function Trig_Push_Poison_Actions takes nothing returns nothing
call ForGroup( GetUnitsInRangeOfLocMatching(192.00, udg_Point_Death, Condition(function Trig_Push_Poison_Func001001003)), function Trig_Push_Poison_Func001002 )
call EnumDestructablesInCircleBJ( 192.00, udg_Point_Death, function Trig_Push_Poison_Func002003 )
endfunction
//===========================================================================
function InitTrig_Push_Poison takes nothing returns nothing
set gg_trg_Push_Poison = CreateTrigger( )
call DisableTrigger( gg_trg_Push_Poison )
call TriggerRegisterTimerEventPeriodic( gg_trg_Push_Poison, 0.05 )
call TriggerAddAction( gg_trg_Push_Poison, function Trig_Push_Poison_Actions )
endfunction
function Trig_Push_Death_Func001001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'ncop' )
endfunction
function Trig_Push_Death_Func001002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Push_Death_Func002001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hkni' )
endfunction
function Trig_Push_Death_Func002001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Push_Death_Func002001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Push_Death_Func002001001001002001(), Trig_Push_Death_Func002001001001002002() )
endfunction
function Trig_Push_Death_Func002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Push_Death_Func002001001001002))) > 0 )
endfunction
function Trig_Push_Death_Actions takes nothing returns nothing
call ForGroup( GetUnitsInRectMatching(udg_Regions_Current[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))], Condition(function Trig_Push_Death_Func001001002)), function Trig_Push_Death_Func001002 )
if ( Trig_Push_Death_Func002001() ) then
return
else
call DoNothing( )
endif
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisableTrigger( gg_trg_Push_Poison )
call DisableTrigger( gg_trg_Push_Death )
call DisableTrigger( gg_trg_Push_Finish )
call DisableTrigger( gg_trg_Push_Expire )
call DisableTrigger( gg_trg_Push_AI )
call TriggerExecute( gg_trg_Draw )
endfunction
//===========================================================================
function InitTrig_Push_Death takes nothing returns nothing
set gg_trg_Push_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Push_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Push_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Push_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Push_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Push_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Push_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Push_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Push_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Push_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Push_Death, function Trig_Push_Death_Actions )
endfunction
function Trig_Push_Finish_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'nogr' ) ) then
return false
endif
return true
endfunction
function Trig_Push_Finish_Func001001001001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'ncop' )
endfunction
function Trig_Push_Finish_Func001001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(256.00, GetUnitLoc(GetEnteringUnit()), Condition(function Trig_Push_Finish_Func001001001001003))) == 0 )
endfunction
function Trig_Push_Finish_Func003002001001001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nogr' )
endfunction
function Trig_Push_Finish_Func003002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(200.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Push_Finish_Func003002001001001003))) > 0 )
endfunction
function Trig_Push_Finish_Func003002 takes nothing returns nothing
if ( Trig_Push_Finish_Func003002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Push_Finish_Func004002001001001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nogr' )
endfunction
function Trig_Push_Finish_Func004002001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(200.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Push_Finish_Func004002001001001003))) > 0 )
endfunction
function Trig_Push_Finish_Func004002 takes nothing returns nothing
if ( Trig_Push_Finish_Func004002001() ) then
call SetUnitOwner( GroupPickRandomUnit(GetUnitsOfTypeIdAll('nogr')), GetOwningPlayer(GetEnumUnit()), false )
else
call DoNothing( )
endif
endfunction
function Trig_Push_Finish_Actions takes nothing returns nothing
if ( Trig_Push_Finish_Func001001() ) then
return
else
call DoNothing( )
endif
call ForGroup( GetUnitsOfTypeIdAll('ncop'), function Trig_Push_Finish_Func003002 )
call ForGroup( GetUnitsOfTypeIdAll('ncop'), function Trig_Push_Finish_Func004002 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisableTrigger( gg_trg_Push_Poison )
call DisableTrigger( gg_trg_Push_Death )
call DisableTrigger( gg_trg_Push_Finish )
call DisableTrigger( gg_trg_Push_Expire )
call DisableTrigger( gg_trg_Push_AI )
call TriggerExecute( gg_trg_Win )
endfunction
//===========================================================================
function InitTrig_Push_Finish takes nothing returns nothing
set gg_trg_Push_Finish = CreateTrigger( )
call DisableTrigger( gg_trg_Push_Finish )
call TriggerRegisterEnterRectSimple( gg_trg_Push_Finish, gg_rct_Push_1 )
call TriggerRegisterEnterRectSimple( gg_trg_Push_Finish, gg_rct_Push_2 )
call TriggerRegisterEnterRectSimple( gg_trg_Push_Finish, gg_rct_Push_3 )
call TriggerRegisterEnterRectSimple( gg_trg_Push_Finish, gg_rct_Push_4 )
call TriggerRegisterEnterRectSimple( gg_trg_Push_Finish, gg_rct_Push_5 )
call TriggerRegisterEnterRectSimple( gg_trg_Push_Finish, gg_rct_Push_6 )
call TriggerRegisterEnterRectSimple( gg_trg_Push_Finish, gg_rct_Push_7 )
call TriggerRegisterEnterRectSimple( gg_trg_Push_Finish, gg_rct_Push_8 )
call TriggerAddCondition( gg_trg_Push_Finish, Condition( function Trig_Push_Finish_Conditions ) )
call TriggerAddAction( gg_trg_Push_Finish, function Trig_Push_Finish_Actions )
endfunction
function Trig_Push_Expire_Func001002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Push_Expire_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('hkni'), function Trig_Push_Expire_Func001002 )
endfunction
//===========================================================================
function InitTrig_Push_Expire takes nothing returns nothing
set gg_trg_Push_Expire = CreateTrigger( )
call DisableTrigger( gg_trg_Push_Expire )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Push_Expire, udg_Timer_TimeLeft )
call TriggerAddAction( gg_trg_Push_Expire, function Trig_Push_Expire_Actions )
endfunction
function Trig_Push_AI_Func002003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Push_AI_Func002003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", PolarProjectionBJ(GetUnitLoc(GroupPickRandomUnit(GetUnitsOfTypeIdAll('nogr'))), 64.00, AngleBetweenPoints(GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(ConvertedPlayer(GetForLoopIndexA()), 'ncop'))), GetUnitLoc(GroupPickRandomUnit(GetUnitsOfTypeIdAll('nogr'))))) )
endfunction
function Trig_Push_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Push_AI_Func002003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Push_AI_Func002003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Push_AI takes nothing returns nothing
set gg_trg_Push_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Push_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Push_AI, 3.00 )
call TriggerAddAction( gg_trg_Push_AI, function Trig_Push_AI_Actions )
endfunction
function Trig_Push_Gas_Func002001 takes nothing returns boolean
return ( IsTriggerEnabled(gg_trg_Push_Finish) == false )
endfunction
function Trig_Push_Gas_Actions takes nothing returns nothing
call TriggerSleepAction( GetRandomReal(6.00, 8.00) )
if ( Trig_Push_Gas_Func002001() ) then
return
else
call DoNothing( )
endif
call TriggerExecute( gg_trg_Push_Gas_2 )
endfunction
//===========================================================================
function InitTrig_Push_Gas takes nothing returns nothing
set gg_trg_Push_Gas = CreateTrigger( )
call TriggerAddAction( gg_trg_Push_Gas, function Trig_Push_Gas_Actions )
endfunction
function Trig_Push_Gas_2_Func003003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Push_Gas_2_Func003003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), GetRandomReal(300.00, 400.00), GetRandomDirectionDeg()) )
endfunction
function Trig_Push_Gas_2_Func004002 takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "overhead", GetEnumUnit(), "Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl" )
endfunction
function Trig_Push_Gas_2_Func006001 takes nothing returns boolean
return ( IsTriggerEnabled(gg_trg_Push_Finish) == false )
endfunction
function Trig_Push_Gas_2_Func010002 takes nothing returns nothing
set udg_Point_Death = PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), 64.00, ( GetUnitFacing(GetEnumUnit()) + 180.00 ))
endfunction
function Trig_Push_Gas_2_Actions takes nothing returns nothing
call PlaySoundBJ( gg_snd_KodoBeastPuke1 )
call DisableTrigger( gg_trg_Push_AI )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Push_Gas_2_Func003003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Push_Gas_2_Func003003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroup( GetUnitsOfTypeIdAll('nogr'), function Trig_Push_Gas_2_Func004002 )
call TriggerSleepAction( 1.00 )
if ( Trig_Push_Gas_2_Func006001() ) then
return
else
call DoNothing( )
endif
call StopSoundBJ( gg_snd_KodoBeastPuke1, false )
call PlaySoundBJ( gg_snd_OgrePissed5 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call ForGroup( GetUnitsOfTypeIdAll('nogr'), function Trig_Push_Gas_2_Func010002 )
call AddSpecialEffectLocBJ( udg_Point_Death, "Abilities\\Spells\\Undead\\PlagueCloud\\PlagueCloudCaster.mdx" )
call EnableTrigger( gg_trg_Push_Poison )
call TriggerExecute( gg_trg_Push_Gas_3 )
endfunction
//===========================================================================
function InitTrig_Push_Gas_2 takes nothing returns nothing
set gg_trg_Push_Gas_2 = CreateTrigger( )
call TriggerAddAction( gg_trg_Push_Gas_2, function Trig_Push_Gas_2_Actions )
endfunction
function Trig_Push_Gas_3_Func004001 takes nothing returns boolean
return ( IsTriggerEnabled(gg_trg_Push_Finish) == false )
endfunction
function Trig_Push_Gas_3_Actions takes nothing returns nothing
call TriggerSleepAction( 2 )
call DisableTrigger( gg_trg_Push_Poison )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
if ( Trig_Push_Gas_3_Func004001() ) then
return
else
call DoNothing( )
endif
call EnableTrigger( gg_trg_Push_AI )
call TriggerExecute( gg_trg_Push_Gas )
endfunction
//===========================================================================
function InitTrig_Push_Gas_3 takes nothing returns nothing
set gg_trg_Push_Gas_3 = CreateTrigger( )
call TriggerAddAction( gg_trg_Push_Gas_3, function Trig_Push_Gas_3_Actions )
endfunction
function Trig_Spike_Initialization_Func005003 takes nothing returns nothing
call KillDestructable( GetEnumDestructable() )
endfunction
function Trig_Spike_Initialization_Func006003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Spike_Initialization_Func007002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Spike_Pit), 0 )
endfunction
function Trig_Spike_Initialization_Func008002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Spike_Initialization_Func009002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Spike_Pit )
endfunction
function Trig_Spike_Initialization_Func014003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Spike_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 12.00 )
set udg_Real_Speed = 0.00
set udg_Real_Angle = GetRandomDirectionDeg()
set udg_Point_Death = GetRectCenter(gg_rct_Spike_Pit)
call EnumDestructablesInCircleBJ( 400.00, GetRectCenter(gg_rct_Spike_Pit), function Trig_Spike_Initialization_Func005003 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Spike_Initialization_Func006003001() ) then
call CreateNUnitsAtLoc( 1, 'nvil', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Spike_Pit), GetRandomReal(50.00, 100.00), GetRandomDirectionDeg()), GetRandomDirectionDeg() )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Spike_Initialization_Func007002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Spike_Pit), function Trig_Spike_Initialization_Func008002 )
call ForForce( GetPlayersAll(), function Trig_Spike_Initialization_Func009002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_153" )
call EnableTrigger( gg_trg_Spike_Death )
call EnableTrigger( gg_trg_Spike_Move )
call TriggerSleepAction( 2.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Spike_Initialization_Func014003001() ) then
call EnableTrigger( gg_trg_Spike_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Spike_Initialization takes nothing returns nothing
set gg_trg_Spike_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Spike_Initialization, function Trig_Spike_Initialization_Actions )
endfunction
function Trig_Spike_Move_Func002001 takes nothing returns boolean
return ( udg_Real_Speed < 400.00 )
endfunction
function Trig_Spike_Move_Func003001 takes nothing returns boolean
return ( RectContainsLoc(gg_rct_Spike_Pit, udg_Point_Death) == false )
endfunction
function Trig_Spike_Move_Func005003001 takes nothing returns boolean
return ( IsDestructableAliveBJ(GetEnumDestructable()) == true )
endfunction
function Trig_Spike_Move_Func005003 takes nothing returns nothing
if ( Trig_Spike_Move_Func005003001() ) then
call KillDestructable( GetEnumDestructable() )
else
call DoNothing( )
endif
endfunction
function Trig_Spike_Move_Func006002001 takes nothing returns boolean
return ( IsDestructableDeadBJ(GetEnumDestructable()) == true )
endfunction
function Trig_Spike_Move_Func006002002001 takes nothing returns boolean
return ( DistanceBetweenPoints(udg_Point_Death, GetDestructableLoc(GetEnumDestructable())) >= 512.00 )
endfunction
function Trig_Spike_Move_Func006002 takes nothing returns nothing
if ( Trig_Spike_Move_Func006002001() ) then
if ( Trig_Spike_Move_Func006002002001() ) then
call DestructableRestoreLife( GetEnumDestructable(), 50.00, true )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
endfunction
function Trig_Spike_Move_Func007002001 takes nothing returns boolean
return ( IsDestructableAliveBJ(GetEnumDestructable()) == true )
endfunction
function Trig_Spike_Move_Func007002002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Spike_Move_Func007002 takes nothing returns nothing
if ( Trig_Spike_Move_Func007002001() ) then
call ForGroup( GetUnitsInRangeOfLocAll(128.00, GetDestructableLoc(GetEnumDestructable())), function Trig_Spike_Move_Func007002002002 )
else
call DoNothing( )
endif
endfunction
function Trig_Spike_Move_Actions takes nothing returns nothing
set udg_Point_Death = PolarProjectionBJ(udg_Point_Death, udg_Real_Speed, udg_Real_Angle)
if ( Trig_Spike_Move_Func002001() ) then
set udg_Real_Speed = ( udg_Real_Speed + 0.20 )
else
call DoNothing( )
endif
if ( Trig_Spike_Move_Func003001() ) then
set udg_Real_Angle = AngleBetweenPoints(udg_Point_Death, GetRectCenter(gg_rct_Spike_Pit))
else
call DoNothing( )
endif
set udg_Real_Angle = ( udg_Real_Angle + GetRandomReal(0, 5.00) )
call EnumDestructablesInCircleBJ( 400.00, udg_Point_Death, function Trig_Spike_Move_Func005003 )
call EnumDestructablesInRectAll( gg_rct_Spike_Pit, function Trig_Spike_Move_Func006002 )
call EnumDestructablesInRectAll( gg_rct_Spike_Pit, function Trig_Spike_Move_Func007002 )
endfunction
//===========================================================================
function InitTrig_Spike_Move takes nothing returns nothing
set gg_trg_Spike_Move = CreateTrigger( )
call DisableTrigger( gg_trg_Spike_Move )
call TriggerRegisterTimerEventPeriodic( gg_trg_Spike_Move, 0.25 )
call TriggerAddAction( gg_trg_Spike_Move, function Trig_Spike_Move_Actions )
endfunction
function Trig_Spike_Death_Func006001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Spike_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Spike_Pit, Condition(function Trig_Spike_Death_Func006001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Spike_Death_Func004001001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Spike_Death_Func004001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Spike_Pit, Condition(function Trig_Spike_Death_Func004001001001002))) == 1 )
endfunction
function Trig_Spike_Death_Func004002001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Spike_Death_Func004002002 takes nothing returns nothing
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
endfunction
function Trig_Spike_Death_Func005001001001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Spike_Death_Func005001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Spike_Pit, Condition(function Trig_Spike_Death_Func005001001001002))) == 1 )
endfunction
function Trig_Spike_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Spike_Move )
call DisableTrigger( gg_trg_Spike_Death )
call DisableTrigger( gg_trg_Spike_AI )
if ( Trig_Spike_Death_Func004001() ) then
call ForGroup( GetUnitsInRectMatching(gg_rct_Spike_Pit, Condition(function Trig_Spike_Death_Func004002001002)), function Trig_Spike_Death_Func004002002 )
else
call DoNothing( )
endif
if ( Trig_Spike_Death_Func005001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Spike_Death takes nothing returns nothing
set gg_trg_Spike_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Spike_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spike_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spike_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spike_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spike_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spike_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spike_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spike_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spike_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Spike_Death, Condition( function Trig_Spike_Death_Conditions ) )
call TriggerAddAction( gg_trg_Spike_Death, function Trig_Spike_Death_Actions )
endfunction
function Trig_Spike_AI_Func002003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Spike_AI_Func002003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", PolarProjectionBJ(udg_Point_Death, GetRandomReal(0, 128.00), GetRandomDirectionDeg()) )
endfunction
function Trig_Spike_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Spike_AI_Func002003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Spike_AI_Func002003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Spike_AI takes nothing returns nothing
set gg_trg_Spike_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Spike_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Spike_AI, 1.00 )
call TriggerAddAction( gg_trg_Spike_AI, function Trig_Spike_AI_Actions )
endfunction
function Trig_Salamander_Initialization_Func001003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Salamander_Initialization_Func002002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Salamander_Sizzle), 0 )
endfunction
function Trig_Salamander_Initialization_Func003002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Salamander_Initialization_Func004002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Salamander_Sizzle )
endfunction
function Trig_Salamander_Initialization_Func014003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Salamander_Initialization_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Salamander_Initialization_Func001003001() ) then
call CreateNUnitsAtLoc( 1, 'nslr', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Salamander_Sizzle), 800.00, ( ( I2R(GetForLoopIndexA()) * 135.00 ) - 22.50 )), ( ( I2R(GetForLoopIndexA()) * 22.50 ) + 270.00 ) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Salamander_Initialization_Func002002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Salamander_Sizzle), function Trig_Salamander_Initialization_Func003002 )
call ForForce( GetPlayersAll(), function Trig_Salamander_Initialization_Func004002 )
call StartTimerBJ( udg_Timer_TimeLeft, false, 120.00 )
call CreateTimerDialogBJ( GetLastCreatedTimerBJ(), "TRIGSTR_221" )
call TimerDialogDisplayBJ( true, GetLastCreatedTimerDialogBJ() )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_222" )
call EnableTrigger( gg_trg_Salamander_Fire )
call EnableTrigger( gg_trg_Salamander_Burn )
call EnableTrigger( gg_trg_Salamander_Death )
call EnableTrigger( gg_trg_Salamander_Expire )
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Salamander_Initialization_Func014003001() ) then
call EnableTrigger( gg_trg_Salamander_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Salamander_Initialization takes nothing returns nothing
set gg_trg_Salamander_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Salamander_Initialization, function Trig_Salamander_Initialization_Actions )
endfunction
function Trig_Salamander_Fire_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("stop") ) ) then
return false
endif
return true
endfunction
function Trig_Salamander_Fire_Func001001 takes nothing returns boolean
return ( GetUnitStateSwap(UNIT_STATE_MANA, GetOrderedUnit()) < 75.00 )
endfunction
function Trig_Salamander_Fire_Actions takes nothing returns nothing
if ( Trig_Salamander_Fire_Func001001() ) then
return
else
call DoNothing( )
endif
call SetUnitAnimation( GetOrderedUnit(), "spell" )
call SetUnitManaBJ( GetOrderedUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetOrderedUnit()) - 75.00 ) )
call CreateNUnitsAtLoc( 1, 'ewsp', Player(11), PolarProjectionBJ(GetUnitLoc(GetOrderedUnit()), 128.00, GetUnitFacing(GetOrderedUnit())), bj_UNIT_FACING )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdx" )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_YELLOW )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetOrderedUnit()), 3000.00, GetUnitFacing(GetOrderedUnit())) )
call SetUnitFlyHeightBJ( GetLastCreatedUnit(), 0.00, 1000.00 )
endfunction
//===========================================================================
function InitTrig_Salamander_Fire takes nothing returns nothing
set gg_trg_Salamander_Fire = CreateTrigger( )
call DisableTrigger( gg_trg_Salamander_Fire )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Fire, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Fire, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Fire, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Fire, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Fire, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Fire, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Fire, Player(6), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Fire, Player(7), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Salamander_Fire, Condition( function Trig_Salamander_Fire_Conditions ) )
call TriggerAddAction( gg_trg_Salamander_Fire, function Trig_Salamander_Fire_Actions )
endfunction
function Trig_Salamander_Burn_Func001002 takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 1.00 ) )
endfunction
function Trig_Salamander_Burn_Func002002003001 takes nothing returns boolean
return ( IsDestructableAliveBJ(GetEnumDestructable()) == true )
endfunction
function Trig_Salamander_Burn_Func002002003 takes nothing returns nothing
if ( Trig_Salamander_Burn_Func002002003001() ) then
call KillUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Salamander_Burn_Func002002 takes nothing returns nothing
call EnumDestructablesInCircleBJ( 100.00, GetUnitLoc(GetEnumUnit()), function Trig_Salamander_Burn_Func002002003 )
endfunction
function Trig_Salamander_Burn_Func003002003 takes nothing returns nothing
call KillDestructable( GetEnumDestructable() )
endfunction
function Trig_Salamander_Burn_Func003002 takes nothing returns nothing
call EnumDestructablesInCircleBJ( 100.00, GetUnitLoc(GetEnumUnit()), function Trig_Salamander_Burn_Func003002003 )
endfunction
function Trig_Salamander_Burn_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('ewsp'), function Trig_Salamander_Burn_Func001002 )
call ForGroup( GetUnitsOfTypeIdAll('ewsp'), function Trig_Salamander_Burn_Func002002 )
call ForGroup( GetUnitsOfTypeIdAll('ewsp'), function Trig_Salamander_Burn_Func003002 )
endfunction
//===========================================================================
function InitTrig_Salamander_Burn takes nothing returns nothing
set gg_trg_Salamander_Burn = CreateTrigger( )
call DisableTrigger( gg_trg_Salamander_Burn )
call TriggerRegisterTimerEventPeriodic( gg_trg_Salamander_Burn, 0.05 )
call TriggerAddAction( gg_trg_Salamander_Burn, function Trig_Salamander_Burn_Actions )
endfunction
function Trig_Salamander_Death_Func009001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nslr' )
endfunction
function Trig_Salamander_Death_Func009001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Salamander_Death_Func009001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Salamander_Death_Func009001001002001(), Trig_Salamander_Death_Func009001001002002() )
endfunction
function Trig_Salamander_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Salamander_Death_Func009001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Salamander_Death_Func007001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nslr' )
endfunction
function Trig_Salamander_Death_Func007002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Salamander_Death_Func007002 takes nothing returns nothing
if ( Trig_Salamander_Death_Func007002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Salamander_Death_Func008001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nslr' )
endfunction
function Trig_Salamander_Death_Func008001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Salamander_Death_Func008001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Salamander_Death_Func008001001001002001(), Trig_Salamander_Death_Func008001001001002002() )
endfunction
function Trig_Salamander_Death_Func008001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Salamander_Death_Func008001001001002))) == 1 )
endfunction
function Trig_Salamander_Death_Actions takes nothing returns nothing
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisableTrigger( gg_trg_Salamander_Fire )
call DisableTrigger( gg_trg_Salamander_Burn )
call DisableTrigger( gg_trg_Salamander_Death )
call DisableTrigger( gg_trg_Salamander_Expire )
call DisableTrigger( gg_trg_Salamander_AI )
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Salamander_Death_Func007001002)), function Trig_Salamander_Death_Func007002 )
if ( Trig_Salamander_Death_Func008001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Salamander_Death takes nothing returns nothing
set gg_trg_Salamander_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Salamander_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Salamander_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Salamander_Death, Condition( function Trig_Salamander_Death_Conditions ) )
call TriggerAddAction( gg_trg_Salamander_Death, function Trig_Salamander_Death_Actions )
endfunction
function Trig_Salamander_Expire_Func002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Salamander_Expire_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Salamander_Death )
call ForGroup( GetUnitsOfTypeIdAll('nslr'), function Trig_Salamander_Expire_Func002002 )
call TriggerExecute( gg_trg_Salamander_Death )
endfunction
//===========================================================================
function InitTrig_Salamander_Expire takes nothing returns nothing
set gg_trg_Salamander_Expire = CreateTrigger( )
call DisableTrigger( gg_trg_Salamander_Expire )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Salamander_Expire, udg_Timer_TimeLeft )
call TriggerAddAction( gg_trg_Salamander_Expire, function Trig_Salamander_Expire_Actions )
endfunction
function Trig_Salamander_AI_Func002003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Salamander_AI_Func002003002002003003001002001001002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Salamander_AI_Func002003002002003003001002001001002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nslr' )
endfunction
function Trig_Salamander_AI_Func002003002002003003001002001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Salamander_AI_Func002003002002003003001002001001002001(), Trig_Salamander_AI_Func002003002002003003001002001001002002() )
endfunction
function Trig_Salamander_AI_Func002003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), GetRandomReal(100.00, 300.00), ( AngleBetweenPoints(GetUnitLoc(GetEnumUnit()), GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Salamander_AI_Func002003002002003003001002001001002))))) + GetRandomReal(-5.00, 5.00) )) )
endfunction
function Trig_Salamander_AI_Func004003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Salamander_AI_Func004003002002001 takes nothing returns boolean
return ( GetRandomInt(1, 2) == 1 )
endfunction
function Trig_Salamander_AI_Func004003002002 takes nothing returns nothing
if ( Trig_Salamander_AI_Func004003002002001() ) then
call IssueImmediateOrderBJ( GetEnumUnit(), "stop" )
else
call DoNothing( )
endif
endfunction
function Trig_Salamander_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Salamander_AI_Func002003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Salamander_AI_Func002003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 1.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Salamander_AI_Func004003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Salamander_AI_Func004003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Salamander_AI takes nothing returns nothing
set gg_trg_Salamander_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Salamander_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Salamander_AI, 4.00 )
call TriggerAddAction( gg_trg_Salamander_AI, function Trig_Salamander_AI_Actions )
endfunction
function Trig_Obey_Initialization_Func011002 takes nothing returns nothing
call ForceRemovePlayerSimple( GetEnumPlayer(), udg_PlayerGroup_InTrouble )
endfunction
function Trig_Obey_Initialization_Func012003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Obey_Initialization_Func015002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Obey_Archimonde), 0 )
endfunction
function Trig_Obey_Initialization_Func016002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Obey_Archimonde )
endfunction
function Trig_Obey_Initialization_Func023003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Obey_Initialization_Actions takes nothing returns nothing
set udg_Real_Speed = 5.00
set udg_Regions_Current[1] = gg_rct_Obey_1
set udg_Regions_Current[2] = gg_rct_Obey_2
set udg_Regions_Current[3] = gg_rct_Obey_3
set udg_Regions_Current[4] = gg_rct_Obey_4
set udg_Regions_Current[5] = gg_rct_Obey_5
set udg_Regions_Current[6] = gg_rct_Obey_6
set udg_Regions_Current[7] = gg_rct_Obey_7
set udg_Regions_Current[8] = gg_rct_Obey_8
call SetTimeOfDay( 12.00 )
call ForForce( GetPlayersAll(), function Trig_Obey_Initialization_Func011002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Obey_Initialization_Func012003001() ) then
call CreateNUnitsAtLoc( 1, 'nchw', ConvertedPlayer(GetForLoopIndexA()), GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), 90.00 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call CreateNUnitsAtLoc( 1, 'Uwar', Player(11), OffsetLocation(GetRectCenter(gg_rct_Obey_Archimonde), 0, 320.00), bj_UNIT_FACING )
call SetHeroLevel( GetLastCreatedUnit(), 10, false )
call ForForce( GetPlayersAll(), function Trig_Obey_Initialization_Func015002 )
call ForForce( GetPlayersAll(), function Trig_Obey_Initialization_Func016002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_227" )
call TriggerSleepAction( 4.00 )
call EnableTrigger( gg_trg_Obey_First_Command )
call EnableTrigger( gg_trg_Obey_Archimonde )
call EnableTrigger( gg_trg_Obey_Follow )
call EnableTrigger( gg_trg_Obey_Final_Death )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Obey_Initialization_Func023003001() ) then
call EnableTrigger( gg_trg_Obey_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Obey_Initialization takes nothing returns nothing
set gg_trg_Obey_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Obey_Initialization, function Trig_Obey_Initialization_Actions )
endfunction
function Trig_Obey_First_Command_Func004001 takes nothing returns boolean
return ( IsTriggerEnabled(gg_trg_Obey_Archimonde) == false )
endfunction
function Trig_Obey_First_Command_Func005002 takes nothing returns nothing
call IssueImmediateOrderBJ( GetEnumUnit(), "roar" )
endfunction
function Trig_Obey_First_Command_Func006002001 takes nothing returns boolean
return ( GetRandomInt(1, 4) == 1 )
endfunction
function Trig_Obey_First_Command_Func006002 takes nothing returns nothing
if ( Trig_Obey_First_Command_Func006002001() ) then
call IssueImmediateOrderBJ( GetEnumUnit(), "stomp" )
else
call DoNothing( )
endif
endfunction
function Trig_Obey_First_Command_Func007001 takes nothing returns boolean
return ( GetTriggerExecCount(GetTriggeringTrigger()) >= 5 )
endfunction
function Trig_Obey_First_Command_Func007002002001 takes nothing returns boolean
return ( GetRandomInt(1, 4) == 1 )
endfunction
function Trig_Obey_First_Command_Func007002002 takes nothing returns nothing
if ( Trig_Obey_First_Command_Func007002002001() ) then
call IssueTargetOrderBJ( GetEnumUnit(), "bloodlust", GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Obey_First_Command_Func008001 takes nothing returns boolean
return ( GetTriggerExecCount(GetTriggeringTrigger()) >= 10 )
endfunction
function Trig_Obey_First_Command_Func008002002001 takes nothing returns boolean
return ( GetRandomInt(1, 4) == 1 )
endfunction
function Trig_Obey_First_Command_Func008002002 takes nothing returns nothing
if ( Trig_Obey_First_Command_Func008002002001() ) then
call IssueTargetOrderBJ( GetEnumUnit(), "unholyfrenzy", GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Obey_First_Command_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Obey_First_Command )
call TriggerSleepAction( 2.00 )
if ( Trig_Obey_First_Command_Func004001() ) then
return
else
call DoNothing( )
endif
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Obey_First_Command_Func005002 )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Obey_First_Command_Func006002 )
if ( Trig_Obey_First_Command_Func007001() ) then
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Obey_First_Command_Func007002002 )
else
call DoNothing( )
endif
if ( Trig_Obey_First_Command_Func008001() ) then
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Obey_First_Command_Func008002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call ForceAddPlayerSimple( ConvertedPlayer(GetForLoopIndexA()), udg_PlayerGroup_InTrouble )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerExecute( gg_trg_Obey_Command )
endfunction
//===========================================================================
function InitTrig_Obey_First_Command takes nothing returns nothing
set gg_trg_Obey_First_Command = CreateTrigger( )
call DisableTrigger( gg_trg_Obey_First_Command )
call TriggerRegisterTimerEventPeriodic( gg_trg_Obey_First_Command, 2.00 )
call TriggerAddAction( gg_trg_Obey_First_Command, function Trig_Obey_First_Command_Actions )
endfunction
function Trig_Obey_Archimonde_Actions takes nothing returns nothing
set udg_Order_Archimonde = GetIssuedOrderIdBJ()
endfunction
//===========================================================================
function InitTrig_Obey_Archimonde takes nothing returns nothing
set gg_trg_Obey_Archimonde = CreateTrigger( )
call DisableTrigger( gg_trg_Obey_Archimonde )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Archimonde, Player(11), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Archimonde, Player(11), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddAction( gg_trg_Obey_Archimonde, function Trig_Obey_Archimonde_Actions )
endfunction
function Trig_Obey_Follow_Func001001 takes nothing returns boolean
return ( GetIssuedOrderIdBJ() != udg_Order_Archimonde )
endfunction
function Trig_Obey_Follow_Func001002002 takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Obey_Follow_Actions takes nothing returns nothing
if ( Trig_Obey_Follow_Func001001() ) then
call ForGroup( GetUnitsOfPlayerAll(GetOwningPlayer(GetOrderedUnit())), function Trig_Obey_Follow_Func001002002 )
else
call ForceRemovePlayerSimple( GetOwningPlayer(GetOrderedUnit()), udg_PlayerGroup_InTrouble )
endif
endfunction
//===========================================================================
function InitTrig_Obey_Follow takes nothing returns nothing
set gg_trg_Obey_Follow = CreateTrigger( )
call DisableTrigger( gg_trg_Obey_Follow )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(0), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(1), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(2), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(3), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(4), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(5), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(6), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(7), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(6), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Follow, Player(7), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddAction( gg_trg_Obey_Follow, function Trig_Obey_Follow_Actions )
endfunction
function Trig_Obey_Final_Death_Func008001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nchw' )
endfunction
function Trig_Obey_Final_Death_Func008001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Obey_Final_Death_Func008001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Obey_Final_Death_Func008001001002001(), Trig_Obey_Final_Death_Func008001001002002() )
endfunction
function Trig_Obey_Final_Death_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Obey_Final_Death_Func008001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Obey_Final_Death_Func006001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nchw' )
endfunction
function Trig_Obey_Final_Death_Func006002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Obey_Final_Death_Func006002 takes nothing returns nothing
if ( Trig_Obey_Final_Death_Func006002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Obey_Final_Death_Func007001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nchw' )
endfunction
function Trig_Obey_Final_Death_Func007001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Obey_Final_Death_Func007001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Obey_Final_Death_Func007001001001002001(), Trig_Obey_Final_Death_Func007001001001002002() )
endfunction
function Trig_Obey_Final_Death_Func007001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Obey_Archimonde, Condition(function Trig_Obey_Final_Death_Func007001001001002))) == 1 )
endfunction
function Trig_Obey_Final_Death_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Obey_First_Command )
call DisableTrigger( gg_trg_Obey_Archimonde )
call DisableTrigger( gg_trg_Obey_Follow )
call DisableTrigger( gg_trg_Obey_Final_Death )
call DisableTrigger( gg_trg_Obey_AI )
call ForGroup( GetUnitsInRectMatching(gg_rct_Obey_Archimonde, Condition(function Trig_Obey_Final_Death_Func006001002)), function Trig_Obey_Final_Death_Func006002 )
if ( Trig_Obey_Final_Death_Func007001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Obey_Final_Death takes nothing returns nothing
set gg_trg_Obey_Final_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Obey_Final_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Final_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Final_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Final_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Final_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Final_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Final_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Final_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Obey_Final_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Obey_Final_Death, Condition( function Trig_Obey_Final_Death_Conditions ) )
call TriggerAddAction( gg_trg_Obey_Final_Death, function Trig_Obey_Final_Death_Actions )
endfunction
function Trig_Obey_AI_Func002003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Obey_AI_Func002003002002001 takes nothing returns boolean
return ( udg_Order_Archimonde == String2OrderIdBJ("roar") )
endfunction
function Trig_Obey_AI_Func002003002002002001 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetEnumUnit()), udg_PlayerGroup_InTrouble) == true )
endfunction
function Trig_Obey_AI_Func002003002002002002001 takes nothing returns boolean
return ( GetRandomInt(1, 5) > 2 )
endfunction
function Trig_Obey_AI_Func002003002002 takes nothing returns nothing
if ( Trig_Obey_AI_Func002003002002001() ) then
if ( Trig_Obey_AI_Func002003002002002001() ) then
if ( Trig_Obey_AI_Func002003002002002002001() ) then
call IssueImmediateOrderBJ( GetEnumUnit(), "roar" )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
else
call DoNothing( )
endif
endfunction
function Trig_Obey_AI_Func003003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Obey_AI_Func003003002002001 takes nothing returns boolean
return ( udg_Order_Archimonde == String2OrderIdBJ("stomp") )
endfunction
function Trig_Obey_AI_Func003003002002002001 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetEnumUnit()), udg_PlayerGroup_InTrouble) == true )
endfunction
function Trig_Obey_AI_Func003003002002002002001 takes nothing returns boolean
return ( GetRandomInt(1, 5) > 2 )
endfunction
function Trig_Obey_AI_Func003003002002 takes nothing returns nothing
if ( Trig_Obey_AI_Func003003002002001() ) then
if ( Trig_Obey_AI_Func003003002002002001() ) then
if ( Trig_Obey_AI_Func003003002002002002001() ) then
call IssueImmediateOrderBJ( GetEnumUnit(), "stomp" )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
else
call DoNothing( )
endif
endfunction
function Trig_Obey_AI_Func004003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Obey_AI_Func004003002002001 takes nothing returns boolean
return ( udg_Order_Archimonde == String2OrderIdBJ("bloodlust") )
endfunction
function Trig_Obey_AI_Func004003002002002001 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetEnumUnit()), udg_PlayerGroup_InTrouble) == true )
endfunction
function Trig_Obey_AI_Func004003002002002002001 takes nothing returns boolean
return ( GetRandomInt(1, 5) > 2 )
endfunction
function Trig_Obey_AI_Func004003002002 takes nothing returns nothing
if ( Trig_Obey_AI_Func004003002002001() ) then
if ( Trig_Obey_AI_Func004003002002002001() ) then
if ( Trig_Obey_AI_Func004003002002002002001() ) then
call IssueTargetOrderBJ( GetEnumUnit(), "bloodlust", GetEnumUnit() )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
else
call DoNothing( )
endif
endfunction
function Trig_Obey_AI_Func005003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Obey_AI_Func005003002002001 takes nothing returns boolean
return ( udg_Order_Archimonde == String2OrderIdBJ("unholyfrenzy") )
endfunction
function Trig_Obey_AI_Func005003002002002001 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetEnumUnit()), udg_PlayerGroup_InTrouble) == true )
endfunction
function Trig_Obey_AI_Func005003002002002002001 takes nothing returns boolean
return ( GetRandomInt(1, 5) > 2 )
endfunction
function Trig_Obey_AI_Func005003002002 takes nothing returns nothing
if ( Trig_Obey_AI_Func005003002002001() ) then
if ( Trig_Obey_AI_Func005003002002002001() ) then
if ( Trig_Obey_AI_Func005003002002002002001() ) then
call IssueTargetOrderBJ( GetEnumUnit(), "unholyfrenzy", GetEnumUnit() )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
else
call DoNothing( )
endif
endfunction
function Trig_Obey_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Obey_AI_Func002003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Obey_AI_Func002003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Obey_AI_Func003003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Obey_AI_Func003003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Obey_AI_Func004003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Obey_AI_Func004003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Obey_AI_Func005003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Obey_AI_Func005003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Obey_AI takes nothing returns nothing
set gg_trg_Obey_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Obey_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Obey_AI, 1.00 )
call TriggerAddAction( gg_trg_Obey_AI, function Trig_Obey_AI_Actions )
endfunction
function Trig_Obey_Command_Func002001 takes nothing returns boolean
return ( IsTriggerEnabled(gg_trg_Obey_Archimonde) == false )
endfunction
function Trig_Obey_Command_Func003001 takes nothing returns boolean
return ( udg_Real_Speed > 0.00 )
endfunction
function Trig_Obey_Command_Func004002002 takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Obey_Command_Func004002 takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(GetEnumPlayer()), function Trig_Obey_Command_Func004002002 )
endfunction
function Trig_Obey_Command_Func005002 takes nothing returns nothing
call UnitRemoveBuffsBJ( bj_REMOVEBUFFS_ALL, GetEnumUnit() )
endfunction
function Trig_Obey_Command_Func006002 takes nothing returns nothing
call SetUnitManaPercentBJ( GetEnumUnit(), 100 )
endfunction
function Trig_Obey_Command_Actions takes nothing returns nothing
call TriggerSleepAction( ( udg_Real_Speed + 1 ) )
if ( Trig_Obey_Command_Func002001() ) then
return
else
call DoNothing( )
endif
if ( Trig_Obey_Command_Func003001() ) then
set udg_Real_Speed = ( udg_Real_Speed - 0.25 )
else
call DoNothing( )
endif
call ForForce( udg_PlayerGroup_InTrouble, function Trig_Obey_Command_Func004002 )
call ForGroup( GetUnitsInRectAll(GetEntireMapRect()), function Trig_Obey_Command_Func005002 )
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Obey_Command_Func006002 )
call EnableTrigger( gg_trg_Obey_First_Command )
endfunction
//===========================================================================
function InitTrig_Obey_Command takes nothing returns nothing
set gg_trg_Obey_Command = CreateTrigger( )
call TriggerAddAction( gg_trg_Obey_Command, function Trig_Obey_Command_Actions )
endfunction
function Trig_Smite_Initialization_Func003003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Smite_Initialization_Func004002 takes nothing returns nothing
call SelectHeroSkill( GetEnumUnit(), 'AHhb' )
endfunction
function Trig_Smite_Initialization_Func005003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Smite_Initialization_Func005003002002 takes nothing returns nothing
call SetUnitAcquireRangeBJ( GetEnumUnit(), 500.00 )
endfunction
function Trig_Smite_Initialization_Func006002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Smite_a_Mole), 0 )
endfunction
function Trig_Smite_Initialization_Func007002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endfunction
function Trig_Smite_Initialization_Func008002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Smite_a_Mole )
endfunction
function Trig_Smite_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call SetPlayerHandicapXPBJ( ConvertedPlayer(GetForLoopIndexA()), 70.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Smite_Initialization_Func003003001() ) then
call CreateNUnitsAtLoc( 1, 'Hpal', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(gg_rct_Smite_a_Mole), GetRandomReal(200.00, 400.00), GetRandomDirectionDeg()), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroup( GetUnitsOfTypeIdAll('Hpal'), function Trig_Smite_Initialization_Func004002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Smite_Initialization_Func005003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Smite_Initialization_Func005003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Smite_Initialization_Func006002 )
call ForGroup( GetUnitsInRectAll(gg_rct_Smite_a_Mole), function Trig_Smite_Initialization_Func007002 )
call ForForce( GetPlayersAll(), function Trig_Smite_Initialization_Func008002 )
call StartTimerBJ( udg_Timer_TimeLeft, false, 90.00 )
call CreateTimerDialogBJ( GetLastCreatedTimerBJ(), "TRIGSTR_240" )
call TimerDialogDisplayBJ( true, GetLastCreatedTimerDialogBJ() )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_239" )
call TriggerSleepAction( 6.00 )
call EnableTrigger( gg_trg_Smite_Kill )
call EnableTrigger( gg_trg_Smite_Finish )
call EnableTrigger( gg_trg_Smite_Spawn )
endfunction
//===========================================================================
function InitTrig_Smite_Initialization takes nothing returns nothing
set gg_trg_Smite_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Smite_Initialization, function Trig_Smite_Initialization_Actions )
endfunction
function Trig_Smite_Kill_Func002003 takes nothing returns nothing
call DestructableRestoreLife( GetEnumDestructable(), GetDestructableMaxLife(GetEnumDestructable()), true )
endfunction
function Trig_Smite_Kill_Actions takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "origin", GetKillingUnitBJ(), "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdx" )
call EnumDestructablesInCircleBJ( 100.00, GetUnitLoc(GetDyingUnit()), function Trig_Smite_Kill_Func002003 )
endfunction
//===========================================================================
function InitTrig_Smite_Kill takes nothing returns nothing
set gg_trg_Smite_Kill = CreateTrigger( )
call DisableTrigger( gg_trg_Smite_Kill )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Smite_Kill, Player(11), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Smite_Kill, function Trig_Smite_Kill_Actions )
endfunction
function Trig_Smite_Finish_Func003002 takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Smite_Finish_Actions takes nothing returns nothing
set udg_Player_Winner = GetOwningPlayer(GetLevelingUnit())
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call SetPlayerHandicapXPBJ( ConvertedPlayer(GetForLoopIndexA()), 100.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroup( GetUnitsOfPlayerAll(Player(11)), function Trig_Smite_Finish_Func003002 )
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisableTrigger( gg_trg_Smite_Kill )
call DisableTrigger( gg_trg_Smite_Finish )
call DisableTrigger( gg_trg_Smite_Spawn )
call DisableTrigger( gg_trg_Smite_Expire )
call TriggerExecute( gg_trg_Win )
endfunction
//===========================================================================
function InitTrig_Smite_Finish takes nothing returns nothing
set gg_trg_Smite_Finish = CreateTrigger( )
call DisableTrigger( gg_trg_Smite_Finish )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Smite_Finish, Player(0), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Smite_Finish, Player(1), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Smite_Finish, Player(2), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Smite_Finish, Player(3), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Smite_Finish, Player(4), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Smite_Finish, Player(5), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Smite_Finish, Player(6), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Smite_Finish, Player(7), EVENT_PLAYER_HERO_LEVEL )
call TriggerAddAction( gg_trg_Smite_Finish, function Trig_Smite_Finish_Actions )
endfunction
function Trig_Smite_Spawn_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfTypeIdAll('ugho')) < 16 ) ) then
return false
endif
return true
endfunction
function Trig_Smite_Spawn_Func001003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Smite_Spawn_Func001003002002 takes nothing returns nothing
call IssueImmediateOrderBJ( GetEnumUnit(), "stop" )
endfunction
function Trig_Smite_Spawn_Func004002002 takes nothing returns boolean
return ( IsDestructableAliveBJ(GetFilterDestructable()) == true )
endfunction
function Trig_Smite_Spawn_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Smite_Spawn_Func001003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Smite_Spawn_Func001003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_Destructible_Selected = RandomDestructableInRectBJ(gg_rct_Smite_a_Mole, Condition(function Trig_Smite_Spawn_Func004002002))
call KillDestructable( udg_Destructible_Selected )
call CreateNUnitsAtLoc( 1, 'ugho', Player(11), GetDestructableLoc(udg_Destructible_Selected), GetRandomDirectionDeg() )
call SetUnitExplodedBJ( GetLastCreatedUnit(), true )
endfunction
//===========================================================================
function InitTrig_Smite_Spawn takes nothing returns nothing
set gg_trg_Smite_Spawn = CreateTrigger( )
call DisableTrigger( gg_trg_Smite_Spawn )
call TriggerRegisterTimerEventPeriodic( gg_trg_Smite_Spawn, 1.00 )
call TriggerAddCondition( gg_trg_Smite_Spawn, Condition( function Trig_Smite_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Smite_Spawn, function Trig_Smite_Spawn_Actions )
endfunction
function Trig_Smite_Expire_Func001002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Smite_Expire_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('Hpal'), function Trig_Smite_Expire_Func001002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call SetPlayerHandicapXPBJ( ConvertedPlayer(GetForLoopIndexA()), 100.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisableTrigger( gg_trg_Smite_Kill )
call DisableTrigger( gg_trg_Smite_Finish )
call DisableTrigger( gg_trg_Smite_Spawn )
call DisableTrigger( gg_trg_Smite_Expire )
call TriggerExecute( gg_trg_Draw )
endfunction
//===========================================================================
function InitTrig_Smite_Expire takes nothing returns nothing
set gg_trg_Smite_Expire = CreateTrigger( )
call DisableTrigger( gg_trg_Smite_Expire )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Smite_Expire, udg_Timer_TimeLeft )
call TriggerAddAction( gg_trg_Smite_Expire, function Trig_Smite_Expire_Actions )
endfunction
function Trig_Horse_Initialization_Func010003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Horse_Initialization_Func012003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Horse_Initialization_Func013002 takes nothing returns nothing
call SetUnitScalePercent( GetEnumUnit(), 60.00, 60.00, 60.00 )
endfunction
function Trig_Horse_Initialization_Func014002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), OffsetLocation(GetRectCenter(gg_rct_Horse_Race), -2048.00, 0), 0 )
endfunction
function Trig_Horse_Initialization_Func016002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Horse_Race )
endfunction
function Trig_Horse_Initialization_Func027002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", OffsetLocation(GetRectCenter(udg_Regions_Current[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))]), 4608.00, 0.00) )
endfunction
function Trig_Horse_Initialization_Actions takes nothing returns nothing
set udg_Regions_Current[1] = gg_rct_Horse_1
set udg_Regions_Current[2] = gg_rct_Horse_2
set udg_Regions_Current[3] = gg_rct_Horse_3
set udg_Regions_Current[4] = gg_rct_Horse_4
set udg_Regions_Current[5] = gg_rct_Horse_5
set udg_Regions_Current[6] = gg_rct_Horse_6
set udg_Regions_Current[7] = gg_rct_Horse_7
set udg_Regions_Current[8] = gg_rct_Horse_8
call SetTimeOfDay( 12.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Horse_Initialization_Func010003001() ) then
call CreateNUnitsAtLoc( 1, 'nwzg', ConvertedPlayer(GetForLoopIndexA()), GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), 0.00 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call PauseAllUnitsBJ( true )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Horse_Initialization_Func012003001() ) then
call CreateNUnitsAtLoc( 1, 'ncp2', Player(PLAYER_NEUTRAL_PASSIVE), OffsetLocation(GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), 4608.00, 0), 0.00 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroup( GetUnitsOfPlayerAll(Player(PLAYER_NEUTRAL_PASSIVE)), function Trig_Horse_Initialization_Func013002 )
call ForForce( GetPlayersAll(), function Trig_Horse_Initialization_Func014002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer( ConvertedPlayer(GetForLoopIndexA()), GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), 0 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Horse_Initialization_Func016002 )
call StartTimerBJ( udg_Timer_TimeLeft, false, 60.00 )
call CreateTimerDialogBJ( GetLastCreatedTimerBJ(), "TRIGSTR_250" )
call TimerDialogDisplayBJ( true, GetLastCreatedTimerDialogBJ() )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_249" )
call TriggerSleepAction( 6.00 )
call EnableTrigger( gg_trg_Horse_Slow )
call EnableTrigger( gg_trg_Horse_Speed )
call EnableTrigger( gg_trg_Horse_Finish )
call EnableTrigger( gg_trg_Horse_Expire )
call PauseAllUnitsBJ( false )
call ForGroup( GetUnitsOfTypeIdAll('nwzg'), function Trig_Horse_Initialization_Func027002 )
endfunction
//===========================================================================
function InitTrig_Horse_Initialization takes nothing returns nothing
set gg_trg_Horse_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Horse_Initialization, function Trig_Horse_Initialization_Actions )
endfunction
function Trig_Horse_Slow_Func001002 takes nothing returns nothing
call SetUnitMoveSpeed( GetEnumUnit(), ( GetUnitMoveSpeed(GetEnumUnit()) - 2.00 ) )
endfunction
function Trig_Horse_Slow_Func002003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Horse_Slow_Func002003002002001 takes nothing returns boolean
return ( GetUnitMoveSpeed(GetEnumUnit()) < 270.00 )
endfunction
function Trig_Horse_Slow_Func002003002002 takes nothing returns nothing
if ( Trig_Horse_Slow_Func002003002002001() ) then
call ConditionalTriggerExecute( gg_trg_Horse_AI )
else
call DoNothing( )
endif
endfunction
function Trig_Horse_Slow_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('nwzg'), function Trig_Horse_Slow_Func001002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Horse_Slow_Func002003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Horse_Slow_Func002003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Horse_Slow takes nothing returns nothing
set gg_trg_Horse_Slow = CreateTrigger( )
call DisableTrigger( gg_trg_Horse_Slow )
call TriggerRegisterTimerEventPeriodic( gg_trg_Horse_Slow, 0.05 )
call TriggerAddAction( gg_trg_Horse_Slow, function Trig_Horse_Slow_Actions )
endfunction
function Trig_Horse_Speed_Conditions takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GroupPickRandomUnit(GetUnitsOfPlayerAll(GetTriggerPlayer()))) >= 100.00 ) ) then
return false
endif
return true
endfunction
function Trig_Horse_Speed_Func001002 takes nothing returns nothing
call SetUnitManaBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) - 100.00 ) )
endfunction
function Trig_Horse_Speed_Func002002 takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), "Abilities\\Spells\\Items\\AIam\\AIamTarget.mdx" )
endfunction
function Trig_Horse_Speed_Func003002 takes nothing returns nothing
call SetUnitMoveSpeed( GetEnumUnit(), 320.00 )
endfunction
function Trig_Horse_Speed_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAll(GetTriggerPlayer()), function Trig_Horse_Speed_Func001002 )
call ForGroup( GetUnitsOfPlayerAll(GetTriggerPlayer()), function Trig_Horse_Speed_Func002002 )
call ForGroup( GetUnitsOfPlayerAll(GetTriggerPlayer()), function Trig_Horse_Speed_Func003002 )
endfunction
//===========================================================================
function InitTrig_Horse_Speed takes nothing returns nothing
set gg_trg_Horse_Speed = CreateTrigger( )
call DisableTrigger( gg_trg_Horse_Speed )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Horse_Speed, Player(0) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Horse_Speed, Player(1) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Horse_Speed, Player(2) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Horse_Speed, Player(3) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Horse_Speed, Player(4) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Horse_Speed, Player(5) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Horse_Speed, Player(6) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Horse_Speed, Player(7) )
call TriggerAddCondition( gg_trg_Horse_Speed, Condition( function Trig_Horse_Speed_Conditions ) )
call TriggerAddAction( gg_trg_Horse_Speed, function Trig_Horse_Speed_Actions )
endfunction
function Trig_Horse_Finish_Conditions takes nothing returns boolean
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) <= 8 ) ) then
return false
endif
return true
endfunction
function Trig_Horse_Finish_Actions takes nothing returns nothing
set udg_Player_Winner = GetOwningPlayer(GetEnteringUnit())
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisableTrigger( gg_trg_Horse_Slow )
call DisableTrigger( gg_trg_Horse_Speed )
call DisableTrigger( gg_trg_Horse_Finish )
call DisableTrigger( gg_trg_Horse_Expire )
call TriggerExecute( gg_trg_Win )
endfunction
//===========================================================================
function InitTrig_Horse_Finish takes nothing returns nothing
set gg_trg_Horse_Finish = CreateTrigger( )
call DisableTrigger( gg_trg_Horse_Finish )
call TriggerRegisterEnterRectSimple( gg_trg_Horse_Finish, gg_rct_Horse_Finish )
call TriggerAddCondition( gg_trg_Horse_Finish, Condition( function Trig_Horse_Finish_Conditions ) )
call TriggerAddAction( gg_trg_Horse_Finish, function Trig_Horse_Finish_Actions )
endfunction
function Trig_Horse_Expire_Func002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Horse_Expire_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('nwzg'), function Trig_Horse_Expire_Func002002 )
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisableTrigger( gg_trg_Horse_Slow )
call DisableTrigger( gg_trg_Horse_Speed )
call DisableTrigger( gg_trg_Horse_Finish )
call DisableTrigger( gg_trg_Horse_Expire )
call TriggerExecute( gg_trg_Draw )
endfunction
//===========================================================================
function InitTrig_Horse_Expire takes nothing returns nothing
set gg_trg_Horse_Expire = CreateTrigger( )
call DisableTrigger( gg_trg_Horse_Expire )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Horse_Expire, udg_Timer_TimeLeft )
call TriggerAddAction( gg_trg_Horse_Expire, function Trig_Horse_Expire_Actions )
endfunction
function Trig_Horse_AI_Conditions takes nothing returns boolean
if ( not ( GetRandomInt(1, 40) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Horse_AI_Func001001 takes nothing returns boolean
return ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) < 100.00 )
endfunction
function Trig_Horse_AI_Actions takes nothing returns nothing
if ( Trig_Horse_AI_Func001001() ) then
return
else
call DoNothing( )
endif
call SetUnitManaBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) - 100.00 ) )
call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), "Abilities\\Spells\\Items\\AIam\\AIamTarget.mdx" )
call SetUnitMoveSpeed( GetEnumUnit(), 320.00 )
endfunction
//===========================================================================
function InitTrig_Horse_AI takes nothing returns nothing
set gg_trg_Horse_AI = CreateTrigger( )
call TriggerAddCondition( gg_trg_Horse_AI, Condition( function Trig_Horse_AI_Conditions ) )
call TriggerAddAction( gg_trg_Horse_AI, function Trig_Horse_AI_Actions )
endfunction
function Trig_Masquerade_Initialization_Func010003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Masquerade_Initialization_Func011003001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Masquerade_Initialization_Func012003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Masquerade_Initialization_Func012003002002 takes nothing returns nothing
call SetUnitAcquireRangeBJ( GetEnumUnit(), 1000.00 )
endfunction
function Trig_Masquerade_Initialization_Func013002 takes nothing returns nothing
call SelectHeroSkill( GetEnumUnit(), 'AUav' )
endfunction
function Trig_Masquerade_Initialization_Func014002 takes nothing returns nothing
call SetUnitLifePercentBJ( GetEnumUnit(), 85.00 )
endfunction
function Trig_Masquerade_Initialization_Func015002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Masquerade), 0 )
endfunction
function Trig_Masquerade_Initialization_Func017002 takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Masquerade )
endfunction
function Trig_Masquerade_Initialization_Func034002 takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'nvl2', Player(11), GetRectCenter(udg_Regions_Current[GetRandomInt(1, 8)]), bj_UNIT_FACING )
endfunction
function Trig_Masquerade_Initialization_Func037003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Masquerade_Initialization_Actions takes nothing returns nothing
set udg_Regions_Current[1] = gg_rct_Masquerade_1
set udg_Regions_Current[2] = gg_rct_Masquerade_2
set udg_Regions_Current[3] = gg_rct_Masquerade_3
set udg_Regions_Current[4] = gg_rct_Masquerade_4
set udg_Regions_Current[5] = gg_rct_Masquerade_5
set udg_Regions_Current[6] = gg_rct_Masquerade_6
set udg_Regions_Current[7] = gg_rct_Masquerade_7
set udg_Regions_Current[8] = gg_rct_Masquerade_8
call SetTimeOfDay( 19.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Masquerade_Initialization_Func010003001() ) then
call CreateNUnitsAtLoc( 1, 'otrb', ConvertedPlayer(GetForLoopIndexA()), GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Masquerade_Initialization_Func011003001() ) then
call CreateNUnitsAtLoc( 1, 'Udre', ConvertedPlayer(GetForLoopIndexA()), PolarProjectionBJ(GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), 50.00, AngleBetweenPoints(GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), GetRectCenter(gg_rct_Masquerade))), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Masquerade_Initialization_Func012003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Masquerade_Initialization_Func012003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroup( GetUnitsOfTypeIdAll('Udre'), function Trig_Masquerade_Initialization_Func013002 )
call ForGroup( GetUnitsOfTypeIdAll('Udre'), function Trig_Masquerade_Initialization_Func014002 )
call ForForce( GetPlayersAll(), function Trig_Masquerade_Initialization_Func015002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer( ConvertedPlayer(GetForLoopIndexA()), GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), 0 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Masquerade_Initialization_Func017002 )
set udg_Regions_Current[1] = gg_rct_Masquerade_Spawn_1
set udg_Regions_Current[2] = gg_rct_Masquerade_Spawn_2
set udg_Regions_Current[3] = gg_rct_Masquerade_Spawn_3
set udg_Regions_Current[4] = gg_rct_Masquerade_Spawn_4
set udg_Regions_Current[5] = gg_rct_Masquerade_Spawn_5
set udg_Regions_Current[6] = gg_rct_Masquerade_Spawn_6
set udg_Regions_Current[7] = gg_rct_Masquerade_Spawn_7
set udg_Regions_Current[8] = gg_rct_Masquerade_Spawn_8
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_254" )
call EnableTrigger( gg_trg_Masquerade_Kill )
call EnableTrigger( gg_trg_Masquerade_Day )
call EnableTrigger( gg_trg_Masquerade_Night )
call EnableTrigger( gg_trg_Masquerade_Dissipate )
call EnableTrigger( gg_trg_Masquerade_Sunlight )
call EnableTrigger( gg_trg_Masquerade_Death )
call TriggerSleepAction( 4.00 )
call ForGroup( GetUnitsOfTypeIdAll('Udre'), function Trig_Masquerade_Initialization_Func034002 )
call UseTimeOfDayBJ( true )
call SetTimeOfDayScalePercentBJ( 1000.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Masquerade_Initialization_Func037003001() ) then
call EnableTrigger( gg_trg_Masquerade_AI )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Masquerade_Initialization takes nothing returns nothing
set gg_trg_Masquerade_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Masquerade_Initialization, function Trig_Masquerade_Initialization_Actions )
endfunction
function Trig_Masquerade_Kill_Actions takes nothing returns nothing
call SetUnitLifeBJ( GetKillingUnitBJ(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetKillingUnitBJ()) + 350.00 ) )
endfunction
//===========================================================================
function InitTrig_Masquerade_Kill takes nothing returns nothing
set gg_trg_Masquerade_Kill = CreateTrigger( )
call DisableTrigger( gg_trg_Masquerade_Kill )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Kill, Player(11), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Masquerade_Kill, function Trig_Masquerade_Kill_Actions )
endfunction
function Trig_Masquerade_Day_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call EnableTrigger( gg_trg_Masquerade_Night )
call SetTimeOfDayScalePercentBJ( 2000.00 )
endfunction
//===========================================================================
function InitTrig_Masquerade_Day takes nothing returns nothing
set gg_trg_Masquerade_Day = CreateTrigger( )
call DisableTrigger( gg_trg_Masquerade_Day )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_Masquerade_Day, EQUAL, 6.00 )
call TriggerAddAction( gg_trg_Masquerade_Day, function Trig_Masquerade_Day_Actions )
endfunction
function Trig_Masquerade_Night_Func004003001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nvl2' )
endfunction
function Trig_Masquerade_Night_Func004003001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Masquerade_Night_Func004003001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Masquerade_Night_Func004003001001001002001(), Trig_Masquerade_Night_Func004003001001001002002() )
endfunction
function Trig_Masquerade_Night_Func004003001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Masquerade_Night_Func004003001001001002))) < ( CountUnitsInGroup(GetUnitsOfTypeIdAll('Udre')) - 1 ) )
endfunction
function Trig_Masquerade_Night_Func005003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Masquerade_Night_Func005003002002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "unloadall", GetUnitLoc(GetEnumUnit()) )
endfunction
function Trig_Masquerade_Night_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call EnableTrigger( gg_trg_Masquerade_Day )
call SetTimeOfDayScalePercentBJ( 1000.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Masquerade_Night_Func004003001() ) then
call CreateNUnitsAtLoc( 1, 'nvl2', Player(11), GetRectCenter(udg_Regions_Current[GetForLoopIndexA()]), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Masquerade_Night_Func005003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Masquerade_Night_Func005003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Masquerade_Night takes nothing returns nothing
set gg_trg_Masquerade_Night = CreateTrigger( )
call DisableTrigger( gg_trg_Masquerade_Night )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_Masquerade_Night, EQUAL, 18.00 )
call TriggerAddAction( gg_trg_Masquerade_Night, function Trig_Masquerade_Night_Actions )
endfunction
function Trig_Masquerade_Dissipate_Actions takes nothing returns nothing
call RemoveUnit( GetRevivableUnit() )
endfunction
//===========================================================================
function InitTrig_Masquerade_Dissipate takes nothing returns nothing
set gg_trg_Masquerade_Dissipate = CreateTrigger( )
call DisableTrigger( gg_trg_Masquerade_Dissipate )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Dissipate, Player(0), EVENT_PLAYER_HERO_REVIVABLE )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Dissipate, Player(1), EVENT_PLAYER_HERO_REVIVABLE )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Dissipate, Player(2), EVENT_PLAYER_HERO_REVIVABLE )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Dissipate, Player(3), EVENT_PLAYER_HERO_REVIVABLE )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Dissipate, Player(4), EVENT_PLAYER_HERO_REVIVABLE )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Dissipate, Player(5), EVENT_PLAYER_HERO_REVIVABLE )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Dissipate, Player(6), EVENT_PLAYER_HERO_REVIVABLE )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Dissipate, Player(7), EVENT_PLAYER_HERO_REVIVABLE )
call TriggerAddAction( gg_trg_Masquerade_Dissipate, function Trig_Masquerade_Dissipate_Actions )
endfunction
function Trig_Masquerade_Sunlight_Conditions takes nothing returns boolean
if ( not ( GetTimeOfDay() >= 6.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() < 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_Masquerade_Sunlight_Func001002 takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 2.00 ) )
endfunction
function Trig_Masquerade_Sunlight_Func002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'Udre' )
endfunction
function Trig_Masquerade_Sunlight_Func002002 takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 5.00 ) )
endfunction
function Trig_Masquerade_Sunlight_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfTypeIdAll('Udre'), function Trig_Masquerade_Sunlight_Func001002 )
call ForGroup( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Masquerade_Sunlight_Func002001002)), function Trig_Masquerade_Sunlight_Func002002 )
endfunction
//===========================================================================
function InitTrig_Masquerade_Sunlight takes nothing returns nothing
set gg_trg_Masquerade_Sunlight = CreateTrigger( )
call DisableTrigger( gg_trg_Masquerade_Sunlight )
call TriggerRegisterTimerEventPeriodic( gg_trg_Masquerade_Sunlight, 0.05 )
call TriggerAddCondition( gg_trg_Masquerade_Sunlight, Condition( function Trig_Masquerade_Sunlight_Conditions ) )
call TriggerAddAction( gg_trg_Masquerade_Sunlight, function Trig_Masquerade_Sunlight_Actions )
endfunction
function Trig_Masquerade_Death_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'Udre' ) ) then
return false
endif
return true
endfunction
function Trig_Masquerade_Death_Func002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Masquerade_Death_Func003001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'otrb' )
endfunction
function Trig_Masquerade_Death_Func003001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Masquerade_Death_Func003001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Masquerade_Death_Func003001001001002001(), Trig_Masquerade_Death_Func003001001001002002() )
endfunction
function Trig_Masquerade_Death_Func003001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_Masquerade_Death_Func003001001001002))) > 1 )
endfunction
function Trig_Masquerade_Death_Func013001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'otrb' )
endfunction
function Trig_Masquerade_Death_Func013002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetEnumUnit()) == true )
endfunction
function Trig_Masquerade_Death_Func013002 takes nothing returns nothing
if ( Trig_Masquerade_Death_Func013002001() ) then
set udg_Player_Winner = GetOwningPlayer(GetEnumUnit())
else
call DoNothing( )
endif
endfunction
function Trig_Masquerade_Death_Func014001001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'otrb' )
endfunction
function Trig_Masquerade_Death_Func014001001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Masquerade_Death_Func014001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Masquerade_Death_Func014001001001002001(), Trig_Masquerade_Death_Func014001001001002002() )
endfunction
function Trig_Masquerade_Death_Func014001 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Masquerade, Condition(function Trig_Masquerade_Death_Func014001001001002))) == 1 )
endfunction
function Trig_Masquerade_Death_Actions takes nothing returns nothing
call ForGroup( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetDyingUnit()), 'otrb'), function Trig_Masquerade_Death_Func002002 )
if ( Trig_Masquerade_Death_Func003001() ) then
return
else
call DoNothing( )
endif
call SetTimeOfDayScalePercentBJ( 100.00 )
call UseTimeOfDayBJ( false )
call DisableTrigger( gg_trg_Masquerade_Kill )
call DisableTrigger( gg_trg_Masquerade_Day )
call DisableTrigger( gg_trg_Masquerade_Night )
call DisableTrigger( gg_trg_Masquerade_Dissipate )
call DisableTrigger( gg_trg_Masquerade_Sunlight )
call DisableTrigger( gg_trg_Masquerade_Death )
call DisableTrigger( gg_trg_Masquerade_AI )
call ForGroup( GetUnitsInRectMatching(gg_rct_Masquerade, Condition(function Trig_Masquerade_Death_Func013001002)), function Trig_Masquerade_Death_Func013002 )
if ( Trig_Masquerade_Death_Func014001() ) then
call TriggerExecute( gg_trg_Win )
else
call TriggerExecute( gg_trg_Draw )
endif
endfunction
//===========================================================================
function InitTrig_Masquerade_Death takes nothing returns nothing
set gg_trg_Masquerade_Death = CreateTrigger( )
call DisableTrigger( gg_trg_Masquerade_Death )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Death, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Death, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Death, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Death, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Death, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Death, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Death, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Masquerade_Death, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Masquerade_Death, Condition( function Trig_Masquerade_Death_Conditions ) )
call TriggerAddAction( gg_trg_Masquerade_Death, function Trig_Masquerade_Death_Actions )
endfunction
function Trig_Masquerade_AI_Conditions takes nothing returns boolean
if ( not ( GetTimeOfDay() >= 3.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() < 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_Masquerade_AI_Func003003001 takes nothing returns boolean
return ( GetPlayerController(ConvertedPlayer(GetForLoopIndexA())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Masquerade_AI_Func003003002002 takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "board", GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(ConvertedPlayer(GetForLoopIndexA()), 'otrb')) )
endfunction
function Trig_Masquerade_AI_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Masquerade_AI_Func003003001() ) then
call ForGroup( GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())), function Trig_Masquerade_AI_Func003003002002 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Masquerade_AI takes nothing returns nothing
set gg_trg_Masquerade_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Masquerade_AI )
call TriggerRegisterTimerEventPeriodic( gg_trg_Masquerade_AI, 1.00 )
call TriggerAddCondition( gg_trg_Masquerade_AI, Condition( function Trig_Masquerade_AI_Conditions ) )
call TriggerAddAction( gg_trg_Masquerade_AI, function Trig_Masquerade_AI_Actions )
endfunction