Name | Type | is_array | initial_value |
AI_AttackPoint_D | rect | Yes | |
AI_AttackPoint_M | rect | Yes | |
AI_AttackPoint_U | rect | Yes | |
Ball | unit | No | |
BallBound | boolean | No | |
BallDefaultHeight | real | No | |
BallDirection | real | No | |
BallImmuneTimer | integer | No | |
BallInAir | boolean | No | |
BallInHandEffect | effect | No | |
BallInitialDir | real | No | |
BallOwner | unit | No | |
BallVY | real | No | |
BTN_10min | button | No | |
BTN_5min | button | No | |
BTN_6min | button | No | |
BTN_8min | button | No | |
CameraAutoZoom | boolean | Yes | |
CameraDistance | real | Yes | |
CameraLock | boolean | Yes | |
CantEnterOtherSide | boolean | No | |
CantHoldBall | integer | Yes | |
CantMakeDirectShoot | boolean | No | |
CurrentBallSpeed | real | No | |
CurrentVoteObtained | integer | No | |
DistanceOfSelectedUnit | real | No | |
DontShowYouCantEnterThere | boolean | No | |
e | real | No | |
FitnessOfPlayerA | integer | No | |
Flag | unit | No | |
Friction | real | No | |
G | real | No | |
GoalArea | rect | Yes | |
HeaddingTarget | location | No | |
HeaddingTargetFitness | integer | No | |
Hero | unit | Yes | |
HeroHeight | real | No | |
HeroInAir | boolean | Yes | |
HeroSlidingWait | integer | Yes | |
HeroVX | real | Yes | |
HeroVY | real | Yes | |
IgnoreAItimer | integer | No | |
JumpBall | timer | No | |
Keeper | unit | Yes | |
KeeperArea | rect | Yes | |
KeeperBallHoldTimer | integer | No | |
KeeperDefPosY | real | No | |
KeeperMoveableArea | rect | Yes | |
KeeperMoveY | real | No | |
KeeperPassTarget | unit | No | |
KeeperThrowPos | location | No | |
Kick | sound | No | |
Land | sound | No | |
LastOwner | unit | No | |
Leaderboard | leaderboard | Yes | |
LeaderboardCycle | integer | Yes | |
LeftTeamName | string | No | |
Linesmen | unit | Yes | |
MapReset | boolean | No | |
MaxBVYforHeadding | real | No | |
MaxSpeed | real | No | |
MinimumSpeed | real | No | |
NeaestEnemyDistFromPassTarget | real | No | |
NearestEnemyDist | real | Yes | |
PassTarget | unit | No | |
PassTargetDistance | real | No | |
PenaltyAreas | rect | Yes | |
PlayArea | rect | Yes | |
PlayerColorB | real | Yes | |
PlayerColorG | real | Yes | |
PlayerColorR | real | Yes | |
PlayerNames | string | Yes | |
PlayersCanVote | integer | No | |
PlayerScore | integer | Yes | |
RealTimer | timer | No | |
ReduceSpeedTimer | integer | Yes | |
Referee | unit | No | |
RightTeamName | string | No | |
RoundCheck | integer | No | |
RoundTime | real | No | |
RoundTimer | timer | No | |
Score | integer | Yes | |
SlidingDirection | real | Yes | |
SlidingEffect | effect | Yes | |
SlidingUnits | group | No | |
SpeedDownFactor | real | No | |
SuddenDeath | boolean | No | |
Team1Heros | group | No | |
Team2Heros | group | No | |
TempAngle | real | No | |
TempDirection | real | No | |
TempDirection2 | real | No | |
TempInt | integer | No | |
TempPoint | location | No | |
TempReal | real | No | |
TempReal2 | real | No | |
TempRealArray | real | Yes | |
TempUnit | unit | No | |
TempUnitGroup1 | group | No | |
TempUnitGroup2 | group | No | |
ThinkingTeamsEnemyNum | integer | No | |
ThinkingTeamsNum | integer | No | |
Throw | sound | No | |
Throwing | boolean | No | |
ThrowinMode | integer | No | |
ThrowinPos | location | No | |
ThrowInWaitTimer | integer | No | |
Twindow_VOTE | timerdialog | No | |
UnitBeStunned | unit | No | |
UNT_HeaddingTarget | unit | No | |
VoteDLG | dialog | No | |
VoteResult | integer | Yes | |
VoteTimeleft | timer | No | |
VoteTimerCreated | boolean | No | |
WanderArea | rect | Yes | |
WhichKeeperHasBall | integer | No | |
ZoomOut | boolean | Yes |
function Trig_Pass_ME_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A002' ) ) then
return false
endif
return true
endfunction
function Trig_Pass_ME_Func003Func010C takes nothing returns boolean
if ( not ( ( DistanceBetweenPoints(GetUnitLoc(udg_PassTarget), GetUnitLoc(udg_Ball)) / udg_TempReal ) >= 7.00 ) ) then
return false
endif
return true
endfunction
function Trig_Pass_ME_Func003C takes nothing returns boolean
if ( not ( IsUnitAlly(udg_BallOwner, GetOwningPlayer(GetSpellAbilityUnit())) == true ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(udg_BallOwner)) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Trig_Pass_ME_Actions takes nothing returns nothing
call PingMinimapLocForForceEx( GetPlayersAllies(GetOwningPlayer(GetSpellAbilityUnit())), GetUnitLoc(GetSpellAbilityUnit()), 1, bj_MINIMAPPINGSTYLE_FLASHY, udg_PlayerColorR[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], udg_PlayerColorG[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], udg_PlayerColorB[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] )
call DisplayTextToForce( GetPlayersAll(), ( udg_PlayerNames[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] + " : Hey, Pass me!" ) )
if ( Trig_Pass_ME_Func003C() ) then
set udg_BallBound = true
set udg_PassTarget = GetSpellAbilityUnit()
call SetUnitFlyHeightBJ( udg_Ball, udg_BallDefaultHeight, 0.00 )
set udg_BallVY = 0.00
set udg_BallInAir = false
set udg_BallDirection = AngleBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_PassTarget))
set udg_BallInitialDir = AngleBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_PassTarget))
set udg_TempReal = ( 57.20 + ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_BallOwner, true)) * 1.00 ) )
set udg_BallImmuneTimer = IMinBJ(7, R2I(( DistanceBetweenPoints(GetUnitLoc(udg_PassTarget), GetUnitLoc(udg_Ball)) / ( 2.00 * udg_TempReal ) )))
if ( Trig_Pass_ME_Func003Func010C() ) then
else
endif
call TriggerExecute( gg_trg_Set_Ball_VX )
call TriggerExecute( gg_trg_Common_Actions_for_shoot )
else
endif
endfunction
//===========================================================================
function InitTrig_Pass_ME takes nothing returns nothing
set gg_trg_Pass_ME = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pass_ME, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Pass_ME, Condition( function Trig_Pass_ME_Conditions ) )
call TriggerAddAction( gg_trg_Pass_ME, function Trig_Pass_ME_Actions )
endfunction
function Trig_Headding_Action_Func001Func001A takes nothing returns nothing
set udg_ThinkingTeamsNum = 1
set udg_ThinkingTeamsEnemyNum = 2
call TriggerExecute( gg_trg_Common_headding_action )
endfunction
function Trig_Headding_Action_Func001Func002A takes nothing returns nothing
set udg_ThinkingTeamsNum = 2
set udg_ThinkingTeamsEnemyNum = 1
call TriggerExecute( gg_trg_Common_headding_action )
endfunction
function Trig_Headding_Action_Func001C takes nothing returns boolean
if ( not ( udg_BallInAir == true ) ) then
return false
endif
if ( not ( udg_BallOwner == null ) ) then
return false
endif
if ( not ( ( 200.00 * udg_G ) <= Pow(udg_BallVY, 2.00) ) ) then
return false
endif
return true
endfunction
function Trig_Headding_Action_Actions takes nothing returns nothing
if ( Trig_Headding_Action_Func001C() ) then
call ForForce( GetPlayersAllies(Player(0)), function Trig_Headding_Action_Func001Func001A )
call ForForce( GetPlayersEnemies(Player(0)), function Trig_Headding_Action_Func001Func002A )
else
endif
endfunction
//===========================================================================
function InitTrig_Headding_Action takes nothing returns nothing
set gg_trg_Headding_Action = CreateTrigger( )
call TriggerAddAction( gg_trg_Headding_Action, function Trig_Headding_Action_Actions )
endfunction
function Trig_Common_headding_action_Func001Func002C takes nothing returns boolean
if ( not ( GetUnitFlyHeight(udg_Ball) <= ( ( 20.00 + I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], true)) ) + udg_HeroHeight ) ) ) then
return false
endif
if ( not ( IsUnitInRange(udg_Ball, udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], 100.00) == true ) ) then
return false
endif
return true
endfunction
function Trig_Common_headding_action_Func001Func003C takes nothing returns boolean
if ( not ( ( ( DistanceBetweenPoints(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]), GetUnitLoc(udg_Flag)) - 50.00 ) / GetUnitMoveSpeed(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]) ) <= ( udg_TempReal * 0.10 ) ) ) then
return false
endif
return true
endfunction
function Trig_Common_headding_action_Func001Func006C takes nothing returns boolean
if ( ( GetRandomInt(1, 5) == 1 ) ) then
return true
endif
if ( ( RectContainsUnit(udg_PenaltyAreas[udg_ThinkingTeamsEnemyNum], udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]) == true ) ) then
return true
endif
return false
endfunction
function Trig_Common_headding_action_Func001C takes nothing returns boolean
if ( not ( GetPlayerController(GetEnumPlayer()) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
if ( not ( GetAIDifficulty(GetEnumPlayer()) != AI_DIFFICULTY_NEWBIE ) ) then
return false
endif
if ( not Trig_Common_headding_action_Func001Func006C() ) then
return false
endif
return true
endfunction
function Trig_Common_headding_action_Actions takes nothing returns nothing
if ( Trig_Common_headding_action_Func001C() ) then
set udg_TempReal = ( ( ( -2.00 * udg_BallVY ) + SquareRoot(( ( 4.00 * Pow(udg_BallVY, 2.00) ) - ( ( 8.00 * udg_G ) * GetUnitFlyHeight(udg_Ball) ) )) ) / ( 2.00 * udg_G ) )
if ( Trig_Common_headding_action_Func001Func002C() ) then
call IssueTargetOrder( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], "move", udg_Ball )
call IssueImmediateOrder( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], "windwalk" )
else
endif
if ( Trig_Common_headding_action_Func001Func003C() ) then
call IssuePointOrderLoc( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], "move", PolarProjectionBJ(GetUnitLoc(udg_Flag), ( DistanceBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_Flag)) / 10.00 ), AngleBetweenPoints(GetUnitLoc(udg_Flag), GetUnitLoc(udg_Ball))) )
else
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Common_headding_action takes nothing returns nothing
set gg_trg_Common_headding_action = CreateTrigger( )
call TriggerAddAction( gg_trg_Common_headding_action, function Trig_Common_headding_action_Actions )
endfunction
function Trig_Headding_Action_BKUP_Func001Func001001002 takes nothing returns boolean
return ( GetPlayerController(GetOwningPlayer(GetFilterUnit())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Headding_Action_BKUP_Func001Func001Func003Func005C takes nothing returns boolean
if ( not ( IsUnitAlly(GetEnumUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Headding_Action_BKUP_Func001Func001Func003Func006Func002001 takes nothing returns boolean
return ( GetRandomInt(0, 4) == 0 )
endfunction
function Trig_Headding_Action_BKUP_Func001Func001Func003Func006Func002002 takes nothing returns boolean
return ( RectContainsUnit(udg_PlayArea[udg_ThinkingTeamsEnemyNum], GetEnumUnit()) == true )
endfunction
function Trig_Headding_Action_BKUP_Func001Func001Func003Func006Func004C takes nothing returns boolean
if ( not ( udg_TempReal2 <= ( udg_TempReal + udg_HeroHeight ) ) ) then
return false
endif
if ( not ( udg_TempReal2 >= udg_TempReal ) ) then
return false
endif
if ( not ( udg_TempRealArray[1] >= 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Headding_Action_BKUP_Func001Func001Func003Func006C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetOwningPlayer(GetEnumUnit())) != AI_DIFFICULTY_NEWBIE ) ) then
return false
endif
if ( not GetBooleanOr( Trig_Headding_Action_BKUP_Func001Func001Func003Func006Func002001(), Trig_Headding_Action_BKUP_Func001Func001Func003Func006Func002002() ) ) then
return false
endif
if ( not ( udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] == false ) ) then
return false
endif
if ( not Trig_Headding_Action_BKUP_Func001Func001Func003Func006Func004C() ) then
return false
endif
return true
endfunction
function Trig_Headding_Action_BKUP_Func001Func001Func003C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(GetEnumUnit()) >= ( ( 10.00 * DistanceBetweenPoints(GetUnitLoc(GetEnumUnit()), GetUnitLoc(udg_Flag)) ) / udg_TempReal ) ) ) then
return false
endif
return true
endfunction
function Trig_Headding_Action_BKUP_Func001Func001A takes nothing returns nothing
set udg_TempReal = ( DistanceBetweenPoints(GetUnitLoc(GetEnumUnit()), GetUnitLoc(udg_Ball)) / ( GetUnitMoveSpeed(udg_Ball) / 10.00 ) )
set udg_TempReal2 = ( GetUnitFlyHeight(udg_Ball) + ( ( udg_BallVY * udg_TempReal ) - ( ( udg_G * Pow(udg_TempReal, 2.00) ) / 2.00 ) ) )
if ( Trig_Headding_Action_BKUP_Func001Func001Func003C() ) then
set udg_TempInt = ( 20 + GetHeroStatBJ(bj_HEROSTAT_STR, GetEnumUnit(), true) )
set udg_TempRealArray[1] = ( I2R(udg_TempInt) - ( udg_G * udg_TempReal ) )
set udg_TempReal = ( ( I2R(udg_TempInt) * udg_TempReal ) - ( ( udg_G * Pow(udg_TempReal, 2.00) ) / 2.00 ) )
if ( Trig_Headding_Action_BKUP_Func001Func001Func003Func005C() ) then
set udg_ThinkingTeamsNum = 1
set udg_ThinkingTeamsEnemyNum = 2
else
set udg_ThinkingTeamsNum = 2
set udg_ThinkingTeamsEnemyNum = 1
endif
if ( Trig_Headding_Action_BKUP_Func001Func001Func003Func006C() ) then
call IssuePointOrderLoc( GetEnumUnit(), "move", PolarProjectionBJ(GetUnitLoc(udg_Flag), 100.00, AngleBetweenPoints(GetUnitLoc(udg_Flag), GetUnitLoc(udg_Ball))) )
call IssueImmediateOrder( GetEnumUnit(), "windwalk" )
else
endif
else
endif
endfunction
function Trig_Headding_Action_BKUP_Func001C takes nothing returns boolean
if ( not ( udg_BallInAir == true ) ) then
return false
endif
return true
endfunction
function Trig_Headding_Action_BKUP_Actions takes nothing returns nothing
if ( Trig_Headding_Action_BKUP_Func001C() ) then
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Headding_Action_BKUP_Func001Func001001002)), function Trig_Headding_Action_BKUP_Func001Func001A )
else
endif
endfunction
//===========================================================================
function InitTrig_Headding_Action_BKUP takes nothing returns nothing
set gg_trg_Headding_Action_BKUP = CreateTrigger( )
call TriggerAddAction( gg_trg_Headding_Action_BKUP, function Trig_Headding_Action_BKUP_Actions )
endfunction
function Trig_Com_Get_Abilities_Func001Func002Func001C takes nothing returns boolean
if ( not ( GetForLoopIndexA() != 0 ) ) then
return false
endif
return true
endfunction
function Trig_Com_Get_Abilities_Func001Func003Func001C takes nothing returns boolean
if ( not ( GetForLoopIndexA() != 0 ) ) then
return false
endif
return true
endfunction
function Trig_Com_Get_Abilities_Func001A takes nothing returns nothing
set udg_TempInt = GetRandomInt(0, 10)
set bj_forLoopAIndex = 0
set bj_forLoopAIndexEnd = udg_TempInt
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Com_Get_Abilities_Func001Func002Func001C() ) then
call SelectHeroSkill( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], 'A001' )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 0
set bj_forLoopAIndexEnd = ( 10 - udg_TempInt )
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Com_Get_Abilities_Func001Func003Func001C() ) then
call SelectHeroSkill( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], 'A000' )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
function Trig_Com_Get_Abilities_Actions takes nothing returns nothing
call ForForce( GetPlayersByMapControl(MAP_CONTROL_COMPUTER), function Trig_Com_Get_Abilities_Func001A )
endfunction
//===========================================================================
function InitTrig_Com_Get_Abilities takes nothing returns nothing
set gg_trg_Com_Get_Abilities = CreateTrigger( )
call TriggerAddAction( gg_trg_Com_Get_Abilities, function Trig_Com_Get_Abilities_Actions )
endfunction
function Trig_Computer_AI_Func001Func013Func001C takes nothing returns boolean
if ( not ( GetEnumPlayer() != Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Computer_AI_Func001Func013A takes nothing returns nothing
if ( Trig_Computer_AI_Func001Func013Func001C() ) then
call IssueImmediateOrder( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], "stop" )
else
endif
endfunction
function Trig_Computer_AI_Func001C takes nothing returns boolean
if ( not ( udg_IgnoreAItimer <= 0 ) ) then
return false
endif
return true
endfunction
function Trig_Computer_AI_Actions takes nothing returns nothing
if ( Trig_Computer_AI_Func001C() ) then
call TriggerExecute( gg_trg_Release_UnitGroups )
set udg_ThinkingTeamsNum = 1
set udg_ThinkingTeamsEnemyNum = 2
call GroupAddGroup( udg_Team1Heros, udg_TempUnitGroup1 )
call GroupAddGroup( udg_Team2Heros, udg_TempUnitGroup2 )
call TriggerExecute( gg_trg_Team_Actions )
call TriggerExecute( gg_trg_Release_UnitGroups )
set udg_ThinkingTeamsNum = 2
set udg_ThinkingTeamsEnemyNum = 1
call GroupAddGroup( udg_Team1Heros, udg_TempUnitGroup2 )
call GroupAddGroup( udg_Team2Heros, udg_TempUnitGroup1 )
call TriggerExecute( gg_trg_Team_Actions )
else
call ForForce( GetPlayersByMapControl(MAP_CONTROL_COMPUTER), function Trig_Computer_AI_Func001Func013A )
endif
endfunction
//===========================================================================
function InitTrig_Computer_AI takes nothing returns nothing
set gg_trg_Computer_AI = CreateTrigger( )
call DisableTrigger( gg_trg_Computer_AI )
call TriggerAddAction( gg_trg_Computer_AI, function Trig_Computer_AI_Actions )
endfunction
function Trig_Release_UnitGroups_Actions takes nothing returns nothing
call GroupClear( udg_TempUnitGroup2 )
call GroupClear( udg_TempUnitGroup1 )
endfunction
//===========================================================================
function InitTrig_Release_UnitGroups takes nothing returns nothing
set gg_trg_Release_UnitGroups = CreateTrigger( )
call TriggerAddAction( gg_trg_Release_UnitGroups, function Trig_Release_UnitGroups_Actions )
endfunction
function Trig_Set_nearest_friendly_unit_Func002Func001Func002001 takes nothing returns boolean
return ( udg_TempUnit == null )
endfunction
function Trig_Set_nearest_friendly_unit_Func002Func001Func002002 takes nothing returns boolean
return ( DistanceBetweenPoints(GetUnitLoc(udg_TempUnit), udg_TempPoint) >= DistanceBetweenPoints(GetUnitLoc(GetEnumUnit()), udg_TempPoint) )
endfunction
function Trig_Set_nearest_friendly_unit_Func002Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Set_nearest_friendly_unit_Func002Func001Func002001(), Trig_Set_nearest_friendly_unit_Func002Func001Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Set_nearest_friendly_unit_Func002A takes nothing returns nothing
if ( Trig_Set_nearest_friendly_unit_Func002Func001C() ) then
set udg_TempUnit = GetEnumUnit()
else
endif
endfunction
function Trig_Set_nearest_friendly_unit_Actions takes nothing returns nothing
set udg_TempUnit = null
call ForGroupBJ( udg_TempUnitGroup1, function Trig_Set_nearest_friendly_unit_Func002A )
endfunction
//===========================================================================
function InitTrig_Set_nearest_friendly_unit takes nothing returns nothing
set gg_trg_Set_nearest_friendly_unit = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_nearest_friendly_unit, function Trig_Set_nearest_friendly_unit_Actions )
endfunction
function Trig_Set_nearest_enemy_unit_Func002Func001Func002001 takes nothing returns boolean
return ( udg_TempUnit == null )
endfunction
function Trig_Set_nearest_enemy_unit_Func002Func001Func002002 takes nothing returns boolean
return ( DistanceBetweenPoints(GetUnitLoc(udg_TempUnit), udg_TempPoint) >= DistanceBetweenPoints(GetUnitLoc(GetEnumUnit()), udg_TempPoint) )
endfunction
function Trig_Set_nearest_enemy_unit_Func002Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Set_nearest_enemy_unit_Func002Func001Func002001(), Trig_Set_nearest_enemy_unit_Func002Func001Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Set_nearest_enemy_unit_Func002A takes nothing returns nothing
if ( Trig_Set_nearest_enemy_unit_Func002Func001C() ) then
set udg_TempUnit = GetEnumUnit()
else
endif
endfunction
function Trig_Set_nearest_enemy_unit_Actions takes nothing returns nothing
set udg_TempUnit = null
call ForGroupBJ( udg_TempUnitGroup2, function Trig_Set_nearest_enemy_unit_Func002A )
endfunction
//===========================================================================
function InitTrig_Set_nearest_enemy_unit takes nothing returns nothing
set gg_trg_Set_nearest_enemy_unit = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_nearest_enemy_unit, function Trig_Set_nearest_enemy_unit_Actions )
endfunction
function Trig_Team_Actions_Func001C takes nothing returns boolean
if ( not ( udg_BallOwner == null ) ) then
return false
endif
return true
endfunction
function Trig_Team_Actions_Actions takes nothing returns nothing
if ( Trig_Team_Actions_Func001C() ) then
call TriggerExecute( gg_trg_Team_Actions_No_BallOwner )
else
call TriggerExecute( gg_trg_Team_Actions_with_BallOwner )
endif
endfunction
//===========================================================================
function InitTrig_Team_Actions takes nothing returns nothing
set gg_trg_Team_Actions = CreateTrigger( )
call TriggerAddAction( gg_trg_Team_Actions, function Trig_Team_Actions_Actions )
endfunction
function Trig_Team_Actions_No_BallOwner_Func002Func001C takes nothing returns boolean
if ( not ( RectContainsUnit(udg_PlayArea[udg_ThinkingTeamsNum], udg_Ball) == true ) ) then
return false
endif
return true
endfunction
function Trig_Team_Actions_No_BallOwner_Func002C takes nothing returns boolean
if ( not ( udg_ThrowinMode == udg_ThinkingTeamsEnemyNum ) ) then
return false
endif
return true
endfunction
function Trig_Team_Actions_No_BallOwner_Actions takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Attack_a_friend_to_Ball )
if ( Trig_Team_Actions_No_BallOwner_Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Pick_a_friend_for_Defence )
call TriggerExecute( gg_trg_Mark_Enemies )
else
if ( Trig_Team_Actions_No_BallOwner_Func002Func001C() ) then
call TriggerExecute( gg_trg_Wander_Around_the_ball_for_Defend )
else
call ConditionalTriggerExecute( gg_trg_Pick_a_friend_for_Defence )
call TriggerExecute( gg_trg_Wander_Around_the_ball_for_Attack )
endif
endif
endfunction
//===========================================================================
function InitTrig_Team_Actions_No_BallOwner takes nothing returns nothing
set gg_trg_Team_Actions_No_BallOwner = CreateTrigger( )
call TriggerAddAction( gg_trg_Team_Actions_No_BallOwner, function Trig_Team_Actions_No_BallOwner_Actions )
endfunction
function Trig_Team_Actions_with_BallOwner_Func001Func001C takes nothing returns boolean
if ( not ( udg_ThinkingTeamsNum == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Team_Actions_with_BallOwner_Func001Func002C takes nothing returns boolean
if ( not ( udg_ThinkingTeamsNum == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Team_Actions_with_BallOwner_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(udg_BallOwner, Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Team_Actions_with_BallOwner_Actions takes nothing returns nothing
if ( Trig_Team_Actions_with_BallOwner_Func001C() ) then
if ( Trig_Team_Actions_with_BallOwner_Func001Func002C() ) then
call TriggerExecute( gg_trg_Friend_has_the_ball )
else
call TriggerExecute( gg_trg_Enemy_has_the_ball )
endif
else
if ( Trig_Team_Actions_with_BallOwner_Func001Func001C() ) then
call TriggerExecute( gg_trg_Friend_has_the_ball )
else
call TriggerExecute( gg_trg_Enemy_has_the_ball )
endif
endif
endfunction
//===========================================================================
function InitTrig_Team_Actions_with_BallOwner takes nothing returns nothing
set gg_trg_Team_Actions_with_BallOwner = CreateTrigger( )
call TriggerAddAction( gg_trg_Team_Actions_with_BallOwner, function Trig_Team_Actions_with_BallOwner_Actions )
endfunction
function Trig_Friend_has_the_ball_Func005Func001Func002Func003C takes nothing returns boolean
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_BallOwner), GetUnitLoc(udg_TempUnit)) <= 1024.00 ) ) then
return false
endif
return true
endfunction
function Trig_Friend_has_the_ball_Func005Func001Func002C takes nothing returns boolean
if ( not ( udg_ThrowInWaitTimer <= 0 ) ) then
return false
endif
return true
endfunction
function Trig_Friend_has_the_ball_Func005Func001Func003Func001Func001C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetOwningPlayer(udg_BallOwner)) == AI_DIFFICULTY_NORMAL ) ) then
return false
endif
return true
endfunction
function Trig_Friend_has_the_ball_Func005Func001Func003Func001C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetOwningPlayer(udg_BallOwner)) == AI_DIFFICULTY_NEWBIE ) ) then
return false
endif
return true
endfunction
function Trig_Friend_has_the_ball_Func005Func001Func003Func003Func002003001001002 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_TempUnitGroup1) == true )
endfunction
function Trig_Friend_has_the_ball_Func005Func001Func003Func003Func005001001002 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_TempUnitGroup1) == true )
endfunction
function Trig_Friend_has_the_ball_Func005Func001Func003Func003Func005003001002 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_TempUnitGroup2) == true )
endfunction
function Trig_Friend_has_the_ball_Func005Func001Func003Func003C takes nothing returns boolean
if ( not ( GetRandomInt(0, udg_TempInt) == 0 ) ) then
return false
endif
if ( not ( RectContainsUnit(udg_PenaltyAreas[udg_ThinkingTeamsEnemyNum], udg_BallOwner) == false ) ) then
return false
endif
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(udg_PenaltyAreas[udg_ThinkingTeamsEnemyNum], Condition(function Trig_Friend_has_the_ball_Func005Func001Func003Func003Func005001001002))) >= CountUnitsInGroup(GetUnitsInRectMatching(udg_PenaltyAreas[udg_ThinkingTeamsEnemyNum], Condition(function Trig_Friend_has_the_ball_Func005Func001Func003Func003Func005003001002))) ) ) then
return false
endif
return true
endfunction
function Trig_Friend_has_the_ball_Func005Func001Func003Func005001001003 takes nothing returns boolean
return ( IsUnitEnemy(udg_BallOwner, GetOwningPlayer(GetFilterUnit())) == true )
endfunction
function Trig_Friend_has_the_ball_Func005Func001Func003C takes nothing returns boolean
if ( not ( GetRandomInt(0, 10) <= 3 ) ) then
return false
endif
if ( not ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(256.00, GetUnitLoc(udg_Ball), Condition(function Trig_Friend_has_the_ball_Func005Func001Func003Func005001001003))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Friend_has_the_ball_Func005Func001C takes nothing returns boolean
if ( not ( udg_ThrowinMode == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Friend_has_the_ball_Func005C takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(udg_BallOwner)) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Trig_Friend_has_the_ball_Actions takes nothing returns nothing
call GroupRemoveUnitSimple( udg_BallOwner, udg_TempUnitGroup1 )
call ConditionalTriggerExecute( gg_trg_Pick_a_friend_for_Defence )
call ConditionalTriggerExecute( gg_trg_Pick_a_friend_for_headding )
call TriggerExecute( gg_trg_Wander_Around_the_ball_for_Attack )
if ( Trig_Friend_has_the_ball_Func005C() ) then
if ( Trig_Friend_has_the_ball_Func005Func001C() ) then
call TriggerExecute( gg_trg_Shoot )
if ( Trig_Friend_has_the_ball_Func005Func001Func003C() ) then
call TriggerExecute( gg_trg_Enemy_is_approaching_to_ballowner )
else
if ( Trig_Friend_has_the_ball_Func005Func001Func003Func001C() ) then
set udg_TempInt = 15
else
if ( Trig_Friend_has_the_ball_Func005Func001Func003Func001Func001C() ) then
set udg_TempInt = 7
else
set udg_TempInt = 3
endif
endif
if ( Trig_Friend_has_the_ball_Func005Func001Func003Func003C() ) then
call IssuePointOrderLoc( udg_BallOwner, "darkportal", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(udg_PenaltyAreas[udg_ThinkingTeamsEnemyNum], Condition(function Trig_Friend_has_the_ball_Func005Func001Func003Func003Func002003001001002)))) )
else
call TriggerExecute( gg_trg_Move_To )
endif
endif
else
if ( Trig_Friend_has_the_ball_Func005Func001Func002C() ) then
set udg_TempPoint = GetUnitLoc(udg_BallOwner)
call TriggerExecute( gg_trg_Set_nearest_friendly_unit )
if ( Trig_Friend_has_the_ball_Func005Func001Func002Func003C() ) then
call IssueImmediateOrder( udg_BallOwner, "divineshield" )
else
call IssuePointOrderLoc( udg_BallOwner, "darkportal", GetUnitLoc(udg_TempUnit) )
endif
else
endif
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Friend_has_the_ball takes nothing returns nothing
set gg_trg_Friend_has_the_ball = CreateTrigger( )
call TriggerAddAction( gg_trg_Friend_has_the_ball, function Trig_Friend_has_the_ball_Actions )
endfunction
function Trig_Move_To_Func001Func002C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetOwningPlayer(udg_BallOwner)) == AI_DIFFICULTY_NORMAL ) ) then
return false
endif
return true
endfunction
function Trig_Move_To_Func001C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetOwningPlayer(udg_BallOwner)) == AI_DIFFICULTY_NEWBIE ) ) then
return false
endif
return true
endfunction
function Trig_Move_To_Actions takes nothing returns nothing
if ( Trig_Move_To_Func001C() ) then
call TriggerExecute( gg_trg_MoveTo_Easy )
else
if ( Trig_Move_To_Func001Func002C() ) then
call TriggerExecute( gg_trg_MoveTo_Normal )
else
call TriggerExecute( gg_trg_MoveTo_Insane )
endif
endif
endfunction
//===========================================================================
function InitTrig_Move_To takes nothing returns nothing
set gg_trg_Move_To = CreateTrigger( )
call TriggerAddAction( gg_trg_Move_To, function Trig_Move_To_Actions )
endfunction
function Trig_MoveTo_Normal_Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(0, 1) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_MoveTo_Normal_Func001C takes nothing returns boolean
if ( not ( GetRandomInt(0, 2) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_MoveTo_Normal_Actions takes nothing returns nothing
if ( Trig_MoveTo_Normal_Func001C() ) then
call IssuePointOrderLoc( udg_BallOwner, "move", GetRectCenter(udg_AI_AttackPoint_M[udg_ThinkingTeamsNum]) )
else
if ( Trig_MoveTo_Normal_Func001Func001C() ) then
call IssuePointOrderLoc( udg_BallOwner, "move", GetRectCenter(udg_AI_AttackPoint_D[udg_ThinkingTeamsNum]) )
else
call IssuePointOrderLoc( udg_BallOwner, "move", GetRectCenter(udg_AI_AttackPoint_U[udg_ThinkingTeamsNum]) )
endif
endif
endfunction
//===========================================================================
function InitTrig_MoveTo_Normal takes nothing returns nothing
set gg_trg_MoveTo_Normal = CreateTrigger( )
call TriggerAddAction( gg_trg_MoveTo_Normal, function Trig_MoveTo_Normal_Actions )
endfunction
function Trig_MoveTo_Easy_Func001C takes nothing returns boolean
if ( not ( GetRandomInt(0, 2) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_MoveTo_Easy_Actions takes nothing returns nothing
if ( Trig_MoveTo_Easy_Func001C() ) then
call IssueImmediateOrder( udg_BallOwner, "stop" )
else
call IssuePointOrderLoc( udg_BallOwner, "move", GetRectCenter(udg_AI_AttackPoint_M[udg_ThinkingTeamsNum]) )
endif
endfunction
//===========================================================================
function InitTrig_MoveTo_Easy takes nothing returns nothing
set gg_trg_MoveTo_Easy = CreateTrigger( )
call TriggerAddAction( gg_trg_MoveTo_Easy, function Trig_MoveTo_Easy_Actions )
endfunction
function Trig_MoveTo_Insane_Func006Func001C takes nothing returns boolean
if ( not ( udg_TempRealArray[1] >= udg_TempRealArray[0] ) ) then
return false
endif
if ( not ( udg_TempRealArray[1] >= udg_TempRealArray[2] ) ) then
return false
endif
return true
endfunction
function Trig_MoveTo_Insane_Func006C takes nothing returns boolean
if ( not ( udg_TempRealArray[0] >= udg_TempRealArray[1] ) ) then
return false
endif
if ( not ( udg_TempRealArray[0] >= udg_TempRealArray[2] ) ) then
return false
endif
return true
endfunction
function Trig_MoveTo_Insane_Actions takes nothing returns nothing
set udg_TempPoint = GetUnitLoc(udg_BallOwner)
call TriggerExecute( gg_trg_Set_nearest_enemy_unit )
set udg_TempRealArray[0] = DistanceBetweenPoints(GetUnitLoc(udg_TempUnit), GetRectCenter(udg_AI_AttackPoint_U[udg_ThinkingTeamsNum]))
set udg_TempRealArray[1] = DistanceBetweenPoints(GetUnitLoc(udg_TempUnit), GetRectCenter(udg_AI_AttackPoint_M[udg_ThinkingTeamsNum]))
set udg_TempRealArray[2] = DistanceBetweenPoints(GetUnitLoc(udg_TempUnit), GetRectCenter(udg_AI_AttackPoint_D[udg_ThinkingTeamsNum]))
if ( Trig_MoveTo_Insane_Func006C() ) then
call IssuePointOrderLoc( udg_BallOwner, "move", GetRectCenter(udg_AI_AttackPoint_U[udg_ThinkingTeamsNum]) )
else
if ( Trig_MoveTo_Insane_Func006Func001C() ) then
call IssuePointOrderLoc( udg_BallOwner, "move", GetRectCenter(udg_AI_AttackPoint_M[udg_ThinkingTeamsNum]) )
else
call IssuePointOrderLoc( udg_BallOwner, "move", GetRectCenter(udg_AI_AttackPoint_D[udg_ThinkingTeamsNum]) )
endif
endif
endfunction
//===========================================================================
function InitTrig_MoveTo_Insane takes nothing returns nothing
set gg_trg_MoveTo_Insane = CreateTrigger( )
call TriggerAddAction( gg_trg_MoveTo_Insane, function Trig_MoveTo_Insane_Actions )
endfunction
function Trig_Enemy_is_approaching_to_ballowner_Func001Func001C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetOwningPlayer(udg_BallOwner)) == AI_DIFFICULTY_NORMAL ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_is_approaching_to_ballowner_Func001C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetOwningPlayer(udg_BallOwner)) == AI_DIFFICULTY_NEWBIE ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_is_approaching_to_ballowner_Actions takes nothing returns nothing
if ( Trig_Enemy_is_approaching_to_ballowner_Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Enemy_Approach_Easy )
else
if ( Trig_Enemy_is_approaching_to_ballowner_Func001Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Enemy_Approach_Normal )
else
call ConditionalTriggerExecute( gg_trg_Enemy_Approach_Insane )
endif
endif
endfunction
//===========================================================================
function InitTrig_Enemy_is_approaching_to_ballowner takes nothing returns nothing
set gg_trg_Enemy_is_approaching_to_ballowner = CreateTrigger( )
call TriggerAddAction( gg_trg_Enemy_is_approaching_to_ballowner, function Trig_Enemy_is_approaching_to_ballowner_Actions )
endfunction
function Trig_Enemy_Approach_Easy_Conditions takes nothing returns boolean
if ( not ( GetRandomInt(1, 15) == 1 ) ) then
return false
endif
if ( not ( udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(udg_BallOwner))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_Approach_Easy_Actions takes nothing returns nothing
call IssueImmediateOrder( udg_BallOwner, "divineshield" )
endfunction
//===========================================================================
function InitTrig_Enemy_Approach_Easy takes nothing returns nothing
set gg_trg_Enemy_Approach_Easy = CreateTrigger( )
call TriggerAddCondition( gg_trg_Enemy_Approach_Easy, Condition( function Trig_Enemy_Approach_Easy_Conditions ) )
call TriggerAddAction( gg_trg_Enemy_Approach_Easy, function Trig_Enemy_Approach_Easy_Actions )
endfunction
function Trig_Enemy_Approach_Normal_Conditions takes nothing returns boolean
if ( not ( GetRandomInt(1, 5) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_Approach_Normal_Func003Func001C takes nothing returns boolean
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_BallOwner), GetUnitLoc(udg_TempUnit)) <= 1024.00 ) ) then
return false
endif
if ( not ( udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(udg_BallOwner))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_Approach_Normal_Func003C takes nothing returns boolean
if ( not ( RAbsBJ(( DistanceBetweenPoints(GetRectCenter(udg_AI_AttackPoint_M[udg_ThinkingTeamsNum]), GetUnitLoc(udg_BallOwner)) - DistanceBetweenPoints(GetRectCenter(udg_AI_AttackPoint_M[udg_ThinkingTeamsNum]), GetUnitLoc(udg_TempUnit)) )) <= 1024.00 ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_Approach_Normal_Actions takes nothing returns nothing
set udg_TempPoint = GetUnitLoc(udg_BallOwner)
call TriggerExecute( gg_trg_Set_nearest_friendly_unit )
if ( Trig_Enemy_Approach_Normal_Func003C() ) then
if ( Trig_Enemy_Approach_Normal_Func003Func001C() ) then
call IssueImmediateOrder( udg_BallOwner, "divineshield" )
else
call IssuePointOrderLoc( udg_BallOwner, "darkportal", GetUnitLoc(udg_TempUnit) )
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Enemy_Approach_Normal takes nothing returns nothing
set gg_trg_Enemy_Approach_Normal = CreateTrigger( )
call TriggerAddCondition( gg_trg_Enemy_Approach_Normal, Condition( function Trig_Enemy_Approach_Normal_Conditions ) )
call TriggerAddAction( gg_trg_Enemy_Approach_Normal, function Trig_Enemy_Approach_Normal_Actions )
endfunction
function Trig_Enemy_Approach_Insane_Func001Func001C takes nothing returns boolean
if ( not ( GetLocationY(GetUnitLoc(udg_Keeper[udg_ThinkingTeamsEnemyNum])) >= GetLocationY(GetRectCenter(gg_rct_Center)) ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_Approach_Insane_Func001Func003Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( GetLocationY(GetUnitLoc(udg_Keeper[udg_ThinkingTeamsEnemyNum])) >= GetLocationY(GetRectCenter(gg_rct_Center)) ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_Approach_Insane_Func001Func003Func001Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(0, 2) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_Approach_Insane_Func001Func003Func001Func001Func006001001003 takes nothing returns boolean
return ( IsUnitInGroup(GetFilterUnit(), udg_TempUnitGroup2) == true )
endfunction
function Trig_Enemy_Approach_Insane_Func001Func003Func001Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != udg_BallOwner ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_BallOwner), GetUnitLoc(GetEnumUnit())) >= 1000.00 ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(GetEnumUnit()), GetUnitLoc(udg_Ball)) <= ( ( ( 4.50 * I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_BallOwner, true)) ) + ( ( 201.60 * I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_BallOwner, true)) ) + 2232.00 ) ) / udg_G ) ) ) then
return false
endif
if ( not ( IsUnitGroupEmptyBJ(GetUnitsInRangeOfLocMatching(256.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Enemy_Approach_Insane_Func001Func003Func001Func001Func006001001003))) == true ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_Approach_Insane_Func001Func003Func001A takes nothing returns nothing
if ( Trig_Enemy_Approach_Insane_Func001Func003Func001Func001C() ) then
call IssuePointOrderLoc( udg_BallOwner, "darkportal", GetUnitLoc(GetEnumUnit()) )
else
if ( Trig_Enemy_Approach_Insane_Func001Func003Func001Func001Func001C() ) then
if ( Trig_Enemy_Approach_Insane_Func001Func003Func001Func001Func001Func002C() ) then
set udg_TempPoint = Location(GetLocationX(GetRectCenter(udg_GoalArea[udg_ThinkingTeamsEnemyNum])), GetRectMinY(udg_GoalArea[udg_ThinkingTeamsEnemyNum]))
else
set udg_TempPoint = Location(GetLocationX(GetRectCenter(udg_GoalArea[udg_ThinkingTeamsEnemyNum])), GetRectMaxY(udg_GoalArea[udg_ThinkingTeamsEnemyNum]))
endif
call IssuePointOrderLoc( udg_BallOwner, "darkportal", udg_TempPoint )
else
endif
endif
endfunction
function Trig_Enemy_Approach_Insane_Func001Func003C takes nothing returns boolean
if ( not ( udg_PassTarget != null ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_BallOwner), GetUnitLoc(udg_Keeper[udg_ThinkingTeamsEnemyNum])) >= DistanceBetweenPoints(GetUnitLoc(udg_PassTarget), GetUnitLoc(udg_Keeper[udg_ThinkingTeamsEnemyNum])) ) ) then
return false
endif
if ( not ( udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(udg_BallOwner))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_Approach_Insane_Func001C takes nothing returns boolean
if ( not ( RectContainsUnit(udg_PenaltyAreas[udg_ThinkingTeamsEnemyNum], udg_BallOwner) == true ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_Approach_Insane_Actions takes nothing returns nothing
if ( Trig_Enemy_Approach_Insane_Func001C() ) then
if ( Trig_Enemy_Approach_Insane_Func001Func001C() ) then
set udg_TempPoint = Location(GetLocationX(GetRectCenter(udg_GoalArea[udg_ThinkingTeamsEnemyNum])), GetRectMinY(udg_GoalArea[udg_ThinkingTeamsEnemyNum]))
else
set udg_TempPoint = Location(GetLocationX(GetRectCenter(udg_GoalArea[udg_ThinkingTeamsEnemyNum])), GetRectMaxY(udg_GoalArea[udg_ThinkingTeamsEnemyNum]))
endif
else
call TriggerExecute( gg_trg_Get_Pass_Target )
if ( Trig_Enemy_Approach_Insane_Func001Func003C() ) then
call IssueImmediateOrder( udg_BallOwner, "divineshield" )
else
call ForGroupBJ( udg_TempUnitGroup1, function Trig_Enemy_Approach_Insane_Func001Func003Func001A )
endif
endif
endfunction
//===========================================================================
function InitTrig_Enemy_Approach_Insane takes nothing returns nothing
set gg_trg_Enemy_Approach_Insane = CreateTrigger( )
call TriggerAddAction( gg_trg_Enemy_Approach_Insane, function Trig_Enemy_Approach_Insane_Actions )
endfunction
function Trig_Enemy_has_the_ball_Actions takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Attack_a_friend_to_Ball )
call TriggerExecute( gg_trg_Mark_Enemies )
endfunction
//===========================================================================
function InitTrig_Enemy_has_the_ball takes nothing returns nothing
set gg_trg_Enemy_has_the_ball = CreateTrigger( )
call TriggerAddAction( gg_trg_Enemy_has_the_ball, function Trig_Enemy_has_the_ball_Actions )
endfunction
function Trig_Attack_a_friend_to_Ball_Conditions takes nothing returns boolean
if ( not ( udg_WhichKeeperHasBall == 0 ) ) then
return false
endif
if ( not ( udg_ThrowInWaitTimer <= 0 ) ) then
return false
endif
return true
endfunction
function Trig_Attack_a_friend_to_Ball_Func004C takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(udg_TempUnit)) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Trig_Attack_a_friend_to_Ball_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Set_AttackPoint )
if ( Trig_Attack_a_friend_to_Ball_Func004C() ) then
call TriggerExecute( gg_trg_Attack_Animations )
else
endif
endfunction
//===========================================================================
function InitTrig_Attack_a_friend_to_Ball takes nothing returns nothing
set gg_trg_Attack_a_friend_to_Ball = CreateTrigger( )
call TriggerAddCondition( gg_trg_Attack_a_friend_to_Ball, Condition( function Trig_Attack_a_friend_to_Ball_Conditions ) )
call TriggerAddAction( gg_trg_Attack_a_friend_to_Ball, function Trig_Attack_a_friend_to_Ball_Actions )
endfunction
function Trig_Attack_Animations_Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(0, 2) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Attack_Animations_Func002Func002Func002C takes nothing returns boolean
if ( not ( GetUnitFlyHeight(udg_Ball) > ( GetUnitFlyHeight(udg_TempUnit) + udg_HeroHeight ) ) ) then
return false
endif
if ( not ( udg_BallInAir == true ) ) then
return false
endif
return true
endfunction
function Trig_Attack_Animations_Func002Func002C takes nothing returns boolean
if ( not ( udg_BallOwner != null ) ) then
return false
endif
if ( not ( IsUnitEnemy(udg_BallOwner, GetOwningPlayer(udg_TempUnit)) == true ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_TempUnit), GetUnitLoc(udg_Ball)) <= 200.00 ) ) then
return false
endif
if ( not ( GetRandomInt(0, 10) < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Attack_Animations_Func002C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetOwningPlayer(udg_TempUnit)) != AI_DIFFICULTY_NEWBIE ) ) then
return false
endif
return true
endfunction
function Trig_Attack_Animations_Actions takes nothing returns nothing
call GroupRemoveUnitSimple( udg_TempUnit, udg_TempUnitGroup1 )
if ( Trig_Attack_Animations_Func002C() ) then
if ( Trig_Attack_Animations_Func002Func002C() ) then
call IssuePointOrderLoc( udg_TempUnit, "ward", GetUnitLoc(udg_Ball) )
else
if ( Trig_Attack_Animations_Func002Func002Func002C() ) then
call IssuePointOrderLoc( udg_TempUnit, "move", PolarProjectionBJ(GetUnitLoc(udg_Flag), 90.00, AngleBetweenPoints(GetUnitLoc(udg_Flag), GetUnitLoc(udg_Ball))) )
else
call IssuePointOrderLoc( udg_TempUnit, "move", GetUnitLoc(udg_Ball) )
endif
endif
else
if ( Trig_Attack_Animations_Func002Func001C() ) then
call IssuePointOrderLoc( udg_TempUnit, "move", GetUnitLoc(udg_Ball) )
else
endif
endif
endfunction
//===========================================================================
function InitTrig_Attack_Animations takes nothing returns nothing
set gg_trg_Attack_Animations = CreateTrigger( )
call TriggerAddAction( gg_trg_Attack_Animations, function Trig_Attack_Animations_Actions )
endfunction
function Trig_Set_AttackPoint_Func001C takes nothing returns boolean
if ( not ( udg_BallInAir == true ) ) then
return false
endif
return true
endfunction
function Trig_Set_AttackPoint_Actions takes nothing returns nothing
if ( Trig_Set_AttackPoint_Func001C() ) then
set udg_TempPoint = GetUnitLoc(udg_Flag)
call TriggerExecute( gg_trg_Set_nearest_friendly_unit )
else
set udg_TempPoint = GetUnitLoc(udg_Ball)
call TriggerExecute( gg_trg_Set_nearest_friendly_unit )
endif
endfunction
//===========================================================================
function InitTrig_Set_AttackPoint takes nothing returns nothing
set gg_trg_Set_AttackPoint = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_AttackPoint, function Trig_Set_AttackPoint_Actions )
endfunction
function Trig_Shoot_Func001Func001Func002C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetOwningPlayer(udg_BallOwner)) == AI_DIFFICULTY_NORMAL ) ) then
return false
endif
return true
endfunction
function Trig_Shoot_Func001Func001C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetOwningPlayer(udg_BallOwner)) == AI_DIFFICULTY_NEWBIE ) ) then
return false
endif
return true
endfunction
function Trig_Shoot_Func001Func003C takes nothing returns boolean
if ( ( RAbsBJ(( GetLocationX(GetUnitLoc(udg_Keeper[udg_ThinkingTeamsEnemyNum])) - GetLocationX(GetUnitLoc(udg_Ball)) )) <= GetRandomReal(500.00, ( 800.00 + ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_BallOwner, true)) * 30.00 ) )) ) ) then
return true
endif
if ( ( RectContainsUnit(udg_PenaltyAreas[udg_ThinkingTeamsEnemyNum], udg_BallOwner) == true ) ) then
return true
endif
return false
endfunction
function Trig_Shoot_Func001C takes nothing returns boolean
if ( not Trig_Shoot_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Shoot_Actions takes nothing returns nothing
if ( Trig_Shoot_Func001C() ) then
if ( Trig_Shoot_Func001Func001C() ) then
call TriggerExecute( gg_trg_Shoot_Easy )
else
if ( Trig_Shoot_Func001Func001Func002C() ) then
call TriggerExecute( gg_trg_Shoot_Normal )
else
call TriggerExecute( gg_trg_Shoot_Insane )
endif
endif
call IssuePointOrderLoc( udg_BallOwner, "ward", udg_TempPoint )
else
endif
endfunction
//===========================================================================
function InitTrig_Shoot takes nothing returns nothing
set gg_trg_Shoot = CreateTrigger( )
call TriggerAddAction( gg_trg_Shoot, function Trig_Shoot_Actions )
endfunction
function Trig_Shoot_Easy_Actions takes nothing returns nothing
set udg_TempPoint = Location(GetLocationX(GetRectCenter(udg_GoalArea[udg_ThinkingTeamsEnemyNum])), GetLocationY(GetUnitLoc(udg_Keeper[udg_ThinkingTeamsEnemyNum])))
endfunction
//===========================================================================
function InitTrig_Shoot_Easy takes nothing returns nothing
set gg_trg_Shoot_Easy = CreateTrigger( )
call TriggerAddAction( gg_trg_Shoot_Easy, function Trig_Shoot_Easy_Actions )
endfunction
function Trig_Shoot_Normal_Actions takes nothing returns nothing
set udg_TempPoint = GetRandomLocInRect(udg_GoalArea[udg_ThinkingTeamsEnemyNum])
endfunction
//===========================================================================
function InitTrig_Shoot_Normal takes nothing returns nothing
set gg_trg_Shoot_Normal = CreateTrigger( )
call TriggerAddAction( gg_trg_Shoot_Normal, function Trig_Shoot_Normal_Actions )
endfunction
function Trig_Shoot_Insane_Func001C takes nothing returns boolean
if ( not ( GetLocationY(GetUnitLoc(udg_Keeper[udg_ThinkingTeamsEnemyNum])) >= GetLocationY(GetRectCenter(gg_rct_Center)) ) ) then
return false
endif
return true
endfunction
function Trig_Shoot_Insane_Actions takes nothing returns nothing
if ( Trig_Shoot_Insane_Func001C() ) then
set udg_TempPoint = Location(GetLocationX(GetRectCenter(udg_GoalArea[udg_ThinkingTeamsEnemyNum])), GetRectMinY(udg_GoalArea[udg_ThinkingTeamsEnemyNum]))
else
set udg_TempPoint = Location(GetLocationX(GetRectCenter(udg_GoalArea[udg_ThinkingTeamsEnemyNum])), GetRectMaxY(udg_GoalArea[udg_ThinkingTeamsEnemyNum]))
endif
endfunction
//===========================================================================
function InitTrig_Shoot_Insane takes nothing returns nothing
set gg_trg_Shoot_Insane = CreateTrigger( )
call TriggerAddAction( gg_trg_Shoot_Insane, function Trig_Shoot_Insane_Actions )
endfunction
function Trig_Pick_a_friend_for_Defence_Func003Func002C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_TempUnitGroup1) == false ) ) then
return false
endif
return true
endfunction
function Trig_Pick_a_friend_for_Defence_Func003C takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(udg_TempUnit)) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Trig_Pick_a_friend_for_Defence_Actions takes nothing returns nothing
set udg_TempPoint = GetRectCenter(udg_PlayArea[udg_ThinkingTeamsNum])
call TriggerExecute( gg_trg_Set_nearest_friendly_unit )
if ( Trig_Pick_a_friend_for_Defence_Func003C() ) then
call GroupRemoveUnitSimple( udg_TempUnit, udg_TempUnitGroup1 )
call IssuePointOrderLoc( udg_TempUnit, "move", udg_TempPoint )
else
call GroupRemoveUnitSimple( udg_TempUnit, udg_TempUnitGroup1 )
if ( Trig_Pick_a_friend_for_Defence_Func003Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Pick_a_friend_for_Defence )
else
endif
endif
endfunction
//===========================================================================
function InitTrig_Pick_a_friend_for_Defence takes nothing returns nothing
set gg_trg_Pick_a_friend_for_Defence = CreateTrigger( )
call TriggerAddAction( gg_trg_Pick_a_friend_for_Defence, function Trig_Pick_a_friend_for_Defence_Actions )
endfunction
function Trig_Pick_a_friend_for_headding_Func003Func002C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_TempUnitGroup1) == false ) ) then
return false
endif
return true
endfunction
function Trig_Pick_a_friend_for_headding_Func003C takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(udg_TempUnit)) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Trig_Pick_a_friend_for_headding_Actions takes nothing returns nothing
set udg_TempPoint = GetRandomLocInRect(udg_PenaltyAreas[udg_ThinkingTeamsEnemyNum])
call TriggerExecute( gg_trg_Set_nearest_friendly_unit )
if ( Trig_Pick_a_friend_for_headding_Func003C() ) then
call GroupRemoveUnitSimple( udg_TempUnit, udg_TempUnitGroup1 )
call IssuePointOrderLoc( udg_TempUnit, "move", udg_TempPoint )
else
call GroupRemoveUnitSimple( udg_TempUnit, udg_TempUnitGroup1 )
if ( Trig_Pick_a_friend_for_headding_Func003Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Pick_a_friend_for_headding )
else
endif
endif
endfunction
//===========================================================================
function InitTrig_Pick_a_friend_for_headding takes nothing returns nothing
set gg_trg_Pick_a_friend_for_headding = CreateTrigger( )
call TriggerAddAction( gg_trg_Pick_a_friend_for_headding, function Trig_Pick_a_friend_for_headding_Actions )
endfunction
function Trig_Mark_Enemies_Func001Func003C takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(udg_TempUnit)) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Trig_Mark_Enemies_Func001A takes nothing returns nothing
set udg_TempPoint = GetUnitLoc(GetEnumUnit())
call TriggerExecute( gg_trg_Set_nearest_friendly_unit )
if ( Trig_Mark_Enemies_Func001Func003C() ) then
call IssuePointOrderLoc( udg_TempUnit, "move", PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), RMinBJ(100.00, DistanceBetweenPoints(GetUnitLoc(GetEnumUnit()), GetUnitLoc(udg_Ball))), AngleBetweenPoints(GetUnitLoc(GetEnumUnit()), GetUnitLoc(udg_Ball))) )
call GroupRemoveUnitSimple( udg_TempUnit, udg_TempUnitGroup1 )
else
endif
endfunction
function Trig_Mark_Enemies_Actions takes nothing returns nothing
call ForGroupBJ( udg_TempUnitGroup2, function Trig_Mark_Enemies_Func001A )
endfunction
//===========================================================================
function InitTrig_Mark_Enemies takes nothing returns nothing
set gg_trg_Mark_Enemies = CreateTrigger( )
call TriggerAddAction( gg_trg_Mark_Enemies, function Trig_Mark_Enemies_Actions )
endfunction
function Trig_Wander_Around_the_ball_for_Attack_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitCurrentOrder(GetEnumUnit()) != String2OrderIdBJ("move") ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetEnumUnit())) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Trig_Wander_Around_the_ball_for_Attack_Func001A takes nothing returns nothing
if ( Trig_Wander_Around_the_ball_for_Attack_Func001Func001C() ) then
call IssuePointOrderLoc( GetEnumUnit(), "move", GetRandomLocInRect(udg_PlayArea[udg_ThinkingTeamsEnemyNum]) )
else
endif
endfunction
function Trig_Wander_Around_the_ball_for_Attack_Actions takes nothing returns nothing
call ForGroupBJ( udg_TempUnitGroup1, function Trig_Wander_Around_the_ball_for_Attack_Func001A )
endfunction
//===========================================================================
function InitTrig_Wander_Around_the_ball_for_Attack takes nothing returns nothing
set gg_trg_Wander_Around_the_ball_for_Attack = CreateTrigger( )
call TriggerAddAction( gg_trg_Wander_Around_the_ball_for_Attack, function Trig_Wander_Around_the_ball_for_Attack_Actions )
endfunction
function Trig_Wander_Around_the_ball_for_Defend_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitCurrentOrder(GetEnumUnit()) != String2OrderIdBJ("move") ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetEnumUnit())) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Trig_Wander_Around_the_ball_for_Defend_Func001A takes nothing returns nothing
if ( Trig_Wander_Around_the_ball_for_Defend_Func001Func001C() ) then
call IssuePointOrderLoc( GetEnumUnit(), "move", GetRandomLocInRect(udg_PlayArea[udg_ThinkingTeamsNum]) )
else
endif
endfunction
function Trig_Wander_Around_the_ball_for_Defend_Actions takes nothing returns nothing
call ForGroupBJ( udg_TempUnitGroup1, function Trig_Wander_Around_the_ball_for_Defend_Func001A )
endfunction
//===========================================================================
function InitTrig_Wander_Around_the_ball_for_Defend takes nothing returns nothing
set gg_trg_Wander_Around_the_ball_for_Defend = CreateTrigger( )
call TriggerAddAction( gg_trg_Wander_Around_the_ball_for_Defend, function Trig_Wander_Around_the_ball_for_Defend_Actions )
endfunction
function Trig_Keeper_Actions_Conditions takes nothing returns boolean
if ( not ( udg_Throwing == false ) ) then
return false
endif
return true
endfunction
function Trig_Keeper_Actions_Func002C takes nothing returns boolean
if ( not ( udg_CantHoldBall[13] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Keeper_Actions_Func003C takes nothing returns boolean
if ( not ( udg_WhichKeeperHasBall != 0 ) ) then
return false
endif
if ( not ( udg_KeeperBallHoldTimer <= 6 ) ) then
return false
endif
return true
endfunction
function Trig_Keeper_Actions_Func004C takes nothing returns boolean
if ( not ( udg_KeeperBallHoldTimer >= 0 ) ) then
return false
endif
return true
endfunction
function Trig_Keeper_Actions_Actions takes nothing returns nothing
if ( Trig_Keeper_Actions_Func002C() ) then
set udg_CantHoldBall[13] = ( udg_CantHoldBall[13] - 1 )
else
call ConditionalTriggerExecute( gg_trg_Peasant_Keeper_Actions )
call ConditionalTriggerExecute( gg_trg_Peon_Keeper_Actions )
endif
if ( Trig_Keeper_Actions_Func003C() ) then
call TriggerExecute( gg_trg_Keeper_Has_a_ball )
else
endif
if ( Trig_Keeper_Actions_Func004C() ) then
set udg_KeeperBallHoldTimer = ( udg_KeeperBallHoldTimer - 1 )
else
endif
endfunction
//===========================================================================
function InitTrig_Keeper_Actions takes nothing returns nothing
set gg_trg_Keeper_Actions = CreateTrigger( )
call TriggerAddCondition( gg_trg_Keeper_Actions, Condition( function Trig_Keeper_Actions_Conditions ) )
call TriggerAddAction( gg_trg_Keeper_Actions, function Trig_Keeper_Actions_Actions )
endfunction
function Trig_Peasant_Keeper_Actions_Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_BallOwner == null ) ) then
return false
endif
return true
endfunction
function Trig_Peasant_Keeper_Actions_Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( udg_KeeperBallHoldTimer > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Peasant_Keeper_Actions_Func002Func002Func002C takes nothing returns boolean
if ( not ( RAbsBJ(( GetLocationX(GetUnitLoc(udg_Keeper[1])) - GetLocationX(GetUnitLoc(udg_Ball)) )) <= 50.00 ) ) then
return false
endif
if ( not ( RAbsBJ(( GetLocationY(GetUnitLoc(udg_Keeper[1])) - GetLocationY(GetUnitLoc(udg_Ball)) )) <= 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_Peasant_Keeper_Actions_Func002Func002Func003C takes nothing returns boolean
if ( not ( RAbsBJ(( GetLocationX(GetUnitLoc(udg_Keeper[1])) - GetLocationX(GetRectCenter(udg_KeeperArea[1])) )) <= 50.00 ) ) then
return false
endif
if ( not ( RAbsBJ(( GetLocationY(GetUnitLoc(udg_Keeper[1])) - udg_KeeperDefPosY )) <= 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_Peasant_Keeper_Actions_Func002Func002C takes nothing returns boolean
if ( not ( RectContainsUnit(udg_KeeperMoveableArea[1], udg_Ball) == true ) ) then
return false
endif
if ( not ( IsUnitAlly(udg_BallOwner, Player(0)) == false ) ) then
return false
endif
return true
endfunction
function Trig_Peasant_Keeper_Actions_Func002Func004001 takes nothing returns boolean
return ( IsUnitAlly(udg_BallOwner, Player(11)) == true )
endfunction
function Trig_Peasant_Keeper_Actions_Func002Func004002 takes nothing returns boolean
return ( udg_BallOwner == null )
endfunction
function Trig_Peasant_Keeper_Actions_Func002Func005001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(0)) == true )
endfunction
function Trig_Peasant_Keeper_Actions_Func002C takes nothing returns boolean
if ( not ( RectContainsUnit(udg_PenaltyAreas[1], udg_Ball) == true ) ) then
return false
endif
if ( not GetBooleanOr( Trig_Peasant_Keeper_Actions_Func002Func004001(), Trig_Peasant_Keeper_Actions_Func002Func004002() ) ) then
return false
endif
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(udg_PenaltyAreas[1], Condition(function Trig_Peasant_Keeper_Actions_Func002Func005001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Peasant_Keeper_Actions_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Peasant_Keeper_Get_Ball )
if ( Trig_Peasant_Keeper_Actions_Func002C() ) then
call IssuePointOrderLoc( udg_Keeper[1], "move", PolarProjectionBJ(GetUnitLoc(udg_Ball), ( GetUnitMoveSpeed(udg_Ball) / 2.00 ), udg_BallDirection) )
else
if ( Trig_Peasant_Keeper_Actions_Func002Func002C() ) then
if ( Trig_Peasant_Keeper_Actions_Func002Func002Func002C() ) then
if ( Trig_Peasant_Keeper_Actions_Func002Func002Func002Func002C() ) then
call SetUnitFacingTimed( udg_Keeper[1], AngleBetweenPoints(GetUnitLoc(udg_Keeper[1]), GetUnitLoc(udg_Ball)), 0 )
else
endif
else
call IssuePointOrderLoc( udg_Keeper[1], "move", PolarProjectionBJ(GetUnitLoc(udg_Ball), ( GetUnitMoveSpeed(udg_Ball) / 2.00 ), udg_BallDirection) )
endif
else
if ( Trig_Peasant_Keeper_Actions_Func002Func002Func001C() ) then
set udg_KeeperDefPosY = ( GetLocationY(GetUnitLoc(udg_Ball)) + ( RAbsBJ(( GetLocationX(GetUnitLoc(udg_Ball)) - GetLocationX(GetUnitLoc(udg_Keeper[1])) )) * SinBJ(GetUnitFacing(udg_Ball)) ) )
else
set udg_KeeperDefPosY = GetLocationY(GetUnitLoc(udg_Ball))
endif
if ( Trig_Peasant_Keeper_Actions_Func002Func002Func003C() ) then
call SetUnitFacingTimed( udg_Keeper[1], AngleBetweenPoints(GetUnitLoc(udg_Keeper[1]), GetUnitLoc(udg_Ball)), 0 )
else
set udg_KeeperMoveY = RMinBJ(1280.00, udg_KeeperDefPosY)
set udg_KeeperMoveY = RMaxBJ(384.00, udg_KeeperMoveY)
call IssuePointOrderLoc( udg_Keeper[1], "move", Location(GetLocationX(GetRectCenter(udg_KeeperArea[1])), udg_KeeperMoveY) )
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Peasant_Keeper_Actions takes nothing returns nothing
set gg_trg_Peasant_Keeper_Actions = CreateTrigger( )
call TriggerAddAction( gg_trg_Peasant_Keeper_Actions, function Trig_Peasant_Keeper_Actions_Actions )
endfunction
function Trig_Peon_Keeper_Actions_Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_BallOwner == null ) ) then
return false
endif
return true
endfunction
function Trig_Peon_Keeper_Actions_Func002Func002Func002C takes nothing returns boolean
if ( not ( RAbsBJ(( GetLocationX(GetUnitLoc(udg_Keeper[2])) - GetLocationX(GetRectCenter(udg_KeeperArea[2])) )) <= 50.00 ) ) then
return false
endif
if ( not ( RAbsBJ(( GetLocationY(GetUnitLoc(udg_Keeper[2])) - udg_KeeperDefPosY )) <= 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_Peon_Keeper_Actions_Func002Func002Func003Func002C takes nothing returns boolean
if ( not ( udg_KeeperBallHoldTimer > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Peon_Keeper_Actions_Func002Func002Func003C takes nothing returns boolean
if ( not ( RAbsBJ(( GetLocationX(GetUnitLoc(udg_Keeper[2])) - GetLocationX(GetUnitLoc(udg_Ball)) )) <= 50.00 ) ) then
return false
endif
if ( not ( RAbsBJ(( GetLocationY(GetUnitLoc(udg_Keeper[2])) - GetLocationY(GetUnitLoc(udg_Ball)) )) <= 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_Peon_Keeper_Actions_Func002Func002C takes nothing returns boolean
if ( not ( RectContainsUnit(udg_KeeperMoveableArea[2], udg_Ball) == true ) ) then
return false
endif
if ( not ( IsUnitAlly(udg_BallOwner, Player(11)) == false ) ) then
return false
endif
return true
endfunction
function Trig_Peon_Keeper_Actions_Func002Func004001 takes nothing returns boolean
return ( IsUnitAlly(udg_BallOwner, Player(0)) == true )
endfunction
function Trig_Peon_Keeper_Actions_Func002Func004002 takes nothing returns boolean
return ( udg_BallOwner == null )
endfunction
function Trig_Peon_Keeper_Actions_Func002Func005001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(11)) == true )
endfunction
function Trig_Peon_Keeper_Actions_Func002C takes nothing returns boolean
if ( not ( RectContainsUnit(udg_PenaltyAreas[2], udg_Ball) == true ) ) then
return false
endif
if ( not GetBooleanOr( Trig_Peon_Keeper_Actions_Func002Func004001(), Trig_Peon_Keeper_Actions_Func002Func004002() ) ) then
return false
endif
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(udg_PenaltyAreas[2], Condition(function Trig_Peon_Keeper_Actions_Func002Func005001001002))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Peon_Keeper_Actions_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Peon_Keeper_Get_Ball )
if ( Trig_Peon_Keeper_Actions_Func002C() ) then
call IssuePointOrderLoc( udg_Keeper[2], "move", PolarProjectionBJ(GetUnitLoc(udg_Ball), ( GetUnitMoveSpeed(udg_Ball) / 2.00 ), udg_BallDirection) )
else
if ( Trig_Peon_Keeper_Actions_Func002Func002C() ) then
if ( Trig_Peon_Keeper_Actions_Func002Func002Func003C() ) then
if ( Trig_Peon_Keeper_Actions_Func002Func002Func003Func002C() ) then
call SetUnitFacingTimed( udg_Keeper[2], AngleBetweenPoints(GetUnitLoc(udg_Keeper[2]), GetUnitLoc(udg_Ball)), 0 )
else
endif
else
call IssuePointOrderLoc( udg_Keeper[2], "move", PolarProjectionBJ(GetUnitLoc(udg_Ball), ( GetUnitMoveSpeed(udg_Ball) / 2.00 ), udg_BallDirection) )
endif
else
if ( Trig_Peon_Keeper_Actions_Func002Func002Func001C() ) then
set udg_KeeperDefPosY = ( GetLocationY(GetUnitLoc(udg_Ball)) + ( RAbsBJ(( GetLocationX(GetUnitLoc(udg_Ball)) - GetLocationX(GetUnitLoc(udg_Keeper[2])) )) * SinBJ(GetUnitFacing(udg_Ball)) ) )
else
set udg_KeeperDefPosY = GetLocationY(GetUnitLoc(udg_Ball))
endif
if ( Trig_Peon_Keeper_Actions_Func002Func002Func002C() ) then
call SetUnitFacingTimed( udg_Keeper[2], AngleBetweenPoints(GetUnitLoc(udg_Keeper[2]), GetUnitLoc(udg_Ball)), 0 )
else
set udg_KeeperMoveY = RMinBJ(1280.00, udg_KeeperDefPosY)
set udg_KeeperMoveY = RMaxBJ(384.00, udg_KeeperMoveY)
call IssuePointOrderLoc( udg_Keeper[2], "move", Location(GetLocationX(GetRectCenter(udg_KeeperArea[2])), udg_KeeperMoveY) )
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Peon_Keeper_Actions takes nothing returns nothing
set gg_trg_Peon_Keeper_Actions = CreateTrigger( )
call TriggerAddAction( gg_trg_Peon_Keeper_Actions, function Trig_Peon_Keeper_Actions_Actions )
endfunction
function Trig_Peasant_Keeper_Get_Ball_Conditions takes nothing returns boolean
if ( not ( IsUnitType(udg_Keeper[1], UNIT_TYPE_STUNNED) == false ) ) then
return false
endif
return true
endfunction
function Trig_Peasant_Keeper_Get_Ball_Func002Func001Func002C takes nothing returns boolean
if ( not ( udg_BallBound == false ) ) then
return false
endif
if ( not ( GetUnitMoveSpeed(udg_Ball) > ( 450.00 + GetRandomReal(0, 100.00) ) ) ) then
return false
endif
return true
endfunction
function Trig_Peasant_Keeper_Get_Ball_Func002Func001C takes nothing returns boolean
if ( not ( udg_BallBound == false ) ) then
return false
endif
if ( not ( GetRandomReal(0, 1) > 0.90 ) ) then
return false
endif
return true
endfunction
function Trig_Peasant_Keeper_Get_Ball_Func002C takes nothing returns boolean
if ( not ( IsUnitType(udg_Keeper[1], UNIT_TYPE_STUNNED) == false ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_Keeper[1])) <= 150.00 ) ) then
return false
endif
if ( not ( IsUnitAlly(udg_BallOwner, Player(0)) == false ) ) then
return false
endif
if ( not ( GetUnitFlyHeight(udg_Ball) <= 120.00 ) ) then
return false
endif
if ( not ( udg_CantHoldBall[13] <= 0 ) ) then
return false
endif
if ( not ( udg_BallImmuneTimer <= 0 ) ) then
return false
endif
return true
endfunction
function Trig_Peasant_Keeper_Get_Ball_Actions takes nothing returns nothing
if ( Trig_Peasant_Keeper_Get_Ball_Func002C() ) then
if ( Trig_Peasant_Keeper_Get_Ball_Func002Func001C() ) then
else
if ( Trig_Peasant_Keeper_Get_Ball_Func002Func001Func002C() ) then
set udg_LastOwner = udg_Hero[GetConvertedPlayerId(Player(0))]
call SetUnitPositionLoc( udg_Keeper[1], PolarProjectionBJ(GetUnitLoc(udg_Keeper[1]), 50.00, udg_BallDirection) )
set udg_UnitBeStunned = udg_Keeper[1]
call TriggerExecute( gg_trg_Unit_cant_catch_the_ball )
else
call ShowUnitHide( udg_Flag )
set udg_BallVY = 0.00
set udg_BallInAir = false
call SetUnitFlyHeightBJ( udg_Ball, udg_BallDefaultHeight, 0.00 )
set udg_SpeedDownFactor = 1000000000.00
call TriggerExecute( gg_trg_SpeedDown )
set udg_BallOwner = null
set udg_LastOwner = null
call ShowUnitHide( udg_Ball )
call DestroyEffectBJ( udg_BallInHandEffect )
call AddSpecialEffectTargetUnitBJ( "hand,right", udg_Keeper[1], "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl" )
set udg_BallInHandEffect = GetLastCreatedEffectBJ()
set udg_KeeperBallHoldTimer = 8
set udg_WhichKeeperHasBall = 1
set udg_BallImmuneTimer = 60
endif
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Peasant_Keeper_Get_Ball takes nothing returns nothing
set gg_trg_Peasant_Keeper_Get_Ball = CreateTrigger( )
call TriggerAddCondition( gg_trg_Peasant_Keeper_Get_Ball, Condition( function Trig_Peasant_Keeper_Get_Ball_Conditions ) )
call TriggerAddAction( gg_trg_Peasant_Keeper_Get_Ball, function Trig_Peasant_Keeper_Get_Ball_Actions )
endfunction
function Trig_Peon_Keeper_Get_Ball_Conditions takes nothing returns boolean
if ( not ( IsUnitType(udg_Keeper[2], UNIT_TYPE_STUNNED) == false ) ) then
return false
endif
return true
endfunction
function Trig_Peon_Keeper_Get_Ball_Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_BallBound == false ) ) then
return false
endif
if ( not ( GetUnitMoveSpeed(udg_Ball) > ( 500.00 + GetRandomReal(0, 100.00) ) ) ) then
return false
endif
return true
endfunction
function Trig_Peon_Keeper_Get_Ball_Func002Func001C takes nothing returns boolean
if ( not ( udg_BallInAir == true ) ) then
return false
endif
if ( not ( GetRandomReal(0, 1) > 0.90 ) ) then
return false
endif
return true
endfunction
function Trig_Peon_Keeper_Get_Ball_Func002C takes nothing returns boolean
if ( not ( IsUnitType(udg_Keeper[2], UNIT_TYPE_STUNNED) == false ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_Keeper[2])) <= 150.00 ) ) then
return false
endif
if ( not ( IsUnitAlly(udg_BallOwner, Player(11)) == false ) ) then
return false
endif
if ( not ( GetUnitFlyHeight(udg_Ball) <= 120.00 ) ) then
return false
endif
if ( not ( udg_CantHoldBall[13] <= 0 ) ) then
return false
endif
if ( not ( udg_BallImmuneTimer <= 0 ) ) then
return false
endif
return true
endfunction
function Trig_Peon_Keeper_Get_Ball_Actions takes nothing returns nothing
if ( Trig_Peon_Keeper_Get_Ball_Func002C() ) then
if ( Trig_Peon_Keeper_Get_Ball_Func002Func001C() ) then
else
if ( Trig_Peon_Keeper_Get_Ball_Func002Func001Func001C() ) then
set udg_LastOwner = udg_Hero[GetConvertedPlayerId(Player(11))]
call SetUnitPositionLoc( udg_Keeper[2], PolarProjectionBJ(GetUnitLoc(udg_Keeper[2]), 50.00, udg_BallDirection) )
set udg_UnitBeStunned = udg_Keeper[2]
call TriggerExecute( gg_trg_Unit_cant_catch_the_ball )
else
call ShowUnitHide( udg_Flag )
set udg_BallVY = 0.00
set udg_BallInAir = false
call SetUnitFlyHeightBJ( udg_Ball, udg_BallDefaultHeight, 0.00 )
set udg_SpeedDownFactor = 1000000000.00
call TriggerExecute( gg_trg_SpeedDown )
set udg_BallOwner = null
set udg_LastOwner = null
call ShowUnitHide( udg_Ball )
call DestroyEffectBJ( udg_BallInHandEffect )
call AddSpecialEffectTargetUnitBJ( "hand,right", udg_Keeper[2], "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl" )
set udg_BallInHandEffect = GetLastCreatedEffectBJ()
set udg_KeeperBallHoldTimer = 8
set udg_WhichKeeperHasBall = 2
set udg_BallImmuneTimer = 60
endif
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Peon_Keeper_Get_Ball takes nothing returns nothing
set gg_trg_Peon_Keeper_Get_Ball = CreateTrigger( )
call TriggerAddCondition( gg_trg_Peon_Keeper_Get_Ball, Condition( function Trig_Peon_Keeper_Get_Ball_Conditions ) )
call TriggerAddAction( gg_trg_Peon_Keeper_Get_Ball, function Trig_Peon_Keeper_Get_Ball_Actions )
endfunction
function Trig_Unit_cant_catch_the_ball_Actions takes nothing returns nothing
set udg_BallImmuneTimer = 7
set udg_BallDirection = ( udg_BallDirection + GetRandomReal(90.00, 270.00) )
set udg_SpeedDownFactor = ( GetUnitMoveSpeed(udg_Ball) * 0.50 )
call TriggerExecute( gg_trg_SpeedDown )
call TriggerExecute( gg_trg_Stun_Target )
endfunction
//===========================================================================
function InitTrig_Unit_cant_catch_the_ball takes nothing returns nothing
set gg_trg_Unit_cant_catch_the_ball = CreateTrigger( )
call TriggerAddAction( gg_trg_Unit_cant_catch_the_ball, function Trig_Unit_cant_catch_the_ball_Actions )
endfunction
function Trig_Keeper_Has_a_ball_Func003Func001001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Keeper_Has_a_ball_Func003Func001001001002 takes nothing returns boolean
return ( IsPlayerEnemy(GetFilterPlayer(), Player(11)) == true )
endfunction
function Trig_Keeper_Has_a_ball_Func003Func001001001 takes nothing returns boolean
return GetBooleanAnd( Trig_Keeper_Has_a_ball_Func003Func001001001001(), Trig_Keeper_Has_a_ball_Func003Func001001001002() )
endfunction
function Trig_Keeper_Has_a_ball_Func003Func001Func001C takes nothing returns boolean
if ( not ( GetEnumPlayer() != Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Keeper_Has_a_ball_Func003Func001A takes nothing returns nothing
if ( Trig_Keeper_Has_a_ball_Func003Func001Func001C() ) then
call TriggerExecute( gg_trg_Get_best_target_for_pass )
else
endif
endfunction
function Trig_Keeper_Has_a_ball_Func003C takes nothing returns boolean
if ( not ( udg_WhichKeeperHasBall == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Keeper_Has_a_ball_Func004Func001001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Keeper_Has_a_ball_Func004Func001001001002 takes nothing returns boolean
return ( IsPlayerEnemy(GetFilterPlayer(), Player(0)) == true )
endfunction
function Trig_Keeper_Has_a_ball_Func004Func001001001 takes nothing returns boolean
return GetBooleanAnd( Trig_Keeper_Has_a_ball_Func004Func001001001001(), Trig_Keeper_Has_a_ball_Func004Func001001001002() )
endfunction
function Trig_Keeper_Has_a_ball_Func004Func001Func001C takes nothing returns boolean
if ( not ( GetEnumPlayer() != Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Keeper_Has_a_ball_Func004Func001A takes nothing returns nothing
if ( Trig_Keeper_Has_a_ball_Func004Func001Func001C() ) then
call TriggerExecute( gg_trg_Get_best_target_for_pass )
else
endif
endfunction
function Trig_Keeper_Has_a_ball_Func004C takes nothing returns boolean
if ( not ( udg_WhichKeeperHasBall == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Keeper_Has_a_ball_Func005Func001001 takes nothing returns boolean
return ( udg_KeeperBallHoldTimer <= 0 )
endfunction
function Trig_Keeper_Has_a_ball_Func005Func001002 takes nothing returns boolean
return ( udg_NeaestEnemyDistFromPassTarget >= 640.00 )
endfunction
function Trig_Keeper_Has_a_ball_Func005C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Keeper_Has_a_ball_Func005Func001001(), Trig_Keeper_Has_a_ball_Func005Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Keeper_Has_a_ball_Actions takes nothing returns nothing
set udg_NeaestEnemyDistFromPassTarget = 0.00
set udg_KeeperPassTarget = null
if ( Trig_Keeper_Has_a_ball_Func003C() ) then
call ForForce( GetPlayersMatching(Condition(function Trig_Keeper_Has_a_ball_Func003Func001001001)), function Trig_Keeper_Has_a_ball_Func003Func001A )
else
endif
if ( Trig_Keeper_Has_a_ball_Func004C() ) then
call ForForce( GetPlayersMatching(Condition(function Trig_Keeper_Has_a_ball_Func004Func001001001)), function Trig_Keeper_Has_a_ball_Func004Func001A )
else
endif
if ( Trig_Keeper_Has_a_ball_Func005C() ) then
call TriggerExecute( gg_trg_Throw_Ball_to_Target )
else
endif
endfunction
//===========================================================================
function InitTrig_Keeper_Has_a_ball takes nothing returns nothing
set gg_trg_Keeper_Has_a_ball = CreateTrigger( )
call TriggerAddAction( gg_trg_Keeper_Has_a_ball, function Trig_Keeper_Has_a_ball_Actions )
endfunction
function Trig_Get_best_target_for_pass_Func002001002001 takes nothing returns boolean
return ( GetFilterUnit() == udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetFilterUnit()))] )
endfunction
function Trig_Get_best_target_for_pass_Func002001002002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetEnumPlayer()) == true )
endfunction
function Trig_Get_best_target_for_pass_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Get_best_target_for_pass_Func002001002001(), Trig_Get_best_target_for_pass_Func002001002002() )
endfunction
function Trig_Get_best_target_for_pass_Func002Func001C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_PlayArea, udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]) == true ) ) then
return false
endif
if ( not ( udg_NearestEnemyDist[GetConvertedPlayerId(GetEnumPlayer())] > DistanceBetweenPoints(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]), GetUnitLoc(GetEnumUnit())) ) ) then
return false
endif
return true
endfunction
function Trig_Get_best_target_for_pass_Func002A takes nothing returns nothing
if ( Trig_Get_best_target_for_pass_Func002Func001C() ) then
set udg_NearestEnemyDist[GetConvertedPlayerId(GetEnumPlayer())] = DistanceBetweenPoints(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]), GetUnitLoc(GetEnumUnit()))
else
endif
endfunction
function Trig_Get_best_target_for_pass_Func003C takes nothing returns boolean
if ( not ( ( RAbsBJ(GetLocationX(GetUnitLoc(udg_Keeper[udg_WhichKeeperHasBall]))) - RAbsBJ(GetLocationX(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]))) ) >= 0.00 ) ) then
return false
endif
if ( not ( udg_NeaestEnemyDistFromPassTarget < udg_NearestEnemyDist[GetConvertedPlayerId(GetEnumPlayer())] ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_Keeper[udg_WhichKeeperHasBall]), GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())])) <= 1664.00 ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_Keeper[udg_WhichKeeperHasBall]), GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())])) >= 640.00 ) ) then
return false
endif
if ( not ( ( RAbsBJ(GetLocationX(GetUnitLoc(udg_Keeper[udg_WhichKeeperHasBall]))) - RAbsBJ(GetLocationX(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]))) ) >= 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Get_best_target_for_pass_Actions takes nothing returns nothing
set udg_NearestEnemyDist[GetConvertedPlayerId(GetEnumPlayer())] = 99999.00
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Get_best_target_for_pass_Func002001002)), function Trig_Get_best_target_for_pass_Func002A )
if ( Trig_Get_best_target_for_pass_Func003C() ) then
set udg_NeaestEnemyDistFromPassTarget = udg_NearestEnemyDist[GetConvertedPlayerId(GetEnumPlayer())]
set udg_KeeperPassTarget = udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]
else
endif
endfunction
//===========================================================================
function InitTrig_Get_best_target_for_pass takes nothing returns nothing
set gg_trg_Get_best_target_for_pass = CreateTrigger( )
call TriggerAddAction( gg_trg_Get_best_target_for_pass, function Trig_Get_best_target_for_pass_Actions )
endfunction
function Trig_Throw_Ball_to_Target_Func002C takes nothing returns boolean
if ( not ( udg_WhichKeeperHasBall == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Throw_Ball_to_Target_Func013C takes nothing returns boolean
if ( not ( udg_KeeperPassTarget == null ) ) then
return false
endif
return true
endfunction
function Trig_Throw_Ball_to_Target_Actions takes nothing returns nothing
set udg_BallBound = true
if ( Trig_Throw_Ball_to_Target_Func002C() ) then
set udg_LastOwner = udg_Hero[GetConvertedPlayerId(Player(0))]
else
set udg_LastOwner = udg_Hero[GetConvertedPlayerId(Player(11))]
endif
call DestroyEffectBJ( udg_BallInHandEffect )
call ShowUnitShow( udg_Ball )
call SetUnitPositionLoc( udg_Ball, GetUnitLoc(udg_Keeper[udg_WhichKeeperHasBall]) )
call PauseTimerBJ( false, udg_RoundTimer )
call PauseTimerBJ( false, udg_RealTimer )
set udg_CantEnterOtherSide = false
set udg_ThrowinMode = 0
set udg_CantHoldBall[13] = 2
call PlaySoundOnUnitBJ( udg_Throw, 100, udg_BallOwner )
set udg_BallOwner = null
if ( Trig_Throw_Ball_to_Target_Func013C() ) then
set udg_KeeperThrowPos = GetRectCenter(gg_rct_Center)
call TriggerExecute( gg_trg_Throw_Ball )
else
set udg_KeeperThrowPos = GetUnitLoc(udg_KeeperPassTarget)
call TriggerExecute( gg_trg_Throw_Ball )
endif
endfunction
//===========================================================================
function InitTrig_Throw_Ball_to_Target takes nothing returns nothing
set gg_trg_Throw_Ball_to_Target = CreateTrigger( )
call TriggerAddAction( gg_trg_Throw_Ball_to_Target, function Trig_Throw_Ball_to_Target_Actions )
endfunction
function Trig_Throw_Ball_Func001C takes nothing returns boolean
if ( not ( ( RAbsBJ(GetLocationX(GetUnitLoc(udg_Keeper[udg_WhichKeeperHasBall]))) - RAbsBJ(GetLocationX(udg_KeeperThrowPos)) ) >= 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Throw_Ball_Actions takes nothing returns nothing
if ( Trig_Throw_Ball_Func001C() ) then
else
return
endif
set udg_Throwing = true
set udg_BallBound = true
call SetUnitFacingToFaceLocTimed( udg_Keeper[udg_WhichKeeperHasBall], GetRectCenter(gg_rct_Center), 0 )
call SetUnitAnimation( udg_Keeper[udg_WhichKeeperHasBall], "attack" )
call ShowUnitShow( udg_Flag )
set udg_BallImmuneTimer = 7
set udg_BallInAir = true
set udg_BallDirection = AngleBetweenPoints(GetUnitLoc(udg_Ball), udg_KeeperThrowPos)
call SetUnitFacingTimed( udg_Keeper[udg_WhichKeeperHasBall], udg_BallDirection, 0 )
set udg_TempReal = 40.00
set udg_BallVY = ( ( udg_G * DistanceBetweenPoints(GetUnitLoc(udg_Ball), udg_KeeperThrowPos) ) / ( 2.00 * udg_TempReal ) )
call TriggerExecute( gg_trg_Set_Ball_VX )
set udg_WhichKeeperHasBall = 0
call PolledWait( 1.00 )
set udg_Throwing = false
endfunction
//===========================================================================
function InitTrig_Throw_Ball takes nothing returns nothing
set gg_trg_Throw_Ball = CreateTrigger( )
call TriggerAddAction( gg_trg_Throw_Ball, function Trig_Throw_Ball_Actions )
endfunction
function Trig_Player_Leave_Func016001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Player_Leave_Func016A takes nothing returns nothing
call LeaderboardRemovePlayerItemBJ( GetTriggerPlayer(), udg_Leaderboard[GetConvertedPlayerId(GetEnumPlayer())] )
endfunction
function Trig_Player_Leave_Actions takes nothing returns nothing
call RemoveUnit( udg_Hero[GetConvertedPlayerId(GetTriggerPlayer())] )
call DisplayTextToForce( GetPlayersAll(), ( udg_PlayerNames[GetConvertedPlayerId(GetTriggerPlayer())] + " has left the game." ) )
set udg_PlayersCanVote = ( udg_PlayersCanVote - 1 )
call ForForce( GetPlayersMatching(Condition(function Trig_Player_Leave_Func016001001)), function Trig_Player_Leave_Func016A )
endfunction
//===========================================================================
function InitTrig_Player_Leave takes nothing returns nothing
set gg_trg_Player_Leave = CreateTrigger( )
call TriggerRegisterPlayerEvent( gg_trg_Player_Leave, Player(0), EVENT_PLAYER_LEAVE )
call TriggerRegisterPlayerEvent( gg_trg_Player_Leave, Player(1), EVENT_PLAYER_LEAVE )
call TriggerRegisterPlayerEvent( gg_trg_Player_Leave, Player(2), EVENT_PLAYER_LEAVE )
call TriggerRegisterPlayerEvent( gg_trg_Player_Leave, Player(3), EVENT_PLAYER_LEAVE )
call TriggerRegisterPlayerEvent( gg_trg_Player_Leave, Player(4), EVENT_PLAYER_LEAVE )
call TriggerRegisterPlayerEvent( gg_trg_Player_Leave, Player(5), EVENT_PLAYER_LEAVE )
call TriggerRegisterPlayerEvent( gg_trg_Player_Leave, Player(6), EVENT_PLAYER_LEAVE )
call TriggerRegisterPlayerEvent( gg_trg_Player_Leave, Player(7), EVENT_PLAYER_LEAVE )
call TriggerRegisterPlayerEvent( gg_trg_Player_Leave, Player(8), EVENT_PLAYER_LEAVE )
call TriggerRegisterPlayerEvent( gg_trg_Player_Leave, Player(9), EVENT_PLAYER_LEAVE )
call TriggerRegisterPlayerEvent( gg_trg_Player_Leave, Player(10), EVENT_PLAYER_LEAVE )
call TriggerRegisterPlayerEvent( gg_trg_Player_Leave, Player(11), EVENT_PLAYER_LEAVE )
call TriggerAddAction( gg_trg_Player_Leave, function Trig_Player_Leave_Actions )
endfunction
function Trig_Vote_Finished_Func004001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Vote_Finished_Func004A takes nothing returns nothing
call DialogDisplayBJ( false, udg_VoteDLG, GetEnumPlayer() )
endfunction
function Trig_Vote_Finished_Func007C takes nothing returns boolean
if ( not ( udg_VoteResult[3] <= udg_VoteResult[2] ) ) then
return false
endif
return true
endfunction
function Trig_Vote_Finished_Func008C takes nothing returns boolean
if ( not ( udg_CurrentVoteObtained <= udg_VoteResult[1] ) ) then
return false
endif
return true
endfunction
function Trig_Vote_Finished_Func009C takes nothing returns boolean
if ( not ( udg_CurrentVoteObtained <= udg_VoteResult[0] ) ) then
return false
endif
return true
endfunction
function Trig_Vote_Finished_Func020001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Vote_Finished_Func020A takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(udg_Ball), 0 )
endfunction
function Trig_Vote_Finished_Func021001002 takes nothing returns boolean
return ( udg_Ball != GetFilterUnit() )
endfunction
function Trig_Vote_Finished_Func021A takes nothing returns nothing
call SetUnitAnimation( GetEnumUnit(), "Stand Victory" )
endfunction
function Trig_Vote_Finished_Actions takes nothing returns nothing
call DestroyTimerDialogBJ( udg_Twindow_VOTE )
call DestroyTrigger( GetTriggeringTrigger() )
call ForForce( GetPlayersMatching(Condition(function Trig_Vote_Finished_Func004001001)), function Trig_Vote_Finished_Func004A )
set udg_RoundTime = 10.00
set udg_CurrentVoteObtained = 0
if ( Trig_Vote_Finished_Func007C() ) then
set udg_RoundTime = 8.00
set udg_CurrentVoteObtained = udg_VoteResult[2]
else
set udg_CurrentVoteObtained = udg_VoteResult[3]
endif
if ( Trig_Vote_Finished_Func008C() ) then
set udg_RoundTime = 6.00
set udg_CurrentVoteObtained = udg_VoteResult[1]
else
endif
if ( Trig_Vote_Finished_Func009C() ) then
set udg_RoundTime = 5.00
else
endif
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_226" )
call FogEnableOff( )
call FogMaskEnableOff( )
call TriggerExecute( gg_trg_Create_Units )
call TriggerExecute( gg_trg_Messages )
call TriggerExecute( gg_trg_Round_Initialization )
call TriggerExecute( gg_trg_Start_Music )
call TriggerExecute( gg_trg_Create_a_board )
call TriggerExecute( gg_trg_Camera_Initialization )
call EnableTrigger( gg_trg_Timer_Interval_01 )
call ForForce( GetPlayersMatching(Condition(function Trig_Vote_Finished_Func020001001)), function Trig_Vote_Finished_Func020A )
call ForGroupBJ( GetUnitsOfPlayerMatching(Player(PLAYER_NEUTRAL_PASSIVE), Condition(function Trig_Vote_Finished_Func021001002)), function Trig_Vote_Finished_Func021A )
call TriggerSleepAction( 2 )
call TriggerExecute( gg_trg_Quest )
endfunction
//===========================================================================
function InitTrig_Vote_Finished takes nothing returns nothing
set gg_trg_Vote_Finished = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Vote_Finished, udg_VoteTimeleft )
call TriggerAddAction( gg_trg_Vote_Finished, function Trig_Vote_Finished_Actions )
endfunction
function Trig_Press_Button_Func003Func001Func001C takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_BTN_8min ) ) then
return false
endif
return true
endfunction
function Trig_Press_Button_Func003Func001C takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_BTN_6min ) ) then
return false
endif
return true
endfunction
function Trig_Press_Button_Func003C takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_BTN_5min ) ) then
return false
endif
return true
endfunction
function Trig_Press_Button_Func004Func001C takes nothing returns boolean
if ( not ( udg_VoteTimerCreated == true ) ) then
return false
endif
return true
endfunction
function Trig_Press_Button_Func004C takes nothing returns boolean
if ( not ( udg_PlayersCanVote <= 0 ) ) then
return false
endif
return true
endfunction
function Trig_Press_Button_Actions takes nothing returns nothing
call DialogDisplayBJ( false, udg_VoteDLG, GetTriggerPlayer() )
set udg_PlayersCanVote = ( udg_PlayersCanVote - 1 )
if ( Trig_Press_Button_Func003C() ) then
set udg_VoteResult[0] = ( udg_VoteResult[0] + 1 )
else
if ( Trig_Press_Button_Func003Func001C() ) then
set udg_VoteResult[1] = ( udg_VoteResult[1] + 1 )
else
if ( Trig_Press_Button_Func003Func001Func001C() ) then
set udg_VoteResult[2] = ( udg_VoteResult[2] + 1 )
else
set udg_VoteResult[3] = ( udg_VoteResult[3] + 1 )
endif
endif
endif
if ( Trig_Press_Button_Func004C() ) then
call TriggerExecute( gg_trg_Vote_Finished )
else
if ( Trig_Press_Button_Func004Func001C() ) then
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_238" )
set udg_VoteTimerCreated = true
set udg_Twindow_VOTE = GetLastCreatedTimerDialogBJ()
endif
endif
endfunction
//===========================================================================
function InitTrig_Press_Button takes nothing returns nothing
set gg_trg_Press_Button = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Press_Button, udg_VoteDLG )
call TriggerAddAction( gg_trg_Press_Button, function Trig_Press_Button_Actions )
endfunction
function Trig_Vote_times_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Show_DLG_for_Vote )
endfunction
//===========================================================================
function InitTrig_Vote_times takes nothing returns nothing
set gg_trg_Vote_times = CreateTrigger( )
call TriggerAddAction( gg_trg_Vote_times, function Trig_Vote_times_Actions )
endfunction
function Trig_Show_DLG_for_Vote_Func002002001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Show_DLG_for_Vote_Func002002001001002 takes nothing returns boolean
return ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_USER )
endfunction
function Trig_Show_DLG_for_Vote_Func002002001001 takes nothing returns boolean
return GetBooleanAnd( Trig_Show_DLG_for_Vote_Func002002001001001(), Trig_Show_DLG_for_Vote_Func002002001001002() )
endfunction
function Trig_Show_DLG_for_Vote_Func012001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Show_DLG_for_Vote_Func012A takes nothing returns nothing
call DialogDisplayBJ( true, udg_VoteDLG, GetEnumPlayer() )
endfunction
function Trig_Show_DLG_for_Vote_Actions takes nothing returns nothing
call TriggerSleepAction( 0.10 )
set udg_PlayersCanVote = CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Show_DLG_for_Vote_Func002002001001)))
call DialogSetMessageBJ( udg_VoteDLG, "TRIGSTR_227" )
call DialogAddButtonBJ( udg_VoteDLG, "TRIGSTR_228" )
set udg_BTN_5min = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_VoteDLG, "TRIGSTR_229" )
set udg_BTN_6min = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_VoteDLG, "TRIGSTR_230" )
set udg_BTN_8min = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_VoteDLG, "TRIGSTR_231" )
set udg_BTN_10min = GetLastCreatedButtonBJ()
call ForForce( GetPlayersMatching(Condition(function Trig_Show_DLG_for_Vote_Func012001001)), function Trig_Show_DLG_for_Vote_Func012A )
endfunction
//===========================================================================
function InitTrig_Show_DLG_for_Vote takes nothing returns nothing
set gg_trg_Show_DLG_for_Vote = CreateTrigger( )
call TriggerAddAction( gg_trg_Show_DLG_for_Vote, function Trig_Show_DLG_for_Vote_Actions )
endfunction
function Trig_Camera_AutoZoom_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I003' ) ) then
return false
endif
return true
endfunction
function Trig_Camera_AutoZoom_Func001C takes nothing returns boolean
if ( not ( udg_CameraAutoZoom[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_Camera_AutoZoom_Actions takes nothing returns nothing
if ( Trig_Camera_AutoZoom_Func001C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), "TRIGSTR_293" )
set udg_CameraAutoZoom[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
set udg_CameraLock[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
call ResetToGameCameraForPlayer( GetOwningPlayer(GetManipulatingUnit()), 9999.00 )
set udg_CameraDistance[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = 1800.00
else
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), "TRIGSTR_294" )
set udg_CameraAutoZoom[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = true
set udg_CameraLock[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = true
call SetCameraTargetControllerNoZForPlayer( GetOwningPlayer(GetManipulatingUnit()), GetManipulatingUnit(), 0, 0, false )
endif
endfunction
//===========================================================================
function InitTrig_Camera_AutoZoom takes nothing returns nothing
set gg_trg_Camera_AutoZoom = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Camera_AutoZoom, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Camera_AutoZoom, Condition( function Trig_Camera_AutoZoom_Conditions ) )
call TriggerAddAction( gg_trg_Camera_AutoZoom, function Trig_Camera_AutoZoom_Actions )
endfunction
function Trig_Camera_Lock_and_Unlock_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I002' ) ) then
return false
endif
return true
endfunction
function Trig_Camera_Lock_and_Unlock_Func003C takes nothing returns boolean
if ( not ( udg_CameraLock[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Camera_Lock_and_Unlock_Actions takes nothing returns nothing
if ( Trig_Camera_Lock_and_Unlock_Func003C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), "TRIGSTR_291" )
set udg_CameraLock[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = true
call SetCameraTargetControllerNoZForPlayer( GetOwningPlayer(GetManipulatingUnit()), GetManipulatingUnit(), 0, 0, false )
else
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), "TRIGSTR_292" )
set udg_CameraLock[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
set udg_CameraAutoZoom[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
call ResetToGameCameraForPlayer( GetOwningPlayer(GetManipulatingUnit()), 9999.00 )
endif
endfunction
//===========================================================================
function InitTrig_Camera_Lock_and_Unlock takes nothing returns nothing
set gg_trg_Camera_Lock_and_Unlock = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Camera_Lock_and_Unlock, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Camera_Lock_and_Unlock, Condition( function Trig_Camera_Lock_and_Unlock_Conditions ) )
call TriggerAddAction( gg_trg_Camera_Lock_and_Unlock, function Trig_Camera_Lock_and_Unlock_Actions )
endfunction
function Trig_Zoom_in_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I000' ) ) then
return false
endif
return true
endfunction
function Trig_Zoom_in_Func001C takes nothing returns boolean
if ( not ( udg_CameraAutoZoom[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_Zoom_in_Actions takes nothing returns nothing
if ( Trig_Zoom_in_Func001C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), "TRIGSTR_296" )
else
set udg_CameraDistance[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = RMaxBJ(1000.00, ( udg_CameraDistance[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] - 100.00 ))
endif
endfunction
//===========================================================================
function InitTrig_Zoom_in takes nothing returns nothing
set gg_trg_Zoom_in = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Zoom_in, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Zoom_in, Condition( function Trig_Zoom_in_Conditions ) )
call TriggerAddAction( gg_trg_Zoom_in, function Trig_Zoom_in_Actions )
endfunction
function Trig_Zoom_out_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I001' ) ) then
return false
endif
return true
endfunction
function Trig_Zoom_out_Func001C takes nothing returns boolean
if ( not ( udg_CameraAutoZoom[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_Zoom_out_Actions takes nothing returns nothing
if ( Trig_Zoom_out_Func001C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), "TRIGSTR_297" )
else
set udg_CameraDistance[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = RMinBJ(4000.00, ( udg_CameraDistance[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] + 100.00 ))
endif
endfunction
//===========================================================================
function InitTrig_Zoom_out takes nothing returns nothing
set gg_trg_Zoom_out = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Zoom_out, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Zoom_out, Condition( function Trig_Zoom_out_Conditions ) )
call TriggerAddAction( gg_trg_Zoom_out, function Trig_Zoom_out_Actions )
endfunction
function Trig_Move_Linesmen_Func001C takes nothing returns boolean
if ( not ( RAbsBJ(( GetLocationX(GetUnitLoc(udg_Ball)) - GetLocationX(GetUnitLoc(udg_Linesmen[0])) )) <= 50.00 ) ) then
return false
endif
if ( not ( RAbsBJ(( GetLocationY(GetUnitLoc(udg_Linesmen[0])) - GetLocationY(GetRectCenter(gg_rct_TopLinesman)) )) <= 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_Move_Linesmen_Func002C takes nothing returns boolean
if ( not ( RAbsBJ(( GetLocationX(GetUnitLoc(udg_Ball)) - GetLocationX(GetUnitLoc(udg_Linesmen[1])) )) <= 50.00 ) ) then
return false
endif
if ( not ( RAbsBJ(( GetLocationY(GetUnitLoc(udg_Linesmen[1])) - GetLocationY(GetRectCenter(gg_rct_BottomLinesman)) )) <= 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_Move_Linesmen_Actions takes nothing returns nothing
if ( Trig_Move_Linesmen_Func001C() ) then
call SetUnitFacingToFaceUnitTimed( udg_Linesmen[0], udg_Ball, 0.00 )
else
call IssuePointOrderLoc( udg_Linesmen[0], "move", Location(GetLocationX(GetUnitLoc(udg_Ball)), GetLocationY(GetRectCenter(gg_rct_TopLinesman))) )
endif
if ( Trig_Move_Linesmen_Func002C() ) then
call SetUnitFacingToFaceUnitTimed( udg_Linesmen[1], udg_Ball, 0.00 )
else
call IssuePointOrderLoc( udg_Linesmen[1], "move", Location(GetLocationX(GetUnitLoc(udg_Ball)), GetLocationY(GetRectCenter(gg_rct_BottomLinesman))) )
endif
endfunction
//===========================================================================
function InitTrig_Move_Linesmen takes nothing returns nothing
set gg_trg_Move_Linesmen = CreateTrigger( )
call TriggerAddAction( gg_trg_Move_Linesmen, function Trig_Move_Linesmen_Actions )
endfunction
function Trig_Move_Referee_Func001Func001C takes nothing returns boolean
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_Referee)) <= 640.00 ) ) then
return false
endif
return true
endfunction
function Trig_Move_Referee_Func001C takes nothing returns boolean
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_Referee)) >= 1024.00 ) ) then
return false
endif
return true
endfunction
function Trig_Move_Referee_Actions takes nothing returns nothing
if ( Trig_Move_Referee_Func001C() ) then
call IssueTargetOrder( udg_Referee, "move", udg_Ball )
else
if ( Trig_Move_Referee_Func001Func001C() ) then
call IssuePointOrderLoc( udg_Referee, "move", PolarProjectionBJ(GetUnitLoc(udg_Ball), 832.00, AngleBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_Referee))) )
else
call SetUnitFacingToFaceUnitTimed( udg_Referee, udg_Ball, 0.00 )
endif
endif
endfunction
//===========================================================================
function InitTrig_Move_Referee takes nothing returns nothing
set gg_trg_Move_Referee = CreateTrigger( )
call TriggerAddAction( gg_trg_Move_Referee, function Trig_Move_Referee_Actions )
endfunction
function Trig_Create_a_board_Func002Func001Func003001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Create_a_board_Func002Func001Func003A takes nothing returns nothing
call LeaderboardAddItemBJ( GetEnumPlayer(), udg_Leaderboard[GetForLoopIndexA()], udg_PlayerNames[GetConvertedPlayerId(GetEnumPlayer())], 0 )
endfunction
function Trig_Create_a_board_Func002Func001C takes nothing returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Create_a_board_Actions takes nothing returns nothing
call TriggerSleepAction( 0.10 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Create_a_board_Func002Func001C() ) then
call CreateLeaderboardBJ( GetForceOfPlayer(ConvertedPlayer(GetForLoopIndexA())), ( ( "|c00ffff00Peasants " + I2S(udg_Score[1]) ) + ( "|r : |c00ff0000Peons" + ( I2S(udg_Score[2]) + "|r" ) ) ) )
set udg_Leaderboard[GetForLoopIndexA()] = GetLastCreatedLeaderboard()
call ForForce( GetPlayersMatching(Condition(function Trig_Create_a_board_Func002Func001Func003001001)), function Trig_Create_a_board_Func002Func001Func003A )
call LeaderboardSortItemsBJ( udg_Leaderboard[GetForLoopIndexA()], bj_SORTTYPE_SORTBYVALUE, false )
call LeaderboardDisplayBJ( true, udg_Leaderboard[GetForLoopIndexA()] )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Create_a_board takes nothing returns nothing
set gg_trg_Create_a_board = CreateTrigger( )
call TriggerAddAction( gg_trg_Create_a_board, function Trig_Create_a_board_Actions )
endfunction
function Trig_Refresh_Leaderboard_Func001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Refresh_Leaderboard_Func001Func002Func001C takes nothing returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Refresh_Leaderboard_Func001A takes nothing returns nothing
call LeaderboardSetLabelBJ( udg_Leaderboard[GetConvertedPlayerId(GetEnumPlayer())], ( ( "|c00ffff00Peasants " + I2S(udg_Score[1]) ) + ( "|r : |c00ff0000Peons " + ( I2S(udg_Score[2]) + "|r" ) ) ) )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Refresh_Leaderboard_Func001Func002Func001C() ) then
call LeaderboardSetPlayerItemValueBJ( ConvertedPlayer(GetForLoopIndexA()), udg_Leaderboard[GetConvertedPlayerId(GetEnumPlayer())], udg_PlayerScore[GetForLoopIndexA()] )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
function Trig_Refresh_Leaderboard_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_Refresh_Leaderboard_Func001001001)), function Trig_Refresh_Leaderboard_Func001A )
endfunction
//===========================================================================
function InitTrig_Refresh_Leaderboard takes nothing returns nothing
set gg_trg_Refresh_Leaderboard = CreateTrigger( )
call TriggerAddAction( gg_trg_Refresh_Leaderboard, function Trig_Refresh_Leaderboard_Actions )
endfunction
function Trig_ESC_pressed_Func002C takes nothing returns boolean
if ( not ( udg_LeaderboardCycle[GetConvertedPlayerId(GetTriggerPlayer())] >= 3 ) ) then
return false
endif
return true
endfunction
function Trig_ESC_pressed_Actions takes nothing returns nothing
set udg_LeaderboardCycle[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_LeaderboardCycle[GetConvertedPlayerId(GetTriggerPlayer())] + 1 )
if ( Trig_ESC_pressed_Func002C() ) then
set udg_LeaderboardCycle[GetConvertedPlayerId(GetTriggerPlayer())] = 0
else
endif
call TriggerExecute( gg_trg_Leaderboard_Cycle_System )
endfunction
//===========================================================================
function InitTrig_ESC_pressed takes nothing returns nothing
set gg_trg_ESC_pressed = CreateTrigger( )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_ESC_pressed, Player(0) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_ESC_pressed, Player(1) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_ESC_pressed, Player(2) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_ESC_pressed, Player(3) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_ESC_pressed, Player(4) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_ESC_pressed, Player(5) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_ESC_pressed, Player(6) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_ESC_pressed, Player(7) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_ESC_pressed, Player(8) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_ESC_pressed, Player(9) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_ESC_pressed, Player(10) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_ESC_pressed, Player(11) )
call TriggerAddAction( gg_trg_ESC_pressed, function Trig_ESC_pressed_Actions )
endfunction
function Trig_Leaderboard_Cycle_System_Func001C takes nothing returns boolean
if ( not ( udg_LeaderboardCycle[GetConvertedPlayerId(GetTriggerPlayer())] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Leaderboard_Cycle_System_Func002C takes nothing returns boolean
if ( not ( udg_LeaderboardCycle[GetConvertedPlayerId(GetTriggerPlayer())] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Leaderboard_Cycle_System_Func003C takes nothing returns boolean
if ( not ( udg_LeaderboardCycle[GetConvertedPlayerId(GetTriggerPlayer())] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Leaderboard_Cycle_System_Actions takes nothing returns nothing
if ( Trig_Leaderboard_Cycle_System_Func001C() ) then
call TriggerExecute( gg_trg_Leaderboard_show_all )
else
endif
if ( Trig_Leaderboard_Cycle_System_Func002C() ) then
call TriggerExecute( gg_trg_Leaderboard_hide_playerscore )
else
endif
if ( Trig_Leaderboard_Cycle_System_Func003C() ) then
call TriggerExecute( gg_trg_Leaderboard_hide_all )
else
endif
endfunction
//===========================================================================
function InitTrig_Leaderboard_Cycle_System takes nothing returns nothing
set gg_trg_Leaderboard_Cycle_System = CreateTrigger( )
call TriggerAddAction( gg_trg_Leaderboard_Cycle_System, function Trig_Leaderboard_Cycle_System_Actions )
endfunction
function Trig_Leaderboard_hide_all_Actions takes nothing returns nothing
call LeaderboardDisplayBJ( false, udg_Leaderboard[GetConvertedPlayerId(GetTriggerPlayer())] )
endfunction
//===========================================================================
function InitTrig_Leaderboard_hide_all takes nothing returns nothing
set gg_trg_Leaderboard_hide_all = CreateTrigger( )
call TriggerAddAction( gg_trg_Leaderboard_hide_all, function Trig_Leaderboard_hide_all_Actions )
endfunction
function Trig_Leaderboard_hide_playerscore_Func001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Leaderboard_hide_playerscore_Func001A takes nothing returns nothing
call LeaderboardRemovePlayerItemBJ( GetEnumPlayer(), udg_Leaderboard[GetConvertedPlayerId(GetTriggerPlayer())] )
endfunction
function Trig_Leaderboard_hide_playerscore_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_Leaderboard_hide_playerscore_Func001001001)), function Trig_Leaderboard_hide_playerscore_Func001A )
endfunction
//===========================================================================
function InitTrig_Leaderboard_hide_playerscore takes nothing returns nothing
set gg_trg_Leaderboard_hide_playerscore = CreateTrigger( )
call TriggerAddAction( gg_trg_Leaderboard_hide_playerscore, function Trig_Leaderboard_hide_playerscore_Actions )
endfunction
function Trig_Leaderboard_show_all_Func002001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Leaderboard_show_all_Func002A takes nothing returns nothing
call LeaderboardAddItemBJ( GetEnumPlayer(), udg_Leaderboard[GetConvertedPlayerId(GetTriggerPlayer())], udg_PlayerNames[GetConvertedPlayerId(GetEnumPlayer())], udg_PlayerScore[GetConvertedPlayerId(GetEnumPlayer())] )
endfunction
function Trig_Leaderboard_show_all_Actions takes nothing returns nothing
call LeaderboardDisplayBJ( true, udg_Leaderboard[GetConvertedPlayerId(GetTriggerPlayer())] )
call ForForce( GetPlayersMatching(Condition(function Trig_Leaderboard_show_all_Func002001001)), function Trig_Leaderboard_show_all_Func002A )
endfunction
//===========================================================================
function InitTrig_Leaderboard_show_all takes nothing returns nothing
set gg_trg_Leaderboard_show_all = CreateTrigger( )
call TriggerAddAction( gg_trg_Leaderboard_show_all, function Trig_Leaderboard_show_all_Actions )
endfunction
function Trig_Timer_Interval_05_Actions takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Move_Referee )
call ConditionalTriggerExecute( gg_trg_Keeper_Actions )
call ConditionalTriggerExecute( gg_trg_Move_Linesmen )
call ConditionalTriggerExecute( gg_trg_Computer_AI )
set udg_IgnoreAItimer = IMaxBJ(0, ( udg_IgnoreAItimer - 1 ))
set udg_ThrowInWaitTimer = IMaxBJ(0, ( udg_ThrowInWaitTimer - 1 ))
endfunction
//===========================================================================
function InitTrig_Timer_Interval_05 takes nothing returns nothing
set gg_trg_Timer_Interval_05 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Timer_Interval_05, 0.50 )
call TriggerAddAction( gg_trg_Timer_Interval_05, function Trig_Timer_Interval_05_Actions )
endfunction
function Trig_Cheer_Func001Func001Func003001001 takes nothing returns boolean
return ( RectContainsUnit(gg_rct_CheerLeft, udg_Ball) == true )
endfunction
function Trig_Cheer_Func001Func001Func003001002 takes nothing returns boolean
return ( IsUnitAlly(udg_LastOwner, Player(0)) == true )
endfunction
function Trig_Cheer_Func001Func001Func003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Cheer_Func001Func001Func003001001(), Trig_Cheer_Func001Func001Func003001002() )
endfunction
function Trig_Cheer_Func001Func001Func003002001 takes nothing returns boolean
return ( RectContainsUnit(gg_rct_CheerRight, udg_Ball) == true )
endfunction
function Trig_Cheer_Func001Func001Func003002002 takes nothing returns boolean
return ( IsUnitAlly(udg_LastOwner, Player(11)) == true )
endfunction
function Trig_Cheer_Func001Func001Func003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Cheer_Func001Func001Func003002001(), Trig_Cheer_Func001Func001Func003002002() )
endfunction
function Trig_Cheer_Func001Func001C takes nothing returns boolean
if ( not ( udg_ThrowinMode == 0 ) ) then
return false
endif
if ( not GetBooleanOr( Trig_Cheer_Func001Func001Func003001(), Trig_Cheer_Func001Func001Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Cheer_Func001Func002Func003001001 takes nothing returns boolean
return ( RectContainsUnit(gg_rct_CheerLeft, udg_Ball) == true )
endfunction
function Trig_Cheer_Func001Func002Func003001002 takes nothing returns boolean
return ( IsUnitAlly(udg_LastOwner, Player(11)) == true )
endfunction
function Trig_Cheer_Func001Func002Func003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Cheer_Func001Func002Func003001001(), Trig_Cheer_Func001Func002Func003001002() )
endfunction
function Trig_Cheer_Func001Func002Func003002001 takes nothing returns boolean
return ( RectContainsUnit(gg_rct_CheerRight, udg_Ball) == true )
endfunction
function Trig_Cheer_Func001Func002Func003002002 takes nothing returns boolean
return ( IsUnitAlly(udg_LastOwner, Player(0)) == true )
endfunction
function Trig_Cheer_Func001Func002Func003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Cheer_Func001Func002Func003002001(), Trig_Cheer_Func001Func002Func003002002() )
endfunction
function Trig_Cheer_Func001Func002C takes nothing returns boolean
if ( not ( udg_ThrowinMode == 0 ) ) then
return false
endif
if ( not GetBooleanOr( Trig_Cheer_Func001Func002Func003001(), Trig_Cheer_Func001Func002Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Cheer_Func001C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Cheer_Actions takes nothing returns nothing
if ( Trig_Cheer_Func001C() ) then
if ( Trig_Cheer_Func001Func002C() ) then
call PlaySoundBJ( gg_snd_Cheer2 )
else
endif
else
if ( Trig_Cheer_Func001Func001C() ) then
call PlaySoundBJ( gg_snd_Cheer2 )
else
endif
endif
endfunction
//===========================================================================
function InitTrig_Cheer takes nothing returns nothing
set gg_trg_Cheer = CreateTrigger( )
call TriggerAddAction( gg_trg_Cheer, function Trig_Cheer_Actions )
endfunction
function Trig_Show_Losstime_Actions takes nothing returns nothing
call PlaySoundBJ( gg_snd_Hint )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_202" )
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
endfunction
//===========================================================================
function InitTrig_Show_Losstime takes nothing returns nothing
set gg_trg_Show_Losstime = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Show_Losstime, udg_RoundTimer )
call TriggerAddAction( gg_trg_Show_Losstime, function Trig_Show_Losstime_Actions )
endfunction
function Trig_RoundTimer_Func004Func001C takes nothing returns boolean
if ( not ( udg_RoundCheck == 1 ) ) then
return false
endif
return true
endfunction
function Trig_RoundTimer_Func004C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_RoundTimer_Actions takes nothing returns nothing
call PlaySoundBJ( gg_snd_whistle )
set udg_WhichKeeperHasBall = 0
if ( Trig_RoundTimer_Func004C() ) then
call TriggerExecute( gg_trg_first_half_was_over )
else
if ( Trig_RoundTimer_Func004Func001C() ) then
call TriggerExecute( gg_trg_second_half_start )
else
call TriggerExecute( gg_trg_Times_UP )
call DestroyTrigger( GetTriggeringTrigger() )
endif
endif
endfunction
//===========================================================================
function InitTrig_RoundTimer takes nothing returns nothing
set gg_trg_RoundTimer = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_RoundTimer, udg_RealTimer )
call TriggerAddAction( gg_trg_RoundTimer, function Trig_RoundTimer_Actions )
endfunction
function Trig_first_half_was_over_Func015001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_first_half_was_over_Func015A takes nothing returns nothing
call UnitAddItemByIdSwapped( 'tret', udg_Hero[GetConvertedPlayerId(GetEnumPlayer())] )
endfunction
function Trig_first_half_was_over_Func017A takes nothing returns nothing
call UnitUseItem( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], GetItemOfTypeFromUnitBJ(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], 'tret') )
endfunction
function Trig_first_half_was_over_Func019A takes nothing returns nothing
call TriggerExecute( gg_trg_Com_Get_Abilities )
endfunction
function Trig_first_half_was_over_Actions takes nothing returns nothing
call TriggerSleepAction( 0.10 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_187" )
call DisableTrigger( gg_trg_Ball_Timer_Action )
call ShowUnitHide( udg_Ball )
set udg_Ball = null
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call StartTimerBJ( udg_RealTimer, false, 30.00 )
call CreateTimerDialogBJ( udg_RealTimer, "TRIGSTR_199" )
set udg_BallOwner = null
set udg_RoundCheck = 1
call DestroyEffectBJ( udg_BallInHandEffect )
set udg_KeeperBallHoldTimer = 0
set udg_WhichKeeperHasBall = 0
set udg_BallImmuneTimer = 0
call ForForce( GetPlayersMatching(Condition(function Trig_first_half_was_over_Func015001001)), function Trig_first_half_was_over_Func015A )
call TriggerSleepAction( 10.00 )
call ForForce( GetPlayersByMapControl(MAP_CONTROL_COMPUTER), function Trig_first_half_was_over_Func017A )
call TriggerSleepAction( 3.00 )
call ForForce( GetPlayersByMapControl(MAP_CONTROL_COMPUTER), function Trig_first_half_was_over_Func019A )
endfunction
//===========================================================================
function InitTrig_first_half_was_over takes nothing returns nothing
set gg_trg_first_half_was_over = CreateTrigger( )
call TriggerAddAction( gg_trg_first_half_was_over, function Trig_first_half_was_over_Actions )
endfunction
function Trig_second_half_start_Func027001002 takes nothing returns boolean
return ( udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetFilterUnit()))] == GetFilterUnit() )
endfunction
function Trig_second_half_start_Func027Func001Func005001001 takes nothing returns boolean
return ( udg_RoundCheck == 0 )
endfunction
function Trig_second_half_start_Func027Func001Func005001002 takes nothing returns boolean
return ( IsUnitAlly(GetEnumUnit(), Player(0)) == true )
endfunction
function Trig_second_half_start_Func027Func001Func005001 takes nothing returns boolean
return GetBooleanAnd( Trig_second_half_start_Func027Func001Func005001001(), Trig_second_half_start_Func027Func001Func005001002() )
endfunction
function Trig_second_half_start_Func027Func001Func005002001 takes nothing returns boolean
return ( udg_RoundCheck != 0 )
endfunction
function Trig_second_half_start_Func027Func001Func005002002 takes nothing returns boolean
return ( IsUnitEnemy(GetEnumUnit(), Player(0)) == true )
endfunction
function Trig_second_half_start_Func027Func001Func005002 takes nothing returns boolean
return GetBooleanAnd( Trig_second_half_start_Func027Func001Func005002001(), Trig_second_half_start_Func027Func001Func005002002() )
endfunction
function Trig_second_half_start_Func027Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_second_half_start_Func027Func001Func005001(), Trig_second_half_start_Func027Func001Func005002() ) ) then
return false
endif
return true
endfunction
function Trig_second_half_start_Func027Func002C takes nothing returns boolean
if ( not ( udg_CameraLock[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_second_half_start_Func027A takes nothing returns nothing
if ( Trig_second_half_start_Func027Func001C() ) then
call SetUnitPositionLoc( GetEnumUnit(), GetRandomLocInRect(gg_rct_LeftTeam_Stay) )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
else
call SetUnitPositionLoc( GetEnumUnit(), GetRandomLocInRect(gg_rct_RightTeam_Stay) )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endif
if ( Trig_second_half_start_Func027Func002C() ) then
call SetCameraTargetControllerNoZForPlayer( GetOwningPlayer(GetEnumUnit()), udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))], 0, 0, false )
else
endif
endfunction
function Trig_second_half_start_Actions takes nothing returns nothing
set udg_AI_AttackPoint_U[1] = gg_rct_AItargetLEFTU
set udg_AI_AttackPoint_M[1] = gg_rct_AItargetLEFTM
set udg_AI_AttackPoint_D[1] = gg_rct_AItargetLEFTTD
set udg_AI_AttackPoint_U[2] = gg_rct_AItargetRIGHTU
set udg_AI_AttackPoint_M[2] = gg_rct_AItargetRIGHTM
set udg_AI_AttackPoint_D[2] = gg_rct_AItargetRIGHTD
set udg_KeeperMoveableArea[2] = gg_rct_KeeperMoveAreaLeft
set udg_KeeperMoveableArea[1] = gg_rct_KeeperMoveAreaRight
set udg_KeeperArea[2] = gg_rct_LeftKeeperArea
set udg_KeeperArea[1] = gg_rct_RightKeeperArea
set udg_PlayArea[2] = gg_rct_LeftArea
set udg_PlayArea[1] = gg_rct_RightArea
set udg_PenaltyAreas[1] = gg_rct_PenaltyAreaRight
set udg_PenaltyAreas[2] = gg_rct_PenaltyAreaLeft
set udg_GoalArea[2] = gg_rct_HeaddingShootAreaLeft
set udg_GoalArea[1] = gg_rct_HeaddingShootAreaRight
call SetUnitPositionLocFacingBJ( udg_Keeper[1], GetRectCenter(udg_KeeperArea[1]), 180.00 )
call SetUnitPositionLocFacingBJ( udg_Keeper[2], GetRectCenter(udg_KeeperArea[2]), 0.00 )
set udg_CantEnterOtherSide = true
call EnableTrigger( gg_trg_Ball_Timer_Action )
set udg_LeftTeamName = "|c00ff0000Team Peons|r"
set udg_RightTeamName = "|c00ffff00Team Peasants|r"
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_189" )
set udg_Ball = gg_unit_h000_0001
set udg_ThrowinMode = 2
set udg_BallOwner = null
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_second_half_start_Func027001002)), function Trig_second_half_start_Func027A )
call ShowUnitShow( udg_Ball )
call TriggerExecute( gg_trg_Linecross_common_events )
call SetUnitPositionLoc( udg_Ball, GetRectCenter(gg_rct_Center) )
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call StartTimerBJ( udg_RoundTimer, false, ( udg_RoundTime * 60.00 ) )
call CreateTimerDialogBJ( GetLastCreatedTimerBJ(), "TRIGSTR_201" )
call PauseTimerBJ( true, udg_RoundTimer )
call StartTimerBJ( udg_RealTimer, false, ( udg_RoundTime * 60.00 ) )
call PauseTimerBJ( true, udg_RealTimer )
set udg_RoundCheck = 2
set udg_ThrowinPos = GetUnitLoc(udg_Ball)
set udg_IgnoreAItimer = 10
endfunction
//===========================================================================
function InitTrig_second_half_start takes nothing returns nothing
set gg_trg_second_half_start = CreateTrigger( )
call TriggerAddAction( gg_trg_second_half_start, function Trig_second_half_start_Actions )
endfunction
function Trig_Times_UP_Func003Func011C takes nothing returns boolean
if ( not ( udg_Score[1] > udg_Score[2] ) ) then
return false
endif
return true
endfunction
function Trig_Times_UP_Func003C takes nothing returns boolean
if ( not ( udg_Score[1] != udg_Score[2] ) ) then
return false
endif
return true
endfunction
function Trig_Times_UP_Actions takes nothing returns nothing
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_193" )
if ( Trig_Times_UP_Func003C() ) then
call DestroyTrigger( gg_trg_Timer_Interval_01 )
call PlaySoundFromOffsetBJ( gg_snd_whistle, 100, 0.85 )
call WaitForSoundBJ( gg_snd_whistle, 0.00 )
call PolledWait( 0.20 )
call PlaySoundFromOffsetBJ( gg_snd_whistle, 100, 0.85 )
call WaitForSoundBJ( gg_snd_whistle, 0.00 )
call PolledWait( 0.20 )
call PlaySoundBJ( gg_snd_whistle )
call WaitForSoundBJ( gg_snd_whistle, 0.00 )
if ( Trig_Times_UP_Func003Func011C() ) then
call TriggerExecute( gg_trg_Humans_Win )
else
call TriggerExecute( gg_trg_Orcs_Win )
endif
else
call TriggerExecute( gg_trg_Sudden_death )
endif
endfunction
//===========================================================================
function InitTrig_Times_UP takes nothing returns nothing
set gg_trg_Times_UP = CreateTrigger( )
call TriggerAddAction( gg_trg_Times_UP, function Trig_Times_UP_Actions )
endfunction
function Trig_Sudden_death_Func024001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Sudden_death_Func024A takes nothing returns nothing
call DestroyEffectBJ( udg_SlidingEffect[GetConvertedPlayerId(GetEnumPlayer())] )
call SetUnitFlyHeightBJ( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], 0.00, 0.00 )
set udg_HeroVX[GetConvertedPlayerId(GetEnumPlayer())] = 0.00
set udg_HeroVY[GetConvertedPlayerId(GetEnumPlayer())] = 0.00
set udg_HeroInAir[GetConvertedPlayerId(GetEnumPlayer())] = false
set udg_HeroSlidingWait[GetConvertedPlayerId(GetEnumPlayer())] = 0
endfunction
function Trig_Sudden_death_Func028001002 takes nothing returns boolean
return ( udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetFilterUnit()))] == GetFilterUnit() )
endfunction
function Trig_Sudden_death_Func028Func001Func005001001 takes nothing returns boolean
return ( udg_RoundCheck == 0 )
endfunction
function Trig_Sudden_death_Func028Func001Func005001002 takes nothing returns boolean
return ( IsUnitAlly(GetEnumUnit(), Player(0)) == true )
endfunction
function Trig_Sudden_death_Func028Func001Func005001 takes nothing returns boolean
return GetBooleanAnd( Trig_Sudden_death_Func028Func001Func005001001(), Trig_Sudden_death_Func028Func001Func005001002() )
endfunction
function Trig_Sudden_death_Func028Func001Func005002001 takes nothing returns boolean
return ( udg_RoundCheck != 0 )
endfunction
function Trig_Sudden_death_Func028Func001Func005002002 takes nothing returns boolean
return ( IsUnitEnemy(GetEnumUnit(), Player(0)) == true )
endfunction
function Trig_Sudden_death_Func028Func001Func005002 takes nothing returns boolean
return GetBooleanAnd( Trig_Sudden_death_Func028Func001Func005002001(), Trig_Sudden_death_Func028Func001Func005002002() )
endfunction
function Trig_Sudden_death_Func028Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Sudden_death_Func028Func001Func005001(), Trig_Sudden_death_Func028Func001Func005002() ) ) then
return false
endif
return true
endfunction
function Trig_Sudden_death_Func028A takes nothing returns nothing
if ( Trig_Sudden_death_Func028Func001C() ) then
call SetUnitPositionLoc( GetEnumUnit(), GetRandomLocInRect(gg_rct_LeftTeam_Stay) )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
else
call SetUnitPositionLoc( GetEnumUnit(), GetRandomLocInRect(gg_rct_RightTeam_Stay) )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endif
endfunction
function Trig_Sudden_death_Actions takes nothing returns nothing
call StopMusicBJ( false )
call PlayMusicBJ( gg_snd_SuddenDeathBGM )
call DisableTrigger( gg_trg_Show_Losstime )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_211" )
set udg_SuddenDeath = true
set udg_CantMakeDirectShoot = true
set udg_MapReset = true
call DestroyEffectBJ( udg_BallInHandEffect )
set udg_KeeperBallHoldTimer = 0
set udg_WhichKeeperHasBall = 0
set udg_BallImmuneTimer = 0
call DisableTrigger( gg_trg_Timer_Interval_01 )
call ShowUnitHide( udg_Flag )
call PlaySoundBJ( gg_snd_whistle )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 1.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 100.00, 100.00, 100.00, 0.00 )
set udg_BallInAir = false
call SetUnitTimeScalePercent( udg_Ball, 0.00 )
call SetUnitFlyHeightBJ( udg_Ball, udg_BallDefaultHeight, 0.00 )
set udg_SpeedDownFactor = 1000000000.00
call TriggerExecute( gg_trg_SpeedDown )
set udg_BallBound = true
call PolledWait( 1.00 )
call GroupClear( udg_SlidingUnits )
call ForForce( GetPlayersMatching(Condition(function Trig_Sudden_death_Func024001001)), function Trig_Sudden_death_Func024A )
set udg_BallOwner = null
call TriggerExecute( gg_trg_Refresh_Leaderboard )
call SetUnitPositionLoc( udg_Ball, GetRectCenter(gg_rct_Center) )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Sudden_death_Func028001002)), function Trig_Sudden_death_Func028A )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 1.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 100.00, 100.00, 100.00, 0.00 )
call PolledWait( 1.00 )
set udg_BallOwner = null
set udg_MapReset = false
call SetUnitPositionLocFacingLocBJ( udg_Referee, OffsetLocation(GetUnitLoc(udg_Ball), 0.00, 150.00), GetUnitLoc(udg_Ball) )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_212" )
call ORIG_CreateTimerBJ( udg_JumpBall, "TRIGSTR_240", 10.00, false )
call ShowUnitShow( udg_Ball )
set udg_ThrowinMode = 0
endfunction
//===========================================================================
function InitTrig_Sudden_death takes nothing returns nothing
set gg_trg_Sudden_death = CreateTrigger( )
call TriggerAddAction( gg_trg_Sudden_death, function Trig_Sudden_death_Actions )
endfunction
function Trig_Jump_Ball_Func001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Jump_Ball_Func001A takes nothing returns nothing
set udg_HeroVX[GetConvertedPlayerId(GetEnumPlayer())] = 0.00
set udg_HeroVY[GetConvertedPlayerId(GetEnumPlayer())] = 0.00
set udg_HeroSlidingWait[GetConvertedPlayerId(GetEnumPlayer())] = 0
set udg_HeroInAir[GetConvertedPlayerId(GetEnumPlayer())] = false
call GroupClear( udg_SlidingUnits )
call DestroyEffectBJ( udg_SlidingEffect[GetConvertedPlayerId(GetEnumPlayer())] )
call SetUnitFlyHeightBJ( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], GetUnitDefaultFlyHeight(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]), 0.00 )
endfunction
function Trig_Jump_Ball_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_Jump_Ball_Func001001001)), function Trig_Jump_Ball_Func001A )
call PlaySoundBJ( gg_snd_whistle )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_241" )
call EnableTrigger( gg_trg_Timer_Interval_01 )
set udg_BallImmuneTimer = 15
call SetUnitFlyHeightBJ( udg_Ball, udg_BallDefaultHeight, 0.00 )
set udg_SpeedDownFactor = 1000000000.00
call TriggerExecute( gg_trg_SpeedDown )
call SetUnitTimeScalePercent( udg_Ball, 100.00 )
set udg_BallVY = ( 20.00 * udg_G )
set udg_BallDirection = 270.00
set udg_BallInAir = true
endfunction
//===========================================================================
function InitTrig_Jump_Ball takes nothing returns nothing
set gg_trg_Jump_Ball = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Jump_Ball, udg_JumpBall )
call TriggerAddAction( gg_trg_Jump_Ball, function Trig_Jump_Ball_Actions )
endfunction
function Trig_Orcs_Win_Func003001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Orcs_Win_Func003Func001C takes nothing returns boolean
if ( not ( IsPlayerAlly(GetEnumPlayer(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Orcs_Win_Func003A takes nothing returns nothing
if ( Trig_Orcs_Win_Func003Func001C() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_117" )
else
call CustomVictoryBJ( GetEnumPlayer(), true, true )
endif
endfunction
function Trig_Orcs_Win_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_183" )
call TriggerSleepAction( 2 )
call ForForce( GetPlayersMatching(Condition(function Trig_Orcs_Win_Func003001001)), function Trig_Orcs_Win_Func003A )
endfunction
//===========================================================================
function InitTrig_Orcs_Win takes nothing returns nothing
set gg_trg_Orcs_Win = CreateTrigger( )
call TriggerAddAction( gg_trg_Orcs_Win, function Trig_Orcs_Win_Actions )
endfunction
function Trig_Humans_Win_Func003001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Humans_Win_Func003Func001C takes nothing returns boolean
if ( not ( IsPlayerAlly(GetEnumPlayer(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Humans_Win_Func003A takes nothing returns nothing
if ( Trig_Humans_Win_Func003Func001C() ) then
call CustomVictoryBJ( GetEnumPlayer(), true, true )
else
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_116" )
endif
endfunction
function Trig_Humans_Win_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_184" )
call TriggerSleepAction( 2 )
call ForForce( GetPlayersMatching(Condition(function Trig_Humans_Win_Func003001001)), function Trig_Humans_Win_Func003A )
endfunction
//===========================================================================
function InitTrig_Humans_Win takes nothing returns nothing
set gg_trg_Humans_Win = CreateTrigger( )
call TriggerAddAction( gg_trg_Humans_Win, function Trig_Humans_Win_Actions )
endfunction
function Trig_Timer_Interval_01_Func007C takes nothing returns boolean
if ( not ( udg_CantEnterOtherSide == true ) ) then
return false
endif
return true
endfunction
function Trig_Timer_Interval_01_Actions takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Ball_Timer_Action )
call TriggerExecute( gg_trg_Reduce_MoveSpeed_of_BallOwner )
call ConditionalTriggerExecute( gg_trg_Sliding_and_jump )
call ConditionalTriggerExecute( gg_trg_Set_Camera_Distance )
call ConditionalTriggerExecute( gg_trg_Cheer )
call TriggerExecute( gg_trg_Headding_Action )
if ( Trig_Timer_Interval_01_Func007C() ) then
call TriggerExecute( gg_trg_Cant_Enter_Leftside )
call TriggerExecute( gg_trg_Cant_Enter_Rightside )
else
endif
endfunction
//===========================================================================
function InitTrig_Timer_Interval_01 takes nothing returns nothing
set gg_trg_Timer_Interval_01 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Timer_Interval_01, 0.10 )
call TriggerAddAction( gg_trg_Timer_Interval_01, function Trig_Timer_Interval_01_Actions )
endfunction
function Trig_Stun_Target_Actions takes nothing returns nothing
call IssueTargetOrder( gg_unit_nshe_0078, "thunderbolt", udg_UnitBeStunned )
endfunction
//===========================================================================
function InitTrig_Stun_Target takes nothing returns nothing
set gg_trg_Stun_Target = CreateTrigger( )
call TriggerAddAction( gg_trg_Stun_Target, function Trig_Stun_Target_Actions )
endfunction
function Trig_Rebound_FastBall_Actions takes nothing returns nothing
set udg_LastOwner = GetEnumUnit()
call SetUnitPositionLoc( GetEnumUnit(), PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), 50.00, udg_BallDirection) )
set udg_BallImmuneTimer = 7
set udg_BallDirection = ( udg_BallDirection + GetRandomReal(90.00, 270.00) )
set udg_SpeedDownFactor = ( GetUnitMoveSpeed(udg_Ball) * 5.00 )
call TriggerExecute( gg_trg_SpeedDown )
set udg_UnitBeStunned = GetEnumUnit()
call TriggerExecute( gg_trg_Stun_Target )
endfunction
//===========================================================================
function InitTrig_Rebound_FastBall takes nothing returns nothing
set gg_trg_Rebound_FastBall = CreateTrigger( )
call TriggerAddAction( gg_trg_Rebound_FastBall, function Trig_Rebound_FastBall_Actions )
endfunction
function Trig_Set_Nearby_Friend_to_Headding_Target_Func001001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Set_Nearby_Friend_to_Headding_Target_Func001001001002 takes nothing returns boolean
return ( IsUnitAlly(GetEnumUnit(), GetFilterPlayer()) == true )
endfunction
function Trig_Set_Nearby_Friend_to_Headding_Target_Func001001001 takes nothing returns boolean
return GetBooleanAnd( Trig_Set_Nearby_Friend_to_Headding_Target_Func001001001001(), Trig_Set_Nearby_Friend_to_Headding_Target_Func001001001002() )
endfunction
function Trig_Set_Nearby_Friend_to_Headding_Target_Func001Func001Func002001 takes nothing returns boolean
return ( udg_UNT_HeaddingTarget == null )
endfunction
function Trig_Set_Nearby_Friend_to_Headding_Target_Func001Func001Func002002 takes nothing returns boolean
return ( DistanceBetweenPoints(GetUnitLoc(GetEnumUnit()), GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())])) < DistanceBetweenPoints(GetUnitLoc(GetEnumUnit()), GetUnitLoc(udg_UNT_HeaddingTarget)) )
endfunction
function Trig_Set_Nearby_Friend_to_Headding_Target_Func001Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Set_Nearby_Friend_to_Headding_Target_Func001Func001Func002001(), Trig_Set_Nearby_Friend_to_Headding_Target_Func001Func001Func002002() ) ) then
return false
endif
if ( not ( GetEnumUnit() != udg_Hero[GetConvertedPlayerId(GetEnumPlayer())] ) ) then
return false
endif
return true
endfunction
function Trig_Set_Nearby_Friend_to_Headding_Target_Func001A takes nothing returns nothing
if ( Trig_Set_Nearby_Friend_to_Headding_Target_Func001Func001C() ) then
set udg_UNT_HeaddingTarget = udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]
else
endif
endfunction
function Trig_Set_Nearby_Friend_to_Headding_Target_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_Set_Nearby_Friend_to_Headding_Target_Func001001001)), function Trig_Set_Nearby_Friend_to_Headding_Target_Func001A )
endfunction
//===========================================================================
function InitTrig_Set_Nearby_Friend_to_Headding_Target takes nothing returns nothing
set gg_trg_Set_Nearby_Friend_to_Headding_Target = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_Nearby_Friend_to_Headding_Target, function Trig_Set_Nearby_Friend_to_Headding_Target_Actions )
endfunction
function Trig_Get_Headding_Target_Func001Func001Func005002001001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(0)) == true )
endfunction
function Trig_Get_Headding_Target_Func001Func001Func005002003001001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(0)) == true )
endfunction
function Trig_Get_Headding_Target_Func001Func001Func005002003003001001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(0)) == true )
endfunction
function Trig_Get_Headding_Target_Func001Func001Func005002003003003001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(0)) == true )
endfunction
function Trig_Get_Headding_Target_Func001Func001C takes nothing returns boolean
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_Keeper[1]), GetUnitLoc(udg_Ball)) <= ( udg_TempReal * ( ( udg_MaxBVYforHeadding + SquareRoot(( Pow(udg_MaxBVYforHeadding, 2.00) + ( 2.00 * ( udg_G * GetUnitFlyHeight(udg_Ball) ) ) )) ) / udg_G ) ) ) ) then
return false
endif
return true
endfunction
function Trig_Get_Headding_Target_Func001Func002Func002002001001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(11)) == true )
endfunction
function Trig_Get_Headding_Target_Func001Func002Func002002003001001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(11)) == true )
endfunction
function Trig_Get_Headding_Target_Func001Func002Func002002003003001001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(11)) == true )
endfunction
function Trig_Get_Headding_Target_Func001Func002Func002002003003003001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(11)) == true )
endfunction
function Trig_Get_Headding_Target_Func001Func002C takes nothing returns boolean
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_Keeper[2]), GetUnitLoc(udg_Ball)) <= ( udg_TempReal * ( ( udg_MaxBVYforHeadding + SquareRoot(( Pow(udg_MaxBVYforHeadding, 2.00) + ( 2.00 * ( udg_G * GetUnitFlyHeight(udg_Ball) ) ) )) ) / udg_G ) ) ) ) then
return false
endif
return true
endfunction
function Trig_Get_Headding_Target_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(GetEnumUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Get_Headding_Target_Func002Func001002001001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), ConvertedPlayer(GetForLoopIndexA())) == true )
endfunction
function Trig_Get_Headding_Target_Func002Func001002003001001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), ConvertedPlayer(GetForLoopIndexA())) == true )
endfunction
function Trig_Get_Headding_Target_Func002Func001002003003001001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), ConvertedPlayer(GetForLoopIndexA())) == true )
endfunction
function Trig_Get_Headding_Target_Func002Func001002003003003001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), ConvertedPlayer(GetForLoopIndexA())) == true )
endfunction
function Trig_Get_Headding_Target_Func002Func002C takes nothing returns boolean
if ( not ( udg_HeaddingTargetFitness > udg_FitnessOfPlayerA ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(GetEnumUnit()), GetUnitLoc(udg_Hero[GetForLoopIndexA()])) <= ( udg_TempReal * ( ( udg_MaxBVYforHeadding + SquareRoot(( Pow(udg_MaxBVYforHeadding, 2.00) + ( 2.00 * ( udg_G * GetUnitFlyHeight(udg_Ball) ) ) )) ) / udg_G ) ) ) ) then
return false
endif
if ( not ( IsUnitAlly(GetEnumUnit(), ConvertedPlayer(GetForLoopIndexA())) == true ) ) then
return false
endif
if ( not ( GetEnumUnit() != udg_Hero[GetForLoopIndexA()] ) ) then
return false
endif
if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Get_Headding_Target_Func003C takes nothing returns boolean
if ( not ( udg_UNT_HeaddingTarget == null ) ) then
return false
endif
return true
endfunction
function Trig_Get_Headding_Target_Actions takes nothing returns nothing
if ( Trig_Get_Headding_Target_Func001C() ) then
if ( Trig_Get_Headding_Target_Func001Func001C() ) then
set udg_UNT_HeaddingTarget = udg_Keeper[1]
set udg_HeaddingTargetFitness = ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(200.00, GetUnitLoc(udg_Keeper[1]), Condition(function Trig_Get_Headding_Target_Func001Func001Func005002001001003))) + ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(udg_Keeper[1]), Condition(function Trig_Get_Headding_Target_Func001Func001Func005002003001001003))) + ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(600.00, GetUnitLoc(udg_Keeper[1]), Condition(function Trig_Get_Headding_Target_Func001Func001Func005002003003001001003))) + CountUnitsInGroup(GetUnitsInRangeOfLocMatching(800.00, GetUnitLoc(udg_Keeper[1]), Condition(function Trig_Get_Headding_Target_Func001Func001Func005002003003003001003))) ) ) )
else
set udg_UNT_HeaddingTarget = null
set udg_HeaddingTargetFitness = 40
endif
else
if ( Trig_Get_Headding_Target_Func001Func002C() ) then
set udg_UNT_HeaddingTarget = udg_Keeper[2]
set udg_HeaddingTargetFitness = ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(200.00, GetUnitLoc(udg_Keeper[2]), Condition(function Trig_Get_Headding_Target_Func001Func002Func002002001001003))) + ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(udg_Keeper[2]), Condition(function Trig_Get_Headding_Target_Func001Func002Func002002003001001003))) + ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(600.00, GetUnitLoc(udg_Keeper[2]), Condition(function Trig_Get_Headding_Target_Func001Func002Func002002003003001001003))) + CountUnitsInGroup(GetUnitsInRangeOfLocMatching(800.00, GetUnitLoc(udg_Keeper[2]), Condition(function Trig_Get_Headding_Target_Func001Func002Func002002003003003001003))) ) ) )
else
set udg_UNT_HeaddingTarget = null
set udg_HeaddingTargetFitness = 40
endif
endif
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_FitnessOfPlayerA = ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(200.00, GetUnitLoc(udg_Hero[GetForLoopIndexA()]), Condition(function Trig_Get_Headding_Target_Func002Func001002001001003))) + ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(udg_Hero[GetForLoopIndexA()]), Condition(function Trig_Get_Headding_Target_Func002Func001002003001001003))) + ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(600.00, GetUnitLoc(udg_Hero[GetForLoopIndexA()]), Condition(function Trig_Get_Headding_Target_Func002Func001002003003001001003))) + CountUnitsInGroup(GetUnitsInRangeOfLocMatching(800.00, GetUnitLoc(udg_Hero[GetForLoopIndexA()]), Condition(function Trig_Get_Headding_Target_Func002Func001002003003003001003))) ) ) )
if ( Trig_Get_Headding_Target_Func002Func002C() ) then
set udg_UNT_HeaddingTarget = udg_Hero[GetForLoopIndexA()]
set udg_HeaddingTargetFitness = udg_FitnessOfPlayerA
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Get_Headding_Target_Func003C() ) then
call TriggerExecute( gg_trg_Set_Nearby_Friend_to_Headding_Target )
else
endif
endfunction
//===========================================================================
function InitTrig_Get_Headding_Target takes nothing returns nothing
set gg_trg_Get_Headding_Target = CreateTrigger( )
call TriggerAddAction( gg_trg_Get_Headding_Target, function Trig_Get_Headding_Target_Actions )
endfunction
function Trig_Calcurate_Speed_and_vy_for_headding_Func005C takes nothing returns boolean
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_UNT_HeaddingTarget)) <= ( udg_TempReal * SquareRoot(( ( 2.00 * GetUnitFlyHeight(udg_Ball) ) / udg_G )) ) ) ) then
return false
endif
return true
endfunction
function Trig_Calcurate_Speed_and_vy_for_headding_Actions takes nothing returns nothing
set udg_BallInAir = true
set udg_TempReal = ( I2R(( GetHeroStatBJ(bj_HEROSTAT_STR, GetEnumUnit(), true) * 2 )) + 35.00 )
set udg_TempReal = RMaxBJ(( GetUnitMoveSpeed(udg_Ball) * 0.10 ), udg_TempReal)
call TriggerExecute( gg_trg_Get_Headding_Target )
if ( Trig_Calcurate_Speed_and_vy_for_headding_Func005C() ) then
set udg_BallVY = 0.00
set udg_TempReal = ( DistanceBetweenPoints(GetUnitLoc(udg_UNT_HeaddingTarget), GetUnitLoc(udg_Ball)) / SquareRoot(( ( 2.00 * GetUnitFlyHeight(udg_Ball) ) / udg_G )) )
else
set udg_BallVY = RMinBJ(udg_MaxBVYforHeadding, ( ( udg_G * DistanceBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_UNT_HeaddingTarget)) ) / ( 2.00 * udg_TempReal ) ))
endif
set udg_BallDirection = AngleBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_UNT_HeaddingTarget))
endfunction
//===========================================================================
function InitTrig_Calcurate_Speed_and_vy_for_headding takes nothing returns nothing
set gg_trg_Calcurate_Speed_and_vy_for_headding = CreateTrigger( )
call TriggerAddAction( gg_trg_Calcurate_Speed_and_vy_for_headding, function Trig_Calcurate_Speed_and_vy_for_headding_Actions )
endfunction
function Trig_Calcurate_Speed_and_vy_for_headding_shoot_Actions takes nothing returns nothing
set udg_BallVY = 0.00
set udg_BallInAir = true
set udg_BallDirection = AngleBetweenPoints(GetUnitLoc(udg_Ball), udg_HeaddingTarget)
set udg_TempReal = ( I2R(( GetHeroStatBJ(bj_HEROSTAT_STR, GetEnumUnit(), true) * 2 )) + 35.00 )
set udg_TempReal = RMaxBJ(( GetUnitMoveSpeed(udg_Ball) * 0.10 ), udg_TempReal)
set udg_BallVY = ( ( ( udg_TempReal / DistanceBetweenPoints(GetUnitLoc(udg_Ball), udg_HeaddingTarget) ) * ( 120.00 - GetUnitFlyHeight(udg_Ball) ) ) + ( ( udg_G * DistanceBetweenPoints(GetUnitLoc(udg_Ball), udg_HeaddingTarget) ) / ( 2.00 * udg_TempReal ) ) )
endfunction
//===========================================================================
function InitTrig_Calcurate_Speed_and_vy_for_headding_shoot takes nothing returns nothing
set gg_trg_Calcurate_Speed_and_vy_for_headding_shoot = CreateTrigger( )
call TriggerAddAction( gg_trg_Calcurate_Speed_and_vy_for_headding_shoot, function Trig_Calcurate_Speed_and_vy_for_headding_shoot_Actions )
endfunction
function Trig_Headding_Ball_to_left_goal_Actions takes nothing returns nothing
set udg_HeaddingTarget = GetRandomLocInRect(gg_rct_HeaddingShootAreaLeft)
call TriggerExecute( gg_trg_Calcurate_Speed_and_vy_for_headding_shoot )
call TriggerExecute( gg_trg_Set_Ball_VX )
call TriggerExecute( gg_trg_Common_Actions_for_shoot )
endfunction
//===========================================================================
function InitTrig_Headding_Ball_to_left_goal takes nothing returns nothing
set gg_trg_Headding_Ball_to_left_goal = CreateTrigger( )
call TriggerAddAction( gg_trg_Headding_Ball_to_left_goal, function Trig_Headding_Ball_to_left_goal_Actions )
endfunction
function Trig_Headding_Ball_to_right_goal_Actions takes nothing returns nothing
set udg_HeaddingTarget = GetRandomLocInRect(gg_rct_HeaddingShootAreaRight)
call TriggerExecute( gg_trg_Calcurate_Speed_and_vy_for_headding_shoot )
call TriggerExecute( gg_trg_Set_Ball_VX )
call TriggerExecute( gg_trg_Common_Actions_for_shoot )
endfunction
//===========================================================================
function InitTrig_Headding_Ball_to_right_goal takes nothing returns nothing
set gg_trg_Headding_Ball_to_right_goal = CreateTrigger( )
call TriggerAddAction( gg_trg_Headding_Ball_to_right_goal, function Trig_Headding_Ball_to_right_goal_Actions )
endfunction
function Trig_Headding_Ball_to_nearby_friend_Actions takes nothing returns nothing
call ShowUnitShow( udg_Flag )
call TriggerExecute( gg_trg_Calcurate_Speed_and_vy_for_headding )
call TriggerExecute( gg_trg_Set_Ball_VX )
call TriggerExecute( gg_trg_Common_Actions_for_shoot )
endfunction
//===========================================================================
function InitTrig_Headding_Ball_to_nearby_friend takes nothing returns nothing
set gg_trg_Headding_Ball_to_nearby_friend = CreateTrigger( )
call TriggerAddAction( gg_trg_Headding_Ball_to_nearby_friend, function Trig_Headding_Ball_to_nearby_friend_Actions )
endfunction
function Trig_Do_Headding_Action_Func001C takes nothing returns boolean
if ( not ( udg_ThrowinMode == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Do_Headding_Action_Func006Func001Func002Func003001001 takes nothing returns boolean
return ( udg_RoundCheck == 0 )
endfunction
function Trig_Do_Headding_Action_Func006Func001Func002Func003001002 takes nothing returns boolean
return ( IsUnitAlly(GetEnumUnit(), Player(0)) == true )
endfunction
function Trig_Do_Headding_Action_Func006Func001Func002Func003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Do_Headding_Action_Func006Func001Func002Func003001001(), Trig_Do_Headding_Action_Func006Func001Func002Func003001002() )
endfunction
function Trig_Do_Headding_Action_Func006Func001Func002Func003002001 takes nothing returns boolean
return ( udg_RoundCheck != 0 )
endfunction
function Trig_Do_Headding_Action_Func006Func001Func002Func003002002 takes nothing returns boolean
return ( IsUnitAlly(GetEnumUnit(), Player(11)) == true )
endfunction
function Trig_Do_Headding_Action_Func006Func001Func002Func003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Do_Headding_Action_Func006Func001Func002Func003002001(), Trig_Do_Headding_Action_Func006Func001Func002Func003002002() )
endfunction
function Trig_Do_Headding_Action_Func006Func001Func002C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Do_Headding_Action_Func006Func001Func002Func003001(), Trig_Do_Headding_Action_Func006Func001Func002Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Do_Headding_Action_Func006Func001C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_PenaltyAreaRight, GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Do_Headding_Action_Func006Func002Func003001001 takes nothing returns boolean
return ( udg_RoundCheck == 0 )
endfunction
function Trig_Do_Headding_Action_Func006Func002Func003001002 takes nothing returns boolean
return ( IsUnitAlly(GetEnumUnit(), Player(11)) == true )
endfunction
function Trig_Do_Headding_Action_Func006Func002Func003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Do_Headding_Action_Func006Func002Func003001001(), Trig_Do_Headding_Action_Func006Func002Func003001002() )
endfunction
function Trig_Do_Headding_Action_Func006Func002Func003002001 takes nothing returns boolean
return ( udg_RoundCheck != 0 )
endfunction
function Trig_Do_Headding_Action_Func006Func002Func003002002 takes nothing returns boolean
return ( IsUnitAlly(GetEnumUnit(), Player(0)) == true )
endfunction
function Trig_Do_Headding_Action_Func006Func002Func003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Do_Headding_Action_Func006Func002Func003002001(), Trig_Do_Headding_Action_Func006Func002Func003002002() )
endfunction
function Trig_Do_Headding_Action_Func006Func002C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Do_Headding_Action_Func006Func002Func003001(), Trig_Do_Headding_Action_Func006Func002Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Do_Headding_Action_Func006C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_PenaltyAreaLeft, GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Do_Headding_Action_Actions takes nothing returns nothing
if ( Trig_Do_Headding_Action_Func001C() ) then
set udg_CantMakeDirectShoot = false
else
endif
set udg_BallOwner = null
set udg_LastOwner = GetEnumUnit()
set udg_CantHoldBall[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = 10
set udg_BallImmuneTimer = 10
if ( Trig_Do_Headding_Action_Func006C() ) then
if ( Trig_Do_Headding_Action_Func006Func002C() ) then
call TriggerExecute( gg_trg_Headding_Ball_to_left_goal )
else
call TriggerExecute( gg_trg_Headding_Ball_to_nearby_friend )
endif
else
if ( Trig_Do_Headding_Action_Func006Func001C() ) then
if ( Trig_Do_Headding_Action_Func006Func001Func002C() ) then
call TriggerExecute( gg_trg_Headding_Ball_to_right_goal )
else
call TriggerExecute( gg_trg_Headding_Ball_to_nearby_friend )
endif
else
call TriggerExecute( gg_trg_Headding_Ball_to_nearby_friend )
endif
endif
endfunction
//===========================================================================
function InitTrig_Do_Headding_Action takes nothing returns nothing
set gg_trg_Do_Headding_Action = CreateTrigger( )
call TriggerAddAction( gg_trg_Do_Headding_Action, function Trig_Do_Headding_Action_Actions )
endfunction
function Trig_Get_Ball_if_it_possible_Func001Func001C takes nothing returns boolean
if ( not ( udg_BallBound == false ) ) then
return false
endif
if ( not ( GetUnitMoveSpeed(udg_Ball) > ( ( ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, GetEnumUnit(), true)) + 35.00 ) * 10.00 ) + GetRandomPercentageBJ() ) ) ) then
return false
endif
return true
endfunction
function Trig_Get_Ball_if_it_possible_Func001Func002C takes nothing returns boolean
if ( not ( GetRandomReal(0, 1.00) < ( 1.00 - ( ( ( 11.00 * I2R(( GetHeroStatBJ(bj_HEROSTAT_AGI, udg_BallOwner, true) - GetHeroStatBJ(bj_HEROSTAT_AGI, GetEnumUnit(), true) )) ) - 37.71 ) / 100.00 ) ) ) ) then
return false
endif
return true
endfunction
function Trig_Get_Ball_if_it_possible_Func001C takes nothing returns boolean
if ( not ( udg_BallOwner == null ) ) then
return false
endif
return true
endfunction
function Trig_Get_Ball_if_it_possible_Actions takes nothing returns nothing
if ( Trig_Get_Ball_if_it_possible_Func001C() ) then
if ( Trig_Get_Ball_if_it_possible_Func001Func001C() ) then
call TriggerExecute( gg_trg_Rebound_FastBall )
else
call TriggerExecute( gg_trg_Get_Ball )
endif
else
if ( Trig_Get_Ball_if_it_possible_Func001Func002C() ) then
call TriggerExecute( gg_trg_Get_Ball )
else
endif
endif
endfunction
//===========================================================================
function InitTrig_Get_Ball_if_it_possible takes nothing returns nothing
set gg_trg_Get_Ball_if_it_possible = CreateTrigger( )
call TriggerAddAction( gg_trg_Get_Ball_if_it_possible, function Trig_Get_Ball_if_it_possible_Actions )
endfunction
function Trig_Get_Ball_Func001Func001C takes nothing returns boolean
if ( not ( udg_BallOwner == null ) ) then
return false
endif
return true
endfunction
function Trig_Get_Ball_Func001C takes nothing returns boolean
if ( not ( udg_ThrowinMode == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Get_Ball_Func002C takes nothing returns boolean
if ( not ( udg_BallOwner != null ) ) then
return false
endif
return true
endfunction
function Trig_Get_Ball_Actions takes nothing returns nothing
if ( Trig_Get_Ball_Func001C() ) then
set udg_CantMakeDirectShoot = false
else
if ( Trig_Get_Ball_Func001Func001C() ) then
set udg_ThrowInWaitTimer = 4
else
endif
call SetUnitPositionLocFacingLocBJ( GetEnumUnit(), udg_ThrowinPos, GetRectCenter(gg_rct_Center) )
endif
if ( Trig_Get_Ball_Func002C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_BallOwner)), "TRIGSTR_298" )
set udg_CantHoldBall[GetConvertedPlayerId(GetOwningPlayer(udg_BallOwner))] = 15
call PlaySoundBJ( gg_snd_Cheer2 )
else
endif
set udg_BallOwner = GetEnumUnit()
set udg_LastOwner = GetEnumUnit()
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_BallOwner)), "TRIGSTR_295" )
set udg_IgnoreAItimer = 0
set udg_PassTarget = null
set udg_SpeedDownFactor = 1000000000.00
call TriggerExecute( gg_trg_SpeedDown )
call SetUnitTimeScalePercent( udg_Ball, 350.00 )
endfunction
//===========================================================================
function InitTrig_Get_Ball takes nothing returns nothing
set gg_trg_Get_Ball = CreateTrigger( )
call TriggerAddAction( gg_trg_Get_Ball, function Trig_Get_Ball_Actions )
endfunction
function Trig_Move_Flag_to_a_certain_point_Func001C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(udg_Ball) > udg_MinimumSpeed ) ) then
return false
endif
return true
endfunction
function Trig_Move_Flag_to_a_certain_point_Actions takes nothing returns nothing
if ( Trig_Move_Flag_to_a_certain_point_Func001C() ) then
call SetUnitPositionLoc( udg_Flag, PolarProjectionBJ(GetUnitLoc(udg_Ball), ( ( GetUnitMoveSpeed(udg_Ball) * ( udg_BallVY + SquareRoot(( Pow(udg_BallVY, 2.00) + ( 2.00 * ( udg_G * GetUnitFlyHeight(udg_Ball) ) ) )) ) ) / ( 10.00 * udg_G ) ), udg_BallDirection) )
else
call SetUnitPositionLoc( udg_Flag, GetUnitLoc(udg_Ball) )
endif
endfunction
//===========================================================================
function InitTrig_Move_Flag_to_a_certain_point takes nothing returns nothing
set gg_trg_Move_Flag_to_a_certain_point = CreateTrigger( )
call TriggerAddAction( gg_trg_Move_Flag_to_a_certain_point, function Trig_Move_Flag_to_a_certain_point_Actions )
endfunction
function Trig_Reduce_MoveSpeed_of_BallOwner_Func001001002 takes nothing returns boolean
return ( GetFilterUnit() == udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetFilterUnit()))] )
endfunction
function Trig_Reduce_MoveSpeed_of_BallOwner_Func001Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() == udg_BallOwner ) ) then
return false
endif
return true
endfunction
function Trig_Reduce_MoveSpeed_of_BallOwner_Func001A takes nothing returns nothing
if ( Trig_Reduce_MoveSpeed_of_BallOwner_Func001Func001C() ) then
set udg_ReduceSpeedTimer[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = IMinBJ(20, ( udg_ReduceSpeedTimer[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] + 1 ))
else
set udg_ReduceSpeedTimer[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = IMaxBJ(0, ( udg_ReduceSpeedTimer[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] - 1 ))
endif
call SetUnitMoveSpeed( GetEnumUnit(), RMaxBJ(200.00, ( GetUnitDefaultMoveSpeed(GetEnumUnit()) - ( 4.50 * I2R(udg_ReduceSpeedTimer[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))]) ) )) )
endfunction
function Trig_Reduce_MoveSpeed_of_BallOwner_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Reduce_MoveSpeed_of_BallOwner_Func001001002)), function Trig_Reduce_MoveSpeed_of_BallOwner_Func001A )
endfunction
//===========================================================================
function InitTrig_Reduce_MoveSpeed_of_BallOwner takes nothing returns nothing
set gg_trg_Reduce_MoveSpeed_of_BallOwner = CreateTrigger( )
call TriggerAddAction( gg_trg_Reduce_MoveSpeed_of_BallOwner, function Trig_Reduce_MoveSpeed_of_BallOwner_Actions )
endfunction
function Trig_SpeedDown_Actions takes nothing returns nothing
set udg_CurrentBallSpeed = RMaxBJ(udg_MinimumSpeed, ( udg_CurrentBallSpeed - udg_SpeedDownFactor ))
call SetUnitMoveSpeed( udg_Ball, udg_CurrentBallSpeed )
endfunction
//===========================================================================
function InitTrig_SpeedDown takes nothing returns nothing
set gg_trg_SpeedDown = CreateTrigger( )
call TriggerAddAction( gg_trg_SpeedDown, function Trig_SpeedDown_Actions )
endfunction
function Trig_Set_Ball_Owner_Func001001003 takes nothing returns boolean
return ( GetFilterUnit() == udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetFilterUnit()))] )
endfunction
function Trig_Set_Ball_Owner_Func001Func003Func002Func001C takes nothing returns boolean
if ( ( GetPlayerController(GetOwningPlayer(GetEnumUnit())) == MAP_CONTROL_COMPUTER ) ) then
return true
endif
if ( ( udg_HeroVY[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] >= 0.00 ) ) then
return true
endif
return false
endfunction
function Trig_Set_Ball_Owner_Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_BallOwner == null ) ) then
return false
endif
return true
endfunction
function Trig_Set_Ball_Owner_Func001Func003Func002Func004Func001C takes nothing returns boolean
if ( not ( udg_HeroSlidingWait[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] <= 0 ) ) then
return false
endif
return true
endfunction
function Trig_Set_Ball_Owner_Func001Func003Func002Func004Func002C takes nothing returns boolean
if ( not ( udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(udg_BallOwner))] == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnumUnit(), udg_SlidingUnits) == true ) ) then
return false
endif
if ( not ( udg_ThrowinMode == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Set_Ball_Owner_Func001Func003Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroVX[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] > 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Set_Ball_Owner_Func001Func003Func002C takes nothing returns boolean
if ( not Trig_Set_Ball_Owner_Func001Func003Func002Func001C() ) then
return false
endif
if ( not ( udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_Set_Ball_Owner_Func001Func003Func009Func002C takes nothing returns boolean
if ( not ( udg_ThrowinMode != 0 ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetEnumUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Set_Ball_Owner_Func001Func003Func009C takes nothing returns boolean
if ( ( IsUnitEnemy(GetEnumUnit(), GetOwningPlayer(udg_BallOwner)) == true ) ) then
return true
endif
if ( Trig_Set_Ball_Owner_Func001Func003Func009Func002C() ) then
return true
endif
return false
endfunction
function Trig_Set_Ball_Owner_Func001Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_STUNNED) == false ) ) then
return false
endif
if ( not ( udg_BallImmuneTimer <= 0 ) ) then
return false
endif
if ( not ( udg_CantHoldBall[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] <= 0 ) ) then
return false
endif
if ( not ( GetEnumUnit() != udg_BallOwner ) ) then
return false
endif
if ( not ( GetUnitFlyHeight(udg_Ball) >= GetUnitFlyHeight(GetEnumUnit()) ) ) then
return false
endif
if ( not ( GetUnitFlyHeight(udg_Ball) <= ( GetUnitFlyHeight(GetEnumUnit()) + udg_HeroHeight ) ) ) then
return false
endif
if ( not Trig_Set_Ball_Owner_Func001Func003Func009C() ) then
return false
endif
return true
endfunction
function Trig_Set_Ball_Owner_Func001A takes nothing returns nothing
set udg_TempDirection = AngleBetweenPoints(GetUnitLoc(GetEnumUnit()), GetUnitLoc(udg_Ball))
call TriggerExecute( gg_trg_Change_Direction )
if ( Trig_Set_Ball_Owner_Func001Func003C() ) then
if ( Trig_Set_Ball_Owner_Func001Func003Func002C() ) then
if ( Trig_Set_Ball_Owner_Func001Func003Func002Func002C() ) then
call TriggerExecute( gg_trg_Do_Headding_Action )
else
endif
else
call ShowUnitHide( udg_Flag )
if ( Trig_Set_Ball_Owner_Func001Func003Func002Func004C() ) then
if ( Trig_Set_Ball_Owner_Func001Func003Func002Func004Func002C() ) then
call TriggerExecute( gg_trg_Sliding )
else
endif
else
if ( Trig_Set_Ball_Owner_Func001Func003Func002Func004Func001C() ) then
call TriggerExecute( gg_trg_Get_Ball_if_it_possible )
else
endif
endif
endif
else
call TriggerExecute( gg_trg_Reduce_MoveSpeed_of_BallOwner )
endif
endfunction
function Trig_Set_Ball_Owner_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(100.00, GetUnitLoc(udg_Ball), Condition(function Trig_Set_Ball_Owner_Func001001003)), function Trig_Set_Ball_Owner_Func001A )
endfunction
//===========================================================================
function InitTrig_Set_Ball_Owner takes nothing returns nothing
set gg_trg_Set_Ball_Owner = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_Ball_Owner, function Trig_Set_Ball_Owner_Actions )
endfunction
function Trig_Sliding_Func001C takes nothing returns boolean
if ( not ( udg_ThrowinMode == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Sliding_Func006C takes nothing returns boolean
if ( not ( GetEnumUnit() != udg_BallOwner ) ) then
return false
endif
if ( not ( udg_BallOwner != null ) ) then
return false
endif
return true
endfunction
function Trig_Sliding_Actions takes nothing returns nothing
if ( Trig_Sliding_Func001C() ) then
set udg_CantMakeDirectShoot = false
else
endif
call GroupRemoveUnitSimple( GetEnumUnit(), udg_SlidingUnits )
set udg_BallImmuneTimer = 5
call StopSoundBJ( udg_Kick, false )
call PlaySoundOnUnitBJ( udg_Kick, 100, udg_Ball )
if ( Trig_Sliding_Func006C() ) then
set udg_HeroSlidingWait[GetConvertedPlayerId(GetOwningPlayer(udg_BallOwner))] = 10
else
endif
set udg_BallOwner = null
set udg_LastOwner = GetEnumUnit()
set udg_PassTarget = null
call SetUnitTimeScalePercent( udg_Ball, 100 )
set udg_BallDirection = udg_SlidingDirection[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))]
set udg_TempReal = 40.00
call TriggerExecute( gg_trg_Set_Ball_VX )
call TriggerExecute( gg_trg_Reduce_MoveSpeed_of_BallOwner )
endfunction
//===========================================================================
function InitTrig_Sliding takes nothing returns nothing
set gg_trg_Sliding = CreateTrigger( )
call TriggerAddAction( gg_trg_Sliding, function Trig_Sliding_Actions )
endfunction
function Trig_Ball_Timer_Action_Func001001003 takes nothing returns boolean
return ( udg_ThrowinMode != 0 )
endfunction
function Trig_Ball_Timer_Action_Func001A takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Cant_Get_Ball )
endfunction
function Trig_Ball_Timer_Action_Func003C takes nothing returns boolean
if ( not ( IsUnitHiddenBJ(udg_Ball) == false ) ) then
return false
endif
return true
endfunction
function Trig_Ball_Timer_Action_Func004001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Ball_Timer_Action_Func004Func001C takes nothing returns boolean
if ( not ( udg_CantHoldBall[GetConvertedPlayerId(GetEnumPlayer())] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Ball_Timer_Action_Func004A takes nothing returns nothing
if ( Trig_Ball_Timer_Action_Func004Func001C() ) then
set udg_CantHoldBall[GetConvertedPlayerId(GetEnumPlayer())] = ( udg_CantHoldBall[GetConvertedPlayerId(GetEnumPlayer())] - 1 )
else
endif
endfunction
function Trig_Ball_Timer_Action_Func005Func005C takes nothing returns boolean
if ( not ( udg_BallInAir == true ) ) then
return false
endif
return true
endfunction
function Trig_Ball_Timer_Action_Func005C takes nothing returns boolean
if ( not ( udg_BallOwner == null ) ) then
return false
endif
return true
endfunction
function Trig_Ball_Timer_Action_Func008C takes nothing returns boolean
if ( not ( udg_BallImmuneTimer > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Ball_Timer_Action_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(320.00, GetUnitLoc(udg_Ball), Condition(function Trig_Ball_Timer_Action_Func001001003)), function Trig_Ball_Timer_Action_Func001A )
call ConditionalTriggerExecute( gg_trg_Cant_Get_Out_While_Throwin )
if ( Trig_Ball_Timer_Action_Func003C() ) then
call PingMinimapLocForForce( GetPlayersAll(), GetUnitLoc(udg_Ball), 0.10 )
else
endif
call ForForce( GetPlayersMatching(Condition(function Trig_Ball_Timer_Action_Func004001001)), function Trig_Ball_Timer_Action_Func004A )
if ( Trig_Ball_Timer_Action_Func005C() ) then
call ConditionalTriggerExecute( gg_trg_General_Animations )
if ( Trig_Ball_Timer_Action_Func005Func005C() ) then
call ConditionalTriggerExecute( gg_trg_Vertical_Animations )
else
call ConditionalTriggerExecute( gg_trg_Horizontal_Animations )
endif
else
call SetUnitPositionLoc( udg_Ball, PolarProjectionBJ(GetUnitLoc(udg_BallOwner), 50.00, GetUnitFacing(udg_BallOwner)) )
call SetUnitFacingTimed( udg_Ball, GetUnitFacing(udg_BallOwner), 0 )
call SetUnitFlyHeightBJ( udg_Ball, ( GetUnitFlyHeight(udg_BallOwner) + udg_BallDefaultHeight ), 0.00 )
endif
call ConditionalTriggerExecute( gg_trg_Check_Linecross )
call ConditionalTriggerExecute( gg_trg_Set_Ball_Owner )
if ( Trig_Ball_Timer_Action_Func008C() ) then
set udg_BallImmuneTimer = ( udg_BallImmuneTimer - 1 )
else
endif
endfunction
//===========================================================================
function InitTrig_Ball_Timer_Action takes nothing returns nothing
set gg_trg_Ball_Timer_Action = CreateTrigger( )
call TriggerAddAction( gg_trg_Ball_Timer_Action, function Trig_Ball_Timer_Action_Actions )
endfunction
function Trig_Stop_Ball_Actions takes nothing returns nothing
call IssueImmediateOrder( udg_Ball, "stop" )
call SetUnitTimeScalePercent( udg_Ball, 0.00 )
endfunction
//===========================================================================
function InitTrig_Stop_Ball takes nothing returns nothing
set gg_trg_Stop_Ball = CreateTrigger( )
call TriggerAddAction( gg_trg_Stop_Ball, function Trig_Stop_Ball_Actions )
endfunction
function Trig_Vertical_Animations_Func001Func013C takes nothing returns boolean
if ( not ( RAbsBJ(udg_BallVY) <= ( udg_G * 5.00 ) ) ) then
return false
endif
return true
endfunction
function Trig_Vertical_Animations_Func001C takes nothing returns boolean
if ( not ( udg_BallVY < 0.00 ) ) then
return false
endif
if ( not ( GetUnitFlyHeight(udg_Ball) <= udg_BallDefaultHeight ) ) then
return false
endif
return true
endfunction
function Trig_Vertical_Animations_Actions takes nothing returns nothing
if ( Trig_Vertical_Animations_Func001C() ) then
set udg_BallBound = true
set udg_SpeedDownFactor = 50.00
call TriggerExecute( gg_trg_SpeedDown )
call SetUnitMoveSpeed( udg_Ball, RMaxBJ(( udg_MinimumSpeed + 1 ), GetUnitMoveSpeed(udg_Ball)) )
set udg_CurrentBallSpeed = GetUnitMoveSpeed(udg_Ball)
// バウンド/着地
call StopSoundBJ( udg_Land, false )
call PlaySoundOnUnitBJ( udg_Land, 100, udg_Ball )
if ( Trig_Vertical_Animations_Func001Func013C() ) then
call ShowUnitHide( udg_Flag )
set udg_BallInAir = false
set udg_BallVY = 0.00
call SetUnitFlyHeightBJ( udg_Ball, udg_BallDefaultHeight, 0.00 )
else
call SetUnitFlyHeightBJ( udg_Ball, udg_BallDefaultHeight, 0.00 )
set udg_BallVY = ( ( -1.00 * udg_BallVY ) * udg_e )
endif
else
call SetUnitFlyHeightBJ( udg_Ball, ( GetUnitFlyHeight(udg_Ball) + udg_BallVY ), 0.00 )
set udg_BallVY = ( udg_BallVY - udg_G )
endif
call TriggerExecute( gg_trg_Move_Flag_to_a_certain_point )
endfunction
//===========================================================================
function InitTrig_Vertical_Animations takes nothing returns nothing
set gg_trg_Vertical_Animations = CreateTrigger( )
call TriggerAddAction( gg_trg_Vertical_Animations, function Trig_Vertical_Animations_Actions )
endfunction
function Trig_Horizontal_Animations_Actions takes nothing returns nothing
set udg_SpeedDownFactor = udg_Friction
call TriggerExecute( gg_trg_SpeedDown )
endfunction
//===========================================================================
function InitTrig_Horizontal_Animations takes nothing returns nothing
set gg_trg_Horizontal_Animations = CreateTrigger( )
call TriggerAddAction( gg_trg_Horizontal_Animations, function Trig_Horizontal_Animations_Actions )
endfunction
function Trig_General_Animations_Func001Func003C takes nothing returns boolean
if ( not ( udg_PassTarget == null ) ) then
return false
endif
return true
endfunction
function Trig_General_Animations_Func001C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(udg_Ball) > udg_MinimumSpeed ) ) then
return false
endif
return true
endfunction
function Trig_General_Animations_Actions takes nothing returns nothing
if ( Trig_General_Animations_Func001C() ) then
call SetUnitTimeScalePercent( udg_Ball, ( 300.00 * ( GetUnitMoveSpeed(udg_Ball) / 200.00 ) ) )
call IssuePointOrderLoc( udg_Ball, "move", PolarProjectionBJ(GetUnitLoc(udg_Ball), 256.00, udg_BallDirection) )
if ( Trig_General_Animations_Func001Func003C() ) then
else
call TriggerExecute( gg_trg_Chase_Pass_Target )
endif
else
call ConditionalTriggerExecute( gg_trg_Stop_Ball )
endif
endfunction
//===========================================================================
function InitTrig_General_Animations takes nothing returns nothing
set gg_trg_General_Animations = CreateTrigger( )
call TriggerAddAction( gg_trg_General_Animations, function Trig_General_Animations_Actions )
endfunction
function Trig_Chase_Pass_Target_Func003Func001001 takes nothing returns boolean
return ( RAbsBJ(( udg_BallDirection - udg_BallInitialDir )) <= 80.00 )
endfunction
function Trig_Chase_Pass_Target_Func003Func001002 takes nothing returns boolean
return ( RAbsBJ(( RAbsBJ(( udg_BallDirection - udg_BallInitialDir )) - 360.00 )) <= 80.00 )
endfunction
function Trig_Chase_Pass_Target_Func003Func002001 takes nothing returns boolean
return ( RAbsBJ(( udg_BallDirection - udg_TempDirection )) <= 80.00 )
endfunction
function Trig_Chase_Pass_Target_Func003Func002002 takes nothing returns boolean
return ( RAbsBJ(( RAbsBJ(( udg_BallDirection - udg_TempDirection )) - 360.00 )) <= 80.00 )
endfunction
function Trig_Chase_Pass_Target_Func003C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Chase_Pass_Target_Func003Func001001(), Trig_Chase_Pass_Target_Func003Func001002() ) ) then
return false
endif
if ( not GetBooleanOr( Trig_Chase_Pass_Target_Func003Func002001(), Trig_Chase_Pass_Target_Func003Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Chase_Pass_Target_Actions takes nothing returns nothing
set udg_TempDirection = AngleBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_PassTarget))
call TriggerExecute( gg_trg_Change_Direction )
if ( Trig_Chase_Pass_Target_Func003C() ) then
set udg_BallDirection = AngleBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_PassTarget))
else
endif
endfunction
//===========================================================================
function InitTrig_Chase_Pass_Target takes nothing returns nothing
set gg_trg_Chase_Pass_Target = CreateTrigger( )
call TriggerAddAction( gg_trg_Chase_Pass_Target, function Trig_Chase_Pass_Target_Actions )
endfunction
function Trig_Cant_Get_Out_While_Throwin_Conditions takes nothing returns boolean
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_BallOwner), udg_ThrowinPos) >= 10 ) ) then
return false
endif
if ( not ( udg_ThrowinMode != 0 ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Get_Out_While_Throwin_Actions takes nothing returns nothing
call SetUnitPositionLoc( udg_BallOwner, udg_ThrowinPos )
endfunction
//===========================================================================
function InitTrig_Cant_Get_Out_While_Throwin takes nothing returns nothing
set gg_trg_Cant_Get_Out_While_Throwin = CreateTrigger( )
call TriggerAddCondition( gg_trg_Cant_Get_Out_While_Throwin, Condition( function Trig_Cant_Get_Out_While_Throwin_Conditions ) )
call TriggerAddAction( gg_trg_Cant_Get_Out_While_Throwin, function Trig_Cant_Get_Out_While_Throwin_Actions )
endfunction
function Trig_Sliding_and_jump_Func001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Sliding_and_jump_Func001Func001Func003Func004C takes nothing returns boolean
if ( not ( udg_HeroVX[GetConvertedPlayerId(GetEnumPlayer())] < 15.00 ) ) then
return false
endif
return true
endfunction
function Trig_Sliding_and_jump_Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_HeroVX[GetConvertedPlayerId(GetEnumPlayer())] > 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Sliding_and_jump_Func001Func001C takes nothing returns boolean
if ( not ( udg_HeroSlidingWait[GetConvertedPlayerId(GetEnumPlayer())] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Sliding_and_jump_Func001Func002Func003C takes nothing returns boolean
if ( not ( GetUnitFlyHeight(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]) <= 0.01 ) ) then
return false
endif
return true
endfunction
function Trig_Sliding_and_jump_Func001Func002C takes nothing returns boolean
if ( not ( udg_HeroInAir[GetConvertedPlayerId(GetEnumPlayer())] == true ) ) then
return false
endif
return true
endfunction
function Trig_Sliding_and_jump_Func001A takes nothing returns nothing
if ( Trig_Sliding_and_jump_Func001Func001C() ) then
set udg_HeroSlidingWait[GetConvertedPlayerId(GetEnumPlayer())] = ( udg_HeroSlidingWait[GetConvertedPlayerId(GetEnumPlayer())] - 1 )
call IssueImmediateOrder( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], "stop" )
if ( Trig_Sliding_and_jump_Func001Func001Func003C() ) then
call SetUnitPositionLoc( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], PolarProjectionBJ(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]), udg_HeroVX[GetConvertedPlayerId(GetEnumPlayer())], udg_SlidingDirection[GetConvertedPlayerId(GetEnumPlayer())]) )
set udg_HeroVX[GetConvertedPlayerId(GetEnumPlayer())] = ( udg_HeroVX[GetConvertedPlayerId(GetEnumPlayer())] - 3.00 )
if ( Trig_Sliding_and_jump_Func001Func001Func003Func004C() ) then
call DestroyEffectBJ( udg_SlidingEffect[GetConvertedPlayerId(GetEnumPlayer())] )
else
endif
else
endif
else
endif
if ( Trig_Sliding_and_jump_Func001Func002C() ) then
call SetUnitFlyHeightBJ( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], ( GetUnitFlyHeight(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]) + udg_HeroVY[GetConvertedPlayerId(GetEnumPlayer())] ), 0.00 )
set udg_HeroVY[GetConvertedPlayerId(GetEnumPlayer())] = ( udg_HeroVY[GetConvertedPlayerId(GetEnumPlayer())] - udg_G )
if ( Trig_Sliding_and_jump_Func001Func002Func003C() ) then
set udg_HeroInAir[GetConvertedPlayerId(GetEnumPlayer())] = false
call SetUnitFlyHeightBJ( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], 0.00, 0.00 )
set udg_HeroVY[GetConvertedPlayerId(GetEnumPlayer())] = 0.00
else
endif
else
endif
endfunction
function Trig_Sliding_and_jump_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_Sliding_and_jump_Func001001001)), function Trig_Sliding_and_jump_Func001A )
endfunction
//===========================================================================
function InitTrig_Sliding_and_jump takes nothing returns nothing
set gg_trg_Sliding_and_jump = CreateTrigger( )
call TriggerAddAction( gg_trg_Sliding_and_jump, function Trig_Sliding_and_jump_Actions )
endfunction
function Trig_Quest_Actions takes nothing returns nothing
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_304" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_305", "TRIGSTR_306", "ReplaceableTextures\\CommandButtons\\BTNPolymorph.blp" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_307", "TRIGSTR_308", "ReplaceableTextures\\CommandButtons\\BTNEvasion.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_309", "TRIGSTR_310", "ReplaceableTextures\\CommandButtons\\BTNMechanicalCritter.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_311", "TRIGSTR_312", "ReplaceableTextures\\CommandButtons\\BTNWirtsLeg.blp" )
endfunction
//===========================================================================
function InitTrig_Quest takes nothing returns nothing
set gg_trg_Quest = CreateTrigger( )
call TriggerAddAction( gg_trg_Quest, function Trig_Quest_Actions )
endfunction
function Trig_Set_Computer_names_Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetEnumPlayer()) == AI_DIFFICULTY_INSANE ) ) then
return false
endif
return true
endfunction
function Trig_Set_Computer_names_Func001Func001Func001C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetEnumPlayer()) == AI_DIFFICULTY_NORMAL ) ) then
return false
endif
return true
endfunction
function Trig_Set_Computer_names_Func001Func001C takes nothing returns boolean
if ( not ( GetAIDifficulty(GetEnumPlayer()) == AI_DIFFICULTY_NEWBIE ) ) then
return false
endif
return true
endfunction
function Trig_Set_Computer_names_Func001A takes nothing returns nothing
if ( Trig_Set_Computer_names_Func001Func001C() ) then
call SetPlayerName( GetEnumPlayer(), ( ( "Player " + I2S(GetConvertedPlayerId(GetEnumPlayer())) ) + " (EASY)" ) )
else
if ( Trig_Set_Computer_names_Func001Func001Func001C() ) then
call SetPlayerName( GetEnumPlayer(), ( ( "Player " + I2S(GetConvertedPlayerId(GetEnumPlayer())) ) + " (NORMAL)" ) )
else
if ( Trig_Set_Computer_names_Func001Func001Func001Func001C() ) then
call SetPlayerName( GetEnumPlayer(), ( ( "Player " + I2S(GetConvertedPlayerId(GetEnumPlayer())) ) + " (INSANE)" ) )
else
endif
endif
endif
endfunction
function Trig_Set_Computer_names_Actions takes nothing returns nothing
call ForForce( GetPlayersByMapControl(MAP_CONTROL_COMPUTER), function Trig_Set_Computer_names_Func001A )
endfunction
//===========================================================================
function InitTrig_Set_Computer_names takes nothing returns nothing
set gg_trg_Set_Computer_names = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_Computer_names, function Trig_Set_Computer_names_Actions )
endfunction
function Trig_Camera_Initialization_Func002001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Camera_Initialization_Func002A takes nothing returns nothing
call SetCameraFieldForPlayer( GetEnumPlayer(), CAMERA_FIELD_ANGLE_OF_ATTACK, 330.00, 2.00 )
endfunction
function Trig_Camera_Initialization_Actions takes nothing returns nothing
call PolledWait( 0.10 )
call ForForce( GetPlayersMatching(Condition(function Trig_Camera_Initialization_Func002001001)), function Trig_Camera_Initialization_Func002A )
endfunction
//===========================================================================
function InitTrig_Camera_Initialization takes nothing returns nothing
set gg_trg_Camera_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Camera_Initialization, function Trig_Camera_Initialization_Actions )
endfunction
function Trig_Messages_Actions takes nothing returns nothing
call TriggerSleepAction( 0.10 )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_252" )
call PlaySoundBJ( gg_snd_Cheer )
call TriggerExecute( gg_trg_Com_Get_Abilities )
endfunction
//===========================================================================
function InitTrig_Messages takes nothing returns nothing
set gg_trg_Messages = CreateTrigger( )
call TriggerAddAction( gg_trg_Messages, function Trig_Messages_Actions )
endfunction
function Trig_Create_Units_Func001A takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'H001', GetEnumPlayer(), GetPlayerStartLocationLoc(GetEnumPlayer()), GetUnitLoc(udg_Ball) )
call SetHeroLevelBJ( GetLastCreatedUnit(), 10, false )
set udg_Hero[GetConvertedPlayerId(GetEnumPlayer())] = GetLastCreatedUnit()
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_Team1Heros )
call UnitAddItemToSlotById( GetLastCreatedUnit(), 'I000', 0 )
call UnitAddItemToSlotById( GetLastCreatedUnit(), 'I001', 1 )
call UnitAddItemToSlotById( GetLastCreatedUnit(), 'I002', 2 )
call UnitAddItemToSlotById( GetLastCreatedUnit(), 'I003', 3 )
endfunction
function Trig_Create_Units_Func002A takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'H003', GetEnumPlayer(), GetPlayerStartLocationLoc(GetEnumPlayer()), GetUnitLoc(udg_Ball) )
call SetHeroLevelBJ( GetLastCreatedUnit(), 10, false )
set udg_Hero[GetConvertedPlayerId(GetEnumPlayer())] = GetLastCreatedUnit()
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_Team2Heros )
call UnitAddItemToSlotById( GetLastCreatedUnit(), 'I000', 0 )
call UnitAddItemToSlotById( GetLastCreatedUnit(), 'I001', 1 )
call UnitAddItemToSlotById( GetLastCreatedUnit(), 'I002', 2 )
call UnitAddItemToSlotById( GetLastCreatedUnit(), 'I003', 3 )
endfunction
function Trig_Create_Units_Actions takes nothing returns nothing
call ForForce( GetPlayersAllies(Player(0)), function Trig_Create_Units_Func001A )
call ForForce( GetPlayersAllies(Player(6)), function Trig_Create_Units_Func002A )
endfunction
//===========================================================================
function InitTrig_Create_Units takes nothing returns nothing
set gg_trg_Create_Units = CreateTrigger( )
call TriggerAddAction( gg_trg_Create_Units, function Trig_Create_Units_Actions )
endfunction
function Trig_Initialization_Func009C takes nothing returns boolean
if ( not ( CountPlayersInForceBJ(GetPlayersByMapControl(MAP_CONTROL_COMPUTER)) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Initialization_Actions takes nothing returns nothing
call SetTimeOfDay( 12 )
call SetTimeOfDayScalePercentBJ( 0.00 )
call StopMusicBJ( false )
call TriggerExecute( gg_trg_Set_Computer_names )
call TriggerExecute( gg_trg_Set_Constants )
call ShowUnitHide( udg_Flag )
call DisableTrigger( gg_trg_Timer_Interval_01 )
call TriggerExecute( gg_trg_Vote_times )
if ( Trig_Initialization_Func009C() ) then
call EnableTrigger( gg_trg_Computer_AI )
else
endif
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_Start_Music_Actions takes nothing returns nothing
call TriggerSleepAction( 0.01 )
call PlayMusicBJ( gg_snd_Manowar )
endfunction
//===========================================================================
function InitTrig_Start_Music takes nothing returns nothing
set gg_trg_Start_Music = CreateTrigger( )
call TriggerAddAction( gg_trg_Start_Music, function Trig_Start_Music_Actions )
endfunction
function Trig_Round_Initialization_Actions takes nothing returns nothing
call TriggerSleepAction( 0.01 )
call StartTimerBJ( udg_RealTimer, false, ( udg_RoundTime * 60.00 ) )
call PauseTimerBJ( true, udg_RealTimer )
call StartTimerBJ( udg_RoundTimer, false, ( udg_RoundTime * 60.00 ) )
call CreateTimerDialogBJ( udg_RoundTimer, "TRIGSTR_090" )
call PauseTimerBJ( true, udg_RoundTimer )
endfunction
//===========================================================================
function InitTrig_Round_Initialization takes nothing returns nothing
set gg_trg_Round_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Round_Initialization, function Trig_Round_Initialization_Actions )
endfunction
function Trig_Set_Constants_Func044001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Set_Constants_Func044A takes nothing returns nothing
set udg_CameraDistance[GetConvertedPlayerId(GetEnumPlayer())] = 1768.00
endfunction
function Trig_Set_Constants_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_CameraDistance[GetForLoopIndexA()] = 1800.00
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_PlayArea[1] = gg_rct_LeftArea
set udg_PlayArea[2] = gg_rct_RightArea
set udg_IgnoreAItimer = 40
set udg_GoalArea[1] = gg_rct_HeaddingShootAreaLeft
set udg_GoalArea[2] = gg_rct_HeaddingShootAreaRight
set udg_KeeperMoveableArea[1] = gg_rct_KeeperMoveAreaLeft
set udg_KeeperMoveableArea[2] = gg_rct_KeeperMoveAreaRight
set udg_Throw = gg_snd_Throw
set udg_Keeper[1] = gg_unit_e001_0103
set udg_Keeper[2] = gg_unit_e000_0102
set udg_KeeperArea[1] = gg_rct_LeftKeeperArea
set udg_KeeperArea[2] = gg_rct_RightKeeperArea
set udg_CantMakeDirectShoot = true
set udg_Referee = gg_unit_N000_0099
set udg_Linesmen[0] = gg_unit_n001_0100
set udg_Linesmen[1] = gg_unit_n002_0101
set udg_MaxBVYforHeadding = 10.00
set udg_HeroHeight = 100.00
set udg_PenaltyAreas[1] = gg_rct_PenaltyAreaLeft
set udg_PenaltyAreas[2] = gg_rct_PenaltyAreaRight
set udg_Flag = gg_unit_h004_0007
set udg_Ball = gg_unit_h000_0001
set udg_BallDefaultHeight = GetUnitDefaultFlyHeight(gg_unit_h000_0001)
set udg_BallVY = 0.00
set udg_BallInAir = false
set udg_G = 2.30
set udg_BallOwner = null
set udg_ThrowinPos = GetRectCenter(gg_rct_Center)
set udg_e = 0.60
set udg_Friction = 10.00
set udg_Score[1] = 0
set udg_Score[2] = 0
set udg_Land = gg_snd_Land
set udg_Kick = gg_snd_Kick
set udg_MinimumSpeed = 1.00
set udg_MaxSpeed = 522.00
set udg_RoundCheck = 0
set udg_ThrowinMode = 1
set udg_CantEnterOtherSide = true
set udg_RightTeamName = "|c00ff0000Team Peons|r"
set udg_LeftTeamName = "|c00ffff00Team Peasants|r"
call TriggerExecute( gg_trg_PlayerColor )
call ForForce( GetPlayersMatching(Condition(function Trig_Set_Constants_Func044001001)), function Trig_Set_Constants_Func044A )
set udg_AI_AttackPoint_U[2] = gg_rct_AItargetLEFTU
set udg_AI_AttackPoint_M[2] = gg_rct_AItargetLEFTM
set udg_AI_AttackPoint_D[2] = gg_rct_AItargetLEFTTD
set udg_AI_AttackPoint_U[1] = gg_rct_AItargetRIGHTU
set udg_AI_AttackPoint_M[1] = gg_rct_AItargetRIGHTM
set udg_AI_AttackPoint_D[1] = gg_rct_AItargetRIGHTD
endfunction
//===========================================================================
function InitTrig_Set_Constants takes nothing returns nothing
set gg_trg_Set_Constants = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_Constants, function Trig_Set_Constants_Actions )
endfunction
function Trig_PlayerColor_Actions takes nothing returns nothing
set udg_PlayerNames[1] = ( "|cffFF0202" + ( GetPlayerName(Player(0)) + "|r" ) )
set udg_PlayerNames[2] = ( "|cff0041FF" + ( GetPlayerName(Player(1)) + "|r" ) )
set udg_PlayerNames[3] = ( "|cff1BE6B8" + ( GetPlayerName(Player(2)) + "|r" ) )
set udg_PlayerNames[4] = ( "|cff530080" + ( GetPlayerName(Player(3)) + "|r" ) )
set udg_PlayerNames[5] = ( "|cffFFFC00" + ( GetPlayerName(Player(4)) + "|r" ) )
set udg_PlayerNames[6] = ( "|cffFE890D" + ( GetPlayerName(Player(5)) + "|r" ) )
set udg_PlayerNames[7] = ( "|cff1FC000" + ( GetPlayerName(Player(6)) + "|r" ) )
set udg_PlayerNames[8] = ( "|cffE55AAF" + ( GetPlayerName(Player(7)) + "|r" ) )
set udg_PlayerNames[9] = ( "|cff949596" + ( GetPlayerName(Player(8)) + "|r" ) )
set udg_PlayerNames[10] = ( "|cff7DBEF1" + ( GetPlayerName(Player(9)) + "|r" ) )
set udg_PlayerNames[11] = ( "|cff0F6145" + ( GetPlayerName(Player(10)) + "|r" ) )
set udg_PlayerNames[12] = ( "|cff4D2903" + ( GetPlayerName(Player(11)) + "|r" ) )
set udg_PlayerColorR[1] = 100.00
set udg_PlayerColorG[1] = 1.00
set udg_PlayerColorB[1] = 1.00
set udg_PlayerColorR[2] = 0.00
set udg_PlayerColorG[2] = 25.00
set udg_PlayerColorB[2] = 100.00
set udg_PlayerColorR[3] = 11.00
set udg_PlayerColorG[3] = 90.00
set udg_PlayerColorB[3] = 72.00
set udg_PlayerColorR[4] = 33.00
set udg_PlayerColorG[4] = 0.00
set udg_PlayerColorB[4] = 50.00
set udg_PlayerColorR[5] = 100.00
set udg_PlayerColorG[5] = 99.00
set udg_PlayerColorB[5] = 0.00
set udg_PlayerColorR[6] = 100.00
set udg_PlayerColorG[6] = 54.00
set udg_PlayerColorB[6] = 5.00
set udg_PlayerColorR[7] = 12.00
set udg_PlayerColorG[7] = 75.00
set udg_PlayerColorB[7] = 0.00
set udg_PlayerColorR[8] = 90.00
set udg_PlayerColorG[8] = 35.00
set udg_PlayerColorB[8] = 69.00
set udg_PlayerColorR[9] = 58.00
set udg_PlayerColorG[9] = 58.00
set udg_PlayerColorB[9] = 59.00
set udg_PlayerColorR[10] = 49.00
set udg_PlayerColorG[10] = 75.00
set udg_PlayerColorB[10] = 95.00
set udg_PlayerColorR[11] = 6.00
set udg_PlayerColorG[11] = 38.00
set udg_PlayerColorB[11] = 27.00
set udg_PlayerColorR[12] = 30.00
set udg_PlayerColorG[12] = 16.00
set udg_PlayerColorB[12] = 1.00
endfunction
//===========================================================================
function InitTrig_PlayerColor takes nothing returns nothing
set gg_trg_PlayerColor = CreateTrigger( )
call TriggerAddAction( gg_trg_PlayerColor, function Trig_PlayerColor_Actions )
endfunction
function Trig_Set_Camera_Distance_Func001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Set_Camera_Distance_Func001Func001Func002C takes nothing returns boolean
if ( not ( udg_TempReal2 >= 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Set_Camera_Distance_Func001Func001C takes nothing returns boolean
if ( not ( udg_CameraAutoZoom[GetConvertedPlayerId(GetEnumPlayer())] == true ) ) then
return false
endif
return true
endfunction
function Trig_Set_Camera_Distance_Func001A takes nothing returns nothing
if ( Trig_Set_Camera_Distance_Func001Func001C() ) then
set udg_TempReal2 = ( GetLocationY(GetUnitLoc(udg_Ball)) - GetLocationY(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())])) )
if ( Trig_Set_Camera_Distance_Func001Func001Func002C() ) then
set udg_CameraDistance[GetConvertedPlayerId(GetEnumPlayer())] = RMaxBJ(1800.00, ( 1.50 * udg_TempReal2 ))
else
set udg_CameraDistance[GetConvertedPlayerId(GetEnumPlayer())] = RMaxBJ(1800.00, ( -3.00 * udg_TempReal2 ))
endif
set udg_TempReal2 = RAbsBJ(( GetLocationX(GetUnitLoc(udg_Ball)) - GetLocationX(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())])) ))
set udg_CameraDistance[GetConvertedPlayerId(GetEnumPlayer())] = RMaxBJ(udg_CameraDistance[GetConvertedPlayerId(GetEnumPlayer())], ( 2.30 * udg_TempReal2 ))
set udg_CameraDistance[GetConvertedPlayerId(GetEnumPlayer())] = RMinBJ(udg_CameraDistance[GetConvertedPlayerId(GetEnumPlayer())], 3500.00)
else
endif
call SetCameraFieldForPlayer( GetEnumPlayer(), CAMERA_FIELD_TARGET_DISTANCE, udg_CameraDistance[GetConvertedPlayerId(GetEnumPlayer())], 0.50 )
endfunction
function Trig_Set_Camera_Distance_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_Set_Camera_Distance_Func001001001)), function Trig_Set_Camera_Distance_Func001A )
endfunction
//===========================================================================
function InitTrig_Set_Camera_Distance takes nothing returns nothing
set gg_trg_Set_Camera_Distance = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_Camera_Distance, function Trig_Set_Camera_Distance_Actions )
endfunction
function Trig_Get_Distance_of_selected_unit_Func001C takes nothing returns boolean
if ( not ( RAbsBJ(( GetUnitFacing(GetSpellAbilityUnit()) - udg_TempDirection )) <= 180.00 ) ) then
return false
endif
return true
endfunction
function Trig_Get_Distance_of_selected_unit_Actions takes nothing returns nothing
if ( Trig_Get_Distance_of_selected_unit_Func001C() ) then
set udg_DistanceOfSelectedUnit = ( DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetUnitLoc(GetEnumUnit())) + ( RAbsBJ(( GetUnitFacing(GetSpellAbilityUnit()) - udg_TempDirection )) * 50.00 ) )
else
set udg_DistanceOfSelectedUnit = ( DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetUnitLoc(GetEnumUnit())) + ( RAbsBJ(( RAbsBJ(( GetUnitFacing(GetSpellAbilityUnit()) - udg_TempDirection )) - 360.00 )) * 50.00 ) )
endif
endfunction
//===========================================================================
function InitTrig_Get_Distance_of_selected_unit takes nothing returns nothing
set gg_trg_Get_Distance_of_selected_unit = CreateTrigger( )
call TriggerAddAction( gg_trg_Get_Distance_of_selected_unit, function Trig_Get_Distance_of_selected_unit_Actions )
endfunction
function Trig_Change_Direction_Func001C takes nothing returns boolean
if ( not ( udg_TempDirection < 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Change_Direction_Actions takes nothing returns nothing
if ( Trig_Change_Direction_Func001C() ) then
set udg_TempDirection = ( udg_TempDirection + 360.00 )
else
endif
endfunction
//===========================================================================
function InitTrig_Change_Direction takes nothing returns nothing
set gg_trg_Change_Direction = CreateTrigger( )
call TriggerAddAction( gg_trg_Change_Direction, function Trig_Change_Direction_Actions )
endfunction
function Trig_Get_Pass_Target_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(GetSpellAbilityUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Get_Pass_Target_Func002001002001 takes nothing returns boolean
return ( IsUnitAlly(GetFilterUnit(), GetOwningPlayer(GetSpellAbilityUnit())) == true )
endfunction
function Trig_Get_Pass_Target_Func002001002002001 takes nothing returns boolean
return ( GetFilterUnit() == udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetFilterUnit()))] )
endfunction
function Trig_Get_Pass_Target_Func002001002002002 takes nothing returns boolean
return ( GetFilterUnit() != GetSpellAbilityUnit() )
endfunction
function Trig_Get_Pass_Target_Func002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Get_Pass_Target_Func002001002002001(), Trig_Get_Pass_Target_Func002001002002002() )
endfunction
function Trig_Get_Pass_Target_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Get_Pass_Target_Func002001002001(), Trig_Get_Pass_Target_Func002001002002() )
endfunction
function Trig_Get_Pass_Target_Func002Func004Func001Func003001 takes nothing returns boolean
return ( udg_PassTarget == null )
endfunction
function Trig_Get_Pass_Target_Func002Func004Func001Func003002001 takes nothing returns boolean
return ( udg_DistanceOfSelectedUnit < udg_PassTargetDistance )
endfunction
function Trig_Get_Pass_Target_Func002Func004Func001Func003002002001 takes nothing returns boolean
return ( RectContainsUnit(gg_rct_PlayArea, GetEnumUnit()) == true )
endfunction
function Trig_Get_Pass_Target_Func002Func004Func001Func003002002002 takes nothing returns boolean
return ( udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] == false )
endfunction
function Trig_Get_Pass_Target_Func002Func004Func001Func003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Get_Pass_Target_Func002Func004Func001Func003002002001(), Trig_Get_Pass_Target_Func002Func004Func001Func003002002002() )
endfunction
function Trig_Get_Pass_Target_Func002Func004Func001Func003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Get_Pass_Target_Func002Func004Func001Func003002001(), Trig_Get_Pass_Target_Func002Func004Func001Func003002002() )
endfunction
function Trig_Get_Pass_Target_Func002Func004Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Get_Pass_Target_Func002Func004Func001Func003001(), Trig_Get_Pass_Target_Func002Func004Func001Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Get_Pass_Target_Func002Func004C takes nothing returns boolean
if ( not ( RAbsBJ(( GetUnitFacing(GetSpellAbilityUnit()) - udg_TempDirection )) <= 180.00 ) ) then
return false
endif
return true
endfunction
function Trig_Get_Pass_Target_Func002Func005Func002Func001001 takes nothing returns boolean
return ( udg_PassTarget == null )
endfunction
function Trig_Get_Pass_Target_Func002Func005Func002Func001002 takes nothing returns boolean
return ( udg_DistanceOfSelectedUnit < udg_PassTargetDistance )
endfunction
function Trig_Get_Pass_Target_Func002Func005Func002C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Get_Pass_Target_Func002Func005Func002Func001001(), Trig_Get_Pass_Target_Func002Func005Func002Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Get_Pass_Target_Func002Func005C takes nothing returns boolean
if ( not ( RAbsBJ(( RAbsBJ(( GetUnitFacing(GetSpellAbilityUnit()) - udg_TempDirection )) - 360.00 )) <= 180.00 ) ) then
return false
endif
return true
endfunction
function Trig_Get_Pass_Target_Func002A takes nothing returns nothing
set udg_TempDirection = AngleBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetUnitLoc(GetEnumUnit()))
call TriggerExecute( gg_trg_Change_Direction )
call TriggerExecute( gg_trg_Get_Distance_of_selected_unit )
if ( Trig_Get_Pass_Target_Func002Func004C() ) then
if ( Trig_Get_Pass_Target_Func002Func004Func001C() ) then
set udg_PassTarget = GetEnumUnit()
set udg_PassTargetDistance = ( DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetUnitLoc(GetEnumUnit())) + ( RAbsBJ(( GetUnitFacing(GetSpellAbilityUnit()) - udg_TempDirection )) * 50.00 ) )
else
endif
else
endif
if ( Trig_Get_Pass_Target_Func002Func005C() ) then
if ( Trig_Get_Pass_Target_Func002Func005Func002C() ) then
set udg_PassTarget = GetEnumUnit()
set udg_PassTargetDistance = ( DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetUnitLoc(GetEnumUnit())) + ( RAbsBJ(( RAbsBJ(( GetUnitFacing(GetSpellAbilityUnit()) - udg_TempDirection )) - 360.00 )) * 50.00 ) )
else
endif
else
endif
endfunction
function Trig_Get_Pass_Target_Actions takes nothing returns nothing
if ( Trig_Get_Pass_Target_Func001C() ) then
set udg_TempDirection = AngleBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetUnitLoc(udg_Keeper[1]))
set udg_PassTarget = udg_Keeper[1]
set udg_PassTargetDistance = ( DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetUnitLoc(udg_Keeper[1])) + ( RAbsBJ(( GetUnitFacing(GetSpellAbilityUnit()) - udg_TempDirection )) * 50.00 ) )
else
set udg_TempDirection = AngleBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetUnitLoc(udg_Keeper[2]))
set udg_PassTarget = udg_Keeper[2]
set udg_PassTargetDistance = ( DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetUnitLoc(udg_Keeper[2])) + ( RAbsBJ(( GetUnitFacing(GetSpellAbilityUnit()) - udg_TempDirection )) * 50.00 ) )
endif
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Get_Pass_Target_Func002001002)), function Trig_Get_Pass_Target_Func002A )
endfunction
//===========================================================================
function InitTrig_Get_Pass_Target takes nothing returns nothing
set gg_trg_Get_Pass_Target = CreateTrigger( )
call TriggerAddAction( gg_trg_Get_Pass_Target, function Trig_Get_Pass_Target_Actions )
endfunction
function Trig_Common_Actions_for_shoot_Actions takes nothing returns nothing
call ShowUnitShow( udg_Ball )
call PauseTimerBJ( false, udg_RoundTimer )
call PauseTimerBJ( false, udg_RealTimer )
set udg_CantEnterOtherSide = false
set udg_ThrowinMode = 0
set udg_CantHoldBall[GetConvertedPlayerId(GetOwningPlayer(udg_BallOwner))] = 10
call StopSoundBJ( udg_Kick, false )
call PlaySoundOnUnitBJ( udg_Kick, 100, udg_BallOwner )
set udg_BallOwner = null
call TriggerExecute( gg_trg_Reduce_MoveSpeed_of_BallOwner )
endfunction
//===========================================================================
function InitTrig_Common_Actions_for_shoot takes nothing returns nothing
set gg_trg_Common_Actions_for_shoot = CreateTrigger( )
call TriggerAddAction( gg_trg_Common_Actions_for_shoot, function Trig_Common_Actions_for_shoot_Actions )
endfunction
function Trig_Auto_Pass_Conditions takes nothing returns boolean
if ( not ( udg_HeroSlidingWait[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] == 0 ) ) then
return false
endif
if ( not ( udg_BallOwner == GetSpellAbilityUnit() ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A007' ) ) then
return false
endif
return true
endfunction
function Trig_Auto_Pass_Func002Func011Func001C takes nothing returns boolean
if ( not ( udg_ThrowinMode != 0 ) ) then
return false
endif
return true
endfunction
function Trig_Auto_Pass_Func002Func011C takes nothing returns boolean
if ( not ( udg_PassTarget == null ) ) then
return false
endif
return true
endfunction
function Trig_Auto_Pass_Func002C takes nothing returns boolean
if ( not ( udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_Auto_Pass_Actions takes nothing returns nothing
set udg_BallBound = true
if ( Trig_Auto_Pass_Func002C() ) then
set udg_BallVY = 0.00
set udg_BallInAir = true
set udg_BallDirection = GetUnitFacing(udg_BallOwner)
set udg_BallInitialDir = GetUnitFacing(udg_BallOwner)
set udg_BallImmuneTimer = 7
set udg_TempReal = ( 57.20 + ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_BallOwner, true)) * 1.00 ) )
call TriggerExecute( gg_trg_Set_Ball_VX )
call TriggerExecute( gg_trg_Common_Actions_for_shoot )
else
call TriggerExecute( gg_trg_Get_Pass_Target )
if ( Trig_Auto_Pass_Func002Func011C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSpellAbilityUnit())), "TRIGSTR_155" )
call SetUnitFlyHeightBJ( udg_Ball, udg_BallDefaultHeight, 0.00 )
set udg_BallVY = 0.00
set udg_BallInAir = false
set udg_BallDirection = GetUnitFacing(udg_BallOwner)
set udg_BallInitialDir = GetUnitFacing(udg_BallOwner)
set udg_BallImmuneTimer = 7
set udg_TempReal = ( 57.20 + ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_BallOwner, true)) * 1.00 ) )
call TriggerExecute( gg_trg_Set_Ball_VX )
call TriggerExecute( gg_trg_Common_Actions_for_shoot )
else
if ( Trig_Auto_Pass_Func002Func011Func001C() ) then
call SetUnitPositionLoc( udg_Ball, PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 100.00, AngleBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetUnitLoc(udg_PassTarget))) )
else
endif
call SetUnitFlyHeightBJ( udg_Ball, udg_BallDefaultHeight, 0.00 )
set udg_BallVY = 0.00
set udg_BallInAir = false
set udg_BallDirection = AngleBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_PassTarget))
set udg_BallInitialDir = AngleBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(udg_PassTarget))
set udg_TempReal = ( 57.20 + ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_BallOwner, true)) * 1.00 ) )
set udg_BallImmuneTimer = IMinBJ(7, R2I(( DistanceBetweenPoints(GetUnitLoc(udg_PassTarget), GetUnitLoc(udg_Ball)) / ( 2.00 * udg_TempReal ) )))
call TriggerExecute( gg_trg_Set_Ball_VX )
call TriggerExecute( gg_trg_Common_Actions_for_shoot )
endif
endif
endfunction
//===========================================================================
function InitTrig_Auto_Pass takes nothing returns nothing
set gg_trg_Auto_Pass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Auto_Pass, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Auto_Pass, Condition( function Trig_Auto_Pass_Conditions ) )
call TriggerAddAction( gg_trg_Auto_Pass, function Trig_Auto_Pass_Actions )
endfunction
function Trig_NEW_Long_Pass_Conditions takes nothing returns boolean
if ( not ( udg_HeroSlidingWait[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == 0 ) ) then
return false
endif
if ( not ( udg_BallOwner == GetSummoningUnit() ) ) then
return false
endif
if ( not ( udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'osp2' ) ) then
return false
endif
return true
endfunction
function Trig_NEW_Long_Pass_Actions takes nothing returns nothing
set udg_BallBound = true
call ShowUnitShow( udg_Flag )
call SetUnitFlyHeightBJ( udg_Ball, udg_BallDefaultHeight, 0.00 )
set udg_BallDirection = AngleBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(GetSummonedUnit()))
set udg_HeroSlidingWait[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] = 10
call TriggerExecute( gg_trg_Calcurate_Speed_and_vy_for_Long_Pass )
call TriggerExecute( gg_trg_Common_Actions_for_shoot )
set udg_BallImmuneTimer = 7
endfunction
//===========================================================================
function InitTrig_NEW_Long_Pass takes nothing returns nothing
set gg_trg_NEW_Long_Pass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NEW_Long_Pass, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_NEW_Long_Pass, Condition( function Trig_NEW_Long_Pass_Conditions ) )
call TriggerAddAction( gg_trg_NEW_Long_Pass, function Trig_NEW_Long_Pass_Actions )
endfunction
function Trig_Calcurate_Speed_and_vy_for_Long_Pass_Actions takes nothing returns nothing
set udg_TempReal = ( 37.20 + ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_BallOwner, true)) * 1.50 ) )
set udg_BallInAir = true
set udg_BallVY = ( ( udg_G * DistanceBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(GetSummonedUnit())) ) / ( 2.00 * udg_TempReal ) )
set udg_BallVY = RMaxBJ(30.00, udg_BallVY)
set udg_BallVY = RMinBJ(( 30.00 + ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_BallOwner, true)) * 1.50 ) ), udg_BallVY)
set udg_TempReal = ( ( udg_G * DistanceBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(GetSummonedUnit())) ) / ( 2.00 * udg_BallVY ) )
call TriggerExecute( gg_trg_Set_Ball_VX )
endfunction
//===========================================================================
function InitTrig_Calcurate_Speed_and_vy_for_Long_Pass takes nothing returns nothing
set gg_trg_Calcurate_Speed_and_vy_for_Long_Pass = CreateTrigger( )
call TriggerAddAction( gg_trg_Calcurate_Speed_and_vy_for_Long_Pass, function Trig_Calcurate_Speed_and_vy_for_Long_Pass_Actions )
endfunction
function Trig_Set_Ball_VX_Func003C takes nothing returns boolean
if ( not ( udg_CurrentBallSpeed > udg_MaxSpeed ) ) then
return false
endif
return true
endfunction
function Trig_Set_Ball_VX_Actions takes nothing returns nothing
set udg_TempReal = ( udg_TempReal * 10.00 )
set udg_CurrentBallSpeed = udg_TempReal
if ( Trig_Set_Ball_VX_Func003C() ) then
call SetUnitMoveSpeed( udg_Ball, udg_MaxSpeed )
else
call SetUnitMoveSpeed( udg_Ball, udg_CurrentBallSpeed )
endif
endfunction
//===========================================================================
function InitTrig_Set_Ball_VX takes nothing returns nothing
set gg_trg_Set_Ball_VX = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_Ball_VX, function Trig_Set_Ball_VX_Actions )
endfunction
function Trig_Shoot_or_Sliding_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'osp1' ) ) then
return false
endif
if ( not ( udg_HeroSlidingWait[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Shoot_or_Sliding_Func001Func003Func010Func003001 takes nothing returns boolean
return ( ( udg_TempDirection - udg_SlidingDirection[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] ) <= 30.00 )
endfunction
function Trig_Shoot_or_Sliding_Func001Func003Func010Func003002 takes nothing returns boolean
return ( RAbsBJ(( RAbsBJ(( udg_TempDirection - udg_SlidingDirection[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )) - 360.00 )) <= 30.00 )
endfunction
function Trig_Shoot_or_Sliding_Func001Func003Func010C takes nothing returns boolean
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(GetSummoningUnit())) <= 256.00 ) ) then
return false
endif
if ( not GetBooleanOr( Trig_Shoot_or_Sliding_Func001Func003Func010Func003001(), Trig_Shoot_or_Sliding_Func001Func003Func010Func003002() ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(udg_BallOwner)) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
if ( not ( GetAIDifficulty(GetOwningPlayer(udg_BallOwner)) == AI_DIFFICULTY_INSANE ) ) then
return false
endif
return true
endfunction
function Trig_Shoot_or_Sliding_Func001Func003C takes nothing returns boolean
if ( not ( udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Shoot_or_Sliding_Func001C takes nothing returns boolean
if ( not ( udg_BallOwner == GetSummoningUnit() ) ) then
return false
endif
return true
endfunction
function Trig_Shoot_or_Sliding_Actions takes nothing returns nothing
if ( Trig_Shoot_or_Sliding_Func001C() ) then
set udg_BallBound = false
set udg_BallImmuneTimer = 7
call ShowUnitShow( udg_Flag )
set udg_BallVY = 20.00
set udg_BallInAir = true
set udg_BallDirection = AngleBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(GetSummonedUnit()))
set udg_TempReal = ( 37.20 + ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_BallOwner, true)) * 1.50 ) )
call TriggerExecute( gg_trg_Set_Ball_VX )
call TriggerExecute( gg_trg_Common_Actions_for_shoot )
else
if ( Trig_Shoot_or_Sliding_Func001Func003C() ) then
call GroupAddUnitSimple( GetSummoningUnit(), udg_SlidingUnits )
set udg_SlidingDirection[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] = AngleBetweenPoints(GetUnitLoc(GetSummoningUnit()), GetUnitLoc(GetSummonedUnit()))
set udg_HeroSlidingWait[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] = 25
set udg_HeroVX[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] = 40.00
call PlaySoundOnUnitBJ( gg_snd_Shockwave, 100, GetSummoningUnit() )
call AddSpecialEffectTargetUnitBJ( "origin", GetSummoningUnit(), "Abilities\\Spells\\Orc\\Shockwave\\ShockwaveMissile.mdl" )
set udg_SlidingEffect[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] = GetLastCreatedEffectBJ()
set udg_TempDirection = AngleBetweenPoints(GetUnitLoc(GetSummoningUnit()), GetUnitLoc(udg_Ball))
if ( Trig_Shoot_or_Sliding_Func001Func003Func010C() ) then
call IssueImmediateOrder( udg_BallOwner, "windwalk" )
else
endif
else
endif
endif
endfunction
//===========================================================================
function InitTrig_Shoot_or_Sliding takes nothing returns nothing
set gg_trg_Shoot_or_Sliding = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shoot_or_Sliding, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Shoot_or_Sliding, Condition( function Trig_Shoot_or_Sliding_Conditions ) )
call TriggerAddAction( gg_trg_Shoot_or_Sliding, function Trig_Shoot_or_Sliding_Actions )
endfunction
function Trig_Delete_Summoned_Units_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
endfunction
//===========================================================================
function InitTrig_Delete_Summoned_Units takes nothing returns nothing
set gg_trg_Delete_Summoned_Units = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Delete_Summoned_Units, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddAction( gg_trg_Delete_Summoned_Units, function Trig_Delete_Summoned_Units_Actions )
endfunction
function Trig_Heading_Conditions takes nothing returns boolean
if ( not ( udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] == false ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A009' ) ) then
return false
endif
if ( not ( udg_HeroSlidingWait[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] <= 0 ) ) then
return false
endif
return true
endfunction
function Trig_Heading_Func001C takes nothing returns boolean
if ( not ( udg_BallOwner == GetSpellAbilityUnit() ) ) then
return false
endif
return true
endfunction
function Trig_Heading_Actions takes nothing returns nothing
if ( Trig_Heading_Func001C() ) then
set udg_HeroVY[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = 15.00
set udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = true
call TriggerSleepAction( 0.01 )
call UnitRemoveBuffBJ( 'BOwk', GetSpellAbilityUnit() )
else
set udg_HeroVY[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = ( 20.00 + I2R(( GetHeroStatBJ(bj_HEROSTAT_STR, GetSpellAbilityUnit(), true) * 1 )) )
set udg_HeroInAir[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = true
endif
endfunction
//===========================================================================
function InitTrig_Heading takes nothing returns nothing
set gg_trg_Heading = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Heading, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Heading, Condition( function Trig_Heading_Conditions ) )
call TriggerAddAction( gg_trg_Heading, function Trig_Heading_Actions )
endfunction
function Trig_Cant_Get_Ball_Func002001001 takes nothing returns boolean
return ( IsUnitAlly(GetEnumUnit(), Player(0)) == true )
endfunction
function Trig_Cant_Get_Ball_Func002001002 takes nothing returns boolean
return ( udg_ThrowinMode == 2 )
endfunction
function Trig_Cant_Get_Ball_Func002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Cant_Get_Ball_Func002001001(), Trig_Cant_Get_Ball_Func002001002() )
endfunction
function Trig_Cant_Get_Ball_Func002002001 takes nothing returns boolean
return ( IsUnitAlly(GetEnumUnit(), Player(11)) == true )
endfunction
function Trig_Cant_Get_Ball_Func002002002 takes nothing returns boolean
return ( udg_ThrowinMode == 1 )
endfunction
function Trig_Cant_Get_Ball_Func002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Cant_Get_Ball_Func002002001(), Trig_Cant_Get_Ball_Func002002002() )
endfunction
function Trig_Cant_Get_Ball_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Cant_Get_Ball_Func002001(), Trig_Cant_Get_Ball_Func002002() ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Get_Ball_Actions takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), PolarProjectionBJ(GetUnitLoc(udg_Ball), 320.00, AngleBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(GetEnumUnit()))) )
endfunction
//===========================================================================
function InitTrig_Cant_Get_Ball takes nothing returns nothing
set gg_trg_Cant_Get_Ball = CreateTrigger( )
call TriggerAddCondition( gg_trg_Cant_Get_Ball, Condition( function Trig_Cant_Get_Ball_Conditions ) )
call TriggerAddAction( gg_trg_Cant_Get_Ball, function Trig_Cant_Get_Ball_Actions )
endfunction
function Trig_Cant_Get_Ball_in_specific_situation_Conditions takes nothing returns boolean
if ( not ( udg_MapReset == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Get_Ball_in_specific_situation_Actions takes nothing returns nothing
call SetUnitPositionLoc( GetTriggerUnit(), PolarProjectionBJ(GetUnitLoc(udg_Ball), 320.00, AngleBetweenPoints(GetUnitLoc(udg_Ball), GetUnitLoc(GetTriggerUnit()))) )
endfunction
//===========================================================================
function InitTrig_Cant_Get_Ball_in_specific_situation takes nothing returns nothing
set gg_trg_Cant_Get_Ball_in_specific_situation = CreateTrigger( )
call TriggerRegisterUnitInRangeSimple( gg_trg_Cant_Get_Ball_in_specific_situation, 320.00, gg_unit_h000_0001 )
call TriggerAddCondition( gg_trg_Cant_Get_Ball_in_specific_situation, Condition( function Trig_Cant_Get_Ball_in_specific_situation_Conditions ) )
call TriggerAddAction( gg_trg_Cant_Get_Ball_in_specific_situation, function Trig_Cant_Get_Ball_in_specific_situation_Actions )
endfunction
function Trig_Cant_Enter_Leftside_Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_DontShowYouCantEnterThere == false ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Enter_Leftside_Func001Func001Func001C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_LeftArea, udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Enter_Leftside_Func001Func001A takes nothing returns nothing
if ( Trig_Cant_Enter_Leftside_Func001Func001Func001C() ) then
if ( Trig_Cant_Enter_Leftside_Func001Func001Func001Func001C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetEnumPlayer()), "TRIGSTR_158" )
else
endif
call SetUnitPositionLoc( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], Location(GetLocationX(GetRectCenter(gg_rct_Center)), GetLocationY(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]))) )
else
endif
endfunction
function Trig_Cant_Enter_Leftside_Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_DontShowYouCantEnterThere == false ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Enter_Leftside_Func001Func002Func001C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_LeftArea, udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Enter_Leftside_Func001Func002A takes nothing returns nothing
if ( Trig_Cant_Enter_Leftside_Func001Func002Func001C() ) then
if ( Trig_Cant_Enter_Leftside_Func001Func002Func001Func001C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetEnumPlayer()), "TRIGSTR_157" )
else
endif
call SetUnitPositionLoc( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], Location(GetLocationX(GetRectCenter(gg_rct_Center)), GetLocationY(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]))) )
else
endif
endfunction
function Trig_Cant_Enter_Leftside_Func001C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Enter_Leftside_Actions takes nothing returns nothing
if ( Trig_Cant_Enter_Leftside_Func001C() ) then
call ForForce( GetPlayersEnemies(Player(0)), function Trig_Cant_Enter_Leftside_Func001Func002A )
else
call ForForce( GetPlayersEnemies(Player(11)), function Trig_Cant_Enter_Leftside_Func001Func001A )
endif
endfunction
//===========================================================================
function InitTrig_Cant_Enter_Leftside takes nothing returns nothing
set gg_trg_Cant_Enter_Leftside = CreateTrigger( )
call TriggerAddAction( gg_trg_Cant_Enter_Leftside, function Trig_Cant_Enter_Leftside_Actions )
endfunction
function Trig_Cant_Enter_Rightside_Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_DontShowYouCantEnterThere == false ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Enter_Rightside_Func001Func001Func001C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_RightArea, udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Enter_Rightside_Func001Func001A takes nothing returns nothing
if ( Trig_Cant_Enter_Rightside_Func001Func001Func001C() ) then
if ( Trig_Cant_Enter_Rightside_Func001Func001Func001Func001C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetEnumPlayer()), "TRIGSTR_163" )
else
endif
call SetUnitPositionLoc( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], Location(GetLocationX(GetRectCenter(gg_rct_Center)), GetLocationY(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]))) )
else
endif
endfunction
function Trig_Cant_Enter_Rightside_Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_DontShowYouCantEnterThere == false ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Enter_Rightside_Func001Func002Func001C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_RightArea, udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Enter_Rightside_Func001Func002A takes nothing returns nothing
if ( Trig_Cant_Enter_Rightside_Func001Func002Func001C() ) then
if ( Trig_Cant_Enter_Rightside_Func001Func002Func001Func001C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetEnumPlayer()), "TRIGSTR_162" )
else
endif
call SetUnitPositionLoc( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], Location(GetLocationX(GetRectCenter(gg_rct_Center)), GetLocationY(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetEnumPlayer())]))) )
else
endif
endfunction
function Trig_Cant_Enter_Rightside_Func001C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Cant_Enter_Rightside_Actions takes nothing returns nothing
if ( Trig_Cant_Enter_Rightside_Func001C() ) then
call ForForce( GetPlayersEnemies(Player(11)), function Trig_Cant_Enter_Rightside_Func001Func002A )
else
call ForForce( GetPlayersEnemies(Player(0)), function Trig_Cant_Enter_Rightside_Func001Func001A )
endif
endfunction
//===========================================================================
function InitTrig_Cant_Enter_Rightside takes nothing returns nothing
set gg_trg_Cant_Enter_Rightside = CreateTrigger( )
call TriggerAddAction( gg_trg_Cant_Enter_Rightside, function Trig_Cant_Enter_Rightside_Actions )
endfunction
function Trig_Check_Linecross_Conditions takes nothing returns boolean
if ( not ( udg_BallImmuneTimer <= 0 ) ) then
return false
endif
if ( not ( udg_ThrowinMode == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Func003C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_LineBTM, udg_Ball) == true ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Func004C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_LineTOP, udg_Ball) == true ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Func005C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_LineLT, udg_Ball) == true ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Func006C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_LeftTop2, udg_Ball) == true ) ) then
return false
endif
if ( not ( GetUnitFlyHeight(udg_Ball) > 190.00 ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Func007C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_LineLB, udg_Ball) == true ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Func008C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_LeftBottom2, udg_Ball) == true ) ) then
return false
endif
if ( not ( GetUnitFlyHeight(udg_Ball) > 190.00 ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Func009C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_LineRT, udg_Ball) == true ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Func010C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_RightTop2, udg_Ball) == true ) ) then
return false
endif
if ( not ( GetUnitFlyHeight(udg_Ball) > 190.00 ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Func011C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_LineRB, udg_Ball) == true ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Func012C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_RightBottom2, udg_Ball) == true ) ) then
return false
endif
if ( not ( GetUnitFlyHeight(udg_Ball) > 190.00 ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Func013C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_GoalLeft, udg_Ball) == true ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Func014C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_GoalRight, udg_Ball) == true ) ) then
return false
endif
return true
endfunction
function Trig_Check_Linecross_Actions takes nothing returns nothing
if ( Trig_Check_Linecross_Func003C() ) then
call TriggerExecute( gg_trg_Bottom_Line_Crossed )
else
endif
if ( Trig_Check_Linecross_Func004C() ) then
call TriggerExecute( gg_trg_Top_Line_Crossed )
else
endif
if ( Trig_Check_Linecross_Func005C() ) then
call TriggerExecute( gg_trg_Top_Left_Crossed )
else
endif
if ( Trig_Check_Linecross_Func006C() ) then
call TriggerExecute( gg_trg_Top_Left_Crossed )
else
endif
if ( Trig_Check_Linecross_Func007C() ) then
call TriggerExecute( gg_trg_Bottom_Left_Crossed )
else
endif
if ( Trig_Check_Linecross_Func008C() ) then
call TriggerExecute( gg_trg_Bottom_Left_Crossed )
else
endif
if ( Trig_Check_Linecross_Func009C() ) then
call TriggerExecute( gg_trg_Top_Right_Crossed )
else
endif
if ( Trig_Check_Linecross_Func010C() ) then
call TriggerExecute( gg_trg_Top_Right_Crossed )
else
endif
if ( Trig_Check_Linecross_Func011C() ) then
call TriggerExecute( gg_trg_Bottom_Right_Crossed )
else
endif
if ( Trig_Check_Linecross_Func012C() ) then
call TriggerExecute( gg_trg_Bottom_Right_Crossed )
else
endif
if ( Trig_Check_Linecross_Func013C() ) then
call TriggerExecute( gg_trg_Left_Goal )
else
endif
if ( Trig_Check_Linecross_Func014C() ) then
call TriggerExecute( gg_trg_Right_Goal )
else
endif
endfunction
//===========================================================================
function InitTrig_Check_Linecross takes nothing returns nothing
set gg_trg_Check_Linecross = CreateTrigger( )
call TriggerAddCondition( gg_trg_Check_Linecross, Condition( function Trig_Check_Linecross_Conditions ) )
call TriggerAddAction( gg_trg_Check_Linecross, function Trig_Check_Linecross_Actions )
endfunction
function Trig_Linecross_common_events_Func014001003 takes nothing returns boolean
return ( udg_ThrowinMode != 0 )
endfunction
function Trig_Linecross_common_events_Func014A takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Cant_Get_Ball )
endfunction
function Trig_Linecross_common_events_Actions takes nothing returns nothing
set udg_ThrowInWaitTimer = 4
set udg_CantMakeDirectShoot = true
call GroupClear( udg_SlidingUnits )
call ShowUnitHide( udg_Flag )
call PlaySoundFromOffsetBJ( gg_snd_whistle, 100, 0.50 )
call PauseTimerBJ( true, udg_RealTimer )
call SetUnitTimeScalePercent( udg_Ball, 0.00 )
set udg_SpeedDownFactor = 1000000000.00
call TriggerExecute( gg_trg_SpeedDown )
call SetUnitFlyHeightBJ( udg_Ball, udg_BallDefaultHeight, 0.00 )
set udg_BallVY = 0.00
set udg_BallOwner = null
set udg_BallInAir = false
call ForGroupBJ( GetUnitsInRangeOfLocMatching(320.00, GetUnitLoc(udg_Ball), Condition(function Trig_Linecross_common_events_Func014001003)), function Trig_Linecross_common_events_Func014A )
call TriggerExecute( gg_trg_Reduce_MoveSpeed_of_BallOwner )
endfunction
//===========================================================================
function InitTrig_Linecross_common_events takes nothing returns nothing
set gg_trg_Linecross_common_events = CreateTrigger( )
call TriggerAddAction( gg_trg_Linecross_common_events, function Trig_Linecross_common_events_Actions )
endfunction
function Trig_Bottom_Line_Crossed_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(udg_LastOwner, Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Bottom_Line_Crossed_Actions takes nothing returns nothing
if ( Trig_Bottom_Line_Crossed_Func001C() ) then
set udg_ThrowinMode = 2
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_111" )
else
set udg_ThrowinMode = 1
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_110" )
endif
call TriggerExecute( gg_trg_Linecross_common_events )
call SetUnitPositionLoc( udg_Ball, Location(GetLocationX(GetUnitLoc(udg_Ball)), GetLocationY(GetRectCenter(gg_rct_BottomLine))) )
set udg_ThrowinPos = GetUnitLoc(udg_Ball)
endfunction
//===========================================================================
function InitTrig_Bottom_Line_Crossed takes nothing returns nothing
set gg_trg_Bottom_Line_Crossed = CreateTrigger( )
call TriggerAddAction( gg_trg_Bottom_Line_Crossed, function Trig_Bottom_Line_Crossed_Actions )
endfunction
function Trig_Top_Line_Crossed_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(udg_LastOwner, Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Top_Line_Crossed_Actions takes nothing returns nothing
if ( Trig_Top_Line_Crossed_Func001C() ) then
set udg_ThrowinMode = 2
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_113" )
else
set udg_ThrowinMode = 1
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_112" )
endif
call TriggerExecute( gg_trg_Linecross_common_events )
call SetUnitPositionLoc( udg_Ball, Location(GetLocationX(GetUnitLoc(udg_Ball)), GetLocationY(GetRectCenter(gg_rct_TopLine))) )
set udg_ThrowinPos = GetUnitLoc(udg_Ball)
endfunction
//===========================================================================
function InitTrig_Top_Line_Crossed takes nothing returns nothing
set gg_trg_Top_Line_Crossed = CreateTrigger( )
call TriggerAddAction( gg_trg_Top_Line_Crossed, function Trig_Top_Line_Crossed_Actions )
endfunction
function Trig_Top_Left_Crossed_Func002Func002C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Top_Left_Crossed_Func002Func007C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Top_Left_Crossed_Func002Func008001001 takes nothing returns boolean
return ( IsUnitAlly(udg_LastOwner, Player(0)) == true )
endfunction
function Trig_Top_Left_Crossed_Func002Func008001002 takes nothing returns boolean
return ( udg_RoundCheck == 0 )
endfunction
function Trig_Top_Left_Crossed_Func002Func008001 takes nothing returns boolean
return GetBooleanAnd( Trig_Top_Left_Crossed_Func002Func008001001(), Trig_Top_Left_Crossed_Func002Func008001002() )
endfunction
function Trig_Top_Left_Crossed_Func002Func008002001 takes nothing returns boolean
return ( IsUnitAlly(udg_LastOwner, Player(11)) == true )
endfunction
function Trig_Top_Left_Crossed_Func002Func008002002 takes nothing returns boolean
return ( udg_RoundCheck > 0 )
endfunction
function Trig_Top_Left_Crossed_Func002Func008002 takes nothing returns boolean
return GetBooleanAnd( Trig_Top_Left_Crossed_Func002Func008002001(), Trig_Top_Left_Crossed_Func002Func008002002() )
endfunction
function Trig_Top_Left_Crossed_Func002C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Top_Left_Crossed_Func002Func008001(), Trig_Top_Left_Crossed_Func002Func008002() ) ) then
return false
endif
return true
endfunction
function Trig_Top_Left_Crossed_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Linecross_common_events )
if ( Trig_Top_Left_Crossed_Func002C() ) then
// コーナーキック
if ( Trig_Top_Left_Crossed_Func002Func007C() ) then
set udg_ThrowinMode = 2
else
set udg_ThrowinMode = 1
endif
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_123" )
call DisplayTextToForce( GetPlayersAll(), ( udg_RightTeamName + "'s corner kick!" ) )
call SetUnitPositionLoc( udg_Ball, GetRectCenter(gg_rct_CornerLeftTop) )
else
// ゴールキック
if ( Trig_Top_Left_Crossed_Func002Func002C() ) then
set udg_ThrowinMode = 1
else
set udg_ThrowinMode = 2
endif
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_125" )
call DisplayTextToForce( GetPlayersAll(), ( udg_LeftTeamName + "'s goal kick!" ) )
call SetUnitPositionLoc( udg_Ball, GetRectCenter(gg_rct_LeftGoalKick) )
endif
set udg_ThrowinPos = GetUnitLoc(udg_Ball)
endfunction
//===========================================================================
function InitTrig_Top_Left_Crossed takes nothing returns nothing
set gg_trg_Top_Left_Crossed = CreateTrigger( )
call TriggerAddAction( gg_trg_Top_Left_Crossed, function Trig_Top_Left_Crossed_Actions )
endfunction
function Trig_Bottom_Left_Crossed_Func002Func002C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Bottom_Left_Crossed_Func002Func007C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Bottom_Left_Crossed_Func002Func008001001 takes nothing returns boolean
return ( IsUnitAlly(udg_LastOwner, Player(0)) == true )
endfunction
function Trig_Bottom_Left_Crossed_Func002Func008001002 takes nothing returns boolean
return ( udg_RoundCheck == 0 )
endfunction
function Trig_Bottom_Left_Crossed_Func002Func008001 takes nothing returns boolean
return GetBooleanAnd( Trig_Bottom_Left_Crossed_Func002Func008001001(), Trig_Bottom_Left_Crossed_Func002Func008001002() )
endfunction
function Trig_Bottom_Left_Crossed_Func002Func008002001 takes nothing returns boolean
return ( IsUnitAlly(udg_LastOwner, Player(11)) == true )
endfunction
function Trig_Bottom_Left_Crossed_Func002Func008002002 takes nothing returns boolean
return ( udg_RoundCheck > 0 )
endfunction
function Trig_Bottom_Left_Crossed_Func002Func008002 takes nothing returns boolean
return GetBooleanAnd( Trig_Bottom_Left_Crossed_Func002Func008002001(), Trig_Bottom_Left_Crossed_Func002Func008002002() )
endfunction
function Trig_Bottom_Left_Crossed_Func002C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Bottom_Left_Crossed_Func002Func008001(), Trig_Bottom_Left_Crossed_Func002Func008002() ) ) then
return false
endif
return true
endfunction
function Trig_Bottom_Left_Crossed_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Linecross_common_events )
if ( Trig_Bottom_Left_Crossed_Func002C() ) then
// コーナーキック
if ( Trig_Bottom_Left_Crossed_Func002Func007C() ) then
set udg_ThrowinMode = 2
else
set udg_ThrowinMode = 1
endif
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_127" )
call DisplayTextToForce( GetPlayersAll(), ( udg_RightTeamName + "'s corner kick!" ) )
call SetUnitPositionLoc( udg_Ball, GetRectCenter(gg_rct_CornerLeftBottom) )
else
// ゴールキック
if ( Trig_Bottom_Left_Crossed_Func002Func002C() ) then
set udg_ThrowinMode = 1
else
set udg_ThrowinMode = 2
endif
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_126" )
call DisplayTextToForce( GetPlayersAll(), ( udg_LeftTeamName + "'s goal kick!" ) )
call SetUnitPositionLoc( udg_Ball, GetRectCenter(gg_rct_LeftGoalKick) )
endif
set udg_ThrowinPos = GetUnitLoc(udg_Ball)
endfunction
//===========================================================================
function InitTrig_Bottom_Left_Crossed takes nothing returns nothing
set gg_trg_Bottom_Left_Crossed = CreateTrigger( )
call TriggerAddAction( gg_trg_Bottom_Left_Crossed, function Trig_Bottom_Left_Crossed_Actions )
endfunction
function Trig_Top_Right_Crossed_Func002Func001C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Top_Right_Crossed_Func002Func006C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Top_Right_Crossed_Func002Func010001001 takes nothing returns boolean
return ( IsUnitAlly(udg_LastOwner, Player(0)) == true )
endfunction
function Trig_Top_Right_Crossed_Func002Func010001002 takes nothing returns boolean
return ( udg_RoundCheck == 0 )
endfunction
function Trig_Top_Right_Crossed_Func002Func010001 takes nothing returns boolean
return GetBooleanAnd( Trig_Top_Right_Crossed_Func002Func010001001(), Trig_Top_Right_Crossed_Func002Func010001002() )
endfunction
function Trig_Top_Right_Crossed_Func002Func010002001 takes nothing returns boolean
return ( IsUnitAlly(udg_LastOwner, Player(11)) == true )
endfunction
function Trig_Top_Right_Crossed_Func002Func010002002 takes nothing returns boolean
return ( udg_RoundCheck > 0 )
endfunction
function Trig_Top_Right_Crossed_Func002Func010002 takes nothing returns boolean
return GetBooleanAnd( Trig_Top_Right_Crossed_Func002Func010002001(), Trig_Top_Right_Crossed_Func002Func010002002() )
endfunction
function Trig_Top_Right_Crossed_Func002C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Top_Right_Crossed_Func002Func010001(), Trig_Top_Right_Crossed_Func002Func010002() ) ) then
return false
endif
return true
endfunction
function Trig_Top_Right_Crossed_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Linecross_common_events )
if ( Trig_Top_Right_Crossed_Func002C() ) then
if ( Trig_Top_Right_Crossed_Func002Func001C() ) then
set udg_ThrowinMode = 2
else
set udg_ThrowinMode = 1
endif
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_209" )
call DisplayTextToForce( GetPlayersAll(), ( udg_RightTeamName + "'s goal kick!" ) )
call SetUnitPositionLoc( udg_Ball, GetRectCenter(gg_rct_RightGoalKick) )
else
// コーナーキック
if ( Trig_Top_Right_Crossed_Func002Func006C() ) then
set udg_ThrowinMode = 1
else
set udg_ThrowinMode = 2
endif
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_130" )
call DisplayTextToForce( GetPlayersAll(), ( udg_LeftTeamName + "'s corner kick!" ) )
call SetUnitPositionLoc( udg_Ball, GetRectCenter(gg_rct_CornerRightTop) )
endif
set udg_ThrowinPos = GetUnitLoc(udg_Ball)
endfunction
//===========================================================================
function InitTrig_Top_Right_Crossed takes nothing returns nothing
set gg_trg_Top_Right_Crossed = CreateTrigger( )
call TriggerAddAction( gg_trg_Top_Right_Crossed, function Trig_Top_Right_Crossed_Actions )
endfunction
function Trig_Bottom_Right_Crossed_Func002Func001C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Bottom_Right_Crossed_Func002Func006C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Bottom_Right_Crossed_Func002Func011001001 takes nothing returns boolean
return ( IsUnitAlly(udg_LastOwner, Player(0)) == true )
endfunction
function Trig_Bottom_Right_Crossed_Func002Func011001002 takes nothing returns boolean
return ( udg_RoundCheck == 0 )
endfunction
function Trig_Bottom_Right_Crossed_Func002Func011001 takes nothing returns boolean
return GetBooleanAnd( Trig_Bottom_Right_Crossed_Func002Func011001001(), Trig_Bottom_Right_Crossed_Func002Func011001002() )
endfunction
function Trig_Bottom_Right_Crossed_Func002Func011002001 takes nothing returns boolean
return ( IsUnitAlly(udg_LastOwner, Player(11)) == true )
endfunction
function Trig_Bottom_Right_Crossed_Func002Func011002002 takes nothing returns boolean
return ( udg_RoundCheck > 0 )
endfunction
function Trig_Bottom_Right_Crossed_Func002Func011002 takes nothing returns boolean
return GetBooleanAnd( Trig_Bottom_Right_Crossed_Func002Func011002001(), Trig_Bottom_Right_Crossed_Func002Func011002002() )
endfunction
function Trig_Bottom_Right_Crossed_Func002C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Bottom_Right_Crossed_Func002Func011001(), Trig_Bottom_Right_Crossed_Func002Func011002() ) ) then
return false
endif
return true
endfunction
function Trig_Bottom_Right_Crossed_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Linecross_common_events )
if ( Trig_Bottom_Right_Crossed_Func002C() ) then
if ( Trig_Bottom_Right_Crossed_Func002Func001C() ) then
set udg_ThrowinMode = 2
else
set udg_ThrowinMode = 1
endif
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_208" )
call DisplayTextToForce( GetPlayersAll(), ( udg_RightTeamName + "'s goal kick!" ) )
call SetUnitPositionLoc( udg_Ball, GetRectCenter(gg_rct_RightGoalKick) )
else
// コーナーキック
if ( Trig_Bottom_Right_Crossed_Func002Func006C() ) then
set udg_ThrowinMode = 1
else
endif
set udg_ThrowinMode = 2
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_133" )
call DisplayTextToForce( GetPlayersAll(), ( udg_LeftTeamName + "'s corner kick!" ) )
call SetUnitPositionLoc( udg_Ball, GetRectCenter(gg_rct_CornerRightBottom) )
endif
set udg_ThrowinPos = GetUnitLoc(udg_Ball)
endfunction
//===========================================================================
function InitTrig_Bottom_Right_Crossed takes nothing returns nothing
set gg_trg_Bottom_Right_Crossed = CreateTrigger( )
call TriggerAddAction( gg_trg_Bottom_Right_Crossed, function Trig_Bottom_Right_Crossed_Actions )
endfunction
function Trig_Players_Cant_enter_the_post_Conditions takes nothing returns boolean
if ( not ( GetEnteringUnit() == udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] ) ) then
return false
endif
return true
endfunction
function Trig_Players_Cant_enter_the_post_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetEnteringUnit())), "TRIGSTR_249" )
call SetUnitPositionLoc( GetEnteringUnit(), OffsetLocation(PolarProjectionBJ(GetUnitLoc(GetEnteringUnit()), -50.00, GetUnitFacing(GetEnteringUnit())), ( -50.00 * ( GetLocationX(GetUnitLoc(GetEnteringUnit())) / RAbsBJ(GetLocationX(GetUnitLoc(GetEnteringUnit()))) ) ), 0.00) )
endfunction
//===========================================================================
function InitTrig_Players_Cant_enter_the_post takes nothing returns nothing
set gg_trg_Players_Cant_enter_the_post = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPost1 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPost2 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPost3 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPost4 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPostLeft1 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPostLeft2 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPostRight1 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPostRight2 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPostBottom1 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPostBottom2 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPostBottom3 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPostBottom4 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPostTop1 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPostTop2 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPostTop3 )
call TriggerRegisterEnterRectSimple( gg_trg_Players_Cant_enter_the_post, gg_rct_GoalPostTop4 )
call TriggerAddCondition( gg_trg_Players_Cant_enter_the_post, Condition( function Trig_Players_Cant_enter_the_post_Conditions ) )
call TriggerAddAction( gg_trg_Players_Cant_enter_the_post, function Trig_Players_Cant_enter_the_post_Actions )
endfunction
function Trig_Hit_Bars_or_poles_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Reset_Ball_Direction )
call StopSoundBJ( udg_Kick, false )
call PlaySoundOnUnitBJ( udg_Kick, 100, udg_Ball )
set udg_SpeedDownFactor = ( 0.15 * GetUnitMoveSpeed(udg_Ball) )
call TriggerExecute( gg_trg_SpeedDown )
endfunction
//===========================================================================
function InitTrig_Hit_Bars_or_poles takes nothing returns nothing
set gg_trg_Hit_Bars_or_poles = CreateTrigger( )
call TriggerAddAction( gg_trg_Hit_Bars_or_poles, function Trig_Hit_Bars_or_poles_Actions )
endfunction
function Trig_Hit_Goalpost_Conditions takes nothing returns boolean
if ( not ( GetUnitFlyHeight(udg_Ball) <= 150.00 ) ) then
return false
endif
if ( not ( GetEnteringUnit() == udg_Ball ) ) then
return false
endif
return true
endfunction
function Trig_Hit_Goalpost_Actions takes nothing returns nothing
set udg_BallDirection = ( udg_BallDirection + 180.00 )
call TriggerExecute( gg_trg_Hit_Bars_or_poles )
endfunction
//===========================================================================
function InitTrig_Hit_Goalpost takes nothing returns nothing
set gg_trg_Hit_Goalpost = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost, gg_rct_GoalPost1 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost, gg_rct_GoalPost2 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost, gg_rct_GoalPost3 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost, gg_rct_GoalPost4 )
call TriggerAddCondition( gg_trg_Hit_Goalpost, Condition( function Trig_Hit_Goalpost_Conditions ) )
call TriggerAddAction( gg_trg_Hit_Goalpost, function Trig_Hit_Goalpost_Actions )
endfunction
function Trig_Hit_Goalpost_right_left_Conditions takes nothing returns boolean
if ( not ( GetUnitFlyHeight(udg_Ball) <= 150.00 ) ) then
return false
endif
if ( not ( GetEnteringUnit() == udg_Ball ) ) then
return false
endif
return true
endfunction
function Trig_Hit_Goalpost_right_left_Actions takes nothing returns nothing
set udg_BallDirection = ( 180.00 - udg_BallDirection )
call TriggerExecute( gg_trg_Hit_Bars_or_poles )
endfunction
//===========================================================================
function InitTrig_Hit_Goalpost_right_left takes nothing returns nothing
set gg_trg_Hit_Goalpost_right_left = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost_right_left, gg_rct_GoalPostLeft1 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost_right_left, gg_rct_GoalPostLeft2 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost_right_left, gg_rct_GoalPostRight1 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost_right_left, gg_rct_GoalPostRight2 )
call TriggerAddCondition( gg_trg_Hit_Goalpost_right_left, Condition( function Trig_Hit_Goalpost_right_left_Conditions ) )
call TriggerAddAction( gg_trg_Hit_Goalpost_right_left, function Trig_Hit_Goalpost_right_left_Actions )
endfunction
function Trig_Hit_Goalpost_top_bottom_Conditions takes nothing returns boolean
if ( not ( GetUnitFlyHeight(udg_Ball) <= 150.00 ) ) then
return false
endif
if ( not ( GetEnteringUnit() == udg_Ball ) ) then
return false
endif
return true
endfunction
function Trig_Hit_Goalpost_top_bottom_Actions takes nothing returns nothing
set udg_BallDirection = ( 360.00 - udg_BallDirection )
call TriggerExecute( gg_trg_Hit_Bars_or_poles )
endfunction
//===========================================================================
function InitTrig_Hit_Goalpost_top_bottom takes nothing returns nothing
set gg_trg_Hit_Goalpost_top_bottom = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost_top_bottom, gg_rct_GoalPostBottom1 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost_top_bottom, gg_rct_GoalPostBottom2 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost_top_bottom, gg_rct_GoalPostBottom3 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost_top_bottom, gg_rct_GoalPostBottom4 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost_top_bottom, gg_rct_GoalPostTop1 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost_top_bottom, gg_rct_GoalPostTop2 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost_top_bottom, gg_rct_GoalPostTop3 )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Goalpost_top_bottom, gg_rct_GoalPostTop4 )
call TriggerAddCondition( gg_trg_Hit_Goalpost_top_bottom, Condition( function Trig_Hit_Goalpost_top_bottom_Conditions ) )
call TriggerAddAction( gg_trg_Hit_Goalpost_top_bottom, function Trig_Hit_Goalpost_top_bottom_Actions )
endfunction
function Trig_Hit_Bar_High_Conditions takes nothing returns boolean
if ( not ( GetUnitFlyHeight(udg_Ball) >= 190.00 ) ) then
return false
endif
if ( not ( GetUnitFlyHeight(udg_Ball) <= 220.00 ) ) then
return false
endif
if ( not ( GetEnteringUnit() == udg_Ball ) ) then
return false
endif
return true
endfunction
function Trig_Hit_Bar_High_Actions takes nothing returns nothing
set udg_BallDirection = ( 180.00 - udg_BallDirection )
call TriggerExecute( gg_trg_Hit_Bars_or_poles )
endfunction
//===========================================================================
function InitTrig_Hit_Bar_High takes nothing returns nothing
set gg_trg_Hit_Bar_High = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Bar_High, gg_rct_BarLeft )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Bar_High, gg_rct_BarRight )
call TriggerAddCondition( gg_trg_Hit_Bar_High, Condition( function Trig_Hit_Bar_High_Conditions ) )
call TriggerAddAction( gg_trg_Hit_Bar_High, function Trig_Hit_Bar_High_Actions )
endfunction
function Trig_Hit_Bar_Low_Conditions takes nothing returns boolean
if ( not ( GetUnitFlyHeight(udg_Ball) >= 150.00 ) ) then
return false
endif
if ( not ( GetUnitFlyHeight(udg_Ball) <= 190.00 ) ) then
return false
endif
if ( not ( GetEnteringUnit() == udg_Ball ) ) then
return false
endif
return true
endfunction
function Trig_Hit_Bar_Low_Actions takes nothing returns nothing
set udg_BallDirection = ( 180.00 - udg_BallDirection )
call TriggerExecute( gg_trg_Hit_Bars_or_poles )
endfunction
//===========================================================================
function InitTrig_Hit_Bar_Low takes nothing returns nothing
set gg_trg_Hit_Bar_Low = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Bar_Low, gg_rct_BarLeftBTM )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Bar_Low, gg_rct_BarLeftTOP )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Bar_Low, gg_rct_BarRightTOP )
call TriggerRegisterEnterRectSimple( gg_trg_Hit_Bar_Low, gg_rct_BarRightBTM )
call TriggerAddCondition( gg_trg_Hit_Bar_Low, Condition( function Trig_Hit_Bar_Low_Conditions ) )
call TriggerAddAction( gg_trg_Hit_Bar_Low, function Trig_Hit_Bar_Low_Actions )
endfunction
function Trig_Reset_Ball_Direction_Func001C takes nothing returns boolean
if ( not ( udg_BallDirection >= 360.00 ) ) then
return false
endif
return true
endfunction
function Trig_Reset_Ball_Direction_Func002C takes nothing returns boolean
if ( not ( udg_BallDirection < 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Reset_Ball_Direction_Func003Func001C takes nothing returns boolean
if ( not ( udg_BallDirection < 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Reset_Ball_Direction_Func003C takes nothing returns boolean
if ( not ( udg_BallDirection >= 360.00 ) ) then
return false
endif
return true
endfunction
function Trig_Reset_Ball_Direction_Actions takes nothing returns nothing
if ( Trig_Reset_Ball_Direction_Func001C() ) then
set udg_BallDirection = ( udg_BallDirection - 360.00 )
else
endif
if ( Trig_Reset_Ball_Direction_Func002C() ) then
set udg_BallDirection = ( udg_BallDirection + 360.00 )
else
endif
if ( Trig_Reset_Ball_Direction_Func003C() ) then
call TriggerExecute( gg_trg_Reset_Ball_Direction )
else
if ( Trig_Reset_Ball_Direction_Func003Func001C() ) then
call TriggerExecute( gg_trg_Reset_Ball_Direction )
else
endif
endif
endfunction
//===========================================================================
function InitTrig_Reset_Ball_Direction takes nothing returns nothing
set gg_trg_Reset_Ball_Direction = CreateTrigger( )
call TriggerAddAction( gg_trg_Reset_Ball_Direction, function Trig_Reset_Ball_Direction_Actions )
endfunction
function Trig_Left_Goal_Func002C takes nothing returns boolean
if ( not ( udg_CantMakeDirectShoot == true ) ) then
return false
endif
return true
endfunction
function Trig_Left_Goal_Func007Func003001001 takes nothing returns boolean
return ( udg_RoundCheck == 0 )
endfunction
function Trig_Left_Goal_Func007Func003001002 takes nothing returns boolean
return ( IsUnitEnemy(udg_LastOwner, Player(0)) == true )
endfunction
function Trig_Left_Goal_Func007Func003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Left_Goal_Func007Func003001001(), Trig_Left_Goal_Func007Func003001002() )
endfunction
function Trig_Left_Goal_Func007Func003002001 takes nothing returns boolean
return ( udg_RoundCheck != 0 )
endfunction
function Trig_Left_Goal_Func007Func003002002 takes nothing returns boolean
return ( IsUnitEnemy(udg_LastOwner, Player(11)) == true )
endfunction
function Trig_Left_Goal_Func007Func003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Left_Goal_Func007Func003002001(), Trig_Left_Goal_Func007Func003002002() )
endfunction
function Trig_Left_Goal_Func007C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Left_Goal_Func007Func003001(), Trig_Left_Goal_Func007Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Left_Goal_Func008C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Left_Goal_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Timer_Interval_01 )
if ( Trig_Left_Goal_Func002C() ) then
call TriggerExecute( gg_trg_Top_Left_Crossed )
return
else
endif
set udg_DontShowYouCantEnterThere = true
call ClearTextMessagesBJ( GetPlayersAll() )
call DisplayTextToForce( GetPlayersAll(), ( udg_PlayerNames[GetConvertedPlayerId(GetOwningPlayer(udg_LastOwner))] + " made a goal!" ) )
call DisplayTextToForce( GetPlayersAll(), ( udg_RightTeamName + " Scored!" ) )
if ( Trig_Left_Goal_Func007C() ) then
set udg_PlayerScore[GetConvertedPlayerId(GetOwningPlayer(udg_LastOwner))] = ( udg_PlayerScore[GetConvertedPlayerId(GetOwningPlayer(udg_LastOwner))] + 1 )
else
set udg_PlayerScore[GetConvertedPlayerId(GetOwningPlayer(udg_LastOwner))] = ( udg_PlayerScore[GetConvertedPlayerId(GetOwningPlayer(udg_LastOwner))] - 1 )
endif
if ( Trig_Left_Goal_Func008C() ) then
set udg_ThrowinMode = 1
set udg_Score[2] = ( udg_Score[2] + 1 )
else
set udg_ThrowinMode = 2
set udg_Score[1] = ( udg_Score[1] + 1 )
endif
call TriggerExecute( gg_trg_common_actions_after_a_goal )
call PolledWait( 2.00 )
call DisplayTextToForce( GetPlayersAll(), ( udg_LeftTeamName + "'s ball!" ) )
endfunction
//===========================================================================
function InitTrig_Left_Goal takes nothing returns nothing
set gg_trg_Left_Goal = CreateTrigger( )
call TriggerAddAction( gg_trg_Left_Goal, function Trig_Left_Goal_Actions )
endfunction
function Trig_Right_Goal_Func002C takes nothing returns boolean
if ( not ( udg_CantMakeDirectShoot == true ) ) then
return false
endif
return true
endfunction
function Trig_Right_Goal_Func007Func003001001 takes nothing returns boolean
return ( udg_RoundCheck == 0 )
endfunction
function Trig_Right_Goal_Func007Func003001002 takes nothing returns boolean
return ( IsUnitEnemy(udg_LastOwner, Player(11)) == true )
endfunction
function Trig_Right_Goal_Func007Func003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Right_Goal_Func007Func003001001(), Trig_Right_Goal_Func007Func003001002() )
endfunction
function Trig_Right_Goal_Func007Func003002001 takes nothing returns boolean
return ( udg_RoundCheck != 0 )
endfunction
function Trig_Right_Goal_Func007Func003002002 takes nothing returns boolean
return ( IsUnitEnemy(udg_LastOwner, Player(0)) == true )
endfunction
function Trig_Right_Goal_Func007Func003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Right_Goal_Func007Func003002001(), Trig_Right_Goal_Func007Func003002002() )
endfunction
function Trig_Right_Goal_Func007C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Right_Goal_Func007Func003001(), Trig_Right_Goal_Func007Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Right_Goal_Func008C takes nothing returns boolean
if ( not ( udg_RoundCheck == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Right_Goal_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Timer_Interval_01 )
if ( Trig_Right_Goal_Func002C() ) then
call TriggerExecute( gg_trg_Top_Right_Crossed )
return
else
endif
set udg_DontShowYouCantEnterThere = true
call ClearTextMessagesBJ( GetPlayersAll() )
call DisplayTextToForce( GetPlayersAll(), ( udg_PlayerNames[GetConvertedPlayerId(GetOwningPlayer(udg_LastOwner))] + " made a goal!" ) )
call DisplayTextToForce( GetPlayersAll(), ( udg_LeftTeamName + " Scored!" ) )
if ( Trig_Right_Goal_Func007C() ) then
set udg_PlayerScore[GetConvertedPlayerId(GetOwningPlayer(udg_LastOwner))] = ( udg_PlayerScore[GetConvertedPlayerId(GetOwningPlayer(udg_LastOwner))] + 1 )
else
set udg_PlayerScore[GetConvertedPlayerId(GetOwningPlayer(udg_LastOwner))] = ( udg_PlayerScore[GetConvertedPlayerId(GetOwningPlayer(udg_LastOwner))] - 1 )
endif
if ( Trig_Right_Goal_Func008C() ) then
set udg_ThrowinMode = 2
set udg_Score[1] = ( udg_Score[1] + 1 )
else
set udg_ThrowinMode = 1
set udg_Score[2] = ( udg_Score[2] + 1 )
endif
call TriggerExecute( gg_trg_common_actions_after_a_goal )
call PolledWait( 2.00 )
call DisplayTextToForce( GetPlayersAll(), ( udg_RightTeamName + "'s ball!" ) )
endfunction
//===========================================================================
function InitTrig_Right_Goal takes nothing returns nothing
set gg_trg_Right_Goal = CreateTrigger( )
call TriggerAddAction( gg_trg_Right_Goal, function Trig_Right_Goal_Actions )
endfunction
function Trig_common_actions_after_a_goal_Func020Func010001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_common_actions_after_a_goal_Func020Func010A takes nothing returns nothing
call DestroyEffectBJ( udg_SlidingEffect[GetConvertedPlayerId(GetEnumPlayer())] )
call SetUnitFlyHeightBJ( udg_Hero[GetConvertedPlayerId(GetEnumPlayer())], 0.00, 0.00 )
set udg_HeroVX[GetConvertedPlayerId(GetEnumPlayer())] = 0.00
set udg_HeroVY[GetConvertedPlayerId(GetEnumPlayer())] = 0.00
set udg_HeroInAir[GetConvertedPlayerId(GetEnumPlayer())] = false
set udg_HeroSlidingWait[GetConvertedPlayerId(GetEnumPlayer())] = 0
endfunction
function Trig_common_actions_after_a_goal_Func020Func014001002 takes nothing returns boolean
return ( udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetFilterUnit()))] == GetFilterUnit() )
endfunction
function Trig_common_actions_after_a_goal_Func020Func014Func001Func005001001 takes nothing returns boolean
return ( udg_RoundCheck == 0 )
endfunction
function Trig_common_actions_after_a_goal_Func020Func014Func001Func005001002 takes nothing returns boolean
return ( IsUnitAlly(GetEnumUnit(), Player(0)) == true )
endfunction
function Trig_common_actions_after_a_goal_Func020Func014Func001Func005001 takes nothing returns boolean
return GetBooleanAnd( Trig_common_actions_after_a_goal_Func020Func014Func001Func005001001(), Trig_common_actions_after_a_goal_Func020Func014Func001Func005001002() )
endfunction
function Trig_common_actions_after_a_goal_Func020Func014Func001Func005002001 takes nothing returns boolean
return ( udg_RoundCheck != 0 )
endfunction
function Trig_common_actions_after_a_goal_Func020Func014Func001Func005002002 takes nothing returns boolean
return ( IsUnitEnemy(GetEnumUnit(), Player(0)) == true )
endfunction
function Trig_common_actions_after_a_goal_Func020Func014Func001Func005002 takes nothing returns boolean
return GetBooleanAnd( Trig_common_actions_after_a_goal_Func020Func014Func001Func005002001(), Trig_common_actions_after_a_goal_Func020Func014Func001Func005002002() )
endfunction
function Trig_common_actions_after_a_goal_Func020Func014Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_common_actions_after_a_goal_Func020Func014Func001Func005001(), Trig_common_actions_after_a_goal_Func020Func014Func001Func005002() ) ) then
return false
endif
return true
endfunction
function Trig_common_actions_after_a_goal_Func020Func014Func002C takes nothing returns boolean
if ( not ( udg_CameraLock[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_common_actions_after_a_goal_Func020Func014A takes nothing returns nothing
if ( Trig_common_actions_after_a_goal_Func020Func014Func001C() ) then
call SetUnitPositionLoc( GetEnumUnit(), GetRandomLocInRect(gg_rct_LeftTeam_Stay) )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
else
call SetUnitPositionLoc( GetEnumUnit(), GetRandomLocInRect(gg_rct_RightTeam_Stay) )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 0 )
endif
if ( Trig_common_actions_after_a_goal_Func020Func014Func002C() ) then
call SetCameraTargetControllerNoZForPlayer( GetOwningPlayer(GetEnumUnit()), udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))], 0, 0, false )
else
endif
endfunction
function Trig_common_actions_after_a_goal_Func020Func029C takes nothing returns boolean
if ( not ( udg_Score[1] > udg_Score[2] ) ) then
return false
endif
return true
endfunction
function Trig_common_actions_after_a_goal_Func020C takes nothing returns boolean
if ( not ( udg_SuddenDeath == true ) ) then
return false
endif
return true
endfunction
function Trig_common_actions_after_a_goal_Actions takes nothing returns nothing
call ShowUnitShow( udg_Ball )
set udg_CantMakeDirectShoot = true
set udg_MapReset = true
call ShowUnitHide( udg_Flag )
call PlaySoundBJ( gg_snd_GoodJob )
call PlaySoundBJ( gg_snd_whistle )
call PlaySoundBJ( gg_snd_Cheer )
call SetSoundVolumeBJ( GetLastPlayedSound(), 100.00 )
call PauseTimerBJ( true, udg_RealTimer )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 1.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 100.00, 100.00, 100.00, 0.00 )
call PolledWait( 2.00 )
set udg_BallInAir = false
call SetUnitTimeScalePercent( udg_Ball, 0.00 )
call SetUnitFlyHeightBJ( udg_Ball, udg_BallDefaultHeight, 0.00 )
set udg_WhichKeeperHasBall = 0
set udg_KeeperBallHoldTimer = 0
call DestroyEffectBJ( udg_BallInHandEffect )
call ShowUnitShow( udg_Ball )
set udg_BallBound = true
if ( Trig_common_actions_after_a_goal_Func020C() ) then
call DestroyTrigger( gg_trg_Timer_Interval_01 )
call PlaySoundFromOffsetBJ( gg_snd_whistle, 100, 0.85 )
call WaitForSoundBJ( gg_snd_whistle, 0.00 )
call PolledWait( 0.20 )
call PlaySoundFromOffsetBJ( gg_snd_whistle, 100, 0.85 )
call WaitForSoundBJ( gg_snd_whistle, 0.00 )
call PolledWait( 0.20 )
call PlaySoundBJ( gg_snd_whistle )
call WaitForSoundBJ( gg_snd_whistle, 0.00 )
if ( Trig_common_actions_after_a_goal_Func020Func029C() ) then
call TriggerExecute( gg_trg_Humans_Win )
else
call TriggerExecute( gg_trg_Orcs_Win )
endif
else
call GroupClear( udg_SlidingUnits )
call ForForce( GetPlayersMatching(Condition(function Trig_common_actions_after_a_goal_Func020Func010001001)), function Trig_common_actions_after_a_goal_Func020Func010A )
set udg_CantEnterOtherSide = true
call TriggerExecute( gg_trg_Refresh_Leaderboard )
call SetUnitPositionLoc( udg_Ball, GetRectCenter(gg_rct_Center) )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_common_actions_after_a_goal_Func020Func014001002)), function Trig_common_actions_after_a_goal_Func020Func014A )
set udg_ThrowinPos = GetUnitLoc(udg_Ball)
call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 1.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 100.00, 100.00, 100.00, 0.00 )
set udg_BallInAir = false
set udg_BallOwner = null
set udg_CurrentBallSpeed = 0.00
call SetUnitMoveSpeed( udg_Ball, udg_MinimumSpeed )
call IssueImmediateOrder( udg_Ball, "stop" )
set udg_BallVY = 0.00
call PolledWait( 1.00 )
set udg_BallOwner = null
set udg_MapReset = false
set udg_DontShowYouCantEnterThere = false
call EnableTrigger( gg_trg_Timer_Interval_01 )
endif
endfunction
//===========================================================================
function InitTrig_common_actions_after_a_goal takes nothing returns nothing
set gg_trg_common_actions_after_a_goal = CreateTrigger( )
call TriggerAddAction( gg_trg_common_actions_after_a_goal, function Trig_common_actions_after_a_goal_Actions )
endfunction
function Trig_Show_Info_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "Good luck and have fun! Don't forget to select stats!" )
endfunction
function InitTrig_Show_Info takes nothing returns nothing
set gg_trg_Show_Info = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Show_Info, 1.00 )
call TriggerAddAction( gg_trg_Show_Info, function Trig_Show_Info_Actions )
endfunction