include "TriggerLibs/NativeLib"
include "TriggerLibs/HeroesLib_h"
include "TriggerLibs/MapMechanicsLib_h"
include "TriggerLibs/AILib_h"
include "TriggerLibs/UILib_h"
include "TriggerLibs/StartingExperienceLib_h"
include "TriggerLibs/SoundLib_h"
include "TriggerLibs/GameDataHelperLib_h"
include "TriggerLibs/SupportLib_h"
include "TriggerLibs/GameLib_h"
//--------------------------------------------------------------------------------------------------
// Library: Game
//--------------------------------------------------------------------------------------------------
// External Library Initialization
void libGame_InitLibraries () {
libNtve_InitVariables();
libCore_InitVariables();
libMapM_InitVariables();
libAIAI_InitVariables();
libUIUI_InitVariables();
libStEx_InitVariables();
libSond_InitVariables();
libGDHL_InitVariables();
libSprt_InitVariables();
}
// Variable Initialization
bool libGame_InitVariables_completed = false;
void libGame_InitVariables () {
int init_i;
int init_j;
int init_i1;
int init_j1;
int init_i2;
int init_i3;
int init_j3;
if (libGame_InitVariables_completed) {
return;
}
libGame_InitVariables_completed = true;
for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
libGame_gv_teams[init_i].lv_teamPlayerGroup = PlayerGroupEmpty();
libGame_gv_teams[init_i].lv_teamPlayerGroupNoNPCPlayers = PlayerGroupEmpty();
libGame_gv_teams[init_i].lv_multikillTimer = TimerCreate();
libGame_gv_teams[init_i].lv_abandonedTheGameTimer = TimerCreate();
}
libGame_gv_firstBloodAvailable = true;
libGame_gv_teamOrderCoreAlive = true;
libGame_gv_xPTrickleEnabled = true;
for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
libGame_gv_xPTrickleModifier[init_i] = 1.0;
}
libGame_gv_totalTime = TimerCreate();
libGame_gv_gameTimer = TimerCreate();
libGame_gv_matchGameplayTimer = TimerCreate();
libGame_gv_gobalTimer = TimerCreate();
libGame_gv_xPTrickleStartTimer = TimerCreate();
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
libGame_gv_afk_PlayerAfkWarningTimer[init_i] = TimerCreate();
}
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
libGame_gv_afk_PlayerAfkKickTimer[init_i] = TimerCreate();
}
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
libGame_gv_afk_PlayerStartingIdle[init_i] = true;
}
libGame_gv_afk_UseAFKSystem = true;
libGame_gv_announcement_SystemEnabled = true;
for (init_i = 0; init_i <= libCore_gv_bALMaxEnginePlayerCount; init_i += 1) {
libGame_gv_announcementQueue[init_i].lv_messageTimer = TimerCreate();
for (init_i1 = 0; init_i1 <= libGame_gv_announcement_QueueMaxCount_C; init_i1 += 1) {
libGame_gv_announcementQueue[init_i].lv_announcerVOEvent[init_i1] = libCore_ge_AnnouncerVOEvents_Null;
}
for (init_i1 = 0; init_i1 <= libGame_gv_announcement_QueueMaxCount_C; init_i1 += 1) {
libGame_gv_announcementQueue[init_i].lv_animName[init_i1] = "";
}
}
for (init_i = 0; init_i <= libCore_gv_bALMaxEnginePlayerCount; init_i += 1) {
libGame_gv_cameraFollowForced[init_i] = true;
}
for (init_i = 0; init_i <= libGame_gv_capturePointMaxCount_C; init_i += 1) {
libGame_gv_capturePoints[init_i].lv_captureProgressBar = c_invalidDialogControlId;
libGame_gv_capturePoints[init_i].lv_progressBarDimmingFrame = c_invalidDialogControlId;
libGame_gv_capturePoints[init_i].lv_emptyPointDecay = libGame_ge_CapturePointDecay_Owner;
libGame_gv_capturePoints[init_i].lv_contestedPointDecay = libGame_ge_CapturePointDecay_DoNotDecay;
}
libGame_gv_capturePointLastCreatedCapturePointIndex_C = "CapturePointLastCreatedCapturePointIndex";
libGame_gv_towerMapPlaysCoreWarning = true;
libGame_gv_towerMainCoreAlertTimer = TimerCreate();
for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
libGame_gv_towerTeamCoreAlertTimer[init_i] = TimerCreate();
}
for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
libGame_gv_towerTeamCoreAlertCooldownTimer[init_i] = TimerCreate();
}
for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
libGame_gv_towerTeamCoreAlertPing[init_i] = c_invalidPingId;
}
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_MaxEffectBars_C; init_i1 += 1) {
libGame_gv_deathRecap_DeathData[init_i].lv_effectBars[init_i1].lv_debugString = "";
}
}
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
libGame_gv_mVPStats[init_i].lv_role = c_expandedRoleTank;
libGame_gv_mVPStats[init_i].lv_mvpRoles = PlayerGroupEmpty();
}
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
for (init_j = 0; init_j <= libGame_gv_secondaryAwardCount; init_j += 1) {
libGame_gv_playerAwardEligibility[init_i][init_j].lv_awardBadgeIndex = "";
libGame_gv_playerAwardEligibility[init_i][init_j].lv_presentasRatio = true;
libGame_gv_playerAwardEligibility[init_i][init_j].lv_weightModifier = 1.0;
}
}
for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
for (init_j = 0; init_j <= libGame_gv_secondaryAwardCount; init_j += 1) {
libGame_gv_teamAwardTotalValues[init_i][init_j] = 0.01;
}
}
for (init_i = 0; init_i <= libGame_gv_secondaryAwardCount; init_i += 1) {
libGame_gv_initialSecondaryAwardsList[init_i].lv_awardBadgeIndex = "";
libGame_gv_initialSecondaryAwardsList[init_i].lv_presentasRatio = true;
libGame_gv_initialSecondaryAwardsList[init_i].lv_weightModifier = 1.0;
}
for (init_i = 0; init_i <= libGame_gv_secondaryAwardSlotCount; init_i += 1) {
libGame_gv_finalSecondaryAwardsList[init_i].lv_awardBadgeIndex = "";
libGame_gv_finalSecondaryAwardsList[init_i].lv_presentasRatio = true;
libGame_gv_finalSecondaryAwardsList[init_i].lv_weightModifier = 1.0;
}
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
libGame_gv_escapeTrackingHeroReducedtoLowHealthUnitGroup[init_i] = UnitGroupEmpty();
}
libGame_gv_minionSpawnStartTimer = TimerCreate();
libGame_gv_openTheGatesTimer = TimerCreate();
libGame_gv_jungleWatchTowerStartTimer = TimerCreate();
libGame_gv_heroSpawnReady = true;
libGame_gv_gateTimerReady = true;
libGame_gv_randomizeMountsAndSkins = true;
libGame_gv_shufflePickEnabled = true;
libGame_gv_gameOver_CameraPanTime_C = 2.0;
libGame_gv_dEBUG_PercentScalingEnabled = true;
libGame_gv_heroDeathRespawnSetting = libGame_ge_HeroDeathRespawnOptions_NormalRespawn;
libGame_gv_heroDeath_UpdateStats = true;
libGame_gv_heroDeath_RespawnMounted = true;
libGame_gv_heroDeath_RunDeathUIUpdates = true;
libGame_gv_heroDeathMultikillTimerEnabled = true;
for (init_i = 0; init_i <= libCore_gv_bALMaxEnginePlayerCount; init_i += 1) {
for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
libGame_gv_heroDeathKillStingerQueue[init_i].lv_killStingerTimer[init_i1] = TimerCreate();
}
for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
libGame_gv_heroDeathKillStingerQueue[init_i].lv_nextPlayIndex[init_i1] = 1;
}
for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
libGame_gv_heroDeathKillStingerQueue[init_i].lv_soundQueue[init_i1][init_j1] = SoundLink("EditorDefaultSound", -1);
}
}
}
for (init_i = 0; init_i <= libGame_gv_laneMaxCount_C; init_i += 1) {
libGame_gv_laneData[init_i].lv_heroMinChaosWaypointIndex = 1;
for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
libGame_gv_laneData[init_i].lv_minionCompositions[init_i1] = libCore_ge_MinionWaveCompositionsTypes_Standard;
}
for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
libGame_gv_laneData[init_i].lv_bruiserMinionLevel[init_i1] = 1;
}
libGame_gv_laneData[init_i].lv_minionSpawningEnabled = true;
}
for (init_i = 0; init_i <= libCore_gv_bALMaxEnginePlayerCount; init_i += 1) {
libGame_gv_stormMapHeroDeathOverlay[init_i] = c_invalidDialogControlId;
}
libGame_gv_mapFile = GameMapPath();
for (init_i = 0; init_i <= 15; init_i += 1) {
libGame_gv_wheelPingMapping[init_i].lv_action = "";
}
libGame_gv_wheelPingOffsetIndex = UserDataGetInt("TheWheelOfCommand", "[Default]", "PingIndex", 1);
for (init_i = 0; init_i <= 15; init_i += 1) {
libGame_gv_wheelCmdHeroGroup[init_i] = UnitGroupEmpty();
}
libGame_gv_wheelUnitStatus = c_invalidDialogControlId;
libGame_gv_loot_DropBannerInTownHallRubble = true;
libGame_gv_minionSpawningEnabled = true;
for (init_i = 0; init_i <= 2; init_i += 1) {
libGame_gv_minion_CatapultGroup[init_i] = UnitGroupEmpty();
}
libGame_gv_minionScalingEnabled = true;
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
for (init_j = 0; init_j <= libGame_gv_moonwellMaxMoonwellCount; init_j += 1) {
libGame_gv_moonwellTextTags[init_i][init_j] = c_textTagNone;
}
}
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
libGame_gv_moonwellTextTagsUnitGroup[init_i] = UnitGroupEmpty();
}
libGame_gv_townDestructionRemovesCoreInvulnerable = true;
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
libGame_gv_onFireRollingWindowSums[init_i].lv_role = c_expandedRoleTank;
libGame_gv_onFireRollingWindowSums[init_i].lv_mvpRoles = PlayerGroupEmpty();
}
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
libGame_gv_onFireTimer[init_i] = TimerCreate();
}
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
libGame_gv_onFireDeathPenalty[init_i] = 1.0;
}
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
for (init_j = 0; init_j <= libGame_gv_onFireWindowCount; init_j += 1) {
libGame_gv_onFireRollingWindowValues[init_i][init_j].lv_role = c_expandedRoleTank;
libGame_gv_onFireRollingWindowValues[init_i][init_j].lv_mvpRoles = PlayerGroupEmpty();
}
}
libGame_gv_onFireWindowStage = 1;
libGame_gv_onFireEnabled = true;
libGame_gv_onFirePrintingEnabled = true;
for (init_i = 0; init_i <= libCore_gv_bALMaxEnginePlayerCount; init_i += 1) {
libGame_gv_players[init_i].lv_playerStatus = libGame_ge_PlayerStatusStorm_Unused;
libGame_gv_players[init_i].lv_victoryDefeat = c_gameOverTie;
libGame_gv_players[init_i].lv_heroUnitGroup = UnitGroupEmpty();
libGame_gv_players[init_i].lv_summonedUnitGroup = UnitGroupEmpty();
libGame_gv_players[init_i].lv_gravestoneTextTag = c_textTagNone;
libGame_gv_players[init_i].lv_cameraPlayerUnitGroupToFocusOn = UnitGroupEmpty();
libGame_gv_players[init_i].lv_cameraCurrentTargetGroup = UnitGroupEmpty();
libGame_gv_players[init_i].lv_cameraPlayerHasControl = true;
libGame_gv_players[init_i].lv_vOSoundSuffix = "";
libGame_gv_players[init_i].lv_soundDeathAlertPrefix = "UI_HeroDeath_Gen_";
for (init_i3 = 0; init_i3 <= libCore_gv_dataSkinsMaxActorMessageCount; init_i3 += 1) {
libGame_gv_players[init_i].lv_lootContent.lv_loot_Banner.lv_actorMessageArray[init_i3] = "";
}
for (init_i3 = 0; init_i3 <= libCore_gv_dataSkinsMaxActorMessageCount; init_i3 += 1) {
libGame_gv_players[init_i].lv_lootContent.lv_loot_Spray.lv_actorMessageArray[init_i3] = "";
}
libGame_gv_players[init_i].lv_selectedMount = 1;
libGame_gv_players[init_i].lv_selectedSkin = 1;
libGame_gv_players[init_i].lv_respawnTimer = TimerCreate();
libGame_gv_players[init_i].lv_respawnSoundCueTimer = TimerCreate();
libGame_gv_players[init_i].lv_deathToastTimer = TimerCreate();
libGame_gv_players[init_i].lv_recentDamageResetTimer = TimerCreate();
libGame_gv_players[init_i].lv_multikillTimer = TimerCreate();
libGame_gv_players[init_i].lv_bribeChargeStackRequirement = 20;
libGame_gv_players[init_i].lv_bribeTokenLink = "TalentBribeTokenCounter";
libGame_gv_players[init_i].lv_aIHeroDelegateTokenValue = libAIAI_gv_aITeamDelegateHeroTokenValueDefault_C;
libGame_gv_players[init_i].lv_heroSpawnReady = true;
libGame_gv_players[init_i].lv_playerLeftAnnouncementTimer = TimerCreate();
libGame_gv_players[init_i].lv_heroData.lv_role = c_heroRoleWarrior;
libGame_gv_players[init_i].lv_heroData.lv_expandedRole = c_expandedRoleTank;
libGame_gv_players[init_i].lv_heroData.lv_heroRoles = PlayerGroupEmpty();
libGame_gv_players[init_i].lv_heroData.lv_universe = c_heroUniverseWarcraft;
libGame_gv_players[init_i].lv_heroData.lv_gender = c_heroGenderMale;
for (init_i2 = 0; init_i2 <= libCore_gv_dataHeroesMaxAbilitiesPerHero; init_i2 += 1) {
libGame_gv_players[init_i].lv_heroData.lv_abilities[init_i2].lv_isAffectedByOverdrive = true;
}
libGame_gv_players[init_i].lv_heroData.lv_introCutsceneSize = c_heroCutsceneSizeSmall;
for (init_i3 = 0; init_i3 <= libCore_gv_dataHeroesMaxAbilitiesPerHero; init_i3 += 1) {
for (init_j3 = 0; init_j3 <= libCore_gv_dataMaxCatalogChangesPerAbility; init_j3 += 1) {
libGame_gv_players[init_i].lv_heroData.lv_levelUpModificationData.lv_catalog[init_i3][init_j3] = c_gameCatalogUnit;
}
}
for (init_i3 = 0; init_i3 <= libCore_gv_dataHeroesMaxAbilitiesPerHero; init_i3 += 1) {
for (init_j3 = 0; init_j3 <= libCore_gv_dataMaxCatalogChangesPerAbility; init_j3 += 1) {
libGame_gv_players[init_i].lv_heroData.lv_levelUpModificationData.lv_entry[init_i3][init_j3] = "";
}
}
for (init_i3 = 0; init_i3 <= libCore_gv_dataHeroesMaxAbilitiesPerHero; init_i3 += 1) {
for (init_j3 = 0; init_j3 <= libCore_gv_dataMaxCatalogChangesPerAbility; init_j3 += 1) {
libGame_gv_players[init_i].lv_heroData.lv_levelUpModificationData.lv_field[init_i3][init_j3] = "";
}
}
for (init_i3 = 0; init_i3 <= libCore_gv_dataHeroesMaxAbilitiesPerHero; init_i3 += 1) {
for (init_j3 = 0; init_j3 <= libCore_gv_dataMaxCatalogChangesPerAbility; init_j3 += 1) {
libGame_gv_players[init_i].lv_heroData.lv_levelUpModificationData.lv_affectedByAbilityPower[init_i3][init_j3] = true;
}
}
for (init_i3 = 0; init_i3 <= libCore_gv_dataHeroesMaxAbilitiesPerHero; init_i3 += 1) {
for (init_j3 = 0; init_j3 <= libCore_gv_dataMaxCatalogChangesPerAbility; init_j3 += 1) {
libGame_gv_players[init_i].lv_heroData.lv_levelUpModificationData.lv_percentScaled[init_i3][init_j3] = true;
}
}
for (init_i2 = 0; init_i2 <= libCore_gv_data_MaxHeroAllowedMountCategories_C; init_i2 += 1) {
libGame_gv_players[init_i].lv_heroData.lv_allowedMountCategories[init_i2] = "";
}
libGame_gv_players[init_i].lv_heroData.lv_dEBUGPlayable = true;
for (init_i2 = 0; init_i2 <= libCore_gv_dataSkinsMaxActorMessageCount; init_i2 += 1) {
libGame_gv_players[init_i].lv_skinData.lv_actorMessageArray[init_i2] = "";
}
for (init_i2 = 0; init_i2 <= libCore_gv_data_MaxSkinAllowedMountCategories_C; init_i2 += 1) {
libGame_gv_players[init_i].lv_skinData.lv_allowedMountCategories[init_i2] = "";
}
libGame_gv_players[init_i].lv_mountData.lv_mountModel = "HorseMount";
libGame_gv_players[init_i].lv_mountData.lv_mountActor = "MountModel";
libGame_gv_players[init_i].lv_mountData.lv_mountModelScale = 1.0;
libGame_gv_players[init_i].lv_mountData.lv_mountModelWalkAnimMoveSpeed = 4.8;
libGame_gv_players[init_i].lv_mountData.lv_mountPoseAnimGroup = "Ride";
libGame_gv_players[init_i].lv_mountData.lv_mountPoseAnimGroupStatus = "Ride";
for (init_i2 = 0; init_i2 <= libCore_gv_dataMountsMaxActorMessageCount; init_i2 += 1) {
libGame_gv_players[init_i].lv_mountData.lv_actorMessageArray[init_i2] = "";
}
libGame_gv_players[init_i].lv_mountData.lv_category = "";
libGame_gv_players[init_i].lv_altClickPartyFrameAnnouncementUnitGroup = UnitGroupEmpty();
}
libGame_gv_heroes = UnitGroupEmpty();
for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
libGame_gv_players_Heroes_AllTrackedHeroesForTeam[init_i] = UnitGroupEmpty();
}
libGame_gv_scalingTimer = TimerCreate();
libGame_gv_buildingScaling.lv_l2_Tower_Health = 110.0;
libGame_gv_buildingScaling.lv_l2_Tower_Damage = 4.0;
libGame_gv_buildingScaling.lv_l2_TownHall_Health = 330.0;
libGame_gv_buildingScaling.lv_l2_TownHall_Damage = 6.0;
libGame_gv_buildingScaling.lv_l2_Gate_Health = 135.0;
libGame_gv_buildingScaling.lv_l2_Wall_Health = 52.0;
libGame_gv_buildingScaling.lv_l2_HealingFountain_Health = 48.75;
libGame_gv_buildingScaling.lv_l2_HealingFountain_Shields = 16.25;
libGame_gv_buildingScaling.lv_l3_Tower_Health = 220.0;
libGame_gv_buildingScaling.lv_l3_Tower_Damage = 7.5;
libGame_gv_buildingScaling.lv_l3_TownHall_Health = 665.0;
libGame_gv_buildingScaling.lv_l3_TownHall_Damage = 10.0;
libGame_gv_buildingScaling.lv_l3_Gate_Health = 254.0;
libGame_gv_buildingScaling.lv_l3_Wall_Health = 100.0;
libGame_gv_buildingScaling.lv_l3_HealingFountain_Health = 97.5;
libGame_gv_buildingScaling.lv_l3_HealingFountain_Shields = 32.5;
libGame_gv_bALScalingTimerDuration = 60.0;
for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
for (init_j = 0; init_j <= libCore_gv_talents_MaxTiers_C; init_j += 1) {
for (init_i1 = 0; init_i1 <= libCore_gv_talents_MaxTalentsPerTier_C; init_i1 += 1) {
for (init_i2 = 0; init_i2 <= libCore_gv_talents_MaxModificationsPerTalent_C; init_i2 += 1) {
libGame_gv_talents_TalentChoices[init_i][init_j].lv_talentData[init_i1].lv_abilityModificationData[init_i2].lv_changeType = c_talentModificationNone;
libGame_gv_talents_TalentChoices[init_i][init_j].lv_talentData[init_i1].lv_abilityModificationData[init_i2].lv_catalog = c_gameCatalogUnit;
libGame_gv_talents_TalentChoices[init_i][init_j].lv_talentData[init_i1].lv_abilityModificationData[init_i2].lv_entry = "";
libGame_gv_talents_TalentChoices[init_i][init_j].lv_talentData[init_i1].lv_abilityModificationData[init_i2].lv_field = "";
libGame_gv_talents_TalentChoices[init_i][init_j].lv_talentData[init_i1].lv_abilityModificationData[init_i2].lv_stringReplacementValue = "";
libGame_gv_talents_TalentChoices[init_i][init_j].lv_talentData[init_i1].lv_abilityModificationData[init_i2].lv_catalogReplaceFrom = "";
libGame_gv_talents_TalentChoices[init_i][init_j].lv_talentData[init_i1].lv_abilityModificationData[init_i2].lv_catalogChangeTo = "";
}
}
}
}
libGame_gv_talents_PlayChooseATalentSound = true;
for (init_i = 0; init_i <= libGame_gv_townMaxTownCount; init_i += 1) {
libGame_gv_townTownData[init_i].lv_townHallIndex = -1;
}
libGame_gv_townBasicMinimapHealthMontior = true;
libGame_gv_vehicleDragonKnightBullRushLaunchDistance = -30.0;
libGame_gv_vehicleDragonKnightBullRushCutoffDistance = -1.0;
for (init_i = 0; init_i <= libGame_gv_watchTowersMaxCount; init_i += 1) {
libGame_gv_watchTowers[init_i].lv_enabled = true;
}
}
// Presets
string libGame_ge_BehaviorCategoriesStorm_Ident (int lp_val) {
if (lp_val == c_behaviorCategoryPermanent) { return "Permanent"; }
else if (lp_val == c_behaviorCategoryRestorable) { return "ShowUIBar"; }
else if (lp_val == c_behaviorCategoryTemporary) { return "Temporary"; }
else if (lp_val == c_behaviorCategoryTemporaryCloak) { return "TemporaryCloak"; }
else if (lp_val == c_behaviorCategoryInvulnerable) { return "Invulnerable"; }
else if (lp_val == c_behaviorCategorySlow) { return "MovementSpeed"; }
else if (lp_val == c_behaviorCategoryFast) { return "MovementSpeedBuff"; }
else if (lp_val == c_behaviorCategoryStun) { return "Stun"; }
else if (lp_val == c_behaviorCategoryReveal) { return "Revealed"; }
else if (lp_val == c_behaviorCategoryCleansable) { return "Cleansable"; }
else if (lp_val == c_behaviorCategoryProtected) { return "BuffProtected"; }
else if (lp_val == c_behaviorCategoryFear) { return "DebuffFear"; }
else if (lp_val == c_behaviorCategoryQuest) { return "Quest"; }
else if (lp_val == c_behaviorCategoryEvasion) { return "BuffEvasion"; }
else if (lp_val == c_behaviorCategoryTimeStop) { return "TimeStop"; }
else if (lp_val == c_behaviorCategoryHealReduction) { return "DebuffHealReduction"; }
else if (lp_val == c_behaviorCategoryDebuffAbilityPower) { return "DebuffAbilityPower"; }
else if (lp_val == c_behaviorCategoryKnockedOut) { return "KnockedOut"; }
else if (lp_val == c_behaviorCategorySleeping) { return "Sleeping"; }
else if (lp_val == c_behaviorCategoryBuffUnstoppable) { return "Unstoppable"; }
else if (lp_val == c_behaviorCategoryBuffResistant) { return "Resistant"; }
else if (lp_val == c_behaviorCategoryBuffAutoattackDPS) { return "AutoattackDPSBuff"; }
else if (lp_val == c_behaviorCategoryBuffAbilityPower) { return "AbilityPowerBuff"; }
else if (lp_val == c_behaviorCategoryDebuffRoot) { return "Root"; }
else if (lp_val == c_behaviorCategoryDebuffStasis) { return "Stasis"; }
else if (lp_val == c_behaviorCategoryDebuffSilence) { return "Silence"; }
else if (lp_val == c_behaviorCategoryDebuffBlind) { return "Blind"; }
else if (lp_val == c_behaviorCategoryDebuffVulnerable) { return "Vulnerable"; }
else if (lp_val == c_behaviorCategoryDebuffAutoattackDPS) { return "AutoattackDPS"; }
else if (lp_val == c_behaviorCategoryBuffTempMaxHealth) { return "MaxHealthTemporaryBuff"; }
else if (lp_val == c_behaviorCategoryBuffPermanentMaxHealth) { return "MaxHealthPermanentIncrease"; }
else if (lp_val == c_behaviorCategorySpecialDeathState) { return "SpecialDeathState"; }
else if (lp_val == c_behaviorCategoryDamageOverTime) { return "DamageOverTime"; }
else if (lp_val == c_behaviorCategoryPushOrPull) { return "PushorPullEffect"; }
else if (lp_val == c_behaviorCategoryMount) { return "Mount"; }
else if (lp_val == c_behaviorCategoryPersistentCloak) { return "PersistentCloak"; }
else if (lp_val == c_behaviorCategoryUnrevealableCloak) { return "UnrevealableCloak"; }
else if (lp_val == c_behaviorCategoryTaunt) { return "Taunt"; }
else if (lp_val == c_behaviorCategoryPolymorph) { return "Polymorph"; }
else if (lp_val == c_behaviorCategoryMindControl) { return "MindControl"; }
else if (lp_val == c_behaviorCategoryVisionRemoval) { return "VisionRemoval"; }
else if (lp_val == c_behaviorCategoryUnitRemoved) { return "UnitRemoved"; }
else if (lp_val == c_behaviorCategoryPseudoStructure) { return "PseudoStructure"; }
else if (lp_val == c_behaviorCategoryAbsorbing) { return "Absorbing"; }
else if (lp_val == c_behaviorCategoryHideNameplate) { return "HideNameplate"; }
else if (lp_val == c_behaviorCategoryHideStatusFrame) { return "HideStatusFrame"; }
else if (lp_val == c_behaviorCategoryHostileStasisRemoved) { return "HostileStasisRemoved"; }
else if (lp_val == c_behaviorCategoryUnreducible) { return "Unreducible"; }
else if (lp_val == c_behaviorCategoryImmuneToAllyDisplacement) { return "ImmuneToAllyDisplacement"; }
else if (lp_val == c_behaviorCategoryImmuneToEnemyDisplacement) { return "ImmuneToEnemyDisplacement"; }
else if (lp_val == c_behaviorCategoryStackingComboMarker) { return "StackingComboMarker"; }
else if (lp_val == c_behaviorCategoryPreventsMovement) { return "PreventsMovement"; }
else if (lp_val == c_behaviorCategoryPreventsMovement+1) { return "Any"; }
return null;
}
// Functions
playergroup libGame_gf_PlayersOnTeamHeroes (int lp_team, bool lp_nPCOption) {
// Automatic Variable Declarations
// Implementation
if (((lp_team < 1) || (lp_team > 2))) {
TextExpressionSetToken("Param/Expression/lib_Game_5BFD415E", "A", IntToText(lp_team));
UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, TextExpressionAssemble("Param/Expression/lib_Game_5BFD415E"));
return PlayerGroupEmpty();
}
if ((lp_nPCOption == true)) {
return PlayerGroupCopy(libGame_gv_teams[lp_team].lv_teamPlayerGroup);
}
else {
return PlayerGroupCopy(libGame_gv_teams[lp_team].lv_teamPlayerGroupNoNPCPlayers);
}
}
void libGame_gf_SetXPTrickleModifier (fixed lp_modifier) {
// Variable Declarations
int lv_team;
// Automatic Variable Declarations
const int auto3747A5AE_ae = libCore_gv_bALMaxTeams;
const int auto3747A5AE_ai = 1;
// Variable Initialization
// Implementation
lv_team = 1;
for ( ; ( (auto3747A5AE_ai >= 0 && lv_team <= auto3747A5AE_ae) || (auto3747A5AE_ai < 0 && lv_team >= auto3747A5AE_ae) ) ; lv_team += auto3747A5AE_ai ) {
libGame_gv_xPTrickleModifier[lv_team] = lp_modifier;
}
}
trigger auto_libGame_gf_AfkStartAfkWarningSystem_Trigger = null;
bool auto_libGame_gf_AfkStartAfkWarningSystem_lp_instantly;
void libGame_gf_AfkStartAfkWarningSystem (bool lp_instantly) {
auto_libGame_gf_AfkStartAfkWarningSystem_lp_instantly = lp_instantly;
if (auto_libGame_gf_AfkStartAfkWarningSystem_Trigger == null) {
auto_libGame_gf_AfkStartAfkWarningSystem_Trigger = TriggerCreate("auto_libGame_gf_AfkStartAfkWarningSystem_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_AfkStartAfkWarningSystem_Trigger, false, false);
}
bool auto_libGame_gf_AfkStartAfkWarningSystem_TriggerFunc (bool testConds, bool runActions) {
bool lp_instantly = auto_libGame_gf_AfkStartAfkWarningSystem_lp_instantly;
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
const int auto4A9D701E_ae = libCore_gv_bALMaxPlayers;
const int auto4A9D701E_ai = 1;
// Variable Initialization
// Implementation
if ((libGame_gv_afk_DebugOn == false) && (GameIsMatchmade() == false)) {
libGame_gv_afk_AfkDetectionSystemSkipped = true;
return true;
}
if ((libGame_gv_afk_AfkDetectionSystemEnabled == true)) {
return true;
}
libGame_gv_afk_AfkDetectionSystemEnabled = true;
if ((lp_instantly == false)) {
Wait(libGame_gv_afk_AfkInitialTimerStartDelay_C, c_timeGame);
}
TriggerEnable(libGame_gt_AfkCheckPlayerScoreValuesForActivity, true);
TriggerEnable(libGame_gt_AfkPlayerMovementDetection, true);
TriggerEnable(libGame_gt_AfkCheckPlayerMoving, true);
TriggerEnable(libGame_gt_AfkCheckPlayerEnteredVehicle, true);
lv_itPlayer = 1;
for ( ; ( (auto4A9D701E_ai >= 0 && lv_itPlayer <= auto4A9D701E_ae) || (auto4A9D701E_ai < 0 && lv_itPlayer >= auto4A9D701E_ae) ) ; lv_itPlayer += auto4A9D701E_ai ) {
if ((PlayerStatus(lv_itPlayer) == c_playerStatusActive) && (PlayerType(lv_itPlayer) == c_playerTypeUser) && (libGame_gv_players[lv_itPlayer].lv_playerIgnoresAFKSystem == false)) {
TimerStart(libGame_gv_afk_PlayerAfkWarningTimer[lv_itPlayer], libGame_gv_afk_AfkWarningTimerDuration_C, false, c_timeGame);
}
}
return true;
}
void libGame_gf_AfkStopAfkWarningSystem () {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
const int autoE601A7C1_ae = libCore_gv_bALMaxPlayers;
const int autoE601A7C1_ai = 1;
// Variable Initialization
// Implementation
libGame_gv_afk_AfkDetectionSystemEnabled = false;
TriggerEnable(libGame_gt_AfkCheckPlayerScoreValuesForActivity, false);
TriggerEnable(libGame_gt_AfkPlayerMovementDetection, false);
TriggerEnable(libGame_gt_AfkCheckPlayerMoving, false);
TriggerEnable(libGame_gt_AfkCheckPlayerEnteredVehicle, false);
lv_itPlayer = 1;
for ( ; ( (autoE601A7C1_ai >= 0 && lv_itPlayer <= autoE601A7C1_ae) || (autoE601A7C1_ai < 0 && lv_itPlayer >= autoE601A7C1_ae) ) ; lv_itPlayer += autoE601A7C1_ai ) {
libGame_gf_AfkPauseWarningTimerForPlayer(lv_itPlayer, true);
}
}
void libGame_gf_AfkResetWarningTimerForPlayer (int lp_player) {
// Automatic Variable Declarations
// Implementation
if ((((libGame_gv_players[lp_player].lv_isDead == true) && (PlayerHero(lp_player) != "Leoric")) || (libGame_gv_afk_AfkDetectionSystemEnabled == false) || (libGame_gv_players[lp_player].lv_playerIgnoresAFKSystem == true))) {
return ;
}
libGame_gv_afk_PlayerAfkWarning[lp_player] = false;
if ((libGame_gv_afk_UseBrawlAFKSystem == true)) {
TimerStart(libGame_gv_afk_PlayerAfkWarningTimer[lp_player], libGame_gv_afkBrawl_AfkWarningTimerDuration_C, false, c_timeGame);
}
else {
TimerStart(libGame_gv_afk_PlayerAfkWarningTimer[lp_player], libGame_gv_afk_AfkWarningTimerDuration_C, false, c_timeGame);
}
TimerPause(libGame_gv_afk_PlayerAfkKickTimer[lp_player], true);
}
void libGame_gf_AfkPauseWarningTimerForPlayer (int lp_player, bool lp_pauseOption) {
// Automatic Variable Declarations
// Implementation
if ((lp_player <= libCore_gv_bALMaxPlayers) && (lp_player > 0)) {
TimerPause(libGame_gv_afk_PlayerAfkWarningTimer[lp_player], lp_pauseOption);
TimerPause(libGame_gv_afk_PlayerAfkKickTimer[lp_player], lp_pauseOption);
}
}
void libGame_gf_AfkResumeWarningTimerForPlayer (int lp_player) {
// Automatic Variable Declarations
// Implementation
libGame_gf_AfkResetWarningTimerForPlayer(lp_player);
}
void libGame_gf_AfkKickPlayer (int lp_player) {
// Automatic Variable Declarations
// Implementation
if ((libGame_gv_afk_AfkDetectionSystemEnabled == true)) {
if ((PlayerStatus(lp_player) == c_playerStatusActive) && (PlayerType(lp_player) == c_playerTypeUser)) {
TextExpressionSetToken("Param/Expression/lib_Game_9D7B4265", "A", PlayerName(lp_player));
UIDisplayMessage(PlayerGroupAlliance(c_playerGroupAlly, lp_player), c_messageAreaSubtitle, TextExpressionAssemble("Param/Expression/lib_Game_9D7B4265"));
}
KickFromGame(libCore_gv_playerGroupFromPlayer[lp_player]);
}
}
void libGame_gf_AfkResetAltarTimerForPlayer (int lp_player) {
// Automatic Variable Declarations
}
void libGame_gf_AfkResetMapMechanicUnits () {
// Automatic Variable Declarations
}
void libGame_gf_AfkAddMapMechanicUnitToArray (unit lp_mechanicUnit, int lp_regionRadius) {
// Automatic Variable Declarations
}
void libGame_gf_AfkRemoveMapMechanicUnitFromArray (unit lp_mechanicUnit) {
// Automatic Variable Declarations
}
void libGame_gf_AfkResetMapMechanicLocations () {
// Automatic Variable Declarations
}
void libGame_gf_AfkAddMapMechanicLocation (point lp_point) {
// Automatic Variable Declarations
}
trigger auto_libGame_gf_AFKBrawlStartAfkWarningSystem_Trigger = null;
bool auto_libGame_gf_AFKBrawlStartAfkWarningSystem_lp_instantly;
void libGame_gf_AFKBrawlStartAfkWarningSystem (bool lp_instantly) {
auto_libGame_gf_AFKBrawlStartAfkWarningSystem_lp_instantly = lp_instantly;
if (auto_libGame_gf_AFKBrawlStartAfkWarningSystem_Trigger == null) {
auto_libGame_gf_AFKBrawlStartAfkWarningSystem_Trigger = TriggerCreate("auto_libGame_gf_AFKBrawlStartAfkWarningSystem_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_AFKBrawlStartAfkWarningSystem_Trigger, false, false);
}
bool auto_libGame_gf_AFKBrawlStartAfkWarningSystem_TriggerFunc (bool testConds, bool runActions) {
bool lp_instantly = auto_libGame_gf_AFKBrawlStartAfkWarningSystem_lp_instantly;
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
const int autoE9241D6A_ae = libCore_gv_bALMaxPlayers;
const int autoE9241D6A_ai = 1;
// Variable Initialization
// Implementation
if ((libGame_gv_afk_DebugOn == false) && (GameIsMatchmade() == false)) {
return true;
}
if ((libGame_gv_afk_AfkDetectionSystemEnabled == true)) {
return true;
}
libGame_gv_afk_AfkDetectionSystemEnabled = true;
if ((lp_instantly == false)) {
Wait(libGame_gv_afk_AfkInitialTimerStartDelay_C, c_timeGame);
}
libGame_gf_AFKBrawlTurnDetectionTriggersOnOff(true);
lv_itPlayer = 1;
for ( ; ( (autoE9241D6A_ai >= 0 && lv_itPlayer <= autoE9241D6A_ae) || (autoE9241D6A_ai < 0 && lv_itPlayer >= autoE9241D6A_ae) ) ; lv_itPlayer += autoE9241D6A_ai ) {
if ((PlayerStatus(lv_itPlayer) == c_playerStatusActive) && (PlayerType(lv_itPlayer) == c_playerTypeUser) && (libGame_gv_players[lv_itPlayer].lv_playerIgnoresAFKSystem == false)) {
TimerStart(libGame_gv_afk_PlayerAfkWarningTimer[lv_itPlayer], libGame_gv_afkBrawl_AfkWarningTimerDuration_C, false, c_timeGame);
}
}
return true;
}
void libGame_gf_AFKBrawlTurnDetectionTriggersOnOff (bool lp_onOff) {
// Automatic Variable Declarations
// Implementation
TriggerEnable(libGame_gt_AfkPlayerMovementDetection, lp_onOff);
TriggerEnable(libGame_gt_AfkCheckPlayerMoving, lp_onOff);
TriggerEnable(libGame_gt_AfkCheckPlayerScoreValuesForActivity, lp_onOff);
}
void libGame_gf_AFKBrawlPauseWarningTimerForPlayer (int lp_player, bool lp_pauseOption) {
// Automatic Variable Declarations
}
void libGame_gf_AFKBrawlResetWarningTimerForPlayer (int lp_player) {
// Automatic Variable Declarations
}
void libGame_gf_AnnouncementAddItemForPlayerGroup (playergroup lp_playerGroup, int lp_priority, int lp_vOEvent, string lp_animName, text lp_textParam1, text lp_textParam2, text lp_textParam3, text lp_textParam4, string lp_icon, fixed lp_duration, bool lp_isKillAnnouncement) {
// Variable Declarations
int lv_itPlayer;
int lv_itQueuePosition;
int lv_priorityInt;
int lv_desiredPosition;
// Automatic Variable Declarations
playergroup autoE0D6CA2B_g;
int auto52665968_ae;
const int auto52665968_ai = 1;
// Variable Initialization
// Implementation
if ((libGame_gv_announcement_SystemEnabled == false)) {
return ;
}
autoE0D6CA2B_g = lp_playerGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoE0D6CA2B_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if (((lv_itPlayer <= libCore_gv_bALMaxPlayers) || (lv_itPlayer == libCore_gv_oBSERVER_ObserverUIPlayer))) {
if ((libGame_gv_announcementQueue[lv_itPlayer].lv_numberOfItemsInQueue >= libGame_gv_announcement_QueueMaxCount_C)) {
TextExpressionSetToken("Param/Expression/lib_Game_23567997", "A", IntToText(lv_itPlayer));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_23567997"), true);
continue;
}
if ((libMapM_gf_MapMechanicIntroFinished(lv_itPlayer) == false)) {
return ;
}
lv_priorityInt = (lp_priority);
lv_desiredPosition = 0;
if ((libGame_gv_announcementQueue[lv_itPlayer].lv_numberOfItemsInQueue == 0)) {
lv_desiredPosition = 1;
}
else {
auto52665968_ae = libGame_gv_announcementQueue[lv_itPlayer].lv_numberOfItemsInQueue;
lv_itQueuePosition = 1;
for ( ; ( (auto52665968_ai >= 0 && lv_itQueuePosition <= auto52665968_ae) || (auto52665968_ai < 0 && lv_itQueuePosition >= auto52665968_ae) ) ; lv_itQueuePosition += auto52665968_ai ) {
if ((libGame_gv_announcementQueue[lv_itPlayer].lv_priority[lv_itQueuePosition] > lv_priorityInt)) {
lv_desiredPosition = lv_itQueuePosition;
break;
}
}
if ((lv_desiredPosition == 0)) {
lv_desiredPosition = (libGame_gv_announcementQueue[lv_itPlayer].lv_numberOfItemsInQueue + 1);
}
}
libGame_gf_AnnouncementInsertItemIntoQueueForPlayer(lv_itPlayer, lp_priority, lp_vOEvent, lp_animName, lp_textParam1, lp_textParam2, lp_textParam3, lp_textParam4, lp_icon, lp_duration, lv_desiredPosition, lp_isKillAnnouncement);
if ((TimerGetRemaining(libGame_gv_announcementQueue[lv_itPlayer].lv_messageTimer) <= 0.0)) {
libGame_gf_AnnouncementPlayNextItemForPlayer(lv_itPlayer);
}
else {
if ((lp_isKillAnnouncement == true) && (TimerGetRemaining(libGame_gv_announcementQueue[lv_itPlayer].lv_messageTimer) > libGame_gv_announcement_KillAnnouncementTimerThreshold_C)) {
TimerStart(libGame_gv_announcementQueue[lv_itPlayer].lv_messageTimer, libGame_gv_announcement_KillAnnouncementTimerThreshold_C, false, c_timeGame);
}
}
}
}
}
void libGame_gf_AnnouncementClearQueueForPlayer (int lp_player) {
// Variable Declarations
int lv_itAnnouncement;
fixed lv_duration;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
libGame_gv_announcementQueue[lp_player].lv_numberOfItemsInQueue = 0;
}
void libGame_gf_AnnouncementInsertItemIntoQueueForPlayer (int lp_player, int lp_priority, int lp_vOEvent, string lp_animName, text lp_textParam1, text lp_textParam2, text lp_textParam3, text lp_textParam4, string lp_icon, fixed lp_duration, int lp_desiredInsertPosition, bool lp_isKillAnnouncement) {
// Variable Declarations
int lv_itQueuePosition;
int lv_insertPosition;
// Automatic Variable Declarations
int autoE8F74CBA_ae;
const int autoE8F74CBA_ai = -1;
// Variable Initialization
// Implementation
if (((lp_player < 0) || (lp_player > libCore_gv_bALMaxEnginePlayerCount))) {
TextExpressionSetToken("Param/Expression/lib_Game_7F7F0A0F", "A", IntToText(lv_insertPosition));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_7F7F0A0F"), true);
return ;
}
if ((lp_desiredInsertPosition > libGame_gv_announcementQueue[lp_player].lv_numberOfItemsInQueue)) {
if (((libGame_gv_announcementQueue[lp_player].lv_numberOfItemsInQueue + 1) >= 0)) {
libGame_gv_announcementQueue[lp_player].lv_numberOfItemsInQueue += 1;
lv_insertPosition = libGame_gv_announcementQueue[lp_player].lv_numberOfItemsInQueue;
}
else {
TextExpressionSetToken("Param/Expression/lib_Game_903C6722", "A", IntToText(lv_insertPosition));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_903C6722"), true);
return ;
}
}
else {
autoE8F74CBA_ae = lp_desiredInsertPosition;
lv_itQueuePosition = libGame_gv_announcementQueue[lp_player].lv_numberOfItemsInQueue;
for ( ; ( (autoE8F74CBA_ai >= 0 && lv_itQueuePosition <= autoE8F74CBA_ae) || (autoE8F74CBA_ai < 0 && lv_itQueuePosition >= autoE8F74CBA_ae) ) ; lv_itQueuePosition += autoE8F74CBA_ai ) {
libGame_gv_announcementQueue[lp_player].lv_priority[(lv_itQueuePosition + 1)] = libGame_gv_announcementQueue[lp_player].lv_priority[lv_itQueuePosition];
libGame_gv_announcementQueue[lp_player].lv_announcerVOEvent[(lv_itQueuePosition + 1)] = libGame_gv_announcementQueue[lp_player].lv_announcerVOEvent[lv_itQueuePosition];
libGame_gv_announcementQueue[lp_player].lv_animName[(lv_itQueuePosition + 1)] = libGame_gv_announcementQueue[lp_player].lv_animName[lv_itQueuePosition];
libGame_gv_announcementQueue[lp_player].lv_textParam1[(lv_itQueuePosition + 1)] = libGame_gv_announcementQueue[lp_player].lv_textParam1[lv_itQueuePosition];
libGame_gv_announcementQueue[lp_player].lv_textParam2[(lv_itQueuePosition + 1)] = libGame_gv_announcementQueue[lp_player].lv_textParam2[lv_itQueuePosition];
libGame_gv_announcementQueue[lp_player].lv_textParam3[(lv_itQueuePosition + 1)] = libGame_gv_announcementQueue[lp_player].lv_textParam3[lv_itQueuePosition];
libGame_gv_announcementQueue[lp_player].lv_textParam4[(lv_itQueuePosition + 1)] = libGame_gv_announcementQueue[lp_player].lv_textParam4[lv_itQueuePosition];
libGame_gv_announcementQueue[lp_player].lv_icon[(lv_itQueuePosition + 1)] = libGame_gv_announcementQueue[lp_player].lv_icon[lv_itQueuePosition];
libGame_gv_announcementQueue[lp_player].lv_duration[(lv_itQueuePosition + 1)] = libGame_gv_announcementQueue[lp_player].lv_duration[lv_itQueuePosition];
libGame_gv_announcementQueue[lp_player].lv_isKillAnnouncement[(lv_itQueuePosition + 1)] = libGame_gv_announcementQueue[lp_player].lv_isKillAnnouncement[lv_itQueuePosition];
}
libGame_gv_announcementQueue[lp_player].lv_numberOfItemsInQueue += 1;
lv_insertPosition = lp_desiredInsertPosition;
}
libGame_gv_announcementQueue[lp_player].lv_priority[lv_insertPosition] = (lp_priority);
libGame_gv_announcementQueue[lp_player].lv_announcerVOEvent[lv_insertPosition] = lp_vOEvent;
libGame_gv_announcementQueue[lp_player].lv_animName[lv_insertPosition] = lp_animName;
libGame_gv_announcementQueue[lp_player].lv_textParam1[lv_insertPosition] = lp_textParam1;
libGame_gv_announcementQueue[lp_player].lv_textParam2[lv_insertPosition] = lp_textParam2;
libGame_gv_announcementQueue[lp_player].lv_textParam3[lv_insertPosition] = lp_textParam3;
libGame_gv_announcementQueue[lp_player].lv_textParam4[lv_insertPosition] = lp_textParam4;
libGame_gv_announcementQueue[lp_player].lv_icon[lv_insertPosition] = lp_icon;
libGame_gv_announcementQueue[lp_player].lv_duration[lv_insertPosition] = lp_duration;
libGame_gv_announcementQueue[lp_player].lv_isKillAnnouncement[lv_insertPosition] = lp_isKillAnnouncement;
}
void libGame_gf_AnnouncementSetTextOnAnnouncementFrameLabelsForPlayer (int lp_player, string lp_animName, text lp_textParam1, text lp_textParam2, text lp_textParam3, text lp_textParam4, string lp_icon) {
// Automatic Variable Declarations
string auto8A8FE4F2_val;
// Implementation
auto8A8FE4F2_val = lp_animName;
if (auto8A8FE4F2_val == "ShowStandardNotification") {
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_standardNotificationTitle, lp_textParam1, libCore_gv_playerGroupFromPlayer[lp_player]);
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_standardNotificationSubLabel, lp_textParam2, libCore_gv_playerGroupFromPlayer[lp_player]);
}
else if (auto8A8FE4F2_val == "ShowEnemyNotification") {
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_enemyNotificationTitle, lp_textParam1, libCore_gv_playerGroupFromPlayer[lp_player]);
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_enemyNotificationSubLabel, lp_textParam2, libCore_gv_playerGroupFromPlayer[lp_player]);
}
else if (auto8A8FE4F2_val == "ShowTutorialNotification") {
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_tutorialNotificationTitle, lp_textParam1, libCore_gv_playerGroupFromPlayer[lp_player]);
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_tutorialNotificationSubLabel, lp_textParam2, libCore_gv_playerGroupFromPlayer[lp_player]);
}
else if (auto8A8FE4F2_val == "ShowTimedNotification_Tier0") {
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_singleKillNotificationTitle, lp_textParam1, libCore_gv_playerGroupFromPlayer[lp_player]);
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_singleKillNotificationSubLabel, lp_textParam2, libCore_gv_playerGroupFromPlayer[lp_player]);
}
else if (auto8A8FE4F2_val == "ShowTimedNotification_Tier1") {
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_doubleKillNotificationTitle, lp_textParam1, libCore_gv_playerGroupFromPlayer[lp_player]);
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_doubleKillNotificationSubLabel, lp_textParam2, libCore_gv_playerGroupFromPlayer[lp_player]);
}
else if (auto8A8FE4F2_val == "ShowTimedNotification_Tier2") {
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_tripleKillNotificationTitle, lp_textParam1, libCore_gv_playerGroupFromPlayer[lp_player]);
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_tripleKillNotificationSubLabel, lp_textParam2, libCore_gv_playerGroupFromPlayer[lp_player]);
}
else if (auto8A8FE4F2_val == "ShowTimedNotification_Tier3") {
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_quadKillNotificationTitle, lp_textParam1, libCore_gv_playerGroupFromPlayer[lp_player]);
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_quadKillNotificationSubLabel, lp_textParam2, libCore_gv_playerGroupFromPlayer[lp_player]);
}
else if (auto8A8FE4F2_val == "ShowTimedNotification_Tier4") {
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_MegaKillNotificationTitle, lp_textParam1, libCore_gv_playerGroupFromPlayer[lp_player]);
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_MegaKillNotificationSubLabel, lp_textParam2, libCore_gv_playerGroupFromPlayer[lp_player]);
}
else if (auto8A8FE4F2_val == "ShowQuestNotification") {
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_MegaKillNotificationTitle2, lp_textParam1, libCore_gv_playerGroupFromPlayer[lp_player]);
libNtve_gf_SetDialogItemText(libUIUI_gv_notificationDisplay.lv_MegaKillNotificationSubLabel2, lp_textParam2, libCore_gv_playerGroupFromPlayer[lp_player]);
libNtve_gf_SetDialogItemImage(libUIUI_gv_notificationDisplay.lv_MegaKillNotificationSubLabel3, lp_icon, PlayerGroupAll());
}
else {
}
}
void libGame_gf_AnnouncementPlayNextItemForPlayer (int lp_player) {
// Variable Declarations
int lv_itAnnouncement;
fixed lv_duration;
string lv_animName;
// Automatic Variable Declarations
int auto50705A80_ae;
const int auto50705A80_ai = 1;
// Variable Initialization
lv_animName = "";
// Implementation
if ((libGame_gv_announcementQueue[lp_player].lv_numberOfItemsInQueue > 0)) {
lv_duration = libGame_gv_announcementQueue[lp_player].lv_duration[1];
if ((libGame_gv_announcementQueue[lp_player].lv_isKillAnnouncement[1] == true)) {
libSond_gf_HeroVOStartHeroTakedownVOTimerForPlayer(lp_player, (lv_duration + libGame_gv_announcement_HeroTakedownVODelay_C));
}
lv_animName = libGame_gv_announcementQueue[lp_player].lv_animName[1];
if ((lv_animName != "")) {
libGame_gf_AnnouncementSetTextOnAnnouncementFrameLabelsForPlayer(lp_player, lv_animName, libGame_gv_announcementQueue[lp_player].lv_textParam1[1], libGame_gv_announcementQueue[lp_player].lv_textParam2[1], libGame_gv_announcementQueue[lp_player].lv_textParam3[1], libGame_gv_announcementQueue[lp_player].lv_textParam4[1], libGame_gv_announcementQueue[lp_player].lv_icon[1]);
DialogControlSendAnimationEvent(libUIUI_gv_notificationDisplay.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lp_player], lv_animName);
}
if ((libGame_gv_announcementQueue[lp_player].lv_announcerVOEvent[1] != libCore_ge_AnnouncerVOEvents_Null)) {
libSond_gf_SoundAnnouncerVOPlayAnnouncerVOForPlayer(libGame_gv_announcementQueue[lp_player].lv_announcerVOEvent[1], lp_player);
if ((libCore_gv_sYSGameMode == libCore_ge_GameModes_ArenaMode) && (libGame_gv_announcementQueue[lp_player].lv_announcerVOEvent[1] == libCore_ge_AnnouncerVOEvents_KillingSpreeStart)) {
libGame_gf_SendEventArenaModeCrowdKillingSpree(lp_player);
}
else {
if ((libCore_gv_sYSGameMode == libCore_ge_GameModes_ArenaMode) && (libGame_gv_announcementQueue[lp_player].lv_announcerVOEvent[1] == libCore_ge_AnnouncerVOEvents_KillingSpreeUpgrade1Mayhem)) {
libGame_gf_SendEventArenaModeCrowdMayhem(lp_player);
}
else {
if ((libCore_gv_sYSGameMode == libCore_ge_GameModes_ArenaMode) && (libGame_gv_announcementQueue[lp_player].lv_announcerVOEvent[1] == libCore_ge_AnnouncerVOEvents_KillingSpreeUpgrade3HeroOfTheStorm)) {
libGame_gf_SendEventArenaModeCrowdHotS(lp_player);
}
}
}
}
if ((libGame_gv_announcementQueue[lp_player].lv_numberOfItemsInQueue > 1)) {
auto50705A80_ae = (libGame_gv_announcementQueue[lp_player].lv_numberOfItemsInQueue - 1);
lv_itAnnouncement = 1;
for ( ; ( (auto50705A80_ai >= 0 && lv_itAnnouncement <= auto50705A80_ae) || (auto50705A80_ai < 0 && lv_itAnnouncement >= auto50705A80_ae) ) ; lv_itAnnouncement += auto50705A80_ai ) {
libGame_gv_announcementQueue[lp_player].lv_priority[lv_itAnnouncement] = libGame_gv_announcementQueue[lp_player].lv_priority[(lv_itAnnouncement + 1)];
libGame_gv_announcementQueue[lp_player].lv_announcerVOEvent[lv_itAnnouncement] = libGame_gv_announcementQueue[lp_player].lv_announcerVOEvent[(lv_itAnnouncement + 1)];
libGame_gv_announcementQueue[lp_player].lv_animName[lv_itAnnouncement] = libGame_gv_announcementQueue[lp_player].lv_animName[(lv_itAnnouncement + 1)];
libGame_gv_announcementQueue[lp_player].lv_textParam1[lv_itAnnouncement] = libGame_gv_announcementQueue[lp_player].lv_textParam1[(lv_itAnnouncement + 1)];
libGame_gv_announcementQueue[lp_player].lv_textParam2[lv_itAnnouncement] = libGame_gv_announcementQueue[lp_player].lv_textParam2[(lv_itAnnouncement + 1)];
libGame_gv_announcementQueue[lp_player].lv_textParam3[lv_itAnnouncement] = libGame_gv_announcementQueue[lp_player].lv_textParam3[(lv_itAnnouncement + 1)];
libGame_gv_announcementQueue[lp_player].lv_textParam4[lv_itAnnouncement] = libGame_gv_announcementQueue[lp_player].lv_textParam4[(lv_itAnnouncement + 1)];
libGame_gv_announcementQueue[lp_player].lv_icon[lv_itAnnouncement] = libGame_gv_announcementQueue[lp_player].lv_icon[(lv_itAnnouncement + 1)];
libGame_gv_announcementQueue[lp_player].lv_duration[lv_itAnnouncement] = libGame_gv_announcementQueue[lp_player].lv_duration[(lv_itAnnouncement + 1)];
}
}
libGame_gv_announcementQueue[lp_player].lv_numberOfItemsInQueue -= 1;
TimerStart(libGame_gv_announcementQueue[lp_player].lv_messageTimer, lv_duration, false, c_timeGame);
}
}
void libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary (int lp_player, point lp_point, fixed lp_duration, fixed lp_initialVelocity, fixed lp_decelerate, bool lp_smart) {
// Variable Declarations
int lv_itBound;
fixed lv_actualDuration;
// Automatic Variable Declarations
int autoC1BCE068_ae;
const int autoC1BCE068_ai = 1;
// Variable Initialization
// Implementation
lv_actualDuration = lp_duration;
autoC1BCE068_ae = libGame_gv_cameraBound_Count;
lv_itBound = 1;
for ( ; ( (autoC1BCE068_ai >= 0 && lv_itBound <= autoC1BCE068_ae) || (autoC1BCE068_ai < 0 && lv_itBound >= autoC1BCE068_ae) ) ; lv_itBound += autoC1BCE068_ai ) {
if ((RegionContainsPoint(libGame_gv_cameraBound_Regions[lv_itBound], lp_point) == true)) {
if ((libGame_gv_cameraBound_CurrentCameraBoundForPlayer[lp_player] != lv_itBound)) {
libGame_gf_SetCameraBoundStormIndexForPlayer(lp_player, lv_itBound);
lv_actualDuration = 0.0;
}
break;
}
}
CameraPan(lp_player, lp_point, lv_actualDuration, lp_initialVelocity, lp_decelerate, lp_smart);
libGame_gf_SendEventCameraPannedFromScript(lp_player, lp_point);
}
void libGame_gf_CameraTrackNextAliveAllyForPlayer (int lp_player) {
// Variable Declarations
int lv_i;
int lv_playerFaction;
bool lv_valueSet;
// Automatic Variable Declarations
const int autoC0514DC3_ae = libCore_gv_bALMaxPlayers;
const int autoC0514DC3_ai = 1;
int auto52B09AF4_ae;
const int auto52B09AF4_ai = 1;
// Variable Initialization
// Implementation
lv_playerFaction = libGame_gv_players[lp_player].lv_faction;
if ((libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack < libCore_gv_bALMaxPlayers)) {
lv_i = (libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack + 1);
for ( ; ( (autoC0514DC3_ai >= 0 && lv_i <= autoC0514DC3_ae) || (autoC0514DC3_ai < 0 && lv_i >= autoC0514DC3_ae) ) ; lv_i += autoC0514DC3_ai ) {
if ((libGame_gv_players[lv_i].lv_faction == lv_playerFaction) && (libGame_gv_players[lv_i].lv_isDead == false)) {
libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack = lv_i;
lv_valueSet = true;
break;
}
}
}
if ((lv_valueSet == false)) {
auto52B09AF4_ae = libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack;
lv_i = 1;
for ( ; ( (auto52B09AF4_ai >= 0 && lv_i <= auto52B09AF4_ae) || (auto52B09AF4_ai < 0 && lv_i >= auto52B09AF4_ae) ) ; lv_i += auto52B09AF4_ai ) {
if ((libGame_gv_players[lv_i].lv_faction == lv_playerFaction) && (libGame_gv_players[lv_i].lv_isDead == false)) {
libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack = lv_i;
lv_valueSet = true;
break;
}
}
}
if ((lv_valueSet == false)) {
libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack = 0;
}
}
void libGame_gf_CameraTrackPreviousAliveAllyForPlayer (int lp_player) {
// Variable Declarations
int lv_i;
int lv_playerFaction;
bool lv_valueSet;
// Automatic Variable Declarations
const int autoB8719CED_ae = 1;
const int autoB8719CED_ai = -1;
int auto24F24019_ae;
const int auto24F24019_ai = -1;
// Variable Initialization
// Implementation
lv_playerFaction = libGame_gv_players[lp_player].lv_faction;
if ((libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack > 1)) {
lv_i = (libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack - 1);
for ( ; ( (autoB8719CED_ai >= 0 && lv_i <= autoB8719CED_ae) || (autoB8719CED_ai < 0 && lv_i >= autoB8719CED_ae) ) ; lv_i += autoB8719CED_ai ) {
if ((libGame_gv_players[lv_i].lv_faction == lv_playerFaction) && (libGame_gv_players[lv_i].lv_isDead == false)) {
libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack = lv_i;
lv_valueSet = true;
break;
}
}
}
if ((lv_valueSet == false)) {
auto24F24019_ae = libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack;
lv_i = libCore_gv_bALMaxPlayers;
for ( ; ( (auto24F24019_ai >= 0 && lv_i <= auto24F24019_ae) || (auto24F24019_ai < 0 && lv_i >= auto24F24019_ae) ) ; lv_i += auto24F24019_ai ) {
if ((libGame_gv_players[lv_i].lv_faction == lv_playerFaction) && (libGame_gv_players[lv_i].lv_isDead == false)) {
libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack = lv_i;
lv_valueSet = true;
break;
}
}
}
if ((lv_valueSet == false)) {
libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack = 0;
}
}
trigger auto_libGame_gf_CameraUpdateCameraForPlayer_Trigger = null;
int auto_libGame_gf_CameraUpdateCameraForPlayer_lp_player;
void libGame_gf_CameraUpdateCameraForPlayer (int lp_player) {
auto_libGame_gf_CameraUpdateCameraForPlayer_lp_player = lp_player;
if (auto_libGame_gf_CameraUpdateCameraForPlayer_Trigger == null) {
auto_libGame_gf_CameraUpdateCameraForPlayer_Trigger = TriggerCreate("auto_libGame_gf_CameraUpdateCameraForPlayer_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_CameraUpdateCameraForPlayer_Trigger, false, false);
}
bool auto_libGame_gf_CameraUpdateCameraForPlayer_TriggerFunc (bool testConds, bool runActions) {
int lp_player = auto_libGame_gf_CameraUpdateCameraForPlayer_lp_player;
// Variable Declarations
int lv_playerBeingTracked;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_playerBeingTracked = libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack;
if ((libGame_gv_cameraFollowForced[lp_player] == true)) {
libGame_gv_cameraFollowForced[lp_player] = false;
CameraForceFollowUnitGroup(lp_player, false);
}
if ((lp_player == 1) && (libCore_gv_sYSGameMode == libCore_ge_GameModes_Tutorial1Deprecated)) {
libStEx_gf_RestoreTutorialCameraLockSetting();
}
else {
PlayerOptionOverride(lp_player, "camerafollow", null);
}
if ((libGame_gv_players[lp_player].lv_cameraForcedLock == true) && (libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn != null)) {
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn;
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
if (((lp_player != 1) || (libCore_gv_sYSGameMode != libCore_ge_GameModes_Tutorial1Deprecated))) {
PlayerOptionOverride(lp_player, "camerafollow", "1");
}
}
else {
if ((lv_playerBeingTracked != 0) && (libGame_gv_players[lv_playerBeingTracked].lv_cameraPlayerUnitGroupToFocusOn != null)) {
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = libGame_gv_players[lv_playerBeingTracked].lv_cameraPlayerUnitGroupToFocusOn;
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(lp_player, UnitGroupCenterOfGroup(libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup), 0.0, -1, 0.0, false);
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
PlayerOptionOverride(lp_player, "camerafollow", "1");
}
else {
if ((libGame_gv_players[lp_player].lv_isDead == false) && (libGame_gv_players[lp_player].lv_cameraPlayerHasControl == false) && (libGame_gv_players[lp_player].lv_cameraCameraLockInterrupt == false) && (libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn != null)) {
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn;
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(lp_player, UnitGroupCenterOfGroup(libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup), 0.0, -1, 0.0, false);
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
PlayerOptionOverride(lp_player, "camerafollow", "1");
}
else {
if ((libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn == null)) {
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = null;
PlayerOptionOverride(lp_player, "camerafollow", "0");
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
}
else {
if ((UnitHasBehavior2(libGame_gv_players[lp_player].lv_heroUnit, "LeoricUndying") == false) && (libGame_gv_players[lp_player].lv_isDead == true)) {
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn;
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
}
else {
if ((UnitHasBehavior2(libGame_gv_players[lp_player].lv_heroUnit, "LeoricUndying") == true)) {
libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn = libGame_gv_players[lp_player].lv_heroUnitGroup;
}
else {
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn;
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
}
}
}
}
}
}
if ((libGame_gv_players[lp_player].lv_cameraPlayerHasControl == true)) {
CameraLockInput(lp_player, false);
}
else {
CameraLockInput(lp_player, true);
}
return true;
}
int libGame_gf_CameraBoundStormIndex (region lp_bound) {
// Variable Declarations
int lv_itIndex;
// Automatic Variable Declarations
int autoF3AAFE09_ae;
const int autoF3AAFE09_ai = 1;
// Variable Initialization
// Implementation
autoF3AAFE09_ae = libGame_gv_cameraBound_Count;
lv_itIndex = 1;
for ( ; ( (autoF3AAFE09_ai >= 0 && lv_itIndex <= autoF3AAFE09_ae) || (autoF3AAFE09_ai < 0 && lv_itIndex >= autoF3AAFE09_ae) ) ; lv_itIndex += autoF3AAFE09_ai ) {
if ((PointGetX(RegionGetBoundsMax(lp_bound)) == PointGetX(RegionGetBoundsMax(libGame_gv_cameraBound_Regions[lv_itIndex]))) && (PointGetY(RegionGetBoundsMax(lp_bound)) == PointGetY(RegionGetBoundsMax(libGame_gv_cameraBound_Regions[lv_itIndex]))) && (PointGetX(RegionGetBoundsMin(lp_bound)) == PointGetX(RegionGetBoundsMin(libGame_gv_cameraBound_Regions[lv_itIndex]))) && (PointGetY(RegionGetBoundsMin(lp_bound)) == PointGetY(RegionGetBoundsMin(libGame_gv_cameraBound_Regions[lv_itIndex]))) && (PointGetX(RegionGetCenter(lp_bound)) == PointGetX(RegionGetCenter(libGame_gv_cameraBound_Regions[lv_itIndex]))) && (PointGetY(RegionGetCenter(lp_bound)) == PointGetY(RegionGetCenter(libGame_gv_cameraBound_Regions[lv_itIndex])))) {
return lv_itIndex;
}
}
return -1;
}
void libGame_gf_AddCameraBoundsStorm (region lp_bounds) {
// Automatic Variable Declarations
// Implementation
if ((libGame_gv_cameraBound_Count >= libGame_gv_cameraBound_MaxCount_C)) {
TextExpressionSetToken("Param/Expression/lib_Game_3078A309", "A", IntToText(libGame_gv_cameraBound_MaxCount_C));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_3078A309"), true);
return ;
}
libGame_gv_cameraBound_Count += 1;
libGame_gv_cameraBound_Regions[libGame_gv_cameraBound_Count] = lp_bounds;
}
void libGame_gf_SetCameraBoundsStorm (int lp_index, region lp_bounds) {
// Automatic Variable Declarations
// Implementation
if ((lp_index > libGame_gv_cameraBound_Count) && (lp_index < 1)) {
return ;
}
libGame_gv_cameraBound_Regions[lp_index] = lp_bounds;
}
void libGame_gf_SetCameraBoundStormIndexForPlayer (int lp_player, int lp_boundsIndex) {
// Automatic Variable Declarations
// Implementation
libGame_gv_cameraBound_CurrentCameraBoundForPlayer[lp_player] = lp_boundsIndex;
CameraSetBounds(libCore_gv_playerGroupFromPlayer[lp_player], libGame_gv_cameraBound_Regions[lp_boundsIndex], true);
}
void libGame_gf_SetCameraBoundStormForPlayer (int lp_player, region lp_bound) {
// Variable Declarations
int lv_boundsIndex;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_boundsIndex = libGame_gf_CameraBoundStormIndex(lp_bound);
if ((lv_boundsIndex <= 0)) {
libGame_gf_AddCameraBoundsStorm(lp_bound);
lv_boundsIndex = libGame_gv_cameraBound_Count;
}
libGame_gv_cameraBound_CurrentCameraBoundForPlayer[lp_player] = lv_boundsIndex;
CameraSetBounds(libCore_gv_playerGroupFromPlayer[lp_player], lp_bound, true);
}
void libGame_gf_SetCameraBoundStormForObservers (region lp_bound) {
// Variable Declarations
int lv_boundsIndex;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_boundsIndex = libGame_gf_CameraBoundStormIndex(lp_bound);
if ((lv_boundsIndex <= 0)) {
libGame_gf_AddCameraBoundsStorm(lp_bound);
lv_boundsIndex = libGame_gv_cameraBound_Count;
}
libGame_gv_cameraBound_CurrentCameraBoundForPlayer[0] = lv_boundsIndex;
CameraSetBoundsForObservers(lp_bound, true);
}
void libGame_gf_CapturePointChangeOwnership (int lp_capturePointIndex, int lp_newOwner, playergroup lp_capturingPlayers, bool lp_hasMercLordTalent) {
// Variable Declarations
int lv_currentOwner;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_currentOwner = UnitGetOwner(libGame_gv_capturePoints[lp_capturePointIndex].lv_captureBeaconUnit);
if ((lp_newOwner == lv_currentOwner)) {
return ;
}
UnitSetOwner(libGame_gv_capturePoints[lp_capturePointIndex].lv_captureBeaconUnit, lp_newOwner, true);
libGame_gf_SendEventCapturePointChangesOwner(lp_capturePointIndex, lp_newOwner, lp_capturingPlayers, lp_hasMercLordTalent);
}
void libGame_gf_UpdateTimers (int lp_capturePointIndex, playergroup lp_capturingPlayers) {
// Variable Declarations
int lv_itPlayerID;
int lv_itCapturingPlayer;
// Automatic Variable Declarations
playergroup autoDAA194AC_g;
// Variable Initialization
lv_itCapturingPlayer = 1;
// Implementation
autoDAA194AC_g = lp_capturingPlayers;
lv_itCapturingPlayer = -1;
while (true) {
lv_itCapturingPlayer = PlayerGroupNextPlayer(autoDAA194AC_g, lv_itCapturingPlayer);
if (lv_itCapturingPlayer<0) { break; }
if ((lv_itCapturingPlayer > libCore_gv_bALMaxPlayers)) {
continue;
}
libGame_gv_capturePoints[lp_capturePointIndex].lv_timeOnCapturePointForPlayers[lv_itCapturingPlayer] += 0.0625;
libGame_gv_capturePoints[lp_capturePointIndex].lv_timeOnCurrentEnabledCapturePointForPlayers[lv_itCapturingPlayer] += 0.0625;
}
}
void libGame_gf_CapturePointCreate (unit lp_beaconUnit, fixed lp_captureRadius, fixed lp_captureTime, fixed lp_overCaptureTime, int lp_contestedPointDecay, int lp_emptyPointDecay, bool lp_rememberLastOwner) {
// Automatic Variable Declarations
// Implementation
if ((libGame_gv_capturePointCurrentCount == libGame_gv_capturePointMaxCount_C)) {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_29EF6B64"), true);
return ;
}
libGame_gv_capturePointCurrentCount += 1;
libGame_gv_capturePoints[libGame_gv_capturePointCurrentCount].lv_enabled = false;
libGame_gv_capturePoints[libGame_gv_capturePointCurrentCount].lv_captureBeaconUnit = lp_beaconUnit;
libGame_gv_capturePoints[libGame_gv_capturePointCurrentCount].lv_captureRegion = RegionCircle(UnitGetPosition(lp_beaconUnit), lp_captureRadius);
libGame_gv_capturePoints[libGame_gv_capturePointCurrentCount].lv_captureCounter = 0;
libGame_gv_capturePoints[libGame_gv_capturePointCurrentCount].lv_pointsNeededToCapture = FixedToInt((lp_captureTime * 16.0));
libGame_gv_capturePoints[libGame_gv_capturePointCurrentCount].lv_maximumPoints = FixedToInt(((lp_captureTime + lp_overCaptureTime) * 16.0));
libGame_gv_capturePoints[libGame_gv_capturePointCurrentCount].lv_contestedPointDecay = lp_contestedPointDecay;
libGame_gv_capturePoints[libGame_gv_capturePointCurrentCount].lv_emptyPointDecay = lp_emptyPointDecay;
libGame_gv_capturePoints[libGame_gv_capturePointCurrentCount].lv_rememberLastOwner = lp_rememberLastOwner;
DialogControlHookupUnitStatus(c_triggerControlTypeUnitStatusBar, "CaptureProgressBar", lp_beaconUnit);
libNtve_gf_SetDialogItemMaximumValue(DialogControlLastCreated(), (libGame_gv_capturePoints[libGame_gv_capturePointCurrentCount].lv_maximumPoints * 2.0), PlayerGroupAll());
libNtve_gf_SetDialogItemCurrentValue(DialogControlLastCreated(), 0.0, PlayerGroupAll());
libGame_gv_capturePoints[libGame_gv_capturePointCurrentCount].lv_captureProgressBar = DialogControlLastCreated();
DialogControlHookupUnitStatus(c_triggerControlTypeImage, "DimmingFrame", lp_beaconUnit);
libGame_gv_capturePoints[libGame_gv_capturePointCurrentCount].lv_progressBarDimmingFrame = DialogControlLastCreated();
UnitStatusBarOverride(lp_beaconUnit, c_unitStatusGroupAll);
libGame_gf_CapturePointEnable(libGame_gv_capturePointCurrentCount);
if ((TriggerIsEnabled(libGame_gt_CapturePointLogic) == false)) {
TriggerEnable(libGame_gt_CapturePointLogic, true);
}
DataTableSetInt(false, libGame_gv_capturePointLastCreatedCapturePointIndex_C, libGame_gv_capturePointCurrentCount);
}
void libGame_gf_CapturePointEnable (int lp_capturePointIndex) {
// Automatic Variable Declarations
playergroup auto03A0CE2D_g;
int auto03A0CE2D_var;
// Implementation
if (((lp_capturePointIndex > libGame_gv_capturePointCurrentCount) || (libGame_gv_capturePoints[lp_capturePointIndex].lv_enabled == true))) {
return ;
}
libGame_gv_capturePoints[lp_capturePointIndex].lv_enabled = true;
UnitSetOwner(libGame_gv_capturePoints[lp_capturePointIndex].lv_captureBeaconUnit, libCore_gv_cOMPUTER_Neutral, true);
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_capturePoints[lp_capturePointIndex].lv_captureBeaconUnit), "Signal Show");
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_capturePoints[lp_capturePointIndex].lv_captureBeaconUnit), "Signal BeaconCreated");
auto03A0CE2D_g = PlayerGroupActive();
auto03A0CE2D_var = -1;
while (true) {
auto03A0CE2D_var = PlayerGroupNextPlayer(auto03A0CE2D_g, auto03A0CE2D_var);
if (auto03A0CE2D_var<0) { break; }
libGame_gv_capturePoints[lp_capturePointIndex].lv_timeOnCurrentEnabledCapturePointForPlayers[auto03A0CE2D_var] = 0.0;
}
libGame_gv_capturePoints[lp_capturePointIndex].lv_captureCounter = 0;
libGame_gv_capturePoints[lp_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_Neutral;
}
trigger auto_libGame_gf_CapturePointDisable_Trigger = null;
int auto_libGame_gf_CapturePointDisable_lp_capturePointIndex;
void libGame_gf_CapturePointDisable (int lp_capturePointIndex) {
auto_libGame_gf_CapturePointDisable_lp_capturePointIndex = lp_capturePointIndex;
if (auto_libGame_gf_CapturePointDisable_Trigger == null) {
auto_libGame_gf_CapturePointDisable_Trigger = TriggerCreate("auto_libGame_gf_CapturePointDisable_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_CapturePointDisable_Trigger, false, false);
}
bool auto_libGame_gf_CapturePointDisable_TriggerFunc (bool testConds, bool runActions) {
int lp_capturePointIndex = auto_libGame_gf_CapturePointDisable_lp_capturePointIndex;
// Automatic Variable Declarations
// Implementation
if (((lp_capturePointIndex > libGame_gv_capturePointCurrentCount) || (libGame_gv_capturePoints[lp_capturePointIndex].lv_enabled == false))) {
return true;
}
libGame_gv_capturePoints[lp_capturePointIndex].lv_enabled = false;
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_capturePoints[lp_capturePointIndex].lv_captureBeaconUnit), "Signal Hide");
Wait(3.0, c_timeGame);
UnitSetOwner(libGame_gv_capturePoints[lp_capturePointIndex].lv_captureBeaconUnit, libCore_gv_cOMPUTER_Neutral, true);
return true;
}
void libGame_gf_CapturePointSetAlwaysDecay (int lp_index, bool lp_always) {
// Automatic Variable Declarations
// Implementation
libGame_gv_capturePoints[lp_index].lv_alwaysDecay = lp_always;
}
fixed libGame_gf_CapturePointGetCaptureTimeForPlayer (int lp_capturePointIndex, int lp_player) {
// Automatic Variable Declarations
// Implementation
return libGame_gv_capturePoints[lp_capturePointIndex].lv_timeOnCapturePointForPlayers[lp_player];
}
fixed libGame_gf_CapturePointGetCaptureTimeForCurrentEnabledPointForPlayer (int lp_capturePointIndex, int lp_player) {
// Automatic Variable Declarations
// Implementation
return libGame_gv_capturePoints[lp_capturePointIndex].lv_timeOnCurrentEnabledCapturePointForPlayers[lp_player];
}
int libGame_gf_LastCreatedCapturePoint () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, libGame_gv_capturePointLastCreatedCapturePointIndex_C);
}
bool libGame_gf_CapturePointFullyCaptured (int lp_capturePointIndex) {
// Automatic Variable Declarations
// Implementation
if ((lp_capturePointIndex > libGame_gv_capturePointCurrentCount)) {
return false;
}
if (((libGame_gv_capturePoints[lp_capturePointIndex].lv_captureCounter == libGame_gv_capturePoints[lp_capturePointIndex].lv_maximumPoints) || (libGame_gv_capturePoints[lp_capturePointIndex].lv_captureCounter == (libGame_gv_capturePoints[lp_capturePointIndex].lv_maximumPoints * -1)))) {
return true;
}
else {
return false;
}
}
int libGame_gf_CapturePointCounter (int lp_capturePointIndex) {
// Automatic Variable Declarations
// Implementation
if ((lp_capturePointIndex > libGame_gv_capturePointCurrentCount)) {
return 0;
}
return libGame_gv_capturePoints[lp_capturePointIndex].lv_captureCounter;
}
int libGame_gf_CapturePointCounterMax (int lp_capturePointIndex) {
// Automatic Variable Declarations
// Implementation
if ((lp_capturePointIndex > libGame_gv_capturePointCurrentCount)) {
return 0;
}
return libGame_gv_capturePoints[lp_capturePointIndex].lv_pointsNeededToCapture;
}
bool libGame_gf_CapturePointContested (int lp_capturePointIndex) {
// Automatic Variable Declarations
// Implementation
if ((lp_capturePointIndex > libGame_gv_capturePointCurrentCount)) {
return false;
}
if ((libGame_gv_capturePoints[lp_capturePointIndex].lv_capturePointState == libGame_ge_CapturePointState_Contested)) {
return true;
}
return false;
}
void libGame_gf_TowerTurnOnOffCoreWarning (bool lp_onOff) {
// Automatic Variable Declarations
bool auto5AB7CCE4_val;
// Implementation
auto5AB7CCE4_val = lp_onOff;
if (auto5AB7CCE4_val == true) {
libGame_gv_towerMapPlaysCoreWarning = true;
}
else if (auto5AB7CCE4_val == false) {
libGame_gv_towerMapPlaysCoreWarning = false;
}
else {
}
}
void libGame_gf_TowerCreateCoreUnderAttackPing (unit lp_coreUnit, int lp_teamNumber) {
// Variable Declarations
playergroup lv_pingGroup;
// Automatic Variable Declarations
// Variable Initialization
lv_pingGroup = PlayerGroupEmpty();
// Implementation
libNtve_gf_AddPlayerGroupToPlayerGroup(libGame_gv_teams[lp_teamNumber].lv_teamPlayerGroup, lv_pingGroup);
libNtve_gf_AddPlayerGroupToPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], lv_pingGroup);
libCore_gf_CreateMinimapPingStorm(lv_pingGroup, "StormWarning", UnitGetPosition(lp_coreUnit), ColorWithAlpha(0,0,0,0), -1);
libGame_gv_towerTeamCoreAlertPing[lp_teamNumber] = PingLastCreated();
PingSetModel(PingLastCreated(), "StormPingCoreAttack");
PingSetUnit(PingLastCreated(), lp_coreUnit);
PingSetRotation(PingLastCreated(), 270.0);
SoundPlayForPlayer(SoundLink("UI_Game_Ping_CoreUnderAttack_Ally", -1), c_maxPlayers, libGame_gv_teams[lp_teamNumber].lv_teamPlayerGroup, 100.0, 0.0);
}
void libGame_gf_CCRecognitionCCReduction (unit lp_unit, string lp_cCBehavior) {
// Variable Declarations
fixed lv_behaviorDuration;
fixed lv_reducedDuration;
fixed lv_percentReduction;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_behaviorDuration = UnitBehaviorDuration(lp_unit, lp_cCBehavior);
if ((UnitBehaviorCount(lp_unit, "75PercentCCReduction") >= 1)) {
lv_percentReduction = libCore_gv_talents_RelentlessCCReduction75_C;
}
else {
if (((UnitBehaviorCount(lp_unit, "50PercentCCReduction") >= 1) || (UnitBehaviorCount(lp_unit, "BarbarianWrathoftheBerserkerBase") == 1) || ((UnitBehaviorCount(lp_unit, "IllidanMetamorphosis") == 1) && (UnitBehaviorCount(lp_unit, "IllidanMetamorphosisDemonicFormCarryBehavior") == 1)))) {
lv_percentReduction = libCore_gv_talents_RelentlessCCReduction50_C;
}
}
if ((lv_behaviorDuration > 0.0)) {
lv_reducedDuration = (lv_behaviorDuration * (1.0 - MinF(lv_percentReduction, 0.9)));
UnitBehaviorSetDurationRemaining(lp_unit, lp_cCBehavior, lv_reducedDuration);
}
}
void libGame_gf_DeathRecapSpecialCaseEvent (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_DeathRecapSpecialCaseEvent_C);
}
void libGame_gf_SendEventDeathRecapSpecialCaseEvent (int lp_player) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_DeathRecapSpecialCaseEvent_C, libGame_gv_eventParam_DeathRecapSpecialCaseEvent_Player_C), lp_player);
TriggerSendEvent(libGame_gv_eventID_DeathRecapSpecialCaseEvent_C);
}
int libGame_gf_DeathRecapSpecialCasePlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_DeathRecapSpecialCaseEvent_C, libGame_gv_eventParam_DeathRecapSpecialCaseEvent_Player_C));
}
bool libGame_gf_DeathRecapCheckforCombineEvent (int lp_deadPlayer, int lp_currentEffectBarIndex, fixed lp_currentEffectInstanceTime, int lp_effectingPlayer, string lp_effectingUnitType, string lp_effectingSourceButton, bool lp_nPCSource, bool lp_structureSource) {
// Variable Declarations
int lv_priorEffectInstance;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if (((lp_currentEffectInstanceTime - libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lp_currentEffectBarIndex].lv_time) < libGame_gv_deathRecap_MaxEffectCombineTimeElapsed) && (libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lp_currentEffectBarIndex].lv_combinedNumOfEvents < libGame_gv_deathRecap_MaxEffectCombinePerSlot)) {
if ((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lp_currentEffectBarIndex].lv_effectPlayer == lp_effectingPlayer) && (libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lp_currentEffectBarIndex].lv_button == lp_effectingSourceButton) && (((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lp_currentEffectBarIndex].lv_effectPlayer > libCore_gv_bALMaxPlayers) && (libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lp_currentEffectBarIndex].lv_nPCSource == lp_nPCSource) && (libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lp_currentEffectBarIndex].lv_structureSource == lp_structureSource)) || ((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lp_currentEffectBarIndex].lv_effectPlayer <= libCore_gv_bALMaxPlayers) && (libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lp_currentEffectBarIndex].lv_unitType == lp_effectingUnitType)))) {
return true;
}
}
return false;
}
void libGame_gf_DeathRecapAddSpecialDamageEffect (string lp_effectLink) {
// Variable Declarations
int lv_itSpecialDamageEffect;
// Automatic Variable Declarations
const int auto6F0BD316_ae = libGame_gv_deathRecap_SpecialDamageEffectsCount_C;
const int auto6F0BD316_ai = 1;
// Variable Initialization
// Implementation
lv_itSpecialDamageEffect = 1;
for ( ; ( (auto6F0BD316_ai >= 0 && lv_itSpecialDamageEffect <= auto6F0BD316_ae) || (auto6F0BD316_ai < 0 && lv_itSpecialDamageEffect >= auto6F0BD316_ae) ) ; lv_itSpecialDamageEffect += auto6F0BD316_ai ) {
if ((libGame_gv_deathRecap_SpecialDamageEffects[lv_itSpecialDamageEffect].lv_effect == null)) {
libGame_gv_deathRecap_SpecialDamageEffects[lv_itSpecialDamageEffect].lv_effect = lp_effectLink;
return ;
}
}
TextExpressionSetToken("Param/Expression/lib_Game_3AC92B97", "A", StringToText((lp_effectLink)));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_3AC92B97"), true);
}
void libGame_gf_DeathRecapSortMaxDamageAbils (int lp_deadPlayer, int lp_maxDamagerIndex, int lp_currentMaxDamagerAbilIndex) {
// Variable Declarations
int lv_swapIndex;
string lv_swapAbil;
int lv_swapAmount;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if ((lp_currentMaxDamagerAbilIndex <= 1)) {
return ;
}
lv_swapIndex = (lp_currentMaxDamagerAbilIndex - 1);
if ((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lv_swapIndex].lv_amount < libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lp_currentMaxDamagerAbilIndex].lv_amount)) {
lv_swapAbil = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lv_swapIndex].lv_abil;
lv_swapAmount = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lv_swapIndex].lv_amount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lv_swapIndex].lv_abil = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lp_currentMaxDamagerAbilIndex].lv_abil;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lv_swapIndex].lv_amount = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lp_currentMaxDamagerAbilIndex].lv_amount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lp_currentMaxDamagerAbilIndex].lv_abil = lv_swapAbil;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lp_currentMaxDamagerAbilIndex].lv_amount = lv_swapAmount;
}
if ((lv_swapIndex > 1)) {
libGame_gf_DeathRecapSortMaxDamageAbils(lp_deadPlayer, lp_maxDamagerIndex, lv_swapIndex);
}
}
void libGame_gf_DeathRecapSortMaxDamagers (int lp_deadPlayer) {
// Variable Declarations
int lv_swapIndex;
int lv_swapHeroIndex;
int lv_swapAmount;
int lv_swapPlayer;
int lv_swapAbilCount;
string lv_swapAbil;
int lv_swapAbilAmount;
int lv_itAbil;
int lv_itMaxDamagers;
bool lv_sortingComplete;
// Automatic Variable Declarations
int auto41E0A047_ae;
const int auto41E0A047_ai = 1;
const int autoFE660728_ae = libGame_gv_deathRecap_MaxMaxDamageAbils_C;
const int autoFE660728_ai = 1;
// Variable Initialization
lv_sortingComplete = true;
// Implementation
auto41E0A047_ae = (libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagersCount - 1);
lv_itMaxDamagers = 1;
for ( ; ( (auto41E0A047_ai >= 0 && lv_itMaxDamagers <= auto41E0A047_ae) || (auto41E0A047_ai < 0 && lv_itMaxDamagers >= auto41E0A047_ae) ) ; lv_itMaxDamagers += auto41E0A047_ai ) {
lv_swapIndex = (lv_itMaxDamagers + 1);
if ((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_amount < libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[(lv_itMaxDamagers + 1)].lv_amount)) {
lv_sortingComplete = false;
lv_swapHeroIndex = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_swapIndex].lv_heroIndex;
lv_swapAmount = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_swapIndex].lv_amount;
lv_swapPlayer = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_swapIndex].lv_player;
lv_swapAbilCount = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_swapIndex].lv_maxDamageAbilCount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_swapIndex].lv_heroIndex = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_heroIndex;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_swapIndex].lv_amount = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_amount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_swapIndex].lv_player = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_player;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_swapIndex].lv_maxDamageAbilCount = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_maxDamageAbilCount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_heroIndex = lv_swapHeroIndex;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_amount = lv_swapAmount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_player = lv_swapPlayer;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_maxDamageAbilCount = lv_swapAbilCount;
lv_itAbil = 1;
for ( ; ( (autoFE660728_ai >= 0 && lv_itAbil <= autoFE660728_ae) || (autoFE660728_ai < 0 && lv_itAbil >= autoFE660728_ae) ) ; lv_itAbil += autoFE660728_ai ) {
lv_swapAbil = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_swapIndex].lv_maxDamageAbils[lv_itAbil].lv_abil;
lv_swapAbilAmount = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_swapIndex].lv_maxDamageAbils[lv_itAbil].lv_amount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_swapIndex].lv_maxDamageAbils[lv_itAbil].lv_amount = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_maxDamageAbils[lv_itAbil].lv_amount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_swapIndex].lv_maxDamageAbils[lv_itAbil].lv_abil = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_maxDamageAbils[lv_itAbil].lv_abil;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_maxDamageAbils[lv_itAbil].lv_amount = lv_swapAbilAmount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagers].lv_maxDamageAbils[lv_itAbil].lv_abil = lv_swapAbil;
}
}
}
if ((lv_sortingComplete == false)) {
libGame_gf_DeathRecapSortMaxDamagers(lp_deadPlayer);
}
else {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagersCount = MinI(libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagersCount, libGame_gv_deathRecap_MaxMaxDamagers_C);
}
}
void libGame_gf_DeathRecapAddMaxDamageAbilForPlayer (int lp_deadPlayer, int lp_maxDamagerIndex, string lp_effectingAbility, int lp_effectAmount) {
// Variable Declarations
int lv_effectingPlayer;
int lv_itMaxDamagerAbilndex;
// Automatic Variable Declarations
const int auto1C70E655_ae = libGame_gv_deathRecap_MaxMaxDamageAbilsSort_C;
const int auto1C70E655_ai = 1;
// Variable Initialization
// Implementation
lv_itMaxDamagerAbilndex = 1;
for ( ; ( (auto1C70E655_ai >= 0 && lv_itMaxDamagerAbilndex <= auto1C70E655_ae) || (auto1C70E655_ai < 0 && lv_itMaxDamagerAbilndex >= auto1C70E655_ae) ) ; lv_itMaxDamagerAbilndex += auto1C70E655_ai ) {
if ((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lv_itMaxDamagerAbilndex].lv_abil != null)) {
if ((lp_effectingAbility == libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lv_itMaxDamagerAbilndex].lv_abil)) {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lv_itMaxDamagerAbilndex].lv_amount += lp_effectAmount;
break;
}
}
else {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lv_itMaxDamagerAbilndex].lv_abil = lp_effectingAbility;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbils[lv_itMaxDamagerAbilndex].lv_amount += lp_effectAmount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbilCount += 1;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbilCount = MinI(libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lp_maxDamagerIndex].lv_maxDamageAbilCount, libGame_gv_deathRecap_MaxMaxDamageAbils_C);
break;
}
}
libGame_gf_DeathRecapSortMaxDamageAbils(lp_deadPlayer, lp_maxDamagerIndex, lv_itMaxDamagerAbilndex);
}
void libGame_gf_DeathRecapAddEffectInstanceForPlayer (int lp_deadPlayer, string lp_effect, int lp_effectingPlayer, string lp_effectingAbility, string lp_effectingUnitType, int lp_effectAmount, int lp_effectAmountAttempted, int lp_effectAmountShielded, bool lp_effectIsHeal, fixed lp_effectTime, string lp_debugString, string lp_sourceButton) {
// Variable Declarations
int lv_effectingPlayer;
int lv_effectHeroIndex;
int lv_effectEventTimeIndex;
bool lv_nPCPlayer;
bool lv_structureSource;
int lv_itEffect;
int lv_itMaxDamagerIndex;
int lv_postEffectHealth;
int lv_overkillOverride;
// Automatic Variable Declarations
int auto11913262_ae;
const int auto11913262_ai = 1;
const int auto8D5FBFE5_ae = libGame_gv_deathRecap_MaxMaxDamagersSort_C;
const int auto8D5FBFE5_ai = 1;
// Variable Initialization
// Implementation
if ((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectEventCount <= 0) && (lp_effectIsHeal == true)) {
return ;
}
if (((UnitGetType(libGame_gv_players[lp_deadPlayer].lv_heroUnit) == "HeroDVaPilot") || (UnitGetType(libGame_gv_players[lp_deadPlayer].lv_heroUnit) == "HeroUther") || (UnitGetType(libGame_gv_players[lp_deadPlayer].lv_heroUnit) == "HeroTyrael") || (UnitGetType(libGame_gv_players[lp_deadPlayer].lv_heroUnit) == "HeroLeoric"))) {
lv_overkillOverride = PlayerScoreValueGetAsInt(lp_deadPlayer, "DeadHeroDamagePreventedByAbsorb");
}
else {
lv_overkillOverride = 0;
}
lv_effectingPlayer = lp_effectingPlayer;
if ((lv_effectingPlayer >= 1) && (lv_effectingPlayer <= libCore_gv_bALMaxPlayers)) {
lv_effectHeroIndex = libGame_gv_players[lv_effectingPlayer].lv_heroIndex;
}
else {
lv_effectHeroIndex = libCore_gf_GetIndexFromHero("_Empty");
lv_nPCPlayer = true;
lv_structureSource = UnitTypeTestAttribute(lp_effectingUnitType, c_unitAttributeStructure);
}
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectEventCount += 1;
if ((libGame_gf_DeathRecapCheckforCombineEvent(lp_deadPlayer, libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBarCount, lp_effectTime, lv_effectingPlayer, lp_effectingUnitType, lp_sourceButton, lv_nPCPlayer, lv_structureSource) == true)) {
lv_effectEventTimeIndex = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBarCount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_amountShielded += lp_effectAmountShielded;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_amount += lp_effectAmount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_postEffectHealth = 0;
}
else {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBarCount += 1;
lv_effectEventTimeIndex = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBarCount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_effect = lp_effect;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_effectPlayer = lv_effectingPlayer;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_heroIndex = lv_effectHeroIndex;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_isHeal = lp_effectIsHeal;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_nPCSource = lv_nPCPlayer;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_structureSource = lv_structureSource;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_amount = lp_effectAmount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_amountAttempted = lp_effectAmountAttempted;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_amountShielded = lp_effectAmountShielded;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_amountOverkill = ((lp_effectAmountAttempted - (lp_effectAmount + lp_effectAmountShielded)) + lv_overkillOverride);
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_abilityLink = lp_effectingAbility;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_button = lp_sourceButton;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_unitType = (CatalogFieldValueGet(c_gameCatalogUnit, lp_effectingUnitType, "LeaderAlias", 0));
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_time = lp_effectTime;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_debugString = lp_debugString;
}
auto11913262_ae = (lv_effectEventTimeIndex - 1);
lv_itEffect = 1;
for ( ; ( (auto11913262_ai >= 0 && lv_itEffect <= auto11913262_ae) || (auto11913262_ai < 0 && lv_itEffect >= auto11913262_ae) ) ; lv_itEffect += auto11913262_ai ) {
if ((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itEffect].lv_isHeal == true)) {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_postEffectHealth -= libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itEffect].lv_amount;
}
else {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_postEffectHealth += libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itEffect].lv_amount;
}
}
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_combinedNumOfEvents += 1;
if ((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_isHeal == true)) {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_deadHeroStartHealth -= lp_effectAmount;
}
else {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_deadHeroStartHealth += lp_effectAmount;
}
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_deadHeroHighestHealth = MaxI(libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_deadHeroStartHealth, libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_deadHeroHighestHealth);
if ((lp_effectIsHeal == false)) {
lv_itMaxDamagerIndex = 1;
for ( ; ( (auto8D5FBFE5_ai >= 0 && lv_itMaxDamagerIndex <= auto8D5FBFE5_ae) || (auto8D5FBFE5_ai < 0 && lv_itMaxDamagerIndex >= auto8D5FBFE5_ae) ) ; lv_itMaxDamagerIndex += auto8D5FBFE5_ai ) {
if ((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagerIndex].lv_player != 0)) {
if ((lv_effectHeroIndex == libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagerIndex].lv_heroIndex)) {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagerIndex].lv_amount += lp_effectAmount;
break;
}
}
else {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagerIndex].lv_player = libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_effectPlayer;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagerIndex].lv_heroIndex = lv_effectHeroIndex;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagerIndex].lv_amount += lp_effectAmount;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagersCount += 1;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamagerIndex].lv_heroIndex = lv_effectHeroIndex;
break;
}
}
libGame_gf_DeathRecapAddMaxDamageAbilForPlayer(lp_deadPlayer, lv_itMaxDamagerIndex, lp_sourceButton, lp_effectAmount);
}
TextExpressionSetToken("Param/Expression/lib_Game_85A0B12E", "A", IntToText(lv_effectHeroIndex));
TextExpressionSetToken("Param/Expression/lib_Game_85A0B12E", "B", libNtve_gf_ConvertBooleanToText(lv_nPCPlayer));
TextExpressionSetToken("Param/Expression/lib_Game_85A0B12E", "C", libNtve_gf_ConvertBooleanToText(lp_effectIsHeal));
TextExpressionSetToken("Param/Expression/lib_Game_85A0B12E", "D", IntToText(lp_effectAmount));
TextExpressionSetToken("Param/Expression/lib_Game_85A0B12E", "E", StringToText((lp_effectingAbility)));
TextExpressionSetToken("Param/Expression/lib_Game_85A0B12E", "F", StringToText((lp_effectingUnitType)));
TextExpressionSetToken("Param/Expression/lib_Game_85A0B12E", "G", IntToText(lv_effectEventTimeIndex));
TextExpressionSetToken("Param/Expression/lib_Game_85A0B12E", "H", IntToText(libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_effectEventTimeIndex].lv_postEffectHealth));
TextExpressionSetToken("Param/Expression/lib_Game_85A0B12E", "I", FixedToText(lp_effectTime, c_fixedPrecisionAny));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_85A0B12E"), false);
}
void libGame_gf_DeathRecapClearDeathRecapForPlayer (int lp_deadPlayer) {
// Variable Declarations
int lv_itTimeIndex;
int lv_itMaxDamager;
int lv_itMaxDamagerAbil;
// Automatic Variable Declarations
const int autoA7969482_ae = libGame_gv_deathRecap_MaxEffectBars_C;
const int autoA7969482_ai = 1;
const int auto6B904343_ae = libGame_gv_deathRecap_MaxMaxDamagersSort_C;
const int auto6B904343_ai = 1;
const int auto103F126C_ae = libGame_gv_deathRecap_MaxMaxDamageAbilsSort_C;
const int auto103F126C_ai = 1;
// Variable Initialization
// Implementation
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBarCount = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_deadHeroHighestHealth = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_deadHeroStartHealth = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_deadHeroMaxHealth = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectEventCount = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagersCount = 0;
lv_itTimeIndex = 1;
for ( ; ( (autoA7969482_ai >= 0 && lv_itTimeIndex <= autoA7969482_ae) || (autoA7969482_ai < 0 && lv_itTimeIndex >= autoA7969482_ae) ) ; lv_itTimeIndex += autoA7969482_ai ) {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_effect = null;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_effectPlayer = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_heroIndex = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_isHeal = false;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_nPCSource = false;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_structureSource = false;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_amount = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_amountAttempted = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_amountShielded = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_amountOverkill = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_combinedNumOfEvents = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_combinedTimeDelta = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_postEffectHealth = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_abilityLink = null;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_button = null;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_unitType = null;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBars[lv_itTimeIndex].lv_time = 0.0;
}
lv_itMaxDamager = 1;
for ( ; ( (auto6B904343_ai >= 0 && lv_itMaxDamager <= auto6B904343_ae) || (auto6B904343_ai < 0 && lv_itMaxDamager >= auto6B904343_ae) ) ; lv_itMaxDamager += auto6B904343_ai ) {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamager].lv_player = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamager].lv_heroIndex = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamager].lv_amount = 0;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamager].lv_maxDamageAbilCount = 0;
lv_itMaxDamagerAbil = 1;
for ( ; ( (auto103F126C_ai >= 0 && lv_itMaxDamagerAbil <= auto103F126C_ae) || (auto103F126C_ai < 0 && lv_itMaxDamagerAbil >= auto103F126C_ae) ) ; lv_itMaxDamagerAbil += auto103F126C_ai ) {
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamager].lv_maxDamageAbils[lv_itMaxDamagerAbil].lv_abil = null;
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_highestDamagers[lv_itMaxDamager].lv_maxDamageAbils[lv_itMaxDamagerAbil].lv_amount = 0;
}
}
}
void libGame_gf_DeathRecapPopulateDeathRecapDataForPlayer (unit lp_playerHero, int lp_deadPlayer) {
// Variable Declarations
unit lv_deadHeroUnit;
unit lv_effectingUnit;
string lv_effectingUnitType;
int lv_effectingPlayer;
fixed lv_currentTime;
int lv_itEffectHistoryEntry;
effecthistory lv_effectHistory;
int lv_effectHistoryCount;
fixed lv_effectHistoryEntryTime;
string lv_effectHistoryEntryAbility;
string lv_effectHistoryEntryBehavior;
int lv_effectType;
int lv_effectAmount;
int lv_effectAmountAttempted;
int lv_effectAmountShielded;
bool lv_healed;
fixed lv_effectTime;
string lv_debugString;
string lv_unitTypeAsString;
int lv_effectTypePreset;
int lv_effectTypePresetAttempted;
bool lv_effectKill;
bool lv_killingBlowFound;
string lv_sourceButton;
int lv_specialDamageEffectCount;
string lv_specialDamageEffectAbilityLink;
int lv_itSpecialDamageEffectEntry;
bool lv_foundSpecialDamageEffect;
// Automatic Variable Declarations
int auto9091C3BB_ae;
const int auto9091C3BB_ai = 1;
int autoD2EEC8FC_ae;
const int autoD2EEC8FC_ai = 1;
int auto9F13DA0A_val;
// Variable Initialization
lv_effectType = c_effectHistoryDeath;
lv_debugString = "";
lv_unitTypeAsString = "";
lv_effectTypePreset = c_effectAmountDamaged;
lv_effectTypePresetAttempted = c_effectAmountDamageAttempted;
lv_specialDamageEffectCount = 1;
// Implementation
lv_deadHeroUnit = lp_playerHero;
lv_currentTime = GameGetMissionTime();
libGame_gf_DeathRecapClearDeathRecapForPlayer(lp_deadPlayer);
lv_effectHistory = UnitEffectHistory(lp_playerHero, libGame_gv_deathRecap_MaxEffectsInHistory_C);
lv_effectHistoryCount = EffectHistoryCount(lv_effectHistory);
libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_deadHeroMaxHealth = FixedToInt(UnitGetPropertyFixed(lv_deadHeroUnit, c_unitPropLifeMax, c_unitPropCurrent));
auto9091C3BB_ae = lv_effectHistoryCount;
lv_itEffectHistoryEntry = 1;
for ( ; ( (auto9091C3BB_ai >= 0 && lv_itEffectHistoryEntry <= auto9091C3BB_ae) || (auto9091C3BB_ai < 0 && lv_itEffectHistoryEntry >= auto9091C3BB_ae) ) ; lv_itEffectHistoryEntry += auto9091C3BB_ai ) {
lv_debugString = "";
lv_effectHistoryEntryTime = EffectHistoryGetTime(lv_effectHistory, lv_itEffectHistoryEntry);
if (((lv_currentTime - lv_effectHistoryEntryTime) > libGame_gv_deathRecap_MaxTimeElapsed_C)) {
break;
}
lv_effectTime = (lv_currentTime - lv_effectHistoryEntryTime);
lv_effectingPlayer = EffectHistoryGetOriginPlayerID(lv_effectHistory, lv_itEffectHistoryEntry);
lv_foundSpecialDamageEffect = false;
autoD2EEC8FC_ae = lv_specialDamageEffectCount;
lv_itSpecialDamageEffectEntry = 1;
for ( ; ( (autoD2EEC8FC_ai >= 0 && lv_itSpecialDamageEffectEntry <= autoD2EEC8FC_ae) || (autoD2EEC8FC_ai < 0 && lv_itSpecialDamageEffectEntry >= autoD2EEC8FC_ae) ) ; lv_itSpecialDamageEffectEntry += autoD2EEC8FC_ai ) {
if ((EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent) == libGame_gv_deathRecap_SpecialDamageEffects[lv_itSpecialDamageEffectEntry].lv_effect)) {
lv_foundSpecialDamageEffect = true;
break;
}
}
lv_effectType = EffectHistoryGetType(lv_effectHistory, lv_itEffectHistoryEntry);
if ((lv_foundSpecialDamageEffect == true)) {
lv_effectTypePreset = c_effectAmountDamaged;
lv_specialDamageEffectAbilityLink = EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry);
lv_effectAmount = FixedToInt(CatalogFieldValueGetAsFixed(c_gameCatalogAbil, lv_specialDamageEffectAbilityLink, "Cost.Vital[" + IntToString(0) + "]", lv_effectingPlayer));
}
else {
auto9F13DA0A_val = lv_effectType;
if (auto9F13DA0A_val == c_effectHistoryHealing) {
lv_effectTypePreset = c_effectAmountHealed;
lv_effectTypePresetAttempted = c_effectAmountLifeAttempted;
}
else if (auto9F13DA0A_val == c_effectHistoryDamage) {
lv_effectTypePreset = c_effectAmountDamaged;
lv_effectTypePresetAttempted = c_effectAmountDamageAttempted;
}
else {
}
if ((lv_killingBlowFound == false)) {
lv_effectKill = (EffectHistoryGetKillingUnit(lv_effectHistory, lv_itEffectHistoryEntry) != null);
}
lv_effectAmountShielded = EffectHistoryGetAmountInt(lv_effectHistory, lv_itEffectHistoryEntry, c_effectAmountBehaviorShield, false);
lv_effectAmount = EffectHistoryGetAmountInt(lv_effectHistory, lv_itEffectHistoryEntry, lv_effectTypePreset, false);
lv_effectAmountAttempted = EffectHistoryGetAmountInt(lv_effectHistory, lv_itEffectHistoryEntry, lv_effectTypePresetAttempted, false);
}
if ((lv_effectAmount <= 0)) {
if ((lv_killingBlowFound == false) && (lv_effectTypePresetAttempted == c_effectAmountDamageAttempted) && (lv_effectAmountAttempted > lv_effectAmountShielded) && (lv_itEffectHistoryEntry == 1)) {
lv_effectAmount = MaxI(FixedToInt(Floor(UnitGetPropertyFixed(lv_deadHeroUnit, c_unitPropLife, c_unitPropCurrent))), PlayerScoreValueGetAsInt(lp_deadPlayer, "DeadHeroLastKnownHealth"));
lv_effectKill = true;
if ((lv_effectAmount == libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_deadHeroMaxHealth)) {
lv_effectAmount = 1;
}
}
else {
continue;
}
}
lv_effectingUnit = EffectHistoryGetUnitByLocation(lv_effectHistory, lv_itEffectHistoryEntry, c_effectUnitCaster);
lv_effectingUnitType = EffectHistoryGetOriginUnitType(lv_effectHistory, lv_itEffectHistoryEntry);
if (((lv_foundSpecialDamageEffect == true) || (CatalogFieldValueGet(c_gameCatalogEffect, EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent), "SourceButtonFace", c_playerAny) == ""))) {
lv_sourceButton = null;
}
else {
lv_sourceButton = (CatalogFieldValueGet(c_gameCatalogEffect, EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent), "SourceButtonFace", c_playerAny));
}
if (((lv_effectingUnitType == null) || ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) == "") && (EffectHistoryGetWeapon(lv_effectHistory, lv_itEffectHistoryEntry) == "") && (EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry) == "")))) {
lv_effectHistoryEntryAbility = "DebugUnknownAbility";
lv_debugString = (EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent));
if ((lv_sourceButton == null)) {
lv_sourceButton = (CatalogFieldValueGet(c_gameCatalogAbil, lv_effectHistoryEntryAbility, "CmdButtonArray[" + IntToString(0) + "].DefaultButtonFace", c_playerAny));
}
}
else {
lv_unitTypeAsString = (UnitGetType(libGame_gv_players[lv_effectingPlayer].lv_heroUnit));
if ((lv_effectingUnitType != UnitGetType(libGame_gv_players[lv_effectingPlayer].lv_heroUnit)) && (((UnitTypeTestAttribute(lv_effectingUnitType, c_unitAttributeSummoned) == true) && (CatalogFieldValueGet(c_gameCatalogUnit, lv_effectingUnitType, "LeaderAlias", c_playerAny) != lv_unitTypeAsString)) || ((UnitTypeTestAttribute(lv_effectingUnitType, c_unitAttributeSummoned) == false) && (CatalogFieldValueGet(c_gameCatalogUnit, lv_effectingUnitType, "LeaderAlias", c_playerAny) == lv_unitTypeAsString)))) {
lv_effectHistoryEntryAbility = AbilityCommandGetAbility(TechTreeUnitProducedAbilCmd(lv_effectingUnitType, 0));
if ((lv_sourceButton == null)) {
lv_sourceButton = (CatalogFieldValueGet(c_gameCatalogAbil, lv_effectHistoryEntryAbility, "CmdButtonArray[" + IntToString(0) + "].DefaultButtonFace", c_playerAny));
}
lv_effectingUnit = libGame_gv_players[lv_effectingPlayer].lv_heroUnit;
lv_effectingUnitType = UnitGetType(lv_effectingUnit);
}
else {
if ((UnitTypeTestAttribute(lv_effectingUnitType, c_unitAttributeSummoned) == true) && (lv_effectingUnitType != UnitGetType(libGame_gv_players[lv_effectingPlayer].lv_heroUnit)) && (CatalogFieldValueGet(c_gameCatalogUnit, lv_effectingUnitType, "LeaderAlias", c_playerAny) == lv_unitTypeAsString)) {
lv_effectingUnit = libGame_gv_players[lv_effectingPlayer].lv_heroUnit;
lv_effectingUnitType = UnitGetType(lv_effectingUnit);
}
if ((EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry) != "") && ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) == "") || (CatalogFieldValueGet(c_gameCatalogBehavior, EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry), "Face", c_playerAny) != ""))) {
lv_effectHistoryEntryBehavior = EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry);
if ((lv_sourceButton == null)) {
lv_sourceButton = (CatalogFieldValueGet(c_gameCatalogBehavior, lv_effectHistoryEntryBehavior, "Face", c_playerAny));
}
}
else {
if ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) != "")) {
lv_effectHistoryEntryAbility = EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry);
}
else {
lv_effectHistoryEntryAbility = "attack";
}
if ((lv_sourceButton == null)) {
lv_sourceButton = (CatalogFieldValueGet(c_gameCatalogAbil, lv_effectHistoryEntryAbility, "CmdButtonArray[" + IntToString(0) + "].DefaultButtonFace", c_playerAny));
}
}
}
}
if ((lv_effectKill == true) && (lv_killingBlowFound == false)) {
lv_killingBlowFound = true;
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_A4E072FE"), false);
TextExpressionSetToken("Param/Expression/lib_Game_20E33C7C", "A", FixedToText(lv_effectHistoryEntryTime, c_fixedPrecisionAny));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_20E33C7C"), false);
}
libGame_gf_DeathRecapAddEffectInstanceForPlayer(lp_deadPlayer, EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent), lv_effectingPlayer, lv_effectHistoryEntryAbility, lv_effectingUnitType, lv_effectAmount, lv_effectAmountAttempted, lv_effectAmountShielded, (lv_effectType == c_effectHistoryHealing), lv_effectTime, lv_debugString, lv_sourceButton);
if ((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBarCount >= libGame_gv_deathRecap_MaxEffectBars_C)) {
break;
}
}
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_14734E6C"), false);
libGame_gf_DeathRecapSortMaxDamagers(lp_deadPlayer);
if ((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectEventCount >= 1)) {
libUIUI_gf_DeathRecapPopulateHighestDamagersForPlayer(lp_deadPlayer);
libUIUI_gf_DeathRecapPopulateEffectInstancesForAbilitiesPanel(lp_deadPlayer);
PlayerScoreValueSetFromInt(lp_deadPlayer, "DeadHeroDamagePreventedByAbsorb", 0);
}
else {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_A143D762"), true);
}
}
void libGame_gf_EndofMatchAwardsDisabled (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_EndOfMatchAwardsDisabled_C);
}
void libGame_gf_DisableEndofMatchAwards () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libGame_gv_eventID_EndOfMatchAwardsDisabled_C);
}
fixed libGame_gf_GetMVPAwardAmount (string lp_heroUnit, int lp_awardCategory) {
// Variable Declarations
fixed lv_amounttoReturn;
// Automatic Variable Declarations
int autoCC71B3A0_val;
// Variable Initialization
// Implementation
autoCC71B3A0_val = lp_awardCategory;
if (autoCC71B3A0_val == libGame_ge_MVPAwards_Assist) {
lv_amounttoReturn = libGame_gv_awardforAssist;
if ((lp_heroUnit == "HeroDVaPilot")) {
lv_amounttoReturn = 0.75;
}
else if ((lp_heroUnit == "HeroLostVikingsController")) {
lv_amounttoReturn = 0.75;
}
else if ((lp_heroUnit == "HeroAbathur")) {
lv_amounttoReturn = 0.75;
}
}
else if (autoCC71B3A0_val == libGame_ge_MVPAwards_Kill) {
lv_amounttoReturn = libGame_gv_awardforKill;
}
else if (autoCC71B3A0_val == libGame_ge_MVPAwards_TimeSpentDead) {
lv_amounttoReturn = libGame_gv_awardforPercentageTimeSpentDead;
if ((lp_heroUnit == "HeroMurky")) {
lv_amounttoReturn = -1.0;
}
else if ((lp_heroUnit == "HeroGall")) {
lv_amounttoReturn = -1.0;
}
else if ((lp_heroUnit == "HeroCho")) {
lv_amounttoReturn = -0.85;
}
}
else if (autoCC71B3A0_val == libGame_ge_MVPAwards_TopDamageTakenasWarrior) {
lv_amounttoReturn = libGame_gv_awardforTopDamageTakenasWarrior;
}
else if (autoCC71B3A0_val == libGame_ge_MVPAwards_TopDamageTakenasWarrioronTeam) {
lv_amounttoReturn = libGame_gv_awardforTopDamageTakenasWarrioronTeam;
}
else if (autoCC71B3A0_val == libGame_ge_MVPAwards_TopHealing) {
lv_amounttoReturn = libGame_gv_awardforTopHealing;
}
else if (autoCC71B3A0_val == libGame_ge_MVPAwards_TopHeroDamage) {
lv_amounttoReturn = libGame_gv_awardforTopHeroDamage;
}
else if (autoCC71B3A0_val == libGame_ge_MVPAwards_TopHeroDamageonTeam) {
lv_amounttoReturn = libGame_gv_awardforTopHeroDamageonTeam;
}
else if (autoCC71B3A0_val == libGame_ge_MVPAwards_TopSiegeDamage) {
lv_amounttoReturn = libGame_gv_awardforTopSiegeDamage;
}
else if (autoCC71B3A0_val == libGame_ge_MVPAwards_TopSiegeDamageonTeam) {
lv_amounttoReturn = libGame_gv_awardforTopSiegeDamageonTeam;
}
else if (autoCC71B3A0_val == libGame_ge_MVPAwards_TopXPContributor) {
lv_amounttoReturn = libGame_gv_awardforTopXPContributor;
}
else if (autoCC71B3A0_val == libGame_ge_MVPAwards_TopXPContributoronTeam) {
lv_amounttoReturn = libGame_gv_awardforTopXPContributoronTeam;
}
else if (autoCC71B3A0_val == libGame_ge_MVPAwards_OnWinningTeam) {
lv_amounttoReturn = libGame_gv_awardforOnWinningTeam;
}
else {
}
return lv_amounttoReturn;
}
void libGame_gf_SortMVPStats () {
// Variable Declarations
bool lv_reSort;
int lv_iterator;
int lv_prioritytoMove;
fixed lv_valuetoMove;
text lv_labeltoMove;
text lv_texttoMove;
// Automatic Variable Declarations
int auto6A308B90_ae;
// Variable Initialization
// Implementation
auto6A308B90_ae = (libGame_gv_maxMVPStatSlots - 1);
lv_iterator = 1;
for ( ; lv_iterator <= auto6A308B90_ae ; lv_iterator += 1 ) {
if ((((libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatPriority) < (libGame_gv_mVPStatstoDisplay[(lv_iterator + 1)].lv_mVPStatPriority)) || (((libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatPriority) == (libGame_gv_mVPStatstoDisplay[(lv_iterator + 1)].lv_mVPStatPriority)) && (libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatValue < libGame_gv_mVPStatstoDisplay[(lv_iterator + 1)].lv_mVPStatValue)))) {
lv_reSort = true;
lv_labeltoMove = libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatLabel;
lv_prioritytoMove = libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatPriority;
lv_texttoMove = libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatText;
lv_valuetoMove = libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatValue;
libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatLabel = libGame_gv_mVPStatstoDisplay[(lv_iterator + 1)].lv_mVPStatLabel;
libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatPriority = libGame_gv_mVPStatstoDisplay[(lv_iterator + 1)].lv_mVPStatPriority;
libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatText = libGame_gv_mVPStatstoDisplay[(lv_iterator + 1)].lv_mVPStatText;
libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatValue = libGame_gv_mVPStatstoDisplay[(lv_iterator + 1)].lv_mVPStatValue;
libGame_gv_mVPStatstoDisplay[(lv_iterator + 1)].lv_mVPStatLabel = lv_labeltoMove;
libGame_gv_mVPStatstoDisplay[(lv_iterator + 1)].lv_mVPStatPriority = lv_prioritytoMove;
libGame_gv_mVPStatstoDisplay[(lv_iterator + 1)].lv_mVPStatText = lv_texttoMove;
libGame_gv_mVPStatstoDisplay[(lv_iterator + 1)].lv_mVPStatValue = lv_valuetoMove;
}
}
if ((lv_reSort == true)) {
libGame_gf_SortMVPStats();
}
}
void libGame_gf_AssignMVP (int lp_winningTeam) {
// Variable Declarations
fixed lv_mVPScoreToBeat;
int lv_iterator;
int lv_itRoleMultiClass;
fixed lv_gameLength;
int lv_tiebreaker;
int lv_topHeroDamagerinGame;
fixed lv_topHeroDamageAmountinGame;
int[libCore_gv_bALMaxTeams + 1] lv_topHeroDamagerPerTeam;
fixed[libCore_gv_bALMaxTeams + 1] lv_topHeroDamageAmountPerTeam;
int lv_topSiegeDamagerinGame;
fixed lv_topSiegeDamageAmountinGame;
int[libCore_gv_bALMaxTeams + 1] lv_topSiegeDamagerPerTeam;
fixed[libCore_gv_bALMaxTeams + 1] lv_topSiegeDamageAmountPerTeam;
int lv_topDamageTakerinGame;
fixed lv_topDamageTakenAmountinGame;
int[libCore_gv_bALMaxTeams + 1] lv_topDamageTakerPerTeam;
fixed[libCore_gv_bALMaxTeams + 1] lv_topDamageTakenAmountPerTeam;
int lv_topXPContributorinGame;
fixed lv_topXPContributionAmountinGame;
int[libCore_gv_bALMaxTeams + 1] lv_topXPContributorPerTeam;
fixed[libCore_gv_bALMaxTeams + 1] lv_topXPContribution;
int lv_topHealerinGame;
fixed lv_topHealAmount;
int[libCore_gv_bALMaxTeams + 1] lv_topHealerPerTeam;
fixed[libCore_gv_bALMaxTeams + 1] lv_topHealAmountPerTeam;
fixed[libCore_gv_bALMaxPlayers + 1] lv_thoroughputBonus;
const int lv_maxMVPStatSlots = 3;
int lv_mVPStatstoDisplayIterator;
const fixed lv_mVPStatThresholdBeforePuttingIntoUISlots = 20.0;
const fixed lv_mVPStatThresholdBeforePuttingIntoUISlotsforHeals = 10.0;
text lv_emptyText;
// Automatic Variable Declarations
int auto1F73EC8A_ae;
int auto62E88247_ae;
int autoC7CDF8FB_ae;
int auto7F8B851F_ae;
int auto1CB0D15B_ae;
// Variable Initialization
lv_gameLength = TimerGetElapsed(libGame_gv_gameTimer);
lv_mVPStatstoDisplayIterator = 1;
// Implementation
if (((libCore_gv_sYSGameMode == libCore_ge_GameModes_ArenaMode) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_AttackDefend) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_Debug) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_TryMe) || (libGame_gv_endofMatchAwardsDisabled == true) || ((GameIsMatchmade() == false) && (libCore_gv_dEBUGDebuggingEnabled == false) && (libCore_gv_sYSGameMode != libCore_ge_GameModes_Tutorial1) && (libCore_gv_sYSGameMode != libCore_ge_GameModes_TutorialMapMechanics)))) {
return ;
}
if (((libCore_gv_sYSGameMode == libCore_ge_GameModes_Tutorial1) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_TutorialMapMechanics))) {
libGame_gv_mVPManualOverride = 1;
libGame_gv_playerAwardEligibility[1][0].lv_dEBUGManuallyForceAssigned = true;
}
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_8C6A653D") + IntToText(lp_winningTeam)), false);
auto1F73EC8A_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= auto1F73EC8A_ae ; lv_iterator += 1 ) {
libGame_gv_mVPStats[lv_iterator].lv_team = libGame_gf_TeamNumberOfPlayer(lv_iterator);
libGame_gv_mVPStats[lv_iterator].lv_role = libGame_gv_players[lv_iterator].lv_heroData.lv_expandedRole;
libNtve_gf_AddPlayerGroupToPlayerGroup(libGame_gv_players[lv_iterator].lv_heroData.lv_heroRoles, libGame_gv_mVPStats[lv_iterator].lv_mvpRoles);
libGame_gv_mVPStats[lv_iterator].lv_heroDamageDone = PlayerScoreValueGetAsFixed(lv_iterator, "HeroDamage");
libGame_gf_SetAwardValueandWeight(lv_iterator, libGame_gv_mVPStats[lv_iterator].lv_heroDamageDone, libGame_ge_SecondaryAwards_Painbringer);
libGame_gv_mVPStats[lv_iterator].lv_siegeDamageDone = PlayerScoreValueGetAsFixed(lv_iterator, "SiegeDamage");
libGame_gf_SetAwardValueandWeight(lv_iterator, libGame_gv_mVPStats[lv_iterator].lv_siegeDamageDone, libGame_ge_SecondaryAwards_SiegeMaster);
libGame_gv_mVPStats[lv_iterator].lv_damageTaken = libGame_gv_scoreValues[lv_iterator].lv_damageTaken;
libGame_gv_mVPStats[lv_iterator].lv_deaths = libGame_gv_scoreValues[lv_iterator].lv_deaths;
libGame_gf_SetAwardValueandWeight(lv_iterator, libGame_gv_mVPStats[lv_iterator].lv_damageTaken, libGame_ge_SecondaryAwards_Bulwark);
libGame_gv_mVPStats[lv_iterator].lv_xPContribution = PlayerScoreValueGetAsFixed(lv_iterator, "ExperienceContribution");
libGame_gf_SetAwardValueandWeight(lv_iterator, libGame_gv_mVPStats[lv_iterator].lv_xPContribution, libGame_ge_SecondaryAwards_Experienced);
libGame_gv_mVPStats[lv_iterator].lv_healAmount = PlayerScoreValueGetAsFixed(lv_iterator, "Healing");
libGame_gf_SetAwardValueandWeight(lv_iterator, libGame_gv_mVPStats[lv_iterator].lv_healAmount, libGame_ge_SecondaryAwards_MainHealer);
libGame_gv_mVPStats[lv_iterator].lv_enemyTeam = libGame_gf_EnemyTeamNumberOfPlayer(lv_iterator);
libGame_gv_mVPStats[lv_iterator].lv_heroName = UnitTypeGetName(UnitGetType(libGame_gv_players[lv_iterator].lv_heroUnit));
libGame_gv_mVPStats[lv_iterator].lv_unitType = UnitGetType(libGame_gv_players[lv_iterator].lv_heroUnit);
if ((libGame_gv_mVPStats[lv_iterator].lv_heroDamageDone > lv_topHeroDamageAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team])) {
lv_topHeroDamageAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] = libGame_gv_mVPStats[lv_iterator].lv_heroDamageDone;
lv_topHeroDamagerPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] = lv_iterator;
}
if ((libGame_gv_mVPStats[lv_iterator].lv_siegeDamageDone > lv_topSiegeDamageAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team])) {
lv_topSiegeDamageAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] = libGame_gv_mVPStats[lv_iterator].lv_siegeDamageDone;
lv_topSiegeDamagerPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] = lv_iterator;
}
if ((libGame_gv_mVPStats[lv_iterator].lv_damageTaken > lv_topDamageTakenAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team])) {
lv_topDamageTakenAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] = libGame_gv_mVPStats[lv_iterator].lv_damageTaken;
lv_topDamageTakerPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] = lv_iterator;
}
if ((libGame_gv_mVPStats[lv_iterator].lv_xPContribution > lv_topXPContribution[libGame_gv_mVPStats[lv_iterator].lv_team])) {
lv_topXPContribution[libGame_gv_mVPStats[lv_iterator].lv_team] = libGame_gv_mVPStats[lv_iterator].lv_xPContribution;
lv_topXPContributorPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] = lv_iterator;
}
if ((libGame_gv_mVPStats[lv_iterator].lv_healAmount > lv_topHealAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team])) {
lv_topHealAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] = libGame_gv_mVPStats[lv_iterator].lv_healAmount;
lv_topHealerPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] = lv_iterator;
}
}
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_F2DB1E8D") + UnitTypeGetName(UnitGetType(libGame_gv_players[lv_topHeroDamagerPerTeam[1]].lv_heroUnit))), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_269671F4") + FixedToText(lv_topHeroDamageAmountPerTeam[1], c_fixedPrecisionAny)), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_B4D8E244") + UnitTypeGetName(UnitGetType(libGame_gv_players[lv_topHeroDamagerPerTeam[2]].lv_heroUnit))), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_14F8534A") + FixedToText(lv_topHeroDamageAmountPerTeam[2], c_fixedPrecisionAny)), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_BAC429E4") + UnitTypeGetName(UnitGetType(libGame_gv_players[lv_topSiegeDamagerPerTeam[1]].lv_heroUnit))), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_8DE4645B") + FixedToText(lv_topSiegeDamageAmountPerTeam[1], c_fixedPrecisionAny)), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_E97B07AB") + UnitTypeGetName(UnitGetType(libGame_gv_players[lv_topSiegeDamagerPerTeam[2]].lv_heroUnit))), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_44002CA1") + FixedToText(lv_topSiegeDamageAmountPerTeam[2], c_fixedPrecisionAny)), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_DD4D7AB3") + UnitTypeGetName(UnitGetType(libGame_gv_players[lv_topDamageTakerPerTeam[1]].lv_heroUnit))), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_BFDDD4A9") + FixedToText(lv_topDamageTakenAmountPerTeam[1], c_fixedPrecisionAny)), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_667838D9") + UnitTypeGetName(UnitGetType(libGame_gv_players[lv_topDamageTakerPerTeam[2]].lv_heroUnit))), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_5B95C075") + FixedToText(lv_topDamageTakenAmountPerTeam[2], c_fixedPrecisionAny)), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_8E88CA60") + UnitTypeGetName(UnitGetType(libGame_gv_players[lv_topHealerPerTeam[1]].lv_heroUnit))), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_0E6D649F") + FixedToText(lv_topHealAmountPerTeam[1], c_fixedPrecisionAny)), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_11E00082") + UnitTypeGetName(UnitGetType(libGame_gv_players[lv_topHealerPerTeam[2]].lv_heroUnit))), false);
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_E893337F") + FixedToText(lv_topHealAmountPerTeam[2], c_fixedPrecisionAny)), false);
auto62E88247_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= auto62E88247_ae ; lv_iterator += 1 ) {
if ((libGame_gv_mVPStats[lv_iterator].lv_team == lp_winningTeam)) {
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_OnWinningTeam);
}
libGame_gv_mVPStats[lv_iterator].lv_kills = libGame_gv_scoreValues[lv_iterator].lv_kills;
libGame_gf_SetAwardValueandWeight(lv_iterator, libGame_gv_mVPStats[lv_iterator].lv_kills, libGame_ge_SecondaryAwards_Finisher);
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += (libGame_gv_mVPStats[lv_iterator].lv_kills * libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_Kill));
TriggerDebugOutput(8, (libGame_gv_mVPStats[lv_iterator].lv_heroName + StringExternal("Param/Value/lib_Game_A78D91D5") + FixedToText(libGame_gv_scoreValues[lv_iterator].lv_kills, c_fixedPrecisionAny) + StringExternal("Param/Value/lib_Game_BFDA6658")), false);
libGame_gv_mVPStats[lv_iterator].lv_assists = libGame_gv_scoreValues[lv_iterator].lv_assists;
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += (libGame_gv_mVPStats[lv_iterator].lv_assists * libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_Assist));
TriggerDebugOutput(8, (libGame_gv_mVPStats[lv_iterator].lv_heroName + StringExternal("Param/Value/lib_Game_0F666E73") + FixedToText(libGame_gv_scoreValues[lv_iterator].lv_assists, c_fixedPrecisionAny) + StringExternal("Param/Value/lib_Game_9666B389")), false);
libGame_gv_mVPStats[lv_iterator].lv_timeSpentDead = PlayerScoreValueGetAsFixed(lv_iterator, "TimeSpentDead");
if ((lv_gameLength > 0.0)) {
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_76523999") + FixedToText(lv_gameLength, c_fixedPrecisionAny) + StringExternal("Param/Value/lib_Game_00430BFC")), false);
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += (((libGame_gv_mVPStats[lv_iterator].lv_timeSpentDead / lv_gameLength) * 100.0) * libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TimeSpentDead));
TriggerDebugOutput(8, (libGame_gv_mVPStats[lv_iterator].lv_heroName + StringExternal("Param/Value/lib_Game_AA28B988") + FixedToText(PlayerScoreValueGetAsFixed(lv_iterator, "TimeSpentDead"), c_fixedPrecisionAny) + StringExternal("Param/Value/lib_Game_FFBAB715") + FixedToText((((libGame_gv_mVPStats[lv_iterator].lv_timeSpentDead / lv_gameLength) * 100.0) * libGame_gv_awardforPercentageTimeSpentDead), c_fixedPrecisionAny) + StringExternal("Param/Value/lib_Game_359F599B")), false);
}
else {
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_4CF8135A")), false);
}
if ((lv_topHeroDamagerPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] == lv_iterator)) {
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopHeroDamageonTeam);
if ((lv_topHeroDamageAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] > lv_topHeroDamageAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_enemyTeam])) {
lv_topHeroDamagerinGame = lv_iterator;
lv_topHeroDamageAmountinGame = lv_topHeroDamageAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team];
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopHeroDamage);
}
}
if ((lv_topSiegeDamagerPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] == lv_iterator)) {
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopSiegeDamageonTeam);
if ((lv_topSiegeDamageAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] > lv_topSiegeDamageAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_enemyTeam])) {
lv_topSiegeDamagerinGame = lv_iterator;
lv_topSiegeDamageAmountinGame = lv_topSiegeDamageAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team];
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopSiegeDamage);
}
}
if ((lv_topDamageTakerPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] == lv_iterator) && ((PlayerGroupHasPlayer(libGame_gv_mVPStats[lv_iterator].lv_mvpRoles, (c_expandedRoleTank)) == true) || (PlayerGroupHasPlayer(libGame_gv_mVPStats[lv_iterator].lv_mvpRoles, (c_expandedRoleBruiser)) == true))) {
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopDamageTakenasWarrioronTeam);
if ((lv_topDamageTakenAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] > lv_topDamageTakenAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_enemyTeam])) {
lv_topDamageTakerinGame = lv_iterator;
lv_topDamageTakenAmountinGame = lv_topDamageTakenAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team];
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopDamageTakenasWarrior);
}
}
if ((lv_topHealerPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] == lv_iterator)) {
if ((lv_topHealAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] >= lv_topHealAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_enemyTeam])) {
lv_topHealerinGame = lv_iterator;
lv_topHealAmount = lv_topHealAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team];
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopHealing);
}
}
if ((lv_topXPContributorPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] == lv_iterator)) {
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopXPContributoronTeam);
if ((lv_topXPContribution[libGame_gv_mVPStats[lv_iterator].lv_team] >= lv_topXPContribution[libGame_gv_mVPStats[lv_iterator].lv_enemyTeam])) {
lv_topXPContributorinGame = lv_iterator;
lv_topXPContributionAmountinGame = lv_topXPContribution[libGame_gv_mVPStats[lv_iterator].lv_team];
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_mVPStats[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopXPContributor);
}
}
}
autoC7CDF8FB_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= autoC7CDF8FB_ae ; lv_iterator += 1 ) {
if ((lv_topSiegeDamageAmountinGame > 0.0)) {
lv_thoroughputBonus[lv_iterator] += (libGame_gv_thoroughputBonusMultiplier * (libGame_gv_mVPStats[lv_iterator].lv_siegeDamageDone / lv_topSiegeDamageAmountinGame));
}
if ((lv_topHeroDamageAmountinGame > 0.0)) {
lv_thoroughputBonus[lv_iterator] += (libGame_gv_thoroughputBonusMultiplier * (libGame_gv_mVPStats[lv_iterator].lv_heroDamageDone / lv_topHeroDamageAmountinGame));
}
if ((lv_topXPContributionAmountinGame > 0.0)) {
lv_thoroughputBonus[lv_iterator] += (libGame_gv_thoroughputBonusMultiplier * (libGame_gv_mVPStats[lv_iterator].lv_xPContribution / lv_topXPContributionAmountinGame));
}
if (((PlayerGroupHasPlayer(libGame_gv_mVPStats[lv_iterator].lv_mvpRoles, (c_expandedRoleSupport)) == true) || (PlayerGroupHasPlayer(libGame_gv_mVPStats[lv_iterator].lv_mvpRoles, (c_expandedRoleHealer)) == true)) && (lv_topHealAmount > 0.0)) {
lv_thoroughputBonus[lv_iterator] += (libGame_gv_thoroughputBonusMultiplier * (libGame_gv_mVPStats[lv_iterator].lv_healAmount / lv_topHealAmount));
}
if (((PlayerGroupHasPlayer(libGame_gv_mVPStats[lv_iterator].lv_mvpRoles, (c_expandedRoleTank)) == true) || (PlayerGroupHasPlayer(libGame_gv_mVPStats[lv_iterator].lv_mvpRoles, (c_expandedRoleBruiser)) == true)) && (lv_topDamageTakenAmountinGame > 0.0)) {
lv_thoroughputBonus[lv_iterator] += (libGame_gv_thoroughputBonusMultiplier * (libGame_gv_mVPStats[lv_iterator].lv_damageTaken / lv_topDamageTakenAmountinGame) * libGame_gv_thoroughputBonusExtraStatMultiplier);
}
libGame_gv_mVPStats[lv_iterator].lv_mVPScore += lv_thoroughputBonus[lv_iterator];
}
auto7F8B851F_ae = 10;
lv_iterator = 1;
for ( ; lv_iterator <= auto7F8B851F_ae ; lv_iterator += 1 ) {
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_45CD443A") + libGame_gv_mVPStats[lv_iterator].lv_heroName + StringExternal("Param/Value/lib_Game_5228A42B") + FixedToText(libGame_gv_mVPStats[lv_iterator].lv_mVPScore, c_fixedPrecisionAny)), false);
if ((libGame_gv_mVPStats[lv_iterator].lv_mVPScore > lv_mVPScoreToBeat)) {
lv_mVPScoreToBeat = libGame_gv_mVPStats[lv_iterator].lv_mVPScore;
libGame_gv_mVPPlayer = lv_iterator;
}
else if ((libGame_gv_mVPStats[lv_iterator].lv_mVPScore == lv_mVPScoreToBeat) && (libGame_gv_mVPStats[lv_iterator].lv_xPContribution > libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_xPContribution)) {
lv_mVPScoreToBeat = libGame_gv_mVPStats[lv_iterator].lv_mVPScore;
libGame_gv_mVPPlayer = lv_iterator;
}
else if ((libGame_gv_mVPStats[lv_iterator].lv_mVPScore == lv_mVPScoreToBeat) && (libGame_gv_mVPStats[lv_iterator].lv_xPContribution == libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_xPContribution)) {
lv_tiebreaker = RandomInt(0, 1);
if ((lv_tiebreaker == 1)) {
lv_mVPScoreToBeat = libGame_gv_mVPStats[lv_iterator].lv_mVPScore;
libGame_gv_mVPPlayer = lv_iterator;
}
}
}
if ((libGame_gv_mVPManualOverride != 0)) {
libGame_gv_mVPPlayer = libGame_gv_mVPManualOverride;
}
libGame_gv_playerHasWonAward[libGame_gv_mVPPlayer] = true;
libGame_gf_BuildInitialSecondaryAwardList();
libGame_gf_ScoreValuesReportIntegerValueAndLog(libGame_gv_mVPPlayer, "EndOfMatchAwardMVPBoolean", 1);
if ((lv_topDamageTakerinGame == libGame_gv_mVPPlayer) && ((PlayerGroupHasPlayer(libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_mvpRoles, (c_expandedRoleTank)) == true) || (PlayerGroupHasPlayer(libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_mvpRoles, (c_expandedRoleBruiser)) == true)) && ((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_damageTaken * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlots) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_BestinGame;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_4229130A");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_damageTaken * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_C7457CC9"));
lv_mVPStatstoDisplayIterator += 1;
}
else {
if (((PlayerGroupHasPlayer(libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_mvpRoles, (c_expandedRoleTank)) == true) || (PlayerGroupHasPlayer(libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_mvpRoles, (c_expandedRoleBruiser)) == true)) && ((lv_topDamageTakerPerTeam[1] == libGame_gv_mVPPlayer) || (lv_topDamageTakerPerTeam[2] == libGame_gv_mVPPlayer)) && ((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_damageTaken * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlots) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_BestinTeam;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_6AC097A5");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_damageTaken * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_8F83B293"));
lv_mVPStatstoDisplayIterator += 1;
}
else {
if (((PlayerGroupHasPlayer(libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_mvpRoles, (c_expandedRoleTank)) == true) || (PlayerGroupHasPlayer(libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_mvpRoles, (c_expandedRoleBruiser)) == true)) && ((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_damageTaken * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlots) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_Notable;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_429A5F34");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_damageTaken * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_20354E62"));
lv_mVPStatstoDisplayIterator += 1;
}
}
}
if ((lv_topHeroDamagerinGame == libGame_gv_mVPPlayer) && ((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_heroDamageDone * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Painbringer]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlots) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_BestinGame;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_55CBB08A");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_heroDamageDone * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Painbringer]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_30502BA8"));
lv_mVPStatstoDisplayIterator += 1;
}
else {
if (((lv_topHeroDamagerPerTeam[1] == libGame_gv_mVPPlayer) || (lv_topHeroDamagerPerTeam[2] == libGame_gv_mVPPlayer)) && ((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_heroDamageDone * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Painbringer]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlots) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_BestinTeam;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_F42C549A");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_heroDamageDone * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Painbringer]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_05A3CB12"));
lv_mVPStatstoDisplayIterator += 1;
}
else {
if (((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_heroDamageDone * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Painbringer]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlots) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_Notable;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_8D37B4CF");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_heroDamageDone * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Painbringer]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_25CBB8D6"));
lv_mVPStatstoDisplayIterator += 1;
}
}
}
if ((lv_topHealerinGame == libGame_gv_mVPPlayer) && ((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_healAmount * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlotsforHeals) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_BestinGame;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_8812D893");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_healAmount * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_02DE34F2"));
lv_mVPStatstoDisplayIterator += 1;
}
else {
if (((lv_topHealerPerTeam[1] == libGame_gv_mVPPlayer) || (lv_topHealerPerTeam[2] == libGame_gv_mVPPlayer)) && ((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_healAmount * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlotsforHeals) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_BestinTeam;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_A3651BF8");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_healAmount * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_1BD8ECF3"));
lv_mVPStatstoDisplayIterator += 1;
}
else {
if (((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_healAmount * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlotsforHeals) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_Notable;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_B9F8E56F");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_healAmount * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_B5D7A9B9"));
lv_mVPStatstoDisplayIterator += 1;
}
}
}
if ((lv_topSiegeDamagerinGame == libGame_gv_mVPPlayer) && ((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_siegeDamageDone * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_SiegeMaster]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlots) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_BestinGame;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_B3A03F4F");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_siegeDamageDone * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_SiegeMaster]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_FBF75DC5"));
lv_mVPStatstoDisplayIterator += 1;
}
else {
if (((lv_topSiegeDamagerPerTeam[1] == libGame_gv_mVPPlayer) || (lv_topSiegeDamagerPerTeam[2] == libGame_gv_mVPPlayer)) && ((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_siegeDamageDone * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_SiegeMaster]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlots) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_BestinTeam;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_68B3198B");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_siegeDamageDone * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_SiegeMaster]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_8068A215"));
lv_mVPStatstoDisplayIterator += 1;
}
else {
if (((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_siegeDamageDone * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_SiegeMaster]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlots) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_Notable;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_73E57423");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_siegeDamageDone * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_SiegeMaster]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_B7C1F132"));
lv_mVPStatstoDisplayIterator += 1;
}
}
}
if ((lv_topXPContributorinGame == libGame_gv_mVPPlayer) && ((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_xPContribution * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Experienced]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlots) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_BestinGame;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_674FFC7D");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_xPContribution * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Experienced]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_A941F748"));
lv_mVPStatstoDisplayIterator += 1;
}
else {
if (((lv_topXPContributorPerTeam[1] == libGame_gv_mVPPlayer) || (lv_topXPContributorPerTeam[2] == libGame_gv_mVPPlayer)) && ((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_xPContribution * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Experienced]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlots) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_BestinTeam;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_E0929865");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_xPContribution * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Experienced]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_1CFE3DC7"));
lv_mVPStatstoDisplayIterator += 1;
}
else {
if (((((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_xPContribution * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Experienced]) * 100.0) > lv_mVPStatThresholdBeforePuttingIntoUISlots) && (lv_mVPStatstoDisplayIterator <= libGame_gv_maxMVPStatSlots)) {
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatPriority = libGame_ge_MVPStatPriority_Notable;
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatLabel = StringExternal("Param/Value/lib_Game_7622D521");
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue = (((libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_xPContribution * 0.1) / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(libGame_gv_mVPPlayer)][libGame_ge_SecondaryAwards_Experienced]) * 100.0);
libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatText = (FixedToText(libGame_gv_mVPStatstoDisplay[lv_mVPStatstoDisplayIterator].lv_mVPStatValue, 0) + StringExternal("Param/Value/lib_Game_A6AA3EBD"));
lv_mVPStatstoDisplayIterator += 1;
}
}
}
libGame_gf_SortMVPStats();
auto1CB0D15B_ae = lv_maxMVPStatSlots;
lv_iterator = 1;
for ( ; lv_iterator <= auto1CB0D15B_ae ; lv_iterator += 1 ) {
if ((libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatPriority == libGame_ge_MVPStatPriority_BestinGame) && ((libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatText != null) == true)) {
libUIUI_gf_AssignMVPStattoNextUISlot(libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatLabel, libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatText, StringExternal("Param/Value/lib_Game_9484BA4E"));
libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatText = null;
}
else if ((libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatPriority == libGame_ge_MVPStatPriority_BestinTeam) && ((libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatText != null) == true)) {
libUIUI_gf_AssignMVPStattoNextUISlot(libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatLabel, libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatText, StringExternal("Param/Value/lib_Game_9C3B1DB0"));
libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatText = null;
}
else if ((libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatPriority == libGame_ge_MVPStatPriority_Notable) && ((libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatText != null) == true)) {
libUIUI_gf_AssignMVPStattoNextUISlot(libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatLabel, libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatText, lv_emptyText);
libGame_gv_mVPStatstoDisplay[lv_iterator].lv_mVPStatText = null;
}
}
libGame_gf_SortInitialSecondaryAwardList();
libGame_gf_AssignFinalSecondaryAwards();
libUIUI_gf_UIEndofMatchAwardsMVPReveal();
}
void libGame_gf_MapSpecificAwardInitialize (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapSpecificAwardInitialize_C);
}
void libGame_gf_SendMapSpecificAwardInitializeEvent (text lp_name, text lp_suffix, fixed lp_base, bool lp_presentasRatio, bool lp_gatedbyBase, string lp_badgeIndex, string lp_scoreValue) {
// Automatic Variable Declarations
// Implementation
DataTableSetText(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Name_C), lp_name);
DataTableSetText(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Suffix_C), lp_suffix);
DataTableSetFixed(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Base_C), lp_base);
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_PresentAsRatio_C), lp_presentasRatio);
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_GatedByBase_C), lp_gatedbyBase);
DataTableSetString(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_BadgeIndex_C), lp_badgeIndex);
DataTableSetString(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_ScoreValue_C), (lp_scoreValue));
TriggerSendEvent(libGame_gv_eventID_MapSpecificAwardInitialize_C);
}
void libGame_gf_SendMapSpecificAwardInitializeEventwithUserData (text lp_name, string lp_userData) {
// Automatic Variable Declarations
// Implementation
DataTableSetText(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Name_C), UserDataGetText("EndOfMatchMapSpecificAward", lp_userData, "Award Name", 1));
DataTableSetText(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Suffix_C), UserDataGetText("EndOfMatchMapSpecificAward", lp_userData, "Description", 1));
DataTableSetFixed(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Base_C), UserDataGetFixed("EndOfMatchMapSpecificAward", lp_userData, "Base", 1));
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_PresentAsRatio_C), libNtve_gf_ConvertStringToBoolean(UserDataGetString("EndOfMatchMapSpecificAward", lp_userData, "Present as Ratio", 1)));
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_GatedByBase_C), libNtve_gf_ConvertStringToBoolean(UserDataGetString("EndOfMatchMapSpecificAward", lp_userData, "Gated by Base", 1)));
DataTableSetString(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_BadgeIndex_C), UserDataGetString("EndOfMatchMapSpecificAward", lp_userData, "Award Badge Index", 1));
DataTableSetString(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_ScoreValue_C), (UserDataGetGameLink("EndOfMatchMapSpecificAward", lp_userData, "Score Value Boolean", 1)));
DataTableSetText(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Tooltip_C), UserDataGetText("EndOfMatchMapSpecificAward", lp_userData, "Tooltip Text", 1));
TriggerSendEvent(libGame_gv_eventID_MapSpecificAwardInitialize_C);
}
text libGame_gf_MapSpecificAwardInitializeName () {
// Automatic Variable Declarations
// Implementation
return DataTableGetText(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Name_C));
}
text libGame_gf_MapSpecificAwardInitializeSuffix () {
// Automatic Variable Declarations
// Implementation
return DataTableGetText(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Suffix_C));
}
fixed libGame_gf_MapSpecificAwardInitializeBase () {
// Automatic Variable Declarations
// Implementation
return DataTableGetFixed(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Base_C));
}
bool libGame_gf_MapSpecificAwardInitializePresentasRatio () {
// Automatic Variable Declarations
// Implementation
return DataTableGetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_PresentAsRatio_C));
}
bool libGame_gf_MapSpecificAwardInitializeGateByBase () {
// Automatic Variable Declarations
// Implementation
return DataTableGetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_GatedByBase_C));
}
string libGame_gf_MapSpecificAwardInitializeBadgeIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetString(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_BadgeIndex_C));
}
string libGame_gf_MapSpecificAwardInitializeScoreValue () {
// Automatic Variable Declarations
// Implementation
return DataTableGetString(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_ScoreValue_C));
}
text libGame_gf_MapSpecificAwardInitializeTooltip () {
// Automatic Variable Declarations
// Implementation
return DataTableGetText(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Tooltip_C));
}
void libGame_gf_MapSpecificAwardUpdate (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapSpecificAwardUpdate_C);
}
void libGame_gf_SendMapSpecificAwardEvent (int lp_player, fixed lp_value, bool lp_isAdd) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardUpdate_C, libGame_gv_eventParam_MapSpecificAwardUpdate_Player_C), lp_player);
DataTableSetFixed(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardUpdate_C, libGame_gv_eventParam_MapSpecificAwardUpdate_Value_C), lp_value);
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardUpdate_C, libGame_gv_eventParam_MapSpecificAwardUpdate_IsAdd_C), lp_isAdd);
TriggerSendEvent(libGame_gv_eventID_MapSpecificAwardUpdate_C);
}
int libGame_gf_MapSpecificAwardUpdatePlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardUpdate_C, libGame_gv_eventParam_MapSpecificAwardUpdate_Player_C));
}
fixed libGame_gf_MapSpecificAwardUpdateValue () {
// Automatic Variable Declarations
// Implementation
return DataTableGetFixed(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardUpdate_C, libGame_gv_eventParam_MapSpecificAwardUpdate_Value_C));
}
bool libGame_gf_MapSpecificAwardUpdateIsAdd () {
// Automatic Variable Declarations
// Implementation
return DataTableGetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardUpdate_C, libGame_gv_eventParam_MapSpecificAwardUpdate_IsAdd_C));
}
void libGame_gf_AddtoAwardValue (int lp_player, fixed lp_awardValue, int lp_award) {
// Automatic Variable Declarations
// Implementation
if (((lp_player >= 1) && (lp_player <= libCore_gv_bALMaxPlayers))) {
libGame_gf_SetAwardValueandWeight(lp_player, (libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_value + lp_awardValue), lp_award);
}
}
void libGame_gf_AssignTopAwardValue (int lp_player, fixed lp_awardValue, int lp_award) {
// Automatic Variable Declarations
// Implementation
if ((lp_awardValue > libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_value)) {
libGame_gf_SetAwardValueandWeight(lp_player, lp_awardValue, lp_award);
}
}
void libGame_gf_SetAwardValueandWeight (int lp_player, fixed lp_awardValue, int lp_award) {
// Automatic Variable Declarations
// Implementation
if (((lp_player == 0) || (lp_player > 10) || (libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_dEBUGManuallyForceAssigned == true))) {
return ;
}
libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_value = lp_awardValue;
if ((libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_base == 0.0)) {
}
else if (((lp_award == libGame_ge_SecondaryAwards_Bulwark) || (lp_award == libGame_ge_SecondaryAwards_Guardian)) && (libGame_gv_players[lp_player].lv_heroData.lv_expandedRole != c_expandedRoleTank) && (libGame_gv_players[lp_player].lv_heroData.lv_expandedRole != c_expandedRoleBruiser)) {
return ;
}
else if (((lp_award == libGame_ge_SecondaryAwards_Bulwark) || (lp_award == libGame_ge_SecondaryAwards_Guardian)) && ((libGame_gv_players[lp_player].lv_heroData.lv_expandedRole == c_expandedRoleTank) || (libGame_gv_players[lp_player].lv_heroData.lv_expandedRole == c_expandedRoleBruiser))) {
libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_weight = ((libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_value / (libGame_gv_mVPStats[lp_player].lv_deaths + 3.0)) / libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_base);
libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_weight *= libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_weightModifier;
}
else if ((libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_gatedbyBase == true) && (libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_value >= libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_base)) {
libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_weight = (libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_value / libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_base);
libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_weight *= libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_weightModifier;
}
else if ((libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_gatedbyBase == false)) {
libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_weight = (libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_value / libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_base);
libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_weight *= libGame_gv_playerAwardEligibility[lp_player][(lp_award)].lv_weightModifier;
}
}
void libGame_gf_SortInitialSecondaryAwardList () {
// Variable Declarations
bool lv_reSort;
int lv_iterator;
int lv_winnertoMove;
fixed lv_weighttoMove;
fixed lv_valuetoMove;
text lv_nametoMove;
int lv_awardIndextoMove;
string lv_badgeIndextoMove;
text lv_suffixtoMove;
text lv_prefixtoMove;
text lv_tooltiptoMove;
bool lv_ratioSettingtoMove;
string lv_scoreValuetoMove;
// Automatic Variable Declarations
int auto747C0FA6_ae;
// Variable Initialization
lv_badgeIndextoMove = "";
// Implementation
auto747C0FA6_ae = (libGame_gv_secondaryAwardCount - 1);
lv_iterator = 1;
for ( ; lv_iterator <= auto747C0FA6_ae ; lv_iterator += 1 ) {
if ((libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_weight < libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_weight)) {
lv_reSort = true;
lv_winnertoMove = libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_winner;
lv_weighttoMove = libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_weight;
lv_valuetoMove = libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_value;
lv_nametoMove = libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_name;
lv_suffixtoMove = libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_suffix;
lv_awardIndextoMove = libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_awardIndex;
lv_badgeIndextoMove = libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_awardBadgeIndex;
lv_ratioSettingtoMove = libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_presentasRatio;
lv_scoreValuetoMove = libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_scoreValue;
lv_tooltiptoMove = libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_tooltip;
libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_winner = libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_winner;
libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_weight = libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_weight;
libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_value = libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_value;
libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_name = libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_name;
libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_suffix = libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_suffix;
libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_tooltip = libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_tooltip;
libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_awardIndex = libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_awardIndex;
libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_awardBadgeIndex = libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_awardBadgeIndex;
libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_presentasRatio = libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_presentasRatio;
libGame_gv_initialSecondaryAwardsList[lv_iterator].lv_scoreValue = libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_scoreValue;
libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_winner = lv_winnertoMove;
libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_weight = lv_weighttoMove;
libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_value = lv_valuetoMove;
libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_name = lv_nametoMove;
libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_suffix = lv_suffixtoMove;
libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_tooltip = lv_tooltiptoMove;
libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_awardIndex = lv_awardIndextoMove;
libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_awardBadgeIndex = lv_badgeIndextoMove;
libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_presentasRatio = lv_ratioSettingtoMove;
libGame_gv_initialSecondaryAwardsList[(lv_iterator + 1)].lv_scoreValue = lv_scoreValuetoMove;
}
}
if ((lv_reSort == true)) {
libGame_gf_SortInitialSecondaryAwardList();
}
}
void libGame_gf_InitializeAwardData (int lp_award, string lp_badgeIndex, text lp_name, text lp_prefix, text lp_suffix, fixed lp_base, bool lp_gatedbyBase, bool lp_presentasRatio, string lp_score, text lp_tooltip) {
// Variable Declarations
int lv_iterator;
// Automatic Variable Declarations
int autoC16FCB48_ae;
// Variable Initialization
// Implementation
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_name = lp_name;
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_prefix = lp_prefix;
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_suffix = lp_suffix;
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_base = lp_base;
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_gatedbyBase = lp_gatedbyBase;
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_presentasRatio = lp_presentasRatio;
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_awardIndex = lp_award;
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_awardBadgeIndex = lp_badgeIndex;
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_scoreValue = lp_score;
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_tooltip = lp_tooltip;
autoC16FCB48_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= autoC16FCB48_ae ; lv_iterator += 1 ) {
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_name = lp_name;
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_prefix = lp_prefix;
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_suffix = lp_suffix;
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_base = lp_base;
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_gatedbyBase = lp_gatedbyBase;
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_presentasRatio = lp_presentasRatio;
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_awardIndex = lp_award;
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_awardBadgeIndex = lp_badgeIndex;
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_scoreValue = lp_score;
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_tooltip = lp_tooltip;
}
}
void libGame_gf_EscapeTrackingCreditEscapeAttempt (int lp_player, unit lp_unit) {
// Variable Declarations
bool lv_escapedinaTeamFight;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if ((libGame_gv_teamfightTrackingNearbyAllyCount[lp_player] >= (libGame_gv_teamfightTrackingCount - 1)) && (libGame_gv_teamfightTrackingNearbyEnemyCount[lp_player] >= libGame_gv_teamfightTrackingCount)) {
lv_escapedinaTeamFight = true;
}
Wait(5.0, c_timeGame);
if ((UnitIsValid(lp_unit) == true) && (UnitIsAlive(lp_unit) == true) && (UnitBehaviorCount(lp_unit, "Dead") == 0) && (UnitGroupHasUnit(libGame_gv_players[lp_player].lv_heroUnitGroup, lp_unit) == true) && (UnitGroupHasUnit(libGame_gv_escapeTrackingHeroReducedtoLowHealthUnitGroup[lp_player], lp_unit) == true)) {
if ((libGame_gv_teamfightTrackingNearbyAllyCount[lp_player] >= (libGame_gv_teamfightTrackingCount - 1)) && (libGame_gv_teamfightTrackingNearbyEnemyCount[lp_player] >= libGame_gv_teamfightTrackingCount) && (lv_escapedinaTeamFight == true)) {
libGame_gf_AddtoAwardValue(lp_player, 1.0, libGame_ge_SecondaryAwards_Daredevil);
}
libGame_gf_AddtoAwardValue(lp_player, 1.0, libGame_ge_SecondaryAwards_EscapeArtist);
UnitGroupRemove(libGame_gv_escapeTrackingHeroReducedtoLowHealthUnitGroup[lp_player], lp_unit);
}
else if ((UnitGroupHasUnit(libGame_gv_escapeTrackingHeroReducedtoLowHealthUnitGroup[lp_player], lp_unit) == true)) {
UnitGroupRemove(libGame_gv_escapeTrackingHeroReducedtoLowHealthUnitGroup[lp_player], lp_unit);
}
}
void libGame_gf_DetermineSoleSurvivor () {
// Variable Declarations
int lv_winner;
int lv_iterator;
// Automatic Variable Declarations
int auto15A2FE1C_ae;
// Variable Initialization
// Implementation
auto15A2FE1C_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= auto15A2FE1C_ae ; lv_iterator += 1 ) {
if ((libGame_gv_mVPStats[lv_iterator].lv_deaths == 0.0) && (lv_winner == 0)) {
lv_winner = lv_iterator;
}
else if ((libGame_gv_mVPStats[lv_iterator].lv_deaths == 0.0) && (lv_winner != 0)) {
return ;
}
}
libGame_gf_SetAwardValueandWeight(lv_winner, 1.0, libGame_ge_SecondaryAwards_SoleSurvivor);
}
void libGame_gf_DetermineTeamPlayer () {
// Variable Declarations
int lv_winner;
int lv_iterator;
// Automatic Variable Declarations
int auto2D75B2B9_ae;
// Variable Initialization
// Implementation
auto2D75B2B9_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= auto2D75B2B9_ae ; lv_iterator += 1 ) {
if ((libGame_gv_outnumberedDeathCount[lv_iterator] == 0) && (lv_winner == 0)) {
lv_winner = lv_iterator;
}
else if ((libGame_gv_outnumberedDeathCount[lv_iterator] == 0) && (lv_winner != 0)) {
return ;
}
}
libGame_gf_SetAwardValueandWeight(lv_winner, 1.0, libGame_ge_SecondaryAwards_TeamPlayer);
}
void libGame_gf_AddGuardianDamage (fixed lp_damageValue, int lp_player) {
// Automatic Variable Declarations
// Implementation
if ((lp_player <= libCore_gv_bALMaxPlayers) && (lp_player > 0) && (libGame_gv_teamfightTrackingNearbyAllyCount[lp_player] >= (libGame_gv_teamfightTrackingCount - 1)) && (libGame_gv_teamfightTrackingNearbyEnemyCount[lp_player] >= libGame_gv_teamfightTrackingCount)) {
libGame_gf_AddtoAwardValue(lp_player, lp_damageValue, libGame_ge_SecondaryAwards_Guardian);
}
}
void libGame_gf_AddScrapperDamage (fixed lp_damageValue, int lp_player) {
// Automatic Variable Declarations
// Implementation
if ((lp_player <= libCore_gv_bALMaxPlayers) && (lp_player > 0) && (libGame_gv_teamfightTrackingNearbyAllyCount[lp_player] >= (libGame_gv_teamfightTrackingCount - 1)) && (libGame_gv_teamfightTrackingNearbyEnemyCount[lp_player] >= libGame_gv_teamfightTrackingCount)) {
libGame_gf_AddtoAwardValue(lp_player, lp_damageValue, libGame_ge_SecondaryAwards_Scrapper);
}
}
void libGame_gf_InitializeAwardDataFromUserData (string lp_userData, int lp_award) {
// Variable Declarations
int lv_iterator;
// Automatic Variable Declarations
int auto4D932EBB_ae;
// Variable Initialization
// Implementation
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_name = UserDataGetText("EndOfMatchGeneralAward", lp_userData, "Award Name", 1);
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_suffix = UserDataGetText("EndOfMatchGeneralAward", lp_userData, "Description", 1);
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_base = UserDataGetFixed("EndOfMatchGeneralAward", lp_userData, "Base", 1);
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_gatedbyBase = libNtve_gf_ConvertStringToBoolean(UserDataGetString("EndOfMatchGeneralAward", lp_userData, "Gated by Base", 1));
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_presentasRatio = libNtve_gf_ConvertStringToBoolean(UserDataGetString("EndOfMatchGeneralAward", lp_userData, "Present as Ratio", 1));
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_awardIndex = lp_award;
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_awardBadgeIndex = UserDataGetString("EndOfMatchGeneralAward", lp_userData, "Award Badge Index", 1);
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_scoreValue = UserDataGetGameLink("EndOfMatchGeneralAward", lp_userData, "Score Value Boolean", 1);
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_tooltip = UserDataGetText("EndOfMatchGeneralAward", lp_userData, "Tooltip Text", 1);
libGame_gv_initialSecondaryAwardsList[(lp_award)].lv_weightModifier = UserDataGetFixed("EndOfMatchGeneralAward", lp_userData, "Weight Modifier", 1);
auto4D932EBB_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= auto4D932EBB_ae ; lv_iterator += 1 ) {
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_name = UserDataGetText("EndOfMatchGeneralAward", lp_userData, "Award Name", 1);
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_suffix = UserDataGetText("EndOfMatchGeneralAward", lp_userData, "Description", 1);
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_base = UserDataGetFixed("EndOfMatchGeneralAward", lp_userData, "Base", 1);
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_gatedbyBase = libNtve_gf_ConvertStringToBoolean(UserDataGetString("EndOfMatchGeneralAward", lp_userData, "Gated by Base", 1));
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_presentasRatio = libNtve_gf_ConvertStringToBoolean(UserDataGetString("EndOfMatchGeneralAward", lp_userData, "Present as Ratio", 1));
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_awardIndex = lp_award;
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_awardBadgeIndex = UserDataGetString("EndOfMatchGeneralAward", lp_userData, "Award Badge Index", 1);
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_scoreValue = UserDataGetGameLink("EndOfMatchGeneralAward", lp_userData, "Score Value Boolean", 1);
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_tooltip = UserDataGetText("EndOfMatchGeneralAward", lp_userData, "Tooltip Text", 1);
libGame_gv_playerAwardEligibility[lv_iterator][(lp_award)].lv_weightModifier = UserDataGetFixed("EndOfMatchGeneralAward", lp_userData, "Weight Modifier", 1);
}
}
void libGame_gf_InitializeSecondaryAwardList () {
// Variable Declarations
int lv_iterator;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
libGame_gf_InitializeAwardDataFromUserData("Experienced", libGame_ge_SecondaryAwards_Experienced);
libGame_gf_InitializeAwardDataFromUserData("Painbringer", libGame_ge_SecondaryAwards_Painbringer);
libGame_gf_InitializeAwardDataFromUserData("Bulwark", libGame_ge_SecondaryAwards_Bulwark);
libGame_gf_InitializeAwardDataFromUserData("Main Healer", libGame_ge_SecondaryAwards_MainHealer);
libGame_gf_InitializeAwardDataFromUserData("Siege Master", libGame_ge_SecondaryAwards_SiegeMaster);
libGame_gf_InitializeAwardDataFromUserData("Dominator", libGame_ge_SecondaryAwards_Dominator);
libGame_gf_InitializeAwardDataFromUserData("Stunner", libGame_ge_SecondaryAwards_Stunner);
libGame_gf_InitializeAwardDataFromUserData("Headhunter", libGame_ge_SecondaryAwards_Headhunter);
libGame_gf_InitializeAwardDataFromUserData("Finisher", libGame_ge_SecondaryAwards_Finisher);
libGame_gf_InitializeAwardDataFromUserData("Hat Trick", libGame_ge_SecondaryAwards_HatTrick);
libGame_gf_InitializeAwardDataFromUserData("Sole Survivor", libGame_ge_SecondaryAwards_SoleSurvivor);
libGame_gf_InitializeAwardDataFromUserData("Clutch Healer", libGame_ge_SecondaryAwards_ClutchHealer);
libGame_gf_InitializeAwardDataFromUserData("Trapper", libGame_ge_SecondaryAwards_Trapper);
libGame_gf_InitializeAwardDataFromUserData("Protector", libGame_ge_SecondaryAwards_Protector);
libGame_gf_InitializeAwardDataFromUserData("Silencer", libGame_ge_SecondaryAwards_Silencer);
libGame_gf_InitializeAwardDataFromUserData("Guardian", libGame_ge_SecondaryAwards_Guardian);
libGame_gf_InitializeAwardDataFromUserData("Combat Medic", libGame_ge_SecondaryAwards_CombatMedic);
libGame_gf_InitializeAwardDataFromUserData("Team Player", libGame_ge_SecondaryAwards_TeamPlayer);
libGame_gf_InitializeAwardDataFromUserData("Daredevil", libGame_ge_SecondaryAwards_Daredevil);
libGame_gf_InitializeAwardDataFromUserData("Escape Artist", libGame_ge_SecondaryAwards_EscapeArtist);
libGame_gf_InitializeAwardDataFromUserData("Scrapper", libGame_ge_SecondaryAwards_Scrapper);
libGame_gf_InitializeAwardDataFromUserData("Avenger", libGame_ge_SecondaryAwards_Avenger);
}
void libGame_gf_BuildInitialSecondaryAwardList () {
// Variable Declarations
int lv_playerIterator;
int lv_awardIterator;
fixed lv_temporaryValue;
// Automatic Variable Declarations
int autoF400ED20_ae;
int auto9A235845_ae;
int auto8517A970_ae;
// Variable Initialization
// Implementation
autoF400ED20_ae = libCore_gv_bALMaxPlayers;
lv_playerIterator = 1;
for ( ; lv_playerIterator <= autoF400ED20_ae ; lv_playerIterator += 1 ) {
libGame_gf_SetAwardValueandWeight(lv_playerIterator, libGame_gv_scoreValues[lv_playerIterator].lv_creepCampsCaptured, libGame_ge_SecondaryAwards_Headhunter);
}
libGame_gf_DetermineSoleSurvivor();
libGame_gf_DetermineTeamPlayer();
auto9A235845_ae = libCore_gv_bALMaxPlayers;
lv_playerIterator = 1;
for ( ; lv_playerIterator <= auto9A235845_ae ; lv_playerIterator += 1 ) {
auto8517A970_ae = libGame_gv_secondaryAwardCount;
lv_awardIterator = 1;
for ( ; lv_awardIterator <= auto8517A970_ae ; lv_awardIterator += 1 ) {
lv_temporaryValue = (libGame_gv_playerAwardEligibility[lv_playerIterator][lv_awardIterator].lv_value * 0.1);
libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(lv_playerIterator)][lv_awardIterator] += lv_temporaryValue;
if ((libGame_gv_initialSecondaryAwardsList[lv_awardIterator].lv_weight < libGame_gv_playerAwardEligibility[lv_playerIterator][lv_awardIterator].lv_weight)) {
libGame_gf_AssignAwardWinner(lv_awardIterator, lv_playerIterator);
}
}
}
}
void libGame_gf_AssignAwardWinner (int lp_awardIndex, int lp_playerIndex) {
// Automatic Variable Declarations
// Implementation
libGame_gv_initialSecondaryAwardsList[lp_awardIndex].lv_weight = libGame_gv_playerAwardEligibility[lp_playerIndex][lp_awardIndex].lv_weight;
libGame_gv_initialSecondaryAwardsList[lp_awardIndex].lv_value = libGame_gv_playerAwardEligibility[lp_playerIndex][lp_awardIndex].lv_value;
libGame_gv_initialSecondaryAwardsList[lp_awardIndex].lv_winner = lp_playerIndex;
}
int libGame_gf_DecideTiebreaker (int lp_awardPreset, int lp_firstPlayer, int lp_secondPlayer) {
// Automatic Variable Declarations
// Implementation
if ((lp_awardPreset == libGame_ge_SecondaryAwards_EscapeArtist) && (lp_awardPreset == libGame_ge_SecondaryAwards_Dominator)) {
if ((libGame_gv_scoreValues[lp_firstPlayer].lv_takedowns < libGame_gv_scoreValues[lp_secondPlayer].lv_takedowns)) {
return lp_secondPlayer;
}
else if ((libGame_gv_scoreValues[lp_firstPlayer].lv_takedowns > libGame_gv_scoreValues[lp_secondPlayer].lv_takedowns)) {
return lp_firstPlayer;
}
}
if ((lp_awardPreset == libGame_ge_SecondaryAwards_Dominator)) {
if ((libGame_gv_scoreValues[lp_firstPlayer].lv_kills < libGame_gv_scoreValues[lp_secondPlayer].lv_kills)) {
return lp_secondPlayer;
}
else if ((libGame_gv_scoreValues[lp_firstPlayer].lv_kills > libGame_gv_scoreValues[lp_secondPlayer].lv_kills)) {
return lp_firstPlayer;
}
}
if ((lp_awardPreset == libGame_ge_SecondaryAwards_Finisher)) {
if ((libGame_gv_scoreValues[lp_firstPlayer].lv_assists < libGame_gv_scoreValues[lp_secondPlayer].lv_assists)) {
return lp_secondPlayer;
}
else if ((libGame_gv_scoreValues[lp_firstPlayer].lv_assists > libGame_gv_scoreValues[lp_secondPlayer].lv_assists)) {
return lp_firstPlayer;
}
}
if ((lp_awardPreset == libGame_ge_SecondaryAwards_TeamPlayer)) {
if ((libGame_gv_scoreValues[lp_firstPlayer].lv_deaths < libGame_gv_scoreValues[lp_secondPlayer].lv_deaths)) {
return lp_firstPlayer;
}
else if ((libGame_gv_scoreValues[lp_firstPlayer].lv_deaths > libGame_gv_scoreValues[lp_secondPlayer].lv_deaths)) {
return lp_secondPlayer;
}
else if ((libGame_gv_scoreValues[lp_firstPlayer].lv_deaths == libGame_gv_scoreValues[lp_secondPlayer].lv_deaths)) {
if ((libGame_gv_scoreValues[lp_firstPlayer].lv_kills < libGame_gv_scoreValues[lp_secondPlayer].lv_kills)) {
return lp_secondPlayer;
}
else if ((libGame_gv_scoreValues[lp_firstPlayer].lv_kills > libGame_gv_scoreValues[lp_secondPlayer].lv_kills)) {
return lp_firstPlayer;
}
}
}
if ((RandomInt(1, 2) == 1)) {
return lp_firstPlayer;
}
else {
return lp_secondPlayer;
}
return lp_firstPlayer;
}
fixed libGame_gf_GetAwardRatio (int lp_player, int lp_award) {
// Variable Declarations
fixed lv_awardValue;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_awardValue = libGame_gv_playerAwardEligibility[lp_player][lp_award].lv_value;
if (((lp_award == (libGame_ge_SecondaryAwards_MainHealer)) || (lp_award == (libGame_ge_SecondaryAwards_Protector))) && (libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(lp_player)][libGame_ge_SecondaryAwards_Bulwark] > 1.0)) {
lv_awardValue *= 0.1;
lv_awardValue = ((lv_awardValue / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(lp_player)][libGame_ge_SecondaryAwards_Bulwark]) * 100.0);
return lv_awardValue;
}
else if (((lp_award == (libGame_ge_SecondaryAwards_CombatMedic))) && (libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(lp_player)][libGame_ge_SecondaryAwards_Guardian] > 1.0)) {
lv_awardValue *= 0.1;
lv_awardValue = ((lv_awardValue / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(lp_player)][libGame_ge_SecondaryAwards_Guardian]) * 100.0);
return lv_awardValue;
}
lv_awardValue *= 0.1;
lv_awardValue = ((lv_awardValue / libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(lp_player)][lp_award]) * 100.0);
if ((lv_awardValue >= 99.0)) {
lv_awardValue = 100.0;
}
return lv_awardValue;
}
text libGame_gf_GetFinalAwardValueInfo (int lp_playerIndex, int lp_finalAwardSlotIndex) {
// Variable Declarations
fixed lv_awardValue;
text lv_texttoReturn;
int lv_award;
// Automatic Variable Declarations
// Variable Initialization
lv_award = libGame_gv_finalSecondaryAwardsList[lp_finalAwardSlotIndex].lv_awardIndex;
// Implementation
lv_awardValue = FixedToInt(libGame_gv_finalSecondaryAwardsList[lp_finalAwardSlotIndex].lv_value);
if ((libGame_gv_finalSecondaryAwardsList[lp_finalAwardSlotIndex].lv_presentasRatio == true) && (libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(lp_playerIndex)][lv_award] != 0.0)) {
lv_awardValue = libGame_gf_GetAwardRatio(lp_playerIndex, lv_award);
}
TextExpressionSetToken("AwardDesc", c_textExpressionTokenMain, libGame_gv_finalSecondaryAwardsList[lp_finalAwardSlotIndex].lv_suffix);
TextExpressionSetToken("AwardDesc", "AwardValue", FixedToText(lv_awardValue, 0));
return TextExpressionAssemble("AwardDesc");
}
bool libGame_gf_IsSecondaryAwardAboveRatioThreshold (int lp_player, int lp_awardPreset) {
// Variable Declarations
fixed lv_awardValue;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_awardValue = libGame_gv_playerAwardEligibility[lp_player][lp_awardPreset].lv_value;
if ((libGame_gv_playerAwardEligibility[lp_player][lp_awardPreset].lv_presentasRatio != true)) {
return true;
}
if ((libGame_gv_teamAwardTotalValues[libGame_gf_TeamNumberOfPlayer(lp_player)][lp_awardPreset] != 0.0)) {
lv_awardValue = libGame_gf_GetAwardRatio(lp_player, lp_awardPreset);
}
if ((((lv_awardValue >= 20.0)) || (((lp_awardPreset == (libGame_ge_SecondaryAwards_MainHealer)) || (lp_awardPreset == (libGame_ge_SecondaryAwards_Protector))) && (lv_awardValue >= 10.0)))) {
return true;
}
else {
return false;
}
}
text libGame_gf_GetAwardTooltipInfo (int lp_playerIndex, int lp_awardIndex) {
// Variable Declarations
fixed lv_awardValue;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_awardValue = libGame_gv_playerAwardEligibility[lp_playerIndex][lp_awardIndex].lv_value;
TextExpressionSetToken("TooltipDesc", c_textExpressionTokenMain, libGame_gv_playerAwardEligibility[lp_playerIndex][lp_awardIndex].lv_tooltip);
TextExpressionSetToken("TooltipDesc", "TooltipAmount", FormatNumber(FixedToInt(lv_awardValue)));
if ((lp_awardIndex == libGame_ge_SecondaryAwards_Bulwark)) {
TextExpressionSetToken("TooltipDesc", "TooltipSecondaryAmount", FormatNumber(FixedToInt(libGame_gv_mVPStats[lp_playerIndex].lv_deaths)));
}
return TextExpressionAssemble("TooltipDesc");
}
void libGame_gf_AssignFinalSecondaryAwards () {
// Variable Declarations
int lv_slotIterator;
bool lv_awardFoundforSlot;
bool[libGame_gv_secondaryAwardCount + 1] lv_awardIsAssigned;
int lv_awardIterator;
int lv_awardPlayerIterator;
int lv_awardWinner;
int lv_award;
fixed lv_awardWeight;
bool[libCore_gv_bALMaxTeams + 1] lv_teamReceivedanAward;
// Automatic Variable Declarations
int auto8A327C5D_ae;
int autoBA54619A_ae;
int autoD9F10EBE_ae;
int autoCFF39CBA_ae;
// Variable Initialization
// Implementation
lv_teamReceivedanAward[libGame_gv_mVPStats[libGame_gv_mVPPlayer].lv_team] = true;
auto8A327C5D_ae = libGame_gv_secondaryAwardSlotCount;
lv_slotIterator = 1;
for ( ; lv_slotIterator <= auto8A327C5D_ae ; lv_slotIterator += 1 ) {
lv_awardFoundforSlot = false;
lv_awardWeight = 0.0;
autoBA54619A_ae = libGame_gv_secondaryAwardCount;
lv_awardIterator = 1;
for ( ; lv_awardIterator <= autoBA54619A_ae ; lv_awardIterator += 1 ) {
if ((lv_awardFoundforSlot == false) && (libGame_gv_playerHasWonAward[libGame_gv_initialSecondaryAwardsList[lv_awardIterator].lv_winner] == false) && (libGame_gv_playerAwardEligibility[libGame_gv_initialSecondaryAwardsList[lv_awardIterator].lv_winner][(libGame_gv_initialSecondaryAwardsList[lv_awardIterator].lv_awardIndex)].lv_weight != 0.0) && (libGame_gf_IsSecondaryAwardAboveRatioThreshold(libGame_gv_initialSecondaryAwardsList[lv_awardIterator].lv_winner, libGame_gv_initialSecondaryAwardsList[lv_awardIterator].lv_awardIndex) == true) && ((lv_slotIterator < libGame_gv_secondaryAwardSlotCount) || ((lv_slotIterator == libGame_gv_secondaryAwardSlotCount) && ((lv_teamReceivedanAward[libGame_gf_TeamNumberOfPlayer(libGame_gv_initialSecondaryAwardsList[lv_awardIterator].lv_winner)] == false) || ((lv_teamReceivedanAward[libGame_gv_teamOrderIndex_C] == true) && (lv_teamReceivedanAward[libGame_gv_teamChaosIndex_C] == true)))))) {
lv_award = (libGame_gv_initialSecondaryAwardsList[lv_awardIterator].lv_awardIndex);
lv_awardWinner = libGame_gv_initialSecondaryAwardsList[lv_awardIterator].lv_winner;
lv_awardWeight = libGame_gv_playerAwardEligibility[lv_awardWinner][lv_award].lv_weight;
lv_awardFoundforSlot = true;
libGame_gv_playerHasWonAward[libGame_gv_initialSecondaryAwardsList[lv_awardIterator].lv_winner] = true;
lv_teamReceivedanAward[libGame_gf_TeamNumberOfPlayer(lv_awardWinner)] = true;
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_8600D0FA") + IntToText(lv_slotIterator) + StringExternal("Param/Value/lib_Game_E8D93BD4") + libGame_gv_mVPStats[lv_awardWinner].lv_heroName + StringExternal("Param/Value/lib_Game_AF8F03EE")), false);
}
}
if ((lv_awardFoundforSlot == true) && (lv_awardWeight != 0.0)) {
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_853A1D25")), false);
}
else {
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_AD17C337")), false);
autoD9F10EBE_ae = libGame_gv_secondaryAwardCount;
lv_awardIterator = 1;
for ( ; lv_awardIterator <= autoD9F10EBE_ae ; lv_awardIterator += 1 ) {
if ((lv_awardIsAssigned[lv_awardIterator] == false)) {
autoCFF39CBA_ae = libCore_gv_bALMaxPlayers;
lv_awardPlayerIterator = 1;
for ( ; lv_awardPlayerIterator <= autoCFF39CBA_ae ; lv_awardPlayerIterator += 1 ) {
if ((libGame_gv_playerHasWonAward[lv_awardPlayerIterator] == false) && (libGame_gv_playerAwardEligibility[lv_awardPlayerIterator][lv_awardIterator].lv_weight != 0.0) && (lv_awardWeight <= libGame_gv_playerAwardEligibility[lv_awardPlayerIterator][lv_awardIterator].lv_weight)) {
if ((lv_awardWeight == libGame_gv_playerAwardEligibility[lv_awardPlayerIterator][lv_awardIterator].lv_weight) && (lv_award == lv_awardIterator)) {
lv_awardWinner = libGame_gf_DecideTiebreaker(lv_awardIterator, lv_awardPlayerIterator, lv_awardWinner);
if ((lv_awardWinner == lv_awardPlayerIterator)) {
lv_award = lv_awardIterator;
}
}
else {
lv_awardWinner = lv_awardPlayerIterator;
lv_award = lv_awardIterator;
}
lv_awardWeight = libGame_gv_playerAwardEligibility[lv_awardWinner][lv_award].lv_weight;
lv_awardFoundforSlot = true;
}
}
}
}
if ((lv_awardFoundforSlot == true)) {
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_49A80F9D") + IntToText(lv_awardWinner)), false);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_awardWinner, "EndOfMatchAwardGivenToNonwinner", lv_award);
}
}
if ((lv_awardFoundforSlot == true) && (lv_awardWeight != 0.0)) {
lv_awardFoundforSlot = true;
libGame_gv_playerHasWonAward[lv_awardWinner] = true;
lv_awardIsAssigned[lv_award] = true;
libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_winner = lv_awardWinner;
TextExpressionSetToken("AwardName", c_textExpressionTokenMain, libGame_gv_playerAwardEligibility[lv_awardWinner][lv_award].lv_name);
TextExpressionSetToken("AwardName", "HeroName", UnitTypeGetName(UnitGetType(libGame_gv_players[lv_awardWinner].lv_heroUnit)));
libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_name = TextExpressionAssemble("AwardName");
libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_prefix = libGame_gv_playerAwardEligibility[lv_awardWinner][lv_award].lv_prefix;
libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_suffix = libGame_gv_playerAwardEligibility[lv_awardWinner][lv_award].lv_suffix;
libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_weight = lv_awardWeight;
libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_value = libGame_gv_playerAwardEligibility[lv_awardWinner][lv_award].lv_value;
libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_scoreValue = libGame_gv_playerAwardEligibility[lv_awardWinner][lv_award].lv_scoreValue;
libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_awardIndex = libGame_gv_playerAwardEligibility[lv_awardWinner][lv_award].lv_awardIndex;
libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_awardBadgeIndex = libGame_gv_playerAwardEligibility[lv_awardWinner][lv_award].lv_awardBadgeIndex;
libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_presentasRatio = libGame_gv_playerAwardEligibility[lv_awardWinner][lv_award].lv_presentasRatio;
TriggerDebugOutput(8, (StringExternal("Param/Value/lib_Game_542166A4") + libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_name + StringExternal("Param/Value/lib_Game_7F1D45EC") + UnitTypeGetName(UnitGetType(libGame_gv_players[libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_winner].lv_heroUnit)) + StringExternal("Param/Value/lib_Game_D3604DFC") + StringToText("") + FixedToText(libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_value, 0) + StringToText("") + StringExternal("Param/Value/lib_Game_F56D9AF5") + FixedToText(libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_base, 0) + StringExternal("Param/Value/lib_Game_06929FF2") + FixedToText(libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_weight, 3)), false);
libGame_gf_ScoreValuesReportIntegerValueAndLog(libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_winner, libGame_gv_finalSecondaryAwardsList[lv_slotIterator].lv_scoreValue, 1);
}
}
}
void libGame_gf_TryMeCustomButton1Pressed (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_TryMeCustomButton1Pressed_C);
}
void libGame_gf_SendEventTryMeCustomButton1Pressed (int lp_player) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_TryMeCustomButton1Pressed_C, libGame_gv_eventParam_TryMeCustomButton1Pressed_Player_C), lp_player);
TriggerSendEvent(libGame_gv_eventID_TryMeCustomButton1Pressed_C);
}
int libGame_gf_TryMeCustomButton1PressedPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_TryMeCustomButton1Pressed_C, libGame_gv_eventParam_TryMeCustomButton1Pressed_Player_C));
}
void libGame_gf_CameraPannedFromScript (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_CameraPannedFromScript_C);
}
void libGame_gf_SendEventCameraPannedFromScript (int lp_player, point lp_point) {
// Automatic Variable Declarations
// Implementation
DataTableSetPoint(false, TriggerEventParamName(libGame_gv_eventID_CameraPannedFromScript_C, libGame_gv_eventParam_CameraPannedFromScript_Point_C), lp_point);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CameraPannedFromScript_C, libGame_gv_eventParam_CameraPannedFromScript_Player_C), lp_player);
TriggerSendEvent(libGame_gv_eventID_CameraPannedFromScript_C);
}
point libGame_gf_CameraPannedFromScriptPoint () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPoint(false, TriggerEventParamName(libGame_gv_eventID_CameraPannedFromScript_C, libGame_gv_eventParam_CameraPannedFromScript_Point_C));
}
int libGame_gf_CameraPannedFromScriptPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_CameraPannedFromScript_C, libGame_gv_eventParam_CameraPannedFromScript_Player_C));
}
void libGame_gf_CapturePointChangesOwner (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_CapturePointChangesOwner_C);
}
void libGame_gf_SendEventCapturePointChangesOwner (int lp_capturePointIndex, int lp_owner, playergroup lp_capturingPlayers, bool lp_hasMercLordTalent) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CapturePointChangesOwner_C, libGame_gv_eventParam_CapturePointChangesOwner_CapturePointIndex_C), lp_capturePointIndex);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CapturePointChangesOwner_C, libGame_gv_eventParam_CapturePointChangesOwner_Owner_C), lp_owner);
DataTableSetPlayerGroup(false, TriggerEventParamName(libGame_gv_eventID_CapturePointChangesOwner_C, libGame_gv_eventParam_CapturePointChangesOwner_CapturingPlayers_C), lp_capturingPlayers);
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_CapturePointChangesOwner_C, libGame_gv_eventParam_CapturePointChangesOwner_HasMercLordTalent_C), lp_hasMercLordTalent);
TriggerSendEvent(libGame_gv_eventID_CapturePointChangesOwner_C);
}
int libGame_gf_CapturePointChangesOwnerCapturePointIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_CapturePointChangesOwner_C, libGame_gv_eventParam_CapturePointChangesOwner_CapturePointIndex_C));
}
int libGame_gf_CapturePointChangesOwnerOwner () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_CapturePointChangesOwner_C, libGame_gv_eventParam_CapturePointChangesOwner_Owner_C));
}
playergroup libGame_gf_CapturePointChangesOwnerCapturingPlayers () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPlayerGroup(false, TriggerEventParamName(libGame_gv_eventID_CapturePointChangesOwner_C, libGame_gv_eventParam_CapturePointChangesOwner_CapturingPlayers_C));
}
bool libGame_gf_CapturePointChangesOwnerHasMercLordTalent () {
// Automatic Variable Declarations
// Implementation
return DataTableGetBool(false, TriggerEventParamName(libGame_gv_eventID_CapturePointChangesOwner_C, libGame_gv_eventParam_CapturePointChangesOwner_HasMercLordTalent_C));
}
void libGame_gf_CapturePointBecomesFullyOverCaptured (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_CapturePointBecomesFullyOverCaptured_C);
}
void libGame_gf_SendEventCapturePointBecomesFullyOverCaptured (int lp_capturePointIndex) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CapturePointBecomesFullyOverCaptured_C, libGame_gv_eventParam_CapturePointBecomesFullyOverCaptured_CapturePointIndex_C), lp_capturePointIndex);
TriggerSendEvent(libGame_gv_eventID_CapturePointBecomesFullyOverCaptured_C);
}
int libGame_gf_CapturePointBecomesFullyOverCapturedCapturePointIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_CapturePointBecomesFullyOverCaptured_C, libGame_gv_eventParam_CapturePointBecomesFullyOverCaptured_CapturePointIndex_C));
}
void libGame_gf_CustomTryMeModeSetLevel (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_CustomTryMeModeSetLevel_C);
}
void libGame_gf_SendEventCustomTryMeModeSetLevel (int lp_player, fixed lp_level) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CustomTryMeModeSetLevel_C, libGame_gv_eventParam_CustomTryMeModeSetLevel_Player_C), lp_player);
DataTableSetFixed(false, TriggerEventParamName(libGame_gv_eventID_CustomTryMeModeSetLevel_C, libGame_gv_eventParam_CustomTryMeModeSetLevel_Level_C), lp_level);
TriggerSendEvent(libGame_gv_eventID_CustomTryMeModeSetLevel_C);
}
int libGame_gf_CustomTryMeModeSetLevelPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_CustomTryMeModeSetLevel_C, libGame_gv_eventParam_CustomTryMeModeSetLevel_Player_C));
}
fixed libGame_gf_CustomTryMeModeSetLevelXPValue () {
// Automatic Variable Declarations
// Implementation
return DataTableGetFixed(false, TriggerEventParamName(libGame_gv_eventID_CustomTryMeModeSetLevel_C, libGame_gv_eventParam_CustomTryMeModeSetLevel_Level_C));
}
void libGame_gf_DebugHeroSwapped (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_DebugHeroSwapped_C);
}
void libGame_gf_SendEventDebugHeroSwapped (int lp_player) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_DebugHeroSwapped_C, libGame_gv_eventParam_DebugHeroSwapped_Player_C), lp_player);
TriggerSendEvent(libGame_gv_eventID_DebugHeroSwapped_C);
}
int libGame_gf_DebugHeroSwappedPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_DebugHeroSwapped_C, libGame_gv_eventParam_DebugHeroSwapped_Player_C));
}
void libGame_gf_JungleDefenderAIDefendersBeginFighting (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_JungleDefenderAIDefendersBeginFighting_C);
}
void libGame_gf_SendEventJungleDefenderAIDefendersBeginFighting (int lp_defenderAIIndex) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefendersBeginFighting_C, libGame_gv_eventParam_JungleDefenderAIDefendersBeginFighting_Index_C), lp_defenderAIIndex);
TriggerSendEvent(libGame_gv_eventID_JungleDefenderAIDefendersBeginFighting_C);
}
int libGame_gf_JungleDefenderAIDefendersBeginFightingIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefendersBeginFighting_C, libGame_gv_eventParam_JungleDefenderAIDefendersBeginFighting_Index_C));
}
void libGame_gf_JungleDefenderAIDefendersEndFighting (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_JungleDefenderAIDefendersEndFighting_C);
}
void libGame_gf_SendEventJungleDefenderAIDefendersEndFighting (int lp_defenderAIIndex) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefendersEndFighting_C, libGame_gv_eventParam_JungleDefenderAIDefendersEndFighting_Index_C), lp_defenderAIIndex);
TriggerSendEvent(libGame_gv_eventID_JungleDefenderAIDefendersEndFighting_C);
}
int libGame_gf_JungleDefenderAIDefendersEndFightingIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefendersEndFighting_C, libGame_gv_eventParam_JungleDefenderAIDefendersEndFighting_Index_C));
}
void libGame_gf_JungleDefenderAIDefenderKilled (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_JungleDefenderAIDefenderKilled_C);
}
void libGame_gf_SendEventJungleDefenderAIDefenderKilled (int lp_defenderAIIndex, unit lp_unit, int lp_killingPlayer) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefenderKilled_C, libGame_gv_eventParam_JungleDefenderAIDefenderKilled_Index_C), lp_defenderAIIndex);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefenderKilled_C, libGame_gv_eventParam_JungleDefenderAIDefenderKilled_Unit_C), lp_unit);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefenderKilled_C, libGame_gv_eventParam_JungleDefenderAIDefenderKilled_KillingPlayer_C), lp_killingPlayer);
TriggerSendEvent(libGame_gv_eventID_JungleDefenderAIDefenderKilled_C);
}
int libGame_gf_JungleDefenderAIDefenderKilledIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefenderKilled_C, libGame_gv_eventParam_JungleDefenderAIDefenderKilled_Index_C));
}
unit libGame_gf_JungleDefenderAIDefenderKilledUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefenderKilled_C, libGame_gv_eventParam_JungleDefenderAIDefenderKilled_Unit_C));
}
int libGame_gf_JungleDefenderAIDefenderKilledKillingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefenderKilled_C, libGame_gv_eventParam_JungleDefenderAIDefenderKilled_KillingPlayer_C));
}
void libGame_gf_JungleDefenderAIAllDefendersKilled (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_JungleDefenderAIAllDefendersKilled_C);
}
void libGame_gf_SendEventJungleDefenderAIAllDefendersKilled (int lp_defenderAIIndex, int lp_killingPlayer) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIAllDefendersKilled_C, libGame_gv_eventParam_JungleDefenderAIAllDefendersKilled_Index_C), lp_defenderAIIndex);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIAllDefendersKilled_C, libGame_gv_eventParam_JungleDefenderAIAllDefendersKilled_KillingPlayer_C), lp_killingPlayer);
TriggerSendEvent(libGame_gv_eventID_JungleDefenderAIAllDefendersKilled_C);
}
int libGame_gf_JungleDefenderAIAllDefendersKilledIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIAllDefendersKilled_C, libGame_gv_eventParam_JungleDefenderAIAllDefendersKilled_Index_C));
}
int libGame_gf_JungleDefenderAIAllDefendersKilledKillingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIAllDefendersKilled_C, libGame_gv_eventParam_JungleDefenderAIAllDefendersKilled_KillingPlayer_C));
}
void libGame_gf_JungleDefenderAIDefendersBeginFightingFromIdleOrLeashing (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_JungleDefenderAIDefendersBeginFightingFromIdleOrLeashing_C);
}
int libGame_gf_JungleDefenderAIDefendersBeginFightingFromIdleOrLeashingIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefendersBeginFightingFromIdleOrLeashing_C, libGame_gv_eventParam_JungleDefenderAIDefendersBeginFightingFromIdleOrLeashing_Index_C));
}
void libGame_gf_SendEventJungleDefenderAIDefendersBeginFightingFromIdleOrLeashing (int lp_defenderAIIndex) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefendersBeginFightingFromIdleOrLeashing_C, libGame_gv_eventParam_JungleDefenderAIDefendersBeginFightingFromIdleOrLeashing_Index_C), lp_defenderAIIndex);
TriggerSendEvent(libGame_gv_eventID_JungleDefenderAIDefendersBeginFightingFromIdleOrLeashing_C);
}
void libGame_gf_GameOpenTimerStarted (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_GateOpenTimerStarted_C);
}
void libGame_gf_SendEventGameOpenTimerStarted () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libGame_gv_eventID_GateOpenTimerStarted_C);
}
void libGame_gf_TownDataInitialized (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_TownDataInitialized_C);
}
void libGame_gf_SendEventTownDataInitialized () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libGame_gv_eventID_TownDataInitialized_C);
}
void libGame_gf_GameOverEvent (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_GameOverEvent_C);
}
void libGame_gf_SendEventGameOverEvent () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libGame_gv_eventID_GameOverEvent_C);
}
void libGame_gf_HeroAIStartingCampAttack (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroAIStartingCampAttack_C);
}
void libGame_gf_SendEventHeroAIStartingCampAttack (int lp_teamIndex, int lp_campIndex) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroAIStartingCampAttack_C, libGame_gv_eventParam_HeroAIStartingCampAttack_TeamIndex_C), lp_teamIndex);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroAIStartingCampAttack_C, libGame_gv_eventParam_HeroAIStartingCampAttack_CampIndex_C), lp_campIndex);
TriggerSendEvent(libGame_gv_eventID_HeroAIStartingCampAttack_C);
}
int libGame_gf_HeroAIStartingCampAttackTeamIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroAIStartingCampAttack_C, libGame_gv_eventParam_HeroAIStartingCampAttack_TeamIndex_C));
}
int libGame_gf_HeroAIStartingCampAttackCampIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroAIStartingCampAttack_C, libGame_gv_eventParam_HeroAIStartingCampAttack_CampIndex_C));
}
void libGame_gf_HeroAIEndingCampAttack (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroAIEndingCampAttack_C);
}
void libGame_gf_SendEventHeroAIEndingCampAttack (int lp_teamIndex, int lp_campIndex, bool lp_success) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroAIEndingCampAttack_C, libGame_gv_eventParam_HeroAIEndingCampAttack_TeamIndex_C), lp_teamIndex);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroAIEndingCampAttack_C, libGame_gv_eventParam_HeroAIEndingCampAttack_CampIndex_C), lp_campIndex);
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_HeroAIEndingCampAttack_C, libGame_gv_eventParam_HeroAIEndingCampAttack_Success_C), lp_success);
TriggerSendEvent(libGame_gv_eventID_HeroAIEndingCampAttack_C);
}
int libGame_gf_HeroAIEndingCampAttackTeamIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroAIEndingCampAttack_C, libGame_gv_eventParam_HeroAIEndingCampAttack_TeamIndex_C));
}
int libGame_gf_HeroAIEndingCampAttackCampIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroAIEndingCampAttack_C, libGame_gv_eventParam_HeroAIEndingCampAttack_CampIndex_C));
}
bool libGame_gf_HeroAIEndingCampAttackSuccess () {
// Automatic Variable Declarations
// Implementation
return DataTableGetBool(false, TriggerEventParamName(libGame_gv_eventID_HeroAIEndingCampAttack_C, libGame_gv_eventParam_HeroAIEndingCampAttack_Success_C));
}
void libGame_gf_HeroParticipatedInCreepTakedown (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroParticipatedInCreepTakedown_C);
}
void libGame_gf_SendEventHeroParticipatedInCreepTakedown (int lp_player, unit lp_unit) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInCreepTakedown_C, libGame_gv_eventParam_HeroParticipatedInCreepTakedown_Player_C), lp_player);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInCreepTakedown_C, libGame_gv_eventParam_HeroParticipatedInCreepTakedown_NPC_C), lp_unit);
TriggerSendEvent(libGame_gv_eventID_HeroParticipatedInCreepTakedown_C);
}
int libGame_gf_HeroParticipatedInCreepTakedownKillingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInCreepTakedown_C, libGame_gv_eventParam_HeroParticipatedInCreepTakedown_Player_C));
}
unit libGame_gf_HeroParticipatedInCreepTakedownCreep () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInCreepTakedown_C, libGame_gv_eventParam_HeroParticipatedInCreepTakedown_NPC_C));
}
void libGame_gf_ClearHeroSpecificUI (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_ClearHeroSpecificUI_C);
}
void libGame_gf_SendEventClearHeroSpecificUI () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libGame_gv_eventID_ClearHeroSpecificUI_C);
}
void libGame_gf_HeroExitedTransport (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroExitedTransport_C);
}
void libGame_gf_SendEventHeroExitedTransport (int lp_player, unit lp_unit) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroExitedTransport_C, libGame_gv_eventParam_HeroExitedTransport_Player_C), lp_player);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroExitedTransport_C, libGame_gv_eventParam_HeroExitedTransport_Transport_C), lp_unit);
TriggerSendEvent(libGame_gv_eventID_HeroExitedTransport_C);
}
int libGame_gf_HeroExitingTransportPlayerExiting () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroExitedTransport_C, libGame_gv_eventParam_HeroExitedTransport_Player_C));
}
unit libGame_gf_HeroExitingTransportTransport () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroExitedTransport_C, libGame_gv_eventParam_HeroExitedTransport_Transport_C));
}
void libGame_gf_HeroEnteredTransport (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroEnteredTransport_C);
}
void libGame_gf_SendEventHeroEnteredTransport (int lp_player, unit lp_transportUnit, unit lp_cargoUnit) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroEnteredTransport_C, libGame_gv_eventParam_HeroEnteredTransport_Player_C), lp_player);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroEnteredTransport_C, libGame_gv_eventParam_HeroEnteredTransport_Transport_C), lp_transportUnit);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroEnteredTransport_C, libGame_gv_eventParam_HeroEnteredTransport_CargoUnit_C), lp_cargoUnit);
TriggerSendEvent(libGame_gv_eventID_HeroEnteredTransport_C);
}
int libGame_gf_HeroEnteredTransportPlayerEntering () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroEnteredTransport_C, libGame_gv_eventParam_HeroEnteredTransport_Player_C));
}
unit libGame_gf_HeroEnteredTransportTransport () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroEnteredTransport_C, libGame_gv_eventParam_HeroEnteredTransport_Transport_C));
}
unit libGame_gf_HeroEnteredTransportCargoUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroEnteredTransport_C, libGame_gv_eventParam_HeroEnteredTransport_CargoUnit_C));
}
void libGame_gf_HeroLevelUp (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroLevelUp_C);
}
void libGame_gf_SendEventHeroLevelUp (int lp_player, int lp_level) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroLevelUp_C, libGame_gv_eventParam_HeroLevelUp_Player), lp_player);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroLevelUp_C, libGame_gv_eventParam_HeroLevelUp_Level), lp_level);
TriggerSendEvent(libGame_gv_eventID_HeroLevelUp_C);
}
int libGame_gf_HeroLevelUpPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroLevelUp_C, libGame_gv_eventParam_HeroLevelUp_Player));
}
int libGame_gf_HeroLevelUpLevel () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroLevelUp_C, libGame_gv_eventParam_HeroLevelUp_Level));
}
void libGame_gf_HeroSpecialCaseMounting (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroSpecialCaseMounting_C);
}
void libGame_gf_SendEventHeroSpecialCaseMounting (int lp_player) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroSpecialCaseMounting_C, libGame_gv_eventParam_HeroSpecialCaseMounting_Player_C), lp_player);
TriggerSendEvent(libGame_gv_eventID_HeroSpecialCaseMounting_C);
}
int libGame_gf_HeroSpecialCaseMountingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroSpecialCaseMounting_C, libGame_gv_eventParam_HeroSpecialCaseMounting_Player_C));
}
void libGame_gf_HeroPortedBackToTown (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroPortedBackToTown_C);
}
void libGame_gf_SendEventHeroPortedBackToTown (int lp_player, unit lp_unit) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroPortedBackToTown_C, libGame_gv_eventParam_HeroPortedBackToTown_Player_C), lp_player);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroPortedBackToTown_C, libGame_gv_eventParam_HeroPortedBackToTown_Unit_C), lp_unit);
TriggerSendEvent(libGame_gv_eventID_HeroPortedBackToTown_C);
}
int libGame_gf_HeroPortedBackToTownPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroPortedBackToTown_C, libGame_gv_eventParam_HeroPortedBackToTown_Player_C));
}
unit libGame_gf_HeroPortedBackToTownUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroPortedBackToTown_C, libGame_gv_eventParam_HeroPortedBackToTown_Unit_C));
}
void libGame_gf_HeroParticipatedInNPCTakedown (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroParticipatedInNPCTakedown_C);
}
void libGame_gf_SendEventHeroParticipatedInNPCTakedown (int lp_player, unit lp_unit) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInNPCTakedown_C, libGame_gv_eventParam_HeroParticipatedInNPCTakedown_Player_C), lp_player);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInNPCTakedown_C, libGame_gv_eventParam_HeroParticipatedInNPCTakedown_NPC_C), lp_unit);
TriggerSendEvent(libGame_gv_eventID_HeroParticipatedInNPCTakedown_C);
}
int libGame_gf_HeroParticipatedInNPCTakedownKillingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInNPCTakedown_C, libGame_gv_eventParam_HeroParticipatedInNPCTakedown_Player_C));
}
unit libGame_gf_HeroParticipatedInNPCTakedownMinion () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInNPCTakedown_C, libGame_gv_eventParam_HeroParticipatedInNPCTakedown_NPC_C));
}
void libGame_gf_HeroWitnessedAlliedNPCDeath (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroWitnessedAlliedNPCDeath_C);
}
void libGame_gf_SendEventHeroWitnessedAlliedNPCDeath (int lp_player, unit lp_unit) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroWitnessedAlliedNPCDeath_C, libGame_gv_eventParam_HeroWitnessedAlliedNPCDeath_Player_C), lp_player);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroWitnessedAlliedNPCDeath_C, libGame_gv_eventParam_HeroWitnessedAlliedNPCDeath_NPC_C), lp_unit);
TriggerSendEvent(libGame_gv_eventID_HeroWitnessedAlliedNPCDeath_C);
}
int libGame_gf_HeroWitnessedAlliedNPCDeathAlliedPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroWitnessedAlliedNPCDeath_C, libGame_gv_eventParam_HeroWitnessedAlliedNPCDeath_Player_C));
}
unit libGame_gf_HeroWitnessedAlliedNPCDeathMinion () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroWitnessedAlliedNPCDeath_C, libGame_gv_eventParam_HeroWitnessedAlliedNPCDeath_NPC_C));
}
void libGame_gf_SpecialCaseParticipatedInNPCTakedown (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_SpecialCaseUnitParticipatedInNPCTakedown_C);
}
void libGame_gf_SendEventSpecialCaseUnitParticipatedInNPCTakedown (int lp_player, unit lp_unit) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_SpecialCaseUnitParticipatedInNPCTakedown_C, libGame_gv_eventParam_SpecialCaseUnitParticipatedInNPCTakedown_Player_C), lp_player);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_SpecialCaseUnitParticipatedInNPCTakedown_C, libGame_gv_eventParam_SpecialCaseUnitParticipatedInNPCTakedown_NPC_C), lp_unit);
TriggerSendEvent(libGame_gv_eventID_SpecialCaseUnitParticipatedInNPCTakedown_C);
}
int libGame_gf_SpecialCaseUnitParticipatedInNPCTakedownPlayerParticipant () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_SpecialCaseUnitParticipatedInNPCTakedown_C, libGame_gv_eventParam_SpecialCaseUnitParticipatedInNPCTakedown_Player_C));
}
unit libGame_gf_SpecialCaseUnitParticipatedInNPCTakedownMinion () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_SpecialCaseUnitParticipatedInNPCTakedown_C, libGame_gv_eventParam_SpecialCaseUnitParticipatedInNPCTakedown_NPC_C));
}
void libGame_gf_HeroParticipatedInTakedown (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroParticipatedInTakedown_C);
}
void libGame_gf_SendEventHeroParticipatedInTakedowndepreciated (int lp_playerKilling, int lp_playerKilled, unit lp_heroKilled) {
// Automatic Variable Declarations
// Deprecated
libGame_gf_SendEventHeroParticipatedInTakedown(0, lp_playerKilling, lp_playerKilled, lp_heroKilled, UnitGetPosition(lp_heroKilled));
}
void libGame_gf_SendEventHeroParticipatedInTakedown (int lp_lastHitPlayer, int lp_playerKilling, int lp_playerKilled, unit lp_heroKilled, point lp_heroKilledPosition) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInTakedown_C, libGame_gv_eventParam_HeroParticipatedInTakedown_LastHitPlayer_C), lp_lastHitPlayer);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInTakedown_C, libGame_gv_eventParam_HeroParticipatedInTakedown_PlayerKilling_C), lp_playerKilling);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInTakedown_C, libGame_gv_eventParam_HeroParticipatedInTakedown_PlayerKilled_C), lp_playerKilled);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInTakedown_C, libGame_gv_eventParam_HeroParticipatedInTakedown_HeroKilled_C), lp_heroKilled);
DataTableSetPoint(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInTakedown_C, libGame_gv_eventParam_HeroParticipatedInTakedown_HeroKilledPosition_C), lp_heroKilledPosition);
TriggerSendEvent(libGame_gv_eventID_HeroParticipatedInTakedown_C);
SoundPlayOnUnitForPlayer(SoundLink("XP_Gain_Direct", -1), c_maxPlayers, PlayerGroupSingle(lp_playerKilling), lp_heroKilled, 0.0, 100.0, 0.0);
}
int libGame_gf_HeroParticipatedInTakedownKillingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInTakedown_C, libGame_gv_eventParam_HeroParticipatedInTakedown_PlayerKilling_C));
}
int libGame_gf_HeroParticipatedInTakedownLastHitPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInTakedown_C, libGame_gv_eventParam_HeroParticipatedInTakedown_LastHitPlayer_C));
}
int libGame_gf_HeroParticipatedInTakedownKilledPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInTakedown_C, libGame_gv_eventParam_HeroParticipatedInTakedown_PlayerKilled_C));
}
unit libGame_gf_HeroParticipatedInTakedownKilledHero () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInTakedown_C, libGame_gv_eventParam_HeroParticipatedInTakedown_HeroKilled_C));
}
point libGame_gf_HeroParticipatedInTakedownKilledHeroPosition () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPoint(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInTakedown_C, libGame_gv_eventParam_HeroParticipatedInTakedown_HeroKilledPosition_C));
}
void libGame_gf_HeroKilled (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroKilled_C);
}
void libGame_gf_SendEventHeroKilled (int lp_playerKilling, unit lp_killedUnit) {
// Automatic Variable Declarations
// Implementation
if (((lp_playerKilling < 1) || (lp_playerKilling > libCore_gv_bALMaxEnginePlayerCount))) {
TextExpressionSetToken("Param/Expression/lib_Game_60EAAD3B", "A", IntToText(lp_playerKilling));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_60EAAD3B"), true);
return ;
}
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroKilled_C, libGame_gv_eventParam_HeroKilled_PlayerKilling_C), lp_playerKilling);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroKilled_C, libGame_gv_eventParam_HeroKilled_KilledUnit_C), lp_killedUnit);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroKilled_C, libGame_gv_eventParam_HeroKilled_PlayerKilled_C), UnitGetOwner(lp_killedUnit));
DataTableSetPoint(false, TriggerEventParamName(libGame_gv_eventID_HeroKilled_C, libGame_gv_eventParam_HeroKilled_Location_C), UnitGetPosition(lp_killedUnit));
TriggerSendEvent(libGame_gv_eventID_HeroKilled_C);
}
int libGame_gf_HeroKilledKillingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroKilled_C, libGame_gv_eventParam_HeroKilled_PlayerKilling_C));
}
int libGame_gf_HeroKilledPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroKilled_C, libGame_gv_eventParam_HeroKilled_PlayerKilled_C));
}
point libGame_gf_HeroKilledLocation () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPoint(false, TriggerEventParamName(libGame_gv_eventID_HeroKilled_C, libGame_gv_eventParam_HeroKilled_Location_C));
}
unit libGame_gf_HeroKilledUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroKilled_C, libGame_gv_eventParam_HeroKilled_KilledUnit_C));
}
void libGame_gf_HeroAllyKilled (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroAllyKilled_C);
}
void libGame_gf_SendEventHeroAllyKilled (int lp_playerKilling, unit lp_killedUnit) {
// Automatic Variable Declarations
// Implementation
if (((lp_playerKilling < 1) || (lp_playerKilling > libCore_gv_bALMaxEnginePlayerCount))) {
TextExpressionSetToken("Param/Expression/lib_Game_1219366A", "A", IntToText(lp_playerKilling));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_1219366A"), true);
return ;
}
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroAllyKilled_C, libGame_gv_eventParam_HeroAllyKilled_PlayerKilling_C), lp_playerKilling);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroAllyKilled_C, libGame_gv_eventParam_HeroAllyKilled_KilledUnit_C), lp_killedUnit);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroAllyKilled_C, libGame_gv_eventParam_HeroAllyKilled_PlayerKilled_C), UnitGetOwner(lp_killedUnit));
DataTableSetPoint(false, TriggerEventParamName(libGame_gv_eventID_HeroAllyKilled_C, libGame_gv_eventParam_HeroAllyKilled_Location_C), UnitGetPosition(lp_killedUnit));
TriggerSendEvent(libGame_gv_eventID_HeroAllyKilled_C);
}
int libGame_gf_HeroAllyKilledKillingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroAllyKilled_C, libGame_gv_eventParam_HeroAllyKilled_PlayerKilling_C));
}
int libGame_gf_HeroAllyKilledPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroAllyKilled_C, libGame_gv_eventParam_HeroAllyKilled_PlayerKilled_C));
}
point libGame_gf_HeroAllyKilledLocation () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPoint(false, TriggerEventParamName(libGame_gv_eventID_HeroAllyKilled_C, libGame_gv_eventParam_HeroAllyKilled_Location_C));
}
unit libGame_gf_HeroAllyKilledUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroAllyKilled_C, libGame_gv_eventParam_HeroAllyKilled_KilledUnit_C));
}
void libGame_gf_HeroSpawn (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroSpawn_C);
}
void libGame_gf_SendEventHeroSpawn (int lp_player) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroSpawn_C, libGame_gv_eventParam_HeroSpawn_Player_C), lp_player);
TriggerSendEvent(libGame_gv_eventID_HeroSpawn_C);
}
int libGame_gf_HeroSpawnPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroSpawn_C, libGame_gv_eventParam_HeroSpawn_Player_C));
}
void libGame_gf_ManualHeroSpawn (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_ManualHeroSpawn_C);
}
void libGame_gf_SendEventManualHeroSpawn (int lp_player, int lp_heroID, fixed lp_debugXP, point lp_location) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_ManualHeroSpawn_C, libGame_gv_eventParam_ManualHeroSpawn_Player_C), lp_player);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_ManualHeroSpawn_C, libGame_gv_eventParam_ManualHeroSpawn_HeroID_C), lp_heroID);
DataTableSetFixed(false, TriggerEventParamName(libGame_gv_eventID_ManualHeroSpawn_C, libGame_gv_eventParam_ManualHeroSpawn_DebugXP_C), lp_debugXP);
DataTableSetPoint(false, TriggerEventParamName(libGame_gv_eventID_ManualHeroSpawn_C, libGame_gv_eventParam_ManualHeroSpawn_Location), lp_location);
TriggerSendEvent(libGame_gv_eventID_ManualHeroSpawn_C);
}
int libGame_gf_ManualHeroSpawnPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_ManualHeroSpawn_C, libGame_gv_eventParam_ManualHeroSpawn_Player_C));
}
int libGame_gf_ManualHeroSpawnHeroID () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_ManualHeroSpawn_C, libGame_gv_eventParam_ManualHeroSpawn_HeroID_C));
}
fixed libGame_gf_ManualHeroSpawnDebugXP () {
// Automatic Variable Declarations
// Implementation
return DataTableGetFixed(false, TriggerEventParamName(libGame_gv_eventID_ManualHeroSpawn_C, libGame_gv_eventParam_ManualHeroSpawn_DebugXP_C));
}
point libGame_gf_ManualHeroSpawnLocation () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPoint(false, TriggerEventParamName(libGame_gv_eventID_ManualHeroSpawn_C, libGame_gv_eventParam_ManualHeroSpawn_Location));
}
void libGame_gf_RequestCustomRespawn (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_RequestCustomRespawn_C);
}
void libGame_gf_SendEventRequestCustomRespawn (int lp_player, bool lp_respawnMounted, point lp_reSpawnLocation, int lp_reSpawnHealthPercent) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_RequestCustomRespawn_C, libGame_gv_eventParam_RequestCustomRespawn_Player_C), lp_player);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_RequestCustomRespawn_C, libGame_gv_eventParam_RequestCustomRespawn_RespawnHealthPercent_C), lp_reSpawnHealthPercent);
DataTableSetPoint(false, TriggerEventParamName(libGame_gv_eventID_RequestCustomRespawn_C, libGame_gv_eventParam_RequestCustomRespawn_RespawnLocation_C), lp_reSpawnLocation);
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_RequestCustomRespawn_C, libGame_gv_eventParam_RequestCustomRespawn_RespawnMounted_C), lp_respawnMounted);
TriggerSendEvent(libGame_gv_eventID_RequestCustomRespawn_C);
}
int libGame_gf_RequestCustomRespawnPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_RequestCustomRespawn_C, libGame_gv_eventParam_RequestCustomRespawn_Player_C));
}
point libGame_gf_RequestCustomRespawnRespawnLocation () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPoint(false, TriggerEventParamName(libGame_gv_eventID_RequestCustomRespawn_C, libGame_gv_eventParam_RequestCustomRespawn_RespawnLocation_C));
}
bool libGame_gf_RequestCustomRespawnRespawnMounted () {
// Automatic Variable Declarations
// Implementation
return DataTableGetBool(false, TriggerEventParamName(libGame_gv_eventID_RequestCustomRespawn_C, libGame_gv_eventParam_RequestCustomRespawn_RespawnMounted_C));
}
int libGame_gf_RequestCustomRespawnRespawnHealthPercent () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_RequestCustomRespawn_C, libGame_gv_eventParam_RequestCustomRespawn_RespawnHealthPercent_C));
}
void libGame_gf_HeroRespawn (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroRespawn_C);
}
void libGame_gf_SendEventHeroRespawn (int lp_player, unit lp_unit) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroRespawn_C, libGame_gv_eventParam_HeroRespawn_Player_C), lp_player);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroRespawn_C, libGame_gv_eventParam_HeroRespawn_RespawnUnit_C), lp_unit);
TriggerSendEvent(libGame_gv_eventID_HeroRespawn_C);
}
int libGame_gf_HeroRespawnPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroRespawn_C, libGame_gv_eventParam_HeroRespawn_Player_C));
}
unit libGame_gf_HeroRespawnUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroRespawn_C, libGame_gv_eventParam_HeroRespawn_RespawnUnit_C));
}
void libGame_gf_HeroGainTalent (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroGainTalent_C);
}
void libGame_gf_SendEventHeroGainTalent (string lp_GainedTalent, int lp_player) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroGainTalent_C, libGame_gv_eventParam_HeroGainTalent_Player), lp_player);
DataTableSetString(false, TriggerEventParamName(libGame_gv_eventID_HeroGainTalent_C, libGame_gv_eventParam_HeroGainTalent_Gained_Talent), lp_GainedTalent);
TriggerSendEvent(libGame_gv_eventID_HeroGainTalent_C);
}
int libGame_gf_HeroGainTalentPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroGainTalent_C, libGame_gv_eventParam_HeroGainTalent_Player));
}
string libGame_gf_HeroGainTalentGainedTalent () {
// Automatic Variable Declarations
// Implementation
return (DataTableGetString(false, TriggerEventParamName(libGame_gv_eventID_HeroGainTalent_C, libGame_gv_eventParam_HeroGainTalent_Gained_Talent)));
}
void libGame_gf_HeroRespecsTalents (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroRespecsTalents_C);
}
void libGame_gf_SendEventHeroRespecsTalents (int lp_player) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroRespecsTalents_C, libGame_gv_eventParam_HeroRespecsTalents_Player), lp_player);
TriggerSendEvent(libGame_gv_eventID_HeroRespecsTalents_C);
}
int libGame_gf_HeroRespecsTalentsPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroRespecsTalents_C, libGame_gv_eventParam_HeroRespecsTalents_Player));
}
void libGame_gf_HeroMindControlsNPC (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_EventID_HeroMindControlsNPC_C);
}
void libGame_gf_SendEventHeroMindControlsNPC (unit lp_mindControlledUnit, int lp_originalOwner) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_EventID_HeroMindControlsNPC_C, libGame_gv_eventParam_HeroMindControlsNPC_NPCUnit_C), lp_mindControlledUnit);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_EventID_HeroMindControlsNPC_C, libGame_gv_eventParam_HeroMindControlsNPC_OriginalOwner_C), lp_originalOwner);
TriggerSendEvent(libGame_gv_EventID_HeroMindControlsNPC_C);
}
unit libGame_gf_HeroMindControlsNPCNPCUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_EventID_HeroMindControlsNPC_C, libGame_gv_eventParam_HeroMindControlsNPC_NPCUnit_C));
}
int libGame_gf_HeroMindControlsNPCOriginalOwner () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_EventID_HeroMindControlsNPC_C, libGame_gv_eventParam_HeroMindControlsNPC_OriginalOwner_C));
}
void libGame_gf_HeroEntersSpecialDeathState (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroEntersSpecialDeathState_C);
}
void libGame_gf_SendEventHeroEntersSpecialDeathState (unit lp_hero) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroEntersSpecialDeathState_C, libGame_gv_eventParam_HeroEntersSpecialDeathState_Unit_C), lp_hero);
TriggerSendEvent(libGame_gv_eventID_HeroEntersSpecialDeathState_C);
}
unit libGame_gf_HeroEntersSpecialDeathStateHero () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroEntersSpecialDeathState_C, libGame_gv_eventParam_HeroEntersSpecialDeathState_Unit_C));
}
void libGame_gf_CheckUnitForAbilityRedirect (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_CheckUnitForAbilityRedirect_C);
}
void libGame_gf_SendEventCheckUnitForAbilityRedirect (unit lp_Unit, unit lp_TargetUnit, bool lp_boolean, point lp_point) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_CheckUnitForAbilityRedirect_C, libGame_gv_eventParam_CheckUnitForAbilityRedirect_Unit_C), lp_Unit);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_CheckUnitForAbilityRedirect_C, libGame_gv_eventParam_CheckUnitForAbilityRedirect_Target_C), lp_TargetUnit);
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_CheckUnitForAbilityRedirect_C, libGame_gv_eventParam_CheckUnitForAbilityRedirect_Boolean_C), lp_boolean);
DataTableSetPoint(false, TriggerEventParamName(libGame_gv_eventID_CheckUnitForAbilityRedirect_C, libGame_gv_eventParam_CheckUnitForAbilityRedirect_Point_C), lp_point);
TriggerSendEvent(libGame_gv_eventID_CheckUnitForAbilityRedirect_C);
}
unit libGame_gf_CheckUnitForAbilityRedirectUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_CheckUnitForAbilityRedirect_C, libGame_gv_eventParam_CheckUnitForAbilityRedirect_Unit_C));
}
unit libGame_gf_CheckUnitForAbilityRedirectTarget () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_CheckUnitForAbilityRedirect_C, libGame_gv_eventParam_CheckUnitForAbilityRedirect_Target_C));
}
bool libGame_gf_CheckUnitForAbilityRedirectBoolean () {
// Automatic Variable Declarations
// Implementation
return DataTableGetBool(false, TriggerEventParamName(libGame_gv_eventID_CheckUnitForAbilityRedirect_C, libGame_gv_eventParam_CheckUnitForAbilityRedirect_Boolean_C));
}
point libGame_gf_CheckUnitForAbilityRedirectPoint () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPoint(false, TriggerEventParamName(libGame_gv_eventID_CheckUnitForAbilityRedirect_C, libGame_gv_eventParam_CheckUnitForAbilityRedirect_Point_C));
}
void libGame_gf_SpecialCaseTalentCooldownReset (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_SpecialCaseTalentCooldownReset_C);
}
void libGame_gf_SendEventSpecialCaseTalentCooldownReset (int lp_player) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_SpecialCaseTalentCooldownReset_C, libGame_gv_eventParam_SpecialCaseTalentCooldownReset_Player_C), lp_player);
TriggerSendEvent(libGame_gv_eventID_SpecialCaseTalentCooldownReset_C);
}
int libGame_gf_SpecialCaseTalentCooldownResetPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_SpecialCaseTalentCooldownReset_C, libGame_gv_eventParam_SpecialCaseTalentCooldownReset_Player_C));
}
void libGame_gf_HeroUnitSwappedForPlayer (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_HeroUnitSwappedForPlayer_C);
}
void libGame_gf_SendEventHeroUnitSwappedForPlayer (unit lp_oldUnit, unit lp_newUnit, int lp_playerNumber, bool lp_preserveOnOld) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroUnitSwappedForPlayer_C, libGame_gv_eventParam_HeroUnitSwappedForPlayer_OldUnit_C), lp_oldUnit);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroUnitSwappedForPlayer_C, libGame_gv_eventParam_HeroUnitSwappedForPlayer_NewUnit_C), lp_newUnit);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroUnitSwappedForPlayer_C, libGame_gv_eventParam_HeroUnitSwappedForPlayer_PlayerNumber_C), lp_playerNumber);
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_HeroUnitSwappedForPlayer_C, libGame_gv_eventParam_HeroUnitSwappedForPlayer_PreserveOnOld_C), lp_preserveOnOld);
TriggerSendEvent(libGame_gv_eventID_HeroUnitSwappedForPlayer_C);
}
unit libGame_gf_HeroUnitSwappedForPlayerOldUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroUnitSwappedForPlayer_C, libGame_gv_eventParam_HeroUnitSwappedForPlayer_OldUnit_C));
}
unit libGame_gf_HeroUnitSwappedForPlayerNewUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroUnitSwappedForPlayer_C, libGame_gv_eventParam_HeroUnitSwappedForPlayer_NewUnit_C));
}
int libGame_gf_HeroUnitSwappedForPlayerPlayerNumber () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_HeroUnitSwappedForPlayer_C, libGame_gv_eventParam_HeroUnitSwappedForPlayer_PlayerNumber_C));
}
bool libGame_gf_HeroUnitSwappedForPlayerPreserveOnOld () {
// Automatic Variable Declarations
// Implementation
return DataTableGetBool(false, TriggerEventParamName(libGame_gv_eventID_HeroUnitSwappedForPlayer_C, libGame_gv_eventParam_HeroUnitSwappedForPlayer_PreserveOnOld_C));
}
void libGame_gf_JungleCampSpawning (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_JungleCampStartedSpawning_C);
}
void libGame_gf_SendEventJungleCampSpawning (int lp_camp) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleCampStartedSpawning_C, libGame_gv_eventParam_JungleCampStartedSpawning_Camp_C), lp_camp);
TriggerSendEvent(libGame_gv_eventID_JungleCampStartedSpawning_C);
}
int libGame_gf_JungleCampSpawningIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleCampStartedSpawning_C, libGame_gv_eventParam_JungleCampStartedSpawning_Camp_C));
}
void libGame_gf_JungleCampSpawned (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_JungleCampSpawned_C);
}
void libGame_gf_SendEventJungleCampSpawned (int lp_camp) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleCampSpawned_C, libGame_gv_eventParam_JungleCampSpawned_Camp_C), lp_camp);
TriggerSendEvent(libGame_gv_eventID_JungleCampSpawned_C);
}
int libGame_gf_JungleCampSpawnedIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_JungleCampSpawned_C, libGame_gv_eventParam_JungleCampSpawned_Camp_C));
}
void libGame_gf_JungleCampDefenderCreated (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_JungleCampDefenderCreated_C);
}
void libGame_gf_SendEventJungleCampDefenderCreated (unit lp_unit) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_JungleCampDefenderCreated_C, libGame_gv_eventParam_JungleCampDefenderCreated_C), lp_unit);
TriggerSendEvent(libGame_gv_eventID_JungleCampDefenderCreated_C);
}
unit libGame_gf_JungleCampDefenderUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_JungleCampDefenderCreated_C, libGame_gv_eventParam_JungleCampDefenderCreated_C));
}
void libGame_gf_JungleCampLanerCreated (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_JungleCampLanerCreated_C);
}
void libGame_gf_SendEventJungleCampLanerCreated (unit lp_unit) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_JungleCampLanerCreated_C, libGame_gv_eventParam_JungleCampLanerCreated_C), lp_unit);
TriggerSendEvent(libGame_gv_eventID_JungleCampLanerCreated_C);
}
unit libGame_gf_JungleCampLanerUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_JungleCampLanerCreated_C, libGame_gv_eventParam_JungleCampLanerCreated_C));
}
void libGame_gf_MercCampCaptured (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MercCampCaptured_C);
}
void libGame_gf_SendEventMercCampCaptured (int lp_camp, int lp_owner, playergroup lp_capturingPlayers) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MercCampCaptured_C, libGame_gv_eventParam_MercCampCaptured_Index_C), lp_camp);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MercCampCaptured_C, libGame_gv_eventParam_MercCampCaptured_Owner_C), lp_owner);
DataTableSetPlayerGroup(false, TriggerEventParamName(libGame_gv_eventID_MercCampCaptured_C, libGame_gv_eventParam_MercCampCaptured_CapturingPlayers_C), lp_capturingPlayers);
TriggerSendEvent(libGame_gv_eventID_MercCampCaptured_C);
}
int libGame_gf_MercCampCapturedIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MercCampCaptured_C, libGame_gv_eventParam_MercCampCaptured_Index_C));
}
int libGame_gf_MercCampCapturedOwner () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MercCampCaptured_C, libGame_gv_eventParam_MercCampCaptured_Owner_C));
}
playergroup libGame_gf_MercCampCapturedCapturingPlayers () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPlayerGroup(false, TriggerEventParamName(libGame_gv_eventID_MercCampCaptured_C, libGame_gv_eventParam_MercCampCaptured_Index_C));
}
void libGame_gf_MapMechanicInitialization (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapMechanicInit_C);
}
void libGame_gf_SendEventMapMechanicInitialization (string lp_mechanic) {
// Automatic Variable Declarations
// Implementation
DataTableSetString(false, TriggerEventParamName(libGame_gv_eventID_MapMechanicInit_C, libGame_gv_eventParam_MapMechanicInit_Mechanic_C), lp_mechanic);
TriggerSendEvent(libGame_gv_eventID_MapMechanicInit_C);
}
string libGame_gf_MapMechanicInitializationMechanicType () {
// Variable Declarations
string lv_value;
// Automatic Variable Declarations
// Variable Initialization
lv_value = "";
// Implementation
lv_value = DataTableGetString(false, TriggerEventParamName(libGame_gv_eventID_MapMechanicInit_C, libGame_gv_eventParam_MapMechanicInit_Mechanic_C));
return lv_value;
}
void libGame_gf_MapObjectiveCapturedByUnit (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_UnitCapturedMapObjective_C);
}
void libGame_gf_SendEventMapObjectiveCapturedByUnit (unit lp_capturingUnit) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitCapturedMapObjective_C, libGame_gv_eventParam_UnitCapturedMapObjective_Unit_C), lp_capturingUnit);
TriggerSendEvent(libGame_gv_eventID_UnitCapturedMapObjective_C);
}
unit libGame_gf_MapObjectiveCapturingUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitCapturedMapObjective_C, libGame_gv_eventParam_UnitCapturedMapObjective_Unit_C));
}
void libGame_gf_MapCursedHollowTributeWarning (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapTributeWarning_C);
}
void libGame_gf_SendEventMapCursedHollowTributeWarning (point lp_position) {
// Automatic Variable Declarations
// Implementation
DataTableSetPoint(false, TriggerEventParamName(libGame_gv_eventID_MapTributeWarning_C, libGame_gv_eventParam_MapTributeWarning_Position_C), lp_position);
TriggerSendEvent(libGame_gv_eventID_MapTributeWarning_C);
}
point libGame_gf_MapCursedHollowTributeWarningPosition () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPoint(false, TriggerEventParamName(libGame_gv_eventID_MapTributeWarning_C, libGame_gv_eventParam_MapTributeWarning_Position_C));
}
void libGame_gf_MapCursedHollowTributeSpawned (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapTributeSpawned_C);
}
void libGame_gf_SendEventMapCursedHollowTributeSpawned (unit lp_tribute) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapTributeSpawned_C, libGame_gv_eventParam_MapTributeSpawned_Tribute_C), lp_tribute);
TriggerSendEvent(libGame_gv_eventID_MapTributeSpawned_C);
}
unit libGame_gf_MapCursedHollowTributeSpawnedUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapTributeSpawned_C, libGame_gv_eventParam_MapTributeSpawned_Tribute_C));
}
void libGame_gf_MapCursedHollowTributePickedUp (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapTributePickedup_C);
}
void libGame_gf_SendEventMapCursedHollowTributePickedUp (int lp_player, point lp_positioin) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapTributePickedup_C, libGame_gv_eventParam_MapTributePickedup_Player_C), lp_player);
DataTableSetPoint(false, TriggerEventParamName(libGame_gv_eventID_MapTributePickedup_C, libGame_gv_eventParam_MapTributePickedup_Position_C), lp_positioin);
TriggerSendEvent(libGame_gv_eventID_MapTributePickedup_C);
}
int libGame_gf_MapCursedHollowTributePickedUpPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapTributePickedup_C, libGame_gv_eventParam_MapTributePickedup_Player_C));
}
point libGame_gf_MapCursedHollowTributePickedUpPosition () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPoint(false, TriggerEventParamName(libGame_gv_eventID_MapTributePickedup_C, libGame_gv_eventParam_MapTributePickedup_Position_C));
}
void libGame_gf_MapCursedHollowCurseStarts (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapRavenCurseStarts_C);
}
void libGame_gf_SendEventMapCursedHollowCurseStarts (int lp_team) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapRavenCurseStarts_C, libGame_gv_eventParam_MapRavenCurseStarts_Team_C), lp_team);
TriggerSendEvent(libGame_gv_eventID_MapRavenCurseStarts_C);
}
int libGame_gf_MapCursedHollowCurseActivatedTeam () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapRavenCurseStarts_C, libGame_gv_eventParam_MapRavenCurseStarts_Team_C));
}
void libGame_gf_MapCursedHollowCurseEnds (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapRavenCurseEnds_C);
}
void libGame_gf_SendEventMapCursedHollowCurseEnds () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libGame_gv_eventID_MapRavenCurseEnds_C);
}
void libGame_gf_MapHauntedMinesUndeadSpawned (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapUnderworldOpen_C);
}
void libGame_gf_SendEventMapHauntedMinesUndeadSpawned (unitgroup lp_entrances, region lp_underworld, int lp_totalSkull) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnitGroup(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_Entrances_C), lp_entrances);
DataTableSetRegion(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_Underworld_C), lp_underworld);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_TotalSkull_C), lp_totalSkull);
TriggerSendEvent(libGame_gv_eventID_MapUnderworldOpen_C);
}
unitgroup libGame_gf_MapHauntedMinesUndeadSpawnedEntrances () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnitGroup(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_Entrances_C));
}
region libGame_gf_MapHauntedMinesUndeadSpawnedUnderworldRegion () {
// Automatic Variable Declarations
// Implementation
return DataTableGetRegion(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_Underworld_C));
}
int libGame_gf_MapHauntedMinesUndeadSpawnedTotalSkull () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_TotalSkull_C));
}
void libGame_gf_MapHauntedMinesSkullCollected (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapUnderworldSkullCollected_C);
}
void libGame_gf_SendEventMapHauntedMinesSkullCollected (int lp_team1, int lp_team2, int lp_collectingPlayer) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldSkullCollected_C, libGame_gv_eventParam_MapUnderworldSkullCollected_Team1Skulls_C), lp_team1);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldSkullCollected_C, libGame_gv_eventParam_MapUnderworldSkullCollected_Team2Skulls_C), lp_team2);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldSkullCollected_C, libGame_gv_eventParam_MapUnderworldSkullCollected_CollectingPlayer_C), lp_collectingPlayer);
TriggerSendEvent(libGame_gv_eventID_MapUnderworldSkullCollected_C);
}
int libGame_gf_MapHauntedMinesSkullCollectedTeam1Skulls () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldSkullCollected_C, libGame_gv_eventParam_MapUnderworldSkullCollected_Team1Skulls_C));
}
int libGame_gf_MapHauntedMinesSkullCollectedTeam2Skulls () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldSkullCollected_C, libGame_gv_eventParam_MapUnderworldSkullCollected_Team2Skulls_C));
}
int libGame_gf_MapHauntedMinesSkullCollectedCollectingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldSkullCollected_C, libGame_gv_eventParam_MapUnderworldSkullCollected_CollectingPlayer_C));
}
void libGame_gf_MapHauntedMinesCleared (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapUnderworldCleared_C);
}
void libGame_gf_SendEventMapHauntedMinesCleared () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libGame_gv_eventID_MapUnderworldCleared_C);
}
void libGame_gf_MapHauntedMinesBossStartSummoning (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapUnderworldBossStartSummoning_C);
}
void libGame_gf_SendEventMapHauntedMinesBossStartSummoning (int lp_team, point lp_location, int lp_lane) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldBossStartSummoning_C, libGame_gv_eventParam_MapUnderworldBossStartSummoning_Team_C), lp_team);
DataTableSetPoint(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldBossStartSummoning_C, libGame_gv_eventParam_MapUnderworldBossStartSummoning_Location_C), lp_location);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldBossStartSummoning_C, libGame_gv_eventParam_MapUnderworldBossStartSummoning_Lane_C), lp_lane);
TriggerSendEvent(libGame_gv_eventID_MapUnderworldBossStartSummoning_C);
}
int libGame_gf_MapHauntedMinesBossStartSummoningTeam () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldBossStartSummoning_C, libGame_gv_eventParam_MapUnderworldBossStartSummoning_Team_C));
}
point libGame_gf_MapHauntedMinesBossStartSummoningLocation () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPoint(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldBossStartSummoning_C, libGame_gv_eventParam_MapUnderworldBossStartSummoning_Location_C));
}
int libGame_gf_MapHauntedMinesBossStartSummoningLane () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldBossStartSummoning_C, libGame_gv_eventParam_MapUnderworldBossStartSummoning_Lane_C));
}
void libGame_gf_MapHauntedMinesBossSummoned (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapUnderworldBossSummoned_C);
}
void libGame_gf_SendEventMapHauntedMinesBossSummoned (unit lp_boss) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldBossSummoned_C, libGame_gv_eventParam_MapUnderworldBossSummoned_Boss_C), lp_boss);
TriggerSendEvent(libGame_gv_eventID_MapUnderworldBossSummoned_C);
}
unit libGame_gf_MapHauntedMinesBossSummonedBoss () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldBossSummoned_C, libGame_gv_eventParam_MapUnderworldBossSummoned_Boss_C));
}
void libGame_gf_MapHauntedMinesPlayerUsesGate (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapUnderworldPlayerUsesGate_C);
}
void libGame_gf_SendEventMapHauntedMinesPlayerUsesGate (int lp_player, unit lp_heroUnit) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldPlayerUsesGate_C, libGame_gv_eventParam_MapUnderworldPlayerUsesGate_Player_C), lp_player);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldPlayerUsesGate_C, libGame_gv_eventParam_MapUnderworldPlayerUsesGate_HeroUnit_C), lp_heroUnit);
TriggerSendEvent(libGame_gv_eventID_MapUnderworldPlayerUsesGate_C);
}
int libGame_gf_MapHauntedMinesPlayerUsesGatePlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldPlayerUsesGate_C, libGame_gv_eventParam_MapUnderworldPlayerUsesGate_Player_C));
}
unit libGame_gf_MapHauntedMinesPlayerUsesGateHeroUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldPlayerUsesGate_C, libGame_gv_eventParam_MapUnderworldPlayerUsesGate_HeroUnit_C));
}
void libGame_gf_MapHauntedMinesPlayerChangesPlane (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapUnderworldPlayerChangesPlane_C);
}
void libGame_gf_SendEventMapHauntedMinesPlayerChangesPlane (int lp_player, unit lp_heroUnit) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldPlayerChangesPlane_C, libGame_gv_eventParam_MapUnderworldPlayerChangesPlane_Player_C), lp_player);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldPlayerChangesPlane_C, libGame_gv_eventParam_MapUnderworldPlayerChangesPlane_HeroUnit_C), lp_heroUnit);
TriggerSendEvent(libGame_gv_eventID_MapUnderworldPlayerChangesPlane_C);
}
int libGame_gf_MapHauntedMinesPlayerChangesPlanePlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldPlayerChangesPlane_C, libGame_gv_eventParam_MapUnderworldPlayerChangesPlane_Player_C));
}
unit libGame_gf_MapHauntedMinesPlayerChangesPlaneHeroUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldPlayerChangesPlane_C, libGame_gv_eventParam_MapUnderworldPlayerChangesPlane_HeroUnit_C));
}
void libGame_gf_MapDragonShireObeliskSpawned (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapObeliskSpawned_C);
}
void libGame_gf_SendEventMapDragonShireSpawned (unit lp_obelisk) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapObeliskSpawned_C, libGame_gv_eventParam_MapObeliskSpawned_Obelisk_C), lp_obelisk);
TriggerSendEvent(libGame_gv_eventID_MapObeliskSpawned_C);
}
unit libGame_gf_MapDragonShireObeliskSpawnedUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapObeliskSpawned_C, libGame_gv_eventParam_MapObeliskSpawned_Obelisk_C));
}
void libGame_gf_MapDragonShireObeliskOwnershipChange (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapObeliskOwnershipChange_C);
}
void libGame_gf_SendEventMapDragonShireObeliskOwnershipChange (int lp_team, unit lp_obelisk, playergroup lp_capturingPlayers) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapObeliskOwnershipChange_C, libGame_gv_eventParam_MapObeliskOwnershipChange_Team_C), lp_team);
DataTableSetUnit(true, TriggerEventParamName(libGame_gv_eventID_MapObeliskOwnershipChange_C, libGame_gv_eventParam_MapObeliskOwnershipChange_Obelisk_C), lp_obelisk);
DataTableSetPlayerGroup(false, TriggerEventParamName(libGame_gv_eventID_MapObeliskOwnershipChange_C, libGame_gv_eventParam_MapObeliskOwnershipChange_CapturingPlayers_C), lp_capturingPlayers);
TriggerSendEvent(libGame_gv_eventID_MapObeliskOwnershipChange_C);
}
int libGame_gf_MapDragonShireObeliskOwnershipChangeTeam () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapObeliskOwnershipChange_C, libGame_gv_eventParam_MapObeliskOwnershipChange_Team_C));
}
unit libGame_gf_MapDragonShireObeliskOwnershipChangeObelisk () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapObeliskOwnershipChange_C, libGame_gv_eventParam_MapObeliskOwnershipChange_Obelisk_C));
}
playergroup libGame_gf_MapDragonShireObeliskOwnershipChangeCapturingPlayers () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPlayerGroup(false, TriggerEventParamName(libGame_gv_eventID_MapObeliskOwnershipChange_C, libGame_gv_eventParam_MapObeliskOwnershipChange_CapturingPlayers_C));
}
void libGame_gf_MapDragonShireDragonActivated (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapDragonActivated_C);
}
void libGame_gf_SendEventMapDragonShireDragonActivated (unit lp_dragon, int lp_activatingPlayer) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapDragonActivated_C, libGame_gv_eventParam_MapDragonActivated_Dragon_C), lp_dragon);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapDragonActivated_C, libGame_gv_eventParam_MapDragonActivated_Player_C), lp_activatingPlayer);
TriggerSendEvent(libGame_gv_eventID_MapDragonActivated_C);
}
unit libGame_gf_MapDragonShireDragonActivatedDragonUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_MapDragonActivated_C, libGame_gv_eventParam_MapDragonActivated_Dragon_C));
}
int libGame_gf_MapDragonShireDragonActivatedDragonPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapDragonActivated_C, libGame_gv_eventParam_MapDragonActivated_Player_C));
}
void libGame_gf_MapDragonShireDragonEnds (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapDragonShireDragonEnds_C);
}
void libGame_gf_SendEventMapDragonShireDragonEnds () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libGame_gv_eventID_MapDragonShireDragonEnds_C);
}
void libGame_gf_MapGardenOfTerrorNightStarts (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapHauntedWoodsNightStarts_C);
}
void libGame_gf_SendEventMapGardenOfTerrorNightStarts () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libGame_gv_eventID_MapHauntedWoodsNightStarts_C);
}
void libGame_gf_MapGardenOfTerrorNightEnds (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapHauntedWoodsNightEnds_C);
}
void libGame_gf_SendEventMapGardenOfTerrorNightEnds () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libGame_gv_eventID_MapHauntedWoodsNightEnds_C);
}
void libGame_gf_MapGardenOfTerrorSeedsCollected (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapGardensSeedCollected_C);
}
void libGame_gf_SendEventMapGardenOfTerrorSeedsCollected (int lp_collectingPlayer) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapGardensSeedCollected_C, libGame_gv_eventParam_MapGardensSeedCollected_CollectingPlayer_C), lp_collectingPlayer);
TriggerSendEvent(libGame_gv_eventID_MapGardensSeedCollected_C);
}
int libGame_gf_MapGardenOfTerrorSeedsCollectedCollectingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapGardensSeedCollected_C, libGame_gv_eventParam_MapGardensSeedCollected_CollectingPlayer_C));
}
void libGame_gf_MapTombSpiderQueenSoulCollected (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MapSoulCagesSoulCollected_C);
}
void libGame_gf_SendEventMapTombSpiderQueenSoulCollected (int lp_collectingPlayer, int lp_count) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapSoulCagesSoulCollected_C, libGame_gv_eventParam_MapSoulCagesSoulCollected_CollectingPlayer_C), lp_collectingPlayer);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapSoulCagesSoulCollected_C, libGame_gv_eventParam_MapSoulCagesSoulCollected_Count_C), lp_count);
TriggerSendEvent(libGame_gv_eventID_MapSoulCagesSoulCollected_C);
}
int libGame_gf_MapTombSpiderQueenSoulCollectedCollectingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapSoulCagesSoulCollected_C, libGame_gv_eventParam_MapSoulCagesSoulCollected_CollectingPlayer_C));
}
int libGame_gf_MapTombSpiderQueenSoulCollectedCount () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MapSoulCagesSoulCollected_C, libGame_gv_eventParam_MapSoulCagesSoulCollected_Count_C));
}
void libGame_gf_MinionGroupCreated (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MinionGroupCreated_C);
}
void libGame_gf_SendEventMinionGroupCreated (unitgroup lp_unitGroup) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnitGroup(false, TriggerEventParamName(libGame_gv_eventID_MinionGroupCreated_C, libGame_gv_eventParam_MinionGroupCreated_C), lp_unitGroup);
TriggerSendEvent(libGame_gv_eventID_MinionGroupCreated_C);
}
unitgroup libGame_gf_MinionUnitGroup () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnitGroup(false, TriggerEventParamName(libGame_gv_eventID_MinionGroupCreated_C, libGame_gv_eventParam_MinionGroupCreated_C));
}
void libGame_gf_PlayerAchievesMultiKill (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_PlayerAchievesMultiKill_C);
}
void libGame_gf_SendEventPlayerAchievesMultiKill (int lp_player, int lp_killCount) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_PlayerAchievesMultiKill_C, libGame_gv_eventParam_PlayerAchievesMultiKill_Player_C), lp_player);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_PlayerAchievesMultiKill_C, libGame_gv_eventParam_PlayerAchievesMultiKill_KillCount_C), lp_killCount);
TriggerSendEvent(libGame_gv_eventID_PlayerAchievesMultiKill_C);
}
int libGame_gf_PlayerAchievesMultiKillPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_PlayerAchievesMultiKill_C, libGame_gv_eventParam_PlayerAchievesMultiKill_Player_C));
}
int libGame_gf_PlayerAchievesMultiKillKillCount () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_PlayerAchievesMultiKill_C, libGame_gv_eventParam_PlayerAchievesMultiKill_KillCount_C));
}
void libGame_gf_ArenaModeCrowdKillingSpree (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_ArenaMode_Crowd_KillingSpree_Announce_C);
}
void libGame_gf_SendEventArenaModeCrowdKillingSpree (int lp_player) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_ArenaMode_Crowd_KillingSpree_Announce_C, libGame_gv_eventParam_KillingSpree_Player_C), lp_player);
TriggerSendEvent(libGame_gv_eventID_ArenaMode_Crowd_KillingSpree_Announce_C);
}
int libGame_gf_ArenaModeKillingSpreePlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_ArenaMode_Crowd_KillingSpree_Announce_C, libGame_gv_eventParam_KillingSpree_Player_C));
}
void libGame_gf_ArenaModeCrowdMayhem (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_ArenaMode_Crowd_Mayhem_Announce_C);
}
void libGame_gf_SendEventArenaModeCrowdMayhem (int lp_player) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_ArenaMode_Crowd_Mayhem_Announce_C, libGame_gv_eventParam_Mayhem_Player_C), lp_player);
TriggerSendEvent(libGame_gv_eventID_ArenaMode_Crowd_Mayhem_Announce_C);
}
int libGame_gf_ArenaModeMayhemPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_ArenaMode_Crowd_Mayhem_Announce_C, libGame_gv_eventParam_Mayhem_Player_C));
}
void libGame_gf_ArenaModeCrowdHotS (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_ArenaMode_Crowd_HotS_Announce_C);
}
void libGame_gf_SendEventArenaModeCrowdHotS (int lp_player) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_ArenaMode_Crowd_HotS_Announce_C, libGame_gv_eventParam_HotS_Player_C), lp_player);
TriggerSendEvent(libGame_gv_eventID_ArenaMode_Crowd_HotS_Announce_C);
}
int libGame_gf_ArenaModeHotSPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_ArenaMode_Crowd_HotS_Announce_C, libGame_gv_eventParam_HotS_Player_C));
}
void libGame_gf_AnnouncerVOInitiated (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_AnnouncerVOInitiated_C);
}
void libGame_gf_SendEventAnnouncerVOInitiated (sound lp_sound, int lp_player, int lp_announcerEvent) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_AnnouncerVOInitiated_C, libGame_gv_eventParam_AnnouncerEvent_C), lp_announcerEvent);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_AnnouncerVOInitiated_C, libGame_gv_eventParam_Player_C), lp_player);
DataTableSetSound(false, TriggerEventParamName(libGame_gv_eventID_AnnouncerVOInitiated_C, libGame_gv_eventParam_Sound_C), lp_sound);
TriggerSendEvent(libGame_gv_eventID_AnnouncerVOInitiated_C);
}
int libGame_gf_AnnouncerVOInitiatedAnnouncerEvent () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_AnnouncerVOInitiated_C, libGame_gv_eventParam_AnnouncerEvent_C));
}
int libGame_gf_AnnouncerVOInitiatedPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_AnnouncerVOInitiated_C, libGame_gv_eventParam_Player_C));
}
sound libGame_gf_AnnouncerVOInitiatedSound () {
// Automatic Variable Declarations
// Implementation
return DataTableGetSound(false, TriggerEventParamName(libGame_gv_eventID_AnnouncerVOInitiated_C, libGame_gv_eventParam_Sound_C));
}
void libGame_gf_CustomKillVO (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_CustomKillVO_C);
}
void libGame_gf_SendCustomKillVO (int lp_killingplayer, int lp_deadplayer, string lp_killLine, int lp_speakingPlayer) {
// Variable Declarations
string lv_string;
// Automatic Variable Declarations
// Variable Initialization
lv_string = "";
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CustomKillVO_C, libGame_gv_eventParam_CustomKillVOPlayer_C), lp_killingplayer);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CustomKillVO_C, libGame_gv_eventParam_CustomKillVODeadPlayer_C), lp_deadplayer);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CustomKillVO_C, libGame_gv_eventParam_CustomKillVOSpeakingPlayer_C), lp_speakingPlayer);
DataTableSetString(false, TriggerEventParamName(libGame_gv_eventID_CustomKillVO_C, libGame_gv_eventParam_CustomKillVOKillLine_C), (lp_killLine));
TriggerSendEvent(libGame_gv_eventID_CustomKillVO_C);
}
int libGame_gf_CustomKillVOKillingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_CustomKillVO_C, libGame_gv_eventParam_CustomKillVOPlayer_C));
}
int libGame_gf_CustomKillVODeadPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_CustomKillVO_C, libGame_gv_eventParam_CustomKillVODeadPlayer_C));
}
int libGame_gf_CustomKillVOSpeakingPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_CustomKillVO_C, libGame_gv_eventParam_CustomKillVOSpeakingPlayer_C));
}
string libGame_gf_CustomKillVOKillLine () {
// Automatic Variable Declarations
// Implementation
return DataTableGetString(false, TriggerEventParamName(libGame_gv_eventID_CustomKillVO_C, libGame_gv_eventParam_CustomKillVOKillLine_C));
}
void libGame_gf_TalentPanelVisibilityChanged (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_TalentPanelVisibilityChanged_C);
}
void libGame_gf_SendEventTalentPanelVisibilityChanged (int lp_player, bool lp_visible) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_TalentPanelVisibilityChanged_C, libGame_gv_eventParam_TalentPanelVisibilityChanged_Player_C), lp_player);
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_TalentPanelVisibilityChanged_C, libGame_gv_eventParam_TalentPanelVisibilityChanged_Visibility_C), lp_visible);
TriggerSendEvent(libGame_gv_eventID_TalentPanelVisibilityChanged_C);
}
int libGame_gf_TalentPanelVisibilityChangedPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_TalentPanelVisibilityChanged_C, libGame_gv_eventParam_TalentPanelVisibilityChanged_Player_C));
}
bool libGame_gf_TalentPanelVisibilityChangedVisible () {
// Automatic Variable Declarations
// Implementation
return DataTableGetBool(false, TriggerEventParamName(libGame_gv_eventID_TalentPanelVisibilityChanged_C, libGame_gv_eventParam_TalentPanelVisibilityChanged_Visibility_C));
}
void libGame_gf_TownStructureEntersSpecialDeathState (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_TownStructureEntersSpecialDeathState_C);
}
void libGame_gf_SendEventTownStructureEntersSpecialDeathState (unit lp_structure) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_TownStructureEntersSpecialDeathState_C, libGame_gv_eventParam_TownStructureEntersSpecialDeathState_Structure_C), lp_structure);
TriggerSendEvent(libGame_gv_eventID_TownStructureEntersSpecialDeathState_C);
}
unit libGame_gf_TownStructureEntersSpecialDeathStateStructure () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_TownStructureEntersSpecialDeathState_C, libGame_gv_eventParam_TownStructureEntersSpecialDeathState_Structure_C));
}
void libGame_gf_UnitEntersSafeZonePuntRegion (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_UnitEntersSafeZonePuntRegion_C);
}
void libGame_gf_SendEventUnitEntersSafeZonePuntRegion (unit lp_unit, point lp_puntPoint) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitEntersSafeZonePuntRegion_C, libGame_gv_eventParam_UnitEntersSafeZonePuntRegion_Unit_C), lp_unit);
DataTableSetPoint(false, TriggerEventParamName(libGame_gv_eventID_UnitEntersSafeZonePuntRegion_C, libGame_gv_eventParam_UnitEntersSafeZonePuntRegion_PuntPoint_C), lp_puntPoint);
TriggerSendEvent(libGame_gv_eventID_UnitEntersSafeZonePuntRegion_C);
}
unit libGame_gf_UnitEntersSafeZonePuntRegionUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitEntersSafeZonePuntRegion_C, libGame_gv_eventParam_UnitEntersSafeZonePuntRegion_Unit_C));
}
point libGame_gf_UnitEntersSafeZonePuntRegionPuntPoint () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPoint(false, TriggerEventParamName(libGame_gv_eventID_UnitEntersSafeZonePuntRegion_C, libGame_gv_eventParam_UnitEntersSafeZonePuntRegion_PuntPoint_C));
}
void libGame_gf_UnitEntersSafeZoneRegion (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_UnitEntersSafeZoneRegion_C);
}
void libGame_gf_SendEventUnitEntersSafeZoneRegion (unit lp_unit) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitEntersSafeZoneRegion_C, libGame_gv_eventParam_UnitEntersSafeZoneRegion_Unit_C), lp_unit);
TriggerSendInstantEvent(libGame_gv_eventID_UnitEntersSafeZoneRegion_C);
}
unit libGame_gf_UnitEntersSafeZoneRegionUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitEntersSafeZoneRegion_C, libGame_gv_eventParam_UnitEntersSafeZoneRegion_Unit_C));
}
void libGame_gf_UnitExitsSafeZoneRegion (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_UnitExitsSafeZoneRegion_C);
}
void libGame_gf_SendEventUnitExitsSafeZoneRegion (unit lp_unit) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitExitsSafeZoneRegion_C, libGame_gv_eventParam_UnitExitsSafeZoneRegion_Unit_C), lp_unit);
TriggerSendInstantEvent(libGame_gv_eventID_UnitExitsSafeZoneRegion_C);
}
unit libGame_gf_UnitExitsSafeZoneRegionUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitExitsSafeZoneRegion_C, libGame_gv_eventParam_UnitExitsSafeZoneRegion_Unit_C));
}
void libGame_gf_GameLoadedUIHook (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_GameLoadedUIHook_C);
}
void libGame_gf_SendEventGameLoadedUIHook () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libGame_gv_eventID_GameLoadedUIHook_C);
}
void libGame_gf_UIShownForPlayer (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_UIShownForPlayer_C);
}
int libGame_gf_PlayerShownUI () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_UIShownForPlayer_C, libGame_gv_eventParam_PlayerShownUI_C));
}
void libGame_gf_SendEventUIShownForPlayer (int lp_player) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_UIShownForPlayer_C, libGame_gv_eventParam_PlayerShownUI_C), lp_player);
TriggerSendInstantEvent(libGame_gv_eventID_UIShownForPlayer_C);
}
void libGame_gf_MercCampRewardGranted (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_MercCampRewardGranted_C);
}
void libGame_gf_SendEventMercCampRewardGranted (int lp_player, int lp_campIndex) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MercCampRewardGranted_C, libGame_gv_eventParam_MercCamp_CampIndex_C), lp_campIndex);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MercCampRewardGranted_C, libGame_gv_eventParam_MercCamp_RewardedPlayer_C), lp_player);
TriggerSendInstantEvent(libGame_gv_eventID_MercCampRewardGranted_C);
}
int libGame_gf_MercCampRewardGrantedCampIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MercCampRewardGranted_C, libGame_gv_eventParam_MercCamp_CampIndex_C));
}
int libGame_gf_MercCampRewardGrantedPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_MercCampRewardGranted_C, libGame_gv_eventParam_MercCamp_RewardedPlayer_C));
}
void libGame_gf_HeroEnteredVehicleInstant (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_UnitEnteredVehicleInstant_C);
}
void libGame_gf_SendInstantEventPlayerEnteredVehicle (int lp_playerThatEnteredVehicle, unit lp_useVehicleCasterUnit, unit lp_heroUnitThatEnteredVehicle, unit lp_vehicleUnit) {
// Automatic Variable Declarations
// Implementation
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitEnteredVehicleInstant_C, libGame_gv_eventParam_UnitEnteredVehicleInstant_Passengerhero_C), lp_heroUnitThatEnteredVehicle);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitEnteredVehicleInstant_C, libGame_gv_eventParam_UnitEnteredVehicleInstant_VehicleUnit_C), lp_vehicleUnit);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_UnitEnteredVehicleInstant_C, libGame_gv_eventParam_UnitEnteredVehicleInstant_HeroPlayer_C), lp_playerThatEnteredVehicle);
TriggerSendInstantEvent(libGame_gv_eventID_UnitEnteredVehicleInstant_C);
}
int libGame_gf_UseVehicleHeroPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_UnitEnteredVehicleInstant_C, libGame_gv_eventParam_UnitEnteredVehicleInstant_HeroPlayer_C));
}
unit libGame_gf_UseVehiclePassengerHero () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitEnteredVehicleInstant_C, libGame_gv_eventParam_UnitEnteredVehicleInstant_Passengerhero_C));
}
unit libGame_gf_UseVehicleVehicleUnit () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitEnteredVehicleInstant_C, libGame_gv_eventParam_UnitEnteredVehicleInstant_VehicleUnit_C));
}
void libGame_gf_HeroSwappedVehicleInstant (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_VehicleSwappedInstant_C);
}
int libGame_gf_VehicleSwappedPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_VehicleSwappedInstant_C, libGame_gv_eventParam_VehicleSwappedInstant_HeroPlayer_C));
}
unit libGame_gf_VehicleSwappedPassengerHero () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleSwappedInstant_C, libGame_gv_eventParam_VehicleSwappedInstant_PassengerHero_C));
}
unit libGame_gf_VehicleSwappedOriginVehicle () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleSwappedInstant_C, libGame_gv_eventParam_VehicleSwappedInstant_OriginVehicle_C));
}
unit libGame_gf_VehicleSwappedNewVehicle () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleSwappedInstant_C, libGame_gv_eventParam_VehicleSwappedInstant_NewVehicle_C));
}
void libGame_gf_SendInstantEventPlayerSwappedVehicle (int lp_playerThatEnteredVehicle, unit lp_heroUnitThatEnteredVehicle, unit lp_originVehicle, unit lp_newVehicle) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_VehicleSwappedInstant_C, libGame_gv_eventParam_VehicleSwappedInstant_HeroPlayer_C), lp_playerThatEnteredVehicle);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleSwappedInstant_C, libGame_gv_eventParam_VehicleSwappedInstant_PassengerHero_C), lp_heroUnitThatEnteredVehicle);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleSwappedInstant_C, libGame_gv_eventParam_VehicleSwappedInstant_OriginVehicle_C), lp_originVehicle);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleSwappedInstant_C, libGame_gv_eventParam_VehicleSwappedInstant_NewVehicle_C), lp_newVehicle);
TriggerSendInstantEvent(libGame_gv_eventID_VehicleSwappedInstant_C);
}
void libGame_gf_VehicleAbandonedInstant (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_VehicleAbandoned_C);
}
void libGame_gf_SendInstantEventPlayerAbandonedVehicle (int lp_playerThatEnteredVehicle, unit lp_heroUnitThatEnteredVehicle, unit lp_vehicle) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_VehicleAbandoned_C, libGame_gv_eventParam_VehicleAbandoned_HeroPlayer_C), lp_playerThatEnteredVehicle);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleAbandoned_C, libGame_gv_eventParam_VehicleAbandoned_PassengerHero_C), lp_heroUnitThatEnteredVehicle);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleAbandoned_C, libGame_gv_eventParam_VehicleAbandoned_Vehicle_C), lp_vehicle);
TriggerSendInstantEvent(libGame_gv_eventID_VehicleAbandoned_C);
}
int libGame_gf_VehicleAbandonedPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_VehicleAbandoned_C, libGame_gv_eventParam_VehicleAbandoned_HeroPlayer_C));
}
unit libGame_gf_VehicleAbandonedPassengerHero () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleAbandoned_C, libGame_gv_eventParam_VehicleAbandoned_PassengerHero_C));
}
unit libGame_gf_VehicleAbandonedVehicle () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleAbandoned_C, libGame_gv_eventParam_VehicleAbandoned_Vehicle_C));
}
void libGame_gf_VehicleDestroyedInstant (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_VehicleDestroyed_C);
}
void libGame_gf_SendInstantEventVehicleDestroyed (int lp_playerThatEnteredVehicle, unit lp_heroUnitThatEnteredVehicle, unit lp_vehicle) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_VehicleDestroyed_C, libGame_gv_eventParam_VehicleDestroyed_HeroPlayer_C), lp_playerThatEnteredVehicle);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleDestroyed_C, libGame_gv_eventParam_VehicleDestroyed_PassengerHero_C), lp_heroUnitThatEnteredVehicle);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleDestroyed_C, libGame_gv_eventParam_VehicleDestroyed_Vehicle_C), lp_vehicle);
TriggerSendInstantEvent(libGame_gv_eventID_VehicleDestroyed_C);
}
int libGame_gf_VehicleDestroyedPlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_VehicleDestroyed_C, libGame_gv_eventParam_VehicleDestroyed_HeroPlayer_C));
}
unit libGame_gf_VehicleDestroyedPassengerHero () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleDestroyed_C, libGame_gv_eventParam_VehicleDestroyed_PassengerHero_C));
}
unit libGame_gf_VehicleDestroyedVehicle () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_VehicleDestroyed_C, libGame_gv_eventParam_VehicleDestroyed_Vehicle_C));
}
void libGame_gf_UnitStopsOccupyingVehicleInstant (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_UnitStopsOccupyingVehicle_C);
}
void libGame_gf_SendInstantEventUnitStopsOccupyingVehicle (int lp_playerThatEnteredVehicle, unit lp_heroUnitThatEnteredVehicle, unit lp_vehicle) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_UnitStopsOccupyingVehicle_C, libGame_gv_eventParam_UnitStopsOccupyingVehicle_HeroPlayer_C), lp_playerThatEnteredVehicle);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitStopsOccupyingVehicle_C, libGame_gv_eventParam_UnitStopsOccupyingVehicle_PassengerHero_C), lp_heroUnitThatEnteredVehicle);
DataTableSetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitStopsOccupyingVehicle_C, libGame_gv_eventParam_UnitStopsOccupyingVehicle_Vehicle_C), lp_vehicle);
TriggerSendInstantEvent(libGame_gv_eventID_UnitStopsOccupyingVehicle_C);
}
int libGame_gf_UnitStopsOccupyingVehiclePlayer () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libGame_gv_eventID_UnitStopsOccupyingVehicle_C, libGame_gv_eventParam_UnitStopsOccupyingVehicle_HeroPlayer_C));
}
unit libGame_gf_UnitStopsOccupyingVehiclePassengerHero () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitStopsOccupyingVehicle_C, libGame_gv_eventParam_UnitStopsOccupyingVehicle_PassengerHero_C));
}
unit libGame_gf_UnitStopsOccupyingVehicleVehicle () {
// Automatic Variable Declarations
// Implementation
return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_UnitStopsOccupyingVehicle_C, libGame_gv_eventParam_UnitStopsOccupyingVehicle_Vehicle_C));
}
void libGame_gf_PickingHeroesForPlayers () {
// Variable Declarations
int lv_playerIndex;
// Automatic Variable Declarations
const int autoB53EFE3A_ae = libCore_gv_bALMaxPlayers;
const int autoB53EFE3A_ai = 1;
const int auto27F3DF11_ae = libCore_gv_bALMaxPlayers;
const int auto27F3DF11_ai = 1;
const int auto067654F8_ae = libCore_gv_bALMaxPlayers;
const int auto067654F8_ai = 1;
// Variable Initialization
// Implementation
libGame_gv_heroPickDone = false;
if ((libGame_gv_pickingHeroesCallback != null)) {
TriggerExecute(libGame_gv_pickingHeroesCallback, true, true);
lv_playerIndex = 1;
for ( ; ( (autoB53EFE3A_ai >= 0 && lv_playerIndex <= autoB53EFE3A_ae) || (autoB53EFE3A_ai < 0 && lv_playerIndex >= autoB53EFE3A_ae) ) ; lv_playerIndex += autoB53EFE3A_ai ) {
if ((libGame_gv_players[lv_playerIndex].lv_heroIndex >= 1)) {
libCore_gf_DataLoadHeroDataIntoIndex(libCore_gf_GetHeroFromIndex(libGame_gv_players[lv_playerIndex].lv_heroIndex), lv_playerIndex);
}
}
}
else {
TriggerExecute(libGame_gt_PickingHeroesNormalMode, true, true);
}
while (!((libGame_gv_heroPickDone == true))) {
Wait(0.0625, c_timeGame);
}
libGame_gf_HeroSelectionSetBNetMountSelectionsForAllPlayers();
if ((libGame_gv_randomizeMountsAndSkins == true)) {
libGame_gf_HeroSelectionComputersRandomlyPickSkinsMounts();
}
libGame_gf_HeroSelectionSetBNetLootContentSelectionsForAllPlayers();
lv_playerIndex = 1;
for ( ; ( (auto27F3DF11_ai >= 0 && lv_playerIndex <= auto27F3DF11_ae) || (auto27F3DF11_ai < 0 && lv_playerIndex >= auto27F3DF11_ae) ) ; lv_playerIndex += auto27F3DF11_ai ) {
if ((PlayerStatus(lv_playerIndex) != c_playerStatusUnused) && (libGame_gv_players[lv_playerIndex].lv_heroIndex != 0)) {
PlayerSetHero(lv_playerIndex, libCore_gf_GetHeroFromIndex(libGame_gv_players[lv_playerIndex].lv_heroIndex));
}
}
lv_playerIndex = 1;
for ( ; ( (auto067654F8_ai >= 0 && lv_playerIndex <= auto067654F8_ae) || (auto067654F8_ai < 0 && lv_playerIndex >= auto067654F8_ae) ) ; lv_playerIndex += auto067654F8_ai ) {
if ((PlayerStatus(lv_playerIndex) != c_playerStatusUnused) && (libGame_gv_players[lv_playerIndex].lv_heroIndex != 0)) {
libSprt_gf_SetHeroMasteryRingLevel(lv_playerIndex);
}
}
}
void libGame_gf_ChoGallSkinSelection (int lp_choPlayerID) {
// Variable Declarations
int lv_itPlayer;
int lv_gallPlayerID;
int lv_randomNumber;
string lv_choSelectedSkin;
string lv_gallSelectedSkin;
int lv_choSelectedSkinIndex;
int lv_gallSelectedSkinIndex;
// Automatic Variable Declarations
playergroup autoA94CBDD9_g;
// Variable Initialization
// Implementation
if ((PlayerHero(lp_choPlayerID) == "Gall")) {
return ;
}
autoA94CBDD9_g = libGame_gf_AlliedPlayerGroupOfPlayer(lp_choPlayerID);
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoA94CBDD9_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((PlayerHero(lv_itPlayer) == "Gall")) {
lv_gallPlayerID = lv_itPlayer;
break;
}
}
if ((lv_gallPlayerID == 0)) {
return ;
}
lv_choSelectedSkin = PlayerSkin(lp_choPlayerID);
lv_gallSelectedSkin = PlayerSkin(lv_gallPlayerID);
lv_choSelectedSkinIndex = libCore_gf_DataSkinsGetSkinIndexFromSkinLink(lv_choSelectedSkin);
lv_gallSelectedSkinIndex = libCore_gf_DataSkinsGetSkinIndexFromSkinLink(lv_gallSelectedSkin);
if ((PlayerSkin(lv_gallPlayerID) == "")) {
if ((PlayerSkin(lp_choPlayerID) == "")) {
lv_randomNumber = RandomInt(0, 1);
if ((lv_randomNumber == 1)) {
libGame_gf_ChoGallMountandBannerSelection(lv_gallPlayerID, lp_choPlayerID);
}
else {
libGame_gf_ChoGallMountandBannerSelection(lp_choPlayerID, lv_gallPlayerID);
}
}
else {
libGame_gv_players[lp_choPlayerID].lv_selectedSkin = lv_choSelectedSkinIndex;
libGame_gv_players[lv_gallPlayerID].lv_selectedSkin = lv_choSelectedSkinIndex;
libCore_gf_DataLoadSkinDataIntoIndex(libCore_gf_DataSkinsGetSkinLinkFromSkinCatalogIndex(libGame_gv_players[lp_choPlayerID].lv_selectedSkin), lp_choPlayerID);
libCore_gf_DataLoadSkinDataIntoIndex(libCore_gf_DataSkinsGetSkinLinkFromSkinCatalogIndex(libGame_gv_players[lv_gallPlayerID].lv_selectedSkin), lv_gallPlayerID);
PlayerSetSkin(lv_gallPlayerID, libGame_gv_players[lv_gallPlayerID].lv_skinData.lv_skinID);
libGame_gf_ChoGallMountandBannerSelection(lp_choPlayerID, lv_gallPlayerID);
return ;
}
}
else {
if ((PlayerSkin(lp_choPlayerID) == "")) {
libGame_gv_players[lp_choPlayerID].lv_selectedSkin = lv_gallSelectedSkinIndex;
libGame_gv_players[lv_gallPlayerID].lv_selectedSkin = lv_gallSelectedSkinIndex;
libGame_gf_ChoGallMountandBannerSelection(lv_gallPlayerID, lp_choPlayerID);
}
else {
lv_randomNumber = RandomInt(0, 1);
if ((lv_randomNumber == 1)) {
libGame_gv_players[lp_choPlayerID].lv_selectedSkin = lv_gallSelectedSkinIndex;
libGame_gv_players[lv_gallPlayerID].lv_selectedSkin = lv_gallSelectedSkinIndex;
libGame_gf_ChoGallMountandBannerSelection(lv_gallPlayerID, lp_choPlayerID);
}
else {
libGame_gv_players[lp_choPlayerID].lv_selectedSkin = lv_choSelectedSkinIndex;
libGame_gv_players[lv_gallPlayerID].lv_selectedSkin = lv_choSelectedSkinIndex;
libCore_gf_DataLoadSkinDataIntoIndex(libCore_gf_DataSkinsGetSkinLinkFromSkinCatalogIndex(libGame_gv_players[lp_choPlayerID].lv_selectedSkin), lp_choPlayerID);
libCore_gf_DataLoadSkinDataIntoIndex(libCore_gf_DataSkinsGetSkinLinkFromSkinCatalogIndex(libGame_gv_players[lv_gallPlayerID].lv_selectedSkin), lv_gallPlayerID);
PlayerSetSkin(lv_gallPlayerID, libGame_gv_players[lv_gallPlayerID].lv_skinData.lv_skinID);
libGame_gf_ChoGallMountandBannerSelection(lp_choPlayerID, lv_gallPlayerID);
return ;
}
}
}
libCore_gf_DataLoadSkinDataIntoIndex(libCore_gf_DataSkinsGetSkinLinkFromSkinCatalogIndex(libGame_gv_players[lp_choPlayerID].lv_selectedSkin), lp_choPlayerID);
libCore_gf_DataLoadSkinDataIntoIndex(libCore_gf_DataSkinsGetSkinLinkFromSkinCatalogIndex(libGame_gv_players[lv_gallPlayerID].lv_selectedSkin), lv_gallPlayerID);
}
void libGame_gf_ChoGallMountandBannerSelection (int lp_skinSelectedPlayer, int lp_mountSelectedPlayer) {
// Variable Declarations
string lv_selectedMountLink;
int lv_choPlayerID;
int lv_mountSelectedHeroIndex;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_mountSelectedHeroIndex = lp_mountSelectedPlayer;
if ((PlayerHero(lp_skinSelectedPlayer) == "Cho")) {
lv_choPlayerID = lp_skinSelectedPlayer;
}
else {
lv_choPlayerID = lp_mountSelectedPlayer;
}
if ((PlayerMount(lp_mountSelectedPlayer) == libGame_gv_players[lv_mountSelectedHeroIndex].lv_heroData.lv_defaultMount)) {
lv_selectedMountLink = PlayerMount(lp_skinSelectedPlayer);
libCore_gf_DataMountsLoadMountDataIntoIndex(lv_selectedMountLink, libCore_gf_DataMountGetMountModelScaleAtConfigIndex(libCore_gf_DataMountGetMountConfigIndexFromMountLink(lv_selectedMountLink)), libCore_gf_DataMountGetMountWalkAnimSpeedAtConfigIndex(libCore_gf_DataMountGetMountConfigIndexFromMountLink(lv_selectedMountLink)), libCore_gf_DataMountGetMountPoseAnimGroupAtConfigIndex(libCore_gf_DataMountGetMountConfigIndexFromMountLink(lv_selectedMountLink)), lv_choPlayerID);
}
else {
lv_selectedMountLink = PlayerMount(lp_mountSelectedPlayer);
libCore_gf_DataMountsLoadMountDataIntoIndex(lv_selectedMountLink, libCore_gf_DataMountGetMountModelScaleAtConfigIndex(libCore_gf_DataMountGetMountConfigIndexFromMountLink(lv_selectedMountLink)), libCore_gf_DataMountGetMountWalkAnimSpeedAtConfigIndex(libCore_gf_DataMountGetMountConfigIndexFromMountLink(lv_selectedMountLink)), libCore_gf_DataMountGetMountPoseAnimGroupAtConfigIndex(libCore_gf_DataMountGetMountConfigIndexFromMountLink(lv_selectedMountLink)), lv_choPlayerID);
}
libGame_gv_players[lv_choPlayerID].lv_selectedMount = libCore_gf_DataMountGetMountIndexFromMountLink(lv_selectedMountLink);
PlayerSetMount(lv_choPlayerID, libGame_gv_players[lv_choPlayerID].lv_mountData.lv_mountID);
libCore_gf_DataLootContentLoadBannerDataIntoIndex(PlayerBanner(lp_mountSelectedPlayer), lv_choPlayerID);
}
void libGame_gf_GameOver (int lp_winningTeam) {
// Variable Declarations
int lv_itPlayer;
int lv_losingTeam;
const fixed lv_endGameTimeDelay = 7.0;
// Automatic Variable Declarations
playergroup auto06C7D5AE_g;
playergroup auto0404A1D9_g;
playergroup auto58EC5D3D_g;
playergroup auto36E85141_g;
playergroup auto75136350_g;
// Variable Initialization
// Implementation
libGame_gf_SendEventGameOverEvent();
if ((lp_winningTeam == 0)) {
auto06C7D5AE_g = libCore_gv_activeHumanPlayers;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto06C7D5AE_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((PlayerStatus(lv_itPlayer) != c_playerStatusUnused)) {
CameraLockInput(lv_itPlayer, true);
libGame_gv_players[lv_itPlayer].lv_victoryDefeat = c_gameOverVictory;
}
}
}
else {
lv_losingTeam = (3 - lp_winningTeam);
auto0404A1D9_g = libGame_gf_PlayersOnTeamHeroes(lp_winningTeam, false);
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto0404A1D9_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((PlayerStatus(lv_itPlayer) != c_playerStatusUnused)) {
CameraLockInput(lv_itPlayer, true);
libGame_gv_players[lv_itPlayer].lv_victoryDefeat = c_gameOverVictory;
}
}
auto58EC5D3D_g = libGame_gf_PlayersOnTeamHeroes(lv_losingTeam, false);
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto58EC5D3D_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((PlayerStatus(lv_itPlayer) != c_playerStatusUnused)) {
CameraLockInput(lv_itPlayer, true);
libGame_gv_players[lv_itPlayer].lv_victoryDefeat = c_gameOverDefeat;
}
}
}
TriggerEnable(libGame_gt_XPTrickle, false);
libSprt_gf_DataMiningSendEndOfGameDigests(lp_winningTeam);
auto36E85141_g = libCore_gv_allHeroPlayersPlusObserver;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto36E85141_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
libUIUI_gf_UIHeroConsoleShowHideForPlayer(false, lv_itPlayer);
UISetMode(libCore_gv_playerGroupFromPlayer[lv_itPlayer], c_uiModeFullscreen, c_transitionDurationImmediate);
DialogControlSetVisible(libUIUI_gv_uIGameUIHandles.lv_talentsButton, libCore_gv_playerGroupFromPlayer[lv_itPlayer], false);
UISetFrameVisible(libCore_gv_playerGroupFromPlayer[lv_itPlayer], c_syncFrameTypeMinimapPanel, false);
libUIUI_gf_UIHeroTrackerArrowShowHideForPlayer(false, lv_itPlayer);
libUIUI_gf_UIGameUIShowHideConsolePanelForPlayer(false, lv_itPlayer);
libUIUI_gf_UIPartyFrameShowHidePartyFramePanelForPlayer(false, lv_itPlayer);
libUIUI_gf_FullscreenOverlayStopandClearCutsceneQueueForPlayer(lv_itPlayer);
TextExpressionSetToken("Param/Expression/lib_Game_61C8E508", "C", IntToText(libGame_gf_TeamNumberOfPlayer(lv_itPlayer)));
TextExpressionSetToken("Param/Expression/lib_Game_61C8E508", "A", UnitTypeGetName(UnitGetType(libGame_gv_players[lv_itPlayer].lv_heroUnit)));
TextExpressionSetToken("Param/Expression/lib_Game_61C8E508", "B", IntToText(libGame_gv_scoreValues[lv_itPlayer].lv_damageTaken));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_61C8E508"), false);
}
DialogControlSetVisible(libUIUI_gv_uIObserverUI.lv_mainPanel, libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], false);
DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer");
DialogControlSetVisible(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], false);
if ((libGame_gv_gameOverCallback != null)) {
TriggerExecute(libGame_gv_gameOverCallback, true, true);
}
libUIUI_gf_GameOverSplashDisplayForAllPlayers(lp_winningTeam);
UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeStatusUI, false);
if ((libGame_gv_endofMatchAwardsDisabled == true)) {
Wait(lv_endGameTimeDelay, c_timeGame);
}
if ((libCore_gv_sYSGameMode != libCore_ge_GameModes_ArenaMode)) {
auto75136350_g = PlayerGroupAll();
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto75136350_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((lv_itPlayer > 0) && (lv_itPlayer <= libCore_gv_bALMaxPlayers) && (PlayerStatus(lv_itPlayer) != c_playerStatusUnused)) {
libGame_gf_EndGameForPlayerStorm(lv_itPlayer);
}
}
}
GameSetReplayKeyframesEnabled(false);
if (((libCore_gv_sYSGameMode == libCore_ge_GameModes_TutorialVeteran) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_Sandbox) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_ModeC))) {
Wait(10.0, c_timeGame);
}
else {
libGame_gf_AssignMVP(lp_winningTeam);
}
KickFromGame(PlayerGroupAll());
}
trigger auto_libGame_gf_PlayGameOverStinger_Trigger = null;
int auto_libGame_gf_PlayGameOverStinger_lp_winningTeam;
void libGame_gf_PlayGameOverStinger (int lp_winningTeam) {
auto_libGame_gf_PlayGameOverStinger_lp_winningTeam = lp_winningTeam;
if (auto_libGame_gf_PlayGameOverStinger_Trigger == null) {
auto_libGame_gf_PlayGameOverStinger_Trigger = TriggerCreate("auto_libGame_gf_PlayGameOverStinger_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_PlayGameOverStinger_Trigger, false, false);
}
bool auto_libGame_gf_PlayGameOverStinger_TriggerFunc (bool testConds, bool runActions) {
int lp_winningTeam = auto_libGame_gf_PlayGameOverStinger_lp_winningTeam;
// Automatic Variable Declarations
// Implementation
Wait(2.17, c_timeGame);
libSond_gf_SoundtrackSetUniqueSoundtrackState(false);
if ((lp_winningTeam == 0)) {
libSond_gf_SoundtrackApplyNewDefaultSoundtrackForPlayerGroup("Storm_Music_Stinger_Defeat", libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup);
libSond_gf_SoundtrackApplyNewDefaultSoundtrackForPlayerGroup("Storm_Music_Stinger_Defeat", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup);
}
else {
libSond_gf_SoundtrackApplyNewDefaultSoundtrackForPlayerGroup("Storm_Music_Stinger_Victory", libGame_gf_PlayersOnTeamHeroes(lp_winningTeam, false));
libSond_gf_SoundtrackApplyNewDefaultSoundtrackForPlayerGroup("Storm_Music_Stinger_Defeat", libGame_gf_PlayersOnTeamHeroes(libGame_gf_EnemyTeam(lp_winningTeam), false));
}
return true;
}
trigger auto_libGame_gf_PlayVictoryDefeatVO_Trigger = null;
int auto_libGame_gf_PlayVictoryDefeatVO_lp_winningTeam;
void libGame_gf_PlayVictoryDefeatVO (int lp_winningTeam) {
auto_libGame_gf_PlayVictoryDefeatVO_lp_winningTeam = lp_winningTeam;
if (auto_libGame_gf_PlayVictoryDefeatVO_Trigger == null) {
auto_libGame_gf_PlayVictoryDefeatVO_Trigger = TriggerCreate("auto_libGame_gf_PlayVictoryDefeatVO_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_PlayVictoryDefeatVO_Trigger, false, false);
}
bool auto_libGame_gf_PlayVictoryDefeatVO_TriggerFunc (bool testConds, bool runActions) {
int lp_winningTeam = auto_libGame_gf_PlayVictoryDefeatVO_lp_winningTeam;
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
int autoE22AD869_val;
// Variable Initialization
// Implementation
Wait(0.52, c_timeGame);
libGame_gv_announcement_SystemEnabled = true;
autoE22AD869_val = lp_winningTeam;
if (autoE22AD869_val == 0) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_Defeat, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_Defeat, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
else if (autoE22AD869_val == libGame_gv_teamOrderIndex_C) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_Victory, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_Defeat, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_BlueTeamWins, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
else if (autoE22AD869_val == libGame_gv_teamChaosIndex_C) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_Defeat, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_Victory, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_RedTeamWins, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
else {
}
libGame_gv_announcement_SystemEnabled = false;
return true;
}
void libGame_gf_TogglePercentScaling (bool lp_enabled) {
// Automatic Variable Declarations
// Implementation
libGame_gv_dEBUG_PercentScalingEnabled = lp_enabled;
}
void libGame_gf_ApplyAbilityModificationsForPlayerAtTalent (int lp_player, int lp_tierIndex, int lp_buttonIndex) {
// Variable Declarations
int lv_itAbilityMod;
int lv_catalog;
string lv_entry;
string lv_field;
fixed lv_baseValue;
fixed lv_newValue;
string lv_offsetString;
string lv_xOffset;
string lv_yOffset;
string lv_zOffset;
fixed lv_yOffsetReal;
string lv_replaceFrom;
string lv_changeTo;
// Automatic Variable Declarations
int autoD91FE29A_ae;
const int autoD91FE29A_ai = 1;
// Variable Initialization
lv_catalog = c_gameCatalogUnit;
lv_entry = "";
lv_field = "";
lv_offsetString = "";
lv_xOffset = "";
lv_yOffset = "";
lv_zOffset = "";
lv_replaceFrom = "";
lv_changeTo = "";
// Implementation
autoD91FE29A_ae = libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_totalModifications;
lv_itAbilityMod = 1;
for ( ; ( (autoD91FE29A_ai >= 0 && lv_itAbilityMod <= autoD91FE29A_ae) || (autoD91FE29A_ai < 0 && lv_itAbilityMod >= autoD91FE29A_ae) ) ; lv_itAbilityMod += autoD91FE29A_ai ) {
lv_catalog = libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_catalog;
lv_entry = libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_entry;
lv_field = libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_field;
if ((libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_changeType == c_talentModificationFlatModification )) {
if (((lv_field == "InitialOffset") || (lv_field == "ExpireOffset") || (lv_field == "FinalOffset") || (lv_field == "PeriodicOffsetArray[0]") || (lv_field == "PeriodicOffsetArray[1]"))) {
lv_offsetString = CatalogFieldValueGet(lv_catalog, lv_entry, lv_field, lp_player);
lv_offsetString = StringReplaceWord(lv_offsetString, ",", " ", c_stringReplaceAll, c_stringCase);
lv_xOffset = StringWord(lv_offsetString, 1);
lv_yOffset = StringWord(lv_offsetString, 2);
lv_zOffset = StringWord(lv_offsetString, 3);
lv_yOffsetReal = StringToFixed(lv_yOffset);
lv_yOffsetReal += libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_value;
lv_yOffset = FixedToString(lv_yOffsetReal, 2);
lv_offsetString = (lv_xOffset + "," + lv_yOffset + "," + lv_zOffset);
CatalogFieldValueSet(lv_catalog, lv_entry, lv_field, lp_player, lv_offsetString);
}
else {
lv_baseValue = CatalogFieldValueGetAsFixed(lv_catalog, lv_entry, lv_field, lp_player);
lv_newValue = (lv_baseValue + libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_value);
if ((libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_fieldIsInteger == true)) {
CatalogFieldValueSetInt(lv_catalog, lv_entry, lv_field, lp_player, FixedToInt(lv_newValue));
}
else {
CatalogFieldValueSetFixed(lv_catalog, lv_entry, lv_field, lp_player, lv_newValue);
}
}
}
if ((libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_changeType == c_talentModificationMultiplyLevelModification)) {
lv_baseValue = CatalogFieldValueGetAsFixed(lv_catalog, lv_entry, lv_field, lp_player);
lv_newValue = (lv_baseValue * libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_value);
if ((libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_fieldIsInteger == true)) {
CatalogFieldValueSetInt(lv_catalog, lv_entry, lv_field, lp_player, FixedToInt(lv_newValue));
}
else {
CatalogFieldValueSetFixed(lv_catalog, lv_entry, lv_field, lp_player, lv_newValue);
}
}
if ((libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_changeType == c_talentModificationStringReplacement) && (lv_catalog != c_gameCatalogButton)) {
CatalogFieldValueSet(lv_catalog, lv_entry, lv_field, lp_player, libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_stringReplacementValue);
}
if ((libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_changeType == c_talentModificationCatalogReplacement)) {
lv_replaceFrom = libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_catalogReplaceFrom;
lv_changeTo = libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_catalogChangeTo;
CatalogLinkReplace(lp_player, lv_catalog, lv_replaceFrom, lv_changeTo);
}
}
}
void libGame_gf_RemoveTalentAbilityModificationsForPlayerAtTalent (int lp_player, int lp_tierIndex, int lp_buttonIndex) {
// Variable Declarations
int lv_itAbilityMod;
int lv_catalog;
string lv_entry;
string lv_field;
string lv_replaceFrom;
// Automatic Variable Declarations
int auto1EF455F2_ae;
const int auto1EF455F2_ai = 1;
// Variable Initialization
lv_catalog = c_gameCatalogUnit;
lv_entry = "";
lv_field = "";
lv_replaceFrom = "";
// Implementation
auto1EF455F2_ae = libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_totalModifications;
lv_itAbilityMod = 1;
for ( ; ( (auto1EF455F2_ai >= 0 && lv_itAbilityMod <= auto1EF455F2_ae) || (auto1EF455F2_ai < 0 && lv_itAbilityMod >= auto1EF455F2_ae) ) ; lv_itAbilityMod += auto1EF455F2_ai ) {
lv_catalog = libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_catalog;
if (((libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_changeType == c_talentModificationFlatModification ) || (libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_changeType == c_talentModificationMultiplyLevelModification) || (libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_changeType == c_talentModificationStringReplacement))) {
lv_entry = libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_entry;
lv_field = libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_field;
CatalogFieldValueSet(lv_catalog, lv_entry, lv_field, lp_player, CatalogFieldValueGet(lv_catalog, lv_entry, lv_field, 0));
}
if ((libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_changeType == c_talentModificationCatalogReplacement)) {
lv_replaceFrom = libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_catalogReplaceFrom;
CatalogLinkReplace(lp_player, lv_catalog, lv_replaceFrom, lv_replaceFrom);
}
}
PlayerApplySkin(lp_player, PlayerSkin(lp_player), true);
}
void libGame_gf_ApplyLevelUpHeroStatsForHeroSingleLevel (unit lp_hero) {
// Variable Declarations
int lv_abilityindex;
int lv_changeindex;
int lv_player;
int lv_heroIndex;
int lv_catalog;
string lv_entry;
string lv_field;
fixed lv_newValue;
string lv_offsetString;
string lv_xOffset;
string lv_yOffset;
string lv_zOffset;
fixed lv_yOffsetReal;
// Automatic Variable Declarations
int auto45B2F0EE_ae;
const int auto45B2F0EE_ai = 1;
int auto202C7AA9_ae;
const int auto202C7AA9_ai = 1;
// Variable Initialization
lv_catalog = c_gameCatalogUnit;
lv_entry = "";
lv_field = "";
lv_offsetString = "";
lv_xOffset = "";
lv_yOffset = "";
lv_zOffset = "";
// Implementation
lv_player = UnitGetOwner(lp_hero);
if ((lp_hero != libGame_gv_players[lv_player].lv_heroUnit) && (lp_hero != libGame_gv_players[lv_player].lv_activeVehicle)) {
return ;
}
lv_heroIndex = libCore_gf_GetHeroIndexForUnitType(UnitGetType(lp_hero));
auto45B2F0EE_ae = libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpAbilitiesCount;
lv_abilityindex = 0;
for ( ; ( (auto45B2F0EE_ai >= 0 && lv_abilityindex <= auto45B2F0EE_ae) || (auto45B2F0EE_ai < 0 && lv_abilityindex >= auto45B2F0EE_ae) ) ; lv_abilityindex += auto45B2F0EE_ai ) {
auto202C7AA9_ae = libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_numberOfFieldChanges[lv_abilityindex];
lv_changeindex = 1;
for ( ; ( (auto202C7AA9_ai >= 0 && lv_changeindex <= auto202C7AA9_ae) || (auto202C7AA9_ai < 0 && lv_changeindex >= auto202C7AA9_ae) ) ; lv_changeindex += auto202C7AA9_ai ) {
lv_catalog = libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_catalog[lv_abilityindex][lv_changeindex];
lv_entry = libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_entry[lv_abilityindex][lv_changeindex];
lv_field = libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_field[lv_abilityindex][lv_changeindex];
if (((lv_field == "InitialOffset") || (lv_field == "ExpireOffset") || (lv_field == "FinalOffset") || (lv_field == "PeriodicOffsetArray[0]"))) {
lv_offsetString = CatalogFieldValueGet(lv_catalog, lv_entry, lv_field, lv_player);
lv_offsetString = StringReplaceWord(lv_offsetString, ",", " ", c_stringReplaceAll, c_stringCase);
lv_xOffset = StringWord(lv_offsetString, 1);
lv_yOffset = StringWord(lv_offsetString, 2);
lv_zOffset = StringWord(lv_offsetString, 3);
lv_yOffsetReal = StringToFixed(lv_yOffset);
lv_yOffsetReal += libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_valueAddedPerLevel[lv_abilityindex][lv_changeindex];
lv_yOffset = FixedToString(lv_yOffsetReal, 2);
lv_offsetString = (lv_xOffset + "," + lv_yOffset + "," + lv_zOffset);
CatalogFieldValueSet(lv_catalog, lv_entry, lv_field, lv_player, lv_offsetString);
}
else {
if ((libGame_gv_dEBUG_PercentScalingEnabled == true) && (libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_percentScaled[lv_abilityindex][lv_changeindex] == true)) {
lv_newValue = (CatalogFieldValueGetAsFixed(lv_catalog, lv_entry, lv_field, lv_player) * libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_valueAddedPerLevel[lv_abilityindex][lv_changeindex]);
if ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_valueAddedPerLevel[lv_abilityindex][lv_changeindex] > 1.0)) {
TextExpressionSetToken("Param/Expression/lib_Game_9A5E6159", "A", StringToText(lv_entry));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_9A5E6159"), true);
lv_newValue = 0.0;
}
}
else {
lv_newValue = libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_valueAddedPerLevel[lv_abilityindex][lv_changeindex];
}
if ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_fieldIsInteger[lv_abilityindex][lv_changeindex] == true)) {
CatalogFieldValueModifyInt(lv_catalog, lv_entry, lv_field, lv_player, FixedToInt(lv_newValue), c_upgradeOperationAdd);
}
else {
CatalogFieldValueModifyFixed(lv_catalog, lv_entry, lv_field, lv_player, lv_newValue, c_upgradeOperationAdd);
}
}
}
}
CatalogFieldValueSet(c_gameCatalogGame, "Dflt", "MaxVitalForFractionalDamage[" + IntToString(c_unitVitalLife) + "]", libGame_gf_ComputerPlayerInTeam(libGame_gf_EnemyTeamNumberOfPlayer(lv_player)), CatalogFieldValueGet(c_gameCatalogGame, "Dflt", "MaxVitalForFractionalDamage[" + IntToString(c_unitVitalLife) + "]", lv_player));
}
void libGame_gf_RemoveLevelUpHeroStatsForPlayer (string lp_heroUnitType, int lp_player) {
// Variable Declarations
int lv_itAbilityMod;
int lv_itAbilityModChange;
int lv_heroIndex;
int lv_catalog;
string lv_entry;
string lv_field;
// Automatic Variable Declarations
int autoCE4C1B3C_ae;
const int autoCE4C1B3C_ai = 1;
int auto14530F63_ae;
const int auto14530F63_ai = 1;
// Variable Initialization
lv_catalog = c_gameCatalogUnit;
lv_entry = "";
lv_field = "";
// Implementation
lv_heroIndex = libCore_gf_GetHeroIndexForUnitType(lp_heroUnitType);
autoCE4C1B3C_ae = libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpAbilitiesCount;
lv_itAbilityMod = 0;
for ( ; ( (autoCE4C1B3C_ai >= 0 && lv_itAbilityMod <= autoCE4C1B3C_ae) || (autoCE4C1B3C_ai < 0 && lv_itAbilityMod >= autoCE4C1B3C_ae) ) ; lv_itAbilityMod += autoCE4C1B3C_ai ) {
auto14530F63_ae = libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_numberOfFieldChanges[lv_itAbilityMod];
lv_itAbilityModChange = 1;
for ( ; ( (auto14530F63_ai >= 0 && lv_itAbilityModChange <= auto14530F63_ae) || (auto14530F63_ai < 0 && lv_itAbilityModChange >= auto14530F63_ae) ) ; lv_itAbilityModChange += auto14530F63_ai ) {
lv_catalog = libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_catalog[lv_itAbilityMod][lv_itAbilityModChange];
lv_entry = libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_entry[lv_itAbilityMod][lv_itAbilityModChange];
lv_field = libGame_gv_players[lv_heroIndex].lv_heroData.lv_levelUpModificationData.lv_field[lv_itAbilityMod][lv_itAbilityModChange];
CatalogFieldValueSet(lv_catalog, lv_entry, lv_field, lp_player, CatalogFieldValueGet(lv_catalog, lv_entry, lv_field, 0));
}
}
}
void libGame_gf_UpdateHeroManaCosts (unit lp_unit) {
// Variable Declarations
int lv_itAbility;
int lv_player;
unit lv_hero;
int lv_heroIndex;
fixed lv_flatModifier;
fixed lv_percentageModifier;
string lv_entry;
fixed lv_baseValue;
fixed lv_baseMultiplierValue;
fixed lv_newValue;
// Automatic Variable Declarations
int autoB4FFC150_ae;
const int autoB4FFC150_ai = 1;
// Variable Initialization
lv_percentageModifier = 1.0;
lv_entry = "";
// Implementation
lv_player = UnitGetOwner(lp_unit);
if (((lv_player == 0) || (lv_player > libCore_gv_bALMaxPlayers))) {
return ;
}
lv_hero = libGame_gv_players[lv_player].lv_heroUnit;
lv_heroIndex = libGame_gv_players[lv_player].lv_heroIndex;
if ((UnitBehaviorCount(lv_hero, "BucketOverdrive") == 1)) {
lv_percentageModifier += libCore_gv_talents_BucketOverdriveManaCostIncreasePercent_C;
}
if ((UnitBehaviorCount(lv_hero, "0ManaCostBuff") == 1)) {
lv_percentageModifier -= libCore_gv_talents_0ManaCostBuffMod_C;
}
autoB4FFC150_ae = libGame_gv_players[lv_heroIndex].lv_heroData.lv_numberOfAbilities;
lv_itAbility = 1;
for ( ; ( (autoB4FFC150_ai >= 0 && lv_itAbility <= autoB4FFC150_ae) || (autoB4FFC150_ai < 0 && lv_itAbility >= autoB4FFC150_ae) ) ; lv_itAbility += autoB4FFC150_ai ) {
if ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_itAbility].lv_isAffectedByOverdrive == true) && (libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_itAbility].lv_ability != null)) {
lv_entry = (libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_itAbility].lv_ability);
lv_baseValue = CatalogFieldValueGetAsFixed(c_gameCatalogAbil, lv_entry, "Cost[0].Vital[Energy]", 0);
lv_baseMultiplierValue = (lv_baseValue * lv_percentageModifier);
lv_newValue = (lv_baseMultiplierValue - lv_flatModifier);
if ((lv_newValue < 0.0)) {
lv_newValue = 0.0;
}
CatalogFieldValueSetFixed(c_gameCatalogAbil, lv_entry, "Cost[0].Vital[Energy]", lv_player, lv_newValue);
}
}
}
void libGame_gf_TurnDeathTimerCapOnOff (bool lp_onOff, fixed lp_cap) {
// Variable Declarations
int lv_itLevel;
// Automatic Variable Declarations
const int auto9D1290D1_ae = libCore_gv_bALMaxLevel;
const int auto9D1290D1_ai = 1;
// Variable Initialization
// Implementation
if ((lp_onOff == true) && (lp_cap > 0.0)) {
libCore_gv_sYSDeathTimerCap = lp_cap;
lv_itLevel = 1;
for ( ; ( (auto9D1290D1_ai >= 0 && lv_itLevel <= auto9D1290D1_ae) || (auto9D1290D1_ai < 0 && lv_itLevel >= auto9D1290D1_ae) ) ; lv_itLevel += auto9D1290D1_ai ) {
libCore_gv_bALDeathTimes[lv_itLevel] = MinF(libCore_gv_bALDeathTimes[lv_itLevel], libCore_gv_sYSDeathTimerCap);
}
libCore_gv_bALMaxDeathTime = libCore_gv_bALDeathTimes[libCore_gv_bALMaxLevel];
}
else {
libCore_gv_sYSDeathTimerCap = 0.0;
}
}
trigger auto_libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE_Trigger = null;
unit auto_libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE_lp_deadHero;
int auto_libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE_lp_killingPlayer;
void libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE (unit lp_deadHero, int lp_killingPlayer) {
auto_libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE_lp_deadHero = lp_deadHero;
auto_libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE_lp_killingPlayer = lp_killingPlayer;
if (auto_libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE_Trigger == null) {
auto_libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE_Trigger = TriggerCreate("auto_libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE_Trigger, false, false);
}
bool auto_libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE_TriggerFunc (bool testConds, bool runActions) {
unit lp_deadHero = auto_libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE_lp_deadHero;
int lp_killingPlayer = auto_libGame_gf_HeroDeathUpdateStatsAwardXPMakeAnnouncementsCORE_lp_killingPlayer;
// Variable Declarations
int lv_itPlayer;
unit lv_itUnit;
int lv_deadPlayer;
int lv_deadPlayerTeam;
playergroup lv_killingTeamGroup;
unitgroup lv_nearbyUnits;
playergroup lv_awardGroup;
playergroup lv_deadPlayerTeamGroup;
playergroup lv_killingGroup;
int lv_killingFaction;
point lv_deadHeroPosition;
// Automatic Variable Declarations
playergroup autoDBD75236_g;
playergroup auto79D4F5E2_g;
// Variable Initialization
lv_killingTeamGroup = PlayerGroupEmpty();
lv_nearbyUnits = UnitGroupEmpty();
lv_awardGroup = PlayerGroupEmpty();
lv_deadPlayerTeamGroup = PlayerGroupEmpty();
lv_killingGroup = PlayerGroupEmpty();
// Deprecated
StatEventSend(StatEventLastCreated());
return true;
}
playergroup libGame_gf_HeroDeathGetKillingGroupFromKillingTeamGroupAndDeadUnit (playergroup lp_killingTeamGroup, int lp_killingPlayer, unit lp_deadHero) {
// Variable Declarations
int lv_itPlayer;
unit lv_itUnit;
int lv_deadPlayer;
unitgroup lv_nearbyUnits;
playergroup lv_killingGroup;
// Automatic Variable Declarations
unitgroup autoA1BBB25A_g;
int autoA1BBB25A_u;
playergroup auto2B5189AC_g;
unitgroup autoF3785464_g;
int autoF3785464_u;
// Variable Initialization
lv_nearbyUnits = UnitGroupEmpty();
lv_killingGroup = PlayerGroupEmpty();
// Implementation
lv_deadPlayer = UnitGetOwner(lp_deadHero);
if ((lp_killingPlayer > 0) && (lp_killingPlayer <= libCore_gv_bALMaxEnginePlayerCount)) {
lv_nearbyUnits = UnitGroupSearch(null, lp_killingPlayer, UnitGetPosition(lp_deadHero), libCore_gv_bALHeroKillXPRadius, UnitFilter(0, 0, (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterCreep) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
}
else {
if ((lv_deadPlayer != libCore_gv_cOMPUTER_Hostile)) {
lv_nearbyUnits = UnitGroupSearch(null, lv_deadPlayer, UnitGetPosition(lp_deadHero), libCore_gv_bALHeroKillXPRadius, UnitFilter(0, 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterCreep) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
}
}
if ((UnitGetType(libGame_gv_players[lv_deadPlayer].lv_heroUnit) != "HeroLostVikingsController")) {
auto2B5189AC_g = lp_killingTeamGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto2B5189AC_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((lv_itPlayer != libCore_gv_cOMPUTER_TeamOrder) && (lv_itPlayer != libCore_gv_cOMPUTER_TeamChaos) && ((lv_itPlayer == lp_killingPlayer) || ((GameGetMissionTime() - libGame_gv_players[lv_deadPlayer].lv_lastTimeHeroWasWithinXPRadius[lv_itPlayer]) <= libCore_gv_bALHeroKillCreditTimeWindow) || ((GameGetMissionTime() - libGame_gv_players[lv_deadPlayer].lv_lastTimeHeroDealtDamage[lv_itPlayer]) <= libCore_gv_bALHeroKillCreditTimeWindow))) {
PlayerGroupAdd(lv_killingGroup, lv_itPlayer);
}
}
autoF3785464_g = lv_nearbyUnits;
autoF3785464_u = UnitGroupCount(autoF3785464_g, c_unitCountAll);
for (;; autoF3785464_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(autoF3785464_g, autoF3785464_u);
if (lv_itUnit == null) { break; }
if ((UnitHasBehavior2(lv_itUnit, "EarnsXP") == true)) {
PlayerGroupAdd(lv_killingGroup, UnitGetOwner(lv_itUnit));
}
}
}
else {
PlayerGroupAdd(lv_killingGroup, lp_killingPlayer);
autoA1BBB25A_g = lv_nearbyUnits;
autoA1BBB25A_u = UnitGroupCount(autoA1BBB25A_g, c_unitCountAll);
for (;; autoA1BBB25A_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(autoA1BBB25A_g, autoA1BBB25A_u);
if (lv_itUnit == null) { break; }
if ((UnitHasBehavior2(lv_itUnit, "Dead") == false) && ((UnitFilterMatch(lv_itUnit, lv_deadPlayer, libCore_gv_filtersHeroicEnemy) == true) || (UnitHasBehavior2(lv_itUnit, "EarnsXP") == true))) {
PlayerGroupAdd(lv_killingGroup, UnitGetOwner(lv_itUnit));
}
}
}
return lv_killingGroup;
}
trigger auto_libGame_gf_HeroDeathUpdateTeamStats_Trigger = null;
unit auto_libGame_gf_HeroDeathUpdateTeamStats_lp_deadHero;
int auto_libGame_gf_HeroDeathUpdateTeamStats_lp_killingFaction;
void libGame_gf_HeroDeathUpdateTeamStats (unit lp_deadHero, int lp_killingFaction) {
auto_libGame_gf_HeroDeathUpdateTeamStats_lp_deadHero = lp_deadHero;
auto_libGame_gf_HeroDeathUpdateTeamStats_lp_killingFaction = lp_killingFaction;
if (auto_libGame_gf_HeroDeathUpdateTeamStats_Trigger == null) {
auto_libGame_gf_HeroDeathUpdateTeamStats_Trigger = TriggerCreate("auto_libGame_gf_HeroDeathUpdateTeamStats_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_HeroDeathUpdateTeamStats_Trigger, false, false);
}
bool auto_libGame_gf_HeroDeathUpdateTeamStats_TriggerFunc (bool testConds, bool runActions) {
unit lp_deadHero = auto_libGame_gf_HeroDeathUpdateTeamStats_lp_deadHero;
int lp_killingFaction = auto_libGame_gf_HeroDeathUpdateTeamStats_lp_killingFaction;
// Variable Declarations
int lv_deadPlayer;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_deadPlayer = UnitGetOwner(lp_deadHero);
if ((lp_killingFaction == libGame_ge_Faction_Chaos)) {
libGame_gv_teams[2].lv_kills += 1;
libGame_gv_teams[2].lv_multikillStreak += 1;
TimerStart(libGame_gv_teams[2].lv_multikillTimer, libGame_gv_heroDeathMultikillTimeoutDuration, false, c_timeGame);
}
else {
libGame_gv_teams[1].lv_kills += 1;
libGame_gv_teams[1].lv_multikillStreak += 1;
TimerStart(libGame_gv_teams[1].lv_multikillTimer, libGame_gv_heroDeathMultikillTimeoutDuration, false, c_timeGame);
}
return true;
}
trigger auto_libGame_gf_HeroDeathUpdatePlayerStats_Trigger = null;
unit auto_libGame_gf_HeroDeathUpdatePlayerStats_lp_deadHero;
int auto_libGame_gf_HeroDeathUpdatePlayerStats_lp_killingPlayer;
playergroup auto_libGame_gf_HeroDeathUpdatePlayerStats_lp_killingTeamGroup;
playergroup auto_libGame_gf_HeroDeathUpdatePlayerStats_lp_killingGroup;
void libGame_gf_HeroDeathUpdatePlayerStats (unit lp_deadHero, int lp_killingPlayer, playergroup lp_killingTeamGroup, playergroup lp_killingGroup) {
auto_libGame_gf_HeroDeathUpdatePlayerStats_lp_deadHero = lp_deadHero;
auto_libGame_gf_HeroDeathUpdatePlayerStats_lp_killingPlayer = lp_killingPlayer;
auto_libGame_gf_HeroDeathUpdatePlayerStats_lp_killingTeamGroup = lp_killingTeamGroup;
auto_libGame_gf_HeroDeathUpdatePlayerStats_lp_killingGroup = lp_killingGroup;
if (auto_libGame_gf_HeroDeathUpdatePlayerStats_Trigger == null) {
auto_libGame_gf_HeroDeathUpdatePlayerStats_Trigger = TriggerCreate("auto_libGame_gf_HeroDeathUpdatePlayerStats_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_HeroDeathUpdatePlayerStats_Trigger, false, false);
}
bool auto_libGame_gf_HeroDeathUpdatePlayerStats_TriggerFunc (bool testConds, bool runActions) {
unit lp_deadHero = auto_libGame_gf_HeroDeathUpdatePlayerStats_lp_deadHero;
int lp_killingPlayer = auto_libGame_gf_HeroDeathUpdatePlayerStats_lp_killingPlayer;
playergroup lp_killingTeamGroup = auto_libGame_gf_HeroDeathUpdatePlayerStats_lp_killingTeamGroup;
playergroup lp_killingGroup = auto_libGame_gf_HeroDeathUpdatePlayerStats_lp_killingGroup;
// Variable Declarations
int lv_itPlayer;
int lv_itTeamPlayer;
fixed lv_missionTime;
int lv_deadPlayer;
fixed lv_xPGranted;
int lv_levelGap;
// Automatic Variable Declarations
playergroup auto8F61D95F_g;
playergroup auto0E9B9C5D_g;
// Variable Initialization
// Implementation
lv_deadPlayer = UnitGetOwner(lp_deadHero);
lv_missionTime = GameGetMissionTime();
if ((PlayerGroupCount(lp_killingGroup) >= 1)) {
lv_xPGranted = libCore_gf_DataXPXPForHero(PlayerGroupPlayer(lp_killingGroup, 1), lp_deadHero);
}
else {
if (((lp_killingPlayer == libCore_gv_cOMPUTER_TeamOrder) || (lp_killingPlayer == libCore_gv_cOMPUTER_TeamChaos))) {
auto8F61D95F_g = lp_killingTeamGroup;
lv_itTeamPlayer = -1;
while (true) {
lv_itTeamPlayer = PlayerGroupNextPlayer(auto8F61D95F_g, lv_itTeamPlayer);
if (lv_itTeamPlayer<0) { break; }
libGame_gf_ScoreValuesRecordXPContributionForPlayer(lv_itTeamPlayer, (libCore_gf_DataXPXPForHero(lv_itTeamPlayer, lp_deadHero) / PlayerGroupCount(lp_killingTeamGroup)), false);
}
}
}
lv_levelGap = (libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lv_deadPlayer)].lv_teamLevel - libGame_gv_teams[libGame_gf_EnemyTeamNumberOfPlayer(lv_deadPlayer)].lv_teamLevel);
auto0E9B9C5D_g = lp_killingTeamGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto0E9B9C5D_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((PlayerGroupHasPlayer(lp_killingGroup, lv_itPlayer) == true)) {
UIAlert("EnemyHeroKilled", lv_itPlayer, StringToText(""), null);
libGame_gv_players[lv_itPlayer].lv_multikillStreak += 1;
libGame_gf_HeroDeathStartMultikillTimerForPlayer(lv_itPlayer);
libGame_gf_ScoreValuesRecordXPContributionForPlayer(lv_itPlayer, (lv_xPGranted / PlayerGroupCount(lp_killingGroup)), true);
if ((libGame_gv_players[lv_itPlayer].lv_isDead == false)) {
libGame_gv_players[lv_itPlayer].lv_killingSpreeCount += 1;
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_itPlayer, "KillStreak", libGame_gv_players[lv_itPlayer].lv_killingSpreeCount);
if ((PlayerScoreValueGetAsInt(lv_itPlayer, "HighestKillStreak") < libGame_gv_players[lv_itPlayer].lv_killingSpreeCount)) {
libGame_gf_SetAwardValueandWeight(lv_itPlayer, libGame_gv_players[lv_itPlayer].lv_killingSpreeCount, libGame_ge_SecondaryAwards_Dominator);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_itPlayer, "HighestKillStreak", libGame_gv_players[lv_itPlayer].lv_killingSpreeCount);
}
}
libSond_gf_HeroVORegisterHeroTakedownForPlayer(lv_itPlayer, lp_killingGroup, lv_deadPlayer, libGame_gv_players[lv_deadPlayer].lv_killingSpreeCount, lv_levelGap);
libGame_gf_HeroDeathHeroKilledAnnouncementToKillingTeamPlayer(lv_deadPlayer, lp_deadHero, lv_itPlayer, true, lv_xPGranted);
libGame_gf_HeroDeathCheckForKillingSpree(lv_itPlayer);
}
else {
libGame_gf_HeroDeathHeroKilledAnnouncementToKillingTeamPlayer(lv_deadPlayer, lp_deadHero, lv_itPlayer, false, 0.0);
}
}
return true;
}
trigger auto_libGame_gf_HeroDeathAwardXP_Trigger = null;
int auto_libGame_gf_HeroDeathAwardXP_lp_killingPlayer;
unit auto_libGame_gf_HeroDeathAwardXP_lp_deadHero;
playergroup auto_libGame_gf_HeroDeathAwardXP_lp_awardGroup;
playergroup auto_libGame_gf_HeroDeathAwardXP_lp_killingGroup;
bool auto_libGame_gf_HeroDeathAwardXP_lp_takedownScored;
void libGame_gf_HeroDeathAwardXP (int lp_killingPlayer, unit lp_deadHero, playergroup lp_awardGroup, playergroup lp_killingGroup, bool lp_takedownScored) {
auto_libGame_gf_HeroDeathAwardXP_lp_killingPlayer = lp_killingPlayer;
auto_libGame_gf_HeroDeathAwardXP_lp_deadHero = lp_deadHero;
auto_libGame_gf_HeroDeathAwardXP_lp_awardGroup = lp_awardGroup;
auto_libGame_gf_HeroDeathAwardXP_lp_killingGroup = lp_killingGroup;
auto_libGame_gf_HeroDeathAwardXP_lp_takedownScored = lp_takedownScored;
if (auto_libGame_gf_HeroDeathAwardXP_Trigger == null) {
auto_libGame_gf_HeroDeathAwardXP_Trigger = TriggerCreate("auto_libGame_gf_HeroDeathAwardXP_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_HeroDeathAwardXP_Trigger, false, false);
}
bool auto_libGame_gf_HeroDeathAwardXP_TriggerFunc (bool testConds, bool runActions) {
int lp_killingPlayer = auto_libGame_gf_HeroDeathAwardXP_lp_killingPlayer;
unit lp_deadHero = auto_libGame_gf_HeroDeathAwardXP_lp_deadHero;
playergroup lp_awardGroup = auto_libGame_gf_HeroDeathAwardXP_lp_awardGroup;
playergroup lp_killingGroup = auto_libGame_gf_HeroDeathAwardXP_lp_killingGroup;
bool lp_takedownScored = auto_libGame_gf_HeroDeathAwardXP_lp_takedownScored;
// Variable Declarations
int lv_itPlayer;
int lv_deadPlayer;
fixed lv_valueCoefficient;
int lv_levelGap;
fixed lv_xPGranted;
int lv_textTagType;
int lv_killAwardPlayer;
int lv_itDamagingEffect;
playergroup lv_xPlayerGroup;
// Automatic Variable Declarations
playergroup auto0BA49109_g;
const int autoEFD0A0C9_ae = 10;
const int autoEFD0A0C9_ai = 1;
playergroup auto602C466E_g;
playergroup auto44AF96F8_g;
// Variable Initialization
lv_killAwardPlayer = lp_killingPlayer;
lv_xPlayerGroup = PlayerGroupEmpty();
// Implementation
lv_deadPlayer = UnitGetOwner(lp_deadHero);
lv_valueCoefficient = libCore_gf_DataXPGetValueCoefficientForUnit(lp_deadHero);
auto0BA49109_g = lp_awardGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto0BA49109_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((lv_itPlayer == libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lv_itPlayer)].lv_choPlayer)) {
PlayerGroupAdd(lp_awardGroup, libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lv_itPlayer)].lv_gallPlayer);
}
else {
if ((lv_itPlayer == libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lv_itPlayer)].lv_gallPlayer)) {
PlayerGroupAdd(lp_awardGroup, libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lv_itPlayer)].lv_choPlayer);
}
}
}
if ((lp_takedownScored == true)) {
libGame_gv_scoreValues[lv_deadPlayer].lv_deaths += lv_valueCoefficient;
libGame_gf_ScoreValuesReportRealValueAndLog(lv_deadPlayer, "Deaths", libGame_gv_scoreValues[lv_deadPlayer].lv_deaths);
if ((lp_killingPlayer > libCore_gv_bALMaxPlayers)) {
lv_itDamagingEffect = 1;
for ( ; ( (autoEFD0A0C9_ai >= 0 && lv_itDamagingEffect <= autoEFD0A0C9_ae) || (autoEFD0A0C9_ai < 0 && lv_itDamagingEffect >= autoEFD0A0C9_ae) ) ; lv_itDamagingEffect += autoEFD0A0C9_ai ) {
if ((libGame_gv_deathRecap_DeathData[lv_deadPlayer].lv_effectBars[lv_itDamagingEffect].lv_time <= libGame_gv_heroDeathHeroDamageLookBackWindow)) {
if ((libGame_gv_deathRecap_DeathData[lv_deadPlayer].lv_effectBars[lv_itDamagingEffect].lv_isHeal == false) && (libGame_gv_deathRecap_DeathData[lv_deadPlayer].lv_effectBars[lv_itDamagingEffect].lv_effectPlayer <= libCore_gv_bALMaxPlayers) && (libGame_gv_deathRecap_DeathData[lv_deadPlayer].lv_effectBars[lv_itDamagingEffect].lv_effectPlayer > 0)) {
lv_killAwardPlayer = libGame_gv_deathRecap_DeathData[lv_deadPlayer].lv_effectBars[lv_itDamagingEffect].lv_effectPlayer;
break;
}
}
else {
break;
}
}
}
auto602C466E_g = lp_killingGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto602C466E_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
libGame_gv_scoreValues[lv_itPlayer].lv_takedowns += lv_valueCoefficient;
libGame_gf_ScoreValuesReportRealValueAndLog(lv_itPlayer, "Takedowns", libGame_gv_scoreValues[lv_itPlayer].lv_takedowns);
if ((lv_itPlayer == lv_killAwardPlayer)) {
libGame_gv_scoreValues[lv_itPlayer].lv_kills += lv_valueCoefficient;
libGame_gf_ScoreValuesReportRealValueAndLog(lv_itPlayer, "SoloKill", libGame_gv_scoreValues[lv_itPlayer].lv_kills);
}
else {
libGame_gv_scoreValues[lv_itPlayer].lv_assists += lv_valueCoefficient;
libGame_gf_ScoreValuesReportRealValueAndLog(lv_itPlayer, "Assists", libGame_gv_scoreValues[lv_itPlayer].lv_assists);
}
}
}
if (((lp_killingPlayer == libCore_gv_cOMPUTER_TeamOrder) || (lp_killingPlayer == libCore_gv_cOMPUTER_TeamChaos) || (PlayerGroupCount(lp_killingGroup) != 0))) {
libGame_gf_ScoreValuesReportRealValueAndLog(PlayerGroupPlayer(libGame_gf_AlliedPlayerGroupOfPlayer(lv_deadPlayer), 1), "TeamTakedowns", (PlayerScoreValueGetAsFixed(PlayerGroupPlayer(libGame_gf_AlliedPlayerGroupOfPlayer(lv_deadPlayer), 1), "TeamTakedowns") + lv_valueCoefficient));
}
else {
return true;
}
if ((libCore_gv_sYSXPOn == false)) {
return true;
}
if ((libCore_gv_dEBUGDebuggingEnabled == true) && (libSprt_gv_dEBUGXPSourceHero == false)) {
return true;
}
if ((libCore_gv_dEBUGSoloXPOn == true)) {
lv_xPlayerGroup = PlayerGroupCopy(lp_killingGroup);
}
else {
lv_xPlayerGroup = PlayerGroupCopy(lp_awardGroup);
}
auto44AF96F8_g = lv_xPlayerGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto44AF96F8_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
lv_levelGap = libCore_gf_DataXPLevelGapBetweenHeroes(lv_itPlayer, lp_deadHero);
lv_xPGranted = libCore_gf_DataXPXPForHero(lv_itPlayer, lp_deadHero);
libGame_gf_GrantXPToPlayer(lv_xPGranted, lv_itPlayer, libGame_ge_XPSources_Hero);
if ((lv_levelGap <= -2)) {
lv_textTagType = libCore_ge_FloatingTextType_XPSmall;
}
else {
if ((lv_levelGap >= 2)) {
lv_textTagType = libCore_ge_FloatingTextType_XPLarge;
}
else {
lv_textTagType = libCore_ge_FloatingTextType_XPMedium;
}
}
libUIUI_gf_UIFloatingCombatTextH16MidXP(lv_itPlayer, lp_deadHero, libCore_ge_FloatingTextType_XPLarge, FixedToInt(lv_xPGranted));
}
libUIUI_gf_UIFloatingCombatTextH16MidXP(lv_deadPlayer, lp_deadHero, libCore_ge_FloatingTextType_XPSelf, FixedToInt(lv_xPGranted));
libUIUI_gf_DeathRecapPopulateXPValue(lv_deadPlayer, FixedToInt(lv_xPGranted), lp_deadHero);
return true;
}
trigger auto_libGame_gf_HeroDeathDeadTeamAnnouncements_Trigger = null;
unit auto_libGame_gf_HeroDeathDeadTeamAnnouncements_lp_deadHero;
playergroup auto_libGame_gf_HeroDeathDeadTeamAnnouncements_lp_deadPlayerTeamGroup;
int auto_libGame_gf_HeroDeathDeadTeamAnnouncements_lp_killingFaction;
void libGame_gf_HeroDeathDeadTeamAnnouncements (unit lp_deadHero, playergroup lp_deadPlayerTeamGroup, int lp_killingFaction) {
auto_libGame_gf_HeroDeathDeadTeamAnnouncements_lp_deadHero = lp_deadHero;
auto_libGame_gf_HeroDeathDeadTeamAnnouncements_lp_deadPlayerTeamGroup = lp_deadPlayerTeamGroup;
auto_libGame_gf_HeroDeathDeadTeamAnnouncements_lp_killingFaction = lp_killingFaction;
if (auto_libGame_gf_HeroDeathDeadTeamAnnouncements_Trigger == null) {
auto_libGame_gf_HeroDeathDeadTeamAnnouncements_Trigger = TriggerCreate("auto_libGame_gf_HeroDeathDeadTeamAnnouncements_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_HeroDeathDeadTeamAnnouncements_Trigger, false, false);
}
bool auto_libGame_gf_HeroDeathDeadTeamAnnouncements_TriggerFunc (bool testConds, bool runActions) {
unit lp_deadHero = auto_libGame_gf_HeroDeathDeadTeamAnnouncements_lp_deadHero;
playergroup lp_deadPlayerTeamGroup = auto_libGame_gf_HeroDeathDeadTeamAnnouncements_lp_deadPlayerTeamGroup;
int lp_killingFaction = auto_libGame_gf_HeroDeathDeadTeamAnnouncements_lp_killingFaction;
// Variable Declarations
int lv_itPlayer;
int lv_deadPlayer;
int lv_deadPlayerTeam;
playergroup lv_deadPlayerTeamGroupMinusDeadPlayer;
bool lv_entireTeamDead;
int lv_enemyTeam;
// Automatic Variable Declarations
// Variable Initialization
lv_deadPlayerTeamGroupMinusDeadPlayer = PlayerGroupEmpty();
lv_entireTeamDead = true;
// Implementation
lv_deadPlayer = UnitGetOwner(lp_deadHero);
lv_deadPlayerTeam = libGame_gf_TeamNumberOfPlayer(lv_deadPlayer);
lv_deadPlayerTeamGroupMinusDeadPlayer = PlayerGroupCopy(lp_deadPlayerTeamGroup);
PlayerGroupRemove(lv_deadPlayerTeamGroupMinusDeadPlayer, lv_deadPlayer);
if ((UnitGroupCount(libGame_gv_players[lv_deadPlayer].lv_heroUnitGroup, c_unitCountAlive) < 1)) {
libGame_gf_HeroDeathYouHaveDiedAnnouncementToDeadPlayer(lv_deadPlayer);
}
else {
libGame_gf_HeroDeathHeroHasDiedAnnouncementToDeadPlayer(lv_deadPlayer, lp_deadHero);
}
libGame_gf_HeroDeathHeroDiedAnnouncementToAlliedPlayerGroup(lv_deadPlayer, lp_deadHero, lv_deadPlayerTeamGroupMinusDeadPlayer);
libGame_gf_HeroDeathHeroKilledAnnouncementToObserver(lv_deadPlayer, lp_deadHero);
libGame_gf_HeroDeathCheckForTeamDominatedAnnouncement(lv_deadPlayerTeam);
return true;
}
void libGame_gf_HeroDeathCheckForTeamDominatedAnnouncement (int lp_deadPlayerTeam) {
// Variable Declarations
int lv_itPlayer;
bool lv_entireTeamDead;
int lv_enemyTeam;
// Automatic Variable Declarations
playergroup autoF6A7EEAC_g;
playergroup autoF76BFC27_g;
// Variable Initialization
lv_entireTeamDead = true;
// Implementation
lv_entireTeamDead = true;
autoF6A7EEAC_g = libGame_gf_PlayersOnTeamHeroes(lp_deadPlayerTeam, false);
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoF6A7EEAC_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((libGame_gv_players[lv_itPlayer].lv_isDead == false) && (UnitHasBehavior2(libGame_gv_players[lv_itPlayer].lv_heroUnit, "TyraelArchangelsWrathDeathActiveBuff") == false) && (UnitHasBehavior2(libGame_gv_players[lv_itPlayer].lv_heroUnit, "UtherEternalVanguardRezDelay") == false)) {
lv_entireTeamDead = false;
break;
}
}
if ((lv_entireTeamDead == true)) {
autoF76BFC27_g = libGame_gf_PlayersOnTeamHeroes(lp_deadPlayerTeam, false);
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoF76BFC27_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
libSond_gf_HeroVOStartTeamKilledVOTimerForPlayer(lv_itPlayer, libGame_gv_heroDeathTeamKilledVODelay);
}
lv_enemyTeam = (3 - lp_deadPlayerTeam);
if ((lv_enemyTeam <= libCore_gv_bALMaxTeams)) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_TeamKill, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, true);
if ((lp_deadPlayerTeam == libGame_gv_teamOrderIndex_C)) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_BlueTeamKilled, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
else {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_RedTeamKilled, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
}
}
}
void libGame_gf_HeroDeathCheckToSeeIfLivingAlliesExist (unit lp_deadUnit, int lp_deadPlayerTeamNumber, playergroup lp_deadPlayersTeam) {
// Variable Declarations
bool lv_entireTeamDead;
int lv_itPlayer;
int lv_numberOfPlayersOnDeadPlayersTeam;
int lv_speakingPlayer;
// Automatic Variable Declarations
playergroup auto11DEDC0E_g;
// Variable Initialization
lv_entireTeamDead = true;
// Implementation
lv_entireTeamDead = true;
auto11DEDC0E_g = libGame_gf_PlayersOnTeamHeroes(lp_deadPlayerTeamNumber, true);
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto11DEDC0E_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((libGame_gv_players[lv_itPlayer].lv_isDead == false) && (UnitHasBehavior2(libGame_gv_players[lv_itPlayer].lv_heroUnit, "TyraelArchangelsWrathDeathActiveBuff") == false) && (UnitHasBehavior2(libGame_gv_players[lv_itPlayer].lv_heroUnit, "UtherEternalVanguardRezDelay") == false)) {
lv_entireTeamDead = false;
break;
}
}
if ((lv_entireTeamDead == false)) {
lv_numberOfPlayersOnDeadPlayersTeam = PlayerGroupCount(lp_deadPlayersTeam);
lv_speakingPlayer = PlayerGroupPlayer(lp_deadPlayersTeam, RandomInt(1, lv_numberOfPlayersOnDeadPlayersTeam));
libSond_gf_HeroVOStartAlliedTakedownVOTimerForPlayer(lv_speakingPlayer, 3.5);
}
}
void libGame_gf_HeroDeathStartRespawnTimer (int lp_player, fixed lp_initialRespawnTime) {
// Variable Declarations
unit lv_heroUnit;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_heroUnit = libGame_gv_players[lp_player].lv_heroUnit;
UnitSetState(lv_heroUnit, c_unitStateStatusBar, false);
if ((libGame_gv_heroDeathRespawnSetting == libGame_ge_HeroDeathRespawnOptions_NoRespawn)) {
return ;
}
libGame_gv_players[lp_player].lv_timeSpentDead += lp_initialRespawnTime;
TimerStart(libGame_gv_players[lp_player].lv_respawnTimer, lp_initialRespawnTime, false, c_timeGame);
TimerStart(libGame_gv_players[lp_player].lv_respawnSoundCueTimer, MaxF((lp_initialRespawnTime - libGame_gv_heroDeathRespawnCueSoundTiming), 0.0625), false, c_timeGame);
libGame_gf_ScoreValuesReportRealValueAndLog(lp_player, "TimeSpentDead", libGame_gv_players[lp_player].lv_timeSpentDead);
}
void libGame_gf_HeroDeathUpdateUIElementsForDeath (bool lp_showOverlay, bool lp_registerwithAnnouncementUI, bool lp_showDeathRecapToast, int lp_player, int lp_killingPlayer) {
// Automatic Variable Declarations
// Implementation
if ((libGame_gv_heroDeath_RunDeathUIUpdates == false)) {
return ;
}
if (((lp_killingPlayer < 1) || (lp_killingPlayer > libCore_gv_bALMaxEnginePlayerCount))) {
TextExpressionSetToken("Param/Expression/lib_Game_5FB257F8", "A", IntToText(lp_killingPlayer));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_5FB257F8"), true);
return ;
}
libGame_gf_UpdateStormMapLighting(PlayerGroupSingle(lp_player), 0.0);
libUIUI_gf_UIHeroConsoleShowHideUnitStatusFrameForPlayer(false, lp_player);
libUIUI_gf_UIPartyFrameHeroDies(lp_player, libGame_gv_players[lp_player].lv_heroUnit);
if ((lp_registerwithAnnouncementUI == true)) {
}
if ((lp_showOverlay == true)) {
libUIUI_gf_FullscreenOverlaysShowHideDeathOverlay(true, lp_player);
}
libGame_gf_HeroDeathAddStingerSoundToQueueForPlayer("Gen_Hero_Death_Self", libGame_ge_HeroDeathKillStingerQueueType_Ally, lp_player);
if ((lp_showDeathRecapToast == true)) {
libUIUI_gf_DeathRecapShowHideToastButtonForPlayer(true, lp_player);
}
}
void libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer (bool lp_enableDisable, int lp_player) {
// Variable Declarations
fixed lv_deathTimeRemaining;
fixed lv_soundOffset;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if ((lp_enableDisable == true)) {
SoundChannelDSPInsert(libCore_gv_playerGroupFromPlayer[lp_player], c_soundCategoryUser2, "Heroes_Lowpass_Death");
SoundChannelMute(libCore_gv_playerGroupFromPlayer[lp_player], c_soundCategoryAmbient, true);
lv_deathTimeRemaining = TimerGetRemaining(libGame_gv_players[lp_player].lv_respawnTimer);
lv_soundOffset = (libCore_gv_bALMaxDeathTime - lv_deathTimeRemaining);
SoundPlayForPlayer(SoundLink("Gen_Hero_Respawn_Amb", -1), lp_player, libCore_gv_playerGroupFromPlayer[lp_player], 100.0, lv_soundOffset);
libGame_gv_heroDeath_DeathAmbientSound[lp_player] = SoundLastPlayed();
SoundtrackStopCurrent(PlayerGroupSingle(lp_player), c_soundtrackCategoryMusic, true);
SoundtrackPlay(PlayerGroupSingle(lp_player), c_soundtrackCategoryMusic, "MX_Dead", c_soundtrackCueAny, c_soundtrackIndexAny, true);
}
else {
SoundChannelDSPRemove(libCore_gv_playerGroupFromPlayer[lp_player], c_soundCategoryUser2, "Heroes_Lowpass_Death");
SoundStop(libGame_gv_heroDeath_DeathAmbientSound[lp_player], true);
libSond_gf_SoundtrackStopDeadSoundtrackforPlayer(lp_player);
SoundChannelMute(libCore_gv_playerGroupFromPlayer[lp_player], c_soundCategoryAmbient, false);
}
}
void libGame_gf_HeroDeathPortHeroBackAndSetDeathState (int lp_player, point lp_portLocation) {
// Variable Declarations
int lv_i;
unit lv_heroUnit;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_heroUnit = libGame_gv_players[lp_player].lv_heroUnit;
UnitSetPropertyFixed(lv_heroUnit, c_unitPropLifePercent, 100.0);
UnitSetPropertyFixed(lv_heroUnit, c_unitPropEnergyPercent, 100.0);
UnitBehaviorAdd(lv_heroUnit, "Dead", lv_heroUnit, 1);
if ((UnitBehaviorCount(EventUnit(), "NoDeadMechanics") == 0)) {
UnitBehaviorAdd(lv_heroUnit, "DeadMechanics", lv_heroUnit, 1);
}
if ((TimerGetDuration(libGame_gv_players[lp_player].lv_respawnTimer) > 0.0)) {
UnitBehaviorSetDuration(lv_heroUnit, "Dead", TimerGetRemaining(libGame_gv_players[lp_player].lv_respawnTimer));
}
else {
UnitBehaviorSetDuration(lv_heroUnit, "Dead", 0.0);
}
if ((UnitHasBehavior2(lv_heroUnit, "GuldanDarkBargainDuration") == true)) {
libUIUI_gf_HeroConsoleUnitStatusBarsUpdateStunDeathBar("GuldanDarkBargainDuration", lp_player);
}
else {
libUIUI_gf_HeroConsoleUnitStatusBarsUpdateStunDeathBar("Dead", lp_player);
}
Wait(0.5, c_timeGame);
if ((libGame_gv_heroDeathRespawnSetting != libGame_ge_HeroDeathRespawnOptions_NoRespawn)) {
UnitSetPosition(lv_heroUnit, lp_portLocation, false);
UnitSetFacing(lv_heroUnit, PointGetFacing(libGame_gv_players[lp_player].lv_spawnPoint), 0.0);
}
}
void libGame_gf_HeroDeathModifyRespawnTimer (int lp_respawningPlayer, fixed lp_modificationAmount) {
// Variable Declarations
fixed lv_currentRespawnTimer;
fixed lv_newRespawnTimer;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_currentRespawnTimer = TimerGetRemaining(libGame_gv_players[lp_respawningPlayer].lv_respawnTimer);
if ((lv_currentRespawnTimer == 0.0)) {
return ;
}
lv_newRespawnTimer = (lv_currentRespawnTimer + lp_modificationAmount);
if ((lv_newRespawnTimer < 0.5)) {
lv_newRespawnTimer = 0.5;
}
libGame_gf_HeroDeathUpdateRespawnTimer(lp_respawningPlayer, lv_newRespawnTimer);
}
void libGame_gf_HeroDeathUpdateRespawnTimer (int lp_respawningPlayer, fixed lp_newRespawnTimerDuration) {
// Variable Declarations
fixed lv_currentRespawnTimer;
fixed lv_soundOffset;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_currentRespawnTimer = TimerGetRemaining(libGame_gv_players[lp_respawningPlayer].lv_respawnTimer);
if ((lv_currentRespawnTimer == 0.0)) {
return ;
}
if ((lv_currentRespawnTimer < lp_newRespawnTimerDuration)) {
UnitBehaviorSetDuration(libGame_gv_players[lp_respawningPlayer].lv_heroUnit, "Dead", lp_newRespawnTimerDuration);
}
else {
UnitBehaviorSetDurationRemaining(libGame_gv_players[lp_respawningPlayer].lv_heroUnit, "Dead", lp_newRespawnTimerDuration);
}
TimerStart(libGame_gv_players[lp_respawningPlayer].lv_respawnTimer, lp_newRespawnTimerDuration, false, c_timeGame);
TimerStart(libGame_gv_players[lp_respawningPlayer].lv_respawnSoundCueTimer, MaxF((lp_newRespawnTimerDuration - libGame_gv_heroDeathRespawnCueSoundTiming), 0.0625), false, c_timeGame);
DialogControlSetVisible(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarParentFrame, libCore_gv_playerGroupFromPlayer[lp_respawningPlayer], false);
libUIUI_gf_HeroConsoleUnitStatusBarsUpdateStunDeathBar("Dead", lp_respawningPlayer);
if ((UnitHasBehavior2(libGame_gv_players[lp_respawningPlayer].lv_heroUnit, "HeroGenericIgnoreDeathSounds") == false)) {
SoundStop(libGame_gv_heroDeath_DeathAmbientSound[lp_respawningPlayer], false);
if ((lp_newRespawnTimerDuration > 0.0)) {
lv_soundOffset = (libCore_gv_bALMaxDeathTime - lp_newRespawnTimerDuration);
SoundPlayForPlayer(SoundLink("Gen_Hero_Respawn_Amb", -1), lp_respawningPlayer, libCore_gv_playerGroupFromPlayer[lp_respawningPlayer], 100.0, lv_soundOffset);
}
}
else {
if ((lp_newRespawnTimerDuration > 0.0)) {
lv_soundOffset = (libCore_gv_bALMaxDeathTime - lp_newRespawnTimerDuration);
}
}
}
void libGame_gf_HeroDeathRespawnHeroforPlayer (bool lp_respawnMounted, int lp_player, point lp_reSpawnLocation, int lp_reSpawnHealthPercent) {
// Variable Declarations
int lv_i;
unit lv_heroUnit;
int lv_teamID;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_heroUnit = libGame_gv_players[lp_player].lv_heroUnit;
lv_teamID = libGame_gf_TeamNumberOfPlayer(lp_player);
if ((UnitHasBehavior2(lv_heroUnit, "AbnormalRespawn") == true)) {
return ;
}
UnitKill(libGame_gv_players[lp_player].lv_gravestone);
UnitBehaviorRemove(lv_heroUnit, "Dead", 1);
UnitBehaviorRemove(lv_heroUnit, "DeadMechanics", 1);
UnitRevive(lv_heroUnit);
UnitSetState(lv_heroUnit, c_unitStateStatusBar, true);
UnitSetPropertyFixed(lv_heroUnit, c_unitPropLifePercent, lp_reSpawnHealthPercent);
UnitSetPropertyFixed(lv_heroUnit, c_unitPropShieldsPercent, lp_reSpawnHealthPercent);
if ((UnitHasBehavior2(lv_heroUnit, "HeroGeneric0EnergyOnRespawn") == true)) {
UnitSetPropertyFixed(lv_heroUnit, c_unitPropEnergyPercent, 0.0);
}
else {
UnitSetPropertyFixed(lv_heroUnit, c_unitPropEnergyPercent, 100.0);
}
libGame_gv_players[lp_player].lv_isDead = false;
UnitCreateEffectUnit(lv_heroUnit, "HallOfStormsAllyApplySet", lv_heroUnit);
if ((UnitGetType(lv_heroUnit) == "HeroMurky")) {
libGDHL_gf_HeroMurkyRespawnLogicCheck(lp_player);
}
else {
if ((lv_heroUnit != null)) {
UnitSetPosition(lv_heroUnit, lp_reSpawnLocation, false);
}
}
libGame_gf_SendEventHeroRespawn(lp_player, lv_heroUnit);
libUIUI_gf_FullscreenOverlaysShowHideDeathOverlay(false, lp_player);
TextTagDestroy(libGame_gv_players[lp_player].lv_gravestoneTextTag);
UIAlert("YourHeroHasRevived", lp_player, StringToText(""), null);
libGame_gf_AfkResumeWarningTimerForPlayer(lp_player);
libNtve_gf_SendActorMessageToUnit(lv_heroUnit, "Signal Respawn");
libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(false, lp_player);
if ((libGame_gv_players[lp_player].lv_suppressReviveVOSound == false)) {
libSond_gf_HeroVOPlayHeroLine(libCore_ge_HeroVOEvents_Revive, lp_player, libCore_gv_playerGroupFromPlayer[lp_player]);
}
UnitRemove(libGame_gv_players[lp_player].lv_cameraDeadUnitCameraTarget);
libGame_gv_players[lp_player].lv_cameraDeadUnitCameraTarget = null;
libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn = libNtve_gf_ConvertUnitToUnitGroup(lv_heroUnit);
libGame_gf_CameraUpdateCameraForPlayer(lp_player);
libUIUI_gf_UIHeroConsoleShowHideUnitStatusFrameForPlayer(true, lp_player);
if ((lp_respawnMounted == true) && ((UnitHasBehavior2(lv_heroUnit, "HallOfStormsProtectionBuff") == true) || (UnitGetType(lv_heroUnit) == "HeroMurky"))) {
libGame_gf_ApplyMountBehaviorToHero(lv_heroUnit);
libGame_gf_SendEventHeroSpecialCaseMounting(lp_player);
}
libAIAI_gf_AITeamDelegateModifyHeroStatusTokensforTeam(libAIAI_ge_AITeamDelegateAddRemoveLaneValue_Add, libGame_gv_players[lp_player].lv_aIHeroDelegateTokenValue, lv_teamID, libAIAI_ge_AITeamDelegateLivingDeadHeroStatusUpdates_HeroAlive);
libAIAI_gf_AITeamDelegateModifyHeroStatusTokensforTeam(libAIAI_ge_AITeamDelegateAddRemoveLaneValue_Remove, libGame_gv_players[lp_player].lv_aIHeroDelegateTokenValue, lv_teamID, libAIAI_ge_AITeamDelegateLivingDeadHeroStatusUpdates_HeroDead);
}
void libGame_gf_HeroDeathAddSecondaryTexttoAnnouncementforPlayer (int lp_playerID, text lp_text) {
// Automatic Variable Declarations
// Implementation
libGame_gv_heroDeathAnnouncementSecondaryText[lp_playerID] = lp_text;
}
void libGame_gf_HeroDeathHeroKilledAnnouncementToKillingTeamPlayer (int lp_deadPlayer, unit lp_deadHero, int lp_killingTeamPlayer, bool lp_playerWasInvolvedInKill, fixed lp_xPValue) {
// Variable Declarations
int lv_multiKillStreak;
int lv_killingTeam;
int lv_vOEvent;
string lv_deathStingerSound;
string lv_animName;
text lv_titleText;
text lv_timerHeaderText;
fixed lv_duration;
// Automatic Variable Declarations
int auto869E4A78_val;
// Variable Initialization
lv_vOEvent = libCore_ge_AnnouncerVOEvents_Null;
lv_animName = "";
// Implementation
lv_killingTeam = libGame_gf_TeamNumberOfPlayer(lp_killingTeamPlayer);
lv_multiKillStreak = libGame_gv_players[lp_killingTeamPlayer].lv_multikillStreak;
if ((UnitGetType(libGame_gv_players[lp_deadPlayer].lv_heroUnit) == "HeroCho")) {
lv_multiKillStreak += 1;
}
if ((lp_playerWasInvolvedInKill == true)) {
if ((libGame_gv_heroDeathMultikillTimerEnabled == true)) {
lv_titleText = StringExternal("Param/Value/lib_Game_D15A04EC");
lv_timerHeaderText = StringExternal("Param/Value/lib_Game_F26BF83C");
auto869E4A78_val = lv_multiKillStreak;
if (auto869E4A78_val == 1) {
lv_vOEvent = libCore_ge_AnnouncerVOEvents_EnemyKilledParticipants;
if ((lv_killingTeam == libGame_gv_teamOrderIndex_C)) {
lv_deathStingerSound = "UI_HeroDeath_Gen_Enemy_R";
}
else {
lv_deathStingerSound = "UI_HeroDeath_Gen_Enemy_L";
}
lv_animName = "ShowTimedNotification_Tier0";
lv_titleText = StringExternal("Param/Value/lib_Game_06CF4DA5");
lv_duration = libGame_gv_announcement_KillAnnouncementDuration_C;
libUIUI_gf_NotificationDisplaySetMultikillTimerLabelsForPlayer(lp_killingTeamPlayer, lv_timerHeaderText, StringExternal("Param/Value/lib_Game_22310867"));
}
else if (auto869E4A78_val == 2) {
lv_vOEvent = libCore_ge_AnnouncerVOEvents_DoubleKill;
if ((lv_killingTeam == libGame_gv_teamOrderIndex_C)) {
lv_deathStingerSound = "Gen_Hero_Death_Double_R";
}
else {
lv_deathStingerSound = "Gen_Hero_Death_Double_L";
}
lv_animName = "ShowTimedNotification_Tier1";
lv_duration = libGame_gv_announcement_KillAnnouncementDuration_C;
libUIUI_gf_NotificationDisplaySetMultikillTimerLabelsForPlayer(lp_killingTeamPlayer, lv_timerHeaderText, StringExternal("Param/Value/lib_Game_EA230E99"));
libGame_gf_SendEventPlayerAchievesMultiKill(lp_killingTeamPlayer, libGame_gv_players[lp_killingTeamPlayer].lv_multikillStreak);
libGame_gv_scoreValues[lp_killingTeamPlayer].lv_multikill += 1;
}
else if (auto869E4A78_val == 3) {
lv_vOEvent = libCore_ge_AnnouncerVOEvents_TripleKill;
if ((lv_killingTeam == libGame_gv_teamOrderIndex_C)) {
lv_deathStingerSound = "Gen_Hero_Death_Triple_R";
}
else {
lv_deathStingerSound = "Gen_Hero_Death_Triple_L";
}
lv_animName = "ShowTimedNotification_Tier2";
lv_duration = libGame_gv_announcement_KillAnnouncementDuration_C;
libUIUI_gf_NotificationDisplaySetMultikillTimerLabelsForPlayer(lp_killingTeamPlayer, lv_timerHeaderText, StringExternal("Param/Value/lib_Game_CCDACBD8"));
libGame_gf_SendEventPlayerAchievesMultiKill(lp_killingTeamPlayer, libGame_gv_players[lp_killingTeamPlayer].lv_multikillStreak);
}
else if (auto869E4A78_val == 4) {
lv_vOEvent = libCore_ge_AnnouncerVOEvents_QuadraKill;
if ((lv_killingTeam == libGame_gv_teamOrderIndex_C)) {
lv_deathStingerSound = "Gen_Hero_Death_Four_R";
}
else {
lv_deathStingerSound = "Gen_Hero_Death_Four_L";
}
lv_animName = "ShowTimedNotification_Tier3";
lv_duration = libGame_gv_announcement_KillAnnouncementDuration_C;
libUIUI_gf_NotificationDisplaySetMultikillTimerLabelsForPlayer(lp_killingTeamPlayer, lv_timerHeaderText, StringExternal("Param/Value/lib_Game_7CC15B43"));
libGame_gf_SendEventPlayerAchievesMultiKill(lp_killingTeamPlayer, libGame_gv_players[lp_killingTeamPlayer].lv_multikillStreak);
}
else if (auto869E4A78_val == 5) {
lv_vOEvent = libCore_ge_AnnouncerVOEvents_MegaKill;
if ((lv_killingTeam == libGame_gv_teamOrderIndex_C)) {
lv_deathStingerSound = "Gen_Hero_Death_Penta_R";
}
else {
lv_deathStingerSound = "Gen_Hero_Death_Penta_L";
}
lv_animName = "ShowTimedNotification_Tier4";
lv_duration = libGame_gv_announcement_LongAnnouncementDuration_C;
libUIUI_gf_NotificationDisplaySetMultikillTimerLabelsForPlayer(lp_killingTeamPlayer, lv_timerHeaderText, StringExternal("Param/Value/lib_Game_678E76AB"));
libGame_gf_SendEventPlayerAchievesMultiKill(lp_killingTeamPlayer, libGame_gv_players[lp_killingTeamPlayer].lv_multikillStreak);
}
else {
lv_vOEvent = libCore_ge_AnnouncerVOEvents_EnemyKilledParticipants;
if ((lv_killingTeam == libGame_gv_teamOrderIndex_C)) {
lv_deathStingerSound = ((libGame_gv_players[lp_deadPlayer].lv_soundDeathAlertPrefix + "Enemy_R"));
}
else {
lv_deathStingerSound = ((libGame_gv_players[lp_deadPlayer].lv_soundDeathAlertPrefix + "Enemy_L"));
}
lv_duration = libGame_gv_announcement_KillAnnouncementDuration_C;
if ((libGame_gv_players[lp_killingTeamPlayer].lv_multikillStreak > 5)) {
lv_animName = "ShowTimedNotification_Tier4";
libUIUI_gf_NotificationDisplaySetMultikillTimerLabelsForPlayer(lp_killingTeamPlayer, lv_timerHeaderText, StringExternal("Param/Value/lib_Game_A83B9DD0"));
libGame_gf_SendEventPlayerAchievesMultiKill(lp_killingTeamPlayer, libGame_gv_players[lp_killingTeamPlayer].lv_multikillStreak);
}
else {
lv_animName = "ShowStandardNotification";
libUIUI_gf_NotificationDisplaySetMultikillTimerLabelsForPlayer(lp_killingTeamPlayer, lv_timerHeaderText, StringExternal("Param/Value/lib_Game_E1950CAE"));
}
}
}
else {
lv_vOEvent = libCore_ge_AnnouncerVOEvents_EnemyKilledParticipants;
if ((lv_killingTeam == libGame_gv_teamOrderIndex_C)) {
lv_deathStingerSound = ((libGame_gv_players[lp_deadPlayer].lv_soundDeathAlertPrefix + "Enemy_R"));
}
else {
lv_deathStingerSound = ((libGame_gv_players[lp_deadPlayer].lv_soundDeathAlertPrefix + "Enemy_L"));
}
lv_animName = "ShowStandardNotification";
lv_titleText = StringExternal("Param/Value/lib_Game_027DFECA");
lv_duration = libGame_gv_announcement_KillAnnouncementDuration_C;
}
}
else {
if ((lv_killingTeam == libGame_gv_teamOrderIndex_C)) {
lv_deathStingerSound = ((libGame_gv_players[lp_deadPlayer].lv_soundDeathAlertPrefix + "Enemy_Offscreen_R"));
}
else {
lv_deathStingerSound = ((libGame_gv_players[lp_deadPlayer].lv_soundDeathAlertPrefix + "Enemy_Offscreen_L"));
}
}
libGame_gf_HeroDeathAddStingerSoundToQueueForPlayer(lv_deathStingerSound, libGame_ge_HeroDeathKillStingerQueueType_Enemy, lp_killingTeamPlayer);
if ((libGame_gv_firstBloodAvailable == true)) {
lv_vOEvent = libCore_ge_AnnouncerVOEvents_AllyFirstBlood;
lv_titleText = StringExternal("Param/Value/lib_Game_3AA52D1D");
}
if ((lp_playerWasInvolvedInKill == true) && (libGame_gv_players[lp_deadPlayer].lv_suppressHeroAnnouncements == false)) {
if ((libGame_gv_players[lp_deadPlayer].lv_heroUsesAnnouncementAlias == true)) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[lp_killingTeamPlayer], libGame_ge_AnnouncementPriorities_Critical, lv_vOEvent, lv_animName, lv_titleText, libGame_gv_players[lp_deadPlayer].lv_heroAnnouncementAliasText, null, null, null, lv_duration, true);
}
else {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[lp_killingTeamPlayer], libGame_ge_AnnouncementPriorities_Critical, lv_vOEvent, lv_animName, lv_titleText, UnitTypeGetName(UnitGetType(lp_deadHero)), null, null, null, lv_duration, true);
}
}
}
void libGame_gf_HeroDeathHeroKilledAnnouncementToObserver (int lp_deadPlayer, unit lp_deadHero) {
// Variable Declarations
int lv_killingTeam;
text lv_killMessage;
int lv_vOEvent;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_killingTeam = libGame_gf_EnemyTeamNumberOfPlayer(lp_deadPlayer);
if ((lv_killingTeam == 1)) {
lv_killMessage = StringExternal("Param/Value/lib_Game_95A823E0");
}
else {
lv_killMessage = StringExternal("Param/Value/lib_Game_DBC9E655");
}
if ((libGame_gv_firstBloodAvailable == true)) {
if ((lv_killingTeam == 1)) {
lv_vOEvent = libCore_ge_AnnouncerVOEvents_BlueTeamFirstBlood;
}
else {
lv_vOEvent = libCore_ge_AnnouncerVOEvents_RedTeamFirstBlood;
}
}
else {
lv_vOEvent = libCore_ge_AnnouncerVOEvents_HeroKilledObserver;
}
if ((lv_killingTeam == 1)) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Critical, lv_vOEvent, "ShowStandardNotification", lv_killMessage, UnitTypeGetName(UnitGetType(lp_deadHero)), null, null, null, libGame_gv_announcement_KillAnnouncementDuration_C, false);
}
else {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Critical, lv_vOEvent, "ShowEnemyNotification", lv_killMessage, UnitTypeGetName(UnitGetType(lp_deadHero)), null, null, null, libGame_gv_announcement_KillAnnouncementDuration_C, false);
}
}
void libGame_gf_HeroDeathHeroDiedAnnouncementToAlliedPlayerGroup (int lp_deadPlayer, unit lp_deadHero, playergroup lp_alliedPlayerGroup) {
// Variable Declarations
unit lv_itUnit;
int lv_itPlayer;
int lv_teamOfDeadPlayer;
bool[libCore_gv_bALMaxPlayers + 1] lv_playerIsNearDeadPlayer;
unitgroup lv_nearbyUnits;
int lv_heroPlayer;
string lv_deathStingerSound;
// Automatic Variable Declarations
unitgroup auto6AD73EDD_g;
int auto6AD73EDD_u;
playergroup auto400955E7_g;
// Variable Initialization
lv_nearbyUnits = UnitGroupEmpty();
// Implementation
lv_teamOfDeadPlayer = libGame_gf_TeamNumberOfPlayer(lp_deadPlayer);
lv_nearbyUnits = UnitGroupSearch(null, lp_deadPlayer, UnitGetPosition(lp_deadHero), libCore_gv_bALHeroKillXPRadius, UnitFilter(0, 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto6AD73EDD_g = lv_nearbyUnits;
auto6AD73EDD_u = UnitGroupCount(auto6AD73EDD_g, c_unitCountAll);
for (;; auto6AD73EDD_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(auto6AD73EDD_g, auto6AD73EDD_u);
if (lv_itUnit == null) { break; }
lv_heroPlayer = UnitGetOwner(lv_itUnit);
if (((lv_itUnit == lp_deadHero) || (lv_itUnit == libGame_gv_players[lv_heroPlayer].lv_activeVehicle) || (libGame_gf_UnitIsHero(lv_itUnit) == true))) {
lv_playerIsNearDeadPlayer[lv_heroPlayer] = true;
continue;
}
if ((UnitHasBehavior2(lv_itUnit, "EarnsXP") == true)) {
lv_heroPlayer = UnitBehaviorEffectPlayer(lv_itUnit, "EarnsXP", c_effectPlayerOrigin, 0);
if ((lv_heroPlayer <= libCore_gv_bALMaxPlayers)) {
lv_playerIsNearDeadPlayer[lv_heroPlayer] = true;
continue;
}
}
}
auto400955E7_g = lp_alliedPlayerGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto400955E7_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((lv_itPlayer > libCore_gv_bALMaxPlayers)) {
continue;
}
if ((lv_playerIsNearDeadPlayer[lv_itPlayer] == true)) {
if ((lv_teamOfDeadPlayer == libGame_gv_teamOrderIndex_C)) {
lv_deathStingerSound = ((libGame_gv_players[lp_deadPlayer].lv_soundDeathAlertPrefix + "Ally_L"));
}
else {
lv_deathStingerSound = ((libGame_gv_players[lp_deadPlayer].lv_soundDeathAlertPrefix + "Ally_R"));
}
}
else {
if ((lv_teamOfDeadPlayer == libGame_gv_teamOrderIndex_C)) {
lv_deathStingerSound = ((libGame_gv_players[lp_deadPlayer].lv_soundDeathAlertPrefix + "Ally_Offscreen_L"));
}
else {
lv_deathStingerSound = ((libGame_gv_players[lp_deadPlayer].lv_soundDeathAlertPrefix + "Ally_Offscreen_R"));
}
}
libGame_gf_HeroDeathAddStingerSoundToQueueForPlayer(lv_deathStingerSound, libGame_ge_HeroDeathKillStingerQueueType_Ally, lv_itPlayer);
}
}
void libGame_gf_HeroDeathYouHaveDiedAnnouncementToDeadPlayer (int lp_deadPlayer) {
// Automatic Variable Declarations
// Implementation
if ((libGame_gv_heroDeath_RunDeathUIUpdates == false)) {
return ;
}
if ((libGame_gv_players[lp_deadPlayer].lv_killingSpreeCount >= libCore_gv_killingSpree_KillThresholdBase_C)) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[lp_deadPlayer], libGame_ge_AnnouncementPriorities_Critical, libCore_ge_AnnouncerVOEvents_KillingSpreeEndYou, "ShowEnemyNotification", StringExternal("Param/Value/lib_Game_DC86A45D"), libGame_gv_heroDeathAnnouncementSecondaryText[lp_deadPlayer], null, null, null, libGame_gv_announcement_KillAnnouncementDuration_C, false);
}
else {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[lp_deadPlayer], libGame_ge_AnnouncementPriorities_Critical, libCore_ge_AnnouncerVOEvents_YouHaveBeenKilled, "ShowEnemyNotification", StringExternal("Param/Value/lib_Game_A4657A6A"), libGame_gv_heroDeathAnnouncementSecondaryText[lp_deadPlayer], null, null, null, libGame_gv_announcement_KillAnnouncementDuration_C, false);
}
libGame_gf_HeroDeathAddStingerSoundToQueueForPlayer("Gen_Hero_Death_Self", libGame_ge_HeroDeathKillStingerQueueType_Ally, lp_deadPlayer);
}
void libGame_gf_HeroDeathHeroHasDiedAnnouncementToDeadPlayer (int lp_deadPlayer, unit lp_deadHero) {
// Variable Declarations
text lv_heroDiedText;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if ((libGame_gv_heroDeath_RunDeathUIUpdates == false)) {
return ;
}
if ((libGame_gv_players[lp_deadPlayer].lv_killingSpreeCount >= libCore_gv_killingSpree_KillThresholdBase_C)) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[lp_deadPlayer], libGame_ge_AnnouncementPriorities_Critical, libCore_ge_AnnouncerVOEvents_KillingSpreeEndYou, "ShowEnemyNotification", StringExternal("Param/Value/lib_Game_DD74EA80"), null, null, null, null, libGame_gv_announcement_KillAnnouncementDuration_C, false);
}
else {
TextExpressionSetToken("Param/Expression/lib_Game_4F04F9C4", "A", UnitTypeGetName(UnitGetType(lp_deadHero)));
lv_heroDiedText = TextExpressionAssemble("Param/Expression/lib_Game_4F04F9C4");
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[lp_deadPlayer], libGame_ge_AnnouncementPriorities_Critical, libCore_ge_AnnouncerVOEvents_YouHaveBeenKilled, "ShowEnemyNotification", lv_heroDiedText, null, null, null, null, libGame_gv_announcement_KillAnnouncementDuration_C, false);
}
libGame_gf_HeroDeathAddStingerSoundToQueueForPlayer("Gen_Hero_Death_Self", libGame_ge_HeroDeathKillStingerQueueType_Ally, lp_deadPlayer);
}
void libGame_gf_HeroDeathCheckForKillingSpree (int lp_killingPlayer) {
// Variable Declarations
int lv_killingSpreeCount;
playergroup lv_announcementGroup;
// Automatic Variable Declarations
// Variable Initialization
lv_announcementGroup = PlayerGroupEmpty();
// Implementation
lv_killingSpreeCount = libGame_gv_players[lp_killingPlayer].lv_killingSpreeCount;
lv_announcementGroup = PlayerGroupCopy(libCore_gv_playerGroupFromPlayer[lp_killingPlayer]);
if ((lv_killingSpreeCount == libCore_gv_killingSpree_KillThresholdBase_C)) {
libGame_gv_heroDeathKillStreakRegistered[lp_killingPlayer][1] = true;
return ;
}
if ((lv_killingSpreeCount == libCore_gv_killingSpree_KillThresholdUpgrade1_C)) {
libGame_gv_heroDeathKillStreakRegistered[lp_killingPlayer][2] = true;
return ;
}
if ((lv_killingSpreeCount == libCore_gv_killingSpree_KillThresholdUpgrade2_C)) {
libGame_gv_heroDeathKillStreakRegistered[lp_killingPlayer][3] = true;
return ;
}
if ((lv_killingSpreeCount == libCore_gv_killingSpree_KillThresholdUpgrade3_C)) {
libGame_gv_heroDeathKillStreakRegistered[lp_killingPlayer][4] = true;
return ;
}
}
void libGame_gf_HeroDeathDispatchKillingSpreeAnnouncement (int lp_player) {
// Variable Declarations
int lv_itThreshold;
int lv_registeredThreshold;
// Automatic Variable Declarations
const int auto6D92A7AF_ae = libCore_gv_killingSpree_KillThresholdCount_C;
const int auto6D92A7AF_ai = 1;
int autoBF1FB7C4_val;
// Variable Initialization
// Implementation
lv_itThreshold = 1;
for ( ; ( (auto6D92A7AF_ai >= 0 && lv_itThreshold <= auto6D92A7AF_ae) || (auto6D92A7AF_ai < 0 && lv_itThreshold >= auto6D92A7AF_ae) ) ; lv_itThreshold += auto6D92A7AF_ai ) {
if ((libGame_gv_heroDeathKillStreakRegistered[lp_player][lv_itThreshold] == true)) {
libGame_gv_heroDeathKillStreakRegistered[lp_player][lv_itThreshold] = false;
lv_registeredThreshold = lv_itThreshold;
break;
}
}
autoBF1FB7C4_val = lv_registeredThreshold;
if (autoBF1FB7C4_val == 1) {
TextExpressionSetToken("Param/Expression/lib_Game_8825A2A0", "A", IntToText(libCore_gv_killingSpree_KillThresholdBase_C));
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[lp_player], libGame_ge_AnnouncementPriorities_Critical, libCore_ge_AnnouncerVOEvents_KillingSpreeStart, "ShowStandardNotification", StringExternal("Param/Value/lib_Game_3A39FC5B"), TextExpressionAssemble("Param/Expression/lib_Game_8825A2A0"), StringToText(""), null, null, libGame_gv_announcement_LongAnnouncementDuration_C, false);
}
else if (autoBF1FB7C4_val == 2) {
TextExpressionSetToken("Param/Expression/lib_Game_6CE64AC3", "A", IntToText(libCore_gv_killingSpree_KillThresholdUpgrade1_C));
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[lp_player], libGame_ge_AnnouncementPriorities_Critical, libCore_ge_AnnouncerVOEvents_KillingSpreeUpgrade1Mayhem, "ShowStandardNotification", StringExternal("Param/Value/lib_Game_2D25E4DC"), TextExpressionAssemble("Param/Expression/lib_Game_6CE64AC3"), StringToText(""), null, null, libGame_gv_announcement_LongAnnouncementDuration_C, false);
}
else if (autoBF1FB7C4_val == 3) {
TextExpressionSetToken("Param/Expression/lib_Game_CC140864", "A", IntToText(libCore_gv_killingSpree_KillThresholdUpgrade2_C));
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[lp_player], libGame_ge_AnnouncementPriorities_Critical, libCore_ge_AnnouncerVOEvents_KillingSpreeUpgrade2Untouchable, "ShowStandardNotification", StringExternal("Param/Value/lib_Game_769C1CA0"), TextExpressionAssemble("Param/Expression/lib_Game_CC140864"), StringToText(""), null, null, libGame_gv_announcement_LongAnnouncementDuration_C, false);
}
else if (autoBF1FB7C4_val == 4) {
TextExpressionSetToken("Param/Expression/lib_Game_162AE324", "A", IntToText(libCore_gv_killingSpree_KillThresholdUpgrade3_C));
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[lp_player], libGame_ge_AnnouncementPriorities_Critical, libCore_ge_AnnouncerVOEvents_KillingSpreeUpgrade3HeroOfTheStorm, "ShowStandardNotification", StringExternal("Param/Value/lib_Game_3D367900"), TextExpressionAssemble("Param/Expression/lib_Game_162AE324"), StringToText(""), null, null, libGame_gv_announcement_LongAnnouncementDuration_C, false);
}
else {
}
}
void libGame_gf_HeroDeathStartMultikillTimerForPlayer (int lp_player) {
// Automatic Variable Declarations
// Implementation
TimerStart(libGame_gv_players[lp_player].lv_multikillTimer, libGame_gv_heroDeathMultikillTimeoutDuration, false, c_timeGame);
TriggerEnable(libGame_gt_HeroDeathUpdateMultikillTimerUI, true);
}
void libGame_gf_HeroDeathAddStingerSoundToQueueForPlayer (string lp_sound, int lp_queueType, int lp_player) {
// Variable Declarations
int lv_queueTypeInt;
int lv_currentQueueCount;
int lv_nextPlayIndex;
int lv_insertIndex;
soundlink lv_soundLink;
// Automatic Variable Declarations
// Variable Initialization
lv_soundLink = SoundLink(lp_sound, c_soundIndexAny);
// Implementation
lv_queueTypeInt = (lp_queueType);
lv_currentQueueCount = libGame_gv_heroDeathKillStingerQueue[lp_player].lv_numberOfItemsInQueue[lv_queueTypeInt];
lv_nextPlayIndex = libGame_gv_heroDeathKillStingerQueue[lp_player].lv_nextPlayIndex[lv_queueTypeInt];
if ((lv_currentQueueCount >= libCore_gv_bALMaxPlayersOnATeam)) {
return ;
}
lv_insertIndex = (lv_nextPlayIndex + lv_currentQueueCount);
if ((lv_insertIndex > libCore_gv_bALMaxPlayersOnATeam)) {
lv_insertIndex -= libCore_gv_bALMaxPlayersOnATeam;
}
libGame_gv_heroDeathKillStingerQueue[lp_player].lv_soundQueue[lv_queueTypeInt][lv_insertIndex] = lv_soundLink;
libGame_gv_heroDeathKillStingerQueue[lp_player].lv_numberOfItemsInQueue[lv_queueTypeInt] += 1;
if ((TimerGetRemaining(libGame_gv_heroDeathKillStingerQueue[lp_player].lv_killStingerTimer[lv_queueTypeInt]) <= 0.0)) {
libGame_gf_HeroDeathPlayNextSoundInQueueForPlayer(lp_queueType, lp_player);
}
}
void libGame_gf_HeroDeathPlayNextSoundInQueueForPlayer (int lp_queueType, int lp_player) {
// Variable Declarations
int lv_queueTypeInt;
int lv_nextPlayIndex;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_queueTypeInt = (lp_queueType);
if ((libGame_gv_heroDeathKillStingerQueue[lp_player].lv_numberOfItemsInQueue[lv_queueTypeInt] <= 0)) {
return ;
}
lv_nextPlayIndex = libGame_gv_heroDeathKillStingerQueue[lp_player].lv_nextPlayIndex[lv_queueTypeInt];
SoundPlayForPlayer(libGame_gv_heroDeathKillStingerQueue[lp_player].lv_soundQueue[lv_queueTypeInt][lv_nextPlayIndex], lp_player, libCore_gv_playerGroupFromPlayer[lp_player], 100.0, 0.0);
libGame_gv_heroDeathKillStingerQueue[lp_player].lv_numberOfItemsInQueue[lv_queueTypeInt] -= 1;
lv_nextPlayIndex += 1;
if ((lv_nextPlayIndex > libCore_gv_bALMaxPlayersOnATeam)) {
lv_nextPlayIndex = 1;
}
libGame_gv_heroDeathKillStingerQueue[lp_player].lv_nextPlayIndex[lv_queueTypeInt] = lv_nextPlayIndex;
TimerStart(libGame_gv_heroDeathKillStingerQueue[lp_player].lv_killStingerTimer[lv_queueTypeInt], libGame_gv_heroDeathKillStingerQueueTimerDuration, false, c_timeGame);
}
bool libGame_gf_HeroSelectionIsHeroSelectedForAnyPlayer (int lp_heroIndex) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
const int auto7065EDD6_ae = libCore_gv_bALMaxPlayers;
const int auto7065EDD6_ai = 1;
// Variable Initialization
// Implementation
lv_itPlayer = 1;
for ( ; ( (auto7065EDD6_ai >= 0 && lv_itPlayer <= auto7065EDD6_ae) || (auto7065EDD6_ai < 0 && lv_itPlayer >= auto7065EDD6_ae) ) ; lv_itPlayer += auto7065EDD6_ai ) {
if ((libGame_gv_players[lv_itPlayer].lv_heroIndex == lp_heroIndex)) {
return true;
}
}
return false;
}
bool libGame_gf_HeroSelectionIsHeroSelectedForPlayersTeam (int lp_heroIndex, int lp_player) {
// Variable Declarations
int lv_i;
// Automatic Variable Declarations
playergroup auto7E1B80E2_g;
// Variable Initialization
// Implementation
auto7E1B80E2_g = libGame_gf_AlliedPlayerGroupOfPlayer(lp_player);
lv_i = -1;
while (true) {
lv_i = PlayerGroupNextPlayer(auto7E1B80E2_g, lv_i);
if (lv_i<0) { break; }
if ((lv_i != libCore_gv_cOMPUTER_TeamOrder) && (lv_i != libCore_gv_cOMPUTER_TeamChaos) && (libGame_gv_players[lv_i].lv_heroIndex == lp_heroIndex)) {
return true;
}
}
return false;
}
bool libGame_gf_HeroSelectionIsSkinAlreadyInUsebyAnyPlayer (int lp_skinIndex) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
playergroup autoF2B31097_g;
// Variable Initialization
// Implementation
autoF2B31097_g = PlayerGroupActive();
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoF2B31097_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((libGame_gv_players[lv_itPlayer].lv_selectedSkin != 0) && (libGame_gv_players[lv_itPlayer].lv_selectedSkin == lp_skinIndex)) {
return true;
}
}
return false;
}
int libGame_gf_HeroSelectionRandomlyPickAnyUnusedHero (int lp_choosingPlayer, bool lp_allowAnyTier, bool lp_ignoreCheck) {
// Variable Declarations
string lv_heroName;
int lv_itHeroIndex;
int lv_numGoodCandidates;
// Automatic Variable Declarations
int autoDC75D56D_ae;
const int autoDC75D56D_ai = 1;
// Variable Initialization
lv_heroName = "";
// Implementation
autoDC75D56D_ae = libCore_gv_dataHeroesNumberOfHeroes;
lv_itHeroIndex = 1;
for ( ; ( (autoDC75D56D_ai >= 0 && lv_itHeroIndex <= autoDC75D56D_ae) || (autoDC75D56D_ai < 0 && lv_itHeroIndex >= autoDC75D56D_ae) ) ; lv_itHeroIndex += autoDC75D56D_ai ) {
lv_heroName = DataTableGetString(true, ("HeroIndex_" + IntToString(lv_itHeroIndex)));
if ((GameIsHeroDisabled((lv_heroName)) == true)) {
continue;
}
if ((libGame_gf_HeroSelectionIsHeroSelectedForAnyPlayer(lv_itHeroIndex) == true)) {
continue;
}
if ((lp_ignoreCheck == false) && (libCore_gf_MetagameDoesPlayerHaveAccessToHero(lp_choosingPlayer, lv_itHeroIndex) == false)) {
continue;
}
if ((lp_allowAnyTier == false) && (PlayerType(lp_choosingPlayer) == c_playerTypeComputer) && (libAIAI_gf_HeroAIAIDifficultyLevelShouldUseHero(lp_choosingPlayer, lv_itHeroIndex) == false)) {
continue;
}
lv_numGoodCandidates += 1;
DataTableSetInt(false, ("RAND_PickHero_" + IntToString(lv_numGoodCandidates)), lv_itHeroIndex);
}
if ((lv_numGoodCandidates == 0)) {
return 0;
}
return DataTableGetInt(false, ("RAND_PickHero_" + IntToString(RandomInt(1, lv_numGoodCandidates))));
}
int libGame_gf_HeroSelectionRandomlyPickMetaUnusedHero (int lp_choosingPlayer) {
// Variable Declarations
int lv_player;
int lv_playerRole;
int[7] lv_teamRoles;
bool lv_allowTank;
bool lv_allowBruiser;
bool lv_allowRangedAssassin;
bool lv_allowMeleeAssassin;
bool lv_allowHealer;
bool lv_allowSupport;
// Automatic Variable Declarations
const int autoA12230EB_ae = libCore_gv_bALMaxPlayers;
const int autoA12230EB_ai = 1;
// Variable Initialization
lv_playerRole = c_expandedRoleTank;
// Implementation
lv_player = 1;
for ( ; ( (autoA12230EB_ai >= 0 && lv_player <= autoA12230EB_ae) || (autoA12230EB_ai < 0 && lv_player >= autoA12230EB_ae) ) ; lv_player += autoA12230EB_ai ) {
if ((PlayerStatus(lv_player) != c_playerStatusUnused) && (libGame_gv_players[lv_player].lv_faction == libGame_gv_players[lp_choosingPlayer].lv_faction) && (libGame_gv_players[lv_player].lv_heroIndex != 0)) {
lv_playerRole = libGame_gv_players[lv_player].lv_heroData.lv_expandedRole;
lv_teamRoles[lv_playerRole] += 1;
}
}
if ((lv_teamRoles[(c_expandedRoleHealer)] == 0)) {
lv_allowHealer = true;
return libGame_gf_HeroSelectionRandomlyPickUnusedHeroWithRole(lp_choosingPlayer, lv_allowTank, lv_allowBruiser, lv_allowRangedAssassin, lv_allowMeleeAssassin, lv_allowHealer, lv_allowSupport);
}
if ((lv_teamRoles[(c_expandedRoleTank)] == 0)) {
lv_allowTank = true;
return libGame_gf_HeroSelectionRandomlyPickUnusedHeroWithRole(lp_choosingPlayer, lv_allowTank, lv_allowBruiser, lv_allowRangedAssassin, lv_allowMeleeAssassin, lv_allowHealer, lv_allowSupport);
}
if ((lv_teamRoles[(c_expandedRoleRangedAssassin)] == 0)) {
lv_allowRangedAssassin = true;
return libGame_gf_HeroSelectionRandomlyPickUnusedHeroWithRole(lp_choosingPlayer, lv_allowTank, lv_allowBruiser, lv_allowRangedAssassin, lv_allowMeleeAssassin, lv_allowHealer, lv_allowSupport);
}
lv_allowMeleeAssassin = true;
lv_allowBruiser = true;
lv_allowSupport = true;
return libGame_gf_HeroSelectionRandomlyPickUnusedHeroWithRole(lp_choosingPlayer, lv_allowTank, lv_allowBruiser, lv_allowRangedAssassin, lv_allowMeleeAssassin, lv_allowHealer, lv_allowSupport);
}
int libGame_gf_HeroSelectionRandomlyPickUnusedHeroWithRole (int lp_choosingPlayer, bool lp_allowTank, bool lp_allowBruiser, bool lp_allowRangedAssassin, bool lp_allowMeleeAssassin, bool lp_allowHealer, bool lp_allowSupport) {
// Variable Declarations
string lv_heroName;
int lv_itHeroIndex;
int lv_numGoodCandidates;
int lv_heroRoleInt;
int lv_heroRole;
// Automatic Variable Declarations
int auto8AB41EE4_ae;
const int auto8AB41EE4_ai = 1;
// Variable Initialization
lv_heroName = "";
lv_heroRole = c_expandedRoleTank;
// Implementation
auto8AB41EE4_ae = libCore_gv_dataHeroesNumberOfHeroes;
lv_itHeroIndex = 1;
for ( ; ( (auto8AB41EE4_ai >= 0 && lv_itHeroIndex <= auto8AB41EE4_ae) || (auto8AB41EE4_ai < 0 && lv_itHeroIndex >= auto8AB41EE4_ae) ) ; lv_itHeroIndex += auto8AB41EE4_ai ) {
lv_heroName = DataTableGetString(true, ("HeroIndex_" + IntToString(lv_itHeroIndex)));
lv_heroRoleInt = CatalogFieldValueGetAsInt(c_gameCatalogHero, lv_heroName, "ExpandedRole", c_playerAny);
lv_heroRole = lv_heroRoleInt;
if ((GameIsHeroDisabled((lv_heroName)) == true)) {
continue;
}
if ((lv_heroRole == c_expandedRoleTank) && (lp_allowTank == false)) {
continue;
}
if ((lv_heroRole == c_expandedRoleBruiser) && (lp_allowBruiser == false)) {
continue;
}
if ((lv_heroRole == c_expandedRoleRangedAssassin) && (lp_allowRangedAssassin == false)) {
continue;
}
if ((lv_heroRole == c_expandedRoleMeleeAssassin) && (lp_allowMeleeAssassin == false)) {
continue;
}
if ((lv_heroRole == c_expandedRoleHealer) && (lp_allowHealer == false)) {
continue;
}
if ((lv_heroRole == c_expandedRoleSupport) && (lp_allowSupport == false)) {
continue;
}
if ((libGame_gf_HeroSelectionIsHeroSelectedForAnyPlayer(lv_itHeroIndex) == true)) {
continue;
}
if ((libCore_gf_MetagameDoesPlayerHaveAccessToHero(lp_choosingPlayer, lv_itHeroIndex) == false)) {
continue;
}
if ((PlayerType(lp_choosingPlayer) == c_playerTypeComputer) && (libAIAI_gf_HeroAIAIDifficultyLevelShouldUseHero(lp_choosingPlayer, lv_itHeroIndex) == false)) {
continue;
}
lv_numGoodCandidates += 1;
DataTableSetInt(false, ("RAND_PickHero_" + IntToString(lv_numGoodCandidates)), lv_itHeroIndex);
}
if ((lv_numGoodCandidates == 0)) {
return 0;
}
return DataTableGetInt(false, ("RAND_PickHero_" + IntToString(RandomInt(1, lv_numGoodCandidates))));
}
void libGame_gf_HeroSelectionSetBNetHeroAndSkinSelectionsForAllPlayers () {
// Variable Declarations
int lv_itPlayer;
string lv_heroLink;
int lv_heroIndex;
string lv_skinLink;
int lv_skinIndex;
// Automatic Variable Declarations
const int autoB9931724_ae = libCore_gv_bALMaxPlayers;
const int autoB9931724_ai = 1;
// Variable Initialization
// Implementation
lv_itPlayer = 1;
for ( ; ( (autoB9931724_ai >= 0 && lv_itPlayer <= autoB9931724_ae) || (autoB9931724_ai < 0 && lv_itPlayer >= autoB9931724_ae) ) ; lv_itPlayer += autoB9931724_ai ) {
lv_heroLink = PlayerHero(lv_itPlayer);
if (((lv_heroLink == null) || (lv_heroLink == libCore_gv_heroes_RandomHeroID))) {
continue;
}
lv_heroIndex = libCore_gf_GetIndexFromHero(lv_heroLink);
if ((GameAreHeroDuplicatesAllowed() == false) && (libGame_gf_HeroSelectionIsHeroSelectedForAnyPlayer(lv_heroIndex) == true)) {
continue;
}
if (((libGame_gf_HeroSelectionIsHeroSelectedForPlayersTeam(lv_heroIndex, lv_itPlayer) == false) || ((libCore_gv_dEBUGDebuggingEnabled == true) && (libCore_gv_dEBUGGameIsOnline == false)))) {
libGame_gv_players[lv_itPlayer].lv_heroIndex = lv_heroIndex;
libCore_gf_DataLoadHeroDataIntoIndex(libCore_gf_GetHeroFromIndex(libGame_gv_players[lv_itPlayer].lv_heroIndex), lv_itPlayer);
if (((libCore_gv_sYSGameMode != libCore_ge_GameModes_TryMe) && ((libGame_gv_players[lv_itPlayer].lv_heroIndex == libCore_gf_GetIndexFromHero("Gall")) || (libGame_gv_players[lv_itPlayer].lv_heroIndex == libCore_gf_GetIndexFromHero("Cho"))))) {
libGame_gf_ChoGallSkinSelection(lv_itPlayer);
continue;
}
lv_skinLink = PlayerSkin(lv_itPlayer);
if ((lv_skinLink == libCore_gv_heroes_RandomSkinID)) {
libGame_gf_HeroSelectionRandomlyPickSkin(lv_itPlayer);
continue;
}
if ((lv_skinLink != null)) {
lv_skinIndex = libCore_gf_DataSkinsGetSkinIndexFromSkinLink(lv_skinLink);
if ((libCore_gf_DataSkinsIsSkinValidForHero(lv_itPlayer, lv_skinIndex) == true)) {
libGame_gv_players[lv_itPlayer].lv_selectedSkin = lv_skinIndex;
libCore_gf_DataLoadSkinDataIntoIndex(lv_skinLink, lv_itPlayer);
}
}
}
}
}
void libGame_gf_HeroSelectionSetBNetMountSelectionsForAllPlayers () {
// Variable Declarations
int lv_itPlayer;
int lv_heroIndex;
string lv_mountLink;
bool lv_defaultFallback;
int lv_skinIndex;
int lv_mountIndex;
int lv_mountConfigIndex;
// Automatic Variable Declarations
const int auto56229722_ae = libCore_gv_bALMaxPlayers;
const int auto56229722_ai = 1;
// Variable Initialization
// Implementation
lv_itPlayer = 1;
for ( ; ( (auto56229722_ai >= 0 && lv_itPlayer <= auto56229722_ae) || (auto56229722_ai < 0 && lv_itPlayer >= auto56229722_ae) ) ; lv_itPlayer += auto56229722_ai ) {
lv_defaultFallback = false;
lv_heroIndex = lv_itPlayer;
lv_mountLink = PlayerMount(lv_itPlayer);
if (((libGame_gv_players[lv_itPlayer].lv_heroIndex == libCore_gf_GetIndexFromHero("Gall")) || (libGame_gv_players[lv_itPlayer].lv_heroIndex == libCore_gf_GetIndexFromHero("Cho")))) {
continue;
}
if ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_usesMounts == false)) {
continue;
}
if ((lv_mountLink == libCore_gv_heroes_RandomMountID)) {
libGame_gf_HeroSelectionRandomlyPickMount(lv_itPlayer);
continue;
}
if ((lv_mountLink != null)) {
lv_skinIndex = libGame_gv_players[lv_itPlayer].lv_selectedSkin;
lv_mountIndex = libCore_gf_DataMountGetMountIndexFromMountLink(lv_mountLink);
if ((libCore_gf_DataMountMountIsValidForHeroSkin(libGame_gv_players[lv_itPlayer].lv_heroIndex, lv_skinIndex, lv_mountIndex) == true)) {
libGame_gv_players[lv_itPlayer].lv_selectedMount = lv_mountIndex;
}
else {
lv_defaultFallback = true;
}
}
else {
lv_defaultFallback = true;
}
if ((lv_defaultFallback == true)) {
lv_mountLink = libGame_gv_players[lv_heroIndex].lv_heroData.lv_defaultMount;
lv_mountIndex = libCore_gf_DataMountGetMountIndexFromMountLink(lv_mountLink);
libGame_gv_players[lv_itPlayer].lv_selectedMount = lv_mountIndex;
}
lv_mountConfigIndex = libCore_gf_DataMountGetMountConfigIndexFromMountLink(lv_mountLink);
libCore_gf_DataMountsLoadMountDataIntoIndex(lv_mountLink, libCore_gf_DataMountGetMountModelScaleAtConfigIndex(lv_mountConfigIndex), libCore_gf_DataMountGetMountWalkAnimSpeedAtConfigIndex(lv_mountConfigIndex), libCore_gf_DataMountGetMountPoseAnimGroupAtConfigIndex(lv_mountConfigIndex), lv_itPlayer);
PlayerSetMount(lv_itPlayer, libGame_gv_players[lv_itPlayer].lv_mountData.lv_mountID);
}
}
void libGame_gf_HeroSelectionSetBNetLootContentSelectionsForAllPlayers () {
// Variable Declarations
int lv_itPlayer;
string lv_sprayLink;
string lv_bannerLink;
string lv_announcerPackLink;
string lv_voiceLineLink;
// Automatic Variable Declarations
const int auto1B5F60C8_ae = libCore_gv_bALMaxPlayers;
const int auto1B5F60C8_ai = 1;
// Variable Initialization
// Implementation
lv_itPlayer = 1;
for ( ; ( (auto1B5F60C8_ai >= 0 && lv_itPlayer <= auto1B5F60C8_ae) || (auto1B5F60C8_ai < 0 && lv_itPlayer >= auto1B5F60C8_ae) ) ; lv_itPlayer += auto1B5F60C8_ai ) {
if ((PlayerStatus(lv_itPlayer) == c_playerStatusUnused)) {
continue;
}
lv_sprayLink = PlayerSpray(lv_itPlayer);
if ((lv_sprayLink == "RandomSpray")) {
libGame_gf_HeroSelectionRandomlyPickSpray(lv_itPlayer);
}
else {
libCore_gf_DataLootContentLoadSprayDataIntoIndex(lv_sprayLink, lv_itPlayer);
PlayerSetSpray(lv_itPlayer, lv_sprayLink);
}
lv_bannerLink = PlayerBanner(lv_itPlayer);
if ((lv_bannerLink != null)) {
if ((lv_bannerLink == "RandomBanner")) {
libGame_gf_HeroSelectionRandomlyPickBanner(lv_itPlayer);
}
else {
libCore_gf_DataLootContentLoadBannerDataIntoIndex(lv_bannerLink, lv_itPlayer);
PlayerSetBanner(lv_itPlayer, lv_bannerLink);
}
}
else {
lv_bannerLink = libCore_gv_loot_BannerDefault;
libCore_gf_DataLootContentLoadBannerDataIntoIndex(lv_bannerLink, lv_itPlayer);
PlayerSetBanner(lv_itPlayer, lv_bannerLink);
}
lv_announcerPackLink = PlayerAnnouncerPack(lv_itPlayer);
if ((lv_announcerPackLink != null)) {
if ((lv_announcerPackLink == "RandomAnnouncerPack")) {
libGame_gf_HeroSelectionRandomlyPickAnnouncerPack(lv_itPlayer);
}
else {
libCore_gf_DataLootContentLoadAnnouncerPackDataIntoIndex(lv_announcerPackLink, lv_itPlayer, true);
PlayerSetAnnouncerPack(lv_itPlayer, lv_announcerPackLink);
}
}
lv_voiceLineLink = PlayerVoiceLine(lv_itPlayer);
if ((lv_voiceLineLink == "RandomVoiceLine")) {
libGame_gf_HeroSelectionRandomlyPickVoiceLine(lv_itPlayer);
}
else {
libCore_gf_DataLootContentLoadVoiceLineDataIntoIndex(lv_voiceLineLink, lv_itPlayer);
PlayerSetVoiceLine(lv_itPlayer, lv_voiceLineLink);
}
}
}
void libGame_gf_HeroSelectionComputersRandomlyPickSkinsMounts () {
// Variable Declarations
int lv_itPlayer;
bool lv_hasPickedRandomAISkinOrder;
bool lv_hasPickedRandomAIMountOrder;
bool lv_hasPickedRandomAISkinChaos;
bool lv_hasPickedRandomAIMountChaos;
// Automatic Variable Declarations
const int autoD4F61831_ae = libCore_gv_bALMaxPlayers;
const int autoD4F61831_ai = 1;
// Variable Initialization
// Implementation
if ((libCore_gv_sYSGameMode == libCore_ge_GameModes_Tutorial1)) {
return ;
}
lv_itPlayer = 1;
for ( ; ( (autoD4F61831_ai >= 0 && lv_itPlayer <= autoD4F61831_ae) || (autoD4F61831_ai < 0 && lv_itPlayer >= autoD4F61831_ae) ) ; lv_itPlayer += autoD4F61831_ai ) {
if ((PlayerType(lv_itPlayer) == c_playerTypeComputer) && ((libAIAI_gv_aIHeroes[lv_itPlayer].lv_difficulty == libAIAI_ge_HeroAIDifficulty_HeroAIMedium) || (libAIAI_gv_aIHeroes[lv_itPlayer].lv_difficulty == libAIAI_ge_HeroAIDifficulty_HeroAIVeryHard) || (libAIAI_gv_aIHeroes[lv_itPlayer].lv_difficulty == libAIAI_ge_HeroAIDifficulty_HeroAIElite))) {
if ((libGame_gv_players[lv_itPlayer].lv_faction == libGame_ge_Faction_Order)) {
if ((lv_hasPickedRandomAISkinOrder == false)) {
libGame_gf_HeroSelectionRandomlyPickSkin(lv_itPlayer);
if ((libAIAI_gv_aIHeroes[lv_itPlayer].lv_difficulty == libAIAI_ge_HeroAIDifficulty_HeroAIMedium)) {
lv_hasPickedRandomAISkinOrder = true;
}
}
else {
if ((lv_hasPickedRandomAIMountOrder == false)) {
libGame_gf_HeroSelectionRandomlyPickMount(lv_itPlayer);
if ((libAIAI_gv_aIHeroes[lv_itPlayer].lv_difficulty == libAIAI_ge_HeroAIDifficulty_HeroAIMedium)) {
lv_hasPickedRandomAIMountOrder = true;
}
}
}
}
else {
if ((lv_hasPickedRandomAISkinChaos == false)) {
libGame_gf_HeroSelectionRandomlyPickSkin(lv_itPlayer);
if ((libAIAI_gv_aIHeroes[lv_itPlayer].lv_difficulty == libAIAI_ge_HeroAIDifficulty_HeroAIMedium)) {
lv_hasPickedRandomAISkinChaos = true;
}
}
else {
if ((lv_hasPickedRandomAIMountChaos == false)) {
libGame_gf_HeroSelectionRandomlyPickMount(lv_itPlayer);
if ((libAIAI_gv_aIHeroes[lv_itPlayer].lv_difficulty == libAIAI_ge_HeroAIDifficulty_HeroAIMedium)) {
lv_hasPickedRandomAIMountChaos = true;
}
}
}
}
}
}
}
void libGame_gf_HeroSelectionRandomlyPickSkin (int lp_choosingPlayer) {
// Variable Declarations
int lv_itSkin;
int lv_allowedSkinCount;
int lv_randomChoice;
string lv_skinLink;
int lv_index;
int lv_randomSkinAttempts;
// Automatic Variable Declarations
int auto2E01BCDC_ae;
const int auto2E01BCDC_ai = 1;
// Variable Initialization
// Implementation
lv_index = lp_choosingPlayer;
if ((libGame_gv_players[lv_index].lv_heroData.lv_skinCount <= 1)) {
lv_skinLink = libGame_gv_players[lv_index].lv_heroData.lv_skinArray[1];
}
else {
auto2E01BCDC_ae = libGame_gv_players[lv_index].lv_heroData.lv_skinCount;
lv_itSkin = 1;
for ( ; ( (auto2E01BCDC_ai >= 0 && lv_itSkin <= auto2E01BCDC_ae) || (auto2E01BCDC_ai < 0 && lv_itSkin >= auto2E01BCDC_ae) ) ; lv_itSkin += auto2E01BCDC_ai ) {
if (((PlayerType(lp_choosingPlayer) == c_playerTypeComputer) || (libCore_gf_MetagameDoesPlayerHaveAccessToSkin(lp_choosingPlayer, libCore_gf_DataSkinsGetSkinIndexFromSkinLink(libGame_gv_players[lv_index].lv_heroData.lv_skinArray[lv_itSkin])) == true))) {
lv_allowedSkinCount += 1;
DataTableSetInt(false, ("RAND_PickSkin_" + IntToString(lv_allowedSkinCount)), lv_itSkin);
}
}
if ((lv_allowedSkinCount <= 1)) {
lv_skinLink = libGame_gv_players[lv_index].lv_heroData.lv_skinArray[1];
}
else {
lv_randomChoice = RandomInt(2, lv_allowedSkinCount);
lv_skinLink = libGame_gv_players[lv_index].lv_heroData.lv_skinArray[DataTableGetInt(false, ("RAND_PickSkin_" + IntToString(lv_randomChoice)))];
while ((libGame_gf_HeroSelectionIsSkinAlreadyInUsebyAnyPlayer(libCore_gf_DataSkinsGetSkinIndexFromSkinLink(lv_skinLink)) == true)) {
lv_randomSkinAttempts += 1;
lv_randomChoice = RandomInt(2, lv_allowedSkinCount);
lv_skinLink = libGame_gv_players[lv_index].lv_heroData.lv_skinArray[DataTableGetInt(false, ("RAND_PickSkin_" + IntToString(lv_randomChoice)))];
if ((lv_randomSkinAttempts >= (lv_allowedSkinCount * 3))) {
break;
}
}
}
}
libGame_gv_players[lp_choosingPlayer].lv_selectedSkin = libCore_gf_DataSkinsGetSkinIndexFromSkinLink(lv_skinLink);
libCore_gf_DataLoadSkinDataIntoIndex(lv_skinLink, lv_index);
PlayerSetSkin(lp_choosingPlayer, libGame_gv_players[lv_index].lv_skinData.lv_skinID);
}
void libGame_gf_HeroSelectionRandomlyPickMount (int lp_choosingPlayer) {
// Variable Declarations
int lv_itMount;
int lv_itMountCategory;
int lv_allowedMountCount;
int lv_randomChoiceIndex;
int lv_index;
string lv_mountCategoryStr;
int lv_randomCategoryMountIndex;
string lv_randomCategoryMountStr;
string lv_chosenMountLink;
int lv_chosenMountIndex;
int lv_chosenMountConfigIndex;
// Automatic Variable Declarations
int auto1203A014_ae;
const int auto1203A014_ai = 1;
int auto7695663F_ae;
const int auto7695663F_ai = 1;
// Variable Initialization
lv_mountCategoryStr = "";
lv_randomCategoryMountStr = "";
// Implementation
lv_index = lp_choosingPlayer;
if (((libCore_gv_dataMountsMountCount < 2) || (libGame_gv_players[lv_index].lv_heroData.lv_usesMounts == false))) {
return ;
}
auto1203A014_ae = DataTableGetInt(true, ("HeroIndex_" + IntToString(libGame_gv_players[lp_choosingPlayer].lv_heroIndex) + "_MountCategoryCount"));
lv_itMountCategory = 1;
for ( ; ( (auto1203A014_ai >= 0 && lv_itMountCategory <= auto1203A014_ae) || (auto1203A014_ai < 0 && lv_itMountCategory >= auto1203A014_ae) ) ; lv_itMountCategory += auto1203A014_ai ) {
lv_mountCategoryStr = DataTableGetString(true, ("HeroIndex_" + IntToString(libGame_gv_players[lp_choosingPlayer].lv_heroIndex) + "_MountCategoryIndex_" + IntToString(lv_itMountCategory)));
auto7695663F_ae = DataTableGetInt(true, ("Mounts_MountCategory_" + lv_mountCategoryStr + "_MountCount"));
lv_itMount = 1;
for ( ; ( (auto7695663F_ai >= 0 && lv_itMount <= auto7695663F_ae) || (auto7695663F_ai < 0 && lv_itMount >= auto7695663F_ae) ) ; lv_itMount += auto7695663F_ai ) {
lv_chosenMountIndex = DataTableGetInt(true, ("Mounts_MountCategory_" + lv_mountCategoryStr + "_Index_" + IntToString(lv_itMount) + "_Index"));
if ((((PlayerType(lp_choosingPlayer) == c_playerTypeComputer) || (libCore_gf_MetagameDoesPlayerHaveAccessToMount(lp_choosingPlayer, lv_chosenMountIndex) == true)) && (libCore_gf_DataMountMountIsValidForHeroSkin(libGame_gv_players[lp_choosingPlayer].lv_heroIndex, libGame_gv_players[lp_choosingPlayer].lv_selectedSkin, lv_chosenMountIndex) == true))) {
lv_allowedMountCount += 1;
DataTableSetInt(false, ("RAND_PickMount_" + IntToString(lv_allowedMountCount)), lv_chosenMountIndex);
}
}
}
lv_chosenMountIndex = RandomInt(1, lv_allowedMountCount);
lv_chosenMountLink = libCore_gf_DataSkinsGetMountLinkFromMountIndex(DataTableGetInt(false, ("RAND_PickMount_" + IntToString(lv_chosenMountIndex))));
libGame_gv_players[lp_choosingPlayer].lv_selectedMount = lv_chosenMountIndex;
lv_chosenMountConfigIndex = libCore_gf_DataMountGetMountConfigIndexFromMountLink(lv_chosenMountLink);
libCore_gf_DataMountsLoadMountDataIntoIndex(lv_chosenMountLink, libCore_gf_DataMountGetMountModelScaleAtConfigIndex(lv_chosenMountConfigIndex), libCore_gf_DataMountGetMountWalkAnimSpeedAtConfigIndex(lv_chosenMountConfigIndex), libCore_gf_DataMountGetMountPoseAnimGroupAtConfigIndex(lv_chosenMountConfigIndex), lp_choosingPlayer);
PlayerSetMount(lp_choosingPlayer, libGame_gv_players[lp_choosingPlayer].lv_mountData.lv_mountID);
}
void libGame_gf_HeroSelectionRandomlyPickSpray (int lp_choosingPlayer) {
// Variable Declarations
int lv_itSpray;
int lv_allowedSprayCount;
int lv_randomChoice;
string lv_sprayLink;
// Automatic Variable Declarations
int auto7C2C3190_ae;
const int auto7C2C3190_ai = 1;
// Variable Initialization
// Implementation
auto7C2C3190_ae = libCore_gv_loot_SprayCount;
lv_itSpray = 1;
for ( ; ( (auto7C2C3190_ai >= 0 && lv_itSpray <= auto7C2C3190_ae) || (auto7C2C3190_ai < 0 && lv_itSpray >= auto7C2C3190_ae) ) ; lv_itSpray += auto7C2C3190_ai ) {
lv_allowedSprayCount += 1;
DataTableSetInt(false, ("RAND_PickSpray_" + IntToString(lv_allowedSprayCount)), lv_itSpray);
}
lv_randomChoice = RandomInt(1, lv_allowedSprayCount);
lv_sprayLink = (DataTableGetString(true, ("SprayIndex_" + IntToString(lv_randomChoice))));
libCore_gf_DataLootContentLoadSprayDataIntoIndex(lv_sprayLink, lp_choosingPlayer);
PlayerSetSpray(lp_choosingPlayer, lv_sprayLink);
}
void libGame_gf_HeroSelectionRandomlyPickBanner (int lp_choosingPlayer) {
// Variable Declarations
int lv_itBanner;
int lv_allowedBannerCount;
int lv_randomChoice;
string lv_bannerLink;
// Automatic Variable Declarations
int auto12416B39_ae;
const int auto12416B39_ai = 1;
// Variable Initialization
// Implementation
auto12416B39_ae = libCore_gv_loot_BannerCount;
lv_itBanner = 1;
for ( ; ( (auto12416B39_ai >= 0 && lv_itBanner <= auto12416B39_ae) || (auto12416B39_ai < 0 && lv_itBanner >= auto12416B39_ae) ) ; lv_itBanner += auto12416B39_ai ) {
lv_allowedBannerCount += 1;
DataTableSetInt(false, ("RAND_PickBanner_" + IntToString(lv_allowedBannerCount)), lv_itBanner);
}
lv_randomChoice = RandomInt(1, lv_allowedBannerCount);
lv_bannerLink = (DataTableGetString(true, ("BannerIndex_" + IntToString(lv_randomChoice))));
libCore_gf_DataLootContentLoadBannerDataIntoIndex(lv_bannerLink, lp_choosingPlayer);
PlayerSetBanner(lp_choosingPlayer, lv_bannerLink);
}
void libGame_gf_HeroSelectionRandomlyPickAnnouncerPack (int lp_choosingPlayer) {
// Variable Declarations
int lv_itAnnouncerPack;
int lv_allowedAnnouncerPackCount;
int lv_randomChoice;
string lv_announcerPack;
// Automatic Variable Declarations
int autoC0A3F018_ae;
const int autoC0A3F018_ai = 1;
// Variable Initialization
// Implementation
autoC0A3F018_ae = libCore_gv_loot_AnnouncerPackCount;
lv_itAnnouncerPack = 1;
for ( ; ( (autoC0A3F018_ai >= 0 && lv_itAnnouncerPack <= autoC0A3F018_ae) || (autoC0A3F018_ai < 0 && lv_itAnnouncerPack >= autoC0A3F018_ae) ) ; lv_itAnnouncerPack += autoC0A3F018_ai ) {
lv_allowedAnnouncerPackCount += 1;
DataTableSetInt(false, ("RAND_PickAnnouncerPack_" + IntToString(lv_allowedAnnouncerPackCount)), lv_itAnnouncerPack);
}
lv_randomChoice = RandomInt(1, lv_allowedAnnouncerPackCount);
lv_announcerPack = (DataTableGetString(true, ("AnnouncerPackIndex_" + IntToString(lv_randomChoice))));
libCore_gf_DataLootContentLoadAnnouncerPackDataIntoIndex(lv_announcerPack, lp_choosingPlayer, true);
PlayerSetAnnouncerPack(lp_choosingPlayer, lv_announcerPack);
}
void libGame_gf_HeroSelectionRandomlyPickVoiceLine (int lp_choosingPlayer) {
// Variable Declarations
int lv_itVoiceLine;
int lv_allowedVoiceLineCount;
int lv_randomChoice;
string lv_voiceLine;
int lv_heroIndex;
// Automatic Variable Declarations
int auto3D4CECF0_ae;
const int auto3D4CECF0_ai = 1;
// Variable Initialization
// Implementation
lv_heroIndex = libCore_gf_GetIndexFromHero(libGame_gv_players[lp_choosingPlayer].lv_heroData.lv_heroCatalogLink);
auto3D4CECF0_ae = DataTableGetInt(true, ("HeroIndex_" + IntToString(lv_heroIndex) + "_VoiceLineCount"));
lv_itVoiceLine = 1;
for ( ; ( (auto3D4CECF0_ai >= 0 && lv_itVoiceLine <= auto3D4CECF0_ae) || (auto3D4CECF0_ai < 0 && lv_itVoiceLine >= auto3D4CECF0_ae) ) ; lv_itVoiceLine += auto3D4CECF0_ai ) {
lv_allowedVoiceLineCount += 1;
DataTableSetInt(false, ("RAND_PickVoiceLine_" + IntToString(lv_allowedVoiceLineCount)), lv_itVoiceLine);
}
lv_randomChoice = RandomInt(1, lv_allowedVoiceLineCount);
lv_voiceLine = (DataTableGetString(true, ("HeroIndex_" + IntToString(lv_heroIndex) + "_VoiceLineIndex_" + IntToString(DataTableGetInt(false, ("RAND_PickVoiceLine_" + IntToString(lv_randomChoice)))))));
libCore_gf_DataLootContentLoadVoiceLineDataIntoIndex(lv_voiceLine, lp_choosingPlayer);
PlayerSetVoiceLine(lp_choosingPlayer, lv_voiceLine);
}
bool libGame_gf_HeroAbilityIsAffectedByCDR (int lp_player, string lp_abilityLink) {
// Variable Declarations
int lv_itAbility;
// Automatic Variable Declarations
int auto2E98BEEF_ae;
const int auto2E98BEEF_ai = 1;
// Variable Initialization
// Implementation
auto2E98BEEF_ae = libGame_gv_players[lp_player].lv_heroData.lv_numberOfAbilities;
lv_itAbility = 1;
for ( ; ( (auto2E98BEEF_ai >= 0 && lv_itAbility <= auto2E98BEEF_ae) || (auto2E98BEEF_ai < 0 && lv_itAbility >= auto2E98BEEF_ae) ) ; lv_itAbility += auto2E98BEEF_ai ) {
if ((libGame_gv_players[lp_player].lv_heroData.lv_abilities[lv_itAbility].lv_ability == lp_abilityLink)) {
return libGame_gv_players[lp_player].lv_heroData.lv_abilities[lv_itAbility].lv_isAffectedByCooldownReduction;
}
}
return false;
}
bool libGame_gf_HeroAbilityCooldownCanBeReset (int lp_player, string lp_abilityLink) {
// Variable Declarations
int lv_itAbility;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if ((AbilityClass(lp_abilityLink) != c_classIdCAbilEffect) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectInstant) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectTarget) && (AbilityClass(lp_abilityLink) != c_classIdCAbilAugment) && (AbilityClass(lp_abilityLink) != c_classIdCAbilBehavior) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorph) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorphPlacement)) {
return false;
}
return true;
}
void libGame_gf_HeroRefreshCooldowns (int lp_player, bool lp_resetPlayerHeroUnits) {
// Variable Declarations
int lv_itAbility;
unit lv_itUnit;
int lv_heroIndex;
string lv_abilLink;
string lv_cooldownLink;
string lv_chargeLink;
int lv_chargeCount;
string lv_itemUnitType;
int lv_itemIndex;
int lv_currentRank;
int lv_itItems;
int lv_itAbilitiesOnItems;
string lv_itemLink;
unitgroup lv_unitGroup;
int lv_vehicleIndex;
unit lv_vehicleUnit;
// Automatic Variable Declarations
unitgroup auto30FAF137_g;
int auto30FAF137_u;
int auto342EB673_ae;
const int auto342EB673_ai = 1;
const int auto67F3B775_ae = libMapM_gv_vehicle_MaxNumberOfVehicles_C;
const int auto67F3B775_ai = 1;
int autoBC2476EA_ae;
const int autoBC2476EA_ai = 1;
// Variable Initialization
lv_cooldownLink = "";
lv_chargeLink = "";
lv_unitGroup = UnitGroupEmpty();
// Implementation
if ((lp_resetPlayerHeroUnits == true)) {
lv_unitGroup = libGame_gv_players[lp_player].lv_heroUnitGroup;
}
else {
lv_unitGroup = UnitGroupSelected(lp_player);
}
auto30FAF137_g = lv_unitGroup;
auto30FAF137_u = UnitGroupCount(auto30FAF137_g, c_unitCountAll);
for (;; auto30FAF137_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(auto30FAF137_g, auto30FAF137_u);
if (lv_itUnit == null) { break; }
if ((libGame_gf_UnitIsHero(lv_itUnit) == true)) {
lv_heroIndex = libCore_gf_GetHeroIndexForUnitType(UnitGetType(lv_itUnit));
}
else {
if (((UnitGetType(lv_itUnit) == "TargetHeroDummyFreddie") || (UnitGetType(lv_itUnit) == "TargetHeroDummy") || (UnitGetType(lv_itUnit) == "AbathurSymbiote") || (UnitGetType(lv_itUnit) == "RagnarosBigRag"))) {
libSprt_gf_DEBUGRefreshCooldownsforUnit(lp_player, lv_itUnit);
continue;
}
else {
continue;
}
}
auto342EB673_ae = UnitAbilityCount(lv_itUnit);
lv_itAbility = 1;
for ( ; ( (auto342EB673_ai >= 0 && lv_itAbility <= auto342EB673_ae) || (auto342EB673_ai < 0 && lv_itAbility >= auto342EB673_ae) ) ; lv_itAbility += auto342EB673_ai ) {
lv_abilLink = UnitAbilityGet(lv_itUnit, lv_itAbility);
if ((libGame_gf_HeroAbilityCooldownCanBeReset(lv_heroIndex, lv_abilLink) == true)) {
lv_cooldownLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Cooldown.Link", UnitGetOwner(lv_itUnit));
libNtve_gf_UnitRemoveCooldown(lv_itUnit, lv_cooldownLink);
libNtve_gf_PlayerRemoveCooldown(lp_player, lv_cooldownLink);
lv_chargeLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Charge.Link", UnitGetOwner(lv_itUnit));
lv_chargeCount = CatalogFieldValueGetAsInt(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Charge.CountMax", UnitGetOwner(lv_itUnit));
UnitAddChargeUsed(lv_itUnit, lv_chargeLink, (-lv_chargeCount));
PlayerAddChargeUsed(lp_player, lv_chargeLink, (-lv_chargeCount));
}
}
}
lv_vehicleIndex = 1;
for ( ; ( (auto67F3B775_ai >= 0 && lv_vehicleIndex <= auto67F3B775_ae) || (auto67F3B775_ai < 0 && lv_vehicleIndex >= auto67F3B775_ae) ) ; lv_vehicleIndex += auto67F3B775_ai ) {
if ((libMapM_gv_vehicle[lv_vehicleIndex].lv_unit_Vehicle != null) && (libMapM_gv_vehicle[lv_vehicleIndex].lv_player_PlayerControllingVehicle == lp_player)) {
lv_vehicleUnit = libMapM_gv_vehicle[lv_vehicleIndex].lv_unit_Vehicle;
autoBC2476EA_ae = UnitAbilityCount(lv_vehicleUnit);
lv_itAbility = 1;
for ( ; ( (autoBC2476EA_ai >= 0 && lv_itAbility <= autoBC2476EA_ae) || (autoBC2476EA_ai < 0 && lv_itAbility >= autoBC2476EA_ae) ) ; lv_itAbility += autoBC2476EA_ai ) {
lv_abilLink = UnitAbilityGet(lv_vehicleUnit, lv_itAbility);
lv_cooldownLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Cooldown.Link", lp_player);
libNtve_gf_UnitRemoveCooldown(lv_vehicleUnit, lv_cooldownLink);
libNtve_gf_PlayerRemoveCooldown(lp_player, lv_cooldownLink);
}
}
}
libGame_gf_SendEventSpecialCaseTalentCooldownReset(lp_player);
}
void libGame_gf_StormUniversalModifyCooldownonUnitCDRforAbilities (unit lp_targetUnit, fixed lp_cooldownChange, bool lp_includeTrait, bool lp_includeHeroic, bool lp_includeMount) {
// Variable Declarations
int lv_playerID;
int lv_itAbility;
int lv_heroIndex;
string lv_abilLink;
string lv_cooldownLink;
fixed lv_currentCooldownAmount;
fixed lv_newCooldownAmount;
string lv_chargeLink;
fixed lv_currentChargeAmount;
fixed lv_newChargeAmount;
// Automatic Variable Declarations
int auto3743938C_ae;
const int auto3743938C_ai = 1;
// Variable Initialization
lv_cooldownLink = "";
lv_chargeLink = "";
// Implementation
lv_heroIndex = libCore_gf_GetHeroIndexForUnitType(UnitGetType(lp_targetUnit));
lv_playerID = UnitGetOwner(lp_targetUnit);
auto3743938C_ae = libGame_gv_players[lv_heroIndex].lv_heroData.lv_numberOfAbilities;
lv_itAbility = 1;
for ( ; ( (auto3743938C_ai >= 0 && lv_itAbility <= auto3743938C_ae) || (auto3743938C_ai < 0 && lv_itAbility >= auto3743938C_ae) ) ; lv_itAbility += auto3743938C_ai ) {
if ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_itAbility].lv_isAffectedByCooldownReduction == true)) {
if ((((lp_includeHeroic == false) && (libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_itAbility].lv_isHeroic == true)) || ((lp_includeTrait == false) && (libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_itAbility].lv_isTrait == true)) || ((lp_includeMount == false) && ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_itAbility].lv_isMountReplacement == true) || (libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_itAbility].lv_ability == "Mount"))))) {
continue;
}
lv_abilLink = libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_itAbility].lv_ability;
lv_cooldownLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Cooldown.Link", lv_playerID);
UnitModifyCooldown(lp_targetUnit, lv_cooldownLink, lp_cooldownChange, c_cooldownOperationAdd);
if ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_itAbility].lv_usesCharges == true)) {
lv_chargeLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Charge.Link", lv_playerID);
UnitAddChargeRegenRemaining(lp_targetUnit, lv_chargeLink, lp_cooldownChange);
}
}
}
}
void libGame_gf_CalculateClosestLaneDataForLane (point lp_testPoint, int lp_curLane) {
// Variable Declarations
// Automatic Variable Declarations
// Variable Initialization
// Implementation
AILaneWaypointCalcClosestDataForLane(lp_curLane, lp_testPoint);
libGame_gv_closestLaneData.lv_laneData[lp_curLane].lv_closestIndex = AILaneWaypointGetCalcDataClosestWaypointIndex();
libGame_gv_closestLaneData.lv_laneData[lp_curLane].lv_secondaryIndex = AILaneWaypointGetCalcDataSecondWaypointIndex();
libGame_gv_closestLaneData.lv_laneData[lp_curLane].lv_closestPoint = AILaneWaypointGetCalcDataClosestPoint();
libGame_gv_closestLaneData.lv_laneData[lp_curLane].lv_closestDist = AILaneWaypointGetCalcDataClosestDist();
}
void libGame_gf_CalculateClosestLaneData (point lp_testPoint) {
// Variable Declarations
int lv_curLane;
int lv_curWaypointIndex;
point lv_curWaypoint;
fixed lv_curDist;
fixed lv_tempBestDistance;
point lv_tempClosestPoint;
int lv_closestIndex;
point lv_closestWaypoint;
int lv_secondaryIndex;
point lv_secondaryWaypoint;
point lv_closestPoint;
fixed lv_finalBestDistanceAnyLane;
fixed lv_finalBestDistanceMinionLane;
// Automatic Variable Declarations
int auto0EE20048_ae;
const int auto0EE20048_ai = 1;
// Variable Initialization
// Implementation
lv_finalBestDistanceAnyLane = 524287.0;
lv_finalBestDistanceMinionLane = 524287.0;
libGame_gv_closestLaneData.lv_closestLane = 0;
libGame_gv_closestLaneData.lv_closestMinionLane = 0;
auto0EE20048_ae = libGame_gv_laneCount;
lv_curLane = 1;
for ( ; ( (auto0EE20048_ai >= 0 && lv_curLane <= auto0EE20048_ae) || (auto0EE20048_ai < 0 && lv_curLane >= auto0EE20048_ae) ) ; lv_curLane += auto0EE20048_ai ) {
libGame_gf_CalculateClosestLaneDataForLane(lp_testPoint, lv_curLane);
if ((libGame_gv_closestLaneData.lv_laneData[lv_curLane].lv_closestDist < lv_finalBestDistanceAnyLane)) {
libGame_gv_closestLaneData.lv_closestLane = lv_curLane;
lv_finalBestDistanceAnyLane = libGame_gv_closestLaneData.lv_laneData[lv_curLane].lv_closestDist;
}
if ((libGame_gv_laneData[lv_curLane].lv_minionSpawningEnabled == true) && (libGame_gv_closestLaneData.lv_laneData[lv_curLane].lv_closestDist < lv_finalBestDistanceMinionLane)) {
libGame_gv_closestLaneData.lv_closestMinionLane = lv_curLane;
lv_finalBestDistanceMinionLane = libGame_gv_closestLaneData.lv_laneData[lv_curLane].lv_closestDist;
}
}
}
bool libGame_gf_LaneIndexIsValid (int lp_laneIndex) {
// Automatic Variable Declarations
// Implementation
if (((lp_laneIndex > 0) || (lp_laneIndex == libGame_gv_laneCustomLane))) {
return true;
}
else {
return false;
}
}
void libGame_gf_SetStormMapLighting (string lp_lighting, playergroup lp_players, fixed lp_blendtime) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
playergroup auto5C10B9E8_g;
// Variable Initialization
// Implementation
auto5C10B9E8_g = lp_players;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto5C10B9E8_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if (((lv_itPlayer == libCore_gv_oBSERVER_ObserverUIPlayer) || ((lv_itPlayer >= 1) && (lv_itPlayer <= libCore_gv_bALMaxPlayers)))) {
if ((lp_lighting == libGame_gv_stormMapLightingCurrent[lv_itPlayer])) {
continue;
}
libGame_gv_stormMapLightingCurrent[lv_itPlayer] = lp_lighting;
PlayerSetLighting(lv_itPlayer, lp_lighting, lp_blendtime);
}
}
}
void libGame_gf_UpdateStormMapLighting (playergroup lp_players, fixed lp_blendtime) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
playergroup autoB63EDD43_g;
// Variable Initialization
// Implementation
autoB63EDD43_g = lp_players;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoB63EDD43_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if (((lv_itPlayer == libCore_gv_oBSERVER_ObserverUIPlayer) || ((lv_itPlayer >= 1) && (lv_itPlayer <= libCore_gv_bALMaxPlayers)))) {
if ((libGame_gv_stormMapLightingSpecial[lv_itPlayer] != null)) {
libGame_gf_SetStormMapLighting(libGame_gv_stormMapLightingSpecial[lv_itPlayer], PlayerGroupSingle(lv_itPlayer), lp_blendtime);
}
else {
libGame_gf_SetStormMapLighting(libCore_gv_mAPMapLight, PlayerGroupSingle(lv_itPlayer), lp_blendtime);
}
}
}
}
void libGame_gf_SpecialLightingEventStart (string lp_lighting, playergroup lp_players, fixed lp_blendtime) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
playergroup autoA44B11C0_g;
// Variable Initialization
// Implementation
autoA44B11C0_g = lp_players;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoA44B11C0_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if (((lv_itPlayer == libCore_gv_oBSERVER_ObserverUIPlayer) || ((lv_itPlayer >= 1) && (lv_itPlayer <= libCore_gv_bALMaxPlayers)))) {
libGame_gv_stormMapLightingSpecial[lv_itPlayer] = lp_lighting;
libGame_gf_UpdateStormMapLighting(PlayerGroupSingle(lv_itPlayer), lp_blendtime);
}
}
}
void libGame_gf_SpecialLightingEventEnd (string lp_lighting, playergroup lp_players, fixed lp_blendtime) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
playergroup auto08F890C8_g;
// Variable Initialization
// Implementation
auto08F890C8_g = lp_players;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto08F890C8_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if (((lv_itPlayer == libCore_gv_oBSERVER_ObserverUIPlayer) || ((lv_itPlayer >= 1) && (lv_itPlayer <= libCore_gv_bALMaxPlayers)))) {
if ((libGame_gv_stormMapLightingSpecial[lv_itPlayer] == null)) {
continue;
}
if ((libGame_gv_stormMapLightingSpecial[lv_itPlayer] != lp_lighting)) {
continue;
}
libGame_gv_stormMapLightingSpecial[lv_itPlayer] = null;
libGame_gf_UpdateStormMapLighting(PlayerGroupSingle(lv_itPlayer), lp_blendtime);
}
}
}
abilcmd libGame_gf_GetWheelCommandFromIndex (int lp_pingIndex) {
// Automatic Variable Declarations
// Implementation
if ((((lp_pingIndex >= libGame_gv_wheelPingIndexMin) && (lp_pingIndex <= libGame_gv_wheelPingIndexMax)) == true)) {
return libGame_gv_wheelPingMapping[(lp_pingIndex-libGame_gv_wheelPingOffsetIndex)].lv_cmd;
}
return null;
}
string libGame_gf_GetWheelEffectFromIndex (int lp_pingIndex) {
// Automatic Variable Declarations
// Implementation
if ((((lp_pingIndex >= libGame_gv_wheelPingIndexMin) && (lp_pingIndex <= libGame_gv_wheelPingIndexMax)) == true)) {
return libGame_gv_wheelPingMapping[(lp_pingIndex-libGame_gv_wheelPingOffsetIndex)].lv_effect;
}
return null;
}
string libGame_gf_GetWheelActionFromIndex (int lp_pingIndex) {
// Automatic Variable Declarations
// Implementation
if ((((lp_pingIndex >= libGame_gv_wheelPingIndexMin) && (lp_pingIndex <= libGame_gv_wheelPingIndexMax)) == true)) {
return libGame_gv_wheelPingMapping[(lp_pingIndex-libGame_gv_wheelPingOffsetIndex)].lv_action;
}
return null;
}
void libGame_gf_SetWheelMonitorUnitForPlayers (unit lp_unit, playergroup lp_players) {
// Variable Declarations
int lv_untitledVariable001;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
libNtve_gf_SetDialogItemUnit(libGame_gv_wheelUnitStatus, lp_unit, lp_players);
}
trigger auto_libGame_gf_DropLootBannerinTownHallRubble_Trigger = null;
int auto_libGame_gf_DropLootBannerinTownHallRubble_lp_townIndex;
void libGame_gf_DropLootBannerinTownHallRubble (int lp_townIndex) {
auto_libGame_gf_DropLootBannerinTownHallRubble_lp_townIndex = lp_townIndex;
if (auto_libGame_gf_DropLootBannerinTownHallRubble_Trigger == null) {
auto_libGame_gf_DropLootBannerinTownHallRubble_Trigger = TriggerCreate("auto_libGame_gf_DropLootBannerinTownHallRubble_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_DropLootBannerinTownHallRubble_Trigger, false, false);
}
bool auto_libGame_gf_DropLootBannerinTownHallRubble_TriggerFunc (bool testConds, bool runActions) {
int lp_townIndex = auto_libGame_gf_DropLootBannerinTownHallRubble_lp_townIndex;
// Variable Declarations
point lv_positionOfBanner;
int lv_creditPlayer;
// Automatic Variable Declarations
// Variable Initialization
lv_positionOfBanner = PointWithOffset(libGame_gv_townTownData[lp_townIndex].lv_townHallPosition, 0.0, -1.0);
lv_creditPlayer = libGame_gv_loot_TownHallAttackers[lp_townIndex];
// Implementation
if ((libGame_gv_loot_DropBannerInTownHallRubble == false)) {
return true;
}
Wait(1.8, c_timeGame);
if (((lv_creditPlayer >= 1) && (lv_creditPlayer <= libCore_gv_bALMaxPlayers))) {
UnitCreate(1, "LootBannerSconce", c_unitCreateIgnorePlacement, libGame_gf_ComputerPlayerInTeam(libGame_gf_TeamNumberOfPlayer(lv_creditPlayer)), lv_positionOfBanner, 270.0, null);
libGame_gv_townTownData[lp_townIndex].lv_lootBannerUnit = UnitLastCreated();
ActorSendTo(libNtve_gf_MainActorofUnit(libGame_gv_townTownData[lp_townIndex].lv_lootBannerUnit), "LootBanner", libNtve_gf_BannerSet(libGame_gv_players[lv_creditPlayer].lv_lootContent.lv_loot_Banner.lv_bannerID));
Wait(0.5, c_timeGame);
TextExpressionSetToken("Param/Expression/lib_Game_A1A65E62", "A", PlayerName(lv_creditPlayer));
TextTagCreate(TextExpressionAssemble("Param/Expression/lib_Game_A1A65E62"), 20, lv_positionOfBanner, libGame_gv_loot_BannerTextTagHeightOffset_C, true, false, libGame_gf_PlayersOnTeamHeroes(libGame_gf_TeamNumberOfPlayer(lv_creditPlayer), false));
TextTagAttachToUnit(TextTagLastCreated(), libGame_gv_townTownData[lp_townIndex].lv_lootBannerUnit, libGame_gv_loot_BannerTextTagHeightOffset_C);
TextExpressionSetToken("Param/Expression/lib_Game_B776822C", "A", PlayerName(lv_creditPlayer));
TextTagCreate(TextExpressionAssemble("Param/Expression/lib_Game_B776822C"), 20, lv_positionOfBanner, libGame_gv_loot_BannerTextTagHeightOffset_C, true, false, libGame_gf_PlayersOnTeamHeroes(libGame_gf_EnemyTeamNumberOfPlayer(lv_creditPlayer), false));
TextTagAttachToUnit(TextTagLastCreated(), libGame_gv_townTownData[lp_townIndex].lv_lootBannerUnit, libGame_gv_loot_BannerTextTagHeightOffset_C);
}
else {
UnitCreate(1, "LootBannerSconce", c_unitCreateIgnorePlacement, libGame_gf_ComputerPlayerInTeam(libGame_gf_EnemyTeamNumberOfPlayer(libGame_gv_townTownData[lp_townIndex].lv_owner)), lv_positionOfBanner, 270.0, null);
libGame_gv_townTownData[lp_townIndex].lv_lootBannerUnit = UnitLastCreated();
ActorSendTo(libNtve_gf_MainActorofUnit(libGame_gv_townTownData[lp_townIndex].lv_lootBannerUnit), "LootBanner", libNtve_gf_BannerSet("NeutralMercCamp"));
}
return true;
}
trigger auto_libGame_gf_DropLootBannerinSconce_Trigger = null;
unit auto_libGame_gf_DropLootBannerinSconce_lp_sconceUnit;
string auto_libGame_gf_DropLootBannerinSconce_lp_bannerID;
int auto_libGame_gf_DropLootBannerinSconce_lp_owningPlayer;
bool auto_libGame_gf_DropLootBannerinSconce_lp_createTextTag;
void libGame_gf_DropLootBannerinSconce (unit lp_sconceUnit, string lp_bannerID, int lp_owningPlayer, bool lp_createTextTag) {
auto_libGame_gf_DropLootBannerinSconce_lp_sconceUnit = lp_sconceUnit;
auto_libGame_gf_DropLootBannerinSconce_lp_bannerID = lp_bannerID;
auto_libGame_gf_DropLootBannerinSconce_lp_owningPlayer = lp_owningPlayer;
auto_libGame_gf_DropLootBannerinSconce_lp_createTextTag = lp_createTextTag;
if (auto_libGame_gf_DropLootBannerinSconce_Trigger == null) {
auto_libGame_gf_DropLootBannerinSconce_Trigger = TriggerCreate("auto_libGame_gf_DropLootBannerinSconce_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_DropLootBannerinSconce_Trigger, false, false);
}
bool auto_libGame_gf_DropLootBannerinSconce_TriggerFunc (bool testConds, bool runActions) {
unit lp_sconceUnit = auto_libGame_gf_DropLootBannerinSconce_lp_sconceUnit;
string lp_bannerID = auto_libGame_gf_DropLootBannerinSconce_lp_bannerID;
int lp_owningPlayer = auto_libGame_gf_DropLootBannerinSconce_lp_owningPlayer;
bool lp_createTextTag = auto_libGame_gf_DropLootBannerinSconce_lp_createTextTag;
// Variable Declarations
const int lv_textTagAttachmentIndex1_C = 185;
const int lv_textTagAttachmentIndex2_C = 186;
string lv_realBannerID;
// Automatic Variable Declarations
// Variable Initialization
lv_realBannerID = lp_bannerID;
// Implementation
if ((lv_realBannerID == null)) {
lv_realBannerID = "BannerDefault";
}
libNtve_gf_SendActorMessageToUnit(lp_sconceUnit, "Signal ResetBanner");
Wait(0.5, c_timeGame);
ActorSendTo(libNtve_gf_MainActorofUnit(lp_sconceUnit), "LootBanner", libNtve_gf_BannerSet(lv_realBannerID));
UnitSetOwner(lp_sconceUnit, lp_owningPlayer, true);
if ((lp_createTextTag == true)) {
TextTagDestroy(libCore_gf_TextTagStoredForUnit(lp_sconceUnit, lv_textTagAttachmentIndex1_C));
TextTagDestroy(libCore_gf_TextTagStoredForUnit(lp_sconceUnit, lv_textTagAttachmentIndex2_C));
TextExpressionSetToken("Param/Expression/lib_Game_F8D64D74", "A", PlayerName(lp_owningPlayer));
TextTagCreate(TextExpressionAssemble("Param/Expression/lib_Game_F8D64D74"), 20, UnitGetPosition(lp_sconceUnit), libGame_gv_loot_BannerTextTagHeightOffset_C, true, false, libGame_gf_PlayersOnTeamHeroes(libGame_gf_TeamNumberOfPlayer(lp_owningPlayer), false));
TextTagAttachToUnit(TextTagLastCreated(), lp_sconceUnit, libGame_gv_loot_BannerTextTagHeightOffset_C);
libCore_gf_StoreTextTagForUnit(lp_sconceUnit, lv_textTagAttachmentIndex1_C, TextTagLastCreated());
TextExpressionSetToken("Param/Expression/lib_Game_3A8C4155", "A", PlayerName(lp_owningPlayer));
TextTagCreate(TextExpressionAssemble("Param/Expression/lib_Game_3A8C4155"), 20, UnitGetPosition(lp_sconceUnit), libGame_gv_loot_BannerTextTagHeightOffset_C, true, false, libGame_gf_PlayersOnTeamHeroes(libGame_gf_EnemyTeamNumberOfPlayer(lp_owningPlayer), false));
TextTagAttachToUnit(TextTagLastCreated(), lp_sconceUnit, libGame_gv_loot_BannerTextTagHeightOffset_C);
libCore_gf_StoreTextTagForUnit(lp_sconceUnit, lv_textTagAttachmentIndex2_C, TextTagLastCreated());
}
if ((lp_owningPlayer == libCore_gv_cOMPUTER_Hostile)) {
Wait(1.5, c_timeGame);
libMapM_gf_CreateSnapshotOfUnitForBothTeams(lp_sconceUnit);
}
return true;
}
int libGame_gf_MinionDetermineWaveComposition (int lp_lane, int lp_team) {
// Automatic Variable Declarations
// Implementation
if ((libUIUI_gv_uIDebugPanelForceMinionWaveComp == true)) {
return libCore_ge_MinionWaveCompositionsTypes_Null;
}
return libGame_gv_laneData[lp_lane].lv_minionCompositions[lp_team];
}
bool libGame_gf_MinionSystemStarted () {
// Automatic Variable Declarations
// Implementation
return libGame_gv_minionSystemStarted;
}
void libGame_gf_MinionEnableDisableWaveCompositionType (bool lp_enableDisable, int lp_compositionType) {
// Automatic Variable Declarations
// Implementation
if ((lp_enableDisable == true)) {
libCore_gv_dataMinionWaveCompositions[(lp_compositionType)].lv_enabled = true;
}
else {
libCore_gv_dataMinionWaveCompositions[(lp_compositionType)].lv_enabled = false;
}
}
void libGame_gf_MinionTurnOnOffCatapults (bool lp_onOff) {
// Automatic Variable Declarations
bool auto791B4420_val;
// Implementation
auto791B4420_val = lp_onOff;
if (auto791B4420_val == true) {
libGame_gv_minionMapNeverSpawnsCatapults = false;
}
else if (auto791B4420_val == false) {
libGame_gv_minionMapNeverSpawnsCatapults = true;
}
else {
}
}
void libGame_gf_MinionStartStopMinionSystem (bool lp_startStop) {
// Automatic Variable Declarations
// Implementation
if ((lp_startStop == true)) {
if ((libCore_gv_sYSMinionAI == false)) {
return ;
}
if ((libGame_gv_minionSystemStarted == false)) {
libGame_gv_minionSystemStarted = true;
libGame_gv_minionSystemPaused = false;
libAIAI_gf_MinionAITurnMinionAISystemOnOff(true);
}
}
else {
libGame_gv_minionSystemStarted = false;
libGame_gf_MinionStartStopMinionSpawnCycle(false);
libAIAI_gf_MinionAITurnMinionAISystemOnOff(false);
}
}
void libGame_gf_MinionStartStopMinionSpawnCycle (bool lp_startStop) {
// Variable Declarations
int lv_itLane;
// Automatic Variable Declarations
int auto759DBF5D_ae;
const int auto759DBF5D_ai = 1;
int auto2AF0547F_ae;
const int auto2AF0547F_ai = 1;
// Variable Initialization
// Implementation
if ((lp_startStop == true)) {
auto2AF0547F_ae = libGame_gv_laneCount;
lv_itLane = 1;
for ( ; ( (auto2AF0547F_ai >= 0 && lv_itLane <= auto2AF0547F_ae) || (auto2AF0547F_ai < 0 && lv_itLane >= auto2AF0547F_ae) ) ; lv_itLane += auto2AF0547F_ai ) {
libGame_gv_laneData[lv_itLane].lv_minionSpawningEnabled = true;
}
TriggerExecute(libGame_gt_MinionSpawnCycle, true, false);
}
else {
auto759DBF5D_ae = libGame_gv_laneCount;
lv_itLane = 1;
for ( ; ( (auto759DBF5D_ai >= 0 && lv_itLane <= auto759DBF5D_ae) || (auto759DBF5D_ai < 0 && lv_itLane >= auto759DBF5D_ae) ) ; lv_itLane += auto759DBF5D_ai ) {
libGame_gv_laneData[lv_itLane].lv_minionSpawningEnabled = false;
}
TriggerStop(libGame_gt_MinionSpawnCycle);
}
}
void libGame_gf_MinionPauseUnpauseMinionSystem (bool lp_pauseUnpause) {
// Variable Declarations
int lv_i;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if ((libGame_gv_minionSystemStarted == true)) {
if ((lp_pauseUnpause == true)) {
libGame_gv_minionSystemPaused = true;
libGame_gv_minionSpawningEnabled = false;
TimerPause(libGame_gv_scalingTimer, true);
libAIAI_gf_MinionAIPauseUnpauseMinionAISystem(true);
}
else {
libGame_gv_minionSystemPaused = false;
libGame_gv_minionSpawningEnabled = true;
if ((libGame_gv_minionScalingEnabled == true)) {
TimerPause(libGame_gv_scalingTimer, false);
}
libAIAI_gf_MinionAIPauseUnpauseMinionAISystem(false);
}
}
}
void libGame_gf_MinionPauseUnpauseMinionSystemForTeam (bool lp_pauseUnpause, int lp_team, int lp_lane) {
// Variable Declarations
int lv_itLane;
// Automatic Variable Declarations
int autoAA4AEC98_ae;
const int autoAA4AEC98_ai = 1;
int autoDC652BA1_ae;
const int autoDC652BA1_ai = 1;
// Variable Initialization
// Implementation
if ((libGame_gv_minionSystemStarted == true)) {
if ((lp_pauseUnpause == true)) {
if ((lp_lane == libGame_ge_AllLanes_AllLanes)) {
autoDC652BA1_ae = libGame_gv_laneCount;
lv_itLane = 1;
for ( ; ( (autoDC652BA1_ai >= 0 && lv_itLane <= autoDC652BA1_ae) || (autoDC652BA1_ai < 0 && lv_itLane >= autoDC652BA1_ae) ) ; lv_itLane += autoDC652BA1_ai ) {
libGame_gv_minionSystemPausedAdvanced[lp_team][lv_itLane] = true;
}
}
else {
libGame_gv_minionSystemPausedAdvanced[lp_team][lp_lane] = true;
}
}
else {
if ((lp_lane == libGame_ge_AllLanes_AllLanes)) {
autoAA4AEC98_ae = libGame_gv_laneCount;
lv_itLane = 1;
for ( ; ( (autoAA4AEC98_ai >= 0 && lv_itLane <= autoAA4AEC98_ae) || (autoAA4AEC98_ai < 0 && lv_itLane >= autoAA4AEC98_ae) ) ; lv_itLane += autoAA4AEC98_ai ) {
libGame_gv_minionSystemPausedAdvanced[lp_team][lv_itLane] = false;
}
}
else {
libGame_gv_minionSystemPausedAdvanced[lp_team][lp_lane] = false;
}
}
}
}
void libGame_gf_MinionSpawnMinion (int lp_lane, int lp_owner, int lp_type, point lp_spawnPoint) {
// Variable Declarations
int lv_minionTeam;
string lv_minionUnitType;
// Automatic Variable Declarations
// Variable Initialization
lv_minionTeam = libGame_gf_TeamNumberOfPlayer(lp_owner);
lv_minionUnitType = libCore_gf_DataMinionUnitTypeFromPreset(lp_type);
// Implementation
if (((libGame_gv_gameOver == true) || (libGame_gv_minionSpawningEnabled == false) || (lv_minionUnitType == null))) {
return ;
}
if (((lp_type == libCore_ge_MinionTypes_Catapult) || (lp_type == libCore_ge_MinionTypes_CustomCatapult1) || (lp_type == libCore_ge_MinionTypes_CustomCatapult2)) && ((libGame_gv_minionMapNeverSpawnsCatapults == true) || ((libGame_gv_minion_CapCatapults == true) && (UnitGroupCount(libGame_gv_minion_CatapultGroup[lv_minionTeam], c_unitCountAlive) >= libGame_gv_minion_CatapultCap_C)) || (libGame_gf_TownsAliveinLane(libGame_gf_EnemyTeam(lv_minionTeam), lp_lane) >= 2) || ((libGame_gf_TownsAliveinLane(libGame_gf_EnemyTeam(lv_minionTeam), lp_lane) == 1) && (ModI((libGame_gv_minionWaveSpawnCounter - libGame_gv_minion_PeriodicCatapultsFirstWave), libGame_gv_minion_PeriodicCatapultsWavePeriod_C) != 0)))) {
return ;
}
libNtve_gf_CreateUnitsAtPoint2(1, lv_minionUnitType, 0, lp_owner, lp_spawnPoint, null);
if ((libGame_gv_minion_CapCatapults == true) && ((lp_type == libCore_ge_MinionTypes_Catapult) || (lp_type == libCore_ge_MinionTypes_CustomCatapult1) || (lp_type == libCore_ge_MinionTypes_CustomCatapult2))) {
UnitGroupAdd(libGame_gv_minion_CatapultGroup[lv_minionTeam], UnitLastCreated());
}
if ((libGame_gv_minionTakesReducedSpellDamage == true)) {
UnitBehaviorAdd(UnitLastCreated(), "MinionSpellDamageReduction", UnitLastCreated(), 1);
}
if ((libGame_gv_minionScalingEnabled == true)) {
libGame_gf_UpdateScalingForUnit(UnitLastCreated(), libGame_gv_scalingTicks, 0);
}
libGame_gf_CalculateSpawnedMinionGoalPoints(lp_owner, lp_spawnPoint);
libAIAI_gf_MinionAIStartMinionAI(-1, UnitLastCreated(), lp_lane, libGame_gv_spawnedMinionFirstWaypointIndex, false, false, false, 0, false);
libAIAI_gf_AITeamDelegateAddRemoveMinionThreattoLane(lv_minionTeam, lp_lane, lv_minionUnitType, libAIAI_ge_AITeamDelegateAddRemoveLaneValue_Add);
if ((libMapM_gv_mMRavenTeamStats[lv_minionTeam].lv_cursed == true)) {
libMapM_gf_MMRavenApplyCurseEffectOnMinion(UnitLastCreated());
}
}
trigger auto_libGame_gf_MinionSpawnWave_Trigger = null;
int auto_libGame_gf_MinionSpawnWave_lp_lane;
int auto_libGame_gf_MinionSpawnWave_lp_owner;
int auto_libGame_gf_MinionSpawnWave_lp_composition;
void libGame_gf_MinionSpawnWave (int lp_lane, int lp_owner, int lp_composition) {
auto_libGame_gf_MinionSpawnWave_lp_lane = lp_lane;
auto_libGame_gf_MinionSpawnWave_lp_owner = lp_owner;
auto_libGame_gf_MinionSpawnWave_lp_composition = lp_composition;
if (auto_libGame_gf_MinionSpawnWave_Trigger == null) {
auto_libGame_gf_MinionSpawnWave_Trigger = TriggerCreate("auto_libGame_gf_MinionSpawnWave_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_MinionSpawnWave_Trigger, false, false);
}
bool auto_libGame_gf_MinionSpawnWave_TriggerFunc (bool testConds, bool runActions) {
int lp_lane = auto_libGame_gf_MinionSpawnWave_lp_lane;
int lp_owner = auto_libGame_gf_MinionSpawnWave_lp_owner;
int lp_composition = auto_libGame_gf_MinionSpawnWave_lp_composition;
// Variable Declarations
const fixed lv_offsetChangePerGroup = 1.875;
int lv_itGroup;
int lv_itMinion;
int lv_groupCount;
point lv_basePoint;
point lv_offsetPoint;
fixed lv_currentOffsetAmount;
point lv_spawnPoint;
int lv_team;
int lv_minionType;
int lv_bruiserLevel;
// Automatic Variable Declarations
int autoB77C7225_ae;
const int autoB77C7225_ai = 1;
int autoEFB6C6D3_ae;
const int autoEFB6C6D3_ai = 1;
// Variable Initialization
// Implementation
lv_groupCount = libCore_gv_dataMinionWaveCompositions[(lp_composition)].lv_numberOfGroups;
if ((lp_owner == libCore_gv_cOMPUTER_TeamOrder)) {
lv_basePoint = libGame_gv_laneData[lp_lane].lv_waypoints[2];
lv_offsetPoint = libGame_gv_laneData[lp_lane].lv_waypoints[3];
lv_team = 1;
}
lv_currentOffsetAmount = ((lv_groupCount - 1) * lv_offsetChangePerGroup);
if ((lp_owner == libCore_gv_cOMPUTER_TeamChaos)) {
lv_basePoint = libGame_gv_laneData[lp_lane].lv_waypoints[(libGame_gv_laneData[lp_lane].lv_waypointCount - 1)];
lv_offsetPoint = libGame_gv_laneData[lp_lane].lv_waypoints[(libGame_gv_laneData[lp_lane].lv_waypointCount - 2)];
lv_team = 2;
}
if ((lv_basePoint == null)) {
return true;
}
Wait(libCore_gv_bALMinionTeamSpawnDelay[lv_team], c_timeGame);
Wait(libGame_gv_laneData[lp_lane].lv_spawnDelay, c_timeGame);
lv_bruiserLevel = libGame_gv_laneData[lp_lane].lv_bruiserMinionLevel[lv_team];
autoB77C7225_ae = lv_groupCount;
lv_itGroup = 1;
for ( ; ( (autoB77C7225_ai >= 0 && lv_itGroup <= autoB77C7225_ae) || (autoB77C7225_ai < 0 && lv_itGroup >= autoB77C7225_ae) ) ; lv_itGroup += autoB77C7225_ai ) {
if ((libGame_gv_laneData[lp_lane].lv_minionSpawningEnabled == true)) {
lv_minionType = libCore_gv_dataMinionWaveCompositions[(lp_composition)].lv_groupMinionType[lv_itGroup];
lv_spawnPoint = libNtve_gf_PointOffsetTowardsPoint(lv_basePoint, lv_currentOffsetAmount, lv_offsetPoint);
PointSetFacing(lv_spawnPoint, PointGetFacing(lv_basePoint));
autoEFB6C6D3_ae = libCore_gv_dataMinionWaveCompositions[(lp_composition)].lv_groupMinionCount[lv_itGroup];
lv_itMinion = 1;
for ( ; ( (autoEFB6C6D3_ai >= 0 && lv_itMinion <= autoEFB6C6D3_ae) || (autoEFB6C6D3_ai < 0 && lv_itMinion >= autoEFB6C6D3_ae) ) ; lv_itMinion += autoEFB6C6D3_ai ) {
libGame_gf_MinionSpawnMinion(lp_lane, lp_owner, lv_minionType, lv_spawnPoint);
}
lv_currentOffsetAmount -= lv_offsetChangePerGroup;
Wait(0.0625, c_timeGame);
}
}
return true;
}
void libGame_gf_MinionTurnMinionScalingOnOff (bool lp_onOff) {
// Automatic Variable Declarations
// Implementation
if ((lp_onOff == true)) {
libGame_gv_minionScalingEnabled = true;
TimerStart(libGame_gv_scalingTimer, libGame_gv_bALScalingTimerDuration, false, c_timeGame);
}
else {
libGame_gv_minionScalingEnabled = false;
TimerPause(libGame_gv_scalingTimer, true);
}
}
void libGame_gf_MinionPauseUnpauseMinionScaling (bool lp_pauseUnpause) {
// Automatic Variable Declarations
// Implementation
if ((libGame_gv_minionScalingEnabled == true)) {
if ((lp_pauseUnpause == false)) {
TimerPause(libGame_gv_scalingTimer, false);
}
else {
TimerPause(libGame_gv_scalingTimer, true);
}
}
}
void libGame_gf_CalculateSpawnedMinionGoalPoints (int lp_ownerPlayer, point lp_positionofSpawner) {
// Automatic Variable Declarations
// Implementation
if (((libGame_gv_laneCount <= 0) || (lp_positionofSpawner == null) || (lp_ownerPlayer > libCore_gv_bALMaxEnginePlayerCount))) {
libGame_gv_spawnedMinionLane = 0;
libGame_gv_spawnedMinionFirstWaypointIndex = 0;
return ;
}
libGame_gf_CalculateClosestLaneData(lp_positionofSpawner);
libGame_gf_CalculateSpawnedMinionGoalPointsFromClosestLaneData(lp_ownerPlayer);
}
void libGame_gf_CalculateSpawnedMinionGoalPointsFromLane (int lp_ownerPlayer, point lp_positionofSpawner, int lp_lane) {
// Automatic Variable Declarations
// Implementation
if (((libGame_gv_laneCount <= 0) || (lp_positionofSpawner == null) || (lp_ownerPlayer > libCore_gv_bALMaxEnginePlayerCount))) {
libGame_gv_spawnedMinionLane = 0;
libGame_gv_spawnedMinionFirstWaypointIndex = 0;
return ;
}
libGame_gv_closestLaneData.lv_closestLane = lp_lane;
libGame_gf_CalculateClosestLaneDataForLane(lp_positionofSpawner, lp_lane);
libGame_gf_CalculateSpawnedMinionGoalPointsFromClosestLaneData(lp_ownerPlayer);
}
void libGame_gf_CalculateSpawnedMinionGoalPointsFromClosestLaneData (int lp_ownerPlayer) {
// Variable Declarations
int lv_closestIndex;
int lv_secondaryIndex;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
libGame_gv_spawnedMinionLane = libGame_gv_closestLaneData.lv_closestLane;
if (((libGame_gv_spawnedMinionLane == 0) || (libGame_gv_laneData[libGame_gv_spawnedMinionLane].lv_waypointCount < 3))) {
if ((libCore_gv_sYSGameMode != libCore_ge_GameModes_ArenaMode) && (libCore_gv_sYSGameMode != libCore_ge_GameModes_AttackDefend) && (libCore_gv_sYSGameMode != libCore_ge_GameModes_ModeC)) {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_B26BDFE3"), true);
}
libGame_gv_spawnedMinionFirstWaypointIndex = 0;
return ;
}
lv_closestIndex = libGame_gv_closestLaneData.lv_laneData[libGame_gv_spawnedMinionLane].lv_closestIndex;
lv_secondaryIndex = libGame_gv_closestLaneData.lv_laneData[libGame_gv_spawnedMinionLane].lv_secondaryIndex;
if ((libGame_gv_players[lp_ownerPlayer].lv_faction == libGame_ge_Faction_Order)) {
libGame_gv_spawnedMinionFirstWaypointIndex = MaxI(lv_closestIndex, lv_secondaryIndex);
if ((libCore_gv_mAPUsesCirclingAI == false)) {
if ((libGame_gv_spawnedMinionFirstWaypointIndex >= libGame_gv_laneData[libGame_gv_spawnedMinionLane].lv_waypointCount)) {
libGame_gv_spawnedMinionFirstWaypointIndex = (libGame_gv_laneData[libGame_gv_spawnedMinionLane].lv_waypointCount - 1);
}
}
else {
while ((libGame_gv_spawnedMinionFirstWaypointIndex >= (libGame_gv_laneData[libGame_gv_spawnedMinionLane].lv_waypointCount - libCore_gv_mAPPathNodesBeforeLooping))) {
libGame_gv_spawnedMinionFirstWaypointIndex -= 1;
}
}
}
else {
libGame_gv_spawnedMinionFirstWaypointIndex = MinI(lv_closestIndex, lv_secondaryIndex);
if ((libCore_gv_mAPUsesCirclingAI == false)) {
if ((libGame_gv_spawnedMinionFirstWaypointIndex <= 1)) {
libGame_gv_spawnedMinionFirstWaypointIndex = 2;
}
}
else {
while ((libGame_gv_spawnedMinionFirstWaypointIndex <= libCore_gv_mAPPathNodesBeforeLooping)) {
libGame_gv_spawnedMinionFirstWaypointIndex += 1;
}
}
}
}
void libGame_gf_ApplyMountBehaviorToHero (unit lp_hero) {
// Automatic Variable Declarations
// Implementation
if ((libGame_gv_players[libCore_gf_GetHeroIndexForUnitType(UnitGetType(lp_hero))].lv_heroData.lv_usesMounts == true) && (libGame_gv_players[UnitGetOwner(lp_hero)].lv_defaultMountOverride == null)) {
UnitBehaviorAdd(lp_hero, "Mounted", lp_hero, 1);
}
if ((libGame_gv_players[libCore_gf_GetHeroIndexForUnitType(UnitGetType(lp_hero))].lv_heroData.lv_usesMounts == true) && (libGame_gv_players[UnitGetOwner(lp_hero)].lv_defaultMountOverride != null)) {
if ((PlayerHasTalent(UnitGetOwner(lp_hero), "JunkratIHateWaitingTalent") == true)) {
UnitBehaviorAdd(lp_hero, libGame_gv_players[UnitGetOwner(lp_hero)].lv_defaultMountOverride, lp_hero, 1);
}
else {
UnitBehaviorAdd(lp_hero, "Mounted", lp_hero, 1);
}
}
}
bool libGame_gf_MountEnabled (unit lp_hero) {
// Automatic Variable Declarations
// Implementation
if (((UnitAbilityCheck(lp_hero, "Mount", true) == true) || ((UnitGetType(lp_hero) == "HeroRehgar") && (UnitAbilityCheck(lp_hero, "RehgarGhostWolfActivate", true) == true)))) {
return true;
}
return false;
}
void libGame_gf_TurnOnOffTownDestructionRemovesCoreInvulnerable (bool lp_onOff) {
// Automatic Variable Declarations
bool autoAE38A62E_val;
// Implementation
autoAE38A62E_val = lp_onOff;
if (autoAE38A62E_val == true) {
libGame_gv_townDestructionRemovesCoreInvulnerable = true;
}
else if (autoAE38A62E_val == false) {
libGame_gv_townDestructionRemovesCoreInvulnerable = false;
}
else {
}
}
void libGame_gf_AwardXPForNPCKill (unit lp_killedUnit, int lp_killedUnitPlayer, int lp_killedUnitClassification, int lp_killingPlayer, fixed lp_killedUnitXPAward) {
// Variable Declarations
unit lv_itUnit;
int lv_itPlayer;
int lv_itTeamPlayer;
unitgroup lv_nearbyUnits;
int lv_creditPlayer;
playergroup lv_killCreditGroup;
fixed lv_xPValue;
playergroup lv_xPAwardGroup;
int lv_xPSource;
unitgroup lv_nearbyUnitsAlliedToKilledUnit;
unit lv_itAlliedUnit;
unitgroup lv_experienceAwardedVisualizationGroup;
// Automatic Variable Declarations
unitgroup auto8BF37171_g;
int auto8BF37171_u;
unitgroup autoED19B100_g;
int autoED19B100_u;
playergroup auto635EB3AE_g;
int auto3202C57A_val;
playergroup autoA75BD986_g;
playergroup autoAB55B378_g;
playergroup auto60ED318E_g;
int auto6BF10103_val;
// Variable Initialization
lv_nearbyUnits = UnitGroupEmpty();
lv_killCreditGroup = PlayerGroupEmpty();
lv_xPAwardGroup = PlayerGroupEmpty();
lv_nearbyUnitsAlliedToKilledUnit = UnitGroupEmpty();
lv_experienceAwardedVisualizationGroup = UnitGroupEmpty();
// Implementation
if ((lp_killingPlayer > 0) && (lp_killingPlayer <= libCore_gv_bALMaxEnginePlayerCount)) {
lv_nearbyUnits = UnitGroupSearch(null, lp_killingPlayer, UnitGetPosition(lp_killedUnit), libCore_gv_bALXPRadius, UnitFilter(0, 0, (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterCreep) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
lv_nearbyUnitsAlliedToKilledUnit = UnitGroupSearch(null, lp_killingPlayer, UnitGetPosition(lp_killedUnit), libCore_gv_bALXPRadius, libCore_gv_filtersHeroicEnemy, 0);
auto8BF37171_g = lv_nearbyUnitsAlliedToKilledUnit;
auto8BF37171_u = UnitGroupCount(auto8BF37171_g, c_unitCountAll);
for (;; auto8BF37171_u -= 1) {
lv_itAlliedUnit = UnitGroupUnitFromEnd(auto8BF37171_g, auto8BF37171_u);
if (lv_itAlliedUnit == null) { break; }
libGame_gf_SendEventHeroWitnessedAlliedNPCDeath(UnitGetOwner(lv_itAlliedUnit), lp_killedUnit);
}
}
else {
if ((lp_killedUnitPlayer != libCore_gv_cOMPUTER_Hostile)) {
lv_nearbyUnits = UnitGroupSearch(null, lp_killedUnitPlayer, UnitGetPosition(lp_killedUnit), libCore_gv_bALXPRadius, UnitFilter(0, 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterCreep) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
}
else {
if ((lp_killedUnitXPAward > 0.0) && (UnitHasBehavior2(lp_killedUnit, "UnitGivesNoXP") == false)) {
TextExpressionSetToken("Param/Expression/lib_Game_F67CE810", "A", UnitTypeGetName(UnitGetType(lp_killedUnit)));
TextExpressionSetToken("Param/Expression/lib_Game_F67CE810", "B", IntToText(lp_killingPlayer));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_F67CE810"), true);
return ;
}
}
}
autoED19B100_g = lv_nearbyUnits;
autoED19B100_u = UnitGroupCount(autoED19B100_g, c_unitCountAll);
for (;; autoED19B100_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(autoED19B100_g, autoED19B100_u);
if (lv_itUnit == null) { break; }
if ((UnitBehaviorCount(lv_itUnit, "SpecialCaseNPCTakedownParticipant") == 1) && (libNtve_gf_PlayerIsEnemy(UnitGetOwner(lv_itUnit), UnitGetOwner(lp_killedUnit), libNtve_ge_PlayerRelation_Enemy) == true)) {
libGame_gf_SendEventSpecialCaseUnitParticipatedInNPCTakedown(UnitGetOwner(lv_itUnit), lp_killedUnit);
}
if (((UnitHasBehavior2(lv_itUnit, "EarnsXP") == true) || ((UnitTypeTestAttribute(UnitGetType(lv_itUnit), c_unitAttributeHeroic) == true) && (UnitHasBehavior2(lv_itUnit, "AbathurUltimateEvolutionVehicleCasterBehavior") == false) && (UnitTestState(lv_itUnit, c_unitStateHallucination) == false)))) {
lv_creditPlayer = UnitGetOwner(lv_itUnit);
UnitGroupAdd(lv_experienceAwardedVisualizationGroup, lv_itUnit);
if ((lv_creditPlayer <= libCore_gv_bALMaxPlayers)) {
PlayerGroupAdd(lv_killCreditGroup, lv_creditPlayer);
}
if ((lv_creditPlayer == libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lv_creditPlayer)].lv_choPlayer)) {
PlayerGroupAdd(lv_killCreditGroup, libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lv_creditPlayer)].lv_gallPlayer);
}
else {
if ((lv_creditPlayer == libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lv_creditPlayer)].lv_gallPlayer)) {
PlayerGroupAdd(lv_killCreditGroup, libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lv_creditPlayer)].lv_choPlayer);
}
}
}
}
if ((lp_killingPlayer > 0) && (lp_killingPlayer <= libCore_gv_bALMaxPlayers)) {
PlayerGroupAdd(lv_killCreditGroup, lp_killingPlayer);
}
if ((PlayerGroupCount(lv_killCreditGroup) == 0) && (UnitTypeTestAttribute(UnitGetType(lp_killedUnit), c_unitAttributeStructure) == false)) {
return ;
}
if ((lp_killingPlayer == libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lp_killingPlayer)].lv_choPlayer)) {
PlayerGroupAdd(lv_killCreditGroup, libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lp_killingPlayer)].lv_gallPlayer);
}
else {
if ((lp_killingPlayer == libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lp_killingPlayer)].lv_gallPlayer)) {
PlayerGroupAdd(lv_killCreditGroup, libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lp_killingPlayer)].lv_choPlayer);
}
}
auto635EB3AE_g = lv_killCreditGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto635EB3AE_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
libGame_gf_SendEventHeroParticipatedInNPCTakedown(lv_itPlayer, lp_killedUnit);
if ((UnitHasBehavior2(libGame_gv_players[lv_itPlayer].lv_heroUnit, "LeoricUndying") == true)) {
PlayerGroupRemove(lv_killCreditGroup, lv_itPlayer);
if ((PlayerGroupCount(lv_killCreditGroup) == 0) && (UnitTypeTestAttribute(UnitGetType(lp_killedUnit), c_unitAttributeStructure) == false)) {
return ;
}
}
}
lv_xPValue = lp_killedUnitXPAward;
if ((libSprt_gv_dEBUGXPTextEnabled == true)) {
TextExpressionSetToken("Param/Expression/lib_Game_D3D36514", "A", UnitTypeGetName(UnitGetType(lp_killedUnit)));
TextExpressionSetToken("Param/Expression/lib_Game_D3D36514", "B", FixedToText(lv_xPValue, c_fixedPrecisionAny));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_D3D36514"), true);
}
if (((libCore_gv_sYSXPOn == false) || (lv_xPValue <= 0.0) || (UnitHasBehavior2(lp_killedUnit, "UnitGivesNoXP") == true))) {
return ;
}
if ((libCore_gv_dEBUGDebuggingEnabled == true)) {
auto3202C57A_val = lp_killedUnitClassification;
if (auto3202C57A_val == c_unitAttributeMinion) {
if ((libSprt_gv_dEBUGXPSourceMinion == false)) {
return ;
}
}
else if (auto3202C57A_val == c_unitAttributeStructure) {
if ((libSprt_gv_dEBUGXPSourceStructure == false)) {
return ;
}
}
else if (auto3202C57A_val == c_unitAttributeCreep) {
if ((libSprt_gv_dEBUGXPSourceCreep == true)) {
return ;
}
}
else {
}
}
if ((PlayerGroupCount(lv_killCreditGroup) == 0) && (libCore_gv_dEBUGSoloXPOn == false)) {
lv_xPAwardGroup = PlayerGroupCopy(libGame_gf_EnemyPlayerGroupOfPlayer(lp_killedUnitPlayer));
if ((PlayerGroupCount(lv_xPAwardGroup) == 0) && (UnitTypeTestAttribute(UnitGetType(lp_killedUnit), c_unitAttributeStructure) == true) && (lp_killedUnitPlayer == libCore_gv_cOMPUTER_Hostile)) {
lv_xPAwardGroup = PlayerGroupCopy(libGame_gf_AlliedPlayerGroupOfPlayer(lp_killingPlayer));
}
PlayerGroupRemove(lv_xPAwardGroup, libCore_gv_cOMPUTER_TeamOrder);
PlayerGroupRemove(lv_xPAwardGroup, libCore_gv_cOMPUTER_TeamChaos);
if (((lp_killedUnitPlayer < 0) || (lp_killedUnitPlayer > libCore_gv_bALMaxEnginePlayerCount))) {
TextExpressionSetToken("Param/Expression/lib_Game_34F4B7D0", "A", UnitTypeGetName(UnitGetType(lp_killedUnit)));
TextExpressionSetToken("Param/Expression/lib_Game_34F4B7D0", "B", IntToText(lp_killedUnitPlayer));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_34F4B7D0"), true);
}
else {
autoAB55B378_g = lv_xPAwardGroup;
lv_itTeamPlayer = -1;
while (true) {
lv_itTeamPlayer = PlayerGroupNextPlayer(autoAB55B378_g, lv_itTeamPlayer);
if (lv_itTeamPlayer<0) { break; }
libGame_gf_ScoreValuesRecordXPContributionForPlayer(lv_itTeamPlayer, (lv_xPValue / PlayerGroupCount(lv_xPAwardGroup)), false);
}
}
}
else {
autoA75BD986_g = lv_killCreditGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoA75BD986_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
libGame_gf_ScoreValuesRecordXPContributionForPlayer(lv_itPlayer, (lv_xPValue / PlayerGroupCount(lv_killCreditGroup)), true);
if ((lv_itPlayer == lp_killingPlayer)) {
SoundPlayOnUnitForPlayer(SoundLink("XP_Gain_Direct", -1), c_maxPlayers, PlayerGroupSingle(lv_itPlayer), lp_killedUnit, 0.0, 100.0, 0.0);
}
else {
SoundPlayOnUnitForPlayer(SoundLink("XP_Gain_Indirect", -1), c_maxPlayers, PlayerGroupSingle(lv_itPlayer), lp_killedUnit, 0.0, 100.0, 0.0);
}
}
if ((libCore_gv_dEBUGSoloXPOn == true)) {
lv_xPAwardGroup = PlayerGroupCopy(lv_killCreditGroup);
}
else {
lv_xPAwardGroup = PlayerGroupCopy(libGame_gf_AlliedPlayerGroupOfPlayer(PlayerGroupPlayer(lv_killCreditGroup, 1)));
}
PlayerGroupRemove(lv_xPAwardGroup, libCore_gv_cOMPUTER_TeamOrder);
PlayerGroupRemove(lv_xPAwardGroup, libCore_gv_cOMPUTER_TeamChaos);
}
if ((PlayerGroupCount(lv_xPAwardGroup) == 0) && (UnitTypeTestAttribute(UnitGetType(lp_killedUnit), c_unitAttributeStructure) == true) && (PlayerGroupCount(libGame_gv_teams[1].lv_teamPlayerGroupNoNPCPlayers) > 0) && (PlayerGroupCount(libGame_gv_teams[2].lv_teamPlayerGroupNoNPCPlayers) > 0) && (libCore_gv_dEBUGSoloXPOn == false)) {
TextExpressionSetToken("Param/Expression/lib_Game_8402AC6F", "A", UnitTypeGetName(UnitGetType(lp_killedUnit)));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_8402AC6F"), true);
}
auto60ED318E_g = lv_xPAwardGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto60ED318E_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
auto6BF10103_val = lp_killedUnitClassification;
if (auto6BF10103_val == c_unitAttributeStructure) {
lv_xPSource = libGame_ge_XPSources_Structure;
}
else if (auto6BF10103_val == c_unitAttributeMerc) {
lv_xPSource = libGame_ge_XPSources_Creep;
}
else if (auto6BF10103_val == c_unitAttributeCreep) {
lv_xPSource = libGame_ge_XPSources_Creep;
}
else if (auto6BF10103_val == c_unitAttributeMinion) {
lv_xPSource = libGame_ge_XPSources_Minion;
}
else {
}
libGame_gf_GrantXPToPlayer(lv_xPValue, lv_itPlayer, lv_xPSource);
if ((lp_killedUnitClassification != c_unitAttributeStructure)) {
libUIUI_gf_UIFloatingCombatTextH16MidXP(lv_itPlayer, lp_killedUnit, libCore_ge_FloatingTextType_XPSmall, FixedToInt(lv_xPValue));
}
else {
libUIUI_gf_UIFloatingCombatTextH16MidXP(lv_itPlayer, lp_killedUnit, libCore_ge_FloatingTextType_XPLarge, FixedToInt(lv_xPValue));
}
}
}
trigger auto_libGame_gf_BuildingDiesCameraShake_Trigger = null;
fixed auto_libGame_gf_BuildingDiesCameraShake_lp_delay;
string auto_libGame_gf_BuildingDiesCameraShake_lp_intensity;
playergroup auto_libGame_gf_BuildingDiesCameraShake_lp_playerGroup;
void libGame_gf_BuildingDiesCameraShake (fixed lp_delay, string lp_intensity, playergroup lp_playerGroup) {
auto_libGame_gf_BuildingDiesCameraShake_lp_delay = lp_delay;
auto_libGame_gf_BuildingDiesCameraShake_lp_intensity = lp_intensity;
auto_libGame_gf_BuildingDiesCameraShake_lp_playerGroup = lp_playerGroup;
if (auto_libGame_gf_BuildingDiesCameraShake_Trigger == null) {
auto_libGame_gf_BuildingDiesCameraShake_Trigger = TriggerCreate("auto_libGame_gf_BuildingDiesCameraShake_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_BuildingDiesCameraShake_Trigger, false, false);
}
bool auto_libGame_gf_BuildingDiesCameraShake_TriggerFunc (bool testConds, bool runActions) {
fixed lp_delay = auto_libGame_gf_BuildingDiesCameraShake_lp_delay;
string lp_intensity = auto_libGame_gf_BuildingDiesCameraShake_lp_intensity;
playergroup lp_playerGroup = auto_libGame_gf_BuildingDiesCameraShake_lp_playerGroup;
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
playergroup auto7B461A9C_g;
// Variable Initialization
// Implementation
Wait(lp_delay, c_timeGame);
auto7B461A9C_g = lp_playerGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto7B461A9C_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
CameraShake(lv_itPlayer, lp_intensity, "Shake", 0.1, 0.4, 0.5);
}
return true;
}
void libGame_gf_BribeProc (int lp_killingPlayer, unit lp_minion) {
// Variable Declarations
unit lv_bribeOwnerUnit;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if (((UnitHasBehavior2(libGame_gv_players[lp_killingPlayer].lv_heroUnit, "TalentBribeTalentCarry") == true) || (UnitHasBehavior2(libGame_gv_players[lp_killingPlayer].lv_activeVehicle, "TalentBribeTalentCarry") == true))) {
lv_bribeOwnerUnit = libGame_gv_players[lp_killingPlayer].lv_heroUnit;
UnitCreateEffectUnit(lv_bribeOwnerUnit, "TalentBribeAdd1Token", lv_bribeOwnerUnit);
if ((ModI(UnitBehaviorCount(lv_bribeOwnerUnit, libGame_gv_players[lp_killingPlayer].lv_bribeTokenLink), libGame_gv_players[lp_killingPlayer].lv_bribeChargeStackRequirement) == 0)) {
UnitAddChargeUsed(lv_bribeOwnerUnit, "Abil/TalentBucketBribe", -1.0);
}
}
}
void libGame_gf_DiabloBlackSoulstoneProc (int lp_killingPlayer, unit lp_minion) {
// Automatic Variable Declarations
// Implementation
if ((UnitHasBehavior2(libGame_gv_players[lp_killingPlayer].lv_heroUnit, "DiabloBlackSoulstoneTokenCounter") == true)) {
if ((UnitBehaviorCount(libGame_gv_players[lp_killingPlayer].lv_heroUnit, "DiabloBlackSoulstoneTokenCounter") < 100)) {
UnitCreateEffectUnit(libGame_gv_players[lp_killingPlayer].lv_heroUnit, "DiabloBlackSoulstoneAdd1TokenSet", libGame_gv_players[lp_killingPlayer].lv_heroUnit);
UnitCreateEffectUnit(libGame_gv_players[lp_killingPlayer].lv_heroUnit, "DiabloBlackSoulstoneNonHeroTargetLaunchMissile", lp_minion);
}
}
}
void libGame_gf_GenericSeasonedMarksmanProc (int lp_killingPlayer, unit lp_minion) {
// Variable Declarations
unit lv_unit;
int lv_stackCount;
// Automatic Variable Declarations
// Variable Initialization
lv_unit = libGame_gv_players[lp_killingPlayer].lv_heroUnit;
// Implementation
if ((UnitHasBehavior2(lv_unit, "TalentSeasonedMarksmanCarryBehavior") == true) && (UnitBehaviorCount(libGame_gv_players[lp_killingPlayer].lv_heroUnit, "TalentSeasonedMarksmanTokenCounter") != 1000)) {
if ((UnitBehaviorCount(libGame_gv_players[lp_killingPlayer].lv_heroUnit, "TalentSeasonedMarksmanTokenCounter") >= 40)) {
UnitCreateEffectUnit(lv_unit, "TalentSeasonedMarksmanAdd2TokenCountNoQuestCategory", lv_unit);
}
else {
UnitCreateEffectUnit(lv_unit, "TalentSeasonedMarksmanAdd2TokenCount", lv_unit);
}
}
}
void libGame_gf_LeoricMithrilMaceProc (int lp_killingPlayer, unit lp_minion) {
// Variable Declarations
unit lv_unit;
int lv_stackCount;
// Automatic Variable Declarations
// Variable Initialization
lv_unit = libGame_gv_players[lp_killingPlayer].lv_heroUnit;
// Implementation
if ((UnitHasBehavior2(lv_unit, "LeoricMithrilMaceTokenCounter") == true) && (UnitBehaviorCount(libGame_gv_players[lp_killingPlayer].lv_heroUnit, "LeoricMithrilMaceTokenCounter") != 100)) {
UnitCreateEffectUnit(lv_unit, "LeoricMithrilMaceAdd1TokenCount", lv_unit);
}
}
void libGame_gf_BrightwingHyperShiftProc (int lp_killingPlayer, unit lp_minion) {
// Variable Declarations
unit lv_unit;
// Automatic Variable Declarations
// Variable Initialization
lv_unit = libGame_gv_players[lp_killingPlayer].lv_heroUnit;
// Implementation
if ((UnitHasBehavior2(lv_unit, "BrightwingPhaseShiftHyperShiftCarryBehavior") == true)) {
UnitCreateEffectUnit(lv_unit, "BrightwingPhaseShiftHyperShiftModifyUnit", lv_unit);
}
}
void libGame_gf_BrightwingPixieCharmProc (int lp_killingPlayer, unit lp_minion) {
// Variable Declarations
unit lv_unit;
// Automatic Variable Declarations
// Variable Initialization
lv_unit = libGame_gv_players[lp_killingPlayer].lv_heroUnit;
// Implementation
if ((UnitHasBehavior2(lv_unit, "FaerieDragonPixieCharm") == true)) {
UnitCreateEffectUnit(lv_unit, "BrightwingPixieCharmAddMinionTokenCount", lv_unit);
}
}
void libGame_gf_CreepDies (unit lp_creepUnit, int lp_killingPlayer, fixed lp_killXP) {
// Variable Declarations
int lv_camp;
int lv_defenderUnitIndex;
int lv_defenderAIIndex;
int lv_team;
unit lv_itUnit;
unit lv_createdUnit;
// Automatic Variable Declarations
unitgroup auto46A0FEDF_g;
int auto46A0FEDF_u;
// Variable Initialization
lv_camp = libMapM_gf_JungleGetJungleCampForUnit(lp_creepUnit);
lv_defenderUnitIndex = libMapM_gf_JungleGetJungleUnitIndexForUnit(lp_creepUnit);
// Implementation
if ((libMapM_gv_jungleCreepCamps[lv_camp].lv_defenderDefendersCoweronDeath == true)) {
auto46A0FEDF_g = libMapM_gv_jungleCreepCamps[lv_camp].lv_defenderCoweringLivingUnitGroup;
auto46A0FEDF_u = UnitGroupCount(auto46A0FEDF_g, c_unitCountAll);
for (;; auto46A0FEDF_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(auto46A0FEDF_g, auto46A0FEDF_u);
if (lv_itUnit == null) { break; }
if ((lp_creepUnit == lv_itUnit)) {
if ((PointPathingPassable(UnitGetPosition(lp_creepUnit)) == true)) {
UnitCreate(1, "MercCoweringDefenderOrientDummy", c_unitCreateIgnorePlacement, libCore_gv_cOMPUTER_Hostile, UnitGetPosition(lp_creepUnit), UnitGetFacing(lp_creepUnit), null);
lv_createdUnit = UnitLastCreated();
}
else {
UnitSetPosition(lp_creepUnit, libMapM_gv_jungleCreepCamps[lv_camp].lv_mapDataDefenderSpawnPoints[lv_defenderUnitIndex], false);
UnitSetFacing(lp_creepUnit, PointGetFacing(libMapM_gv_jungleCreepCamps[lv_camp].lv_mapDataDefenderSpawnPoints[lv_defenderUnitIndex]), 0.0);
UnitCreate(1, "MercCoweringDefenderOrientDummy", c_unitCreateIgnorePlacement, libCore_gv_cOMPUTER_Hostile, libMapM_gv_jungleCreepCamps[lv_camp].lv_mapDataDefenderSpawnPoints[lv_defenderUnitIndex], PointGetFacing(libMapM_gv_jungleCreepCamps[lv_camp].lv_mapDataDefenderSpawnPoints[lv_defenderUnitIndex]), null);
lv_createdUnit = UnitLastCreated();
}
UnitGroupAdd(libMapM_gv_jungleCreepCamps[lv_camp].lv_defenderCoweringDeadUnitGroup, UnitLastCreated());
UnitSetCustomValue(lv_createdUnit, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_JungleDefenderCreepUnitIndex), UnitGetCustomValue(lv_itUnit, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_JungleDefenderCreepUnitIndex)));
UnitGroupRemove(libMapM_gv_jungleCreepCamps[lv_camp].lv_defenderCoweringLivingUnitGroup, lv_itUnit);
}
}
}
lv_defenderAIIndex = libAIAI_gf_DefenderAIIndexOfUnit(lp_creepUnit);
if ((lv_defenderAIIndex != 0)) {
libAIAI_gf_DefenderAICreepDies(lv_defenderAIIndex, lp_creepUnit, lp_killingPlayer);
}
UnitXPAddXP(libMapM_gv_jungleCreepCamps[lv_camp].lv_campOwnershipFlagUnit, null, lp_killXP);
libGame_gf_SendEventHeroParticipatedInCreepTakedown(lp_killingPlayer, lp_creepUnit);
}
void libGame_gf_MinionDies (unit lp_minionUnit, int lp_killingPlayer, fixed lp_killXP) {
// Variable Declarations
int lv_minionOwner;
int lv_regenGlobeOwner;
int lv_unitAttribute;
// Automatic Variable Declarations
// Variable Initialization
lv_unitAttribute = c_unitAttributeMinion;
// Implementation
if ((UnitHasBehavior2(lp_minionUnit, "SuppressRegenGlobeCreation") == false)) {
lv_minionOwner = UnitGetOwner(lp_minionUnit);
if (((UnitGetType(lp_minionUnit) == "WizardMinion"))) {
if ((lv_minionOwner == libCore_gv_cOMPUTER_TeamOrder)) {
lv_regenGlobeOwner = libCore_gv_cOMPUTER_TeamChaos;
}
else {
lv_regenGlobeOwner = libCore_gv_cOMPUTER_TeamOrder;
}
libNtve_gf_CreateUnitsWithDefaultFacing(1, "RegenGlobe", c_unitCreateIgnorePlacement, lv_regenGlobeOwner, UnitGetPosition(lp_minionUnit), null);
}
if ((UnitTypeTestAttribute(UnitGetType(lp_minionUnit), c_unitAttributeMerc) == true)) {
lv_unitAttribute = c_unitAttributeMerc;
}
libGame_gf_AwardXPForNPCKill(lp_minionUnit, lv_minionOwner, lv_unitAttribute, lp_killingPlayer, libCore_gf_DataXPXPForMinion(lp_killXP, PlayerGroupPlayer(PlayerGroupAlliance(c_playerGroupAlly, lp_killingPlayer), 1), lp_minionUnit));
if (((lp_killingPlayer >= 1) && (lp_killingPlayer <= libCore_gv_bALMaxPlayers))) {
libGame_gv_scoreValues[lp_killingPlayer].lv_minionKills += 1;
}
}
if ((UnitTypeTestAttribute(UnitGetType(lp_minionUnit), c_unitAttributeMerc) == true) && (UnitTypeTestAttribute(UnitGetType(lp_minionUnit), c_unitAttributeMapCreature) == false)) {
libAIAI_gf_AITeamDelegateAddRemoveMercLanertoLane(libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lp_minionUnit)), libAIAI_gf_MinionAIGetLaneForMinion(lp_minionUnit), UnitGetType(lp_minionUnit), libAIAI_ge_AITeamDelegateAddRemoveLaneValue_Remove, UnitGetCustomValue(lp_minionUnit, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_AIThreatBase)));
}
else {
libAIAI_gf_AITeamDelegateAddRemoveMinionThreattoLane(libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lp_minionUnit)), libAIAI_gf_MinionAIGetLaneForMinion(lp_minionUnit), UnitGetType(lp_minionUnit), libAIAI_ge_AITeamDelegateAddRemoveLaneValue_Remove);
}
}
bool libGame_gf_TownAliveinLane (int lp_team, int lp_laneID) {
// Automatic Variable Declarations
// Implementation
return (libGame_gf_TownsAliveinLane(lp_team, lp_laneID) > 0);
}
int libGame_gf_TownsAliveinLane (int lp_team, int lp_lane) {
// Variable Declarations
int lv_townCount;
int lv_town;
// Automatic Variable Declarations
int auto5E7C8C8A_ae;
const int auto5E7C8C8A_ai = 1;
// Variable Initialization
// Implementation
auto5E7C8C8A_ae = libGame_gv_townTownCount;
lv_town = 1;
for ( ; ( (auto5E7C8C8A_ai >= 0 && lv_town <= auto5E7C8C8A_ae) || (auto5E7C8C8A_ai < 0 && lv_town >= auto5E7C8C8A_ae) ) ; lv_town += auto5E7C8C8A_ai ) {
if ((libGame_gv_townTownData[lv_town].lv_owner == libGame_gf_ComputerPlayerInTeam(lp_team)) && (libGame_gv_townTownData[lv_town].lv_lane == lp_lane) && (libGame_gv_townTownData[lv_town].lv_townHallIndex > 0) && (UnitIsAlive(libGame_gv_townTownData[lv_town].lv_structureUnits[libGame_gv_townTownData[lv_town].lv_townHallIndex]) == true)) {
lv_townCount += 1;
}
}
return lv_townCount;
}
int libGame_gf_TownsTotalinLane (int lp_team, int lp_lane) {
// Variable Declarations
int lv_townCount;
int lv_town;
// Automatic Variable Declarations
int autoE387911A_ae;
const int autoE387911A_ai = 1;
// Variable Initialization
// Implementation
autoE387911A_ae = libGame_gv_townTownCount;
lv_town = 1;
for ( ; ( (autoE387911A_ai >= 0 && lv_town <= autoE387911A_ae) || (autoE387911A_ai < 0 && lv_town >= autoE387911A_ae) ) ; lv_town += autoE387911A_ai ) {
if ((libGame_gv_townTownData[lv_town].lv_owner == libGame_gf_ComputerPlayerInTeam(lp_team)) && (libGame_gv_townTownData[lv_town].lv_lane == lp_lane) && (libGame_gv_townTownData[lv_town].lv_townHallIndex > 0)) {
lv_townCount += 1;
}
}
return lv_townCount;
}
fixed libGame_gf_GetOnFireAwardAmount (string lp_heroUnit, int lp_awardCategory) {
// Variable Declarations
fixed lv_amounttoReturn;
// Automatic Variable Declarations
int auto53E011E3_val;
// Variable Initialization
// Implementation
auto53E011E3_val = lp_awardCategory;
if (auto53E011E3_val == libGame_ge_MVPAwards_Assist) {
lv_amounttoReturn = libGame_gv_awardforAssist;
if ((lp_heroUnit == "HeroLostVikingsController")) {
lv_amounttoReturn = 0.75;
}
else if ((lp_heroUnit == "HeroAbathur")) {
lv_amounttoReturn = 0.75;
}
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_Kill) {
lv_amounttoReturn = libGame_gv_awardforKill;
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_Takedown) {
lv_amounttoReturn = libGame_gv_onFireMaxOffenseScoreAwardforTakedown;
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_TimeSpentDead) {
lv_amounttoReturn = libGame_gv_awardforPercentageTimeSpentDead;
if ((lp_heroUnit == "HeroMurky")) {
lv_amounttoReturn = -1.0;
}
else if ((lp_heroUnit == "HeroGall")) {
lv_amounttoReturn = -1.0;
}
else if ((lp_heroUnit == "HeroCho")) {
lv_amounttoReturn = -0.85;
}
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_TopDamageTakenasWarrior) {
lv_amounttoReturn = (libGame_gv_awardforTopDamageTakenasWarrior * 3.0);
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_TopDamageTakenasWarrioronTeam) {
lv_amounttoReturn = (libGame_gv_awardforTopDamageTakenasWarrioronTeam * 3.0);
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_TopHealing) {
lv_amounttoReturn = (libGame_gv_awardforTopHealing * 4.0);
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_TopHeroDamage) {
lv_amounttoReturn = libGame_gv_awardforTopHeroDamage;
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_TopHeroDamageonTeam) {
lv_amounttoReturn = libGame_gv_awardforTopHeroDamageonTeam;
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_TopSiegeDamage) {
lv_amounttoReturn = libGame_gv_awardforTopSiegeDamage;
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_TopSiegeDamageonTeam) {
lv_amounttoReturn = libGame_gv_awardforTopSiegeDamageonTeam;
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_TopXPContributor) {
lv_amounttoReturn = libGame_gv_awardforTopXPContributor;
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_TopXPContributoronTeam) {
lv_amounttoReturn = libGame_gv_awardforTopXPContributoronTeam;
}
else if (auto53E011E3_val == libGame_ge_MVPAwards_OnWinningTeam) {
lv_amounttoReturn = libGame_gv_awardforOnWinningTeam;
}
else {
}
return lv_amounttoReturn;
}
void libGame_gf_UpdateOnFireScoreHighlightBooleans (int lp_player, int lp_onFireScoreValue, bool lp_toHighlight) {
// Automatic Variable Declarations
int auto8B316171_val;
// Implementation
if ((lp_player > libCore_gv_bALMaxPlayers) && (lp_player < 1)) {
return ;
}
auto8B316171_val = lp_onFireScoreValue;
if (auto8B316171_val == libGame_ge_OnFireScoreValues_Healing) {
libGame_gv_onFireHighlightforHealing[lp_player] = lp_toHighlight;
}
else if (auto8B316171_val == libGame_ge_OnFireScoreValues_DamageTaken) {
libGame_gv_onFireHighlightforDamageTaken[lp_player] = lp_toHighlight;
}
else if (auto8B316171_val == libGame_ge_OnFireScoreValues_SiegeDamage) {
libGame_gv_onFireHighlightforSiegeDamage[lp_player] = lp_toHighlight;
}
else if (auto8B316171_val == libGame_ge_OnFireScoreValues_Kills) {
libGame_gv_onFireHighlightforKills[lp_player] = lp_toHighlight;
}
else if (auto8B316171_val == libGame_ge_OnFireScoreValues_HeroDamage) {
libGame_gv_onFireHighlightforHeroDamager[lp_player] = lp_toHighlight;
}
else if (auto8B316171_val == libGame_ge_OnFireScoreValues_Experience) {
libGame_gv_onFireHighlightforXPContributoronTeam[lp_player] = lp_toHighlight;
}
else if (auto8B316171_val == libGame_ge_OnFireScoreValues_Assists) {
libGame_gv_onFireHighlightforAssists[lp_player] = lp_toHighlight;
}
else {
}
}
void libGame_gf_CalculateOnFireScore () {
// Variable Declarations
fixed lv_mVPScoreToBeat;
fixed lv_takedowns;
int lv_iterator;
int lv_secondaryIterator;
int lv_itRoleMultiClass;
fixed lv_gameLength;
int lv_tiebreaker;
int lv_topHeroDamagerinGame;
fixed lv_topHeroDamageAmountinGame;
int[libCore_gv_bALMaxTeams + 1] lv_topHeroDamagerPerTeam;
fixed[libCore_gv_bALMaxTeams + 1] lv_topHeroDamageAmountPerTeam;
int lv_topSiegeDamagerinGame;
fixed lv_topSiegeDamageAmountinGame;
int[libCore_gv_bALMaxTeams + 1] lv_topSiegeDamagerPerTeam;
fixed[libCore_gv_bALMaxTeams + 1] lv_topSiegeDamageAmountPerTeam;
int lv_topDamageTakerinGame;
fixed lv_topDamageTakenAmountinGame;
int[libCore_gv_bALMaxTeams + 1] lv_topDamageTakerPerTeam;
fixed[libCore_gv_bALMaxTeams + 1] lv_topDamageTakenAmountPerTeam;
int lv_topXPContributorinGame;
fixed lv_topXPContributionAmountinGame;
int[libCore_gv_bALMaxTeams + 1] lv_topXPContributorPerTeam;
fixed[libCore_gv_bALMaxTeams + 1] lv_topXPContribution;
int lv_topHealerinGame;
fixed lv_topHealAmount;
int[libCore_gv_bALMaxTeams + 1] lv_topHealerPerTeam;
fixed[libCore_gv_bALMaxTeams + 1] lv_topHealAmountPerTeam;
int lv_windowValueIterator;
// Automatic Variable Declarations
int autoD7ED01DE_ae;
int autoFA67E37C_ae;
int autoA40BB189_ae;
int autoAB51E714_ae;
int auto447C5FEC_ae;
int autoAF02910D_ae;
// Variable Initialization
lv_gameLength = TimerGetElapsed(libGame_gv_gameTimer);
// Implementation
autoD7ED01DE_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= autoD7ED01DE_ae ; lv_iterator += 1 ) {
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team = libGame_gf_TeamNumberOfPlayer(lv_iterator);
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_role = libGame_gv_players[lv_iterator].lv_heroData.lv_expandedRole;
libNtve_gf_AddPlayerGroupToPlayerGroup(libGame_gv_players[lv_iterator].lv_heroData.lv_heroRoles, libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mvpRoles);
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team = libGame_gf_TeamNumberOfPlayer(lv_iterator);
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_enemyTeam = libGame_gf_EnemyTeamNumberOfPlayer(lv_iterator);
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_heroName = UnitTypeGetName(UnitGetType(libGame_gv_players[lv_iterator].lv_heroUnit));
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_unitType = UnitGetType(libGame_gv_players[lv_iterator].lv_heroUnit);
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_heroDamageDone = PlayerScoreValueGetAsFixed(lv_iterator, "HeroDamageDone6Min");
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_siegeDamageDone = PlayerScoreValueGetAsFixed(lv_iterator, "SiegeDamage6Min");
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_damageTaken = PlayerScoreValueGetAsFixed(lv_iterator, "DamageTaken6Min");
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_deaths = PlayerScoreValueGetAsFixed(lv_iterator, "Deaths6Min");
libGame_gv_mVPStats[lv_iterator].lv_deaths = libGame_gv_scoreValues[lv_iterator].lv_deaths;
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_xPContribution = PlayerScoreValueGetAsFixed(lv_iterator, "XPContribution6MinDelta");
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_healAmount = PlayerScoreValueGetAsFixed(lv_iterator, "HealingAmountDone6Min");
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_kills = PlayerScoreValueGetAsFixed(lv_iterator, "Kills6MinDelta");
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_assists = PlayerScoreValueGetAsFixed(lv_iterator, "Assists6Min");
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_timeSpentDead = PlayerScoreValueGetAsFixed(lv_iterator, "TimeSpentDead6Min");
if ((libGame_gv_onFireRollingWindowSums[lv_iterator].lv_heroDamageDone > lv_topHeroDamageAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team])) {
lv_topHeroDamageAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] = libGame_gv_onFireRollingWindowSums[lv_iterator].lv_heroDamageDone;
lv_topHeroDamagerPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] = lv_iterator;
}
if ((libGame_gv_onFireRollingWindowSums[lv_iterator].lv_siegeDamageDone > lv_topSiegeDamageAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team])) {
lv_topSiegeDamageAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] = libGame_gv_onFireRollingWindowSums[lv_iterator].lv_siegeDamageDone;
lv_topSiegeDamagerPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] = lv_iterator;
}
if ((libGame_gv_onFireRollingWindowSums[lv_iterator].lv_damageTaken > lv_topDamageTakenAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team])) {
lv_topDamageTakenAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] = libGame_gv_onFireRollingWindowSums[lv_iterator].lv_damageTaken;
lv_topDamageTakerPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] = lv_iterator;
}
if ((libGame_gv_onFireRollingWindowSums[lv_iterator].lv_xPContribution > lv_topXPContribution[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team])) {
lv_topXPContribution[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] = libGame_gv_onFireRollingWindowSums[lv_iterator].lv_xPContribution;
lv_topXPContributorPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] = lv_iterator;
}
if ((libGame_gv_onFireRollingWindowSums[lv_iterator].lv_healAmount > lv_topHealAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team])) {
lv_topHealAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] = libGame_gv_onFireRollingWindowSums[lv_iterator].lv_healAmount;
lv_topHealerPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] = lv_iterator;
}
}
autoFA67E37C_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= autoFA67E37C_ae ; lv_iterator += 1 ) {
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore = 0.0;
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_offenseScore = 0.0;
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_defenseScore = 0.0;
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_utilityScore = 0.0;
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore += (libGame_gv_onFireRollingWindowSums[lv_iterator].lv_kills * libGame_gf_GetMVPAwardAmount(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_unitType, libGame_ge_MVPAwards_Kill));
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore += (libGame_gv_onFireRollingWindowSums[lv_iterator].lv_assists * libGame_gf_GetMVPAwardAmount(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_unitType, libGame_ge_MVPAwards_Assist));
lv_takedowns = (libGame_gv_onFireRollingWindowSums[lv_iterator].lv_kills + libGame_gv_onFireRollingWindowSums[lv_iterator].lv_assists);
if ((lv_gameLength > 0.0)) {
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore += (((libGame_gv_onFireRollingWindowSums[lv_iterator].lv_timeSpentDead / lv_gameLength) * 100.0) * libGame_gf_GetMVPAwardAmount(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TimeSpentDead));
}
else {
TriggerDebugOutput(8, (StringToText("")), false);
}
if ((lv_topHeroDamagerPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] == lv_iterator)) {
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopHeroDamageonTeam);
if ((lv_topHeroDamageAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] > lv_topHeroDamageAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_enemyTeam])) {
lv_topHeroDamagerinGame = lv_iterator;
lv_topHeroDamageAmountinGame = lv_topHeroDamageAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team];
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopHeroDamage);
}
}
if ((lv_topSiegeDamagerPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] == lv_iterator)) {
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopSiegeDamageonTeam);
if ((lv_topSiegeDamageAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] > lv_topSiegeDamageAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_enemyTeam])) {
lv_topSiegeDamagerinGame = lv_iterator;
lv_topSiegeDamageAmountinGame = lv_topSiegeDamageAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team];
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopSiegeDamage);
}
}
if ((lv_topDamageTakerPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] == lv_iterator) && ((PlayerGroupHasPlayer(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mvpRoles, (c_expandedRoleTank)) == true) || (PlayerGroupHasPlayer(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mvpRoles, (c_expandedRoleBruiser)) == true))) {
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopDamageTakenasWarrioronTeam);
if ((lv_topDamageTakenAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] > lv_topDamageTakenAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_enemyTeam])) {
lv_topDamageTakerinGame = lv_iterator;
lv_topDamageTakenAmountinGame = lv_topDamageTakenAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team];
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopDamageTakenasWarrior);
}
}
if ((lv_topHealerPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team] == lv_iterator)) {
if ((lv_topHealAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] >= lv_topHealAmountPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_enemyTeam])) {
lv_topHealerinGame = lv_iterator;
lv_topHealAmount = lv_topHealAmountPerTeam[libGame_gv_mVPStats[lv_iterator].lv_team];
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopHealing);
}
}
if ((lv_topXPContributorPerTeam[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] == lv_iterator)) {
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore += libGame_gf_GetMVPAwardAmount(libGame_gv_onFireRollingWindowSums[lv_iterator].lv_unitType, libGame_ge_MVPAwards_TopXPContributoronTeam);
if ((lv_topXPContribution[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team] >= lv_topXPContribution[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_enemyTeam])) {
lv_topXPContributorinGame = lv_iterator;
lv_topXPContributionAmountinGame = lv_topXPContribution[libGame_gv_onFireRollingWindowSums[lv_iterator].lv_team];
}
}
libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore *= libGame_gv_onFireDeathPenalty[lv_iterator];
}
autoA40BB189_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= autoA40BB189_ae ; lv_iterator += 1 ) {
if ((libGame_gv_onFireRollingWindowSums[lv_iterator].lv_kills > 1)) {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_Kills, true);
}
else {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_Kills, false);
}
if ((libGame_gv_onFireRollingWindowSums[lv_iterator].lv_assists > 1)) {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_Assists, true);
}
else {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_Assists, false);
}
if ((lv_topSiegeDamagerPerTeam[libGame_gf_TeamNumberOfPlayer(lv_iterator)] == lv_iterator)) {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_SiegeDamage, true);
}
else {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_SiegeDamage, false);
}
if ((lv_topHealerPerTeam[libGame_gf_TeamNumberOfPlayer(lv_iterator)] == lv_iterator)) {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_Healing, true);
}
else {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_Healing, false);
}
if ((lv_topDamageTakerPerTeam[libGame_gf_TeamNumberOfPlayer(lv_iterator)] == lv_iterator)) {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_DamageTaken, true);
}
else {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_DamageTaken, false);
}
if ((lv_topHeroDamagerPerTeam[libGame_gf_TeamNumberOfPlayer(lv_iterator)] == lv_iterator)) {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_HeroDamage, true);
}
else {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_HeroDamage, false);
}
if ((lv_topXPContributorPerTeam[libGame_gf_TeamNumberOfPlayer(lv_iterator)] == lv_iterator)) {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_Experience, true);
}
else {
libGame_gf_UpdateOnFireScoreHighlightBooleans(lv_iterator, libGame_ge_OnFireScoreValues_Experience, false);
}
}
if ((libGame_gv_onFireFirstCalculationDone == true)) {
autoAB51E714_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= autoAB51E714_ae ; lv_iterator += 1 ) {
auto447C5FEC_ae = libCore_gv_bALMaxPlayers;
lv_secondaryIterator = 1;
for ( ; lv_secondaryIterator <= auto447C5FEC_ae ; lv_secondaryIterator += 1 ) {
if ((lv_iterator == libGame_gv_onFireScores[lv_secondaryIterator].lv_player)) {
libGame_gv_onFireScores[lv_secondaryIterator].lv_score = libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore;
}
}
}
}
if ((libGame_gv_onFireFirstCalculationDone == false)) {
autoAF02910D_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= autoAF02910D_ae ; lv_iterator += 1 ) {
libGame_gv_onFireScores[lv_iterator].lv_player = lv_iterator;
libGame_gv_onFireScores[lv_iterator].lv_score = libGame_gv_onFireRollingWindowSums[lv_iterator].lv_mVPScore;
}
libGame_gv_onFireFirstCalculationDone = true;
}
libGame_gf_SortOnFireRanks();
libGame_gf_SendOnFireEvents();
}
void libGame_gf_SortOnFireRanks () {
// Variable Declarations
int lv_tiebreaker;
int lv_iterator;
fixed lv_mVPScoreToBeat;
int lv_playerToHighlight;
bool lv_playerFound;
fixed lv_scoretoMove;
int lv_playertoMove;
int lv_leveltoMove;
int lv_typetoMove;
bool lv_reSort;
// Automatic Variable Declarations
int autoEF5C5561_ae;
// Variable Initialization
// Implementation
autoEF5C5561_ae = (libCore_gv_bALMaxPlayers - 1);
lv_iterator = 1;
for ( ; lv_iterator <= autoEF5C5561_ae ; lv_iterator += 1 ) {
if ((libGame_gv_onFireScores[lv_iterator].lv_score < libGame_gv_onFireScores[(lv_iterator + 1)].lv_score)) {
lv_reSort = true;
lv_scoretoMove = libGame_gv_onFireScores[lv_iterator].lv_score;
lv_playertoMove = libGame_gv_onFireScores[lv_iterator].lv_player;
lv_leveltoMove = (libGame_gv_onFireScores[lv_iterator].lv_fireLevel);
libGame_gv_onFireScores[lv_iterator].lv_score = libGame_gv_onFireScores[(lv_iterator + 1)].lv_score;
libGame_gv_onFireScores[lv_iterator].lv_player = libGame_gv_onFireScores[(lv_iterator + 1)].lv_player;
libGame_gv_onFireScores[lv_iterator].lv_fireLevel = libGame_gv_onFireScores[(lv_iterator + 1)].lv_fireLevel;
libGame_gv_onFireScores[(lv_iterator + 1)].lv_score = lv_scoretoMove;
libGame_gv_onFireScores[(lv_iterator + 1)].lv_player = lv_playertoMove;
libGame_gv_onFireScores[(lv_iterator + 1)].lv_fireLevel = lv_leveltoMove;
}
}
if ((lv_reSort == true)) {
libGame_gf_SortOnFireRanks();
}
}
void libGame_gf_SendOnFireEvents () {
// Variable Declarations
int lv_iterator;
fixed lv_averageScore;
// Automatic Variable Declarations
int auto5C0517C0_ae;
int auto0A42C1BF_ae;
// Variable Initialization
// Implementation
auto5C0517C0_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= auto5C0517C0_ae ; lv_iterator += 1 ) {
lv_averageScore += libGame_gv_onFireScores[lv_iterator].lv_score;
}
lv_averageScore /= libCore_gv_bALMaxPlayers;
auto0A42C1BF_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= auto0A42C1BF_ae ; lv_iterator += 1 ) {
if ((lv_iterator <= libGame_gv_onFireAllowedCount) && (libGame_gv_onFireScores[lv_iterator].lv_score > libGame_gv_onFireScoreThresholdBeforeFire)) {
if ((libGame_gv_onFireScores[lv_iterator].lv_score > libGame_gv_onFireScores[(lv_iterator + 1)].lv_score)) {
if ((lv_iterator == 1) && (libGame_gv_onFireScores[lv_iterator].lv_fireLevel != libGame_ge_OnFireLevel_Inferno) && ((libGame_gv_onFireScores[lv_iterator].lv_score - lv_averageScore) >= libGame_gv_onFireInfernoDistance)) {
if ((libGame_gv_onFirePrintingEnabled == true)) {
TimerPause(libGame_gv_onFireTimer[libGame_gv_onFireScores[lv_iterator].lv_player], false);
libUIUI_gf_UIOnFireSetOnFireLevel(libGame_ge_OnFireLevel_Inferno, libGame_gv_onFireScores[lv_iterator].lv_player);
libUIUI_gf_UIOnFireSetOnFireType(libGame_ge_OnFireType_Offense, libGame_gv_onFireScores[lv_iterator].lv_player);
}
libGame_gv_onFireScores[lv_iterator].lv_fireLevel = libGame_ge_OnFireLevel_Inferno;
}
else {
if (((libGame_gv_onFireScores[lv_iterator].lv_score - lv_averageScore) < libGame_gv_onFireInfernoDistance) && (libGame_gv_onFireScores[lv_iterator].lv_fireLevel != libGame_ge_OnFireLevel_Embers)) {
if ((libGame_gv_onFirePrintingEnabled == true)) {
TimerPause(libGame_gv_onFireTimer[libGame_gv_onFireScores[lv_iterator].lv_player], false);
libUIUI_gf_UIOnFireSetOnFireLevel(libGame_ge_OnFireLevel_Embers, libGame_gv_onFireScores[lv_iterator].lv_player);
libUIUI_gf_UIOnFireSetOnFireType(libGame_ge_OnFireType_Offense, libGame_gv_onFireScores[lv_iterator].lv_player);
}
libGame_gv_onFireScores[lv_iterator].lv_fireLevel = libGame_ge_OnFireLevel_Embers;
}
}
}
}
else {
if ((libGame_gv_onFireScores[lv_iterator].lv_fireLevel != 0)) {
if ((libGame_gv_onFirePrintingEnabled == true)) {
TimerPause(libGame_gv_onFireTimer[libGame_gv_onFireScores[lv_iterator].lv_player], true);
libUIUI_gf_UIOnFireSetOnFireLevel(libGame_ge_OnFireLevel_Extinguished, libGame_gv_onFireScores[lv_iterator].lv_player);
libUIUI_gf_UIOnFireSetOnFireType(libGame_ge_OnFireType_Offense, libGame_gv_onFireScores[lv_iterator].lv_player);
}
libGame_gv_onFireScores[lv_iterator].lv_fireLevel = libGame_ge_OnFireLevel_Subfor0;
}
}
}
libUIUI_gf_UIOnFireSetOnFireScoreValueHighlights();
}
void libGame_gf_UpdateOnFireScore () {
// Automatic Variable Declarations
// Implementation
while (true) {
Wait(libGame_gv_onFireWindowTimeBetweenRecounts, c_timeGame);
if ((libGame_gv_onFireEnabled == true)) {
libGame_gf_CalculateOnFireScore();
}
}
}
void libGame_gf_OnFireDeathMultiplier (int lp_deadHeroPlayer) {
// Variable Declarations
int lv_deadHero;
// Automatic Variable Declarations
// Variable Initialization
lv_deadHero = libGame_gf_HeroKilledPlayer();
// Implementation
if ((libGame_gv_onFireDeathPenaltyInProgress[lv_deadHero] == true)) {
libGame_gv_onFireDeathPenalty[lv_deadHero] = 0.0;
}
if ((libGame_gv_onFireDeathPenaltyInProgress[lv_deadHero] == false)) {
libGame_gv_onFireDeathPenalty[lv_deadHero] = 0.0;
libGame_gv_onFireDeathPenaltyInProgress[lv_deadHero] = true;
while ((libGame_gv_onFireDeathPenalty[lv_deadHero] < 1.0)) {
libGame_gv_onFireDeathPenalty[lv_deadHero] += (1.0 / libGame_gv_onFireScoreDeathPenaltyPeriodinSeconds);
Wait(1.0, c_timeGame);
}
libGame_gv_onFireDeathPenalty[lv_deadHero] = 1.0;
libGame_gv_onFireDeathPenaltyInProgress[lv_deadHero] = false;
}
}
void libGame_gf_TurnOnOffInitialHeroSpawnFX (bool lp_onOff) {
// Automatic Variable Declarations
bool autoCBB45CBF_val;
// Implementation
autoCBB45CBF_val = lp_onOff;
if (autoCBB45CBF_val == true) {
libGame_gv_suppressInitialHeroSpawnFX = false;
}
else if (autoCBB45CBF_val == false) {
libGame_gv_suppressInitialHeroSpawnFX = true;
}
else {
libGame_gv_suppressInitialHeroSpawnFX = false;
}
}
int libGame_gf_EnemyTeam (int lp_team) {
// Automatic Variable Declarations
// Implementation
if ((libGame_gf_TeamNumberIsValid(lp_team) == false)) {
TextExpressionSetToken("Param/Expression/lib_Game_9AD807BA", "A", IntToText(lp_team));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_9AD807BA"), true);
return 0;
}
return (3 - lp_team);
}
color libGame_gf_TeamColor (int lp_team) {
// Automatic Variable Declarations
// Implementation
return libNtve_gf_ConvertPlayerColorToColor(PlayerGetColorIndex(libGame_gf_ComputerPlayerInTeam(lp_team), false));
}
playergroup libGame_gf_AlliedPlayerGroupOfPlayer (int lp_player) {
// Variable Declarations
int lv_team;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if (((lp_player < 0) || (lp_player > libCore_gv_bALMaxEnginePlayerCount))) {
return PlayerGroupEmpty();
}
lv_team = libGame_gf_TeamNumberOfPlayer(lp_player);
if ((libGame_gf_TeamNumberIsValid(lv_team) == false)) {
return PlayerGroupEmpty();
}
return libGame_gf_PlayersOnTeamHeroes(lv_team, true);
}
playergroup libGame_gf_EnemyPlayerGroupOfPlayer (int lp_player) {
// Variable Declarations
int lv_team;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if (((lp_player < 0) || (lp_player > libCore_gv_bALMaxEnginePlayerCount))) {
return PlayerGroupEmpty();
}
lv_team = libGame_gf_TeamNumberOfPlayer(lp_player);
if ((libGame_gf_TeamNumberIsValid(lv_team) == false)) {
return PlayerGroupEmpty();
}
return libGame_gf_PlayersOnTeamHeroes(libGame_gf_EnemyTeam(lv_team), false);
}
int libGame_gf_TeamNumberOfPlayer (int lp_player) {
// Automatic Variable Declarations
// Implementation
if ((lp_player > 0) && (lp_player <= libCore_gv_cOMPUTER_NoVision_TeamChaos)) {
return libGame_gf_TeamNumberOfFaction(libGame_gv_players[lp_player].lv_faction);
}
return 0;
}
int libGame_gf_TeamNumberOfFaction (int lp_faction) {
// Automatic Variable Declarations
// Implementation
if ((lp_faction == libGame_ge_Faction_Order)) {
return libGame_gv_teamOrderIndex_C;
}
if ((lp_faction == libGame_ge_Faction_Chaos)) {
return libGame_gv_teamChaosIndex_C;
}
TextExpressionSetToken("Param/Expression/lib_Game_875E6F64", "A", IntToText((lp_faction)));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_875E6F64"), true);
return 0;
}
bool libGame_gf_TeamNumberIsValid (int lp_team) {
// Automatic Variable Declarations
// Implementation
return ((lp_team == libGame_gv_teamOrderIndex_C) || (lp_team == libGame_gv_teamChaosIndex_C));
}
int libGame_gf_EnemyTeamNumberOfPlayer (int lp_player) {
// Variable Declarations
int lv_team;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_team = libGame_gf_TeamNumberOfPlayer(lp_player);
if ((libGame_gf_TeamNumberIsValid(lv_team) == true)) {
return libGame_gf_EnemyTeam(lv_team);
}
else {
return 0;
}
}
int libGame_gf_ComputerPlayerInTeam (int lp_team) {
// Automatic Variable Declarations
int autoBA7B6EDB_val;
// Implementation
autoBA7B6EDB_val = lp_team;
if (autoBA7B6EDB_val == 1) {
return libCore_gv_cOMPUTER_TeamOrder;
}
else if (autoBA7B6EDB_val == 2) {
return libCore_gv_cOMPUTER_TeamChaos;
}
else {
}
return 0;
}
int libGame_gf_ComputerPlayerInFaction (int lp_faction) {
// Automatic Variable Declarations
int autoC49E022D_val;
// Implementation
autoC49E022D_val = lp_faction;
if (autoC49E022D_val == libGame_ge_Faction_Order) {
return libCore_gv_cOMPUTER_TeamOrder;
}
else if (autoC49E022D_val == libGame_ge_Faction_Chaos) {
return libCore_gv_cOMPUTER_TeamChaos;
}
else if (autoC49E022D_val == libGame_ge_Faction_Neutral) {
return libCore_gv_cOMPUTER_Neutral;
}
else if (autoC49E022D_val == libGame_ge_Faction_HostileCreeps) {
return libCore_gv_cOMPUTER_Hostile;
}
else {
}
return libCore_gv_cOMPUTER_Neutral;
}
int libGame_gf_PlayersAliveOnTeam (int lp_team) {
// Variable Declarations
int lv_itPlayer;
int lv_count;
// Automatic Variable Declarations
playergroup autoF6F1B708_g;
// Variable Initialization
// Implementation
autoF6F1B708_g = libGame_gf_PlayersOnTeamHeroes(lp_team, false);
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoF6F1B708_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((libGame_gv_players[lv_itPlayer].lv_isDead == false)) {
lv_count += 1;
}
}
return lv_count;
}
int libGame_gf_GetPlayerNumberFromRosterSlot (int lp_rosterSlot) {
// Variable Declarations
int lv_i;
// Automatic Variable Declarations
const int autoC6542F8A_ae = libCore_gv_bALMaxPlayers;
const int autoC6542F8A_ai = 1;
// Variable Initialization
// Implementation
lv_i = 1;
for ( ; ( (autoC6542F8A_ai >= 0 && lv_i <= autoC6542F8A_ae) || (autoC6542F8A_ai < 0 && lv_i >= autoC6542F8A_ae) ) ; lv_i += autoC6542F8A_ai ) {
if ((libGame_gv_players[lv_i].lv_rosterSlot == lp_rosterSlot)) {
return lv_i;
}
}
return 0;
}
bool libGame_gf_UnitIsHero (unit lp_testUnit) {
// Variable Declarations
int lv_ownerPlayer;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_ownerPlayer = UnitGetOwner(lp_testUnit);
if (((lv_ownerPlayer < 1) || (lv_ownerPlayer > libCore_gv_bALMaxPlayers))) {
return false;
}
if ((UnitFilterMatch(lp_testUnit, lv_ownerPlayer, libCore_gv_filtersHeroicjustexcludingMissile) == true) && ((lp_testUnit == libGame_gv_players[lv_ownerPlayer].lv_heroUnit) || (lp_testUnit == libGame_gv_players[lv_ownerPlayer].lv_activeVehicle))) {
return true;
}
if ((UnitGroupHasUnit(libGame_gv_players[lv_ownerPlayer].lv_heroUnitGroup, lp_testUnit) == true)) {
return true;
}
return false;
}
int libGame_gf_GetCustomValueLevelofHeroUnit (unit lp_heroUnit) {
// Automatic Variable Declarations
// Implementation
return FixedToInt(UnitGetCustomValue(lp_heroUnit, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_HeroLevelIndex)));
}
int libGame_gf_GetCurrentTalentTierforPlayer (int lp_playerIndex) {
// Variable Declarations
int lv_talentTierIndex;
int lv_currentTalentTier;
int lv_playerLevel;
// Automatic Variable Declarations
const int auto43232170_ae = libCore_gv_talents_MaxTiers_C;
const int auto43232170_ai = 1;
// Variable Initialization
// Implementation
lv_playerLevel = UnitLevel(libGame_gv_players[lp_playerIndex].lv_heroUnit);
lv_talentTierIndex = 1;
lv_talentTierIndex = 1;
for ( ; ( (auto43232170_ai >= 0 && lv_talentTierIndex <= auto43232170_ae) || (auto43232170_ai < 0 && lv_talentTierIndex >= auto43232170_ae) ) ; lv_talentTierIndex += auto43232170_ai ) {
if ((lv_playerLevel >= libGame_gv_players[lp_playerIndex].lv_talents_TierLevels[lv_talentTierIndex].lv_level) && (GetTalentTierEnabled(lv_talentTierIndex) == true)) {
lv_currentTalentTier = lv_talentTierIndex;
}
else {
break;
}
}
return lv_currentTalentTier;
}
void libGame_gf_InitializePlayer (int lp_player, int lp_team) {
// Variable Declarations
int lv_numberOfPlayersOnTeam;
int lv_slot;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
libGame_gv_players[lp_player].lv_faction = lp_team;
if ((lp_team == libGame_ge_Faction_Order)) {
PlayerGroupAdd(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, lp_player);
lv_numberOfPlayersOnTeam = PlayerGroupCount(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup);
lv_slot = (lv_numberOfPlayersOnTeam + 0);
libGame_gv_players[lp_player].lv_spawnPoint = PlayerStartLocation(lv_slot);
}
if ((lp_team == libGame_ge_Faction_Chaos)) {
PlayerGroupAdd(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, lp_player);
lv_numberOfPlayersOnTeam = PlayerGroupCount(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup);
lv_slot = (lv_numberOfPlayersOnTeam + 5);
libGame_gv_players[lp_player].lv_spawnPoint = PlayerStartLocation(lv_slot);
}
libGame_gv_players[lp_player].lv_rosterSlot = lv_slot;
libGame_gv_players[lp_player].lv_teamPlayerSlot = lv_numberOfPlayersOnTeam;
if ((PlayerStatus(lp_player) == c_playerStatusActive) && (PlayerType(lp_player) != c_playerTypeComputer)) {
libGame_gv_players[lp_player].lv_playerStatus = libGame_ge_PlayerStatusStorm_ChoosingaHero;
CameraPan(lp_player, libGame_gv_players[lp_player].lv_spawnPoint, 0.0, -1, 0.0, false);
CameraLockInput(lp_player, true);
libNtve_gf_SetAllSoundChannelVolumes(libNtve_ge_VolumeChannelMode_Game, libCore_gv_playerGroupFromPlayer[lp_player], 0.0);
PlayerGroupAdd(libCore_gv_activeHumanPlayers, lp_player);
}
libGame_gv_players[lp_player].lv_name = PlayerName(lp_player);
PlayerSetState(lp_player, c_playerStateDisplayGameResult, false);
}
void libGame_gf_GrantXPToPlayer (fixed lp_incomingXP, int lp_player, int lp_source) {
// Variable Declarations
fixed lv_xP;
unit lv_heroUnit;
int lv_playerLevel;
fixed lv_totalXPForNextLevel;
fixed lv_totalXPForCurrentLevel;
fixed lv_currentXPForPlayer;
fixed lv_fractionalLevelValue;
fixed lv_xPDifference;
// Automatic Variable Declarations
int autoDF74543F_val;
int auto993D99AD_val;
// Variable Initialization
lv_xP = lp_incomingXP;
// Implementation
lv_heroUnit = libGame_gv_players[lp_player].lv_heroUnit;
if ((UnitIsValid(lv_heroUnit) == false)) {
return ;
}
if ((libCore_gv_dEBUGDebuggingEnabled == true)) {
autoDF74543F_val = lp_source;
if (autoDF74543F_val == libGame_ge_XPSources_Hero) {
if ((libSprt_gv_dEBUGXPSourceHero == false)) {
return ;
}
}
else if (autoDF74543F_val == libGame_ge_XPSources_Minion) {
if ((libSprt_gv_dEBUGXPSourceMinion == false)) {
return ;
}
}
else if (autoDF74543F_val == libGame_ge_XPSources_Structure) {
if ((libSprt_gv_dEBUGXPSourceStructure == false)) {
return ;
}
}
else if (autoDF74543F_val == libGame_ge_XPSources_Creep) {
if ((libSprt_gv_dEBUGXPSourceCreep == false)) {
return ;
}
}
else {
}
}
if ((libCore_gv_dEBUGDebuggingEnabled == true) && (libSprt_gv_dEBUGXPBoostEnable == true)) {
if ((libGame_gf_TeamNumberOfPlayer(lp_player) == libSprt_gv_dEBUGXPBoostTeam)) {
lv_xP = (lv_xP * libSprt_gv_dEBUGXPBoostMultiplier);
}
}
if ((libCore_gv_dEBUGDebuggingEnabled == true) && (libSprt_gv_dEBUGXPPassiveBalancerEnable == true)) {
if ((libGame_gf_TeamNumberOfPlayer(lp_player) == libSprt_gv_dEBUGXPPassiveBoostTeam)) {
lv_xP = (lv_xP * libSprt_gv_dEBUGXPPassiveBoostMultiplier);
}
}
UnitXPAddXP(lv_heroUnit, null, lv_xP);
auto993D99AD_val = lp_source;
if (auto993D99AD_val == libGame_ge_XPSources_Creep) {
libGame_gv_players[lp_player].lv_xPRecievedFromCreeps += lv_xP;
}
else if (auto993D99AD_val == libGame_ge_XPSources_Hero) {
libGame_gv_players[lp_player].lv_xPRecievedFromHeroes += lv_xP;
}
else if (auto993D99AD_val == libGame_ge_XPSources_Minion) {
libGame_gv_players[lp_player].lv_xPRecievedFromMinions += lv_xP;
}
else if (auto993D99AD_val == libGame_ge_XPSources_Structure) {
libGame_gv_players[lp_player].lv_xPRecievedFromStructures += lv_xP;
}
else if (auto993D99AD_val == libGame_ge_XPSources_Trickle) {
libGame_gv_players[lp_player].lv_xPRecievedFromTrickle += lv_xP;
}
else if (auto993D99AD_val == libGame_ge_XPSources_RegenGlobe) {
libGame_gv_players[lp_player].lv_xPRecievedFromRegenGlobe += lv_xP;
}
else {
}
lv_playerLevel = libGame_gv_scoreValues[lp_player].lv_level;
if ((lv_playerLevel == libCore_gv_bALMaxLevel)) {
lv_fractionalLevelValue = lv_playerLevel;
}
else {
lv_totalXPForNextLevel = libCore_gf_GetTotalXPForLevel((lv_playerLevel + 1));
lv_totalXPForCurrentLevel = libCore_gf_GetTotalXPForLevel(lv_playerLevel);
lv_currentXPForPlayer = UnitGetPropertyFixed(lv_heroUnit, c_unitPropXP, c_unitPropCurrent);
lv_xPDifference = (lv_totalXPForNextLevel - lv_totalXPForCurrentLevel);
if ((lv_xPDifference > 0.0)) {
lv_fractionalLevelValue = (lv_playerLevel + (lv_currentXPForPlayer - lv_totalXPForCurrentLevel) / lv_xPDifference);
libGame_gf_ScoreValuesReportRealValueAndLog(lp_player, "FractionalTeamLevel", lv_fractionalLevelValue);
}
}
}
trigger auto_libGame_gf_LevelUpHero_Trigger = null;
unit auto_libGame_gf_LevelUpHero_lp_hero;
void libGame_gf_LevelUpHero (unit lp_hero) {
auto_libGame_gf_LevelUpHero_lp_hero = lp_hero;
if (auto_libGame_gf_LevelUpHero_Trigger == null) {
auto_libGame_gf_LevelUpHero_Trigger = TriggerCreate("auto_libGame_gf_LevelUpHero_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_LevelUpHero_Trigger, false, false);
}
bool auto_libGame_gf_LevelUpHero_TriggerFunc (bool testConds, bool runActions) {
unit lp_hero = auto_libGame_gf_LevelUpHero_lp_hero;
// Variable Declarations
int lv_itTalentTier;
int lv_player;
int lv_level;
int lv_heroIndex;
int lv_team;
unit lv_itUnit;
// Automatic Variable Declarations
int autoDDBD77DD_val;
const int autoE654A081_ae = libCore_gv_talents_MaxTiers_C;
const int autoE654A081_ai = 1;
unitgroup auto0D9AE8AF_g;
int auto0D9AE8AF_u;
const int auto50611CD3_ae = libCore_gv_talents_MaxTiers_C;
const int auto50611CD3_ai = 1;
// Variable Initialization
// Implementation
UnitSetCustomValue(lp_hero, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_HeroLevelIndex), (libGame_gf_GetCustomValueLevelofHeroUnit(lp_hero) + 1));
lv_player = UnitGetOwner(lp_hero);
if ((lv_player > libCore_gv_bALMaxEnginePlayerCount)) {
return true;
}
lv_level = libGame_gf_GetCustomValueLevelofHeroUnit(lp_hero);
lv_heroIndex = libGame_gv_players[lv_player].lv_heroIndex;
lv_team = libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lp_hero));
libAIAI_gf_AITeamDelegateUpdateTeamLevelDifference(lv_player, lv_level);
libGame_gv_teams[lv_team].lv_teamLevel = MaxI(libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lv_player)].lv_teamLevel, lv_level);
libGame_gv_scoreValues[lv_player].lv_level = lv_level;
if ((libSond_gf_SoundtrackIsIntroPlaying() == false) && (libCore_gv_sYSGameMode != libCore_ge_GameModes_ArenaMode) && (libCore_gv_sYSGameMode != libCore_ge_GameModes_AttackDefend)) {
autoDDBD77DD_val = libGame_gv_teams[lv_team].lv_teamLevel;
if (autoDDBD77DD_val == 10) {
libSond_gf_SoundtrackUpdateMapSoundtrackIndex();
}
else if (autoDDBD77DD_val == 20) {
libSond_gf_SoundtrackUpdateMapSoundtrackIndex();
}
else {
}
}
libUIUI_gf_UIPartyFrameTeamLevelUpdate(lv_team, lv_level);
libGame_gf_ApplyLevelUpHeroStatsForHeroSingleLevel(lp_hero);
lv_itTalentTier = 1;
for ( ; ( (autoE654A081_ai >= 0 && lv_itTalentTier <= autoE654A081_ae) || (autoE654A081_ai < 0 && lv_itTalentTier >= autoE654A081_ae) ) ; lv_itTalentTier += autoE654A081_ai ) {
if (((lv_level == 1) || (lv_level == (libGame_gv_players[lv_player].lv_talents_TierLevels[lv_itTalentTier].lv_level - 1)))) {
libGame_gf_PreloadTalentModelAssets(lv_player, lv_itTalentTier);
break;
}
}
if ((libCore_gv_sYSTalentsOn == true)) {
SetTalentTreeHeroLevel(lv_player, lv_level);
libGame_gf_TalentsUpdateChoicePanelForPlayer(lv_player);
if ((libCore_gv_tUTTalentsAutobuyOn == true) && (libGame_gv_talents_ActiveChoiceTierForPlayer[lv_player] != 0) && (libGame_gv_talents_TalentChoices[lv_player][libGame_gv_talents_ActiveChoiceTierForPlayer[lv_player]].lv_selection == 0)) {
if ((libGame_gv_players[lv_player].lv_talents_TierLevels[libGame_gv_talents_ActiveChoiceTierForPlayer[lv_player]].lv_tierType == libCore_ge_TalentTierType_HeroicAbility)) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[lv_player], libGame_ge_AnnouncementPriorities_Critical, libCore_ge_AnnouncerVOEvents_Null, "ShowTutorialNotification", StringExternal("Param/Value/lib_Game_8CBC2F41"), StringExternal("Param/Value/lib_Game_E4ADA4DB"), null, null, null, libGame_gv_announcement_StandardTimerDuration_C, false);
}
libGame_gf_TalentsChooseTalentForPlayer(libGame_gv_talents_ActiveChoiceTierForPlayer[lv_player], 1, lv_player);
}
}
StatEventCreate("LevelUp");
StatEventAddDataInt(StatEventLastCreated(), "PlayerID", lv_player);
StatEventAddDataInt(StatEventLastCreated(), "Level", lv_level);
StatEventSend(StatEventLastCreated());
libGame_gf_SendEventHeroLevelUp(lv_player, lv_level);
if ((libGame_gv_players[lv_player].lv_suppressLevelUpFXAndTeamXPTracking == false) && (libGame_gv_players[lv_player].lv_suppressLevelUpFXAndSounds == false) && (UnitLevel(lp_hero) > 1)) {
auto0D9AE8AF_g = libGame_gv_players[lv_player].lv_heroUnitGroup;
auto0D9AE8AF_u = UnitGroupCount(auto0D9AE8AF_g, c_unitCountAll);
for (;; auto0D9AE8AF_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(auto0D9AE8AF_g, auto0D9AE8AF_u);
if (lv_itUnit == null) { break; }
libNtve_gf_SendActorMessageToUnit(lv_itUnit, "Signal LevelUp");
SoundPlayOnUnit(SoundLink("UI_Game_LevelUp_Team", -1), PlayerGroupSingle(lv_player), lv_itUnit, 8.0, 100.0, 0.0);
SoundPlayOnUnit(SoundLink("UI_Game_LevelUp_Enemy", -1), PlayerGroupAlliance(c_playerGroupEnemy, lv_player), lv_itUnit, 8.0, 100.0, 0.0);
}
lv_itTalentTier = 1;
for ( ; ( (auto50611CD3_ai >= 0 && lv_itTalentTier <= auto50611CD3_ae) || (auto50611CD3_ai < 0 && lv_itTalentTier >= auto50611CD3_ae) ) ; lv_itTalentTier += auto50611CD3_ai ) {
if ((libCore_gv_tUTTalentsAutobuyOn == false) && (lv_level == libGame_gv_players[lv_player].lv_talents_TierLevels[lv_itTalentTier].lv_level)) {
SoundPlayOnUnit(SoundLink("UI_Game_LevelUp_Talent", -1), PlayerGroupSingle(lv_player), lp_hero, 8.0, 100.0, 0.0);
}
}
}
return true;
}
void libGame_gf_TurnOnOffLevelUpFXForPlayer (bool lp_onOff, int lp_player) {
// Automatic Variable Declarations
// Implementation
if ((lp_onOff == true)) {
libGame_gv_players[lp_player].lv_suppressLevelUpFXAndSounds = false;
}
else {
libGame_gv_players[lp_player].lv_suppressLevelUpFXAndSounds = true;
}
}
void libGame_gf_PreloadTalentModelAssets (int lp_player, int lp_talentTier) {
// Variable Declarations
int lv_itButtonIndex;
int lv_itAbilityMod;
string lv_modelEntry;
// Automatic Variable Declarations
int auto921EEAE9_ae;
const int auto921EEAE9_ai = 1;
int auto3CD7A32D_ae;
const int auto3CD7A32D_ai = 1;
// Variable Initialization
lv_modelEntry = "";
// Implementation
auto921EEAE9_ae = libGame_gv_talents_TalentChoices[lp_player][lp_talentTier].lv_numberOfTalentsForThisTier;
lv_itButtonIndex = 1;
for ( ; ( (auto921EEAE9_ai >= 0 && lv_itButtonIndex <= auto921EEAE9_ae) || (auto921EEAE9_ai < 0 && lv_itButtonIndex >= auto921EEAE9_ae) ) ; lv_itButtonIndex += auto921EEAE9_ai ) {
auto3CD7A32D_ae = libGame_gv_talents_TalentChoices[lp_player][lp_talentTier].lv_talentData[lv_itButtonIndex].lv_totalModifications;
lv_itAbilityMod = 1;
for ( ; ( (auto3CD7A32D_ai >= 0 && lv_itAbilityMod <= auto3CD7A32D_ae) || (auto3CD7A32D_ai < 0 && lv_itAbilityMod >= auto3CD7A32D_ae) ) ; lv_itAbilityMod += auto3CD7A32D_ai ) {
if ((libGame_gv_talents_TalentChoices[lp_player][lp_talentTier].lv_talentData[lv_itButtonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_changeType == c_talentModificationCatalogReplacement) && (libGame_gv_talents_TalentChoices[lp_player][lp_talentTier].lv_talentData[lv_itButtonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_catalog == c_gameCatalogModel)) {
lv_modelEntry = libGame_gv_talents_TalentChoices[lp_player][lp_talentTier].lv_talentData[lv_itButtonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_catalogChangeTo;
libNtve_gf_PreloadModelObject((lv_modelEntry), false);
}
}
}
}
trigger auto_libGame_gf_SpawnHero_Trigger = null;
int auto_libGame_gf_SpawnHero_lp_player;
int auto_libGame_gf_SpawnHero_lp_heroIndex;
point auto_libGame_gf_SpawnHero_lp_spawnLocation;
void libGame_gf_SpawnHero (int lp_player, int lp_heroIndex, point lp_spawnLocation) {
auto_libGame_gf_SpawnHero_lp_player = lp_player;
auto_libGame_gf_SpawnHero_lp_heroIndex = lp_heroIndex;
auto_libGame_gf_SpawnHero_lp_spawnLocation = lp_spawnLocation;
if (auto_libGame_gf_SpawnHero_Trigger == null) {
auto_libGame_gf_SpawnHero_Trigger = TriggerCreate("auto_libGame_gf_SpawnHero_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_SpawnHero_Trigger, false, false);
}
bool auto_libGame_gf_SpawnHero_TriggerFunc (bool testConds, bool runActions) {
int lp_player = auto_libGame_gf_SpawnHero_lp_player;
int lp_heroIndex = auto_libGame_gf_SpawnHero_lp_heroIndex;
point lp_spawnLocation = auto_libGame_gf_SpawnHero_lp_spawnLocation;
// Variable Declarations
int lv_skinIndex;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if ((libGame_gv_players[lp_player].lv_heroUnit != null)) {
return true;
}
while (!((libGame_gv_players[lp_player].lv_heroSpawnReady == true))) {
Wait(0.0625, c_timeGame);
}
lv_skinIndex = lp_player;
if ((libGame_gv_players[lv_skinIndex].lv_skinData.lv_skinID != null)) {
PlayerSetSkin(lp_player, libGame_gv_players[lv_skinIndex].lv_skinData.lv_skinID);
}
libNtve_gf_CreateUnitsAtPoint2(1, libGame_gv_players[lp_heroIndex].lv_heroData.lv_unitType, c_unitCreateIgnorePlacement, lp_player, lp_spawnLocation, null);
libGame_gv_players[lp_player].lv_heroUnit = UnitLastCreated();
PlayerSetHeroUnit(lp_player, libGame_gv_players[lp_player].lv_heroUnit);
libAIAI_gv_aIHeroes[lp_player].lv_currentHeroUnit = libGame_gv_players[lp_player].lv_heroUnit;
UnitGroupClear(libGame_gv_players[lp_player].lv_heroUnitGroup);
UnitGroupAdd(libGame_gv_players[lp_player].lv_heroUnitGroup, UnitLastCreated());
AIAddPlayerUnit(libGame_gv_players[lp_player].lv_heroUnit);
libGame_gv_players[lp_player].lv_heroIndex = lp_heroIndex;
libGame_gv_players[lp_player].lv_portraitIcon = libGame_gv_players[lp_heroIndex].lv_heroData.lv_portrait;
libGame_gv_players[lp_player].lv_vOSoundSuffix = "";
libCore_gf_DataHeroVOReloadHeroVODataForHero(lp_player);
libCore_gf_SendPlayersSkinActorMessagesToUnit(lp_player, libGame_gv_players[lp_player].lv_heroUnit);
UnitGroupAdd(libGame_gv_heroes, UnitLastCreated());
UnitStatusBarOverride(UnitLastCreated(), c_unitStatusGroupAll);
libUIUI_gf_InitPathingLines(UnitLastCreated(), lp_player);
if ((libGame_gv_suppressInitialHeroSpawnFX == false)) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_players[lp_player].lv_heroUnit, "Signal Respawn");
}
UnitSelect(libGame_gv_players[lp_player].lv_heroUnit, lp_player, true);
libGame_gv_players[lp_player].lv_playerStatus = libGame_ge_PlayerStatusStorm_Playing;
libGame_gv_players[lp_player].lv_isDead = false;
libUIUI_gf_HeroConsoleUnitStatusBarsSetUnitForBars(libGame_gv_players[lp_player].lv_heroUnit, lp_player);
libUIUI_gf_UIHeroConsoleSetUpForPlayer(libGame_gv_players[lp_player].lv_heroUnit, lp_player);
libUIUI_gf_UIUnitStatusFramesHookupUnitStatusFramesForPlayer(lp_player);
libUIUI_gf_UIPartyFrameAddPlayerToPartyFrame(lp_player);
libUIUI_gf_UIHeroConsoleShowHideForPlayer(true, lp_player);
libUIUI_gf_UIPartyFrameShowHidePartyFramePanelForPlayer(true, lp_player);
if ((libNtve_gf_PlayerInCinematicMode(lp_player) == false)) {
UISetMode(libCore_gv_playerGroupFromPlayer[lp_player], c_uiModeConsole, c_transitionDurationImmediate);
libUIUI_gf_UIGameUIShowHideConsolePanelForPlayer(true, lp_player);
libGame_gf_SendEventUIShownForPlayer(lp_player);
}
PlayerSetHero(lp_player, libGame_gv_players[lp_heroIndex].lv_heroData.lv_heroCatalogLink);
StatEventCreate("PlayerSpawned");
StatEventAddDataInt(StatEventLastCreated(), "PlayerID", lp_player);
StatEventAddDataString(StatEventLastCreated(), "Hero", (libGame_gv_players[lp_heroIndex].lv_heroData.lv_unitType));
StatEventSend(StatEventLastCreated());
ActorScopeSend(ActorScopeFromUnit(libGame_gv_players[lp_player].lv_heroUnit), "StatusIncrement PreventDestroyOnDeath");
if ((libGame_gv_heroDeath_RespawnMounted == true) && (libGame_gv_players[lp_player].lv_disableMount == false)) {
libGame_gf_SendEventHeroSpecialCaseMounting(lp_player);
libGame_gf_ApplyMountBehaviorToHero(libGame_gv_players[lp_player].lv_heroUnit);
}
if ((libGame_gv_players[lp_player].lv_mountData.lv_isMorphMount == true)) {
UnitBehaviorAdd(libGame_gv_players[lp_player].lv_heroUnit, "IsMorphMounted", libGame_gv_players[lp_player].lv_heroUnit, 1);
}
libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn = libGame_gv_players[lp_player].lv_heroUnitGroup;
if (((lp_player != 1) || (libCore_gv_sYSGameMode != libCore_ge_GameModes_Tutorial1) || (libNtve_gf_PlayerInCinematicMode(1) == false))) {
libGame_gf_CameraUpdateCameraForPlayer(lp_player);
}
libGame_gf_GrantXPToPlayer(libCore_gf_GetTotalXPForLevel(libCore_gv_sYSHeroStartLevel), lp_player, libGame_ge_XPSources_Trickle);
Wait(0.125, c_timeGame);
libCore_gf_SetTalentsTierLevels(lp_player);
libCore_gf_SetHeroicTalentTier(lp_player);
libGame_gf_TalentsSetupTalentChoicesFromHeroDataForPlayer(lp_heroIndex, lp_player);
if ((libCore_gv_tUTTalentsAutobuyOn == true)) {
libGame_gf_SendEventHeroGainTalent("", lp_player);
}
SetTalentTreeHeroLevel(lp_player, 0);
libGame_gf_LevelUpHero(libGame_gv_players[lp_player].lv_heroUnit);
libUIUI_gf_UIObserverUIAddPlayerToObserverUI(lp_player);
libSond_gv_soundtrack_UniqueSoundtrackEnabled[lp_player] = false;
libAIAI_gf_AITeamDelegateModifyHeroStatusTokensforTeam(libAIAI_ge_AITeamDelegateAddRemoveLaneValue_Add, libGame_gv_players[lp_player].lv_aIHeroDelegateTokenValue, libGame_gf_TeamNumberOfPlayer(lp_player), libAIAI_ge_AITeamDelegateLivingDeadHeroStatusUpdates_HeroAlive);
libGame_gf_SendEventHeroSpawn(lp_player);
return true;
}
trigger auto_libGame_gf_SpawnHeroesForTeam_Trigger = null;
int auto_libGame_gf_SpawnHeroesForTeam_lp_team;
void libGame_gf_SpawnHeroesForTeam (int lp_team) {
auto_libGame_gf_SpawnHeroesForTeam_lp_team = lp_team;
if (auto_libGame_gf_SpawnHeroesForTeam_Trigger == null) {
auto_libGame_gf_SpawnHeroesForTeam_Trigger = TriggerCreate("auto_libGame_gf_SpawnHeroesForTeam_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_SpawnHeroesForTeam_Trigger, false, false);
}
bool auto_libGame_gf_SpawnHeroesForTeam_TriggerFunc (bool testConds, bool runActions) {
int lp_team = auto_libGame_gf_SpawnHeroesForTeam_lp_team;
// Variable Declarations
int lv_itPlayer;
int lv_itManualSpawnHero;
int lv_itManualSpawnHeroIndex;
bool lv_isManualSpawnHero;
unit lv_itUnit;
// Automatic Variable Declarations
playergroup auto6879AF6E_g;
const int autoA7CE9B09_ae = libCore_gv_dataHeroesManualSpawnHeroesCount;
const int autoA7CE9B09_ai = 1;
// Variable Initialization
// Implementation
auto6879AF6E_g = libGame_gv_teams[lp_team].lv_teamPlayerGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto6879AF6E_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((lv_itPlayer == 1) && (libCore_gv_dEBUGDebuggingEnabled == true) && (BankValueGetAsFlag(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "Debug Menu Options", "SavedHero") == true) && (BankValueGetAsInt(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "Debug Menu Options", "TrueHeroIndex") != 0) && (BankValueGetAsInt(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "Debug Menu Options", "TrueSkinIndex") != 0) && (BankValueGetAsInt(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "Debug Menu Options", "TrueMountIndex") != 0)) {
libGame_gv_players[lv_itPlayer].lv_heroIndex = BankValueGetAsInt(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "Debug Menu Options", "TrueHeroIndex");
libGame_gv_players[lv_itPlayer].lv_selectedSkin = BankValueGetAsInt(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "Debug Menu Options", "TrueSkinIndex");
libGame_gv_players[lv_itPlayer].lv_selectedMount = BankValueGetAsInt(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "Debug Menu Options", "TrueMountIndex");
}
if ((lv_itPlayer <= libCore_gv_bALMaxPlayers) && (PlayerStatus(lv_itPlayer) != c_playerStatusUnused) && (PlayerType(lv_itPlayer) != c_playerTypeHostile) && (libGame_gv_players[lv_itPlayer].lv_heroUnit == null)) {
lv_itManualSpawnHero = 1;
for ( ; ( (autoA7CE9B09_ai >= 0 && lv_itManualSpawnHero <= autoA7CE9B09_ae) || (autoA7CE9B09_ai < 0 && lv_itManualSpawnHero >= autoA7CE9B09_ae) ) ; lv_itManualSpawnHero += autoA7CE9B09_ai ) {
if ((libGame_gv_players[lv_itPlayer].lv_heroIndex == libCore_gv_dataHeroesManualSpawnHeroIDs[lv_itManualSpawnHero].lv_heroIndex) && (libCore_gv_dataHeroesManualSpawnHeroIDs[lv_itManualSpawnHero].lv_core == false)) {
lv_isManualSpawnHero = true;
lv_itManualSpawnHeroIndex = lv_itManualSpawnHero;
break;
}
}
if ((lv_isManualSpawnHero == true)) {
libGame_gf_SendEventManualHeroSpawn(lv_itPlayer, libCore_gv_dataHeroesManualSpawnHeroIDs[lv_itManualSpawnHeroIndex].lv_heroIndex, 0, libGame_gv_players[lv_itPlayer].lv_spawnPoint);
lv_isManualSpawnHero = false;
}
else {
libGame_gf_SpawnHero(lv_itPlayer, lv_itPlayer, libGame_gv_players[lv_itPlayer].lv_spawnPoint);
}
Wait(libGame_gv_individualHeroSpawnMiniDelay_C, c_timeGame);
}
if ((lv_itPlayer == 1) && (libCore_gv_dEBUGDebuggingEnabled == true) && (BankValueGetAsFlag(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "Debug Menu Options", "SavedHero") == true) && (BankValueGetAsInt(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "Debug Menu Options", "TrueHeroIndex") != 0) && (BankValueGetAsInt(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "Debug Menu Options", "TrueSkinIndex") != 0) && (BankValueGetAsInt(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "Debug Menu Options", "TrueMountIndex") != 0)) {
libUIUI_gv_uIPartyFrameMaxLevelForTeam[lp_team] = 0;
libGame_gf_GrantXPToPlayer(BankValueGetAsFixed(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "Debug Menu Options", "HeroLevelXP"), lv_itPlayer, libGame_ge_XPSources_Debug);
}
}
libGame_gf_ReloadTrackedHeroesForTeam(lp_team);
return true;
}
void libGame_gf_SpawnHeroesForBothTeams () {
// Variable Declarations
int lv_itPlayer;
int lv_itTeam;
bool lv_ready;
// Automatic Variable Declarations
const int auto434A30E3_ae = libCore_gv_bALMaxTeams;
const int auto434A30E3_ai = 1;
const int auto7B27C0CF_ae = libCore_gv_bALMaxTeams;
const int auto7B27C0CF_ai = 1;
playergroup autoD57830E2_g;
// Variable Initialization
// Implementation
lv_itTeam = 1;
for ( ; ( (auto434A30E3_ai >= 0 && lv_itTeam <= auto434A30E3_ae) || (auto434A30E3_ai < 0 && lv_itTeam >= auto434A30E3_ae) ) ; lv_itTeam += auto434A30E3_ai ) {
if ((libCore_gv_sYSGameMode == libCore_ge_GameModes_ModeC) && (lv_itTeam == libGame_gv_teamChaosIndex_C)) {
continue;
}
libGame_gf_SpawnHeroesForTeam(lv_itTeam);
}
if ((libGame_gv_heroSpawnBlockGame == false)) {
return ;
}
while (true) {
lv_ready = true;
lv_itTeam = 1;
for ( ; ( (auto7B27C0CF_ai >= 0 && lv_itTeam <= auto7B27C0CF_ae) || (auto7B27C0CF_ai < 0 && lv_itTeam >= auto7B27C0CF_ae) ) ; lv_itTeam += auto7B27C0CF_ai ) {
if ((libCore_gv_sYSGameMode == libCore_ge_GameModes_ModeC) && (lv_itTeam == libGame_gv_teamChaosIndex_C)) {
continue;
}
autoD57830E2_g = libGame_gv_teams[lv_itTeam].lv_teamPlayerGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoD57830E2_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((lv_itPlayer <= libCore_gv_bALMaxPlayers) && (PlayerStatus(lv_itPlayer) != c_playerStatusUnused) && (PlayerType(lv_itPlayer) != c_playerTypeHostile)) {
if ((libGame_gv_players[lv_itPlayer].lv_heroUnit == null)) {
lv_ready = false;
break;
}
}
}
if ((lv_ready == false)) {
break;
}
}
if ((lv_ready == true)) {
return ;
}
Wait(0.125, c_timeGame);
}
}
trigger auto_libGame_gf_ReloadTrackedHeroesForTeam_Trigger = null;
int auto_libGame_gf_ReloadTrackedHeroesForTeam_lp_team;
void libGame_gf_ReloadTrackedHeroesForTeam (int lp_team) {
auto_libGame_gf_ReloadTrackedHeroesForTeam_lp_team = lp_team;
if (auto_libGame_gf_ReloadTrackedHeroesForTeam_Trigger == null) {
auto_libGame_gf_ReloadTrackedHeroesForTeam_Trigger = TriggerCreate("auto_libGame_gf_ReloadTrackedHeroesForTeam_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_ReloadTrackedHeroesForTeam_Trigger, false, false);
}
bool auto_libGame_gf_ReloadTrackedHeroesForTeam_TriggerFunc (bool testConds, bool runActions) {
int lp_team = auto_libGame_gf_ReloadTrackedHeroesForTeam_lp_team;
// Variable Declarations
int lv_itPlayer;
unit lv_itUnit;
// Automatic Variable Declarations
playergroup auto96C8CA5B_g;
string auto89E6AF29_val;
unitgroup auto9452094F_g;
int auto9452094F_u;
// Variable Initialization
// Implementation
UnitGroupClear(libGame_gv_players_Heroes_AllTrackedHeroesForTeam[lp_team]);
auto96C8CA5B_g = libGame_gv_teams[lp_team].lv_teamPlayerGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto96C8CA5B_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((lv_itPlayer > 0) && (lv_itPlayer <= libCore_gv_bALMaxPlayers)) {
auto89E6AF29_val = UnitGetType(libGame_gv_players[lv_itPlayer].lv_heroUnit);
if (auto89E6AF29_val == "HeroLostVikingsController") {
auto9452094F_g = libGame_gv_players[lv_itPlayer].lv_heroUnitGroup;
auto9452094F_u = UnitGroupCount(auto9452094F_g, c_unitCountAll);
for (;; auto9452094F_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(auto9452094F_g, auto9452094F_u);
if (lv_itUnit == null) { break; }
if ((UnitGetType(lv_itUnit) != "HeroLostVikingsController")) {
UnitGroupAdd(libGame_gv_players_Heroes_AllTrackedHeroesForTeam[lp_team], lv_itUnit);
}
}
}
else if (auto89E6AF29_val == "HeroGall") {
continue;
}
else {
UnitGroupAdd(libGame_gv_players_Heroes_AllTrackedHeroesForTeam[lp_team], libGame_gv_players[lv_itPlayer].lv_heroUnit);
}
}
}
return true;
}
void libGame_gf_PreloadHeroesForTeam (int lp_team) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
playergroup autoD88D129F_g;
// Variable Initialization
// Implementation
autoD88D129F_g = libGame_gf_PlayersOnTeamHeroes(lp_team, false);
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoD88D129F_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((libGame_gv_players[lv_itPlayer].lv_heroIndex != 0)) {
libCore_gf_DataClearHeroDataAtIndex(lv_itPlayer);
libCore_gf_DataLoadHeroDataIntoIndex(libCore_gf_GetHeroFromIndex(libGame_gv_players[lv_itPlayer].lv_heroIndex), lv_itPlayer);
libNtve_gf_PreloadUnit(libGame_gv_players[lv_itPlayer].lv_heroData.lv_unitType, false);
}
}
}
trigger auto_libGame_gf_PreloadRequiredAnimationsForPlayer_Trigger = null;
int auto_libGame_gf_PreloadRequiredAnimationsForPlayer_lp_player;
void libGame_gf_PreloadRequiredAnimationsForPlayer (int lp_player) {
auto_libGame_gf_PreloadRequiredAnimationsForPlayer_lp_player = lp_player;
if (auto_libGame_gf_PreloadRequiredAnimationsForPlayer_Trigger == null) {
auto_libGame_gf_PreloadRequiredAnimationsForPlayer_Trigger = TriggerCreate("auto_libGame_gf_PreloadRequiredAnimationsForPlayer_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_PreloadRequiredAnimationsForPlayer_Trigger, false, false);
}
bool auto_libGame_gf_PreloadRequiredAnimationsForPlayer_TriggerFunc (bool testConds, bool runActions) {
int lp_player = auto_libGame_gf_PreloadRequiredAnimationsForPlayer_lp_player;
// Variable Declarations
int lv_itAnimIndex;
string lv_unitType;
// Automatic Variable Declarations
int auto8334E013_ae;
// Variable Initialization
lv_unitType = libGame_gv_players[lp_player].lv_heroData.lv_unitType;
// Implementation
auto8334E013_ae = (CatalogFieldValueCount(c_gameCatalogModel, libCore_gf_GetModelLinkForUnitType(lv_unitType), "RequiredAnims", lp_player) - 1);
lv_itAnimIndex = 0;
for ( ; lv_itAnimIndex <= auto8334E013_ae ; lv_itAnimIndex += 1 ) {
PreloadAsset(CatalogFieldValueGet(c_gameCatalogModel, libCore_gf_GetModelLinkForUnitType(lv_unitType), "RequiredAnims[" + IntToString(lv_itAnimIndex) + "]", lp_player), false);
}
return true;
}
void libGame_gf_ShareUnshareVisionOfAlliesForPlayer (bool lp_onOff, int lp_player) {
// Variable Declarations
int lv_i;
unit lv_u;
playergroup lv_allyPlayerGroup;
// Automatic Variable Declarations
playergroup auto198D0B9F_g;
unitgroup autoB2B49E2C_g;
int autoB2B49E2C_u;
unit autoB2B49E2C_var;
// Variable Initialization
lv_allyPlayerGroup = PlayerGroupEmpty();
// Implementation
lv_allyPlayerGroup = libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lp_player)].lv_teamPlayerGroup;
auto198D0B9F_g = lv_allyPlayerGroup;
lv_i = -1;
while (true) {
lv_i = PlayerGroupNextPlayer(auto198D0B9F_g, lv_i);
if (lv_i<0) { break; }
if ((lv_i != lp_player)) {
PlayerSetAlliance(lv_i, c_allianceIdVision, lp_player, lp_onOff);
}
}
if ((UnitGroupCount(libGDHL_gv_updateOnAnyVisibilityChangeUnitGroup, c_unitCountAlive) >= 1)) {
autoB2B49E2C_g = libGDHL_gv_updateOnAnyVisibilityChangeUnitGroup;
autoB2B49E2C_u = UnitGroupCount(autoB2B49E2C_g, c_unitCountAll);
for (;; autoB2B49E2C_u -= 1) {
autoB2B49E2C_var = UnitGroupUnitFromEnd(autoB2B49E2C_g, autoB2B49E2C_u);
if (autoB2B49E2C_var == null) { break; }
libNtve_gf_SendActorMessageToUnit(autoB2B49E2C_var, "Signal VisUpdate");
}
}
}
void libGame_gf_EndGameForPlayerStorm (int lp_player) {
// Automatic Variable Declarations
// Implementation
libGame_gf_ScoreValuesReportForPlayer(lp_player);
libGame_gv_players[lp_player].lv_gameEndedForPlayer = true;
GameOver(lp_player, libGame_gv_players[lp_player].lv_victoryDefeat, false, true);
}
void libGame_gf_PlayerTurnMountCostsOnOffForPlayer (int lp_player, bool lp_onOff) {
// Automatic Variable Declarations
// Implementation
if ((lp_onOff == true)) {
CatalogFieldValueSet(c_gameCatalogAbil, "Mount", "CastIntroTime[" + IntToString(0) + "]", lp_player, CatalogFieldValueGet(c_gameCatalogAbil, "Mount", "CastIntroTime[" + IntToString(0) + "]", 0));
CatalogFieldValueSet(c_gameCatalogAbil, "Mount", "Cost[" + IntToString(0) + "].Cooldown.TimeUse", lp_player, CatalogFieldValueGet(c_gameCatalogAbil, "Mount", "Cost.Cooldown.TimeUse", 0));
CatalogFieldValueSet(c_gameCatalogEffect, "DismountModifyCooldown", "Cost[" + IntToString(0) + "].CooldownTimeUse", lp_player, CatalogFieldValueGet(c_gameCatalogEffect, "DismountModifyCooldown", "Cost[" + IntToString(0) + "].CooldownTimeUse", 0));
CatalogFieldValueSet(c_gameCatalogAbil, "RehgarGhostWolfActivate", "Cost[" + IntToString(0) + "].Cooldown.TimeUse", lp_player, "1");
CatalogFieldValueSet(c_gameCatalogEffect, "RehgarGhostWolfModifyActivateCooldown", "Cost[" + IntToString(0) + "].CooldownTimeUse", lp_player, "4");
CatalogFieldValueSet(c_gameCatalogEffect, "RehgarGhostWolfModifyCancelCooldown", "Cost[" + IntToString(0) + "].CooldownTimeUse", lp_player, "1.5");
CatalogFieldValueSet(c_gameCatalogAbil, "IllidanMetamorphosisMountCustom", "CastIntroTime[" + IntToString(0) + "]", lp_player, CatalogFieldValueGet(c_gameCatalogAbil, "Mount", "CastIntroTime[" + IntToString(0) + "]", 0));
CatalogFieldValueSet(c_gameCatalogAbil, "IllidanMetamorphosisMountCustom", "Cost[" + IntToString(0) + "].Cooldown.TimeUse", lp_player, "1");
}
else {
CatalogFieldValueSet(c_gameCatalogAbil, "Mount", "CastIntroTime[" + IntToString(0) + "]", lp_player, "0");
CatalogFieldValueSet(c_gameCatalogAbil, "Mount", "Cost[" + IntToString(0) + "].Cooldown.TimeUse", lp_player, "0");
CatalogFieldValueSet(c_gameCatalogAbil, "RehgarGhostWolfActivate", "Cost[" + IntToString(0) + "].Cooldown.TimeUse", lp_player, "0");
CatalogFieldValueSet(c_gameCatalogEffect, "RehgarGhostWolfModifyActivateCooldown", "Cost[" + IntToString(0) + "].CooldownTimeUse", lp_player, "0.5");
CatalogFieldValueSet(c_gameCatalogEffect, "RehgarGhostWolfModifyCancelCooldown", "Cost[" + IntToString(0) + "].CooldownTimeUse", lp_player, "0");
CatalogFieldValueSet(c_gameCatalogAbil, "IllidanMetamorphosisMountCustom", "CastIntroTime[" + IntToString(0) + "]", lp_player, "0");
CatalogFieldValueSet(c_gameCatalogAbil, "IllidanMetamorphosisMountCustom", "Cost[" + IntToString(0) + "].Cooldown.TimeUse", lp_player, "0");
}
}
void libGame_gf_PlayerResetMountCostsForPlayers () {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
const int auto523C3CF5_ae = libCore_gv_bALMaxPlayers;
const int auto523C3CF5_ai = 1;
// Variable Initialization
// Implementation
lv_itPlayer = 1;
for ( ; ( (auto523C3CF5_ai >= 0 && lv_itPlayer <= auto523C3CF5_ae) || (auto523C3CF5_ai < 0 && lv_itPlayer >= auto523C3CF5_ae) ) ; lv_itPlayer += auto523C3CF5_ai ) {
libGame_gf_PlayerTurnMountCostsOnOffForPlayer(lv_itPlayer, true);
}
}
trigger auto_libGame_gf_PlayerHeroDisplacementCameraLock_Trigger = null;
unit auto_libGame_gf_PlayerHeroDisplacementCameraLock_lp_lockUnit;
string auto_libGame_gf_PlayerHeroDisplacementCameraLock_lp_displacingBehavior;
void libGame_gf_PlayerHeroDisplacementCameraLock (unit lp_lockUnit, string lp_displacingBehavior) {
auto_libGame_gf_PlayerHeroDisplacementCameraLock_lp_lockUnit = lp_lockUnit;
auto_libGame_gf_PlayerHeroDisplacementCameraLock_lp_displacingBehavior = lp_displacingBehavior;
if (auto_libGame_gf_PlayerHeroDisplacementCameraLock_Trigger == null) {
auto_libGame_gf_PlayerHeroDisplacementCameraLock_Trigger = TriggerCreate("auto_libGame_gf_PlayerHeroDisplacementCameraLock_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_PlayerHeroDisplacementCameraLock_Trigger, false, false);
}
bool auto_libGame_gf_PlayerHeroDisplacementCameraLock_TriggerFunc (bool testConds, bool runActions) {
unit lp_lockUnit = auto_libGame_gf_PlayerHeroDisplacementCameraLock_lp_lockUnit;
string lp_displacingBehavior = auto_libGame_gf_PlayerHeroDisplacementCameraLock_lp_displacingBehavior;
// Variable Declarations
int lv_player;
// Automatic Variable Declarations
// Variable Initialization
lv_player = UnitGetOwner(lp_lockUnit);
// Implementation
if (((UnitGetOwner(lp_lockUnit) >= 1) && (UnitGetOwner(lp_lockUnit) <= 10) && (lp_lockUnit == libGame_gv_players[lv_player].lv_heroUnit) && (UnitIsAlive(lp_lockUnit) == true))) {
libGame_gv_players[lv_player].lv_cameraPlayerHasControl = false;
libGame_gv_players[lv_player].lv_cameraPlayerUnitGroupToFocusOn = libNtve_gf_ConvertUnitToUnitGroup(libGame_gv_players[lv_player].lv_heroUnit);
CameraUseHeightDisplacement(lv_player, true);
libGame_gf_CameraUpdateCameraForPlayer(lv_player);
libGame_gf_PlayerHeroDisplacementCameraUnlock(lv_player, lp_displacingBehavior);
}
return true;
}
trigger auto_libGame_gf_PlayerHeroDisplacementCameraUnlock_Trigger = null;
int auto_libGame_gf_PlayerHeroDisplacementCameraUnlock_lp_player;
string auto_libGame_gf_PlayerHeroDisplacementCameraUnlock_lp_displacingBehavior;
void libGame_gf_PlayerHeroDisplacementCameraUnlock (int lp_player, string lp_displacingBehavior) {
auto_libGame_gf_PlayerHeroDisplacementCameraUnlock_lp_player = lp_player;
auto_libGame_gf_PlayerHeroDisplacementCameraUnlock_lp_displacingBehavior = lp_displacingBehavior;
if (auto_libGame_gf_PlayerHeroDisplacementCameraUnlock_Trigger == null) {
auto_libGame_gf_PlayerHeroDisplacementCameraUnlock_Trigger = TriggerCreate("auto_libGame_gf_PlayerHeroDisplacementCameraUnlock_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_PlayerHeroDisplacementCameraUnlock_Trigger, false, false);
}
bool auto_libGame_gf_PlayerHeroDisplacementCameraUnlock_TriggerFunc (bool testConds, bool runActions) {
int lp_player = auto_libGame_gf_PlayerHeroDisplacementCameraUnlock_lp_player;
string lp_displacingBehavior = auto_libGame_gf_PlayerHeroDisplacementCameraUnlock_lp_displacingBehavior;
// Automatic Variable Declarations
// Implementation
while (((UnitBehaviorCount(libGame_gv_players[lp_player].lv_heroUnit, lp_displacingBehavior) >= 1) && (UnitIsAlive(libGame_gv_players[lp_player].lv_heroUnit) == true))) {
Wait(0.0625, c_timeGame);
}
libGame_gv_players[lp_player].lv_cameraPlayerHasControl = true;
CameraUseHeightDisplacement(lp_player, false);
libGame_gf_CameraUpdateCameraForPlayer(lp_player);
return true;
}
void libGame_gf_UpdateScalingForUnit (unit lp_unit, int lp_desiredLevel, int lp_existingLevel) {
// Variable Declarations
int lv_xPToApply;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_xPToApply = (lp_desiredLevel - lp_existingLevel);
if ((lv_xPToApply > 0)) {
UnitXPAddXP(lp_unit, null, lv_xPToApply);
}
}
void libGame_gf_UpdateUpgradesForPlayer (int lp_player, unit lp_unit, int lp_level) {
// Variable Declarations
string lv_upgrade;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_upgrade = (((UnitGetType(lp_unit)) + "Upgrade"));
if ((lv_upgrade != null)) {
libNtve_gf_SetUpgradeLevelForPlayer(lp_player, lv_upgrade, lp_level);
}
}
void libGame_gf_JungleUpdateScalingForCamp (int lp_camp, int lp_scalingTicks) {
// Variable Declarations
int lv_itDefender;
int lv_currentDefenderScalingTicks;
int lv_newDefenderScalingTicks;
int lv_newMercScalingTicks;
int lv_campDefenderType;
unit lv_creepUnit;
// Automatic Variable Declarations
int autoC1B55DFB_ae;
const int autoC1B55DFB_ai = 1;
// Variable Initialization
// Implementation
lv_currentDefenderScalingTicks = libMapM_gv_jungleCreepCamps[lp_camp].lv_stateCurrentDefenderScalingTicks;
lv_newDefenderScalingTicks = MinI(lp_scalingTicks, libMapM_gv_jungleCreepCamps[lp_camp].lv_defenderNumberOfRanks);
lv_newMercScalingTicks = MinI(lp_scalingTicks, libMapM_gv_jungleCreepCamps[lp_camp].lv_mercNumberOfRanks);
lv_campDefenderType = (libMapM_gv_jungleCreepCamps[lp_camp].lv_mapDataCampDefenderType);
autoC1B55DFB_ae = libAIAI_gf_DefenderUnitCount(libMapM_gv_jungleCreepCamps[lp_camp].lv_aIDefenderAIIndex);
lv_itDefender = 1;
for ( ; ( (autoC1B55DFB_ai >= 0 && lv_itDefender <= autoC1B55DFB_ae) || (autoC1B55DFB_ai < 0 && lv_itDefender >= autoC1B55DFB_ae) ) ; lv_itDefender += autoC1B55DFB_ai ) {
lv_creepUnit = libAIAI_gf_DefenderUnit(libMapM_gv_jungleCreepCamps[lp_camp].lv_aIDefenderAIIndex, lv_itDefender);
if ((lv_creepUnit != null) && (UnitIsAlive(lv_creepUnit) == true) && (UnitHasBehavior2(lv_creepUnit, "NoScaling") == false)) {
libGame_gf_UpdateScalingForUnit(lv_creepUnit, lv_newDefenderScalingTicks, lv_currentDefenderScalingTicks);
UnitSetPropertyFixed(lv_creepUnit, c_unitPropLifePercent, 100.0);
}
}
libMapM_gv_jungleCreepCamps[lp_camp].lv_stateCurrentDefenderScalingTicks = lv_newDefenderScalingTicks;
libMapM_gv_jungleCreepCamps[lp_camp].lv_stateCurrentMercScalingTicks = lv_newMercScalingTicks;
}
void libGame_gf_JungleUpdateScalingForCamps () {
// Variable Declarations
int lv_camp;
// Automatic Variable Declarations
int autoBC04B9D5_ae;
const int autoBC04B9D5_ai = 1;
// Variable Initialization
// Implementation
autoBC04B9D5_ae = libMapM_gv_jungleNumberOfCreepCamps;
lv_camp = 1;
for ( ; ( (autoBC04B9D5_ai >= 0 && lv_camp <= autoBC04B9D5_ae) || (autoBC04B9D5_ai < 0 && lv_camp >= autoBC04B9D5_ae) ) ; lv_camp += autoBC04B9D5_ai ) {
if ((libMapM_gv_jungleCreepCamps[lv_camp].lv_aIState == libMapM_ge_JungleCampStates_Idle)) {
libGame_gf_JungleUpdateScalingForCamp(lv_camp, libGame_gv_scalingTicks);
}
}
}
void libGame_gf_CoreUpdateScaling () {
// Variable Declarations
int lv_itTeam;
// Automatic Variable Declarations
const int autoD19BFE26_ae = libCore_gv_bALMaxTeams;
const int autoD19BFE26_ai = 1;
// Variable Initialization
// Implementation
lv_itTeam = 1;
for ( ; ( (autoD19BFE26_ai >= 0 && lv_itTeam <= autoD19BFE26_ae) || (autoD19BFE26_ai < 0 && lv_itTeam >= autoD19BFE26_ae) ) ; lv_itTeam += autoD19BFE26_ai ) {
if ((UnitIsAlive(libGame_gv_teams[lv_itTeam].lv_core) == true) && (UnitHasBehavior2(libGame_gv_teams[lv_itTeam].lv_core, "CoreScaling") == true)) {
UnitXPSetCurrentLevel(libGame_gv_teams[lv_itTeam].lv_core, null, libGame_gv_scalingTicks);
}
}
}
void libGame_gf_ScalingIncremented (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libGame_gv_eventID_ScalingIncremented_C);
}
void libGame_gf_SendEventScalingIncremented () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libGame_gv_eventID_ScalingIncremented_C);
}
fixed libGame_gf_BrawlMetaXPTableLerp (fixed lp_time) {
// Variable Declarations
fixed lv_minutes;
int lv_minutesWhole;
fixed lv_minutesFractional;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_minutes = (lp_time / 60.0);
if ((lv_minutes >= libCore_gv_dataXPBrawlMetaXPMaximumDuration)) {
return libCore_gv_dataXPBrawlMetaXPValues[libCore_gv_data_XP_BrawlMetaXPTableSize_C];
}
else {
lv_minutesWhole = FixedToInt(lv_minutes);
lv_minutesFractional = (lv_minutes - lv_minutesWhole);
return (libCore_gv_dataXPBrawlMetaXPValues[lv_minutesWhole] + lv_minutesFractional*(libCore_gv_dataXPBrawlMetaXPValues[(lv_minutesWhole + 1)] - libCore_gv_dataXPBrawlMetaXPValues[lv_minutesWhole]));
}
}
int libGame_gf_BrawlMetaXP (int lp_player) {
// Variable Declarations
fixed lv_metaXP;
fixed lv_metaXP_Bonus;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if ((libCore_gv_sYSGameMode == libCore_ge_GameModes_ModeC)) {
return FixedToInt(libGame_gv_gameScore_BrawlModeCScore[lp_player]);
}
lv_metaXP = libGame_gf_BrawlMetaXPTableLerp(MinF(TimerGetElapsed(libGame_gv_matchGameplayTimer), (libCore_gv_dataXPBrawlMetaXPMaximumDuration * 60.0)));
lv_metaXP_Bonus = libGame_gf_BrawlMetaXPTableLerp(MinF(TimerGetElapsed(libGame_gv_matchGameplayTimer), (libCore_gv_dataXPBrawlMetaXPExpectedDuration * 60.0)));
if ((libGame_gv_players[lp_player].lv_victoryDefeat == c_gameOverVictory)) {
lv_metaXP += (0.5 * lv_metaXP_Bonus);
}
else if ((libGame_gv_gameScore_MinorVictoryScored[libGame_gf_TeamNumberOfPlayer(lp_player)] == true)) {
lv_metaXP += (0.25 * lv_metaXP_Bonus);
}
return FixedToInt(lv_metaXP);
}
void libGame_gf_ScoreValuesReportIntegerValueAndLog (int lp_player, string lp_score, int lp_value) {
// Automatic Variable Declarations
// Implementation
PlayerScoreValueSetFromInt(lp_player, lp_score, lp_value);
TextExpressionSetToken("Param/Expression/lib_Game_B600485F", "D", TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetElapsed(libGame_gv_gameTimer))));
TextExpressionSetToken("Param/Expression/lib_Game_B600485F", "A", IntToText(lp_player));
TextExpressionSetToken("Param/Expression/lib_Game_B600485F", "B", StringToText((lp_score)));
TextExpressionSetToken("Param/Expression/lib_Game_B600485F", "C", IntToText(PlayerScoreValueGetAsInt(lp_player, lp_score)));
TriggerDebugOutput(2, TextExpressionAssemble("Param/Expression/lib_Game_B600485F"), false);
}
void libGame_gf_ScoreValuesReportRealValueAndLog (int lp_player, string lp_score, fixed lp_value) {
// Automatic Variable Declarations
string auto9C20ABE7_val;
// Implementation
auto9C20ABE7_val = lp_score;
if (auto9C20ABE7_val == "ExperienceContribution") {
}
else if (auto9C20ABE7_val == "Takedowns") {
}
else {
}
PlayerScoreValueSetFromFixed(lp_player, lp_score, lp_value);
}
void libGame_gf_ScoreValuesReportForPlayer (int lp_player) {
// Variable Declarations
int lv_decrementedValueForTalentReporting;
int lv_it_TalentTier;
int lv_itPlayer;
int lv_itScoreValue;
int lv_itHeroClass;
int lv_team;
int lv_heroIndex;
int lv_earnedMetaXPValue;
int lv_trackedXPValueSum;
int lv_rewardedMetaXPValue;
bool lv_matchFound;
int lv_enemyTeamIndex;
int lv_enemyPlayerIndex;
int lv_enemyTeamDifficulty;
// Automatic Variable Declarations
const int autoA70CB022_ae = 7;
const int autoA70CB022_ai = 1;
int auto6381B585_val;
int autoE4DEA447_val;
int auto4351418E_val;
int auto7FC2C1DC_val;
int autoC92E084A_val;
int autoD6CBF14B_val;
playergroup auto9665A00A_g;
int auto76440E23_val;
playergroup auto1B472315_g;
int auto5D5836B4_val;
// Variable Initialization
lv_enemyTeamDifficulty = libAIAI_ge_HeroAIDifficulty_HeroAIElite;
// Implementation
if (((lp_player > libCore_gv_bALMaxPlayers) || (lp_player <= 0))) {
return ;
}
lv_team = libGame_gf_TeamNumberOfPlayer(lp_player);
lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
if ((libCore_gv_sYSIsBrawlGame == true)) {
lv_earnedMetaXPValue = libGame_gf_BrawlMetaXP(lp_player);
}
else {
lv_earnedMetaXPValue = FixedToInt(UnitGetPropertyFixed(libGame_gv_players[lp_player].lv_heroUnit, c_unitPropXP, c_unitPropCurrent));
}
lv_rewardedMetaXPValue = lv_earnedMetaXPValue;
if ((libCore_gv_dEBUGDebuggingEnabled == true) && (libUIUI_gv_uIDebugPanelDebugMetaXPValue > 0)) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "MetaExperience", libUIUI_gv_uIDebugPanelDebugMetaXPValue);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "ExperienceFromTrickle", libUIUI_gv_uIDebugPanelDebugMetaXPValue);
}
else {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "MetaExperience", lv_rewardedMetaXPValue);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "ExperienceFromTrickle", FixedToInt(libGame_gv_players[lp_player].lv_xPRecievedFromTrickle));
}
if ((libCore_gv_sYSIsBrawlGame == true)) {
return ;
}
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "ExperienceFromMinionsAndCreeps", FixedToInt((libGame_gv_players[lp_player].lv_xPRecievedFromMinions + libGame_gv_players[lp_player].lv_xPRecievedFromCreeps)));
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "ExperienceFromTakedowns", FixedToInt(libGame_gv_players[lp_player].lv_xPRecievedFromHeroes));
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "ExperienceFromTownsDestroyed", FixedToInt(libGame_gv_players[lp_player].lv_xPRecievedFromStructures));
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "ExperienceFromRegenGlobes", FixedToInt(libGame_gv_players[lp_player].lv_xPRecievedFromRegenGlobe));
lv_trackedXPValueSum = (FixedToInt(libGame_gv_players[lp_player].lv_xPRecievedFromMinions) + FixedToInt(libGame_gv_players[lp_player].lv_xPRecievedFromCreeps) + FixedToInt(libGame_gv_players[lp_player].lv_xPRecievedFromHeroes) + FixedToInt(libGame_gv_players[lp_player].lv_xPRecievedFromStructures) + FixedToInt(libGame_gv_players[lp_player].lv_xPRecievedFromTrickle));
if (((libCore_gv_sYSGameMode == libCore_ge_GameModes_Normal) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_ArenaMode) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_AttackDefend)) && (AbsI((lv_earnedMetaXPValue - lv_trackedXPValueSum)) > 2)) {
TextExpressionSetToken("Param/Expression/lib_Game_63D9F63A", "A", IntToText(lp_player));
TextExpressionSetToken("Param/Expression/lib_Game_63D9F63A", "B", IntToText(lv_earnedMetaXPValue));
TextExpressionSetToken("Param/Expression/lib_Game_63D9F63A", "C", IntToText(lv_trackedXPValueSum));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_63D9F63A"), true);
}
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "TeamTownKills", libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lp_player)].lv_townKills);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "TeamMercCampCaptures", libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lp_player)].lv_map_MercCampCaptures);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "MercCampCaptures", libGame_gv_scoreValues[lp_player].lv_creepCampsCaptured);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "WatchTowerCaptures", libGame_gv_scoreValues[lp_player].lv_watchTowersCaptured);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "Level", libGame_gv_scoreValues[lp_player].lv_level);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "TownKills", libGame_gv_scoreValues[lp_player].lv_townKills);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "MinionKills", libGame_gv_scoreValues[lp_player].lv_minionKills);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "RegenGlobes", libGame_gv_scoreValues[lp_player].lv_regenGlobes);
lv_it_TalentTier = 1;
for ( ; ( (autoA70CB022_ai >= 0 && lv_it_TalentTier <= autoA70CB022_ae) || (autoA70CB022_ai < 0 && lv_it_TalentTier >= autoA70CB022_ae) ) ; lv_it_TalentTier += autoA70CB022_ai ) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, (("Tier" + IntToString(lv_it_TalentTier) + "Talent")), libGame_gv_talents_TalentChoices[lp_player][lv_it_TalentTier].lv_selection);
}
auto6381B585_val = libGame_gv_players[lv_heroIndex].lv_heroData.lv_expandedRole;
if (auto6381B585_val == 1) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysWarrior", 1);
}
else if (auto6381B585_val == 2) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysWarrior", 1);
}
else if (auto6381B585_val == 3) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysAssassin", 1);
}
else if (auto6381B585_val == 4) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysAssassin", 1);
}
else if (auto6381B585_val == 5) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysSupport", 1);
}
else if (auto6381B585_val == 6) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysSupport", 1);
}
else {
}
autoE4DEA447_val = libGame_gv_players[lv_heroIndex].lv_heroData.lv_universe;
if (autoE4DEA447_val == c_heroUniverseWarcraft) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysWarCraft", 1);
}
else if (autoE4DEA447_val == c_heroUniverseStarCraft) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysStarCraft", 1);
}
else if (autoE4DEA447_val == c_heroUniverseDiablo) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysDiablo", 1);
}
else if (autoE4DEA447_val == c_heroUniverseOverwatch) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysOverwatch", 1);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysOverwatchOrNexus", 1);
}
else if (autoE4DEA447_val == c_heroUniverseRetro) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysNexus", 1);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysOverwatchOrNexus", 1);
}
else {
}
auto4351418E_val = libGame_gv_players[lv_heroIndex].lv_heroData.lv_gender;
if (auto4351418E_val == c_heroGenderMale) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysMale", 1);
}
else if (auto4351418E_val == c_heroGenderFemale) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PlaysFemale", 1);
}
else {
}
if ((libGame_gv_players[lp_player].lv_victoryDefeat == c_gameOverVictory)) {
auto7FC2C1DC_val = libGame_gv_players[lv_heroIndex].lv_heroData.lv_expandedRole;
if (auto7FC2C1DC_val == 1) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "WinsWarrior", 1);
}
else if (auto7FC2C1DC_val == 2) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "WinsWarrior", 1);
}
else if (auto7FC2C1DC_val == 3) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "WinsAssassin", 1);
}
else if (auto7FC2C1DC_val == 4) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "WinsAssassin", 1);
}
else if (auto7FC2C1DC_val == 5) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "WinsSupport", 1);
}
else if (auto7FC2C1DC_val == 6) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "WinsSupport", 1);
}
else {
}
autoC92E084A_val = libGame_gv_players[lv_heroIndex].lv_heroData.lv_universe;
if (autoC92E084A_val == c_heroUniverseWarcraft) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "WinsWarcraft", 1);
}
else if (autoC92E084A_val == c_heroUniverseStarCraft) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "WinsStarCraft", 1);
}
else if (autoC92E084A_val == c_heroUniverseDiablo) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "WinsDiablo", 1);
}
else {
}
autoD6CBF14B_val = libGame_gv_players[lv_heroIndex].lv_heroData.lv_gender;
if (autoD6CBF14B_val == c_heroGenderMale) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "WinsMale", 1);
}
else if (autoD6CBF14B_val == c_heroGenderFemale) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "WinsFemale", 1);
}
else {
}
if ((libGame_gv_teams[lv_team].lv_teamPlayerCount == libCore_gv_bALMaxPlayersOnATeam)) {
lv_matchFound = true;
auto9665A00A_g = libGame_gv_teams[lv_team].lv_teamPlayerGroupNoNPCPlayers;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto9665A00A_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_universe != libGame_gv_players[lv_itPlayer].lv_heroData.lv_universe)) {
lv_matchFound = false;
break;
}
}
if ((lv_matchFound == true)) {
auto76440E23_val = libGame_gv_players[lv_heroIndex].lv_heroData.lv_universe;
if (auto76440E23_val == c_heroUniverseWarcraft) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "TeamWinsWarcraft", 1);
}
else if (auto76440E23_val == c_heroUniverseStarCraft) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "TeamWinsStarCraft", 1);
}
else if (auto76440E23_val == c_heroUniverseDiablo) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "TeamWinsDiablo", 1);
}
else {
}
}
lv_matchFound = true;
auto1B472315_g = libGame_gv_teams[lv_team].lv_teamPlayerGroupNoNPCPlayers;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto1B472315_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_gender != libGame_gv_players[lv_itPlayer].lv_heroData.lv_gender)) {
lv_matchFound = false;
break;
}
}
if ((lv_matchFound == true)) {
auto5D5836B4_val = libGame_gv_players[lv_heroIndex].lv_heroData.lv_gender;
if (auto5D5836B4_val == c_heroGenderMale) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "TeamWinsMale", 1);
}
else if (auto5D5836B4_val == c_heroGenderFemale) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "TeamWinsFemale", 1);
}
else {
}
}
}
}
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "RavenTeamNumberOfTimesCursedTheEnemy", libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lp_player)].lv_map_CursesPlacedOnEnemyTeam);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "DragonTeamNumberOfDragonCaptures", libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lp_player)].lv_map_DragonCaptures);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "MinesTeamSkullsCollected", libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lp_player)].lv_map_SkullsCollected);
if ((libGame_gv_scoreValues[lp_player].lv_deaths <= 3.0)) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "LessThan4Deaths", 1);
}
else {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "LessThan4Deaths", 0);
}
if ((libGame_gv_teams[libGame_gf_EnemyTeamNumberOfPlayer(lp_player)].lv_townKills <= 2)) {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "LessThan3TownStructuresLost", 1);
}
else {
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "LessThan3TownStructuresLost", 0);
}
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "PhysicalDamage", libGame_gv_scoreValues[lp_player].lv_physicalDamage);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "SpellDamage", libGame_gv_scoreValues[lp_player].lv_spellDamage);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "Multikill", libGame_gv_scoreValues[lp_player].lv_multikill);
}
void libGame_gf_ScoreValuesRecordXPContributionForPlayer (int lp_player, fixed lp_amount, bool lp_resetAfk) {
// Automatic Variable Declarations
// Implementation
if ((lp_player > libCore_gv_bALMaxPlayers)) {
return ;
}
libGame_gv_scoreValues[lp_player].lv_individualXPEarned += lp_amount;
libGame_gf_ScoreValuesReportIntegerValueAndLog(lp_player, "ExperienceContribution", FixedToInt(libGame_gv_scoreValues[lp_player].lv_individualXPEarned));
}
void libGame_gf_TalentsSetupTalentChoicesFromHeroDataForPlayer (int lp_heroIndex, int lp_player) {
// Variable Declarations
int lv_itTier;
int lv_itTalent;
int lv_itBehavior;
int lv_itAbilityMod;
int lv_itAbilityModChange;
string lv_heroID;
int lv_talentCount;
int lv_tier;
string lv_talentID;
int lv_column;
int lv_behaviorCount;
int lv_rank;
int lv_numberOfAbilitiesModified;
int lv_numberOfFieldsModified;
int lv_catalogInt;
int lv_changeTypeInt;
int lv_currentTalentModNumber;
// Automatic Variable Declarations
const int auto24231396_ae = libCore_gv_talents_MaxTiers_C;
const int auto24231396_ai = 1;
int autoB840BFC3_ae;
const int autoB840BFC3_ai = 1;
int auto192BBEE8_ae;
const int auto192BBEE8_ai = 1;
int auto38B17200_ae;
const int auto38B17200_ai = 1;
int autoDE132AE1_ae;
const int autoDE132AE1_ai = 1;
// Variable Initialization
lv_heroID = "";
lv_talentID = "";
// Implementation
if ((lp_player > 0) && (lp_player <= libCore_gv_bALMaxPlayers)) {
}
else {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_ED151A3E"), true);
return ;
}
lv_heroID = (libGame_gv_players[lp_player].lv_heroData.lv_heroCatalogLink);
lv_talentCount = CatalogFieldValueCount(c_gameCatalogHero, lv_heroID, "TalentTreeArray", c_playerAny);
lv_itTier = 1;
for ( ; ( (auto24231396_ai >= 0 && lv_itTier <= auto24231396_ae) || (auto24231396_ai < 0 && lv_itTier >= auto24231396_ae) ) ; lv_itTier += auto24231396_ai ) {
libGame_gv_talents_TalentChoices[lp_player][lv_itTier].lv_numberOfTalentsForThisTier = 0;
}
autoB840BFC3_ae = lv_talentCount;
lv_itTalent = 1;
for ( ; ( (autoB840BFC3_ai >= 0 && lv_itTalent <= autoB840BFC3_ae) || (autoB840BFC3_ai < 0 && lv_itTalent >= autoB840BFC3_ae) ) ; lv_itTalent += autoB840BFC3_ai ) {
lv_tier = CatalogFieldValueGetAsInt(c_gameCatalogHero, lv_heroID, "TalentTreeArray[" + IntToString((lv_itTalent - 1)) + "].Tier", c_playerAny);
lv_talentID = CatalogFieldValueGet(c_gameCatalogHero, lv_heroID, "TalentTreeArray[" + IntToString((lv_itTalent - 1)) + "].Talent", c_playerAny);
if (((lv_tier < 0) || (lv_tier > libCore_gv_talents_MaxTiers_C))) {
TextExpressionSetToken("Param/Expression/lib_Game_B44849DC", "A", StringToText(lv_heroID));
TextExpressionSetToken("Param/Expression/lib_Game_B44849DC", "B", IntToText((lv_itTalent - 1)));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_B44849DC"), true);
continue;
}
lv_column = CatalogFieldValueGetAsInt(c_gameCatalogHero, lv_heroID, "TalentTreeArray[" + IntToString((lv_itTalent - 1)) + "].Column", c_playerAny);
if ((lv_column > libCore_gv_talents_MaxTalentsPerTier_C)) {
TextExpressionSetToken("Param/Expression/lib_Game_F2B9CE61", "A", StringToText(lv_heroID));
TextExpressionSetToken("Param/Expression/lib_Game_F2B9CE61", "B", IntToText((lv_itTalent - 1)));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_F2B9CE61"), true);
continue;
}
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_numberOfTalentsForThisTier += 1;
if ((libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_numberOfTalentsForThisTier > libCore_gv_talents_MaxTalentsPerTier_C)) {
TextExpressionSetToken("Param/Expression/lib_Game_77AF763C", "A", StringToText(lv_talentID));
TextExpressionSetToken("Param/Expression/lib_Game_77AF763C", "B", IntToText(lv_tier));
TextExpressionSetToken("Param/Expression/lib_Game_77AF763C", "C", IntToText(libCore_gv_talents_MaxTalentsPerTier_C));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_77AF763C"), true);
continue;
}
if ((lv_column != libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_numberOfTalentsForThisTier)) {
TextExpressionSetToken("Param/Expression/lib_Game_E999ACA3", "A", StringToText(lv_heroID));
TextExpressionSetToken("Param/Expression/lib_Game_E999ACA3", "B", IntToText(lv_tier));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_E999ACA3"), true);
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_numberOfTalentsForThisTier = MaxI(libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_numberOfTalentsForThisTier, lv_column);
}
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_talentCatalogLink = (lv_talentID);
if ((CatalogFieldValueCount(c_gameCatalogTalent, lv_talentID, "RankArray", c_playerAny) != 0)) {
lv_behaviorCount = CatalogFieldValueCount(c_gameCatalogTalent, lv_talentID, "RankArray[" + IntToString(0) + "].BehaviorArray", c_playerAny);
}
else {
lv_behaviorCount = 0;
}
if ((lv_behaviorCount > libCore_gv_talents_MaxBehaviorsPerTalent_C)) {
TextExpressionSetToken("Param/Expression/lib_Game_04162B65", "A", StringToText(lv_talentID));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_04162B65"), true);
continue;
}
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_behaviorCount = lv_behaviorCount;
if ((lv_behaviorCount != 0)) {
auto192BBEE8_ae = lv_behaviorCount;
lv_itBehavior = 1;
for ( ; ( (auto192BBEE8_ai >= 0 && lv_itBehavior <= auto192BBEE8_ae) || (auto192BBEE8_ai < 0 && lv_itBehavior >= auto192BBEE8_ae) ) ; lv_itBehavior += auto192BBEE8_ai ) {
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_behaviors[lv_itBehavior] = (CatalogFieldValueGet(c_gameCatalogTalent, lv_talentID, "RankArray[" + IntToString(0) + "].BehaviorArray[" + IntToString((lv_itBehavior - 1)) + "]", c_playerAny));
}
}
if ((CatalogFieldValueCount(c_gameCatalogTalent, lv_talentID, "RankArray", c_playerAny) > libCore_gv_talents_MaxTalentRank_C)) {
TextExpressionSetToken("Param/Expression/lib_Game_76A0DE18", "A", StringToText(lv_talentID));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_76A0DE18"), false);
}
lv_rank = 1;
lv_currentTalentModNumber = 0;
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_totalModifications = 0;
lv_numberOfAbilitiesModified = CatalogFieldValueCount(c_gameCatalogTalent, lv_talentID, "AbilityModificationArray", c_playerAny);
auto38B17200_ae = lv_numberOfAbilitiesModified;
lv_itAbilityMod = 1;
for ( ; ( (auto38B17200_ai >= 0 && lv_itAbilityMod <= auto38B17200_ae) || (auto38B17200_ai < 0 && lv_itAbilityMod >= auto38B17200_ae) ) ; lv_itAbilityMod += auto38B17200_ai ) {
lv_numberOfFieldsModified = CatalogFieldValueCount(c_gameCatalogTalent, lv_talentID, "AbilityModificationArray[" + IntToString(lv_itAbilityMod - 1) + "].Modifications", c_playerAny);
autoDE132AE1_ae = lv_numberOfFieldsModified;
lv_itAbilityModChange = 1;
for ( ; ( (autoDE132AE1_ai >= 0 && lv_itAbilityModChange <= autoDE132AE1_ae) || (autoDE132AE1_ai < 0 && lv_itAbilityModChange >= autoDE132AE1_ae) ) ; lv_itAbilityModChange += autoDE132AE1_ai ) {
lv_currentTalentModNumber += 1;
if ((lv_currentTalentModNumber > libGame_gv_talents_DebugMaxModifedAbilites)) {
libGame_gv_talents_DebugMaxModifedAbilites = lv_currentTalentModNumber;
}
if ((lv_currentTalentModNumber > libCore_gv_talents_MaxModificationsPerTalent_C)) {
TextExpressionSetToken("Param/Expression/lib_Game_A454641D", "A", StringToText(lv_talentID));
TextExpressionSetToken("Param/Expression/lib_Game_A454641D", "B", IntToText((lv_rank - 1)));
TextExpressionSetToken("Param/Expression/lib_Game_A454641D", "C", IntToText(libCore_gv_talents_MaxModificationsPerTalent_C));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_A454641D"), true);
lv_currentTalentModNumber = libCore_gv_talents_MaxModificationsPerTalent_C;
continue;
}
lv_changeTypeInt = CatalogFieldValueGetAsInt(c_gameCatalogTalent, lv_talentID, "AbilityModificationArray[" + IntToString((lv_itAbilityMod - 1)) + "].Modifications[" + IntToString((lv_itAbilityModChange - 1)) + "].Type", c_playerAny);
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_abilityModificationData[lv_currentTalentModNumber].lv_changeType = lv_changeTypeInt;
lv_catalogInt = CatalogFieldValueGetAsInt(c_gameCatalogTalent, lv_talentID, "AbilityModificationArray[" + IntToString((lv_itAbilityMod - 1)) + "].Modifications[" + IntToString((lv_itAbilityModChange - 1)) + "].Catalog", c_playerAny);
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_abilityModificationData[lv_currentTalentModNumber].lv_catalog = lv_catalogInt;
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_abilityModificationData[lv_currentTalentModNumber].lv_field = CatalogFieldValueGet(c_gameCatalogTalent, lv_talentID, "AbilityModificationArray[" + IntToString((lv_itAbilityMod - 1)) + "].Modifications[" + IntToString((lv_itAbilityModChange - 1)) + "].Field", c_playerAny);
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_abilityModificationData[lv_currentTalentModNumber].lv_fieldIsInteger = (CatalogFieldValueGetAsInt(c_gameCatalogTalent, lv_talentID, "AbilityModificationArray[" + IntToString((lv_itAbilityMod - 1)) + "].Modifications[" + IntToString((lv_itAbilityModChange - 1)) + "].FieldIsInteger", c_playerAny) == 1);
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_abilityModificationData[lv_currentTalentModNumber].lv_value = CatalogFieldValueGetAsFixed(c_gameCatalogTalent, lv_talentID, "AbilityModificationArray[" + IntToString((lv_itAbilityMod - 1)) + "].Modifications[" + IntToString((lv_itAbilityModChange - 1)) + "].Value", c_playerAny);
if ((libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_abilityModificationData[lv_currentTalentModNumber].lv_changeType == c_talentModificationCatalogReplacement)) {
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_abilityModificationData[lv_currentTalentModNumber].lv_catalogReplaceFrom = CatalogFieldValueGet(c_gameCatalogTalent, lv_talentID, "AbilityModificationArray[" + IntToString((lv_itAbilityMod - 1)) + "].Modifications[" + IntToString((lv_itAbilityModChange - 1)) + "].Entry", c_playerAny);
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_abilityModificationData[lv_currentTalentModNumber].lv_catalogChangeTo = CatalogFieldValueGet(c_gameCatalogTalent, lv_talentID, "AbilityModificationArray[" + IntToString((lv_itAbilityMod - 1)) + "].Modifications[" + IntToString((lv_itAbilityModChange - 1)) + "].StringReplacement", c_playerAny);
}
else {
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_abilityModificationData[lv_currentTalentModNumber].lv_entry = CatalogFieldValueGet(c_gameCatalogTalent, lv_talentID, "AbilityModificationArray[" + IntToString((lv_itAbilityMod - 1)) + "].Modifications[" + IntToString((lv_itAbilityModChange - 1)) + "].Entry", c_playerAny);
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_abilityModificationData[lv_currentTalentModNumber].lv_stringReplacementValue = CatalogFieldValueGet(c_gameCatalogTalent, lv_talentID, "AbilityModificationArray[" + IntToString((lv_itAbilityMod - 1)) + "].Modifications[" + IntToString((lv_itAbilityModChange - 1)) + "].StringReplacement", c_playerAny);
}
}
}
if ((lv_numberOfAbilitiesModified > 0)) {
libGame_gv_talents_TalentChoices[lp_player][lv_tier].lv_talentData[lv_column].lv_totalModifications = lv_currentTalentModNumber;
}
}
}
void libGame_gf_TalentsRespecHeroForPlayer (int lp_player) {
// Variable Declarations
int lv_itTalent;
int lv_itChoice;
int lv_itButton;
int lv_itBehavior;
int lv_itRank;
int lv_itSlot;
unit lv_itHeroUnit;
int lv_itAzmo;
unit lv_heroUnit;
int lv_heroIndex;
int lv_currentRank;
string lv_removedBehavior;
// Automatic Variable Declarations
const int auto78D9F909_ae = libCore_gv_talents_MaxTiers_C;
const int auto78D9F909_ai = 1;
int auto1DF9E79D_ae;
const int auto1DF9E79D_ai = 1;
int auto6316811D_ae;
const int auto6316811D_ai = 1;
unitgroup autoFF6805AB_g;
int autoFF6805AB_u;
unitgroup auto9DEBA187_g;
int auto9DEBA187_u;
int auto70A8A24D_ae;
const int auto1D22FFB2_ae = libCore_gv_talents_MaxTiers_C;
const int auto1D22FFB2_ai = 1;
// Variable Initialization
// Implementation
lv_heroUnit = libGame_gv_players[lp_player].lv_heroUnit;
lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
lv_itChoice = 1;
for ( ; ( (auto78D9F909_ai >= 0 && lv_itChoice <= auto78D9F909_ae) || (auto78D9F909_ai < 0 && lv_itChoice >= auto78D9F909_ae) ) ; lv_itChoice += auto78D9F909_ai ) {
auto1DF9E79D_ae = libGame_gv_talents_TalentChoices[lp_player][lv_itChoice].lv_numberOfTalentsForThisTier;
lv_itButton = 1;
for ( ; ( (auto1DF9E79D_ai >= 0 && lv_itButton <= auto1DF9E79D_ae) || (auto1DF9E79D_ai < 0 && lv_itButton >= auto1DF9E79D_ae) ) ; lv_itButton += auto1DF9E79D_ai ) {
libGame_gf_RemoveTalentAbilityModificationsForPlayerAtTalent(lp_player, lv_itChoice, lv_itButton);
PlayerRemoveTalent(lp_player, libGame_gv_talents_TalentChoices[lp_player][lv_itChoice].lv_talentData[lv_itButton].lv_talentCatalogLink);
auto6316811D_ae = libGame_gv_talents_TalentChoices[lp_player][lv_itChoice].lv_talentData[lv_itButton].lv_behaviorCount;
lv_itBehavior = 1;
for ( ; ( (auto6316811D_ai >= 0 && lv_itBehavior <= auto6316811D_ae) || (auto6316811D_ai < 0 && lv_itBehavior >= auto6316811D_ae) ) ; lv_itBehavior += auto6316811D_ai ) {
autoFF6805AB_g = libGame_gv_players[lp_player].lv_heroUnitGroup;
autoFF6805AB_u = UnitGroupCount(autoFF6805AB_g, c_unitCountAll);
for (;; autoFF6805AB_u -= 1) {
lv_itHeroUnit = UnitGroupUnitFromEnd(autoFF6805AB_g, autoFF6805AB_u);
if (lv_itHeroUnit == null) { break; }
UnitBehaviorRemove(lv_itHeroUnit, libGame_gv_talents_TalentChoices[lp_player][lv_itChoice].lv_talentData[lv_itButton].lv_behaviors[lv_itBehavior], 1);
}
}
}
}
auto9DEBA187_g = libGame_gv_players[lp_player].lv_heroUnitGroup;
auto9DEBA187_u = UnitGroupCount(auto9DEBA187_g, c_unitCountAll);
for (;; auto9DEBA187_u -= 1) {
lv_itHeroUnit = UnitGroupUnitFromEnd(auto9DEBA187_g, auto9DEBA187_u);
if (lv_itHeroUnit == null) { break; }
auto70A8A24D_ae = UnitBehaviorCountAll(lv_itHeroUnit);
lv_itBehavior = 1;
for ( ; lv_itBehavior <= auto70A8A24D_ae ; lv_itBehavior += 1 ) {
if ((UnitBehaviorHasCategoryFlag(UnitBehaviorGet(lv_itHeroUnit, lv_itBehavior), c_behaviorCategoryQuest) == true)) {
lv_removedBehavior = UnitBehaviorGet(lv_itHeroUnit, lv_itBehavior);
UnitBehaviorRemove(lv_itHeroUnit, lv_removedBehavior, 1);
UnitBehaviorAdd(lv_itHeroUnit, lv_removedBehavior, lv_itHeroUnit, 1);
}
}
}
if ((UnitGetType(lv_heroUnit) == "HeroSgtHammer")) {
UnitCreateEffectUnit(lv_heroUnit, "SiegeModeRemoveSet", lv_heroUnit);
}
lv_itChoice = 1;
for ( ; ( (auto1D22FFB2_ai >= 0 && lv_itChoice <= auto1D22FFB2_ae) || (auto1D22FFB2_ai < 0 && lv_itChoice >= auto1D22FFB2_ae) ) ; lv_itChoice += auto1D22FFB2_ai ) {
TalentTreeClearTier(lp_player, lv_itChoice);
libGame_gv_talents_TalentChoices[lp_player][lv_itChoice].lv_selection = 0;
}
libGame_gf_TalentsUpdateChoicePanelForPlayer(lp_player);
ShowTalentPanel(PlayerGroupSingle(lp_player), true, 1);
libGame_gf_SendEventHeroRespecsTalents(lp_player);
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_players[lp_player].lv_heroUnit), (("Signal " + "TalentRespec")));
}
void libGame_gf_TalentsUpdateChoicePanelForPlayer (int lp_player) {
// Variable Declarations
int lv_itChoice;
int lv_heroIndex;
int lv_playerLevel;
int lv_currentChoice;
// Automatic Variable Declarations
const int auto50211B8D_ae = libCore_gv_talents_MaxTiers_C;
const int auto50211B8D_ai = 1;
// Variable Initialization
// Implementation
lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
lv_playerLevel = UnitLevel(libGame_gv_players[lp_player].lv_heroUnit);
lv_itChoice = 1;
for ( ; ( (auto50211B8D_ai >= 0 && lv_itChoice <= auto50211B8D_ae) || (auto50211B8D_ai < 0 && lv_itChoice >= auto50211B8D_ae) ) ; lv_itChoice += auto50211B8D_ai ) {
if ((libGame_gv_talents_TalentChoices[lp_player][lv_itChoice].lv_selection == 0) && (lv_playerLevel >= libGame_gv_players[lp_player].lv_talents_TierLevels[lv_itChoice].lv_level) && (GetTalentTierEnabled(lv_itChoice) == true)) {
lv_currentChoice = lv_itChoice;
break;
}
}
libGame_gv_talents_ActiveChoiceTierForPlayer[lp_player] = lv_currentChoice;
if ((libCore_gv_tUTTalentsAutobuyOn == false)) {
if ((lv_currentChoice >= 1)) {
DialogControlSendAnimationEvent(libUIUI_gv_uIGameUIHandles.lv_gameUIContainer, PlayerGroupSingle(lp_player), "TalentsAvailable");
if ((libCore_gv_sYSGameMode != libCore_ge_GameModes_Tutorial1) && (libCore_gv_sYSGameMode != libCore_ge_GameModes_AttackDefend) && (libMapM_gf_MapMechanicIntroFinished(lp_player) == true) && (lv_playerLevel > 1) && (libGame_gv_talents_PlayChooseATalentSound == true)) {
libSond_gf_SoundAnnouncerVOPlayAnnouncerVOForPlayer(libCore_ge_AnnouncerVOEvents_TalentUnlocked, lp_player);
}
SoundPlayForPlayer(SoundLink("UI_Game_PickTalentSound", -1), c_maxPlayers, PlayerGroupSingle(lp_player), 100.0, 0.0);
libGame_gf_SendEventTalentPanelVisibilityChanged(lp_player, true);
}
else {
DialogControlSendAnimationEvent(libUIUI_gv_uIGameUIHandles.lv_gameUIContainer, PlayerGroupSingle(lp_player), "TalentsNotAvailable");
libGame_gf_SendEventTalentPanelVisibilityChanged(lp_player, false);
}
}
}
void libGame_gf_TalentsChooseTalentForPlayer (int lp_tierIndex, int lp_buttonIndex, int lp_player) {
// Variable Declarations
int lv_itBehavior;
unit lv_heroUnit;
// Automatic Variable Declarations
int auto5F4D4827_ae;
const int auto5F4D4827_ai = 1;
// Variable Initialization
// Implementation
lv_heroUnit = libGame_gv_players[lp_player].lv_heroUnit;
libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_selection = lp_buttonIndex;
if ((!((((libCore_gv_sYSGameMode == libCore_ge_GameModes_Tutorial1) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_TutorialMapMechanics)) && (lp_player >= 6) && (lp_player <= 10))))) {
auto5F4D4827_ae = libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_behaviorCount;
lv_itBehavior = 1;
for ( ; ( (auto5F4D4827_ai >= 0 && lv_itBehavior <= auto5F4D4827_ae) || (auto5F4D4827_ai < 0 && lv_itBehavior >= auto5F4D4827_ae) ) ; lv_itBehavior += auto5F4D4827_ai ) {
UnitBehaviorAdd(lv_heroUnit, libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_behaviors[lv_itBehavior], lv_heroUnit, 1);
}
libGame_gf_SendEventHeroGainTalent((libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_talentCatalogLink), lp_player);
libGame_gf_ApplyAbilityModificationsForPlayerAtTalent(lp_player, lp_tierIndex, lp_buttonIndex);
}
StatEventCreate("TalentChosen");
StatEventAddDataInt(StatEventLastCreated(), "PlayerID", lp_player);
StatEventAddDataString(StatEventLastCreated(), "PurchaseName", (libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_talentCatalogLink));
StatEventSend(StatEventLastCreated());
PlayerAddTalent(lp_player, libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_talentCatalogLink);
TalentTreeSetSelectedHeroTalent(lp_player, lp_tierIndex, lp_buttonIndex);
libGame_gf_TalentsUpdateChoicePanelForPlayer(lp_player);
libUIUI_gf_UIPartyFrameHeroicTalentUpdate(lp_player, lp_tierIndex);
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_players[lp_player].lv_heroUnit), (("Signal " + (libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_talentCatalogLink))));
}
void libGame_gf_InitializeTeleporterPetList () {
// Automatic Variable Declarations
// Implementation
libGame_gv_teleporters_PetList[1] = "ArthasArmyOfTheDeadGhoul";
libGame_gv_teleporters_PetList[2] = "JainaWaterElemental";
libGame_gv_teleporters_PetList[3] = "StitchesRetchling";
libGame_gv_teleporters_PetList[4] = "RaynorRaynorsBanshee";
libGame_gv_teleporters_PetList[5] = "KerriganUltralisk";
libGame_gv_teleporters_PetListLength = 5;
}
void libGame_gf_TeleportPetstoHeroLocation (int lp_player, point lp_preTeleportLocation) {
// Variable Declarations
unit lv_heroUnit;
unit lv_petUnit;
int lv_petTypeIndex;
// Automatic Variable Declarations
unitgroup auto48CAF3D1_g;
int auto48CAF3D1_u;
int autoD4AD6D45_ae;
const int autoD4AD6D45_ai = 1;
// Variable Initialization
lv_heroUnit = libGame_gv_players[lp_player].lv_heroUnit;
// Implementation
if ((libGame_gv_teleporters_PetListLength == 0)) {
libGame_gf_InitializeTeleporterPetList();
}
if ((UnitIsValid(libGDHL_gv_rexxarMishaUnit[lp_player]) == true)) {
UnitSetPosition(libGDHL_gv_rexxarMishaUnit[lp_player], UnitGetPosition(lv_heroUnit), false);
UnitIssueOrder(libGDHL_gv_rexxarMishaUnit[lp_player], Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
}
auto48CAF3D1_g = libGame_gv_players[lp_player].lv_summonedUnitGroup;
auto48CAF3D1_u = UnitGroupCount(auto48CAF3D1_g, c_unitCountAll);
for (;; auto48CAF3D1_u -= 1) {
lv_petUnit = UnitGroupUnitFromEnd(auto48CAF3D1_g, auto48CAF3D1_u);
if (lv_petUnit == null) { break; }
autoD4AD6D45_ae = libGame_gv_teleporters_PetListLength;
lv_petTypeIndex = 1;
for ( ; ( (autoD4AD6D45_ai >= 0 && lv_petTypeIndex <= autoD4AD6D45_ae) || (autoD4AD6D45_ai < 0 && lv_petTypeIndex >= autoD4AD6D45_ae) ) ; lv_petTypeIndex += autoD4AD6D45_ai ) {
if ((UnitIsValid(lv_petUnit) == true) && (UnitGetType(lv_petUnit) == libGame_gv_teleporters_PetList[lv_petTypeIndex]) && (DistanceBetweenPoints(UnitGetPosition(lv_petUnit), lp_preTeleportLocation) <= 8.0)) {
UnitSetPosition(lv_petUnit, UnitGetPosition(lv_heroUnit), false);
UnitIssueOrder(lv_petUnit, Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
}
}
}
}
void libGame_gf_ModifyTokenCount (int lp_modification, string lp_tokenCounterBehavior, unit lp_unit) {
// Variable Declarations
int lv_count;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_count = FixedToInt(UnitGetTokenCount(lp_unit, (lp_tokenCounterBehavior)));
lv_count += lp_modification;
UnitSetTokenCount(lp_unit, (lp_tokenCounterBehavior), lv_count, lp_unit);
}
void libGame_gf_ResetTokenCount (string lp_tokenCounterBehavior, unit lp_unit) {
// Variable Declarations
int lv_defaultValue;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
lv_defaultValue = CatalogFieldValueGetAsInt(c_gameCatalogBehavior, lp_tokenCounterBehavior, "Min", libCore_gv_cOMPUTER_Neutral);
UnitSetTokenCount(lp_unit, (lp_tokenCounterBehavior), lv_defaultValue, lp_unit);
}
void libGame_gf_TownAddStructureToTownArray (int lp_townIndex, unit lp_structureUnit, int lp_structurePresetValue, int lp_enemyTeam) {
// Variable Declarations
int lv_structureIndex;
// Automatic Variable Declarations
int auto3FC7CD85_val;
// Variable Initialization
// Implementation
if ((lp_structurePresetValue != libGame_ge_TownStructureTypes_None)) {
libGame_gv_townTownData[lp_townIndex].lv_structureCount += 1;
lv_structureIndex = libGame_gv_townTownData[lp_townIndex].lv_structureCount;
UnitSetCustomValue(lp_structureUnit, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_TownIndex), lp_townIndex);
UnitSetCustomValue(lp_structureUnit, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_TownStructureIndex), lv_structureIndex);
UnitSetCustomValue(lp_structureUnit, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_LaneIndex), libGame_gv_townTownData[lp_townIndex].lv_lane);
libGame_gv_townTownData[lp_townIndex].lv_structureTypes[lv_structureIndex] = lp_structurePresetValue;
libGame_gv_townTownData[lp_townIndex].lv_structureUnits[lv_structureIndex] = lp_structureUnit;
libGame_gv_townTownData[lp_townIndex].lv_structureUnitIDs[lv_structureIndex] = UnitGetType(lp_structureUnit);
libGame_gv_townTownData[lp_townIndex].lv_structureSpawnPoints[lv_structureIndex] = UnitGetPosition(lp_structureUnit);
auto3FC7CD85_val = lp_structurePresetValue;
if (auto3FC7CD85_val == libGame_ge_TownStructureTypes_TownHall) {
libGame_gv_townTownData[lp_townIndex].lv_townHallIndex = lv_structureIndex;
libGame_gv_townTownData[lp_townIndex].lv_townHallPosition = UnitGetPosition(lp_structureUnit);
libGame_gv_townTownData[lp_townIndex].lv_structuresAlive += 1;
}
else if (auto3FC7CD85_val == libGame_ge_TownStructureTypes_CannonTower) {
libGame_gv_townTownData[lp_townIndex].lv_structuresAlive += 1;
}
else if (auto3FC7CD85_val == libGame_ge_TownStructureTypes_Gate) {
libGame_gv_townTownData[lp_townIndex].lv_structuresAlive += 1;
}
else if (auto3FC7CD85_val == libGame_ge_TownStructureTypes_Moonwell) {
libGame_gv_townTownData[lp_townIndex].lv_structuresAlive += 1;
}
else {
}
}
}
int libGame_gf_TownGetTownForUnit (unit lp_unit) {
// Automatic Variable Declarations
// Implementation
return FixedToInt(UnitGetCustomValue(lp_unit, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_TownIndex)));
}
int libGame_gf_TownGetTownStructureIndexForUnit (unit lp_unit) {
// Automatic Variable Declarations
// Implementation
return FixedToInt(UnitGetCustomValue(lp_unit, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_TownStructureIndex)));
}
int libGame_gf_TownGetTownStructurePresetFromUnit (unit lp_unit) {
// Variable Declarations
string lv_unitType;
// Automatic Variable Declarations
// Variable Initialization
lv_unitType = UnitGetType(lp_unit);
// Implementation
if ((UnitTypeTestFlag(lv_unitType, c_unitFlagTownStructureWall) == true)) {
return libGame_ge_TownStructureTypes_Wall;
}
else if ((UnitTypeTestFlag(lv_unitType, c_unitFlagTownStructureGate) == true)) {
return libGame_ge_TownStructureTypes_Gate;
}
else if ((UnitTypeTestFlag(lv_unitType, c_unitFlagTownStructureMoonwell) == true)) {
return libGame_ge_TownStructureTypes_Moonwell;
}
else if ((UnitTypeTestFlag(lv_unitType, c_unitFlagTownStructureCannonTower) == true)) {
return libGame_ge_TownStructureTypes_CannonTower;
}
else if ((UnitTypeTestFlag(lv_unitType, c_unitFlagTownStructureTownHall) == true)) {
return libGame_ge_TownStructureTypes_TownHall;
}
else if ((UnitTypeTestFlag(lv_unitType, c_unitFlagTownStructureCore) == true)) {
return libGame_ge_TownStructureTypes_Core;
}
return libGame_ge_TownStructureTypes_None;
}
int libGame_gf_TownGetTownHallPresetFromUnitID (string lp_unitType) {
// Automatic Variable Declarations
string auto92E62C3D_val;
// Implementation
auto92E62C3D_val = lp_unitType;
if (auto92E62C3D_val == "TownTownHallL2") {
return libGame_ge_TownHallTypes_FrontTown;
}
else if (auto92E62C3D_val == "TownTownHallL3") {
return libGame_ge_TownHallTypes_BackTown;
}
else {
return libGame_ge_TownHallTypes_None;
}
}
int libGame_gf_TownGetTownFromPoint (point lp_point) {
// Variable Declarations
int lv_town;
// Automatic Variable Declarations
int auto89A0A625_ae;
const int auto89A0A625_ai = 1;
// Variable Initialization
// Implementation
auto89A0A625_ae = libGame_gv_townTownCount;
lv_town = 1;
for ( ; ( (auto89A0A625_ai >= 0 && lv_town <= auto89A0A625_ae) || (auto89A0A625_ai < 0 && lv_town >= auto89A0A625_ae) ) ; lv_town += auto89A0A625_ai ) {
if ((RegionContainsPoint(libGame_gv_townTownData[lv_town].lv_townRegion, lp_point) == true)) {
return lv_town;
}
}
return 0;
}
bool libGame_gf_TownTownIsAlive (int lp_town, int lp_player) {
// Variable Declarations
unitgroup lv_buildings;
// Automatic Variable Declarations
// Variable Initialization
lv_buildings = UnitGroupEmpty();
// Implementation
lv_buildings = UnitGroup(null, lp_player, libGame_gv_townTownData[lp_town].lv_townRegion, UnitFilter((1 << c_targetFilterStructure), 0, (1 << c_targetFilterNoMinionAggro) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
return !(libNtve_gf_UnitGroupIsDead(lv_buildings));
}
unit libGame_gf_TownTownHall (int lp_town) {
// Automatic Variable Declarations
// Implementation
return libGame_gv_townTownData[lp_town].lv_structureUnits[libGame_gv_townTownData[lp_town].lv_townHallIndex];
}
void libGame_gf_TownUpgradeBruiserMinions (int lp_town) {
// Variable Declarations
int lv_team;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if ((libGame_gv_townTownData[lp_town].lv_owner == libCore_gv_cOMPUTER_TeamOrder)) {
lv_team = 2;
}
else {
lv_team = 1;
}
libGame_gv_laneData[libGame_gv_townTownData[lp_town].lv_lane].lv_bruiserMinionLevel[lv_team] += 1;
}
void libGame_gf_TownAnnounceTownDestroyed (int lp_town, int lp_townType) {
// Variable Declarations
int lv_townHallIndex;
// Automatic Variable Declarations
int auto77C5AA67_val;
int auto9AC08F08_val;
// Variable Initialization
// Implementation
lv_townHallIndex = libGame_gv_townTownData[lp_town].lv_townHallIndex;
if ((lv_townHallIndex < 0)) {
return ;
}
SoundPlayForPlayer(SoundLink("UI_Game_Fort_Death", -1), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
if ((libGame_gv_townTownData[lp_town].lv_owner == libCore_gv_cOMPUTER_TeamOrder)) {
MinimapPing(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, libGame_gv_townTownData[lp_town].lv_structureSpawnPoints[lv_townHallIndex], 5.0, libCore_gv_cOLOREnemyColor);
MinimapPing(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, libGame_gv_townTownData[lp_town].lv_structureSpawnPoints[lv_townHallIndex], 5.0, libCore_gv_cOLORAllyColor);
SoundtrackPlay(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, c_soundtrackCategoryMusic, "MX_Stinger_TownDestroyed_Ally", c_soundtrackCueAny, c_soundtrackIndexAny, false);
SoundtrackPlay(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, c_soundtrackCategoryMusic, "MX_Stinger_TownDestroyed_Enemy", c_soundtrackCueAny, c_soundtrackIndexAny, false);
auto77C5AA67_val = lp_townType;
if (auto77C5AA67_val == libGame_ge_TownHallTypes_FrontTown) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_AlliedOutpostDestroyed, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_EnemyOutpostDestroyed, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_RedTeamDestroysTown, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
else if (auto77C5AA67_val == libGame_ge_TownHallTypes_BackTown) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_AlliedKeepDestroyed, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_EnemyKeepDestroyed, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_RedTeamDestroysTown, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
else {
}
}
else {
MinimapPing(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, libGame_gv_townTownData[lp_town].lv_structureSpawnPoints[lv_townHallIndex], 5.0, libCore_gv_cOLORAllyColor);
MinimapPing(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, libGame_gv_townTownData[lp_town].lv_structureSpawnPoints[lv_townHallIndex], 5.0, libCore_gv_cOLOREnemyColor);
SoundtrackPlay(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, c_soundtrackCategoryMusic, "MX_Stinger_TownDestroyed_Enemy", c_soundtrackCueAny, c_soundtrackIndexAny, false);
SoundtrackPlay(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, c_soundtrackCategoryMusic, "MX_Stinger_TownDestroyed_Ally", c_soundtrackCueAny, c_soundtrackIndexAny, false);
auto9AC08F08_val = lp_townType;
if (auto9AC08F08_val == libGame_ge_TownHallTypes_FrontTown) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_EnemyOutpostDestroyed, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_AlliedOutpostDestroyed, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_BlueTeamDestroysTown, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
else if (auto9AC08F08_val == libGame_ge_TownHallTypes_BackTown) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_EnemyKeepDestroyed, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_AlliedKeepDestroyed, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_BlueTeamDestroysTown, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
else {
}
}
}
void libGame_gf_TownAddMoonwellMinimapIconstoTown (int lp_townIndex) {
// Automatic Variable Declarations
int auto36FCCF4F_ae;
int auto36FCCF4F_var;
// Implementation
auto36FCCF4F_ae = libGame_gv_townTownData[lp_townIndex].lv_structureCount;
auto36FCCF4F_var = 1;
for ( ; auto36FCCF4F_var <= auto36FCCF4F_ae; auto36FCCF4F_var += 1 ) {
if ((libGame_gf_TownGetTownStructurePresetFromUnit(libGame_gv_townTownData[lp_townIndex].lv_structureUnits[auto36FCCF4F_var]) == libGame_ge_TownStructureTypes_TownHall)) {
DialogControlHookupMinimapUnitStatus(c_triggerControlTypePanel, "$this", libGame_gv_townTownData[lp_townIndex].lv_structureUnits[auto36FCCF4F_var]);
if ((libGame_gv_townTownData[lp_townIndex].lv_owner == libCore_gv_cOMPUTER_TeamOrder)) {
DialogControlSetAnimationState(DialogControlLastCreated(), PlayerGroupAll(), "MoonwellIndicator", "Left");
}
else {
DialogControlSetAnimationState(DialogControlLastCreated(), PlayerGroupAll(), "MoonwellIndicator", "Right");
}
}
}
}
void libGame_gf_TownRemoveMoonwellMinimapIconsFromTown (int lp_townIndex) {
// Automatic Variable Declarations
int auto15527A5B_ae;
int auto15527A5B_var;
// Implementation
auto15527A5B_ae = libGame_gv_townTownData[lp_townIndex].lv_structureCount;
auto15527A5B_var = 1;
for ( ; auto15527A5B_var <= auto15527A5B_ae; auto15527A5B_var += 1 ) {
if ((libGame_gf_TownGetTownStructurePresetFromUnit(libGame_gv_townTownData[lp_townIndex].lv_structureUnits[auto15527A5B_var]) == libGame_ge_TownStructureTypes_TownHall) && (UnitIsAlive(libGame_gv_townTownData[lp_townIndex].lv_structureUnits[auto15527A5B_var]) == true)) {
DialogControlHookupMinimapUnitStatus(c_triggerControlTypePanel, "$this", libGame_gv_townTownData[lp_townIndex].lv_structureUnits[auto15527A5B_var]);
DialogControlSetAnimationState(DialogControlLastCreated(), PlayerGroupAll(), "MoonwellIndicator", "None");
}
}
}
void libGame_gf_TownHideMinimapIconsOnMoonwellUnits (int lp_townIndex) {
// Automatic Variable Declarations
int autoBB5EACC1_ae;
int autoBB5EACC1_var;
// Implementation
autoBB5EACC1_ae = libGame_gv_townTownData[lp_townIndex].lv_structureCount;
autoBB5EACC1_var = 1;
for ( ; autoBB5EACC1_var <= autoBB5EACC1_ae; autoBB5EACC1_var += 1 ) {
if ((libGame_gf_TownGetTownStructurePresetFromUnit(libGame_gv_townTownData[lp_townIndex].lv_structureUnits[autoBB5EACC1_var]) == libGame_ge_TownStructureTypes_Moonwell) && (UnitIsAlive(libGame_gv_townTownData[lp_townIndex].lv_structureUnits[autoBB5EACC1_var]) == true)) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_townTownData[lp_townIndex].lv_structureUnits[autoBB5EACC1_var], "Signal HideMinimapIcon");
}
}
}
void libGame_gf_TownUnhideMinimapIconsOnMoonwellUnits (int lp_townIndex) {
// Automatic Variable Declarations
int auto44E10018_ae;
int auto44E10018_var;
// Implementation
auto44E10018_ae = libGame_gv_townTownData[lp_townIndex].lv_structureCount;
auto44E10018_var = 1;
for ( ; auto44E10018_var <= auto44E10018_ae; auto44E10018_var += 1 ) {
if ((libGame_gf_TownGetTownStructurePresetFromUnit(libGame_gv_townTownData[lp_townIndex].lv_structureUnits[auto44E10018_var]) == libGame_ge_TownStructureTypes_Moonwell) && (UnitIsAlive(libGame_gv_townTownData[lp_townIndex].lv_structureUnits[auto44E10018_var]) == true)) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_townTownData[lp_townIndex].lv_structureUnits[auto44E10018_var], "Signal RevealMinimapIcon");
}
}
}
void libGame_gf_TownTurnOnOffBasicMinimapHealthMonitor (bool lp_turnOnOff) {
// Automatic Variable Declarations
// Implementation
if ((lp_turnOnOff != libGame_gv_townBasicMinimapHealthMontior)) {
libGame_gv_townBasicMinimapHealthMontior = lp_turnOnOff;
if ((lp_turnOnOff == true)) {
}
}
}
void libGame_gf_ControlGroupsEnterVehicleLostVikings (unit lp_vehicle, unit lp_hero, int lp_player) {
// Variable Declarations
int lv_controlGroup;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if ((UnitGetType(lp_hero) == "HeroOlaf")) {
lv_controlGroup = 1;
}
else if ((UnitGetType(lp_hero) == "HeroBaleog")) {
lv_controlGroup = 2;
}
else if ((UnitGetType(lp_hero) == "HeroErik")) {
lv_controlGroup = 3;
}
UnitControlGroupAddUnit(lp_player, lv_controlGroup, lp_vehicle);
UnitControlGroupAddUnit(lp_player, 4, lp_vehicle);
UnitControlGroupRemoveUnit(lp_player, lv_controlGroup, lp_hero);
UnitControlGroupRemoveUnit(lp_player, 4, lp_hero);
}
void libGame_gf_ControlGroupsExitVehicleLostVikings (unit lp_vehicle, unit lp_hero, int lp_player) {
// Variable Declarations
int lv_controlGroup;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if ((UnitGetType(lp_hero) == "HeroOlaf")) {
lv_controlGroup = 1;
}
else if ((UnitGetType(lp_hero) == "HeroBaleog")) {
lv_controlGroup = 2;
}
else if ((UnitGetType(lp_hero) == "HeroErik")) {
lv_controlGroup = 3;
}
UnitControlGroupAddUnit(lp_player, lv_controlGroup, lp_hero);
UnitControlGroupAddUnit(lp_player, 4, lp_hero);
UnitControlGroupRemoveUnit(lp_player, lv_controlGroup, lp_vehicle);
UnitControlGroupRemoveUnit(lp_player, 4, lp_vehicle);
}
void libGame_gf_ControlGroupsSwapVehicleLostVikings (unit lp_originVehicle, unit lp_newVehicle, int lp_player) {
// Variable Declarations
unit lv_passengerHero;
int lv_controlGroup;
// Automatic Variable Declarations
// Variable Initialization
lv_passengerHero = libMapM_gv_vehicle[libMapM_gf_GetVehicleIndexOfUnit(lp_newVehicle)].lv_unit_UnitInsideVehicle;
// Implementation
if ((UnitGetType(lv_passengerHero) == "HeroOlaf")) {
lv_controlGroup = 1;
}
else if ((UnitGetType(lv_passengerHero) == "HeroBaleog")) {
lv_controlGroup = 2;
}
else if ((UnitGetType(lv_passengerHero) == "HeroErik")) {
lv_controlGroup = 3;
}
UnitControlGroupAddUnit(lp_player, lv_controlGroup, lp_newVehicle);
UnitControlGroupAddUnit(lp_player, 4, lp_newVehicle);
UnitControlGroupRemoveUnit(lp_player, lv_controlGroup, lp_originVehicle);
UnitControlGroupRemoveUnit(lp_player, 4, lp_originVehicle);
}
void libGame_gf_ControlGroupsEnterVehicleSamuro (unit lp_vehicle, unit lp_hero, int lp_player) {
// Automatic Variable Declarations
// Implementation
UnitControlGroupAddUnit(lp_player, 1, lp_vehicle);
UnitControlGroupAddUnit(lp_player, 4, lp_vehicle);
UnitControlGroupRemoveUnit(lp_player, 1, lp_hero);
UnitControlGroupRemoveUnit(lp_player, 4, lp_hero);
UnitBehaviorAdd(lp_vehicle, "SamuroIllusionMasterToggleAIBehaviorAbil", lp_vehicle, 1);
}
void libGame_gf_ControlGroupsExitVehicleSamuro (unit lp_vehicle, unit lp_hero, int lp_player) {
// Automatic Variable Declarations
// Implementation
UnitBehaviorRemove(lp_vehicle, "SamuroIllusionMasterToggleAIBehaviorAbil", 1);
UnitControlGroupAddUnit(lp_player, 1, lp_hero);
UnitControlGroupAddUnit(lp_player, 4, lp_hero);
UnitControlGroupRemoveUnit(lp_player, 1, lp_vehicle);
UnitControlGroupRemoveUnit(lp_player, 4, lp_vehicle);
}
void libGame_gf_ControlGroupsSwapVehicleSamuro (unit lp_originVehicle, unit lp_newVehicle, int lp_player) {
// Automatic Variable Declarations
// Implementation
UnitControlGroupAddUnit(lp_player, 1, lp_newVehicle);
UnitControlGroupAddUnit(lp_player, 4, lp_newVehicle);
UnitControlGroupRemoveUnit(lp_player, 1, lp_originVehicle);
UnitControlGroupRemoveUnit(lp_player, 4, lp_originVehicle);
UnitBehaviorRemove(lp_originVehicle, "SamuroIllusionMasterToggleAIBehaviorAbil", 1);
UnitBehaviorAdd(lp_newVehicle, "SamuroIllusionMasterToggleAIBehaviorAbil", lp_newVehicle, 1);
}
void libGame_gf_UnitSelectionEnterVehicle (unit lp_vehicle, unit lp_hero, int lp_player) {
// Variable Declarations
unitgroup lv_selectedUnits;
// Automatic Variable Declarations
unitgroup autoC37B1399_g;
int autoC37B1399_u;
unit autoC37B1399_var;
// Variable Initialization
lv_selectedUnits = UnitGroupCopy(UnitGroupSelected(lp_player));
// Implementation
UnitBehaviorAdd(lp_hero, "HeroGenericTimeStopListener", lp_vehicle, 1);
autoC37B1399_g = lv_selectedUnits;
autoC37B1399_u = UnitGroupCount(autoC37B1399_g, c_unitCountAll);
for (;; autoC37B1399_u -= 1) {
autoC37B1399_var = UnitGroupUnitFromEnd(autoC37B1399_g, autoC37B1399_u);
if (autoC37B1399_var == null) { break; }
if ((UnitGetType(autoC37B1399_var) == "KaelthasPhoenix") && (UnitGetType(autoC37B1399_var) == "RexxarMisha")) {
UnitGroupRemove(lv_selectedUnits, autoC37B1399_var);
}
}
if ((UnitGroupCount(lv_selectedUnits, c_unitCountAll) == 1) && (UnitIsSelected(lp_hero, lp_player) == true)) {
libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn = libNtve_gf_ConvertUnitToUnitGroup(lp_vehicle);
libGame_gf_CameraUpdateCameraForPlayer(lp_player);
}
if ((UnitIsSelected(lp_hero, lp_player) == true)) {
UnitSelect(lp_hero, lp_player, false);
UnitSelect(lp_vehicle, lp_player, true);
}
if ((PlayerHero(lp_player) == "LostVikings")) {
libGame_gf_ControlGroupsEnterVehicleLostVikings(lp_vehicle, lp_hero, lp_player);
}
if ((PlayerHero(lp_player) == "Samuro") && (PlayerHasTalent(lp_player, "SamuroHeroicAbilityIllusionMaster") == true)) {
libGame_gf_ControlGroupsEnterVehicleSamuro(lp_vehicle, lp_hero, lp_player);
}
}
void libGame_gf_UnitSelectionExitVehicle (unit lp_vehicle, unit lp_hero, int lp_player) {
// Variable Declarations
int lv_index_Vehicle;
int lv_index_LinkedVehicle;
// Automatic Variable Declarations
// Variable Initialization
lv_index_Vehicle = libMapM_gf_GetVehicleIndexOfUnit(lp_vehicle);
lv_index_LinkedVehicle = libMapM_gf_GetVehicleIndexOfUnit(libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_LinkedVehicle);
// Implementation
UnitBehaviorRemove(lp_hero, "HeroGenericTimeStopListener", 1);
if (((UnitIsSelected(lp_vehicle, lp_player) == true) || (UnitIsSelected(libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_LinkedVehicle, lp_player) == true))) {
UnitSelect(lp_vehicle, lp_player, false);
UnitSelect(lp_hero, lp_player, true);
if ((libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn == libNtve_gf_ConvertUnitToUnitGroup(lp_vehicle))) {
libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn = libNtve_gf_ConvertUnitToUnitGroup(lp_hero);
libGame_gf_CameraUpdateCameraForPlayer(lp_player);
}
}
if ((PlayerHero(lp_player) == "LostVikings")) {
libGame_gf_ControlGroupsExitVehicleLostVikings(lp_vehicle, lp_hero, lp_player);
}
if ((PlayerHero(lp_player) == "Samuro") && (PlayerHasTalent(lp_player, "SamuroHeroicAbilityIllusionMaster") == true)) {
libGame_gf_ControlGroupsExitVehicleSamuro(lp_vehicle, lp_hero, lp_player);
}
}
void libGame_gf_UnitSelectionSwapVehicle (unit lp_originVehicle, unit lp_newVehicle, int lp_player) {
// Automatic Variable Declarations
// Implementation
if ((PlayerHero(lp_player) == "Samuro") && (PlayerHasTalent(lp_player, "SamuroHeroicAbilityIllusionMaster") == true)) {
libGame_gf_ControlGroupsSwapVehicleSamuro(lp_originVehicle, lp_newVehicle, lp_player);
}
if ((PlayerHero(lp_player) == "LostVikings")) {
libGame_gf_ControlGroupsSwapVehicleLostVikings(lp_originVehicle, lp_newVehicle, lp_player);
}
if ((UnitIsSelected(lp_originVehicle, lp_player) == true)) {
UnitSelect(lp_originVehicle, lp_player, false);
UnitSelect(lp_newVehicle, lp_player, true);
}
if ((libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn == libNtve_gf_ConvertUnitToUnitGroup(lp_originVehicle))) {
libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn = libNtve_gf_ConvertUnitToUnitGroup(lp_newVehicle);
libGame_gf_CameraUpdateCameraForPlayer(lp_player);
}
}
void libGame_gf_VehiclesUseVehicle (int lp_player, unit lp_hero, unit lp_vehicle, bool lp_storeSelection, bool lp_stopOverlays) {
// Variable Declarations
unit lv_hero;
unit lv_vehicle;
// Automatic Variable Declarations
unitgroup auto4DCDDEA9_g;
int auto4DCDDEA9_u;
unit auto4DCDDEA9_var;
// Variable Initialization
lv_hero = lp_hero;
lv_vehicle = lp_vehicle;
// Implementation
if ((UnitHasBehavior2(lv_hero, "AbathurSymbioteHostBehavior") == true)) {
UnitBehaviorRemove(lv_hero, "AbathurSymbioteHostBehavior", 1);
}
libGame_gv_players[lp_player].lv_activeVehicle = lv_vehicle;
AIRemovePlayerUnit(lv_hero);
AIAddPlayerUnit(lv_vehicle);
if ((UnitTestState(lv_hero, c_unitStateHallucination) == true)) {
lv_hero = libGame_gv_players[lp_player].lv_heroUnit;
UnitCreateEffectUnit(lv_hero, "UseVehicleApplyCasterBehavior", lv_hero);
auto4DCDDEA9_g = UnitGroup(null, lp_player, RegionEntireMap(), UnitFilter(0, (1 << (c_targetFilterHallucination - 32)), (1 << c_targetFilterAlly) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto4DCDDEA9_u = UnitGroupCount(auto4DCDDEA9_g, c_unitCountAll);
for (;; auto4DCDDEA9_u -= 1) {
auto4DCDDEA9_var = UnitGroupUnitFromEnd(auto4DCDDEA9_g, auto4DCDDEA9_u);
if (auto4DCDDEA9_var == null) { break; }
UnitKill(auto4DCDDEA9_var);
}
}
libGame_gf_VehiclesMoveUnitWithVehicle(lp_vehicle);
if ((UnitHasBehavior2(lv_vehicle, "HeroGenericVehicleDoNotScaleOnUnitEnter") == false)) {
libGame_gf_UpdateScalingForUnit(lv_vehicle, libGame_gv_scalingTicks, 0);
libGame_gf_UpdateUpgradesForPlayer(lp_player, lv_vehicle, libGame_gv_scalingTicks);
}
libUIUI_gf_UIHeroConsoleSetUpForPlayer(lv_vehicle, lp_player);
libUIUI_gf_InitPathingLines(lv_vehicle, lp_player);
libUIUI_gf_HeroConsoleUnitStatusBarsSetUnitForBars(libGame_gv_players[lp_player].lv_activeVehicle, lp_player);
UnitSetOwnerPreserveUpkeep(lv_vehicle, lp_player, true);
UnitCreateEffectUnit(lv_hero, "UseVehiclePropagateOrders", lv_vehicle);
UnitBehaviorRemove(lv_vehicle, "GenericVehicleBehaviorEmpty", 1);
UnitStatusBarOverride(lv_vehicle, c_unitStatusGroupAll);
libUIUI_gf_UIDamageFlashStopLowHPSoundAndScreenEffects(lp_player);
if ((lp_stopOverlays == true)) {
libUIUI_gf_FullscreenOverlayStopandClearCutsceneQueueForPlayer(lp_player);
}
libGame_gf_SendEventCheckUnitForAbilityRedirect(lv_hero, lv_vehicle, false, UnitGetPosition(lv_hero));
}
trigger auto_libGame_gf_VehiclesMoveUnitWithVehicle_Trigger = null;
unit auto_libGame_gf_VehiclesMoveUnitWithVehicle_lp_vehicle;
void libGame_gf_VehiclesMoveUnitWithVehicle (unit lp_vehicle) {
auto_libGame_gf_VehiclesMoveUnitWithVehicle_lp_vehicle = lp_vehicle;
if (auto_libGame_gf_VehiclesMoveUnitWithVehicle_Trigger == null) {
auto_libGame_gf_VehiclesMoveUnitWithVehicle_Trigger = TriggerCreate("auto_libGame_gf_VehiclesMoveUnitWithVehicle_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_VehiclesMoveUnitWithVehicle_Trigger, false, false);
}
bool auto_libGame_gf_VehiclesMoveUnitWithVehicle_TriggerFunc (bool testConds, bool runActions) {
unit lp_vehicle = auto_libGame_gf_VehiclesMoveUnitWithVehicle_lp_vehicle;
// Variable Declarations
int lv_vehicleIndex;
// Automatic Variable Declarations
// Variable Initialization
lv_vehicleIndex = libMapM_gf_GetVehicleIndexOfUnit(lp_vehicle);
// Implementation
while ((libMapM_gv_vehicle[lv_vehicleIndex].lv_unit_UnitInsideVehicle != null)) {
UnitSetPosition(libMapM_gv_vehicle[lv_vehicleIndex].lv_unit_UnitInsideVehicle, UnitGetPosition(lp_vehicle), false);
Wait(0.0625, c_timeGame);
}
return true;
}
void libGame_gf_VehiclesReturnPlayerFromVehicleAtPoint (int lp_player, point lp_vehicleLocation) {
// Variable Declarations
fixed lv_modifiedDistance;
point lv_actualTargetPoint;
unit lv_driverUnit;
int lv_itHeroUnit;
// Automatic Variable Declarations
unitgroup auto5266370D_g;
int auto5266370D_u;
unit auto5266370D_var;
unitgroup auto1879BDA5_g;
int auto1879BDA5_u;
unit auto1879BDA5_var;
// Variable Initialization
// Implementation
lv_actualTargetPoint = lp_vehicleLocation;
auto5266370D_g = libGame_gv_players[lp_player].lv_heroUnitGroup;
auto5266370D_u = UnitGroupCount(auto5266370D_g, c_unitCountAll);
for (;; auto5266370D_u -= 1) {
auto5266370D_var = UnitGroupUnitFromEnd(auto5266370D_g, auto5266370D_u);
if (auto5266370D_var == null) { break; }
if ((UnitHasBehavior2(auto5266370D_var, "UsingVehicle") == true)) {
lv_driverUnit = auto5266370D_var;
break;
}
}
UnitBehaviorRemove(lv_driverUnit, "UsingVehicle", 1);
if ((UnitHasBehavior2(libGame_gv_players[lp_player].lv_heroUnit, "AbathurUltimateEvolutionVehicleCasterBehavior") == false)) {
while ((PointPathingPassable(lv_actualTargetPoint) == false)) {
lv_modifiedDistance -= 0.125;
lv_actualTargetPoint = libNtve_gf_PointOffsetTowardsPoint(lp_vehicleLocation, lv_modifiedDistance, UnitGetPosition(lv_driverUnit));
}
UnitSetPosition(lv_driverUnit, lv_actualTargetPoint, false);
}
else {
UnitBehaviorRemove(lv_driverUnit, "AbathurUltimateEvolutionVehicleCasterBehavior", 1);
}
auto1879BDA5_g = UnitGroupSelected(lp_player);
auto1879BDA5_u = UnitGroupCount(auto1879BDA5_g, c_unitCountAll);
for (;; auto1879BDA5_u -= 1) {
auto1879BDA5_var = UnitGroupUnitFromEnd(auto1879BDA5_g, auto1879BDA5_u);
if (auto1879BDA5_var == null) { break; }
if ((auto1879BDA5_var == libGame_gv_players[lp_player].lv_activeVehicle)) {
UnitSelect(libGame_gv_players[lp_player].lv_activeVehicle, lp_player, false);
UnitSelect(lv_driverUnit, lp_player, true);
libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn = libNtve_gf_ConvertUnitToUnitGroup(lv_driverUnit);
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(lp_player, UnitGetPosition(lv_driverUnit), 0.0, -1, 0.0, false);
libGame_gf_CameraUpdateCameraForPlayer(lp_player);
}
}
AIAddPlayerUnit(lv_driverUnit);
}
trigger auto_libGame_gf_WatchTowersChangeWatchTowerOwnership_Trigger = null;
int auto_libGame_gf_WatchTowersChangeWatchTowerOwnership_lp_watchTower;
int auto_libGame_gf_WatchTowersChangeWatchTowerOwnership_lp_newOwner;
void libGame_gf_WatchTowersChangeWatchTowerOwnership (int lp_watchTower, int lp_newOwner) {
auto_libGame_gf_WatchTowersChangeWatchTowerOwnership_lp_watchTower = lp_watchTower;
auto_libGame_gf_WatchTowersChangeWatchTowerOwnership_lp_newOwner = lp_newOwner;
if (auto_libGame_gf_WatchTowersChangeWatchTowerOwnership_Trigger == null) {
auto_libGame_gf_WatchTowersChangeWatchTowerOwnership_Trigger = TriggerCreate("auto_libGame_gf_WatchTowersChangeWatchTowerOwnership_TriggerFunc");
}
TriggerExecute(auto_libGame_gf_WatchTowersChangeWatchTowerOwnership_Trigger, false, false);
}
bool auto_libGame_gf_WatchTowersChangeWatchTowerOwnership_TriggerFunc (bool testConds, bool runActions) {
int lp_watchTower = auto_libGame_gf_WatchTowersChangeWatchTowerOwnership_lp_watchTower;
int lp_newOwner = auto_libGame_gf_WatchTowersChangeWatchTowerOwnership_lp_newOwner;
// Variable Declarations
int lv_player;
unitgroup lv_pillarUnits;
// Automatic Variable Declarations
// Variable Initialization
lv_pillarUnits = UnitGroupEmpty();
// Implementation
if ((lp_newOwner == libCore_gv_cOMPUTER_Neutral)) {
}
else {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lp_watchTower].lv_watchTowerUnit, "AnimBracketStart Capture Stand,Work,Start Stand,Work Stand,Work,End");
}
UnitSetOwner(libGame_gv_watchTowers[lp_watchTower].lv_watchTowerUnit, lp_newOwner, true);
UnitSetOwner(libGame_gv_watchTowers[lp_watchTower].lv_captureBeaconUnit, lp_newOwner, true);
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_watchTowers[lp_watchTower].lv_watchTowerUnit), "Signal ActiveSoundTog");
Wait(0.125, c_timeGame);
return true;
}
int libGame_gf_WatchTowersGetWatchTowerIndexForUnit (unit lp_unit) {
// Automatic Variable Declarations
// Implementation
return FixedToInt(UnitGetCustomValue(lp_unit, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_WatchTowerIndex)));
}
void libGame_gf_InitializeHealthPackGenerators () {
// Automatic Variable Declarations
// Implementation
libUIUI_gf_PingCreateNewPingTargetNameOverrideOnly("HealthPackGenerator", StringExternal("Param/Value/lib_Game_861A423F"));
libUIUI_gf_PingCreateNewPingTarget("HealthPack", false, StringExternal("Param/Value/lib_Game_DF64D1BD"), StringExternal("Param/Value/lib_Game_7AD61098"), StringExternal("Param/Value/lib_Game_21AA0056"), SoundLink("UI_Game_Ping_Help", -1), SoundLink("UI_Game_Ping_Help", -1));
TriggerEnable(libGame_gt_HealthPackGeneratorHealthPackCreated, true);
}
// Triggers
//--------------------------------------------------------------------------------------------------
// Trigger: #Include Game
//--------------------------------------------------------------------------------------------------
bool libGame_gt_IncludeGame_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_IncludeGame_Init () {
libGame_gt_IncludeGame = TriggerCreate("libGame_gt_IncludeGame_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Banks
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializeBanks_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
int lv_itDeathTip;
string lv_bankKey;
int lv_itNewUserTip;
// Automatic Variable Declarations
const int auto6D90B843_ae = libCore_gv_bALMaxPlayers;
const int auto6D90B843_ai = 1;
// Variable Initialization
lv_bankKey = "";
// Actions
if (!runActions) {
return true;
}
lv_itPlayer = 1;
for ( ; ( (auto6D90B843_ai >= 0 && lv_itPlayer <= auto6D90B843_ae) || (auto6D90B843_ai < 0 && lv_itPlayer >= auto6D90B843_ae) ) ; lv_itPlayer += auto6D90B843_ai ) {
if ((PlayerStatus(lv_itPlayer) != c_playerStatusUnused) && (PlayerType(lv_itPlayer) == c_playerTypeUser)) {
BankLoad("PlayerSettings", lv_itPlayer);
libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank = BankLastCreated();
if ((libCore_gv_mAPMapStringID != "") && (BankKeyExists(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "MapPlayCounts", libCore_gv_mAPMapStringID) == true)) {
libGame_gv_players[lv_itPlayer].lv_bankData.lv_mapPlayCount = BankValueGetAsInt(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "MapPlayCounts", libCore_gv_mAPMapStringID);
}
libGame_gv_players[lv_itPlayer].lv_bankData.lv_mapPlayCount += 1;
if ((libCore_gv_mAPMapStringID != "")) {
BankValueSetFromInt(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "MapPlayCounts", libCore_gv_mAPMapStringID, libGame_gv_players[lv_itPlayer].lv_bankData.lv_mapPlayCount);
}
TriggerExecute(libStEx_gt_TrainingModeBankInit, true, false);
BankSave(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank);
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializeBanks_Init () {
libGame_gt_InitializeBanks = TriggerCreate("libGame_gt_InitializeBanks_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Game Systems
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializeGameSystems_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itTeam;
region lv_baseRegion;
// Automatic Variable Declarations
const int autoE506CAD5_ae = libCore_gv_bALMaxTeams;
const int autoE506CAD5_ai = 1;
int auto35D6DBF3_val;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
TriggerExecute(libGame_gt_InitializeCodeLaneSystem, true, true);
if ((libCore_gv_sYSTowerAI == true)) {
libAIAI_gv_towerSystemOn = true;
}
TriggerExecute(libGame_gt_InitializeWatchTowers, true, true);
TriggerExecute(libGame_gt_InitializeTownSystem, true, true);
TriggerExecute(libMapM_gt_InitializeJungleCamps, true, true);
lv_itTeam = 1;
for ( ; ( (autoE506CAD5_ai >= 0 && lv_itTeam <= autoE506CAD5_ae) || (autoE506CAD5_ai < 0 && lv_itTeam >= autoE506CAD5_ae) ) ; lv_itTeam += autoE506CAD5_ai ) {
auto35D6DBF3_val = lv_itTeam;
if (auto35D6DBF3_val == libGame_gv_teamOrderIndex_C) {
lv_baseRegion = libCore_gv_mAPOrderBaseRegion;
}
else if (auto35D6DBF3_val == libGame_gv_teamChaosIndex_C) {
lv_baseRegion = libCore_gv_mAPChaosBaseRegion;
}
else {
}
libGame_gv_teams[lv_itTeam].lv_hearthStone = UnitGroupUnit(UnitGroup("HallOfStormsLocationUnit", libGame_gf_ComputerPlayerInTeam(lv_itTeam), lv_baseRegion, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 1), 1);
}
GameTimeOfDayPause(true);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializeGameSystems_Init () {
libGame_gt_InitializeGameSystems = TriggerCreate("libGame_gt_InitializeGameSystems_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Players
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializePlayers_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_index;
int lv_itTeam;
int lv_currentEnemyPlayer;
int lv_indexPlayer1;
int lv_indexPlayer2;
playergroup lv_unusedPlayersAddedToOrder;
playergroup lv_unusedPlayersAddedToChaos;
playergroup lv_group;
int lv_itPlayer;
int lv_itPlayer1;
// Automatic Variable Declarations
const int auto1FB8724F_ae = 10;
const int auto1FB8724F_ai = 1;
const int autoF679E39A_ae = libCore_gv_bALMaxTeams;
const int autoF679E39A_ai = 1;
playergroup auto626F615F_g;
playergroup auto11030675_g;
playergroup autoDBA1FFB8_g;
playergroup auto7B3D2C45_g;
const int autoC5488CAB_ae = 5;
const int autoC5488CAB_ai = 1;
const int auto16B957D8_ae = 1;
const int auto16B957D8_ai = -1;
const int autoFBFB147F_ae = libCore_gv_bALMaxPlayersOnATeam;
const int autoFBFB147F_ai = 1;
const int autoDDD645C0_ae = libCore_gv_bALMaxPlayers;
const int autoDDD645C0_ai = 1;
const int auto09A86058_ae = libCore_gv_bALMaxPlayers;
const int auto09A86058_ai = 1;
playergroup auto4A2D4B90_g;
int auto4A2D4B90_var;
playergroup auto688FB2AB_g;
playergroup auto117E042F_g;
int auto117E042F_var;
playergroup autoF6E34946_g;
int autoF6E34946_var;
playergroup auto4CFE5053_g;
int auto4CFE5053_var;
const int auto410EB58E_ae = libCore_gv_bALMaxPlayers;
const int auto410EB58E_ai = 1;
const int auto822BCDA9_ae = libCore_gv_bALMaxPlayers;
const int auto822BCDA9_ai = 1;
const int auto8D65EB03_ae = libCore_gv_bALMaxTeams;
const int auto8D65EB03_ai = 1;
// Variable Initialization
lv_unusedPlayersAddedToOrder = PlayerGroupEmpty();
lv_unusedPlayersAddedToChaos = PlayerGroupEmpty();
lv_group = PlayerGroupEmpty();
// Actions
if (!runActions) {
return true;
}
if ((libCore_gv_dEBUGDebuggingEnabled == true) && ((libCore_gv_sYSGameMode == libCore_ge_GameModes_Normal) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_Sandbox) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_ArenaMode) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_AttackDefend))) {
lv_itTeam = (libCore_gv_bALMaxTeams + 1);
for ( ; ( (auto1FB8724F_ai >= 0 && lv_itTeam <= auto1FB8724F_ae) || (auto1FB8724F_ai < 0 && lv_itTeam >= auto1FB8724F_ae) ) ; lv_itTeam += auto1FB8724F_ai ) {
lv_group = GameAttributePlayersForTeam(lv_itTeam);
if ((PlayerGroupCount(GameAttributePlayersForTeam(lv_itTeam)) > 0)) {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_CD5979A1"), true);
UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, StringExternal("Param/Value/lib_Game_EBB4B199"));
libCore_gv_dEBUGErrorDuringInitialization = true;
return true;
}
}
lv_itTeam = 1;
for ( ; ( (autoF679E39A_ai >= 0 && lv_itTeam <= autoF679E39A_ae) || (autoF679E39A_ai < 0 && lv_itTeam >= autoF679E39A_ae) ) ; lv_itTeam += autoF679E39A_ai ) {
lv_group = GameAttributePlayersForTeam(lv_itTeam);
if ((PlayerGroupCount(GameAttributePlayersForTeam(lv_itTeam)) > libCore_gv_bALMaxPlayersOnATeam)) {
TextExpressionSetToken("Param/Expression/lib_Game_24D5C381", "A", IntToText(lv_itTeam));
TextExpressionSetToken("Param/Expression/lib_Game_24D5C381", "B", IntToText(libCore_gv_bALMaxPlayersOnATeam));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_24D5C381"), true);
TextExpressionSetToken("Param/Expression/lib_Game_86FA8A87", "A", IntToText(lv_itTeam));
TextExpressionSetToken("Param/Expression/lib_Game_86FA8A87", "B", IntToText(libCore_gv_bALMaxPlayersOnATeam));
UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, TextExpressionAssemble("Param/Expression/lib_Game_86FA8A87"));
libCore_gv_dEBUGErrorDuringInitialization = true;
return true;
}
}
}
libGame_gv_players[libCore_gv_cOMPUTER_TeamOrder].lv_faction = libGame_ge_Faction_Order;
libGame_gv_players[libCore_gv_cOMPUTER_TeamOrder].lv_portraitIcon = "Assets\\Textures\\storm_ui_ingame_hero_icon_towerking_red.dds";
libGame_gv_players[libCore_gv_cOMPUTER_TeamOrder].lv_name = StringExternal("Param/Value/lib_Game_CE553E53");
libNtve_gf_SetAllianceOneWay(libCore_gv_cOMPUTER_Hostile, libCore_gv_cOMPUTER_TeamOrder, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAllianceOneWay(libCore_gv_cOMPUTER_TeamOrder, libCore_gv_cOMPUTER_Hostile, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetUpgradeLevelForPlayer(libCore_gv_cOMPUTER_TeamOrder, "IsPlayer11", 1);
libGame_gv_players[libCore_gv_cOMPUTER_TeamChaos].lv_faction = libGame_ge_Faction_Chaos;
libGame_gv_players[libCore_gv_cOMPUTER_TeamChaos].lv_portraitIcon = "Assets\\Textures\\storm_ui_ingame_hero_icon_towerking_red.dds";
libGame_gv_players[libCore_gv_cOMPUTER_TeamChaos].lv_name = StringExternal("Param/Value/lib_Game_A7B0450E");
libNtve_gf_SetAllianceOneWay(libCore_gv_cOMPUTER_Hostile, libCore_gv_cOMPUTER_TeamChaos, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAllianceOneWay(libCore_gv_cOMPUTER_TeamChaos, libCore_gv_cOMPUTER_Hostile, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetUpgradeLevelForPlayer(libCore_gv_cOMPUTER_TeamChaos, "IsPlayer12", 1);
libGame_gv_players[libCore_gv_cOMPUTER_Neutral].lv_faction = libGame_ge_Faction_Neutral;
libGame_gv_players[libCore_gv_cOMPUTER_Neutral].lv_portraitIcon = "Assets\\Textures\\storm_ui_ingame_hero_icon_towerking_red.dds";
PlayerSetColorIndex(libCore_gv_cOMPUTER_Neutral, libCore_gv_cOLORNeutralPlayerColor, true);
libGame_gv_players[libCore_gv_cOMPUTER_NoVision_TeamOrder].lv_faction = libGame_ge_Faction_Order;
libGame_gv_players[libCore_gv_cOMPUTER_NoVision_TeamOrder].lv_portraitIcon = "Assets\\Textures\\storm_ui_ingame_hero_icon_towerking_red.dds";
libGame_gv_players[libCore_gv_cOMPUTER_NoVision_TeamOrder].lv_name = StringExternal("Param/Value/lib_Game_7D87EBFA");
PlayerSetColorIndex(libCore_gv_cOMPUTER_NoVision_TeamOrder, libCore_gv_cOLOROrderPlayerColor, true);
libNtve_gf_SetAllianceOneWay(libCore_gv_cOMPUTER_Hostile, libCore_gv_cOMPUTER_NoVision_TeamOrder, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAllianceOneWay(libCore_gv_cOMPUTER_NoVision_TeamOrder, libCore_gv_cOMPUTER_Hostile, libNtve_ge_AllianceSetting_Neutral);
libGame_gv_players[libCore_gv_cOMPUTER_NoVision_TeamChaos].lv_faction = libGame_ge_Faction_Chaos;
libGame_gv_players[libCore_gv_cOMPUTER_NoVision_TeamChaos].lv_portraitIcon = "Assets\\Textures\\storm_ui_ingame_hero_icon_towerking_red.dds";
libGame_gv_players[libCore_gv_cOMPUTER_NoVision_TeamChaos].lv_name = StringExternal("Param/Value/lib_Game_21663FDC");
PlayerSetColorIndex(libCore_gv_cOMPUTER_NoVision_TeamOrder, libCore_gv_cOLORChaosPlayerColor, true);
libNtve_gf_SetAllianceOneWay(libCore_gv_cOMPUTER_Hostile, libCore_gv_cOMPUTER_NoVision_TeamChaos, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAllianceOneWay(libCore_gv_cOMPUTER_NoVision_TeamChaos, libCore_gv_cOMPUTER_Hostile, libNtve_ge_AllianceSetting_Neutral);
libGame_gv_players[libCore_gv_cOMPUTER_Hostile].lv_faction = libGame_ge_Faction_HostileCreeps;
libGame_gv_players[libCore_gv_cOMPUTER_Hostile].lv_portraitIcon = "Assets\\Textures\\storm_ui_ingame_hero_icon_towerking_red.dds";
libGame_gv_players[libCore_gv_cOMPUTER_Hostile].lv_name = StringExternal("Param/Value/lib_Game_923DE167");
PlayerSetColorIndex(libCore_gv_cOMPUTER_Hostile, libCore_gv_cOLORHostilePlayerColor, true);
if (((libCore_gv_sYSGameMode == libCore_ge_GameModes_Normal) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_Sandbox) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_ArenaMode) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_AttackDefend))) {
auto626F615F_g = GameAttributePlayersForTeam(1);
lv_index = -1;
while (true) {
lv_index = PlayerGroupNextPlayer(auto626F615F_g, lv_index);
if (lv_index<0) { break; }
libGame_gf_InitializePlayer(lv_index, libGame_ge_Faction_Order);
}
auto11030675_g = GameAttributePlayersForTeam(2);
lv_index = -1;
while (true) {
lv_index = PlayerGroupNextPlayer(auto11030675_g, lv_index);
if (lv_index<0) { break; }
libGame_gf_InitializePlayer(lv_index, libGame_ge_Faction_Chaos);
}
}
else if ((libCore_gv_sYSGameMode == libCore_ge_GameModes_ModeC)) {
autoDBA1FFB8_g = GameAttributePlayersForTeam(1);
lv_index = -1;
while (true) {
lv_index = PlayerGroupNextPlayer(autoDBA1FFB8_g, lv_index);
if (lv_index<0) { break; }
libGame_gf_InitializePlayer(lv_index, libGame_ge_Faction_Order);
}
auto7B3D2C45_g = GameAttributePlayersForTeam(2);
lv_index = -1;
while (true) {
lv_index = PlayerGroupNextPlayer(auto7B3D2C45_g, lv_index);
if (lv_index<0) { break; }
libGame_gf_InitializePlayer(lv_index, libGame_ge_Faction_Chaos);
}
lv_itPlayer = (PlayerGroupCount(GameAttributePlayersForTeam(2)) + 1);
for ( ; ( (autoC5488CAB_ai >= 0 && lv_itPlayer <= autoC5488CAB_ae) || (autoC5488CAB_ai < 0 && lv_itPlayer >= autoC5488CAB_ae) ) ; lv_itPlayer += autoC5488CAB_ai ) {
lv_itPlayer1 = libCore_gv_bALMaxPlayers;
for ( ; ( (auto16B957D8_ai >= 0 && lv_itPlayer1 <= auto16B957D8_ae) || (auto16B957D8_ai < 0 && lv_itPlayer1 >= auto16B957D8_ae) ) ; lv_itPlayer1 += auto16B957D8_ai ) {
if ((PlayerGroupHasPlayer(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, lv_itPlayer1) == false) && (PlayerGroupHasPlayer(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, lv_itPlayer1) == false)) {
libGame_gf_InitializePlayer(lv_itPlayer1, libGame_ge_Faction_Chaos);
break;
}
}
}
}
else if (true) {
lv_index = 1;
for ( ; ( (autoFBFB147F_ai >= 0 && lv_index <= autoFBFB147F_ae) || (autoFBFB147F_ai < 0 && lv_index >= autoFBFB147F_ae) ) ; lv_index += autoFBFB147F_ai ) {
libGame_gf_InitializePlayer(lv_index, libGame_ge_Faction_Order);
}
lv_index = (libCore_gv_bALMaxPlayersOnATeam + 1);
for ( ; ( (autoDDD645C0_ai >= 0 && lv_index <= autoDDD645C0_ae) || (autoDDD645C0_ai < 0 && lv_index >= autoDDD645C0_ae) ) ; lv_index += autoDDD645C0_ai ) {
libGame_gf_InitializePlayer(lv_index, libGame_ge_Faction_Chaos);
}
}
if ((libCore_gv_sYSGameMode != libCore_ge_GameModes_ModeC)) {
lv_index = 1;
for ( ; ( (auto09A86058_ai >= 0 && lv_index <= auto09A86058_ae) || (auto09A86058_ai < 0 && lv_index >= auto09A86058_ae) ) ; lv_index += auto09A86058_ai ) {
if ((PlayerStatus(lv_index) == c_playerStatusUnused)) {
if ((libSprt_gv_performanceTestPerformanceTestRunning == true)) {
if ((PlayerGroupCount(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup) < 5)) {
libGame_gf_InitializePlayer(lv_index, libGame_ge_Faction_Order);
}
else {
if ((PlayerGroupCount(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup) < 5)) {
libGame_gf_InitializePlayer(lv_index, libGame_ge_Faction_Chaos);
}
}
}
else {
if ((PlayerGroupCount(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup) < 5)) {
libGame_gf_InitializePlayer(lv_index, libGame_ge_Faction_Order);
PlayerGroupAdd(lv_unusedPlayersAddedToOrder, lv_index);
}
else {
if ((PlayerGroupCount(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup) < 5)) {
libGame_gf_InitializePlayer(lv_index, libGame_ge_Faction_Chaos);
PlayerGroupAdd(lv_unusedPlayersAddedToChaos, lv_index);
}
}
}
}
}
}
PlayerGroupAdd(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, libCore_gv_cOMPUTER_TeamOrder);
PlayerGroupAdd(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, libCore_gv_cOMPUTER_TeamChaos);
libNtve_gf_SetPlayerGroupAlliance(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, libNtve_ge_AllianceSetting_AllyWithSharedVision);
libNtve_gf_SetPlayerGroupAlliance(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, libNtve_ge_AllianceSetting_AllyWithSharedVision);
auto4A2D4B90_g = libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup;
auto4A2D4B90_var = -1;
while (true) {
auto4A2D4B90_var = PlayerGroupNextPlayer(auto4A2D4B90_g, auto4A2D4B90_var);
if (auto4A2D4B90_var<0) { break; }
libNtve_gf_SetUpgradeLevelForPlayer(auto4A2D4B90_var, "IsOnOrderTeam", 1);
libNtve_gf_SetAlliance(auto4A2D4B90_var, libCore_gv_cOMPUTER_NoVision_TeamOrder, libNtve_ge_AllianceSetting_Ally);
PlayerSetAlliance(libCore_gv_cOMPUTER_NoVision_TeamOrder, c_allianceIdVision, auto4A2D4B90_var, false);
PlayerSetAlliance(libCore_gv_cOMPUTER_TeamChaos, c_allianceIdPower, auto4A2D4B90_var, true);
libNtve_gf_SetAllianceOneWay(libCore_gv_cOMPUTER_TeamOrder, auto4A2D4B90_var, libNtve_ge_AllianceSetting_AllyWithSharedVision);
PlayerSetColorIndex(auto4A2D4B90_var, libCore_gv_cOLOROrderPlayerColor, true);
auto688FB2AB_g = libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup;
lv_currentEnemyPlayer = -1;
while (true) {
lv_currentEnemyPlayer = PlayerGroupNextPlayer(auto688FB2AB_g, lv_currentEnemyPlayer);
if (lv_currentEnemyPlayer<0) { break; }
libNtve_gf_SetAlliance(auto4A2D4B90_var, lv_currentEnemyPlayer, libNtve_ge_AllianceSetting_Enemy);
}
PlayerSetAlliance(auto4A2D4B90_var, c_allianceIdVision, libCore_gv_oBSERVER_ObserverUIPlayer, true);
if ((auto4A2D4B90_var != libCore_gv_cOMPUTER_TeamOrder)) {
libNtve_gf_SetAlliance(auto4A2D4B90_var, libCore_gv_cOMPUTER_Hostile, libNtve_ge_AllianceSetting_Enemy);
PlayerSetAlliance(libCore_gv_cOMPUTER_TeamOrder, c_allianceIdSeekHelp, auto4A2D4B90_var, false);
PlayerSetAlliance(libCore_gv_cOMPUTER_TeamOrder, c_allianceIdPower, auto4A2D4B90_var, true);
}
}
auto117E042F_g = libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup;
auto117E042F_var = -1;
while (true) {
auto117E042F_var = PlayerGroupNextPlayer(auto117E042F_g, auto117E042F_var);
if (auto117E042F_var<0) { break; }
libNtve_gf_SetUpgradeLevelForPlayer(auto117E042F_var, "IsOnChaosTeam", 1);
libNtve_gf_SetAlliance(auto117E042F_var, libCore_gv_cOMPUTER_NoVision_TeamChaos, libNtve_ge_AllianceSetting_Ally);
PlayerSetAlliance(libCore_gv_cOMPUTER_NoVision_TeamChaos, c_allianceIdVision, auto117E042F_var, false);
PlayerSetAlliance(libCore_gv_cOMPUTER_TeamOrder, c_allianceIdPower, auto117E042F_var, true);
libNtve_gf_SetAllianceOneWay(libCore_gv_cOMPUTER_TeamChaos, auto117E042F_var, libNtve_ge_AllianceSetting_AllyWithSharedVision);
PlayerSetColorIndex(auto117E042F_var, libCore_gv_cOLORChaosPlayerColor, true);
PlayerSetAlliance(auto117E042F_var, c_allianceIdVision, libCore_gv_oBSERVER_ObserverUIPlayer, true);
if ((auto117E042F_var != libCore_gv_cOMPUTER_TeamChaos)) {
libNtve_gf_SetAlliance(auto117E042F_var, libCore_gv_cOMPUTER_Hostile, libNtve_ge_AllianceSetting_Enemy);
PlayerSetAlliance(libCore_gv_cOMPUTER_TeamChaos, c_allianceIdSeekHelp, auto117E042F_var, false);
PlayerSetAlliance(libCore_gv_cOMPUTER_TeamChaos, c_allianceIdPower, auto117E042F_var, true);
}
}
PlayerSetColorIndex(libCore_gv_cOMPUTER_NoVision_TeamOrder, libCore_gv_cOLOROrderPlayerColor, true);
PlayerSetColorIndex(libCore_gv_cOMPUTER_NoVision_TeamChaos, libCore_gv_cOLORChaosPlayerColor, true);
PlayerSetAlliance(libCore_gv_cOMPUTER_Hostile, c_allianceIdVision, libCore_gv_oBSERVER_ObserverUIPlayer, true);
autoF6E34946_g = lv_unusedPlayersAddedToOrder;
autoF6E34946_var = -1;
while (true) {
autoF6E34946_var = PlayerGroupNextPlayer(autoF6E34946_g, autoF6E34946_var);
if (autoF6E34946_var<0) { break; }
PlayerGroupRemove(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, autoF6E34946_var);
}
auto4CFE5053_g = lv_unusedPlayersAddedToChaos;
auto4CFE5053_var = -1;
while (true) {
auto4CFE5053_var = PlayerGroupNextPlayer(auto4CFE5053_g, auto4CFE5053_var);
if (auto4CFE5053_var<0) { break; }
PlayerGroupRemove(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, auto4CFE5053_var);
}
PlayerGroupAdd(libCore_gv_nPCPlayers, libCore_gv_cOMPUTER_Neutral);
PlayerGroupAdd(libCore_gv_nPCPlayers, libCore_gv_cOMPUTER_TeamOrder);
PlayerGroupAdd(libCore_gv_nPCPlayers, libCore_gv_cOMPUTER_TeamChaos);
PlayerGroupAdd(libCore_gv_nPCPlayers, libCore_gv_cOMPUTER_Hostile);
lv_index = 1;
for ( ; ( (auto410EB58E_ai >= 0 && lv_index <= auto410EB58E_ae) || (auto410EB58E_ai < 0 && lv_index >= auto410EB58E_ae) ) ; lv_index += auto410EB58E_ai ) {
PlayerGroupAdd(libCore_gv_allHeroPlayersPlusObserver, lv_index);
}
PlayerGroupAdd(libCore_gv_allHeroPlayersPlusObserver, libCore_gv_oBSERVER_ObserverUIPlayer);
lv_index = 1;
for ( ; ( (auto822BCDA9_ai >= 0 && lv_index <= auto822BCDA9_ae) || (auto822BCDA9_ai < 0 && lv_index >= auto822BCDA9_ae) ) ; lv_index += auto822BCDA9_ai ) {
PlayerSetDeathTimer(lv_index, libGame_gv_players[lv_index].lv_respawnTimer);
}
libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_nPCPlayer = libCore_gv_cOMPUTER_TeamOrder;
libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroupNoNPCPlayers = PlayerGroupCopy(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup);
PlayerGroupRemove(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroupNoNPCPlayers, libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_nPCPlayer);
libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_nPCPlayer = libCore_gv_cOMPUTER_TeamChaos;
libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers = PlayerGroupCopy(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup);
PlayerGroupRemove(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers, libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_nPCPlayer);
lv_itTeam = 1;
for ( ; ( (auto8D65EB03_ai >= 0 && lv_itTeam <= auto8D65EB03_ae) || (auto8D65EB03_ai < 0 && lv_itTeam >= auto8D65EB03_ae) ) ; lv_itTeam += auto8D65EB03_ai ) {
libGame_gv_teams[lv_itTeam].lv_teamPlayerCount = PlayerGroupCount(libGame_gf_PlayersOnTeamHeroes(lv_itTeam, false));
libGame_gv_teams[lv_itTeam].lv_activeHumanPlayers = PlayerGroupCount(libGame_gf_PlayersOnTeamHeroes(lv_itTeam, false));
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializePlayers_Init () {
libGame_gt_InitializePlayers = TriggerCreate("libGame_gt_InitializePlayers_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Visibility
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializeVisibility_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
revealer[13] lv_tempRevealer;
// Automatic Variable Declarations
playergroup autoE4148D4A_g;
playergroup auto6814F9D0_g;
playergroup auto0C1904B1_g;
playergroup auto6F7C59FD_g;
playergroup autoB48B1BB9_g;
const int auto4D61B2C2_ae = 12;
const int auto4D61B2C2_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
if ((libGame_gv_initializeVisibilityCallback != null)) {
TriggerExecute(libGame_gv_initializeVisibilityCallback, true, false);
return true;
}
autoE4148D4A_g = libCore_gv_allHeroPlayersPlusObserver;
lv_player = -1;
while (true) {
lv_player = PlayerGroupNextPlayer(autoE4148D4A_g, lv_player);
if (lv_player<0) { break; }
VisExploreArea(lv_player, RegionEntireMap(), true, false);
}
auto6814F9D0_g = libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup;
lv_player = -1;
while (true) {
lv_player = PlayerGroupNextPlayer(auto6814F9D0_g, lv_player);
if (lv_player<0) { break; }
VisRevealerCreate(lv_player, libCore_gv_mAPOrderBaseRegion);
VisRevealerEnable(VisRevealerLastCreated(), true);
libGame_gv_baseRevealers[lv_player] = VisRevealerLastCreated();
}
auto0C1904B1_g = libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup;
lv_player = -1;
while (true) {
lv_player = PlayerGroupNextPlayer(auto0C1904B1_g, lv_player);
if (lv_player<0) { break; }
VisRevealerCreate(lv_player, libCore_gv_mAPChaosBaseRegion);
VisRevealerEnable(VisRevealerLastCreated(), true);
libGame_gv_baseRevealers[lv_player] = VisRevealerLastCreated();
}
auto6F7C59FD_g = libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup;
lv_player = -1;
while (true) {
lv_player = PlayerGroupNextPlayer(auto6F7C59FD_g, lv_player);
if (lv_player<0) { break; }
VisRevealerCreate(lv_player, libCore_gv_mAPChaosBaseRegion);
VisRevealerEnable(VisRevealerLastCreated(), true);
lv_tempRevealer[lv_player] = VisRevealerLastCreated();
}
autoB48B1BB9_g = libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup;
lv_player = -1;
while (true) {
lv_player = PlayerGroupNextPlayer(autoB48B1BB9_g, lv_player);
if (lv_player<0) { break; }
VisRevealerCreate(lv_player, libCore_gv_mAPOrderBaseRegion);
VisRevealerEnable(VisRevealerLastCreated(), true);
lv_tempRevealer[lv_player] = VisRevealerLastCreated();
}
Wait(0.125, c_timeGame);
lv_player = 1;
for ( ; ( (auto4D61B2C2_ai >= 0 && lv_player <= auto4D61B2C2_ae) || (auto4D61B2C2_ai < 0 && lv_player >= auto4D61B2C2_ae) ) ; lv_player += auto4D61B2C2_ai ) {
VisRevealerEnable(lv_tempRevealer[lv_player], false);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializeVisibility_Init () {
libGame_gt_InitializeVisibility = TriggerCreate("libGame_gt_InitializeVisibility_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Afk Check Player Score Values For Activity
//--------------------------------------------------------------------------------------------------
bool libGame_gt_AfkCheckPlayerScoreValuesForActivity_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
fixed[libCore_gv_bALMaxPlayers + 1] lv_heroDamageScoreValue;
fixed[libCore_gv_bALMaxPlayers + 1] lv_siegeDamageScoreValue;
fixed[libCore_gv_bALMaxPlayers + 1] lv_healingScoreValue;
bool lv_didSomething;
// Automatic Variable Declarations
const int autoAC9E31E6_ae = libCore_gv_bALMaxPlayers;
const int autoAC9E31E6_ai = 1;
const int auto3E3671D0_ae = libCore_gv_bALMaxPlayers;
const int auto3E3671D0_ai = 1;
const int autoC7FAAD9C_ae = libCore_gv_bALMaxPlayers;
const int autoC7FAAD9C_ai = 1;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_itPlayer = 1;
for ( ; ( (autoAC9E31E6_ai >= 0 && lv_itPlayer <= autoAC9E31E6_ae) || (autoAC9E31E6_ai < 0 && lv_itPlayer >= autoAC9E31E6_ae) ) ; lv_itPlayer += autoAC9E31E6_ai ) {
lv_heroDamageScoreValue[lv_itPlayer] = PlayerScoreValueGetAsFixed(lv_itPlayer, "HeroDamage");
lv_siegeDamageScoreValue[lv_itPlayer] = PlayerScoreValueGetAsFixed(lv_itPlayer, "SiegeDamage");
lv_healingScoreValue[lv_itPlayer] = PlayerScoreValueGetAsFixed(lv_itPlayer, "Healing");
}
lv_itPlayer = 1;
for ( ; ( (auto3E3671D0_ai >= 0 && lv_itPlayer <= auto3E3671D0_ae) || (auto3E3671D0_ai < 0 && lv_itPlayer >= auto3E3671D0_ae) ) ; lv_itPlayer += auto3E3671D0_ai ) {
lv_didSomething = false;
if (((lv_heroDamageScoreValue[lv_itPlayer] > libGame_gv_afk_PlayerScoreValueTracking[lv_itPlayer].lv_heroDamage) || (lv_siegeDamageScoreValue[lv_itPlayer] > libGame_gv_afk_PlayerScoreValueTracking[lv_itPlayer].lv_siegeDamage) || (lv_healingScoreValue[lv_itPlayer] > libGame_gv_afk_PlayerScoreValueTracking[lv_itPlayer].lv_healing))) {
lv_didSomething = true;
}
if ((lv_didSomething == true)) {
libGame_gf_AfkResetWarningTimerForPlayer(lv_itPlayer);
}
}
lv_itPlayer = 1;
for ( ; ( (autoC7FAAD9C_ai >= 0 && lv_itPlayer <= autoC7FAAD9C_ae) || (autoC7FAAD9C_ai < 0 && lv_itPlayer >= autoC7FAAD9C_ae) ) ; lv_itPlayer += autoC7FAAD9C_ai ) {
libGame_gv_afk_PlayerScoreValueTracking[lv_itPlayer].lv_heroDamage = lv_heroDamageScoreValue[lv_itPlayer];
libGame_gv_afk_PlayerScoreValueTracking[lv_itPlayer].lv_siegeDamage = lv_siegeDamageScoreValue[lv_itPlayer];
libGame_gv_afk_PlayerScoreValueTracking[lv_itPlayer].lv_healing = lv_healingScoreValue[lv_itPlayer];
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_AfkCheckPlayerScoreValuesForActivity_Init () {
libGame_gt_AfkCheckPlayerScoreValuesForActivity = TriggerCreate("libGame_gt_AfkCheckPlayerScoreValuesForActivity_Func");
TriggerEnable(libGame_gt_AfkCheckPlayerScoreValuesForActivity, false);
TriggerAddEventTimePeriodic(libGame_gt_AfkCheckPlayerScoreValuesForActivity, 1.0, c_timeGame);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Afk Player Movement Detection
//--------------------------------------------------------------------------------------------------
bool libGame_gt_AfkPlayerMovementDetection_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
unit lv_itHero;
bool lv_moving;
// Automatic Variable Declarations
const int autoC17E01AA_ae = libCore_gv_bALMaxPlayers;
const int autoC17E01AA_ai = 1;
unitgroup auto0F78BEC1_g;
int auto0F78BEC1_u;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_itPlayer = 1;
for ( ; ( (autoC17E01AA_ai >= 0 && lv_itPlayer <= autoC17E01AA_ae) || (autoC17E01AA_ai < 0 && lv_itPlayer >= autoC17E01AA_ae) ) ; lv_itPlayer += autoC17E01AA_ai ) {
lv_moving = false;
if ((libGame_gv_players[lv_itPlayer].lv_heroUnit != null) && (UnitIsAlive(libGame_gv_players[lv_itPlayer].lv_heroUnit) == true) && (UnitGetPropertyFixed(libGame_gv_players[lv_itPlayer].lv_heroUnit, c_unitPropMovementSpeedCurrent, c_unitPropCurrent) > 0.0)) {
lv_moving = true;
}
else {
if ((libGame_gv_players[lv_itPlayer].lv_activeVehicle != null) && (UnitIsAlive(libGame_gv_players[lv_itPlayer].lv_activeVehicle) == true) && (UnitGetPropertyFixed(libGame_gv_players[lv_itPlayer].lv_activeVehicle, c_unitPropMovementSpeedCurrent, c_unitPropCurrent) > 0.0)) {
lv_moving = true;
}
else {
auto0F78BEC1_g = libGame_gv_players[lv_itPlayer].lv_heroUnitGroup;
auto0F78BEC1_u = UnitGroupCount(auto0F78BEC1_g, c_unitCountAll);
for (;; auto0F78BEC1_u -= 1) {
lv_itHero = UnitGroupUnitFromEnd(auto0F78BEC1_g, auto0F78BEC1_u);
if (lv_itHero == null) { break; }
if ((UnitIsAlive(lv_itHero) == true) && (UnitGetPropertyFixed(lv_itHero, c_unitPropMovementSpeedCurrent, c_unitPropCurrent) > 0.0)) {
lv_moving = true;
break;
}
}
}
}
if ((lv_moving == true)) {
libGame_gv_afk_PlayerStationaryDuration[lv_itPlayer] = 0;
}
else {
libGame_gv_afk_PlayerStationaryDuration[lv_itPlayer] += 1;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_AfkPlayerMovementDetection_Init () {
libGame_gt_AfkPlayerMovementDetection = TriggerCreate("libGame_gt_AfkPlayerMovementDetection_Func");
TriggerEnable(libGame_gt_AfkPlayerMovementDetection, false);
TriggerAddEventTimePeriodic(libGame_gt_AfkPlayerMovementDetection, 0.25, c_timeGame);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Afk Check Player Moving
//--------------------------------------------------------------------------------------------------
bool libGame_gt_AfkCheckPlayerMoving_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
int lv_itTeam;
region lv_baseArea;
unit lv_itEnemyHero;
unit lv_itHero;
unitgroup lv_nearbyEnemyHeroes;
// Automatic Variable Declarations
const int auto1288AF32_ae = libCore_gv_bALMaxPlayers;
const int auto1288AF32_ai = 1;
unitgroup auto8D8FFBE6_g;
int auto8D8FFBE6_u;
unitgroup auto783D642F_g;
int auto783D642F_u;
int auto5EBC0634_val;
unitgroup autoAD06F64E_g;
int autoAD06F64E_u;
// Variable Initialization
lv_nearbyEnemyHeroes = UnitGroupEmpty();
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_itPlayer = 1;
for ( ; ( (auto1288AF32_ai >= 0 && lv_itPlayer <= auto1288AF32_ae) || (auto1288AF32_ai < 0 && lv_itPlayer >= auto1288AF32_ae) ) ; lv_itPlayer += auto1288AF32_ai ) {
lv_itTeam = libGame_gf_TeamNumberOfPlayer(lv_itPlayer);
if ((libGame_gv_afk_PlayerStationaryDuration[lv_itPlayer] < 4)) {
if (((libGame_gv_players[lv_itPlayer].lv_isDead == false) || (PlayerHero(lv_itPlayer) == "Leoric"))) {
if ((UnitIsAlive(libGame_gv_players[lv_itPlayer].lv_heroUnit) == true)) {
lv_nearbyEnemyHeroes = UnitGroupAlliance(lv_itPlayer, c_unitAllianceEnemy, RegionCircle(UnitGetPosition(libGame_gv_players[lv_itPlayer].lv_heroUnit), libGame_gv_afk_PlayerCheckNearbyEnemyHeroRadius_C), libCore_gv_filtersHeroic, 0);
}
else {
lv_nearbyEnemyHeroes = UnitGroupEmpty();
}
auto8D8FFBE6_g = libGame_gv_players[lv_itPlayer].lv_heroUnitGroup;
auto8D8FFBE6_u = UnitGroupCount(auto8D8FFBE6_g, c_unitCountAll);
for (;; auto8D8FFBE6_u -= 1) {
lv_itHero = UnitGroupUnitFromEnd(auto8D8FFBE6_g, auto8D8FFBE6_u);
if (lv_itHero == null) { break; }
UnitGroupAddUnitGroup(lv_nearbyEnemyHeroes, UnitGroupAlliance(lv_itPlayer, c_unitAllianceEnemy, RegionCircle(UnitGetPosition(lv_itHero), libGame_gv_afk_PlayerCheckNearbyEnemyHeroRadius_C), libCore_gv_filtersHeroic, 0));
}
auto783D642F_g = lv_nearbyEnemyHeroes;
auto783D642F_u = UnitGroupCount(auto783D642F_g, c_unitCountAll);
for (;; auto783D642F_u -= 1) {
lv_itEnemyHero = UnitGroupUnitFromEnd(auto783D642F_g, auto783D642F_u);
if (lv_itEnemyHero == null) { break; }
if ((UnitIsAlive(lv_itEnemyHero) == true) && (libNtve_gf_UnitIsVisibleToPlayer(lv_itEnemyHero, lv_itPlayer) == true)) {
libGame_gf_AfkResetWarningTimerForPlayer(lv_itPlayer);
break;
}
}
}
if ((libNtve_gf_UnitIsInvulnerable(libGame_gv_teams[lv_itTeam].lv_core) == true)) {
auto5EBC0634_val = lv_itTeam;
if (auto5EBC0634_val == libGame_gv_teamOrderIndex_C) {
lv_baseArea = libCore_gv_mAPOrderBaseRegion;
}
else if (auto5EBC0634_val == libGame_gv_teamChaosIndex_C) {
lv_baseArea = libCore_gv_mAPChaosBaseRegion;
}
else {
}
if ((UnitIsAlive(libGame_gv_players[lv_itPlayer].lv_heroUnit) == true) && (libNtve_gf_UnitInRegion(libGame_gv_players[lv_itPlayer].lv_heroUnit, lv_baseArea) == false)) {
libGame_gf_AfkResetWarningTimerForPlayer(lv_itPlayer);
}
else {
if ((UnitIsAlive(libGame_gv_players[lv_itPlayer].lv_activeVehicle) == true) && (libNtve_gf_UnitInRegion(libGame_gv_players[lv_itPlayer].lv_activeVehicle, lv_baseArea) == false)) {
libGame_gf_AfkResetWarningTimerForPlayer(lv_itPlayer);
}
else {
autoAD06F64E_g = libGame_gv_players[lv_itPlayer].lv_heroUnitGroup;
autoAD06F64E_u = UnitGroupCount(autoAD06F64E_g, c_unitCountAll);
for (;; autoAD06F64E_u -= 1) {
lv_itHero = UnitGroupUnitFromEnd(autoAD06F64E_g, autoAD06F64E_u);
if (lv_itHero == null) { break; }
if ((UnitIsAlive(lv_itHero) == true) && (libNtve_gf_UnitInRegion(lv_itHero, lv_baseArea) == false)) {
libGame_gf_AfkResetWarningTimerForPlayer(lv_itPlayer);
break;
}
}
}
}
}
if ((libNtve_gf_UnitIsInvulnerable(libGame_gv_teams[lv_itTeam].lv_core) == false)) {
libGame_gf_AfkResetWarningTimerForPlayer(lv_itPlayer);
}
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_AfkCheckPlayerMoving_Init () {
libGame_gt_AfkCheckPlayerMoving = TriggerCreate("libGame_gt_AfkCheckPlayerMoving_Func");
TriggerEnable(libGame_gt_AfkCheckPlayerMoving, false);
TriggerAddEventTimePeriodic(libGame_gt_AfkCheckPlayerMoving, 1.0, c_timeGame);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Afk Check Player Entered Vehicle
//--------------------------------------------------------------------------------------------------
bool libGame_gt_AfkCheckPlayerEnteredVehicle_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
// Automatic Variable Declarations
// Variable Initialization
lv_player = EventPlayerEffectUsedUnitOwner(c_effectPlayerCaster);
// Actions
if (!runActions) {
return true;
}
libGame_gf_AfkResetWarningTimerForPlayer(lv_player);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_AfkCheckPlayerEnteredVehicle_Init () {
libGame_gt_AfkCheckPlayerEnteredVehicle = TriggerCreate("libGame_gt_AfkCheckPlayerEnteredVehicle_Func");
TriggerEnable(libGame_gt_AfkCheckPlayerEnteredVehicle, false);
TriggerAddEventPlayerEffectUsed(libGame_gt_AfkCheckPlayerEnteredVehicle, c_playerAny, "UseVehicleCastCompleteSet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Afk Player Afk Warning Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_AfkPlayerAfkWarningTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
int lv_triggeringPlayer;
fixed lv_kickTimerDuration;
// Automatic Variable Declarations
const int auto47D26E9F_ae = libCore_gv_bALMaxPlayers;
const int auto47D26E9F_ai = 1;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_itPlayer = 1;
for ( ; ( (auto47D26E9F_ai >= 0 && lv_itPlayer <= auto47D26E9F_ae) || (auto47D26E9F_ai < 0 && lv_itPlayer >= auto47D26E9F_ae) ) ; lv_itPlayer += auto47D26E9F_ai ) {
if (((EventTimer() == libGame_gv_afk_PlayerAfkWarningTimer[lv_itPlayer]))) {
lv_triggeringPlayer = lv_itPlayer;
break;
}
}
if ((lv_triggeringPlayer == 0)) {
return true;
}
if ((libGame_gv_afk_UseBrawlAFKSystem == false)) {
lv_kickTimerDuration = libGame_gv_afk_AfkKickTimerDuration_C;
}
else {
lv_kickTimerDuration = libGame_gv_afkBrawl_AfkKickTimerDuration_C;
}
libGame_gv_afk_PlayerAfkWarnCount[lv_triggeringPlayer] += 1;
TimerPause(libGame_gv_afk_PlayerAfkWarningTimer[lv_triggeringPlayer], true);
if ((libStEx_gf_InTrainingMode() == true) && (libGame_gv_afk_PlayerAfkWarnCount[lv_triggeringPlayer] == libGame_gv_afk_AfkMaxWarnCount_Training_C)) {
libGame_gv_afk_PlayerAfkWarning[lv_triggeringPlayer] = true;
UIDisplayMessage(libCore_gv_playerGroupFromPlayer[lv_triggeringPlayer], c_messageAreaDirective, TextExpressionAssemble("Param/Expression/lib_Game_0DABA161"));
TimerStart(libGame_gv_afk_PlayerAfkKickTimer[lv_triggeringPlayer], lv_kickTimerDuration, false, c_timeGame);
}
else if ((libStEx_gf_InTrainingMode() == false) && (libGame_gv_afk_PlayerAfkWarnCount[lv_triggeringPlayer] > libGame_gv_afk_AfkMaxWarnCount_C)) {
libGame_gf_AfkKickPlayer(lv_triggeringPlayer);
}
else if ((libStEx_gf_InTrainingMode() == true) && (libGame_gv_afk_PlayerAfkWarnCount[lv_triggeringPlayer] > libGame_gv_afk_AfkMaxWarnCount_Training_C)) {
libGame_gf_AfkKickPlayer(lv_triggeringPlayer);
}
else if (true) {
libGame_gv_afk_PlayerAfkWarning[lv_triggeringPlayer] = true;
TextExpressionSetToken("Param/Expression/lib_Game_2879DA39", "A", FixedToText(lv_kickTimerDuration, 0));
UIDisplayMessage(libCore_gv_playerGroupFromPlayer[lv_triggeringPlayer], c_messageAreaDirective, TextExpressionAssemble("Param/Expression/lib_Game_2879DA39"));
TimerStart(libGame_gv_afk_PlayerAfkKickTimer[lv_triggeringPlayer], lv_kickTimerDuration, false, c_timeGame);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_AfkPlayerAfkWarningTimerExpires_Init () {
libGame_gt_AfkPlayerAfkWarningTimerExpires = TriggerCreate("libGame_gt_AfkPlayerAfkWarningTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkWarningTimerExpires, libGame_gv_afk_PlayerAfkWarningTimer[1]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkWarningTimerExpires, libGame_gv_afk_PlayerAfkWarningTimer[2]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkWarningTimerExpires, libGame_gv_afk_PlayerAfkWarningTimer[3]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkWarningTimerExpires, libGame_gv_afk_PlayerAfkWarningTimer[4]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkWarningTimerExpires, libGame_gv_afk_PlayerAfkWarningTimer[5]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkWarningTimerExpires, libGame_gv_afk_PlayerAfkWarningTimer[6]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkWarningTimerExpires, libGame_gv_afk_PlayerAfkWarningTimer[7]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkWarningTimerExpires, libGame_gv_afk_PlayerAfkWarningTimer[8]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkWarningTimerExpires, libGame_gv_afk_PlayerAfkWarningTimer[9]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkWarningTimerExpires, libGame_gv_afk_PlayerAfkWarningTimer[10]);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Afk Player Afk Kick Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_AfkPlayerAfkKickTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
int lv_triggeringPlayer;
// Automatic Variable Declarations
const int autoBF9EE333_ae = libCore_gv_bALMaxPlayers;
const int autoBF9EE333_ai = 1;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
if (!((libGame_gv_afk_AfkDetectionSystemEnabled == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_itPlayer = 1;
for ( ; ( (autoBF9EE333_ai >= 0 && lv_itPlayer <= autoBF9EE333_ae) || (autoBF9EE333_ai < 0 && lv_itPlayer >= autoBF9EE333_ae) ) ; lv_itPlayer += autoBF9EE333_ai ) {
if ((EventTimer() == libGame_gv_afk_PlayerAfkKickTimer[lv_itPlayer])) {
lv_triggeringPlayer = lv_itPlayer;
break;
}
}
if ((lv_triggeringPlayer > 0)) {
libGame_gf_AfkKickPlayer(lv_triggeringPlayer);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_AfkPlayerAfkKickTimerExpires_Init () {
libGame_gt_AfkPlayerAfkKickTimerExpires = TriggerCreate("libGame_gt_AfkPlayerAfkKickTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkKickTimerExpires, libGame_gv_afk_PlayerAfkKickTimer[1]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkKickTimerExpires, libGame_gv_afk_PlayerAfkKickTimer[2]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkKickTimerExpires, libGame_gv_afk_PlayerAfkKickTimer[3]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkKickTimerExpires, libGame_gv_afk_PlayerAfkKickTimer[4]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkKickTimerExpires, libGame_gv_afk_PlayerAfkKickTimer[5]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkKickTimerExpires, libGame_gv_afk_PlayerAfkKickTimer[6]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkKickTimerExpires, libGame_gv_afk_PlayerAfkKickTimer[7]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkKickTimerExpires, libGame_gv_afk_PlayerAfkKickTimer[8]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkKickTimerExpires, libGame_gv_afk_PlayerAfkKickTimer[9]);
TriggerAddEventTimer(libGame_gt_AfkPlayerAfkKickTimerExpires, libGame_gv_afk_PlayerAfkKickTimer[10]);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Announcement Message Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_AnnouncementMessageTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
// Automatic Variable Declarations
const int autoCF4991EE_ae = libCore_gv_bALMaxEnginePlayerCount;
const int autoCF4991EE_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_player = 0;
for ( ; ( (autoCF4991EE_ai >= 0 && lv_player <= autoCF4991EE_ae) || (autoCF4991EE_ai < 0 && lv_player >= autoCF4991EE_ae) ) ; lv_player += autoCF4991EE_ai ) {
if ((EventTimer() == libGame_gv_announcementQueue[lv_player].lv_messageTimer)) {
libGame_gf_AnnouncementPlayNextItemForPlayer(lv_player);
break;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_AnnouncementMessageTimerExpires_Init () {
libGame_gt_AnnouncementMessageTimerExpires = TriggerCreate("libGame_gt_AnnouncementMessageTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_AnnouncementMessageTimerExpires, libGame_gv_announcementQueue[1].lv_messageTimer);
TriggerAddEventTimer(libGame_gt_AnnouncementMessageTimerExpires, libGame_gv_announcementQueue[2].lv_messageTimer);
TriggerAddEventTimer(libGame_gt_AnnouncementMessageTimerExpires, libGame_gv_announcementQueue[3].lv_messageTimer);
TriggerAddEventTimer(libGame_gt_AnnouncementMessageTimerExpires, libGame_gv_announcementQueue[4].lv_messageTimer);
TriggerAddEventTimer(libGame_gt_AnnouncementMessageTimerExpires, libGame_gv_announcementQueue[5].lv_messageTimer);
TriggerAddEventTimer(libGame_gt_AnnouncementMessageTimerExpires, libGame_gv_announcementQueue[6].lv_messageTimer);
TriggerAddEventTimer(libGame_gt_AnnouncementMessageTimerExpires, libGame_gv_announcementQueue[7].lv_messageTimer);
TriggerAddEventTimer(libGame_gt_AnnouncementMessageTimerExpires, libGame_gv_announcementQueue[8].lv_messageTimer);
TriggerAddEventTimer(libGame_gt_AnnouncementMessageTimerExpires, libGame_gv_announcementQueue[9].lv_messageTimer);
TriggerAddEventTimer(libGame_gt_AnnouncementMessageTimerExpires, libGame_gv_announcementQueue[10].lv_messageTimer);
TriggerAddEventTimer(libGame_gt_AnnouncementMessageTimerExpires, libGame_gv_announcementQueue[libCore_gv_oBSERVER_ObserverUIPlayer].lv_messageTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Capture Point Logic
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CapturePointLogic_Func (bool testConds, bool runActions) {
// Variable Declarations
const int lv_captureIncrement = 1;
unit lv_itUnit;
int lv_capturePointIndex;
int lv_orderTeamHeroes;
int lv_chaosTeamHeroes;
playergroup lv_capturingPlayers;
bool lv_hasOverCaptureRegion;
bool lv_becameFullyCaptured;
bool[libGame_gv_capturePointMaxCount_C + 1] lv_capperHasMercLordTalent;
// Automatic Variable Declarations
int auto429447FB_ae;
const int auto429447FB_ai = 1;
unitgroup autoC5905908_g;
int autoC5905908_u;
int auto416AF879_val;
int autoAF8EF2F0_val;
int autoB759D9BE_val;
int autoE7E61F37_val;
// Variable Initialization
lv_capturingPlayers = PlayerGroupEmpty();
// Actions
if (!runActions) {
return true;
}
auto429447FB_ae = libGame_gv_capturePointCurrentCount;
lv_capturePointIndex = 1;
for ( ; ( (auto429447FB_ai >= 0 && lv_capturePointIndex <= auto429447FB_ae) || (auto429447FB_ai < 0 && lv_capturePointIndex >= auto429447FB_ae) ) ; lv_capturePointIndex += auto429447FB_ai ) {
if ((UnitBehaviorCount(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit, "DisableBeaconBuff") == 1)) {
continue;
}
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_enabled == false)) {
continue;
}
lv_capturingPlayers = PlayerGroupEmpty();
lv_orderTeamHeroes = 0;
lv_chaosTeamHeroes = 0;
autoC5905908_g = UnitGroup(null, c_playerAny, libGame_gv_capturePoints[lv_capturePointIndex].lv_captureRegion, libCore_gv_filtersHeroic, 0);
autoC5905908_u = UnitGroupCount(autoC5905908_g, c_unitCountAll);
for (;; autoC5905908_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(autoC5905908_g, autoC5905908_u);
if (lv_itUnit == null) { break; }
if (((UnitFilterMatch(lv_itUnit, UnitGetOwner(lv_itUnit), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32)) | (1 << (c_targetFilterBenign - 32)))) == true) || (UnitHasBehavior2(lv_itUnit, "CapturePointAllowed") == true)) && (((UnitBehaviorCount(lv_itUnit, "UltimateEvolutionBuff") == 1) && (UnitBehaviorCount(lv_itUnit, "CapturePointAllowed") == 1)) || ((UnitBehaviorCount(lv_itUnit, "StormEarthFireTimedLife") == 1) && (UnitBehaviorCount(lv_itUnit, "CapturePointAllowed") == 1)) || ((UnitTestState(lv_itUnit, c_unitStateHallucination) == false)))) {
UnitBehaviorAdd(lv_itUnit, "HeroGenericHeroOnCapturePoint", lv_itUnit, 1);
if ((libGame_gv_players[UnitGetOwner(lv_itUnit)].lv_faction == libGame_ge_Faction_Order)) {
lv_orderTeamHeroes += 1;
}
else {
lv_chaosTeamHeroes += 1;
}
PlayerGroupAdd(lv_capturingPlayers, UnitGetOwner(lv_itUnit));
}
}
if ((PlayerGroupCount(lv_capturingPlayers) > 0)) {
libGame_gf_UpdateTimers(lv_capturePointIndex, lv_capturingPlayers);
}
if ((lv_orderTeamHeroes == 0) && (lv_chaosTeamHeroes == 0)) {
auto416AF879_val = libGame_gv_capturePoints[lv_capturePointIndex].lv_emptyPointDecay;
if (auto416AF879_val == libGame_ge_CapturePointDecay_DoNotDecay) {
}
else if (auto416AF879_val == libGame_ge_CapturePointDecay_Neutral) {
if ((libGame_gv_watchTowers[lv_capturePointIndex].lv_decayDelayTicks <= (libGame_gv_TimeToStartDecay_C * 16)) && (UnitGetOwner(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) != libCore_gv_cOMPUTER_Neutral) && (UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libGame_gv_watchTowers[lv_capturePointIndex].lv_decayDelayTicks += 1;
if ((libGame_gv_watchTowers[lv_capturePointIndex].lv_decayDelayTicks == (libGame_gv_TimeToStartDecay_C * 16))) {
libGame_gv_watchTowers[lv_capturePointIndex].lv_decayDelayTicks += 1;
libGame_gv_watchTowers[lv_capturePointIndex].lv_neutralDecayTicks = ((libGame_gv_TimeToDecay_C2 * 16) / libGame_gv_capturePoints[lv_capturePointIndex].lv_pointsNeededToCapture);
}
}
else {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter != 0)) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_RevertingtoNeutral)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_RevertingtoNeutral;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal RevertingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketStop Capture");
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointEmpty");
libGame_gv_watchTowers[lv_capturePointIndex].lv_startedDecaying = true;
}
}
}
if ((libGame_gv_watchTowers[lv_capturePointIndex].lv_neutralDecayTicks < ((libGame_gv_TimeToDecay_C2 * 16) / libGame_gv_capturePoints[lv_capturePointIndex].lv_pointsNeededToCapture)) && (UnitGetOwner(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) != libCore_gv_cOMPUTER_Neutral) && (UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libGame_gv_watchTowers[lv_capturePointIndex].lv_neutralDecayTicks += 1;
}
else {
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libGame_gv_watchTowers[lv_capturePointIndex].lv_neutralDecayTicks = 0;
}
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter < 0)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter += lv_captureIncrement;
}
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter > 0)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter -= lv_captureIncrement;
}
}
}
}
else if (auto416AF879_val == libGame_ge_CapturePointDecay_Owner) {
autoAF8EF2F0_val = UnitGetOwner(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit);
if (autoAF8EF2F0_val == libCore_gv_cOMPUTER_Neutral) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter != 0)) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_RevertingtoNeutral)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_RevertingtoNeutral;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal RevertingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketStop Capture");
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointEmpty");
}
}
}
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter < 0)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter += lv_captureIncrement;
}
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter > 0)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter -= lv_captureIncrement;
}
}
else if (autoAF8EF2F0_val == libCore_gv_cOMPUTER_TeamOrder) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter < libGame_gv_capturePoints[lv_capturePointIndex].lv_pointsNeededToCapture)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter += lv_captureIncrement;
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_Capturing)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_Capturing;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal CapturingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketResume Capture");
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointEmpty");
}
}
}
}
else if (autoAF8EF2F0_val == libCore_gv_cOMPUTER_TeamChaos) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter > (libGame_gv_capturePoints[lv_capturePointIndex].lv_pointsNeededToCapture * -1))) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter -= lv_captureIncrement;
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_Capturing)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_Capturing;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal CapturingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketResume Capture");
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointEmpty");
}
}
}
}
else {
}
}
else {
}
}
else {
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libGame_gv_watchTowers[lv_capturePointIndex].lv_decayDelayTicks = 0;
libGame_gv_watchTowers[lv_capturePointIndex].lv_neutralDecayTicks = 0;
}
}
if ((lv_orderTeamHeroes > 0) && (lv_chaosTeamHeroes > 0)) {
DialogControlSetAnimationState(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureProgressBar, PlayerGroupAll(), "IsContested", "Contested");
autoB759D9BE_val = libGame_gv_capturePoints[lv_capturePointIndex].lv_contestedPointDecay;
if (autoB759D9BE_val == libGame_ge_CapturePointDecay_DoNotDecay) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_Contested)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_Contested;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal ContestedCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointEmpty");
}
}
}
else if (autoB759D9BE_val == libGame_ge_CapturePointDecay_Neutral) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter != 0)) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_RevertingtoNeutral)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_RevertingtoNeutral;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal RevertingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketStop Capture");
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointEmpty");
}
}
}
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter < 0)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter += lv_captureIncrement;
}
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter > 0)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter -= lv_captureIncrement;
}
}
else if (autoB759D9BE_val == libGame_ge_CapturePointDecay_Owner) {
autoE7E61F37_val = UnitGetOwner(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit);
if (autoE7E61F37_val == libCore_gv_cOMPUTER_Neutral) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter != 0)) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_RevertingtoNeutral)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_RevertingtoNeutral;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal RevertingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketStop Capture");
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointEmpty");
}
}
}
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter < 0)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter += lv_captureIncrement;
}
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter > 0)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter -= lv_captureIncrement;
}
}
else if (autoE7E61F37_val == libCore_gv_cOMPUTER_TeamOrder) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter < libGame_gv_capturePoints[lv_capturePointIndex].lv_pointsNeededToCapture)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter += lv_captureIncrement;
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_Capturing)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_Capturing;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal CapturingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketResume Capture");
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointEmpty");
}
}
}
}
else if (autoE7E61F37_val == libCore_gv_cOMPUTER_TeamChaos) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter > (libGame_gv_capturePoints[lv_capturePointIndex].lv_pointsNeededToCapture * -1))) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter -= lv_captureIncrement;
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_Capturing)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_Capturing;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal CapturingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketResume Capture");
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointEmpty");
}
}
}
}
else {
}
}
else {
}
}
else {
DialogControlSetAnimationState(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureProgressBar, PlayerGroupAll(), "IsContested", "NotContested");
}
if ((lv_orderTeamHeroes > 0) && (lv_chaosTeamHeroes == 0) && (libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter < libGame_gv_capturePoints[lv_capturePointIndex].lv_maximumPoints)) {
if (((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter + lv_captureIncrement) >= libGame_gv_capturePoints[lv_capturePointIndex].lv_maximumPoints)) {
lv_becameFullyCaptured = true;
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter = libGame_gv_capturePoints[lv_capturePointIndex].lv_maximumPoints;
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_Captured)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_Captured;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal CapturingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointEmpty");
libNtve_gf_SendActorMessageToUnit(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit, "Signal WatchTowerOwnerOrder");
if ((libGame_gv_watchTowers[lv_capturePointIndex].lv_startedDecaying == true)) {
libGame_gv_watchTowers[lv_capturePointIndex].lv_startedDecaying = false;
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketStart Capture Stand,Work,Start Stand,Work Stand,Work,End");
}
}
else {
libNtve_gf_SendActorMessageToUnit(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit, "Signal CapturePointOwnerOrder");
}
}
}
else {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter += lv_captureIncrement;
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter < 0)) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_RevertingtoNeutral)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_RevertingtoNeutral;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal RevertingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketStop Capture");
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointOccupied");
}
}
}
else {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_Capturing)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_Capturing;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal TeamOrderCapturing", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
libCore_gf_SendActorMessageToDoodadsInRegion("Signal CapturingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointOccupied");
}
}
}
}
}
if ((lv_chaosTeamHeroes > 0) && (lv_orderTeamHeroes == 0) && (libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter > (-1 * libGame_gv_capturePoints[lv_capturePointIndex].lv_maximumPoints))) {
if (((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter - lv_captureIncrement) <= (-1 * libGame_gv_capturePoints[lv_capturePointIndex].lv_maximumPoints))) {
lv_becameFullyCaptured = true;
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter = (-1 * libGame_gv_capturePoints[lv_capturePointIndex].lv_maximumPoints);
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_Captured)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_Captured;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal CapturingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointEmpty");
libNtve_gf_SendActorMessageToUnit(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit, "Signal WatchTowerOwnerChaos");
if ((libGame_gv_watchTowers[lv_capturePointIndex].lv_startedDecaying == true)) {
libGame_gv_watchTowers[lv_capturePointIndex].lv_startedDecaying = false;
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketStart Capture Stand,Work,Start Stand,Work Stand,Work,End");
}
}
else {
libNtve_gf_SendActorMessageToUnit(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit, "Signal CapturePointOwnerChaos");
}
}
}
else {
libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter -= lv_captureIncrement;
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter > 0)) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_RevertingtoNeutral)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_RevertingtoNeutral;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal RevertingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketStop Capture");
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointOccupied");
}
}
}
else {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_Capturing)) {
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_Capturing;
libCore_gf_SendActorMessageToDoodadsInRegion("Signal TeamChaosCapturing", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
libCore_gf_SendActorMessageToDoodadsInRegion("Signal CapturingCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit), 12.0), null);
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "Signal CapturePointOccupied");
}
}
}
}
}
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter == 0)) {
if ((libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState != libGame_ge_CapturePointState_Neutral)) {
if ((UnitGetType(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == "WatchTowerCaptureBeacon")) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_capturePointIndex].lv_watchTowerUnit, "AnimBracketClear Capture Instant");
libNtve_gf_SendActorMessageToUnit(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit, "Signal WatchTowerOwnerNeutral");
}
else {
libNtve_gf_SendActorMessageToUnit(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit, "Signal CapturePointOwnerNeutral");
}
libGame_gv_capturePoints[lv_capturePointIndex].lv_capturePointState = libGame_ge_CapturePointState_Neutral;
}
}
libNtve_gf_SetDialogItemCurrentValue(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureProgressBar, (libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter + libGame_gv_capturePoints[lv_capturePointIndex].lv_maximumPoints), PlayerGroupAll());
if ((UnitGetOwner(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) != libCore_gv_cOMPUTER_Neutral) && (((libGame_gv_capturePoints[lv_capturePointIndex].lv_rememberLastOwner == true) && (UnitGetOwner(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == libCore_gv_cOMPUTER_TeamOrder) && (libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter <= 0)) || ((libGame_gv_capturePoints[lv_capturePointIndex].lv_rememberLastOwner == true) && (UnitGetOwner(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) == libCore_gv_cOMPUTER_TeamChaos) && (libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter >= 0)) || ((libGame_gv_capturePoints[lv_capturePointIndex].lv_rememberLastOwner == false) && (libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter > (libGame_gv_capturePoints[lv_capturePointIndex].lv_pointsNeededToCapture * -1)) && (libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter < libGame_gv_capturePoints[lv_capturePointIndex].lv_pointsNeededToCapture)))) {
libGame_gf_CapturePointChangeOwnership(lv_capturePointIndex, libCore_gv_cOMPUTER_Neutral, lv_capturingPlayers, lv_capperHasMercLordTalent[lv_capturePointIndex]);
}
else if ((UnitGetOwner(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) != libCore_gv_cOMPUTER_TeamOrder) && (libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter >= libGame_gv_capturePoints[lv_capturePointIndex].lv_pointsNeededToCapture)) {
libGame_gf_CapturePointChangeOwnership(lv_capturePointIndex, libCore_gv_cOMPUTER_TeamOrder, lv_capturingPlayers, lv_capperHasMercLordTalent[lv_capturePointIndex]);
}
else if ((UnitGetOwner(libGame_gv_capturePoints[lv_capturePointIndex].lv_captureBeaconUnit) != libCore_gv_cOMPUTER_TeamChaos) && (libGame_gv_capturePoints[lv_capturePointIndex].lv_captureCounter <= (libGame_gv_capturePoints[lv_capturePointIndex].lv_pointsNeededToCapture * -1))) {
libGame_gf_CapturePointChangeOwnership(lv_capturePointIndex, libCore_gv_cOMPUTER_TeamChaos, lv_capturingPlayers, lv_capperHasMercLordTalent[lv_capturePointIndex]);
}
lv_hasOverCaptureRegion = (libGame_gv_capturePoints[lv_capturePointIndex].lv_maximumPoints > libGame_gv_capturePoints[lv_capturePointIndex].lv_pointsNeededToCapture);
if ((lv_becameFullyCaptured == true) && (lv_hasOverCaptureRegion == true)) {
libGame_gf_SendEventCapturePointBecomesFullyOverCaptured(lv_capturePointIndex);
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CapturePointLogic_Init () {
libGame_gt_CapturePointLogic = TriggerCreate("libGame_gt_CapturePointLogic_Func");
TriggerEnable(libGame_gt_CapturePointLogic, false);
TriggerAddEventTimePeriodic(libGame_gt_CapturePointLogic, 0.0625, c_timeGame);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Dim Capture Point
//--------------------------------------------------------------------------------------------------
bool libGame_gt_DimCapturePoint_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itCapturePointIndex;
// Automatic Variable Declarations
const int auto9F786313_ae = libGame_gv_capturePointMaxCount_C;
const int auto9F786313_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_itCapturePointIndex = 0;
for ( ; ( (auto9F786313_ai >= 0 && lv_itCapturePointIndex <= auto9F786313_ae) || (auto9F786313_ai < 0 && lv_itCapturePointIndex >= auto9F786313_ae) ) ; lv_itCapturePointIndex += auto9F786313_ai ) {
if ((EventUnit() == libGame_gv_capturePoints[lv_itCapturePointIndex].lv_captureBeaconUnit)) {
DialogControlSetAnimationState(libGame_gv_capturePoints[lv_itCapturePointIndex].lv_progressBarDimmingFrame, PlayerGroupAll(), "IsDim", "DimmedOn");
libNtve_gf_SendActorMessageToUnit(libGame_gv_capturePoints[lv_itCapturePointIndex].lv_captureBeaconUnit, "SetTintColor 35,35,35 0.000000 OneShot VoidPrisonTint");
libCore_gf_SendActorMessageToDoodadsInRegion("Signal PauseCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_itCapturePointIndex].lv_captureBeaconUnit), 12.0), null);
return true;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_DimCapturePoint_Init () {
libGame_gt_DimCapturePoint = TriggerCreate("libGame_gt_DimCapturePoint_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_DimCapturePoint, null, "DisableBeaconBuff", c_unitBehaviorChangeActivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: UnDim Capture Point
//--------------------------------------------------------------------------------------------------
bool libGame_gt_UnDimCapturePoint_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itCapturePointIndex;
// Automatic Variable Declarations
const int autoDE5B5F2A_ae = libGame_gv_capturePointMaxCount_C;
const int autoDE5B5F2A_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_itCapturePointIndex = 0;
for ( ; ( (autoDE5B5F2A_ai >= 0 && lv_itCapturePointIndex <= autoDE5B5F2A_ae) || (autoDE5B5F2A_ai < 0 && lv_itCapturePointIndex >= autoDE5B5F2A_ae) ) ; lv_itCapturePointIndex += autoDE5B5F2A_ai ) {
if ((EventUnit() == libGame_gv_capturePoints[lv_itCapturePointIndex].lv_captureBeaconUnit)) {
DialogControlSetAnimationState(libGame_gv_capturePoints[lv_itCapturePointIndex].lv_progressBarDimmingFrame, PlayerGroupAll(), "IsDim", "DimmedOff");
libNtve_gf_SendActorMessageToUnit(libGame_gv_capturePoints[lv_itCapturePointIndex].lv_captureBeaconUnit, "ClearTintColor 0.000000 VoidPrisonTint");
libCore_gf_SendActorMessageToDoodadsInRegion("Signal UnPauseCapturePoint", RegionCircle(UnitGetPosition(libGame_gv_capturePoints[lv_itCapturePointIndex].lv_captureBeaconUnit), 12.0), null);
return true;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_UnDimCapturePoint_Init () {
libGame_gt_UnDimCapturePoint = TriggerCreate("libGame_gt_UnDimCapturePoint_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_UnDimCapturePoint, null, "DisableBeaconBuff", c_unitBehaviorChangeDeactivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Tower - Core Is Under Attack
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TowerCoreIsUnderAttack_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itTeamNumber;
unitgroup lv_enemiesNearCore;
// Automatic Variable Declarations
const int auto3B2503E2_ae = libCore_gv_bALMaxTeams;
const int auto3B2503E2_ai = 1;
// Variable Initialization
lv_enemiesNearCore = UnitGroupEmpty();
// Actions
if (!runActions) {
return true;
}
if (((libGame_gv_gameOver == true) || (libGame_gv_towerMapPlaysCoreWarning == false))) {
return true;
}
lv_itTeamNumber = 1;
for ( ; ( (auto3B2503E2_ai >= 0 && lv_itTeamNumber <= auto3B2503E2_ae) || (auto3B2503E2_ai < 0 && lv_itTeamNumber >= auto3B2503E2_ae) ) ; lv_itTeamNumber += auto3B2503E2_ai ) {
if ((libGame_gv_teams[lv_itTeamNumber].lv_core != null) && (UnitHasBehavior2(libGame_gv_teams[lv_itTeamNumber].lv_core, "CoreInvulnerability") == false)) {
lv_enemiesNearCore = UnitGroupSearch(null, UnitGetOwner(libGame_gv_teams[lv_itTeamNumber].lv_core), UnitGetPosition(libGame_gv_teams[lv_itTeamNumber].lv_core), libGame_gv_towerCoreUnderAttackScanRange, UnitFilter(0, 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
if ((libGame_gv_towerTeamCoreIsUnderAttack[lv_itTeamNumber] == true) && (UnitGroupCount(UnitGroupFilter(null, c_playerAny, lv_enemiesNearCore, libCore_gv_filtersHeroicjustexcludingCloakedandDead, 0), c_unitCountAll) == 0) && (UnitGroupCount(UnitGroupFilter(null, c_playerAny, lv_enemiesNearCore, libCore_gv_filtersMercLaner, 0), c_unitCountAll) == 0) && (UnitGroupCount(UnitGroupFilter("CatapultMinion", c_playerAny, lv_enemiesNearCore, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAll) == 0)) {
PingDestroy(libGame_gv_towerTeamCoreAlertPing[lv_itTeamNumber]);
libUIUI_gf_UIPartyFrameShowHideCoreUnderAttackWarning(lv_itTeamNumber, false);
libNtve_gf_StopTimer(libGame_gv_towerTeamCoreAlertTimer[lv_itTeamNumber]);
libGame_gv_towerTeamCoreIsUnderAttack[lv_itTeamNumber] = false;
continue;
}
else {
if ((libGame_gv_towerTeamCoreIsUnderAttack[lv_itTeamNumber] == false) && ((UnitGroupCount(UnitGroupFilter(null, c_playerAny, lv_enemiesNearCore, libCore_gv_filtersHeroicjustexcludingCloakedandDead, 0), c_unitCountAll) > 0) || (UnitGroupCount(UnitGroupFilter(null, c_playerAny, lv_enemiesNearCore, libCore_gv_filtersMercLaner, 0), c_unitCountAll) > 0) || (UnitGroupCount(UnitGroupFilter("CatapultMinion", c_playerAny, lv_enemiesNearCore, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAll) > 0))) {
libGame_gf_TowerCreateCoreUnderAttackPing(libGame_gv_teams[lv_itTeamNumber].lv_core, lv_itTeamNumber);
libUIUI_gf_UIPartyFrameShowHideCoreUnderAttackWarning(lv_itTeamNumber, true);
libGame_gv_towerTeamCoreIsUnderAttack[lv_itTeamNumber] = true;
if ((libGame_gv_towerTeamCoreAlertOnCooldown[lv_itTeamNumber] == false)) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[lv_itTeamNumber].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_AlliedCoreUnderAttack, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
if ((lv_itTeamNumber == libGame_gv_teamOrderIndex_C)) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_BlueTeamCoreUnderAttack, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
else {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_RedTeamCoreUnderAttack, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
TimerStart(libGame_gv_towerTeamCoreAlertTimer[lv_itTeamNumber], libGame_gv_towerCoreUnderAttackAlertRepeatTime, false, c_timeGame);
TimerStart(libGame_gv_towerTeamCoreAlertCooldownTimer[lv_itTeamNumber], libGame_gv_towerCoreUnderAttackAlertMinTime, false, c_timeGame);
libGame_gv_towerTeamCoreAlertOnCooldown[lv_itTeamNumber] = true;
}
}
}
}
}
TimerStart(libGame_gv_towerMainCoreAlertTimer, libGame_gv_towerCoreUnderAttackScanPeriod, false, c_timeGame);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TowerCoreIsUnderAttack_Init () {
libGame_gt_TowerCoreIsUnderAttack = TriggerCreate("libGame_gt_TowerCoreIsUnderAttack_Func");
TriggerAddEventTimer(libGame_gt_TowerCoreIsUnderAttack, libGame_gv_towerMainCoreAlertTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Tower - Core Under Attack Announcement Order
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TowerCoreUnderAttackAnnouncementOrder_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_AlliedCoreUnderAttack, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_BlueTeamCoreUnderAttack, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
TimerStart(libGame_gv_towerTeamCoreAlertTimer[libGame_gv_teamOrderIndex_C], libGame_gv_towerCoreUnderAttackAlertRepeatTime, false, c_timeGame);
TimerStart(libGame_gv_towerTeamCoreAlertCooldownTimer[libGame_gv_teamOrderIndex_C], libGame_gv_towerCoreUnderAttackAlertMinTime, false, c_timeGame);
libGame_gv_towerTeamCoreAlertOnCooldown[libGame_gv_teamOrderIndex_C] = true;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TowerCoreUnderAttackAnnouncementOrder_Init () {
libGame_gt_TowerCoreUnderAttackAnnouncementOrder = TriggerCreate("libGame_gt_TowerCoreUnderAttackAnnouncementOrder_Func");
TriggerAddEventTimer(libGame_gt_TowerCoreUnderAttackAnnouncementOrder, libGame_gv_towerTeamCoreAlertTimer[libGame_gv_teamOrderIndex_C]);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Tower - Core Under Attack Announcement Chaos
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TowerCoreUnderAttackAnnouncementChaos_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gf_AnnouncementAddItemForPlayerGroup(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_AlliedCoreUnderAttack, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_RedTeamCoreUnderAttack, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
TimerStart(libGame_gv_towerTeamCoreAlertTimer[libGame_gv_teamChaosIndex_C], libGame_gv_towerCoreUnderAttackAlertRepeatTime, false, c_timeGame);
TimerStart(libGame_gv_towerTeamCoreAlertCooldownTimer[libGame_gv_teamChaosIndex_C], libGame_gv_towerCoreUnderAttackAlertMinTime, false, c_timeGame);
libGame_gv_towerTeamCoreAlertOnCooldown[libGame_gv_teamChaosIndex_C] = true;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TowerCoreUnderAttackAnnouncementChaos_Init () {
libGame_gt_TowerCoreUnderAttackAnnouncementChaos = TriggerCreate("libGame_gt_TowerCoreUnderAttackAnnouncementChaos_Func");
TriggerAddEventTimer(libGame_gt_TowerCoreUnderAttackAnnouncementChaos, libGame_gv_towerTeamCoreAlertTimer[libGame_gv_teamChaosIndex_C]);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Tower - Core Alert Announcement Cooldown Expires Order
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TowerCoreAlertAnnouncementCooldownExpiresOrder_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gv_towerTeamCoreAlertOnCooldown[libGame_gv_teamOrderIndex_C] = false;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TowerCoreAlertAnnouncementCooldownExpiresOrder_Init () {
libGame_gt_TowerCoreAlertAnnouncementCooldownExpiresOrder = TriggerCreate("libGame_gt_TowerCoreAlertAnnouncementCooldownExpiresOrder_Func");
TriggerAddEventTimer(libGame_gt_TowerCoreAlertAnnouncementCooldownExpiresOrder, libGame_gv_towerTeamCoreAlertCooldownTimer[libGame_gv_teamOrderIndex_C]);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Tower - Core Alert Announcement Cooldown Expires Chaos
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TowerCoreAlertAnnouncementCooldownExpiresChaos_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gv_towerTeamCoreAlertOnCooldown[libGame_gv_teamChaosIndex_C] = false;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TowerCoreAlertAnnouncementCooldownExpiresChaos_Init () {
libGame_gt_TowerCoreAlertAnnouncementCooldownExpiresChaos = TriggerCreate("libGame_gt_TowerCoreAlertAnnouncementCooldownExpiresChaos_Func");
TriggerAddEventTimer(libGame_gt_TowerCoreAlertAnnouncementCooldownExpiresChaos, libGame_gv_towerTeamCoreAlertCooldownTimer[libGame_gv_teamChaosIndex_C]);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Tower - Core Has Taken Damage
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TowerCoreHasTakenDamage_Func (bool testConds, bool runActions) {
// Variable Declarations
playergroup lv_teamUnderAttack;
timer lv_teamAlertTimer;
// Automatic Variable Declarations
// Variable Initialization
lv_teamUnderAttack = PlayerGroupEmpty();
lv_teamAlertTimer = TimerCreate();
// Actions
if (!runActions) {
return true;
}
libUIUI_gf_UIPartyFrameShowHideCoreHealth(true);
DialogControlSetVisible(libUIUI_gv_uIObserverUI.lv_coreHealthUnitStatusFrames[libGame_gv_teamOrderIndex_C], libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], true);
DialogControlSetVisible(libUIUI_gv_uIObserverUI.lv_coreHealthUnitStatusFrames[libGame_gv_teamChaosIndex_C], libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], true);
UnitBehaviorRemove(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_core, "PalaceDamageResponseController", 1);
UnitBehaviorRemove(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_core, "PalaceDamageResponseController", 1);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TowerCoreHasTakenDamage_Init () {
libGame_gt_TowerCoreHasTakenDamage = TriggerCreate("libGame_gt_TowerCoreHasTakenDamage_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_TowerCoreHasTakenDamage, c_playerAny, "PalaceDamageResponseDummySet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: CC Recognition - Slow
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CCRecognitionSlow_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((UnitGetOwner(EventUnit()) > 0))) {
return false;
}
if (!((UnitGetOwner(EventUnit()) <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gf_CCRecognitionCCReduction(EventUnit(), EventUnitBehavior());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CCRecognitionSlow_Init () {
libGame_gt_CCRecognitionSlow = TriggerCreate("libGame_gt_CCRecognitionSlow_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionSlow, null, c_behaviorCategorySlow, c_unitBehaviorChangeRefresh);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionSlow, null, c_behaviorCategorySlow, c_unitBehaviorChangeIncrease);
}
//--------------------------------------------------------------------------------------------------
// Trigger: CC Recognition - Blind
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CCRecognitionBlind_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_blindedUnit;
// Automatic Variable Declarations
// Variable Initialization
lv_blindedUnit = EventUnit();
// Conditions
if (testConds) {
if (!((UnitHasBehavior2(lv_blindedUnit, "GenericVehicleBehaviorOccupied") == true))) {
return false;
}
if (!((UnitGetOwner(lv_blindedUnit) > 0))) {
return false;
}
if (!((UnitGetOwner(lv_blindedUnit) <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gf_CCRecognitionCCReduction(lv_blindedUnit, EventUnitBehavior());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CCRecognitionBlind_Init () {
libGame_gt_CCRecognitionBlind = TriggerCreate("libGame_gt_CCRecognitionBlind_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionBlind, null, c_behaviorCategoryDebuffBlind, c_unitBehaviorChangeIncrease);
}
//--------------------------------------------------------------------------------------------------
// Trigger: CC Recognition - Root
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CCRecognitionRoot_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_unit;
string lv_behavior;
// Automatic Variable Declarations
// Variable Initialization
lv_unit = EventUnit();
lv_behavior = EventUnitBehavior();
// Conditions
if (testConds) {
if (!((UnitGetOwner(EventUnit()) > 0))) {
return false;
}
if (!((UnitGetOwner(EventUnit()) <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gf_CCRecognitionCCReduction(lv_unit, lv_behavior);
if ((UnitBehaviorCount(EventUnit(), "HeroGenericHasNoStatusBar") == 0)) {
libUIUI_gf_HeroConsoleUnitStatusBarsUpdateStunDeathBar(lv_behavior, UnitGetOwner(lv_unit));
}
UIAlert("YourHeroHasBeenRooted", UnitGetOwner(lv_unit), StringToText(""), null);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CCRecognitionRoot_Init () {
libGame_gt_CCRecognitionRoot = TriggerCreate("libGame_gt_CCRecognitionRoot_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionRoot, null, c_behaviorCategoryDebuffRoot, c_unitBehaviorChangeCreate);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionRoot, null, c_behaviorCategoryDebuffRoot, c_unitBehaviorChangeRefresh);
}
//--------------------------------------------------------------------------------------------------
// Trigger: CC Recognition - Stun
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CCRecognitionStun_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_unit;
string lv_behavior;
// Automatic Variable Declarations
// Variable Initialization
lv_unit = EventUnit();
lv_behavior = EventUnitBehavior();
// Conditions
if (testConds) {
if (!((UnitGetOwner(EventUnit()) > 0))) {
return false;
}
if (!((UnitGetOwner(EventUnit()) <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((UnitBehaviorCount(EventUnit(), "HeroGenericHasNoStatusBar") == 0)) {
libUIUI_gf_HeroConsoleUnitStatusBarsUpdateStunDeathBar(lv_behavior, UnitGetOwner(lv_unit));
}
if (((UnitBehaviorHasCategoryFlag(lv_behavior, c_behaviorCategoryUnreducible) == true) && (UnitBehaviorHasCategoryFlag(lv_behavior, c_behaviorCategoryStun) == true))) {
}
else {
libGame_gf_CCRecognitionCCReduction(lv_unit, lv_behavior);
}
if (((lv_unit == libGame_gv_players[UnitGetOwner(lv_unit)].lv_heroUnit) || (lv_unit == libGame_gv_players[UnitGetOwner(lv_unit)].lv_activeVehicle))) {
if ((lv_behavior == "StitchesHooked")) {
libUIUI_gf_FullscreenOverlaysCreateCCEffectFlashForPlayer(UnitGetOwner(lv_unit), 0.0);
}
else {
libUIUI_gf_FullscreenOverlaysCreateCCEffectFlashForPlayer(UnitGetOwner(lv_unit), UnitBehaviorDuration(lv_unit, lv_behavior));
}
}
UIAlert("YourHeroHasBeenStunned", UnitGetOwner(lv_unit), StringToText(""), null);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CCRecognitionStun_Init () {
libGame_gt_CCRecognitionStun = TriggerCreate("libGame_gt_CCRecognitionStun_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionStun, null, c_behaviorCategoryStun, c_unitBehaviorChangeCreate);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionStun, null, c_behaviorCategoryStun, c_unitBehaviorChangeRefresh);
}
//--------------------------------------------------------------------------------------------------
// Trigger: CC Recognition - Taunt
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CCRecognitionTaunt_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_tauntedUnit;
int lv_tauntedPlayer;
string lv_tauntBehavior;
unit lv_casterUnit;
bool lv_tauntedUnitHasBasicAttackAbility;
// Automatic Variable Declarations
// Variable Initialization
lv_tauntedUnit = EventUnit();
lv_tauntedPlayer = UnitGetOwner(lv_tauntedUnit);
lv_tauntBehavior = EventUnitBehavior();
lv_casterUnit = UnitBehaviorEffectUnit(lv_tauntedUnit, lv_tauntBehavior, c_effectUnitCaster, 0);
lv_tauntedUnitHasBasicAttackAbility = UnitAbilityExists(lv_tauntedUnit, "attack");
// Conditions
if (testConds) {
if (!((lv_tauntedPlayer > 0))) {
return false;
}
if (!((lv_tauntedPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gf_PlayerHeroDisplacementCameraLock(lv_tauntedUnit, lv_tauntBehavior);
if ((UnitIsAlive(lv_tauntedUnit) == true) && (UnitTestState(lv_tauntedUnit, c_unitStateHallucination) == false) && (UnitHasBehavior2(lv_tauntedUnit, "HeroGenericIgnoreFullscreenOverlay") == false)) {
libUIUI_gf_FullscreenOverlayAddItemForPlayer(lv_tauntedPlayer, libUIUI_ge_FullscreenOverlayPriorities_Stasis, "Cutscenes\\GameUI_TauntOverlay.StormCutscene", lv_tauntBehavior);
}
while ((UnitHasBehavior2(lv_tauntedUnit, lv_tauntBehavior) == true)) {
if (((OrderGetTargetType(UnitOrder(lv_tauntedUnit, 0)) != c_orderTargetUnit) || (OrderGetTargetUnit(UnitOrder(lv_tauntedUnit, 0)) != lv_casterUnit))) {
UnitCreateEffectUnit(lv_casterUnit, "StormGenericTauntClearTargetOrders", lv_tauntedUnit);
if ((lv_tauntedUnitHasBasicAttackAbility == true)) {
UnitIssueOrder(lv_tauntedUnit, OrderTargetingUnit(AbilityCommand("attack", 0), lv_casterUnit), c_orderQueueReplace);
}
else {
UnitCreateEffectUnit(lv_casterUnit, "ForceTargetToAttackCasterUnitScriptDummy", lv_tauntedUnit);
}
}
Wait(0.0625, c_timeGame);
}
if ((UnitTestState(lv_tauntedUnit, c_unitStateHallucination) == false) && (UnitHasBehavior2(lv_tauntedUnit, "HeroGenericIgnoreFullscreenOverlay") == false)) {
libUIUI_gf_FullscreenOverlayRemoveItemFromQueueForPlayer(lv_tauntedPlayer, "Cutscenes\\GameUI_SylvanasOverlay.StormCutscene", lv_tauntBehavior);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CCRecognitionTaunt_Init () {
libGame_gt_CCRecognitionTaunt = TriggerCreate("libGame_gt_CCRecognitionTaunt_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionTaunt, null, c_behaviorCategoryTaunt, c_unitBehaviorChangeCreate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: CC Recognition - Silenced
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CCRecognitionSilenced_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_unit;
string lv_behavior;
fixed lv_vertOffset;
fixed lv_horizOffset;
// Automatic Variable Declarations
// Variable Initialization
lv_unit = EventUnit();
lv_behavior = EventUnitBehavior();
// Conditions
if (testConds) {
if (!((UnitGetOwner(EventUnit()) > 0))) {
return false;
}
if (!((UnitGetOwner(EventUnit()) <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((UnitBehaviorCount(EventUnit(), "HeroGenericHasNoStatusBar") == 0)) {
libUIUI_gf_HeroConsoleUnitStatusBarsUpdateStunDeathBar(lv_behavior, UnitGetOwner(lv_unit));
}
lv_vertOffset = 2.0;
lv_horizOffset = RandomFixed(-0.4, -0.6);
if ((EventUnit() == libGame_gv_players[UnitGetOwner(EventUnit())].lv_heroUnit)) {
libUIUI_gf_FullscreenOverlaysCreateCCEffectFlashForPlayer(UnitGetOwner(EventUnit()), UnitBehaviorDuration(EventUnit(), EventUnitBehavior()));
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CCRecognitionSilenced_Init () {
libGame_gt_CCRecognitionSilenced = TriggerCreate("libGame_gt_CCRecognitionSilenced_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionSilenced, null, c_behaviorCategoryDebuffSilence, c_unitBehaviorChangeCreate);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionSilenced, null, c_behaviorCategoryDebuffSilence, c_unitBehaviorChangeRefresh);
}
//--------------------------------------------------------------------------------------------------
// Trigger: CC Recognition - Stasis
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CCRecognitionStasis_Func (bool testConds, bool runActions) {
// Variable Declarations
fixed lv_vertOffset;
fixed lv_horizOffset;
// Automatic Variable Declarations
// Variable Initialization
// Conditions
if (testConds) {
if (!((UnitGetOwner(EventUnit()) > 0))) {
return false;
}
if (!((UnitGetOwner(EventUnit()) <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_vertOffset = 1.5;
lv_horizOffset = RandomFixed(0.4, 0.6);
if ((EventUnit() == libGame_gv_players[UnitGetOwner(EventUnit())].lv_heroUnit)) {
libUIUI_gf_FullscreenOverlaysCreateCCEffectFlashForPlayer(UnitGetOwner(EventUnit()), 0.0);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CCRecognitionStasis_Init () {
libGame_gt_CCRecognitionStasis = TriggerCreate("libGame_gt_CCRecognitionStasis_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_CCRecognitionStasis, null, "VoidPrisonDisplay", c_unitBehaviorChangeCreate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: CC Recognition - Time Stop On
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CCRecognitionTimeStopOn_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_timeStopVictim;
int lv_timeStopVictimPlayer;
// Automatic Variable Declarations
// Variable Initialization
lv_timeStopVictim = EventUnit();
lv_timeStopVictimPlayer = UnitGetOwner(lv_timeStopVictim);
// Conditions
if (testConds) {
if (!((libGame_gf_UnitIsHero(lv_timeStopVictim) == true))) {
return false;
}
if (!((lv_timeStopVictimPlayer > 0))) {
return false;
}
if (!((lv_timeStopVictimPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((UnitHasBehaviorWithCategoryFlag(EventUnit(), c_behaviorCategoryTimeStop) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
PlayerPauseAllCooldowns(lv_timeStopVictimPlayer, true);
PlayerPauseAllCharges(lv_timeStopVictimPlayer, true);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CCRecognitionTimeStopOn_Init () {
libGame_gt_CCRecognitionTimeStopOn = TriggerCreate("libGame_gt_CCRecognitionTimeStopOn_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionTimeStopOn, null, c_behaviorCategoryTimeStop, c_unitBehaviorChangeActivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: CC Recognition - Time Stop Off Resume Cooldowns
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CCRecognitionTimeStopOffResumeCooldowns_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_timeStopVictim;
int lv_timeStopVictimPlayer;
// Automatic Variable Declarations
// Variable Initialization
lv_timeStopVictim = EventUnit();
lv_timeStopVictimPlayer = UnitGetOwner(lv_timeStopVictim);
// Conditions
if (testConds) {
if (!((libGame_gf_UnitIsHero(lv_timeStopVictim) == true))) {
return false;
}
if (!((lv_timeStopVictimPlayer > 0))) {
return false;
}
if (!((lv_timeStopVictimPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((UnitHasBehaviorWithCategoryFlag(EventUnit(), c_behaviorCategoryTimeStop) != true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
PlayerPauseAllCooldowns(lv_timeStopVictimPlayer, false);
PlayerPauseAllCharges(lv_timeStopVictimPlayer, false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CCRecognitionTimeStopOffResumeCooldowns_Init () {
libGame_gt_CCRecognitionTimeStopOffResumeCooldowns = TriggerCreate("libGame_gt_CCRecognitionTimeStopOffResumeCooldowns_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionTimeStopOffResumeCooldowns, null, c_behaviorCategoryTimeStop, c_unitBehaviorChangeDeactivate);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionTimeStopOffResumeCooldowns, null, c_behaviorCategoryTimeStop, c_unitBehaviorChangeDecrease);
}
//--------------------------------------------------------------------------------------------------
// Trigger: CC Recognition - Time Stop Off Unpathable Fix
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CCRecognitionTimeStopOffUnpathableFix_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_timeStopEndingUnit;
// Automatic Variable Declarations
// Variable Initialization
lv_timeStopEndingUnit = EventUnit();
// Conditions
if (testConds) {
if (!((UnitIsValid(lv_timeStopEndingUnit) == true))) {
return false;
}
if (!((libGame_gf_UnitIsHero(lv_timeStopEndingUnit) == true))) {
return false;
}
if (!((UnitHasBehavior2(EventUnit(), "IsPseudoStructure") == false))) {
return false;
}
if (!(((PathingType(UnitGetPosition(lv_timeStopEndingUnit)) == c_pathingUnpathable) || (PathingType(UnitGetPosition(lv_timeStopEndingUnit)) == c_pathingCliff) || (PathingType(UnitGetPosition(lv_timeStopEndingUnit)) == c_pathingBuilding)))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
Wait(0.25, c_timeGame);
if ((UnitGetMoverLink(lv_timeStopEndingUnit) == "Ground") && (UnitIsValid(lv_timeStopEndingUnit) == true)) {
UnitCreateEffectUnit(lv_timeStopEndingUnit, "HeroGenericMissileInterruptLaunchMissileSource", lv_timeStopEndingUnit);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CCRecognitionTimeStopOffUnpathableFix_Init () {
libGame_gt_CCRecognitionTimeStopOffUnpathableFix = TriggerCreate("libGame_gt_CCRecognitionTimeStopOffUnpathableFix_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_CCRecognitionTimeStopOffUnpathableFix, null, c_behaviorCategoryTimeStop, c_unitBehaviorChangeDecrease);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Death Recap - Hero Dies
//--------------------------------------------------------------------------------------------------
bool libGame_gt_DeathRecapHeroDies_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itManualSpawnHero;
// Automatic Variable Declarations
const int auto23D24E5A_ae = libCore_gv_dataHeroesManualSpawnHeroesCount;
const int auto23D24E5A_ai = 1;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gf_HeroKilledPlayer() >= 1))) {
return false;
}
if (!((libGame_gf_HeroKilledPlayer() <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_itManualSpawnHero = 1;
for ( ; ( (auto23D24E5A_ai >= 0 && lv_itManualSpawnHero <= auto23D24E5A_ae) || (auto23D24E5A_ai < 0 && lv_itManualSpawnHero >= auto23D24E5A_ae) ) ; lv_itManualSpawnHero += auto23D24E5A_ai ) {
if ((UnitGetType(libGame_gf_HeroKilledUnit()) == "HeroGall")) {
return true;
}
}
libGame_gf_DeathRecapPopulateDeathRecapDataForPlayer(libGame_gf_HeroKilledUnit(), libGame_gf_HeroKilledPlayer());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_DeathRecapHeroDies_Init () {
libGame_gt_DeathRecapHeroDies = TriggerCreate("libGame_gt_DeathRecapHeroDies_Func");
libGame_gf_HeroKilled(libGame_gt_DeathRecapHeroDies);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Death Recap - Hero Respawn
//--------------------------------------------------------------------------------------------------
bool libGame_gt_DeathRecapHeroRespawn_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libUIUI_gf_DeathRecapShowHideToastButtonForPlayer(false, libGame_gf_HeroRespawnPlayer());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_DeathRecapHeroRespawn_Init () {
libGame_gt_DeathRecapHeroRespawn = TriggerCreate("libGame_gt_DeathRecapHeroRespawn_Func");
libGame_gf_HeroRespawn(libGame_gt_DeathRecapHeroRespawn);
}
//--------------------------------------------------------------------------------------------------
// Trigger: DEBUG - Manual Assign Award
//--------------------------------------------------------------------------------------------------
bool libGame_gt_DEBUGManualAssignAward_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
int lv_awardIndex;
// Automatic Variable Declarations
// Variable Initialization
// Conditions
if (testConds) {
if (!((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true))) {
return false;
}
if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((StringWord(EventChatMessage(false), 2) == "")) {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_2114147A"), true);
return true;
}
else {
lv_awardIndex = StringToInt(StringWord(EventChatMessage(false), 2));
}
if ((StringWord(EventChatMessage(false), 3) == "")) {
lv_player = 1;
}
else {
lv_player = StringToInt(StringWord(EventChatMessage(false), 3));
}
if ((lv_awardIndex == 0)) {
libGame_gv_mVPManualOverride = lv_player;
libGame_gv_playerAwardEligibility[lv_player][(lv_awardIndex)].lv_dEBUGManuallyForceAssigned = true;
TriggerDebugOutput(1, (StringExternal("Param/Value/lib_Game_CFC72273") + IntToText(lv_player)), true);
}
else {
libGame_gf_SetAwardValueandWeight(lv_player, 250000.0, lv_awardIndex);
libGame_gv_playerAwardEligibility[lv_player][(lv_awardIndex)].lv_dEBUGManuallyForceAssigned = true;
TriggerDebugOutput(1, (StringExternal("Param/Value/lib_Game_1EE7296C") + IntToText(lv_player)), true);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_DEBUGManualAssignAward_Init () {
libGame_gt_DEBUGManualAssignAward = TriggerCreate("libGame_gt_DEBUGManualAssignAward_Func");
TriggerAddEventChatMessage(libGame_gt_DEBUGManualAssignAward, c_playerAny, "-assigneom", false);
}
//--------------------------------------------------------------------------------------------------
// Trigger: End of Match Awards Disabled Response
//--------------------------------------------------------------------------------------------------
bool libGame_gt_EndofMatchAwardsDisabledResponse_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gv_endofMatchAwardsDisabled = true;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_EndofMatchAwardsDisabledResponse_Init () {
libGame_gt_EndofMatchAwardsDisabledResponse = TriggerCreate("libGame_gt_EndofMatchAwardsDisabledResponse_Func");
libGame_gf_EndofMatchAwardsDisabled(libGame_gt_EndofMatchAwardsDisabledResponse);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Map-Specific Event Initialize Response
//--------------------------------------------------------------------------------------------------
bool libGame_gt_MapSpecificEventInitializeResponse_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gf_InitializeAwardData(libGame_ge_SecondaryAwards_MapSpecific, libGame_gf_MapSpecificAwardInitializeBadgeIndex(), libGame_gf_MapSpecificAwardInitializeName(), StringToText(""), libGame_gf_MapSpecificAwardInitializeSuffix(), libGame_gf_MapSpecificAwardInitializeBase(), libGame_gf_MapSpecificAwardInitializeGateByBase(), libGame_gf_MapSpecificAwardInitializePresentasRatio(), (libGame_gf_MapSpecificAwardInitializeScoreValue()), libGame_gf_MapSpecificAwardInitializeTooltip());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_MapSpecificEventInitializeResponse_Init () {
libGame_gt_MapSpecificEventInitializeResponse = TriggerCreate("libGame_gt_MapSpecificEventInitializeResponse_Func");
libGame_gf_MapSpecificAwardInitialize(libGame_gt_MapSpecificEventInitializeResponse);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Map-Specific Event Update Response
//--------------------------------------------------------------------------------------------------
bool libGame_gt_MapSpecificEventUpdateResponse_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_Player;
fixed lv_Value;
bool lv_isAdd;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_Player = libGame_gf_MapSpecificAwardUpdatePlayer();
lv_Value = libGame_gf_MapSpecificAwardUpdateValue();
lv_isAdd = libGame_gf_MapSpecificAwardUpdateIsAdd();
if ((lv_isAdd == true)) {
libGame_gf_AddtoAwardValue(lv_Player, lv_Value, libGame_ge_SecondaryAwards_MapSpecific);
}
else {
libGame_gf_SetAwardValueandWeight(lv_Player, lv_Value, libGame_ge_SecondaryAwards_MapSpecific);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_MapSpecificEventUpdateResponse_Init () {
libGame_gt_MapSpecificEventUpdateResponse = TriggerCreate("libGame_gt_MapSpecificEventUpdateResponse_Func");
libGame_gf_MapSpecificAwardUpdate(libGame_gt_MapSpecificEventUpdateResponse);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Add to Vengeance Targets
//--------------------------------------------------------------------------------------------------
bool libGame_gt_AddtoVengeanceTargets_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_killingPlayer;
int lv_killedPlayer;
// Automatic Variable Declarations
// Variable Initialization
lv_killingPlayer = libGame_gf_HeroKilledKillingPlayer();
lv_killedPlayer = libGame_gf_HeroKilledPlayer();
// Conditions
if (testConds) {
if (!((lv_killedPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((lv_killingPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gv_vengeanceTargets[lv_killedPlayer][lv_killingPlayer] += 1;
if ((libGame_gv_vengeanceTargets[lv_killingPlayer][lv_killedPlayer] > 0)) {
libGame_gf_AddtoAwardValue(lv_killingPlayer, 1.0, libGame_ge_SecondaryAwards_Avenger);
libGame_gv_vengeanceTargets[lv_killingPlayer][lv_killedPlayer] -= 1;
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_AddtoVengeanceTargets_Init () {
libGame_gt_AddtoVengeanceTargets = TriggerCreate("libGame_gt_AddtoVengeanceTargets_Func");
libGame_gf_HeroKilled(libGame_gt_AddtoVengeanceTargets);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Escape Tracking Low Health Detected
//--------------------------------------------------------------------------------------------------
bool libGame_gt_EscapeTrackingLowHealthDetected_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_escapingUnit;
int lv_escapingPlayer;
// Automatic Variable Declarations
// Variable Initialization
lv_escapingUnit = EventUnit();
lv_escapingPlayer = UnitGetOwner(lv_escapingUnit);
// Conditions
if (testConds) {
if (!((UnitTestState(lv_escapingUnit, c_unitStateHallucination) == false))) {
return false;
}
if (!((lv_escapingPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((UnitGroupHasUnit(libGame_gv_escapeTrackingHeroReducedtoLowHealthUnitGroup[lv_escapingPlayer], lv_escapingUnit) == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
UnitGroupAdd(libGame_gv_escapeTrackingHeroReducedtoLowHealthUnitGroup[lv_escapingPlayer], lv_escapingUnit);
libGame_gf_EscapeTrackingCreditEscapeAttempt(lv_escapingPlayer, lv_escapingUnit);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_EscapeTrackingLowHealthDetected_Init () {
libGame_gt_EscapeTrackingLowHealthDetected = TriggerCreate("libGame_gt_EscapeTrackingLowHealthDetected_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_EscapeTrackingLowHealthDetected, null, "EndOfMatchAwardsHeroGenericLowHealthMonitor", c_unitBehaviorChangeActivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Event-Based Awards Data Report
//--------------------------------------------------------------------------------------------------
bool libGame_gt_EventBasedAwardsDataReport_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_iterator;
// Automatic Variable Declarations
int auto9E870A07_ae;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
auto9E870A07_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= auto9E870A07_ae ; lv_iterator += 1 ) {
if ((PlayerStatus(lv_iterator) == c_playerStatusUnused)) {
continue;
}
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "ClutchHealsPerformed", libGame_gv_playerAwardEligibility[lv_iterator][libGame_ge_SecondaryAwards_ClutchHealer].lv_value);
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "TimeStunningEnemyHeroes", libGame_gv_playerAwardEligibility[lv_iterator][libGame_ge_SecondaryAwards_Stunner].lv_value);
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "TimeRootingEnemyHeroes", libGame_gv_playerAwardEligibility[lv_iterator][libGame_ge_SecondaryAwards_Trapper].lv_value);
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "ProtectionGivenToAllies", libGame_gv_playerAwardEligibility[lv_iterator][libGame_ge_SecondaryAwards_Protector].lv_value);
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "TimeSilencingEnemyHeroes", libGame_gv_playerAwardEligibility[lv_iterator][libGame_ge_SecondaryAwards_Silencer].lv_value);
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "TeamfightDamageTaken", libGame_gv_playerAwardEligibility[lv_iterator][libGame_ge_SecondaryAwards_Guardian].lv_value);
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "TeamfightHealingDone", libGame_gv_playerAwardEligibility[lv_iterator][libGame_ge_SecondaryAwards_CombatMedic].lv_value);
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "EscapesPerformed", libGame_gv_playerAwardEligibility[lv_iterator][libGame_ge_SecondaryAwards_EscapeArtist].lv_value);
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "TeamfightEscapesPerformed", libGame_gv_playerAwardEligibility[lv_iterator][libGame_ge_SecondaryAwards_Daredevil].lv_value);
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "TeamfightHeroDamage", libGame_gv_playerAwardEligibility[lv_iterator][libGame_ge_SecondaryAwards_Scrapper].lv_value);
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "VengeancesPerformed", libGame_gv_playerAwardEligibility[lv_iterator][libGame_ge_SecondaryAwards_Avenger].lv_value);
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "OutnumberedDeaths", libGame_gv_outnumberedDeathCount[lv_iterator]);
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "TeamLevel", UnitXPGetCurrentLevel(libGame_gv_players[lv_iterator].lv_heroUnit, null));
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_EventBasedAwardsDataReport_Init () {
libGame_gt_EventBasedAwardsDataReport = TriggerCreate("libGame_gt_EventBasedAwardsDataReport_Func");
libGame_gf_GameOverEvent(libGame_gt_EventBasedAwardsDataReport);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Track If Death Outnumbered
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TrackIfDeathOutnumbered_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_killedUnit;
int lv_killedPlayer;
// Automatic Variable Declarations
// Variable Initialization
lv_killedUnit = libGame_gf_HeroKilledUnit();
lv_killedPlayer = UnitGetOwner(lv_killedUnit);
// Conditions
if (testConds) {
if (!((libGame_gf_HeroKilledPlayer() >= 1))) {
return false;
}
if (!((libGame_gf_HeroKilledPlayer() <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!(((libGame_gv_teamfightTrackingNearbyAllyCount[lv_killedPlayer] + libGame_gv_nearbyAlliesRecentlyKilledinTeamfight[lv_killedPlayer]) < libGame_gv_teamfightTrackingNearbyEnemyCount[lv_killedPlayer]))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gv_outnumberedDeathCount[lv_killedPlayer] += 1;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TrackIfDeathOutnumbered_Init () {
libGame_gt_TrackIfDeathOutnumbered = TriggerCreate("libGame_gt_TrackIfDeathOutnumbered_Func");
libGame_gf_HeroKilled(libGame_gt_TrackIfDeathOutnumbered);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Team Player Hero Death Grace Period
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TeamPlayerHeroDeathGracePeriod_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_killedUnit;
int lv_killedPlayer;
unitgroup lv_allyUnitGroup;
int lv_iterator;
unit lv_unitIterator;
int lv_ownerofUnitIterator;
// Automatic Variable Declarations
unitgroup autoD84BC848_g;
int autoD84BC848_u;
unitgroup auto571F68DC_g;
int auto571F68DC_u;
// Variable Initialization
lv_killedUnit = libGame_gf_HeroKilledUnit();
lv_killedPlayer = UnitGetOwner(lv_killedUnit);
lv_allyUnitGroup = UnitGroupEmpty();
// Conditions
if (testConds) {
if (!((libGame_gf_HeroKilledPlayer() >= 1))) {
return false;
}
if (!((libGame_gf_HeroKilledPlayer() <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_allyUnitGroup = UnitGroupSearch(null, lv_killedPlayer, UnitGetPosition(libGame_gv_players[lv_killedPlayer].lv_heroUnit), libGame_gv_teamfightTrackingRadius, UnitFilter((1 << c_targetFilterHeroic), 0, (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterCreep) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
autoD84BC848_g = lv_allyUnitGroup;
autoD84BC848_u = UnitGroupCount(autoD84BC848_g, c_unitCountAll);
for (;; autoD84BC848_u -= 1) {
lv_unitIterator = UnitGroupUnitFromEnd(autoD84BC848_g, autoD84BC848_u);
if (lv_unitIterator == null) { break; }
lv_ownerofUnitIterator = UnitGetOwner(lv_unitIterator);
if (((lv_unitIterator == libGame_gv_players[lv_ownerofUnitIterator].lv_heroUnit))) {
libGame_gv_nearbyAlliesRecentlyKilledinTeamfight[UnitGetOwner(lv_unitIterator)] += 1;
}
}
Wait(5.0, c_timeGame);
auto571F68DC_g = lv_allyUnitGroup;
auto571F68DC_u = UnitGroupCount(auto571F68DC_g, c_unitCountAll);
for (;; auto571F68DC_u -= 1) {
lv_unitIterator = UnitGroupUnitFromEnd(auto571F68DC_g, auto571F68DC_u);
if (lv_unitIterator == null) { break; }
lv_ownerofUnitIterator = UnitGetOwner(lv_unitIterator);
if (((lv_unitIterator == libGame_gv_players[lv_ownerofUnitIterator].lv_heroUnit))) {
libGame_gv_nearbyAlliesRecentlyKilledinTeamfight[UnitGetOwner(lv_unitIterator)] -= 1;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TeamPlayerHeroDeathGracePeriod_Init () {
libGame_gt_TeamPlayerHeroDeathGracePeriod = TriggerCreate("libGame_gt_TeamPlayerHeroDeathGracePeriod_Func");
libGame_gf_HeroKilled(libGame_gt_TeamPlayerHeroDeathGracePeriod);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Add Combat Medic Healing
//--------------------------------------------------------------------------------------------------
bool libGame_gt_AddCombatMedicHealing_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_healedUnit;
int lv_healedPlayer;
int lv_healingPlayer;
// Automatic Variable Declarations
// Variable Initialization
lv_healedUnit = EventUnit();
lv_healedPlayer = UnitGetOwner(lv_healedUnit);
lv_healingPlayer = UnitGetOwner(EventUnitHealLaunchUnit());
// Conditions
if (testConds) {
if (!((lv_healedPlayer > 0))) {
return false;
}
if (!((lv_healedPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((lv_healingPlayer > 0))) {
return false;
}
if (!((lv_healingPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((lv_healingPlayer != lv_healedPlayer))) {
return false;
}
if (!((UnitFilterMatch(lv_healedUnit, lv_healingPlayer, UnitFilter((1 << c_targetFilterHeroic), 0, 0, 0)) == true))) {
return false;
}
if (!((libGame_gv_teamfightTrackingNearbyAllyCount[lv_healingPlayer] >= (libGame_gv_teamfightTrackingCount - 1)))) {
return false;
}
if (!((libGame_gv_teamfightTrackingNearbyEnemyCount[lv_healingPlayer] >= libGame_gv_teamfightTrackingCount))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gf_AddtoAwardValue(lv_healingPlayer, EventUnitHealAmount(), libGame_ge_SecondaryAwards_CombatMedic);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_AddCombatMedicHealing_Init () {
libGame_gt_AddCombatMedicHealing = TriggerCreate("libGame_gt_AddCombatMedicHealing_Func");
TriggerAddEventUnitHealed(libGame_gt_AddCombatMedicHealing, null, c_unitVitalLife, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Teamfight Tracking
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TeamfightTracking_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_playerIterator;
unitgroup lv_allyUnitGroup;
unitgroup lv_enemyUnitGroup;
int lv_allyUnitCount;
int lv_enemyUnitCount;
// Automatic Variable Declarations
int auto4E466BEE_ae;
// Variable Initialization
lv_allyUnitGroup = UnitGroupEmpty();
lv_enemyUnitGroup = UnitGroupEmpty();
// Actions
if (!runActions) {
return true;
}
while ((libGame_gv_gameOver == false)) {
auto4E466BEE_ae = libCore_gv_bALMaxPlayers;
lv_playerIterator = 1;
for ( ; lv_playerIterator <= auto4E466BEE_ae ; lv_playerIterator += 1 ) {
if ((UnitIsValid(libGame_gv_players[lv_playerIterator].lv_heroUnit) == true)) {
lv_allyUnitGroup = UnitGroupSearch(null, lv_playerIterator, UnitGetPosition(libGame_gv_players[lv_playerIterator].lv_heroUnit), libGame_gv_teamfightTrackingRadius, UnitFilter((1 << c_targetFilterHeroic), 0, (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterCreep) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
libGame_gv_teamfightTrackingNearbyAllyCount[lv_playerIterator] = UnitGroupCount(lv_allyUnitGroup, c_unitCountAll);
lv_enemyUnitGroup = UnitGroupSearch(null, lv_playerIterator, UnitGetPosition(libGame_gv_players[lv_playerIterator].lv_heroUnit), libGame_gv_teamfightTrackingRadius, UnitFilter((1 << c_targetFilterHeroic), 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterNeutral), (1 << (c_targetFilterDead - 32))), 0);
libGame_gv_teamfightTrackingNearbyEnemyCount[lv_playerIterator] = UnitGroupCount(lv_enemyUnitGroup, c_unitCountAll);
}
}
Wait(0.5, c_timeGame);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TeamfightTracking_Init () {
libGame_gt_TeamfightTracking = TriggerCreate("libGame_gt_TeamfightTracking_Func");
libGame_gf_GameOpenTimerStarted(libGame_gt_TeamfightTracking);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Silencer Data Collection
//--------------------------------------------------------------------------------------------------
bool libGame_gt_SilencerDataCollection_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_triggeringUnit;
int lv_caster;
fixed lv_duration;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_triggeringUnit = EventUnit();
if (((UnitGetOwner(lv_triggeringUnit) <= 0) || (UnitGetOwner(lv_triggeringUnit) > libCore_gv_bALMaxPlayers) || (UnitTypeTestAttribute(UnitGetType(lv_triggeringUnit), c_unitAttributeHeroic) == false) || (UnitTestState(lv_triggeringUnit, c_unitStateHallucination) == true))) {
return true;
}
lv_caster = UnitBehaviorEffectPlayer(lv_triggeringUnit, EventUnitBehavior(), c_effectPlayerCaster, 0);
if (((lv_caster <= 0) || (lv_caster > libCore_gv_bALMaxPlayers))) {
return true;
}
lv_duration = UnitBehaviorDurationTotal(lv_triggeringUnit, EventUnitBehavior());
libGame_gf_AddtoAwardValue(lv_caster, lv_duration, libGame_ge_SecondaryAwards_Silencer);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_SilencerDataCollection_Init () {
libGame_gt_SilencerDataCollection = TriggerCreate("libGame_gt_SilencerDataCollection_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_SilencerDataCollection, null, c_behaviorCategoryDebuffSilence, c_unitBehaviorChangeActivate);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_SilencerDataCollection, null, c_behaviorCategoryDebuffSilence, c_unitBehaviorChangeRefresh);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Protector Data Collection
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ProtectorDataCollection_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_casterPlayer;
fixed lv_damageAbsorbed;
unit lv_casterUnit;
int lv_casterUnitOwner;
unit lv_shieldedUnit;
int lv_shieldedUnitOwner;
// Automatic Variable Declarations
// Variable Initialization
lv_casterPlayer = UnitBehaviorEffectPlayer(EventUnit(), EventUnitBehavior(), c_effectPlayerCaster, 0);
lv_damageAbsorbed = EventUnitDamageAbsorbed();
lv_casterUnit = UnitBehaviorEffectUnit(lv_shieldedUnit, EventUnitBehavior(), c_effectUnitCaster, 0);
lv_casterUnitOwner = UnitGetOwner(lv_casterUnit);
lv_shieldedUnit = EventUnit();
lv_shieldedUnitOwner = UnitGetOwner(lv_shieldedUnit);
// Conditions
if (testConds) {
if (!(((UnitBehaviorHasCategoryFlag(EventUnitBehavior(), c_behaviorCategoryBuffTempMaxHealth) == true) || (UnitBehaviorHasCategoryFlag(EventUnitBehavior(), c_behaviorCategoryProtected) == true)))) {
return false;
}
if (!((UnitGetOwner(lv_shieldedUnit) <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((lv_casterPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((lv_casterPlayer != lv_shieldedUnitOwner))) {
return false;
}
if (!((UnitFilterMatch(lv_shieldedUnit, lv_shieldedUnitOwner, libCore_gv_filtersHeroic) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gf_AddtoAwardValue(lv_casterPlayer, lv_damageAbsorbed, libGame_ge_SecondaryAwards_Protector);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ProtectorDataCollection_Init () {
libGame_gt_ProtectorDataCollection = TriggerCreate("libGame_gt_ProtectorDataCollection_Func");
TriggerAddEventUnitDamageAbsorbed(libGame_gt_ProtectorDataCollection, null, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Stunner Data Collection
//--------------------------------------------------------------------------------------------------
bool libGame_gt_StunnerDataCollection_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_triggeringUnit;
int lv_caster;
fixed lv_duration;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_triggeringUnit = EventUnit();
if (((UnitGetOwner(lv_triggeringUnit) <= 0) || (UnitGetOwner(lv_triggeringUnit) > libCore_gv_bALMaxPlayers) || (UnitTypeTestAttribute(UnitGetType(lv_triggeringUnit), c_unitAttributeHeroic) == false) || (UnitTestState(lv_triggeringUnit, c_unitStateHallucination) == true))) {
return true;
}
lv_caster = UnitBehaviorEffectPlayer(lv_triggeringUnit, EventUnitBehavior(), c_effectPlayerCaster, 0);
if (((lv_caster <= 0) || (lv_caster > libCore_gv_bALMaxPlayers))) {
return true;
}
lv_duration = UnitBehaviorDurationTotal(lv_triggeringUnit, EventUnitBehavior());
if ((lv_duration < 10.0)) {
libGame_gf_AddtoAwardValue(lv_caster, lv_duration, libGame_ge_SecondaryAwards_Stunner);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_StunnerDataCollection_Init () {
libGame_gt_StunnerDataCollection = TriggerCreate("libGame_gt_StunnerDataCollection_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_StunnerDataCollection, null, c_behaviorCategoryStun, c_unitBehaviorChangeActivate);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_StunnerDataCollection, null, c_behaviorCategoryStun, c_unitBehaviorChangeRefresh);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Trapper Data Collection
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TrapperDataCollection_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_triggeringUnit;
int lv_caster;
fixed lv_duration;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_triggeringUnit = EventUnit();
if (((UnitGetOwner(lv_triggeringUnit) <= 0) || (UnitGetOwner(lv_triggeringUnit) > libCore_gv_bALMaxPlayers) || (UnitTypeTestAttribute(UnitGetType(lv_triggeringUnit), c_unitAttributeHeroic) == false) || (UnitTestState(lv_triggeringUnit, c_unitStateHallucination) == true))) {
return true;
}
lv_caster = UnitBehaviorEffectPlayer(lv_triggeringUnit, EventUnitBehavior(), c_effectPlayerCaster, 0);
if (((lv_caster <= 0) || (lv_caster > libCore_gv_bALMaxPlayers))) {
return true;
}
lv_duration = UnitBehaviorDurationTotal(lv_triggeringUnit, EventUnitBehavior());
libGame_gf_AddtoAwardValue(lv_caster, lv_duration, libGame_ge_SecondaryAwards_Trapper);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TrapperDataCollection_Init () {
libGame_gt_TrapperDataCollection = TriggerCreate("libGame_gt_TrapperDataCollection_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_TrapperDataCollection, null, c_behaviorCategoryDebuffRoot, c_unitBehaviorChangeActivate);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_TrapperDataCollection, null, c_behaviorCategoryDebuffRoot, c_unitBehaviorChangeRefresh);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Clutch Healer Increment
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ClutchHealerIncrement_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_healedUnit;
int lv_healedPlayer;
int lv_healingPlayer;
// Automatic Variable Declarations
// Variable Initialization
lv_healedUnit = EventUnit();
lv_healedPlayer = UnitGetOwner(lv_healedUnit);
lv_healingPlayer = UnitGetOwner(EventUnitHealLaunchUnit());
// Conditions
if (testConds) {
if (!((lv_healedPlayer > 0))) {
return false;
}
if (!((lv_healedPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((lv_healingPlayer > 0))) {
return false;
}
if (!((lv_healingPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((lv_healingPlayer != lv_healedPlayer))) {
return false;
}
if (!((libGame_gv_clutchHealerMonitorOn[lv_healingPlayer][lv_healedPlayer] == false))) {
return false;
}
if (!((((UnitGetPropertyFixed(lv_healedUnit, c_unitPropLife, c_unitPropCurrent) - EventUnitHealAmount()) / UnitGetPropertyFixed(lv_healedUnit, c_unitPropLifeMax, c_unitPropCurrent)) < 0.1))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gv_clutchHealerMonitorOn[lv_healingPlayer][lv_healedPlayer] = true;
Wait(5.0, c_timeGame);
if ((UnitIsAlive(lv_healedUnit) == true) && (UnitBehaviorCount(lv_healedUnit, "Dead") == 0)) {
libGame_gf_AddtoAwardValue(lv_healingPlayer, 1.0, libGame_ge_SecondaryAwards_ClutchHealer);
libGame_gv_clutchHealerMonitorOn[lv_healingPlayer][lv_healedPlayer] = false;
}
else {
libGame_gv_clutchHealerMonitorOn[lv_healingPlayer][lv_healedPlayer] = false;
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ClutchHealerIncrement_Init () {
libGame_gt_ClutchHealerIncrement = TriggerCreate("libGame_gt_ClutchHealerIncrement_Func");
TriggerAddEventUnitHealed(libGame_gt_ClutchHealerIncrement, null, c_unitVitalLife, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hat Trick Award Counter
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HatTrickAwardCounter_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_killingPlayer;
// Automatic Variable Declarations
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_hatTrickKillCount < 3))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_killingPlayer = libGame_gf_HeroKilledKillingPlayer();
libGame_gv_hatTrickKillCount += 1;
if ((libGame_gv_hatTrickTentativeWinner == 0)) {
libGame_gv_hatTrickTentativeWinner = lv_killingPlayer;
}
else if ((libGame_gv_hatTrickTentativeWinner != lv_killingPlayer)) {
TriggerEnable(TriggerGetCurrent(), false);
}
else if ((libGame_gv_hatTrickKillCount == 3)) {
libGame_gf_SetAwardValueandWeight(libGame_gv_hatTrickTentativeWinner, 1.0, libGame_ge_SecondaryAwards_HatTrick);
TriggerEnable(TriggerGetCurrent(), false);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HatTrickAwardCounter_Init () {
libGame_gt_HatTrickAwardCounter = TriggerCreate("libGame_gt_HatTrickAwardCounter_Func");
libGame_gf_HeroKilled(libGame_gt_HatTrickAwardCounter);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Secondary Award List
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializeSecondaryAwardList_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gf_InitializeSecondaryAwardList();
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializeSecondaryAwardList_Init () {
libGame_gt_InitializeSecondaryAwardList = TriggerCreate("libGame_gt_InitializeSecondaryAwardList_Func");
libGame_gf_GameOpenTimerStarted(libGame_gt_InitializeSecondaryAwardList);
}
//--------------------------------------------------------------------------------------------------
// Trigger: OldXP Enable/Disable
//--------------------------------------------------------------------------------------------------
bool libGame_gt_OldXPEnableDisable_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((libGame_gv_oldXPCheat == false)) {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_0C17214B"), true);
libGame_gv_oldXPCheat = true;
}
else {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_798CA662"), true);
libGame_gv_oldXPCheat = false;
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_OldXPEnableDisable_Init () {
libGame_gt_OldXPEnableDisable = TriggerCreate("libGame_gt_OldXPEnableDisable_Func");
TriggerAddEventChatMessage(libGame_gt_OldXPEnableDisable, c_playerAny, "-oldxp", true);
TriggerAddEventChatMessage(libGame_gt_OldXPEnableDisable, c_playerAny, "-oldexp", true);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Experience Globe - Scaling
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ExperienceGlobeScaling_Func (bool testConds, bool runActions) {
// Variable Declarations
fixed lv_xPScaling;
// Automatic Variable Declarations
// Variable Initialization
lv_xPScaling = 2.0;
// Conditions
if (testConds) {
if (!((libGame_gv_oldXPCheat == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
CatalogFieldValueSetFixed(c_gameCatalogEffect, "ExperienceAcquiredMinions", "XP", libCore_gv_cOMPUTER_TeamOrder, (CatalogFieldValueGetAsFixed(c_gameCatalogEffect, "ExperienceAcquiredMinions", "XP", libCore_gv_cOMPUTER_TeamOrder) + lv_xPScaling));
CatalogFieldValueSetFixed(c_gameCatalogEffect, "ExperienceAcquiredMinions", "XP", libCore_gv_cOMPUTER_TeamChaos, (CatalogFieldValueGetAsFixed(c_gameCatalogEffect, "ExperienceAcquiredMinions", "XP", libCore_gv_cOMPUTER_TeamChaos) + lv_xPScaling));
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ExperienceGlobeScaling_Init () {
libGame_gt_ExperienceGlobeScaling = TriggerCreate("libGame_gt_ExperienceGlobeScaling_Func");
libGame_gf_ScalingIncremented(libGame_gt_ExperienceGlobeScaling);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Experience Globe - Spawn
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ExperienceGlobeSpawn_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_unit;
int lv_unitOwner;
int lv_killingPlayer;
// Automatic Variable Declarations
// Variable Initialization
lv_unit = EventUnit();
lv_unitOwner = EventPlayer();
lv_killingPlayer = libNtve_gf_KillingPlayer();
// Conditions
if (testConds) {
if (!(((libGame_gv_oldXPCheat == false) && (UnitHasBehavior2(EventUnit(), "ExperienceGlobeSpawn") == true)))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((libNtve_gf_KillingPlayer() >= 1) && (libNtve_gf_KillingPlayer() <= libCore_gv_bALMaxPlayers) && (libGame_gf_TeamNumberOfPlayer(lv_killingPlayer) != libGame_gf_TeamNumberOfPlayer(EventPlayer()))) {
UnitCreateEffectUnit(lv_unit, "ExperienceGlobeDummyImpactSetLastHit", libGame_gv_players[lv_killingPlayer].lv_heroUnit);
}
else {
if ((UnitGetOwner(lv_unit) == libCore_gv_cOMPUTER_TeamOrder)) {
PlayerCreateEffectPoint(libCore_gv_cOMPUTER_TeamChaos, "HeroGenericGenerateExperienceGlobeCreateUnit", UnitGetPosition(lv_unit));
}
else {
if ((UnitGetOwner(lv_unit) == libCore_gv_cOMPUTER_TeamChaos)) {
PlayerCreateEffectPoint(libCore_gv_cOMPUTER_TeamOrder, "HeroGenericGenerateExperienceGlobeCreateUnit", UnitGetPosition(lv_unit));
}
else {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_C11D8B82"), true);
}
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ExperienceGlobeSpawn_Init () {
libGame_gt_ExperienceGlobeSpawn = TriggerCreate("libGame_gt_ExperienceGlobeSpawn_Func");
TriggerAddEventUnitDied(libGame_gt_ExperienceGlobeSpawn, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Experience Globe - Grant XP
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ExperienceGlobeGrantXP_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
playergroup lv_xPAwardGroup;
int lv_targetPlayer;
fixed lv_xPAmount;
// Automatic Variable Declarations
playergroup auto4D2B2D44_g;
// Variable Initialization
lv_itPlayer = c_playerAny;
lv_xPAwardGroup = PlayerGroupEmpty();
lv_targetPlayer = EventPlayerEffectUsedUnitOwner(c_effectPlayerTarget);
// Conditions
if (testConds) {
if (!((libGame_gv_oldXPCheat == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((EventPlayerEffectUsed() == "ExperienceGlobeDummyImpactSetReducedXP")) {
lv_xPAmount = (CatalogFieldValueGetAsFixed(c_gameCatalogEffect, "ExperienceAcquiredMinions", "XP", libCore_gv_cOMPUTER_TeamOrder) * libSprt_gv_gPU2021ExtendedDurationXPGlobesXPMod);
}
else {
lv_xPAmount = CatalogFieldValueGetAsFixed(c_gameCatalogEffect, "ExperienceAcquiredMinions", "XP", libCore_gv_cOMPUTER_TeamOrder);
}
lv_xPAwardGroup = PlayerGroupCopy(libGame_gf_AlliedPlayerGroupOfPlayer(lv_targetPlayer));
auto4D2B2D44_g = lv_xPAwardGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto4D2B2D44_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
libGame_gf_GrantXPToPlayer(lv_xPAmount, lv_itPlayer, libGame_ge_XPSources_Minion);
}
libGame_gf_ScoreValuesRecordXPContributionForPlayer(lv_targetPlayer, lv_xPAmount, true);
if ((EventPlayerEffectUsed() == "ExperienceGlobeDummyImpactSetLastHit")) {
libUIUI_gf_UIFloatingCombatTextH16MidXP(lv_targetPlayer, EventPlayerEffectUsedUnit(c_effectUnitSource), libCore_ge_FloatingTextType_XPSmall, FixedToInt(lv_xPAmount));
}
else {
libUIUI_gf_UIFloatingCombatTextH16MidXP(lv_targetPlayer, EventPlayerEffectUsedUnit(c_effectUnitSource), libCore_ge_FloatingTextType_XPSmall, FixedToInt(lv_xPAmount));
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ExperienceGlobeGrantXP_Init () {
libGame_gt_ExperienceGlobeGrantXP = TriggerCreate("libGame_gt_ExperienceGlobeGrantXP_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_ExperienceGlobeGrantXP, c_playerAny, "ExperienceGlobeDummyImpactSetMinion");
TriggerAddEventPlayerEffectUsed(libGame_gt_ExperienceGlobeGrantXP, c_playerAny, "ExperienceGlobeDummyImpactSetLastHit");
TriggerAddEventPlayerEffectUsed(libGame_gt_ExperienceGlobeGrantXP, c_playerAny, "ExperienceGlobeDummyImpactSetReducedXP");
}
//--------------------------------------------------------------------------------------------------
// Trigger: OldXP Enabled - Minion Veterency
//--------------------------------------------------------------------------------------------------
bool libGame_gt_OldXPEnabledMinionVeterency_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!(((libGame_gv_oldXPCheat == true) && (UnitTypeTestAttribute(UnitGetType(EventUnitCreatedUnit()), c_unitAttributeMinion) == true)))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((UnitHasBehavior2(EventUnitCreatedUnit(), "FootmanMinionScaling") == true)) {
UnitBehaviorAdd(EventUnitCreatedUnit(), "FootmanMinionXPScaling", EventUnitCreatedUnit(), 1);
UnitXPAddXP(EventUnitCreatedUnit(), "FootmanMinionXPScaling", libGame_gv_scalingTicks);
}
else {
if ((UnitHasBehavior2(EventUnitCreatedUnit(), "WizardMinionScaling") == true)) {
UnitBehaviorAdd(EventUnitCreatedUnit(), "WizardMinionXPScaling", EventUnitCreatedUnit(), 1);
UnitXPAddXP(EventUnitCreatedUnit(), "WizardMinionXPScaling", libGame_gv_scalingTicks);
}
else {
if ((UnitHasBehavior2(EventUnitCreatedUnit(), "RangedMinionScaling") == true)) {
UnitBehaviorAdd(EventUnitCreatedUnit(), "RangedMinionXPScaling", EventUnitCreatedUnit(), 1);
UnitXPAddXP(EventUnitCreatedUnit(), "RangedMinionXPScaling", libGame_gv_scalingTicks);
}
else {
if ((UnitHasBehavior2(EventUnitCreatedUnit(), "CatapultMinionScaling") == true)) {
UnitBehaviorAdd(EventUnitCreatedUnit(), "CatapultMinionXPScaling", EventUnitCreatedUnit(), 1);
UnitXPAddXP(EventUnitCreatedUnit(), "CatapultMinionXPScaling", libGame_gv_scalingTicks);
}
}
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_OldXPEnabledMinionVeterency_Init () {
libGame_gt_OldXPEnabledMinionVeterency = TriggerCreate("libGame_gt_OldXPEnabledMinionVeterency_Func");
TriggerAddEventUnitCreated(libGame_gt_OldXPEnabledMinionVeterency, null, null, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Start Game
//--------------------------------------------------------------------------------------------------
bool libGame_gt_StartGame_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_treasureGoblinSpawnCheck;
int lv_lunarNewYearSpawnCheck;
int lv_itTeam;
int lv_itPlayer;
int lv_itManualSpawnHero;
point lv_oldCorePosition;
unit lv_oldCoreUnit;
int lv_teamOfPlayer;
int lv_heroIndexOfPlayer;
// Automatic Variable Declarations
const int auto39C34241_ae = libCore_gv_bALMaxPlayers;
const int auto39C34241_ai = 1;
const int auto48C055FE_ae = libCore_gv_dataHeroesManualSpawnHeroesCount;
const int auto48C055FE_ai = 1;
const int autoD9051020_ae = libCore_gv_bALMaxTeams;
const int autoD9051020_ai = 1;
int auto1FD419F5_val;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
TriggerAddEventUnitRegion(libGame_gt_ConfineOtherUnitsToBaseUntilCountdownEnds, null, libCore_gv_mAPOrderBaseRegion, false);
TriggerAddEventUnitRegion(libGame_gt_ConfineOtherUnitsToBaseUntilCountdownEnds, null, libCore_gv_mAPChaosBaseRegion, false);
TimerStart(libGame_gv_totalTime, c_timerDurationInfinite, false, c_timeGame);
libUIUI_gf_UIUpdateTimeLabels();
lv_itPlayer = 1;
for ( ; ( (auto39C34241_ai >= 0 && lv_itPlayer <= auto39C34241_ae) || (auto39C34241_ai < 0 && lv_itPlayer >= auto39C34241_ae) ) ; lv_itPlayer += auto39C34241_ai ) {
lv_teamOfPlayer = libGame_gf_TeamNumberOfPlayer(lv_itPlayer);
lv_itManualSpawnHero = 1;
for ( ; ( (auto48C055FE_ai >= 0 && lv_itManualSpawnHero <= auto48C055FE_ae) || (auto48C055FE_ai < 0 && lv_itManualSpawnHero >= auto48C055FE_ae) ) ; lv_itManualSpawnHero += auto48C055FE_ai ) {
lv_heroIndexOfPlayer = libCore_gf_GetIndexFromHero(PlayerHero(lv_itPlayer));
if ((libCore_gv_dataHeroesManualSpawnHeroIDs[lv_itManualSpawnHero].lv_heroIndex == lv_heroIndexOfPlayer) && (libCore_gv_dataHeroesManualSpawnHeroIDs[lv_itManualSpawnHero].lv_core == true)) {
libGame_gv_coreHeroPlayer = lv_itPlayer;
TriggerExecute(libCore_gv_dataHeroesManualSpawnHeroIDs[lv_itManualSpawnHero].lv_coreSpawnTrigger, true, true);
}
}
}
lv_itTeam = 1;
for ( ; ( (autoD9051020_ai >= 0 && lv_itTeam <= autoD9051020_ae) || (autoD9051020_ai < 0 && lv_itTeam >= autoD9051020_ae) ) ; lv_itTeam += autoD9051020_ai ) {
libUIUI_gf_UIPartyFrameSetUpCoreHealthBarforTeam(lv_itTeam);
}
libStEx_gf_AddAllInGameTips(true);
while (!((libGame_gv_heroSpawnReady == true))) {
Wait(0.0625, c_timeGame);
}
if ((libCore_gv_sYSGameMode == libCore_ge_GameModes_Tutorial1)) {
Wait(0.0, c_timeGame);
}
else {
SoundPlayForPlayer(SoundLink("Gen_HeroRespawn_GameStart", -1), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
Wait(libGame_gv_heroSpawnDelay_C, c_timeGame);
}
libGame_gf_SpawnHeroesForBothTeams();
while (!((libGame_gv_gateTimerReady == true))) {
Wait(0.0625, c_timeGame);
}
if ((PlayerGroupCount(libStEx_gf_MapMechanicIntroPlayers()) > 0)) {
Wait(2.0, c_timeGame);
}
TriggerExecute(libGame_gt_StartGameShowTowerRadius, true, false);
auto1FD419F5_val = libCore_gv_sYSGameMode;
if (auto1FD419F5_val == libCore_ge_GameModes_AttackDefend) {
TimerStart(libGame_gv_openTheGatesTimer, libCore_gv_bALOpenTheGatesDelay_Brawl, false, c_timeGame);
}
else if (auto1FD419F5_val == libCore_ge_GameModes_ModeC) {
TimerStart(libGame_gv_openTheGatesTimer, 45.0, false, c_timeGame);
}
else {
TimerStart(libGame_gv_openTheGatesTimer, libCore_gv_bALOpenTheGatesDelay, false, c_timeGame);
}
libGame_gf_SendEventGameOpenTimerStarted();
TriggerExecute(libGame_gt_AnnounceCountdown, true, false);
TriggerExecute(libGame_gt_RunAnimations, true, false);
DialogControlSetEnabled(libUIUI_gv_uIDebugPanel.lv_startGameButton, PlayerGroupAll(), true);
if ((libSprt_gv_performanceTestPerformanceTestRunning == true)) {
TriggerExecute(libSprt_gt_PerformanceTestSetHeroChoices, true, true);
}
TriggerExecute(libStEx_gt_TrainingModeInit, true, false);
TriggerExecute(libSprt_gt_DEBUGStatTrackingStartTrackingforAllPlayers, true, false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_StartGame_Init () {
libGame_gt_StartGame = TriggerCreate("libGame_gt_StartGame_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Picking Heroes (Normal Mode)
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PickingHeroesNormalMode_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
const int auto475683D8_ae = libCore_gv_bALMaxPlayers;
const int auto475683D8_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
if (((libCore_gv_sYSGameMode == libCore_ge_GameModes_ArenaMode))) {
return true;
}
libGame_gf_HeroSelectionSetBNetHeroAndSkinSelectionsForAllPlayers();
if ((libGame_gv_heroSelectionOverrideCallback != null)) {
TriggerExecute(libGame_gv_heroSelectionOverrideCallback, true, true);
}
lv_itPlayer = 1;
for ( ; ( (auto475683D8_ai >= 0 && lv_itPlayer <= auto475683D8_ae) || (auto475683D8_ai < 0 && lv_itPlayer >= auto475683D8_ae) ) ; lv_itPlayer += auto475683D8_ai ) {
if ((PlayerStatus(lv_itPlayer) != c_playerStatusUnused) && (PlayerType(lv_itPlayer) != c_playerTypeHostile)) {
if ((libGame_gv_players[lv_itPlayer].lv_heroIndex == 0)) {
if ((libSprt_gv_dEBUGHeroMimic == true)) {
libGame_gv_players[lv_itPlayer].lv_heroIndex = libGame_gv_players[1].lv_heroIndex;
}
else {
libGame_gv_players[lv_itPlayer].lv_heroIndex = libGame_gf_HeroSelectionRandomlyPickMetaUnusedHero(lv_itPlayer);
if ((libGame_gv_players[lv_itPlayer].lv_heroIndex == 0)) {
libGame_gv_players[lv_itPlayer].lv_heroIndex = libGame_gf_HeroSelectionRandomlyPickUnusedHeroWithRole(lv_itPlayer, true, true, true, true, true, false);
if ((libGame_gv_players[lv_itPlayer].lv_heroIndex == 0)) {
libGame_gv_players[lv_itPlayer].lv_heroIndex = libGame_gf_HeroSelectionRandomlyPickAnyUnusedHero(lv_itPlayer, false, false);
if ((libGame_gv_players[lv_itPlayer].lv_heroIndex == 0)) {
libGame_gv_players[lv_itPlayer].lv_heroIndex = libGame_gf_HeroSelectionRandomlyPickAnyUnusedHero(lv_itPlayer, true, false);
if ((libGame_gv_players[lv_itPlayer].lv_heroIndex == 0)) {
TextExpressionSetToken("Param/Expression/lib_Game_A2F0F832", "A", IntToText(lv_itPlayer));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_A2F0F832"), true);
libGame_gv_players[lv_itPlayer].lv_heroIndex = libGame_gf_HeroSelectionRandomlyPickAnyUnusedHero(lv_itPlayer, true, true);
}
}
}
}
}
libCore_gf_DataLoadHeroDataIntoIndex(libCore_gf_GetHeroFromIndex(libGame_gv_players[lv_itPlayer].lv_heroIndex), lv_itPlayer);
if ((PlayerType(lv_itPlayer) != c_playerTypeComputer)) {
libGame_gf_HeroSelectionRandomlyPickSkin(lv_itPlayer);
libGame_gf_HeroSelectionRandomlyPickMount(lv_itPlayer);
}
}
}
}
libGame_gv_heroPickDone = true;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PickingHeroesNormalMode_Init () {
libGame_gt_PickingHeroesNormalMode = TriggerCreate("libGame_gt_PickingHeroesNormalMode_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Start Game Show Tower Radius
//--------------------------------------------------------------------------------------------------
bool libGame_gt_StartGameShowTowerRadius_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
unitgroup auto0E486453_g;
int auto0E486453_u;
unit auto0E486453_var;
const int auto80E84A57_ae = libCore_gv_bALMaxTeams;
int auto80E84A57_var;
// Conditions
if (testConds) {
if (!(((libStEx_gf_InTrainingMode() == true) || (libStEx_gf_InPracticeMode() == true)))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
CatalogFieldValueSet(c_gameCatalogEffect, "TownHallRangeIndicatorApplyBehavior", "Chance", libCore_gv_cOMPUTER_TeamOrder, "0");
CatalogFieldValueSet(c_gameCatalogEffect, "TownHallRangeIndicatorApplyBehavior", "Chance", libCore_gv_cOMPUTER_TeamChaos, "0");
auto0E486453_g = UnitGroup(null, c_playerAny, null, UnitFilter((1 << c_targetFilterTower), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto0E486453_u = UnitGroupCount(auto0E486453_g, c_unitCountAll);
for (;; auto0E486453_u -= 1) {
auto0E486453_var = UnitGroupUnitFromEnd(auto0E486453_g, auto0E486453_u);
if (auto0E486453_var == null) { break; }
if (((libGame_gf_TownGetTownStructurePresetFromUnit(auto0E486453_var) == libGame_ge_TownStructureTypes_TownHall) || (libGame_gf_TownGetTownStructurePresetFromUnit(auto0E486453_var) == libGame_ge_TownStructureTypes_CannonTower))) {
UnitBehaviorAddPlayer(auto0E486453_var, "TutorialTowerRangeBehavior", UnitGetOwner(auto0E486453_var), 1);
}
}
auto80E84A57_var = 1;
for ( ; auto80E84A57_var <= auto80E84A57_ae; auto80E84A57_var += 1 ) {
UnitBehaviorAddPlayer(libGame_gv_teams[auto80E84A57_var].lv_core, "TutorialKingsCoreRangeBehavior", UnitGetOwner(libGame_gv_teams[auto80E84A57_var].lv_core), 1);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_StartGameShowTowerRadius_Init () {
libGame_gt_StartGameShowTowerRadius = TriggerCreate("libGame_gt_StartGameShowTowerRadius_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Announce Countdown
//--------------------------------------------------------------------------------------------------
bool libGame_gt_AnnounceCountdown_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
if ((libGame_gv_announceCountdownCallback != null)) {
TriggerExecute(libGame_gv_announceCountdownCallback, true, false);
return true;
}
if ((libCore_gv_sYSGameMode == libCore_ge_GameModes_Tutorial1)) {
while (!((libNtve_gf_PlayerInCinematicMode(1) == false) && (TimerIsPaused(libGame_gv_openTheGatesTimer) == false))) {
Wait(0.5, c_timeGame);
}
TimerStart(libGame_gv_openTheGatesTimer, 25.0, false, c_timeGame);
}
else {
libNtve_gf_WaitForTimer(libGame_gv_openTheGatesTimer, 34.0, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_allHeroPlayersPlusObserver, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_GetReadyForBattle, "", null, null, null, null, null, libGame_gv_announcement_NoDelay_C, false);
}
libNtve_gf_WaitForTimer(libGame_gv_openTheGatesTimer, 12.125, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_allHeroPlayersPlusObserver, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_BattleStartingIn, "", null, null, null, null, null, libGame_gv_announcement_NoDelay_C, false);
libNtve_gf_WaitForTimer(libGame_gv_openTheGatesTimer, 10.125, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_allHeroPlayersPlusObserver, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_Countdown10, "", null, null, null, null, null, libGame_gv_announcement_NoDelay_C, false);
libNtve_gf_WaitForTimer(libGame_gv_openTheGatesTimer, 5.125, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_allHeroPlayersPlusObserver, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_Countdown5, "", null, null, null, null, null, libGame_gv_announcement_NoDelay_C, false);
Wait(1.0, c_timeGame);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_allHeroPlayersPlusObserver, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_Countdown4, "", null, null, null, null, null, libGame_gv_announcement_NoDelay_C, false);
Wait(1.0, c_timeGame);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_allHeroPlayersPlusObserver, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_Countdown3, "", null, null, null, null, null, libGame_gv_announcement_NoDelay_C, false);
Wait(1.0, c_timeGame);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_allHeroPlayersPlusObserver, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_Countdown2, "", null, null, null, null, null, libGame_gv_announcement_NoDelay_C, false);
Wait(1.0, c_timeGame);
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_allHeroPlayersPlusObserver, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_Countdown1, "", null, null, null, null, null, libGame_gv_announcement_NoDelay_C, false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_AnnounceCountdown_Init () {
libGame_gt_AnnounceCountdown = TriggerCreate("libGame_gt_AnnounceCountdown_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Run Animations
//--------------------------------------------------------------------------------------------------
bool libGame_gt_RunAnimations_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_town;
int lv_structure;
// Automatic Variable Declarations
int autoD06C5B74_ae;
const int autoD06C5B74_ai = 1;
int auto30240BB2_ae;
const int auto30240BB2_ai = 1;
int auto48A1495C_ae;
const int auto48A1495C_ai = 1;
int auto984DF843_ae;
const int auto984DF843_ai = 1;
int auto24B93EDA_ae;
const int auto24B93EDA_ai = 1;
int auto50A12BA3_ae;
const int auto50A12BA3_ai = 1;
int autoF87F17A3_ae;
const int autoF87F17A3_ai = 1;
int autoF1D282C2_ae;
const int autoF1D282C2_ai = 1;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libCore_gv_sYSGameMode != libCore_ge_GameModes_Debug))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((libGame_gv_startingAnimationsCallback != null)) {
TriggerExecute(libGame_gv_startingAnimationsCallback, true, false);
return true;
}
if ((libCore_gv_sYSGameMode == libCore_ge_GameModes_Tutorial1)) {
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_core), "Signal CoreBuild");
Wait(7.0, c_timeGame);
}
else {
Wait(4.0, c_timeGame);
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_core), "Signal CoreBuild");
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_core), "Signal CoreBuild");
Wait(12.0, c_timeGame);
}
autoD06C5B74_ae = libGame_gv_townTownCount;
lv_town = 1;
for ( ; ( (autoD06C5B74_ai >= 0 && lv_town <= autoD06C5B74_ae) || (autoD06C5B74_ai < 0 && lv_town >= autoD06C5B74_ae) ) ; lv_town += autoD06C5B74_ai ) {
auto30240BB2_ae = libGame_gv_townTownData[lv_town].lv_structureCount;
lv_structure = 1;
for ( ; ( (auto30240BB2_ai >= 0 && lv_structure <= auto30240BB2_ae) || (auto30240BB2_ai < 0 && lv_structure >= auto30240BB2_ae) ) ; lv_structure += auto30240BB2_ai ) {
if ((UnitGetType(libGame_gv_townTownData[lv_town].lv_structureUnits[lv_structure]) == "TownTownHallL3")) {
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_townTownData[lv_town].lv_structureUnits[lv_structure]), "Signal PlayBuild");
}
}
}
Wait(2.0, c_timeGame);
auto48A1495C_ae = libGame_gv_townTownCount;
lv_town = 1;
for ( ; ( (auto48A1495C_ai >= 0 && lv_town <= auto48A1495C_ae) || (auto48A1495C_ai < 0 && lv_town >= auto48A1495C_ae) ) ; lv_town += auto48A1495C_ai ) {
auto984DF843_ae = libGame_gv_townTownData[lv_town].lv_structureCount;
lv_structure = 1;
for ( ; ( (auto984DF843_ai >= 0 && lv_structure <= auto984DF843_ae) || (auto984DF843_ai < 0 && lv_structure >= auto984DF843_ae) ) ; lv_structure += auto984DF843_ai ) {
if ((libGame_gv_townTownData[lv_town].lv_structureTypes[lv_structure] == libGame_ge_TownStructureTypes_CannonTower)) {
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_townTownData[lv_town].lv_structureUnits[lv_structure]), "Signal PlayBuild");
}
}
}
libNtve_gf_WaitForTimer(libGame_gv_openTheGatesTimer, 13.0, false);
auto24B93EDA_ae = libGame_gv_townTownCount;
lv_town = 1;
for ( ; ( (auto24B93EDA_ai >= 0 && lv_town <= auto24B93EDA_ae) || (auto24B93EDA_ai < 0 && lv_town >= auto24B93EDA_ae) ) ; lv_town += auto24B93EDA_ai ) {
auto50A12BA3_ae = libGame_gv_townTownData[lv_town].lv_structureCount;
lv_structure = 1;
for ( ; ( (auto50A12BA3_ai >= 0 && lv_structure <= auto50A12BA3_ae) || (auto50A12BA3_ai < 0 && lv_structure >= auto50A12BA3_ae) ) ; lv_structure += auto50A12BA3_ai ) {
if ((libGame_gv_townTownData[lv_town].lv_structureTypes[lv_structure] == libGame_ge_TownStructureTypes_Gate)) {
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_townTownData[lv_town].lv_structureUnits[lv_structure]), "Signal PrePlayBuild");
}
}
}
libNtve_gf_WaitForTimer(libGame_gv_openTheGatesTimer, 6.0, false);
autoF87F17A3_ae = libGame_gv_townTownCount;
lv_town = 1;
for ( ; ( (autoF87F17A3_ai >= 0 && lv_town <= autoF87F17A3_ae) || (autoF87F17A3_ai < 0 && lv_town >= autoF87F17A3_ae) ) ; lv_town += autoF87F17A3_ai ) {
autoF1D282C2_ae = libGame_gv_townTownData[lv_town].lv_structureCount;
lv_structure = 1;
for ( ; ( (autoF1D282C2_ai >= 0 && lv_structure <= autoF1D282C2_ae) || (autoF1D282C2_ai < 0 && lv_structure >= autoF1D282C2_ae) ) ; lv_structure += autoF1D282C2_ai ) {
if ((libGame_gv_townTownData[lv_town].lv_structureTypes[lv_structure] == libGame_ge_TownStructureTypes_Gate)) {
ActorSend(libNtve_gf_MainActorofUnit(libGame_gv_townTownData[lv_town].lv_structureUnits[lv_structure]), "Signal PlayBuild");
}
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_RunAnimations_Init () {
libGame_gt_RunAnimations = TriggerCreate("libGame_gt_RunAnimations_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Open The Gates (Open The Gates Timer Expires)
//--------------------------------------------------------------------------------------------------
bool libGame_gt_OpenTheGatesOpenTheGatesTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
unit lv_itBlocker;
bool lv_orderVOPlayed;
bool lv_chaosVOPlayed;
playergroup lv_orderVOGroup;
playergroup lv_chaosVOGroup;
int lv_camp;
// Automatic Variable Declarations
int auto2AAB1A33_ae;
const int auto2AAB1A33_ai = 1;
const int autoDDF95E47_ae = libCore_gv_bALMaxPlayers;
const int autoDDF95E47_ai = 1;
unitgroup auto157DB87C_g;
int auto157DB87C_u;
unitgroup auto4CAD3EA8_g;
int auto4CAD3EA8_u;
// Variable Initialization
lv_orderVOGroup = PlayerGroupEmpty();
lv_chaosVOGroup = PlayerGroupEmpty();
// Conditions
if (testConds) {
if (!((libGame_gv_gameStarted == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gv_gameStarted = true;
TriggerEnable(libGame_gt_ConfineHeroesToBaseUntilCountdownEnds, false);
TriggerEnable(libGame_gt_ConfineOtherUnitsToBaseUntilCountdownEnds, false);
TriggerEnable(libGame_gt_ConfineCreatedUnitsToBaseUntilCountdownEnds, false);
TriggerEnable(libGame_gt_RemoveUnitsCreatedOutsideOfBaseUntilCountdownEnds, false);
DialogControlSetEnabled(libUIUI_gv_uIDebugPanel.lv_startGameButton, PlayerGroupAll(), false);
DialogControlSetEnabled(libUIUI_gv_uIDebugPanel.lv_spawnCreepCampsButton, PlayerGroupAll(), true);
AINotifyGameStarted();
StatEventCreate("GatesOpen");
StatEventSend(StatEventLastCreated());
TimerStart(libGame_gv_gameTimer, c_timerDurationInfinite, false, c_timeGame);
if ((TimerGetElapsed(libGame_gv_matchGameplayTimer) > 0.0)) {
TimerPause(libGame_gv_matchGameplayTimer, false);
}
else {
TimerStart(libGame_gv_matchGameplayTimer, c_timerDurationInfinite, false, c_timeGame);
}
TimerStart(libGame_gv_minionSpawnStartTimer, libCore_gv_bALSpawnMinionsDelay, false, c_timeGame);
TriggerEnable(libMapM_gt_JungleCreepCampRespawnTimerExpires, true);
TriggerExecute(libMapM_gt_StartJungleCampTimers, true, false);
TriggerEnable(libMapM_gt_JungleRespawnTimerTextTagCountdown, true);
auto2AAB1A33_ae = libMapM_gv_jungleNumberOfCreepCamps;
lv_camp = 1;
for ( ; ( (auto2AAB1A33_ai >= 0 && lv_camp <= auto2AAB1A33_ae) || (auto2AAB1A33_ai < 0 && lv_camp >= auto2AAB1A33_ae) ) ; lv_camp += auto2AAB1A33_ai ) {
libMapM_gf_JungleUpdateTextTagForCamp(lv_camp);
}
TimerStart(libGame_gv_jungleWatchTowerStartTimer, libCore_gv_bALJungleWatchTowerActivationDelay, false, c_timeGame);
TimerStart(libGame_gv_scalingTimer, libGame_gv_bALScalingTimerDuration, false, c_timeGame);
TimerStart(libGame_gv_xPTrickleStartTimer, libCore_gv_bALXPTrickleStartDelay, false, c_timeGame);
lv_itPlayer = 1;
for ( ; ( (autoDDF95E47_ai >= 0 && lv_itPlayer <= autoDDF95E47_ae) || (autoDDF95E47_ai < 0 && lv_itPlayer >= autoDDF95E47_ae) ) ; lv_itPlayer += autoDDF95E47_ai ) {
libNtve_gf_SetUpgradeLevelForPlayer(lv_itPlayer, "GatesAreOpen", 1);
}
if ((libGame_gv_afk_UseAFKSystem == true)) {
if ((libGame_gv_afk_UseBrawlAFKSystem == false)) {
libGame_gf_AfkStartAfkWarningSystem(false);
}
else {
libGame_gf_AFKBrawlStartAfkWarningSystem(true);
}
}
SoundPlayForPlayer(SoundLink("GameStart", -1), c_maxPlayers, PlayerGroupAll(), 40.0, 0.0);
if ((libCore_gv_sYSGameMode != libCore_ge_GameModes_ArenaMode)) {
auto157DB87C_g = UnitGroup("StormGameStartPathingBlocker", c_playerAny, null, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto157DB87C_u = UnitGroupCount(auto157DB87C_g, c_unitCountAll);
for (;; auto157DB87C_u -= 1) {
lv_itBlocker = UnitGroupUnitFromEnd(auto157DB87C_g, auto157DB87C_u);
if (lv_itBlocker == null) { break; }
UnitRemove(lv_itBlocker);
}
auto4CAD3EA8_g = UnitGroup("StormGameStartPathingBlockerDiagonal", c_playerAny, null, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto4CAD3EA8_u = UnitGroupCount(auto4CAD3EA8_g, c_unitCountAll);
for (;; auto4CAD3EA8_u -= 1) {
lv_itBlocker = UnitGroupUnitFromEnd(auto4CAD3EA8_g, auto4CAD3EA8_u);
if (lv_itBlocker == null) { break; }
UnitRemove(lv_itBlocker);
}
}
if ((libCore_gv_sYSDataMiningListenForData == true)) {
libSprt_gf_DataMiningTurnDataMiningTriggersOnOff(true);
}
TimerStart(libGame_gv_towerMainCoreAlertTimer, libGame_gv_towerCoreUnderAttackScanPeriod, false, c_timeGame);
Wait(1.0, c_timeGame);
libNtve_gf_AddPlayerGroupToPlayerGroup(libGame_gf_PlayersOnTeamHeroes(libGame_gv_teamOrderIndex_C, false), lv_orderVOGroup);
PlayerGroupAdd(lv_orderVOGroup, libCore_gv_oBSERVER_ObserverUIPlayer);
libNtve_gf_AddPlayerGroupToPlayerGroup(libGame_gf_PlayersOnTeamHeroes(libGame_gv_teamChaosIndex_C, false), lv_chaosVOGroup);
libGame_gf_AnnouncementAddItemForPlayerGroup(lv_orderVOGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_LetTheBattleBegin, "BattleBegin", StringExternal("Param/Value/lib_Game_CD24FF66"), null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
libGame_gf_AnnouncementAddItemForPlayerGroup(lv_chaosVOGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_LetTheBattleBegin, "BattleBegin", StringExternal("Param/Value/lib_Game_79C9784F"), null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_OpenTheGatesOpenTheGatesTimerExpires_Init () {
libGame_gt_OpenTheGatesOpenTheGatesTimerExpires = TriggerCreate("libGame_gt_OpenTheGatesOpenTheGatesTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_OpenTheGatesOpenTheGatesTimerExpires, libGame_gv_openTheGatesTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Spawn Minions (Minion Spawn Start Timer Expires)
//--------------------------------------------------------------------------------------------------
bool libGame_gt_SpawnMinionsMinionSpawnStartTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
const int auto2E1904D7_ae = libCore_gv_bALMaxPlayers;
const int auto2E1904D7_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_itPlayer = 1;
for ( ; ( (auto2E1904D7_ai >= 0 && lv_itPlayer <= auto2E1904D7_ae) || (auto2E1904D7_ai < 0 && lv_itPlayer >= auto2E1904D7_ae) ) ; lv_itPlayer += auto2E1904D7_ai ) {
libNtve_gf_SetUpgradeLevelForPlayer(lv_itPlayer, "MinionsAreSpawning", 1);
}
if ((libCore_gv_sYSMinionAI == true)) {
libGame_gf_MinionStartStopMinionSystem(true);
if ((libCore_gv_sYSMinionSpawningOn == true)) {
libGame_gf_MinionStartStopMinionSpawnCycle(true);
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_SpawnMinionsMinionSpawnStartTimerExpires_Init () {
libGame_gt_SpawnMinionsMinionSpawnStartTimerExpires = TriggerCreate("libGame_gt_SpawnMinionsMinionSpawnStartTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_SpawnMinionsMinionSpawnStartTimerExpires, libGame_gv_minionSpawnStartTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Turn On XP Trickle (XP Trickle Start Timer Expires)
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TurnOnXPTrickleXPTrickleStartTimerExpires_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
TriggerEnable(libGame_gt_XPTrickle, true);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TurnOnXPTrickleXPTrickleStartTimerExpires_Init () {
libGame_gt_TurnOnXPTrickleXPTrickleStartTimerExpires = TriggerCreate("libGame_gt_TurnOnXPTrickleXPTrickleStartTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_TurnOnXPTrickleXPTrickleStartTimerExpires, libGame_gv_xPTrickleStartTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Confine Heroes To Base Until Countdown Ends
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ConfineHeroesToBaseUntilCountdownEnds_Func (bool testConds, bool runActions) {
// Variable Declarations
const fixed lv_bufferDistance = 1.0;
int lv_player;
unit lv_heroUnit;
region lv_region;
point lv_targetPoint;
point lv_targetPoint2;
point lv_targetPoint3;
unit lv_itUnit;
// Automatic Variable Declarations
const int auto18BC8C63_ae = libCore_gv_bALMaxPlayers;
const int auto18BC8C63_ai = 1;
string auto679E15DD_val;
const int auto20A44F8E_n = 80;
int auto20A44F8E_i;
unitgroup autoDD918ADB_g;
int autoDD918ADB_u;
const int auto6A2E3FEE_n = 80;
int auto6A2E3FEE_i;
unitgroup autoCCD8DDFA_g;
int autoCCD8DDFA_u;
const int autoDCF290EF_n = 80;
int autoDCF290EF_i;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_player = 1;
for ( ; ( (auto18BC8C63_ai >= 0 && lv_player <= auto18BC8C63_ae) || (auto18BC8C63_ai < 0 && lv_player >= auto18BC8C63_ae) ) ; lv_player += auto18BC8C63_ai ) {
lv_heroUnit = libGame_gv_players[lv_player].lv_heroUnit;
if ((UnitIsAlive(lv_heroUnit) == true)) {
if ((libGame_gv_players[lv_player].lv_faction == libGame_ge_Faction_Order)) {
lv_region = libCore_gv_mAPOrderBaseRegion;
}
else {
lv_region = libCore_gv_mAPChaosBaseRegion;
}
if ((lv_region == null)) {
return true;
}
if ((libNtve_gf_UnitIsInsideTransport(lv_heroUnit) == true)) {
lv_heroUnit = UnitTransport(libGame_gv_players[lv_player].lv_heroUnit);
}
auto679E15DD_val = UnitGetType(lv_heroUnit);
if (auto679E15DD_val == "HeroLostVikingsController") {
autoDD918ADB_g = libGame_gv_players[lv_player].lv_heroUnitGroup;
autoDD918ADB_u = UnitGroupCount(autoDD918ADB_g, c_unitCountAll);
for (;; autoDD918ADB_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(autoDD918ADB_g, autoDD918ADB_u);
if (lv_itUnit == null) { break; }
lv_heroUnit = lv_itUnit;
if ((libNtve_gf_UnitInRegion(lv_heroUnit, lv_region) == false)) {
lv_targetPoint = UnitGetPosition(lv_heroUnit);
lv_targetPoint2 = libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint);
lv_targetPoint3 = libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint2, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint);
for (auto6A2E3FEE_i = 1; auto6A2E3FEE_i <= auto6A2E3FEE_n; auto6A2E3FEE_i += 1) {
if (((PointPathingPassable(lv_targetPoint) == false) || (PointPathingPassable(lv_targetPoint2) == false) || (PointPathingPassable(lv_targetPoint3) == false) || (RegionContainsPoint(lv_region, lv_targetPoint) == false))) {
lv_targetPoint = lv_targetPoint2;
lv_targetPoint2 = lv_targetPoint3;
lv_targetPoint3 = libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint2, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint);
}
else {
break;
}
}
if (((PointPathingPassable(lv_targetPoint) == false) || (PointPathingPassable(lv_targetPoint2) == false) || (PointPathingPassable(lv_targetPoint3) == false) || (RegionContainsPoint(lv_region, lv_targetPoint) == false))) {
lv_targetPoint2 = libGame_gv_players[lv_player].lv_spawnPoint;
}
UnitSetPosition(lv_heroUnit, lv_targetPoint2, true);
UnitIssueOrder(lv_heroUnit, Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
}
}
}
else if (auto679E15DD_val == "HeroRexxar") {
autoCCD8DDFA_g = libGame_gv_players[lv_player].lv_heroUnitGroup;
autoCCD8DDFA_u = UnitGroupCount(autoCCD8DDFA_g, c_unitCountAll);
for (;; autoCCD8DDFA_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(autoCCD8DDFA_g, autoCCD8DDFA_u);
if (lv_itUnit == null) { break; }
lv_heroUnit = lv_itUnit;
if ((libNtve_gf_UnitInRegion(lv_heroUnit, lv_region) == false)) {
lv_targetPoint = UnitGetPosition(lv_heroUnit);
lv_targetPoint2 = libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint);
lv_targetPoint3 = libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint2, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint);
for (autoDCF290EF_i = 1; autoDCF290EF_i <= autoDCF290EF_n; autoDCF290EF_i += 1) {
if (((PointPathingPassable(lv_targetPoint) == false) || (PointPathingPassable(lv_targetPoint2) == false) || (PointPathingPassable(lv_targetPoint3) == false) || (RegionContainsPoint(lv_region, lv_targetPoint) == false))) {
lv_targetPoint = lv_targetPoint2;
lv_targetPoint2 = lv_targetPoint3;
lv_targetPoint3 = libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint2, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint);
}
else {
break;
}
}
if (((PointPathingPassable(lv_targetPoint) == false) || (PointPathingPassable(lv_targetPoint2) == false) || (PointPathingPassable(lv_targetPoint3) == false) || (RegionContainsPoint(lv_region, lv_targetPoint) == false))) {
lv_targetPoint2 = libGame_gv_players[lv_player].lv_spawnPoint;
}
UnitSetPosition(lv_heroUnit, lv_targetPoint2, true);
UnitIssueOrder(lv_heroUnit, Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
}
}
}
else {
if ((libNtve_gf_UnitInRegion(lv_heroUnit, lv_region) == false)) {
lv_targetPoint = UnitGetPosition(lv_heroUnit);
lv_targetPoint2 = libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint);
lv_targetPoint3 = libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint2, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint);
for (auto20A44F8E_i = 1; auto20A44F8E_i <= auto20A44F8E_n; auto20A44F8E_i += 1) {
if (((PointPathingPassable(lv_targetPoint) == false) || (PointPathingPassable(lv_targetPoint2) == false) || (PointPathingPassable(lv_targetPoint3) == false) || (RegionContainsPoint(lv_region, lv_targetPoint) == false))) {
lv_targetPoint = lv_targetPoint2;
lv_targetPoint2 = lv_targetPoint3;
lv_targetPoint3 = libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint2, lv_bufferDistance, libGame_gv_players[lv_player].lv_spawnPoint);
}
else {
break;
}
}
if (((PointPathingPassable(lv_targetPoint) == false) || (PointPathingPassable(lv_targetPoint2) == false) || (PointPathingPassable(lv_targetPoint3) == false) || (RegionContainsPoint(lv_region, lv_targetPoint) == false))) {
lv_targetPoint2 = libGame_gv_players[lv_player].lv_spawnPoint;
}
UnitSetPosition(lv_heroUnit, lv_targetPoint2, true);
UnitIssueOrder(lv_heroUnit, Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
libNtve_gf_UIErrorMessage(libCore_gv_playerGroupFromPlayer[lv_player], StringExternal("Param/Value/lib_Game_5C4701FE"), SoundLink("UI_GenericError", -1));
}
}
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ConfineHeroesToBaseUntilCountdownEnds_Init () {
libGame_gt_ConfineHeroesToBaseUntilCountdownEnds = TriggerCreate("libGame_gt_ConfineHeroesToBaseUntilCountdownEnds_Func");
TriggerAddEventTimePeriodic(libGame_gt_ConfineHeroesToBaseUntilCountdownEnds, 0.0625, c_timeGame);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Confine Other Units To Base Until Countdown Ends
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ConfineOtherUnitsToBaseUntilCountdownEnds_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
if (((UnitTypeTestAttribute(UnitGetType(EventUnit()), c_unitAttributeHeroic) == false) || (UnitTestState(EventUnit(), c_unitStateHallucination) == true) || (UnitHasBehavior2(EventUnit(), "Precursor") == true)) && (UnitFilterMatch(EventUnit(), 0, UnitFilter((1 << c_targetFilterItem), 0, 0, 0)) == false) && (UnitGetType(EventUnit()) != "StitchesHookMissile") && (UnitGetType(EventUnit()) != "StitchesHookMissedReturnMissile") && (UnitGetType(EventUnit()) != "AbathurSymbiote") && (UnitGetType(EventUnit()) != "MurkyPufferfishMissile") && (UnitGetType(EventUnit()) != "MurkyPufferfishNoBounceMissile")) {
UnitKill(EventUnit());
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ConfineOtherUnitsToBaseUntilCountdownEnds_Init () {
libGame_gt_ConfineOtherUnitsToBaseUntilCountdownEnds = TriggerCreate("libGame_gt_ConfineOtherUnitsToBaseUntilCountdownEnds_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Confine Created Units To Base Until Countdown Ends
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ConfineCreatedUnitsToBaseUntilCountdownEnds_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_createdUnit;
// Automatic Variable Declarations
// Variable Initialization
lv_createdUnit = EventUnitCreatedUnit();
// Conditions
if (testConds) {
if (!((TimerGetRemaining(libGame_gv_openTheGatesTimer) > 0.0))) {
return false;
}
if (!((libCore_gv_mAPOrderBaseRegion != null))) {
return false;
}
if (!((libCore_gv_mAPChaosBaseRegion != null))) {
return false;
}
if (!((libNtve_gf_UnitInRegion(lv_createdUnit, libCore_gv_mAPOrderBaseRegion) != true))) {
return false;
}
if (!((libNtve_gf_UnitInRegion(lv_createdUnit, libCore_gv_mAPChaosBaseRegion) != true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if (((UnitTypeTestAttribute(UnitGetType(lv_createdUnit), c_unitAttributeHeroic) == false) || (UnitTestState(lv_createdUnit, c_unitStateHallucination) == true) || (UnitHasBehavior2(lv_createdUnit, "Precursor") == true)) && (UnitFilterMatch(lv_createdUnit, 0, UnitFilter((1 << c_targetFilterItem), 0, 0, 0)) == false) && (UnitGetType(lv_createdUnit) != "StitchesHookMissile") && (UnitGetType(lv_createdUnit) != "StitchesHookMissedReturnMissile") && (UnitGetType(lv_createdUnit) != "AbathurSymbiote") && (UnitGetType(lv_createdUnit) != "MurkyPufferfishMissile") && (UnitGetType(lv_createdUnit) != "MurkyPufferfishNoBounceMissile")) {
UnitKill(lv_createdUnit);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ConfineCreatedUnitsToBaseUntilCountdownEnds_Init () {
libGame_gt_ConfineCreatedUnitsToBaseUntilCountdownEnds = TriggerCreate("libGame_gt_ConfineCreatedUnitsToBaseUntilCountdownEnds_Func");
TriggerAddEventUnitCreated(libGame_gt_ConfineCreatedUnitsToBaseUntilCountdownEnds, null, null, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Remove Units Created Outside Of Base Until Countdown Ends
//--------------------------------------------------------------------------------------------------
bool libGame_gt_RemoveUnitsCreatedOutsideOfBaseUntilCountdownEnds_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_ownerofCreatedUnit;
// Automatic Variable Declarations
// Variable Initialization
lv_ownerofCreatedUnit = UnitGetOwner(EventUnitCreatedUnit());
// Conditions
if (testConds) {
if (!(((libCore_gv_sYSGameMode == libCore_ge_GameModes_Normal) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_Sandbox) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_ArenaMode) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_AttackDefend)))) {
return false;
}
if (!((libCore_gv_mAPOrderBaseRegion != null))) {
return false;
}
if (!((libCore_gv_mAPChaosBaseRegion != null))) {
return false;
}
if (!((libNtve_gf_UnitInRegion(EventUnitCreatedUnit(), libCore_gv_mAPOrderBaseRegion) == false))) {
return false;
}
if (!((libNtve_gf_UnitInRegion(EventUnitCreatedUnit(), libCore_gv_mAPChaosBaseRegion) == false))) {
return false;
}
if (!((lv_ownerofCreatedUnit >= 1))) {
return false;
}
if (!((lv_ownerofCreatedUnit <= 10))) {
return false;
}
if (!((UnitFilterMatch(EventUnitCreatedUnit(), 0, UnitFilter((1 << c_targetFilterMissile), 0, 0, 0)) == true))) {
return false;
}
if (!((UnitGetType(EventUnitCreatedUnit()) != "StitchesHookMissile"))) {
return false;
}
if (!((UnitGetType(EventUnitCreatedUnit()) != "StitchesHookMissedReturnMissile"))) {
return false;
}
if (!((UnitGetType(EventUnitCreatedUnit()) != "MurkyPufferfishMissile"))) {
return false;
}
if (!((UnitGetType(EventUnitCreatedUnit()) != "MurkyPufferfishNoBounceMissile"))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
UnitKill(EventUnitCreatedUnit());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_RemoveUnitsCreatedOutsideOfBaseUntilCountdownEnds_Init () {
libGame_gt_RemoveUnitsCreatedOutsideOfBaseUntilCountdownEnds = TriggerCreate("libGame_gt_RemoveUnitsCreatedOutsideOfBaseUntilCountdownEnds_Func");
TriggerAddEventUnitCreated(libGame_gt_RemoveUnitsCreatedOutsideOfBaseUntilCountdownEnds, null, null, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Determine Winning Team
//--------------------------------------------------------------------------------------------------
bool libGame_gt_DetermineWinningTeam_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
unit lv_itUnit;
bool[libCore_gv_bALMaxTeams + 1] lv_teamCoreAlive;
int lv_winningTeam;
// Automatic Variable Declarations
unitgroup auto08265F96_g;
int auto08265F96_u;
unitgroup auto377877B3_g;
int auto377877B3_u;
unitgroup auto1DE78EA4_g;
int auto1DE78EA4_u;
playergroup autoB1212857_g;
// Variable Initialization
lv_winningTeam = -1;
// Actions
if (!runActions) {
return true;
}
if ((libGame_gv_gameOver_DetermineWinningTeamHasRun == true)) {
return true;
}
libGame_gv_gameOver_DetermineWinningTeamHasRun = true;
if ((libGame_gv_teamOrderCoreAlive == true)) {
lv_winningTeam = libGame_gv_teamOrderIndex_C;
}
else {
lv_winningTeam = libGame_gv_teamChaosIndex_C;
}
if ((lv_winningTeam == -1)) {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_FADF76DE"), true);
return true;
}
TriggerQueueClear(c_triggerQueueRemove);
TransmissionClearAll();
libSond_gf_MuteMostSoundChannelsForGameOverState(true);
libGame_gf_PlayGameOverStinger(lv_winningTeam);
auto08265F96_g = libGame_gv_heroes;
auto08265F96_u = UnitGroupCount(auto08265F96_g, c_unitCountAll);
for (;; auto08265F96_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(auto08265F96_g, auto08265F96_u);
if (lv_itUnit == null) { break; }
if ((UnitGetType(lv_itUnit) == "HeroTassadar")) {
UnitBehaviorAdd(lv_itUnit, "TassadarDistortionBeamSuppression", lv_itUnit, 1);
}
if ((UnitGetType(lv_itUnit) == "HeroDiablo")) {
UnitBehaviorRemove(lv_itUnit, "DiabloLightningBreathActive", 1);
}
}
if ((lv_winningTeam > 0)) {
auto377877B3_g = UnitGroupAlliance(libGame_gv_teams[lv_winningTeam].lv_nPCPlayer, c_unitAllianceAlly, RegionCircle(UnitGetPosition(libGame_gv_teams[libGame_gf_EnemyTeam(lv_winningTeam)].lv_core), 25.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto377877B3_u = UnitGroupCount(auto377877B3_g, c_unitCountAll);
for (;; auto377877B3_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(auto377877B3_g, auto377877B3_u);
if (lv_itUnit == null) { break; }
UnitBehaviorRemove(lv_itUnit, "Mounted", 1);
libNtve_gf_SendActorMessageToUnit(lv_itUnit, "Signal GameWon");
}
auto1DE78EA4_g = UnitGroupAlliance(libGame_gv_teams[lv_winningTeam].lv_nPCPlayer, c_unitAllianceEnemy, RegionCircle(UnitGetPosition(libGame_gv_teams[libGame_gf_EnemyTeam(lv_winningTeam)].lv_core), 25.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto1DE78EA4_u = UnitGroupCount(auto1DE78EA4_g, c_unitCountAll);
for (;; auto1DE78EA4_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(auto1DE78EA4_g, auto1DE78EA4_u);
if (lv_itUnit == null) { break; }
UnitBehaviorRemove(lv_itUnit, "Mounted", 1);
libNtve_gf_SendActorMessageToUnit(lv_itUnit, "Signal GameLost");
}
}
TriggerExecute(libSprt_gt_DEBUGInspectTheBalanceProbebalanceprobe, true, false);
Wait(libGame_gv_gameOver_CameraPanTime_C, c_timeGame);
Wait(libGame_gv_gameOver_CoreAnimationWaitTime_C, c_timeGame);
autoB1212857_g = PlayerGroupAll();
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoB1212857_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
libGame_gf_AnnouncementClearQueueForPlayer(lv_itPlayer);
}
libGame_gv_announcement_SystemEnabled = false;
libGame_gf_PlayVictoryDefeatVO(lv_winningTeam);
libGame_gf_GameOver(lv_winningTeam);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_DetermineWinningTeam_Init () {
libGame_gt_DetermineWinningTeam = TriggerCreate("libGame_gt_DetermineWinningTeam_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Update Stats, Award XP, Make Annouccements CORE
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathUpdateStatsAwardXPMakeAnnouccementsCORE_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_deadHero;
int lv_killingPlayer;
int lv_itPlayer;
unit lv_itUnit;
int lv_deadPlayer;
int lv_deadPlayerTeam;
playergroup lv_killingTeamGroup;
unitgroup lv_nearbyUnits;
playergroup lv_awardGroup;
playergroup lv_deadPlayerTeamGroup;
playergroup lv_killingGroup;
int lv_killingFaction;
point lv_deadHeroPosition;
// Automatic Variable Declarations
playergroup autoE9AC1C24_g;
playergroup autoC94524FE_g;
// Variable Initialization
lv_killingTeamGroup = PlayerGroupEmpty();
lv_nearbyUnits = UnitGroupEmpty();
lv_awardGroup = PlayerGroupEmpty();
lv_deadPlayerTeamGroup = PlayerGroupEmpty();
lv_killingGroup = PlayerGroupEmpty();
// Conditions
if (testConds) {
if (!((libGame_gf_HeroKilledPlayer() >= 1))) {
return false;
}
if (!((libGame_gf_HeroKilledPlayer() <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_killingPlayer = libGame_gf_HeroKilledKillingPlayer();
lv_deadHero = libGame_gf_HeroKilledUnit();
if ((libGame_gv_heroDeath_UpdateStats == false)) {
return true;
}
if (((lv_killingPlayer < 1) || (lv_killingPlayer > libCore_gv_bALMaxEnginePlayerCount))) {
TextExpressionSetToken("Param/Expression/lib_Game_1A6F3F77", "A", IntToText(lv_killingPlayer));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_1A6F3F77"), true);
return true;
}
lv_deadPlayer = UnitGetOwner(lv_deadHero);
lv_deadPlayerTeam = libGame_gf_TeamNumberOfPlayer(lv_deadPlayer);
lv_deadHeroPosition = UnitGetPosition(lv_deadHero);
UIAlert("YourHeroHasDied", lv_deadPlayer, StringToText(""), null);
lv_deadPlayerTeamGroup = libGame_gf_AlliedPlayerGroupOfPlayer(lv_deadPlayer);
lv_killingTeamGroup = libGame_gf_EnemyPlayerGroupOfPlayer(lv_deadPlayer);
if ((lv_deadPlayerTeam == libGame_gv_teamOrderIndex_C)) {
lv_killingFaction = libGame_ge_Faction_Chaos;
}
else {
lv_killingFaction = libGame_ge_Faction_Order;
}
if ((PlayerHero(lv_deadPlayer) != "Leoric")) {
libGame_gf_AfkPauseWarningTimerForPlayer(lv_deadPlayer, true);
}
autoE9AC1C24_g = lv_killingTeamGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoE9AC1C24_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((lv_itPlayer != libCore_gv_cOMPUTER_TeamOrder) && (lv_itPlayer != libCore_gv_cOMPUTER_TeamChaos)) {
PlayerGroupAdd(lv_awardGroup, lv_itPlayer);
}
}
lv_killingGroup = libGame_gf_HeroDeathGetKillingGroupFromKillingTeamGroupAndDeadUnit(lv_killingTeamGroup, lv_killingPlayer, lv_deadHero);
if (((PlayerGroupCount(lv_killingGroup) > 0) || (lv_killingPlayer == libCore_gv_cOMPUTER_TeamOrder) || (lv_killingPlayer == libCore_gv_cOMPUTER_TeamChaos))) {
libGame_gf_HeroDeathUpdateTeamStats(lv_deadHero, lv_killingFaction);
}
libGame_gf_HeroDeathAwardXP(lv_killingPlayer, lv_deadHero, lv_awardGroup, lv_killingGroup, true);
libGame_gf_HeroDeathUpdatePlayerStats(lv_deadHero, lv_killingPlayer, lv_killingTeamGroup, lv_killingGroup);
libGame_gf_HeroDeathDeadTeamAnnouncements(lv_deadHero, lv_deadPlayerTeamGroup, lv_killingFaction);
libGame_gv_players[lv_deadPlayer].lv_killingSpreeCount = 0;
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_deadPlayer, "KillStreak", libGame_gv_players[lv_deadPlayer].lv_killingSpreeCount);
if ((libGame_gv_firstBloodAvailable == true)) {
libGame_gv_firstBloodAvailable = false;
}
StatEventCreate("PlayerDeath");
StatEventAddDataInt(StatEventLastCreated(), "PlayerID", lv_deadPlayer);
StatEventAddDataFixed(StatEventLastCreated(), "PositionX", PointGetX(UnitGetPosition(lv_deadHero)));
StatEventAddDataFixed(StatEventLastCreated(), "PositionY", PointGetY(UnitGetPosition(lv_deadHero)));
if ((PlayerGroupCount(lv_killingGroup) > 0)) {
autoC94524FE_g = lv_killingGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoC94524FE_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
StatEventAddDataInt(StatEventLastCreated(), "KillingPlayer", lv_itPlayer);
if ((UnitTypeTestAttribute(UnitGetType(lv_deadHero), c_unitAttributeSummoned) == false)) {
libGame_gf_SendEventHeroParticipatedInTakedown(lv_killingPlayer, lv_itPlayer, lv_deadPlayer, lv_deadHero, lv_deadHeroPosition);
}
}
}
else {
StatEventAddDataInt(StatEventLastCreated(), "KillingPlayer", 0);
}
StatEventSend(StatEventLastCreated());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathUpdateStatsAwardXPMakeAnnouccementsCORE_Init () {
libGame_gt_HeroDeathUpdateStatsAwardXPMakeAnnouccementsCORE = TriggerCreate("libGame_gt_HeroDeathUpdateStatsAwardXPMakeAnnouccementsCORE_Func");
libGame_gf_HeroKilled(libGame_gt_HeroDeathUpdateStatsAwardXPMakeAnnouccementsCORE);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Diablo Participated In Takedown
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathDiabloParticipatedInTakedown_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_behaviorCountToAdd;
// Automatic Variable Declarations
// Variable Initialization
// Conditions
if (testConds) {
if (!((UnitGetType(libGame_gv_players[libGame_gf_HeroParticipatedInTakedownKillingPlayer()].lv_heroUnit) == "HeroDiablo"))) {
return false;
}
if (!((UnitHasBehavior2(libGame_gv_players[libGame_gf_HeroParticipatedInTakedownKillingPlayer()].lv_heroUnit, "DiabloBlackSoulstoneTokenCounter") == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((UnitBehaviorCount(libGame_gv_players[libGame_gf_HeroParticipatedInTakedownKillingPlayer()].lv_heroUnit, "DiabloBlackSoulstoneTokenCounter") < 100)) {
UnitCreateEffectUnit(libGame_gv_players[libGame_gf_HeroParticipatedInTakedownKillingPlayer()].lv_heroUnit, "DiabloBlackSoulstoneAdd10TokenSet", libGame_gv_players[libGame_gf_HeroParticipatedInTakedownKillingPlayer()].lv_heroUnit);
UnitCreateEffectUnit(libGame_gv_players[libGame_gf_HeroParticipatedInTakedownKillingPlayer()].lv_heroUnit, "DiabloBlackSoulstoneHeroTargetLaunchMissile", libGame_gf_HeroParticipatedInTakedownKilledHero());
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathDiabloParticipatedInTakedown_Init () {
libGame_gt_HeroDeathDiabloParticipatedInTakedown = TriggerCreate("libGame_gt_HeroDeathDiabloParticipatedInTakedown_Func");
libGame_gf_HeroParticipatedInTakedown(libGame_gt_HeroDeathDiabloParticipatedInTakedown);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Seasoned Marksman Participated In Takedown
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathSeasonedMarksmanParticipatedInTakedown_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_killingPlayer;
unit lv_unit;
int lv_stackTokenCount;
// Automatic Variable Declarations
// Variable Initialization
lv_killingPlayer = libGame_gf_HeroParticipatedInTakedownKillingPlayer();
lv_unit = libGame_gv_players[lv_killingPlayer].lv_heroUnit;
lv_stackTokenCount = UnitBehaviorCount(lv_unit, "TalentSeasonedMarksmanTokenCounter");
// Conditions
if (testConds) {
if (!((UnitBehaviorCount(libGame_gv_players[lv_killingPlayer].lv_heroUnit, "TalentSeasonedMarksmanCarryBehavior") == 1))) {
return false;
}
if (!((lv_stackTokenCount != 1000))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((lv_stackTokenCount >= 40)) {
UnitCreateEffectUnit(lv_unit, "TalentSeasonedMarksmanAdd5TokenCountNoQuestCategory", lv_unit);
}
else {
UnitCreateEffectUnit(lv_unit, "TalentSeasonedMarksmanAdd5TokenCount", lv_unit);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathSeasonedMarksmanParticipatedInTakedown_Init () {
libGame_gt_HeroDeathSeasonedMarksmanParticipatedInTakedown = TriggerCreate("libGame_gt_HeroDeathSeasonedMarksmanParticipatedInTakedown_Func");
libGame_gf_HeroParticipatedInTakedown(libGame_gt_HeroDeathSeasonedMarksmanParticipatedInTakedown);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Wrath Of The Bone King Participated In Takedown
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathWrathOfTheBoneKingParticipatedInTakedown_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_killingPlayer;
unit lv_unit;
int lv_stackTokenCount;
// Automatic Variable Declarations
// Variable Initialization
lv_killingPlayer = libGame_gf_HeroParticipatedInTakedownKillingPlayer();
lv_unit = libGame_gv_players[lv_killingPlayer].lv_heroUnit;
lv_stackTokenCount = UnitBehaviorCount(lv_unit, "LeoricMithrilMaceTokenCounter");
// Conditions
if (testConds) {
if (!((UnitHasBehavior2(libGame_gv_players[libGame_gf_HeroParticipatedInTakedownKillingPlayer()].lv_heroUnit, "LeoricMithrilMaceTokenCounter") == true))) {
return false;
}
if (!((lv_stackTokenCount <= 100))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
UnitCreateEffectUnit(lv_unit, "LeoricMithrilMace10TokenCount", lv_unit);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathWrathOfTheBoneKingParticipatedInTakedown_Init () {
libGame_gt_HeroDeathWrathOfTheBoneKingParticipatedInTakedown = TriggerCreate("libGame_gt_HeroDeathWrathOfTheBoneKingParticipatedInTakedown_Func");
libGame_gf_HeroParticipatedInTakedown(libGame_gt_HeroDeathWrathOfTheBoneKingParticipatedInTakedown);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Hero Dies
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathHeroDies_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_deadUnit;
int lv_deadPlayer;
int lv_killingPlayer;
int lv_deadPlayerTeamID;
// Automatic Variable Declarations
// Variable Initialization
lv_deadUnit = EventUnit();
lv_deadPlayer = EventPlayer();
lv_deadPlayerTeamID = libGame_gf_TeamNumberOfPlayer(lv_deadPlayer);
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
if (!((lv_deadPlayer >= 1))) {
return false;
}
if (!((lv_deadPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((lv_deadUnit == libGame_gv_players[lv_deadPlayer].lv_heroUnit))) {
return false;
}
if (!((UnitTestState(lv_deadUnit, c_unitStateHallucination) == false))) {
return false;
}
if (!((UnitHasBehavior2(lv_deadUnit, "AbnormalDeath") == false))) {
return false;
}
if (!(((UnitHasBehavior2(lv_deadUnit, "UtherEternalVanguard") == false) && (UnitHasBehavior2(lv_deadUnit, "UtherEternalVanguardRezDelay") == false) && (UnitHasBehavior2(lv_deadUnit, "TyraelArchangelsWrath") == false) && (UnitHasBehavior2(lv_deadUnit, "UltimateEvolutionBuff") == false) && (UnitHasBehavior2(lv_deadUnit, "BlackSoulstoneCarryBehavior") == false) && (UnitHasBehavior2(lv_deadUnit, "GuldanDarkBargainMaxHealthBehavior") == false) && (UnitGetType(lv_deadUnit) != "HeroGall")))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_killingPlayer = libNtve_gf_KillingPlayer();
UISetTargetingOrder(libCore_gv_playerGroupFromPlayer[lv_deadPlayer], libNtve_gf_ConvertUnitToUnitGroup(lv_deadUnit), null, false);
libGame_gv_players[lv_deadPlayer].lv_isDead = true;
libNtve_gf_CreateUnitsWithDefaultFacing(1, "DeadUnitCameraTarget", 0, lv_deadPlayer, UnitGetPosition(lv_deadUnit), lv_deadUnit);
libGame_gv_players[lv_deadPlayer].lv_cameraDeadUnitCameraTarget = UnitLastCreated();
libGame_gv_players[lv_deadPlayer].lv_cameraPlayerUnitGroupToFocusOn = libNtve_gf_ConvertUnitToUnitGroup(libGame_gv_players[lv_deadPlayer].lv_cameraDeadUnitCameraTarget);
libGame_gf_CameraUpdateCameraForPlayer(lv_deadPlayer);
libGame_gf_SendEventHeroKilled(lv_killingPlayer, lv_deadUnit);
libGame_gf_HeroDeathStartRespawnTimer(lv_deadPlayer, libCore_gf_HeroDeathTime(lv_deadPlayer, UnitLevel(libGame_gv_players[lv_deadPlayer].lv_heroUnit)));
if ((libCore_gv_brettTimersEnabled == true)) {
libGame_gv_players[lv_deadPlayer].lv_brettTimersTimeMod += libCore_gv_brettTimersDeathModifier;
}
libGame_gf_HeroDeathUpdateUIElementsForDeath(true, true, true, lv_deadPlayer, lv_killingPlayer);
libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(true, lv_deadPlayer);
libGame_gf_HeroDeathPortHeroBackAndSetDeathState(lv_deadPlayer, libGame_gv_players[lv_deadPlayer].lv_spawnPoint);
libAIAI_gf_AITeamDelegateModifyHeroStatusTokensforTeam(libAIAI_ge_AITeamDelegateAddRemoveLaneValue_Remove, libGame_gv_players[lv_deadPlayer].lv_aIHeroDelegateTokenValue, lv_deadPlayerTeamID, libAIAI_ge_AITeamDelegateLivingDeadHeroStatusUpdates_HeroAlive);
libAIAI_gf_AITeamDelegateModifyHeroStatusTokensforTeam(libAIAI_ge_AITeamDelegateAddRemoveLaneValue_Add, libGame_gv_players[lv_deadPlayer].lv_aIHeroDelegateTokenValue, lv_deadPlayerTeamID, libAIAI_ge_AITeamDelegateLivingDeadHeroStatusUpdates_HeroDead);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathHeroDies_Init () {
libGame_gt_HeroDeathHeroDies = TriggerCreate("libGame_gt_HeroDeathHeroDies_Func");
TriggerAddEventUnitDied(libGame_gt_HeroDeathHeroDies, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Hero Death Toast Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathHeroDeathToastTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
// Automatic Variable Declarations
const int auto612DAC5D_ae = libCore_gv_bALMaxPlayers;
const int auto612DAC5D_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_player = 1;
for ( ; ( (auto612DAC5D_ai >= 0 && lv_player <= auto612DAC5D_ae) || (auto612DAC5D_ai < 0 && lv_player >= auto612DAC5D_ae) ) ; lv_player += auto612DAC5D_ai ) {
if ((EventTimer() == libGame_gv_players[lv_player].lv_deathToastTimer)) {
libUIUI_gf_DeathRecapShowHideToastButtonForPlayer(false, lv_player);
break;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathHeroDeathToastTimerExpires_Init () {
libGame_gt_HeroDeathHeroDeathToastTimerExpires = TriggerCreate("libGame_gt_HeroDeathHeroDeathToastTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_HeroDeathHeroDeathToastTimerExpires, libGame_gv_players[1].lv_deathToastTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroDeathToastTimerExpires, libGame_gv_players[2].lv_deathToastTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroDeathToastTimerExpires, libGame_gv_players[3].lv_deathToastTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroDeathToastTimerExpires, libGame_gv_players[4].lv_deathToastTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroDeathToastTimerExpires, libGame_gv_players[5].lv_deathToastTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroDeathToastTimerExpires, libGame_gv_players[6].lv_deathToastTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroDeathToastTimerExpires, libGame_gv_players[7].lv_deathToastTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroDeathToastTimerExpires, libGame_gv_players[8].lv_deathToastTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroDeathToastTimerExpires, libGame_gv_players[9].lv_deathToastTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroDeathToastTimerExpires, libGame_gv_players[10].lv_deathToastTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Hero Respawn Sound Cue Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
const int autoBF669FDA_ae = libCore_gv_bALMaxPlayers;
const int autoBF669FDA_ai = 1;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_itPlayer = 1;
for ( ; ( (autoBF669FDA_ai >= 0 && lv_itPlayer <= autoBF669FDA_ae) || (autoBF669FDA_ai < 0 && lv_itPlayer >= autoBF669FDA_ae) ) ; lv_itPlayer += autoBF669FDA_ai ) {
if ((EventTimer() == libGame_gv_players[lv_itPlayer].lv_respawnSoundCueTimer) && (UnitHasBehavior2(libGame_gv_players[lv_itPlayer].lv_heroUnit, "HeroGenericIgnoreDeathSounds") == false)) {
SoundPlayForPlayer(SoundLink("Gen_Hero_Respawn_Ready", -1), lv_itPlayer, libCore_gv_playerGroupFromPlayer[lv_itPlayer], 100.0, 0.0);
break;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires_Init () {
libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires = TriggerCreate("libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires, libGame_gv_players[1].lv_respawnSoundCueTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires, libGame_gv_players[2].lv_respawnSoundCueTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires, libGame_gv_players[3].lv_respawnSoundCueTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires, libGame_gv_players[4].lv_respawnSoundCueTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires, libGame_gv_players[5].lv_respawnSoundCueTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires, libGame_gv_players[6].lv_respawnSoundCueTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires, libGame_gv_players[7].lv_respawnSoundCueTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires, libGame_gv_players[8].lv_respawnSoundCueTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires, libGame_gv_players[9].lv_respawnSoundCueTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires, libGame_gv_players[10].lv_respawnSoundCueTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Hero Respawn Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathHeroRespawnTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
const int auto4637F465_ae = libCore_gv_bALMaxPlayers;
const int auto4637F465_ai = 1;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_itPlayer = 1;
for ( ; ( (auto4637F465_ai >= 0 && lv_itPlayer <= auto4637F465_ae) || (auto4637F465_ai < 0 && lv_itPlayer >= auto4637F465_ae) ) ; lv_itPlayer += auto4637F465_ai ) {
if ((EventTimer() == libGame_gv_players[lv_itPlayer].lv_respawnTimer)) {
if ((libGame_gv_players[lv_itPlayer].lv_noRespawn == true)) {
break;
}
if ((libGame_gv_players[lv_itPlayer].lv_heroRequiresCustomRespawn == false)) {
libGame_gf_HeroDeathRespawnHeroforPlayer(libGame_gv_heroDeath_RespawnMounted, lv_itPlayer, libGame_gv_players[lv_itPlayer].lv_spawnPoint, 100);
break;
}
else {
libGame_gf_SendEventRequestCustomRespawn(lv_itPlayer, libGame_gv_heroDeath_RespawnMounted, libGame_gv_players[lv_itPlayer].lv_spawnPoint, 100);
break;
}
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathHeroRespawnTimerExpires_Init () {
libGame_gt_HeroDeathHeroRespawnTimerExpires = TriggerCreate("libGame_gt_HeroDeathHeroRespawnTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnTimerExpires, libGame_gv_players[1].lv_respawnTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnTimerExpires, libGame_gv_players[2].lv_respawnTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnTimerExpires, libGame_gv_players[3].lv_respawnTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnTimerExpires, libGame_gv_players[4].lv_respawnTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnTimerExpires, libGame_gv_players[5].lv_respawnTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnTimerExpires, libGame_gv_players[6].lv_respawnTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnTimerExpires, libGame_gv_players[7].lv_respawnTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnTimerExpires, libGame_gv_players[8].lv_respawnTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnTimerExpires, libGame_gv_players[9].lv_respawnTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathHeroRespawnTimerExpires, libGame_gv_players[10].lv_respawnTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Team Multikill Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathTeamMultikillTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itTeam;
// Automatic Variable Declarations
const int autoAF0AA5CC_ae = libCore_gv_bALMaxTeams;
const int autoAF0AA5CC_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_itTeam = 1;
for ( ; ( (autoAF0AA5CC_ai >= 0 && lv_itTeam <= autoAF0AA5CC_ae) || (autoAF0AA5CC_ai < 0 && lv_itTeam >= autoAF0AA5CC_ae) ) ; lv_itTeam += autoAF0AA5CC_ai ) {
if ((EventTimer() == libGame_gv_teams[lv_itTeam].lv_multikillTimer)) {
libGame_gv_teams[lv_itTeam].lv_multikillStreak = 0;
break;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathTeamMultikillTimerExpires_Init () {
libGame_gt_HeroDeathTeamMultikillTimerExpires = TriggerCreate("libGame_gt_HeroDeathTeamMultikillTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_HeroDeathTeamMultikillTimerExpires, libGame_gv_teams[1].lv_multikillTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathTeamMultikillTimerExpires, libGame_gv_teams[2].lv_multikillTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Player Multikill Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathPlayerMultikillTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
const int auto35E4C1F1_ae = libCore_gv_bALMaxPlayers;
const int auto35E4C1F1_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_itPlayer = 1;
for ( ; ( (auto35E4C1F1_ai >= 0 && lv_itPlayer <= auto35E4C1F1_ae) || (auto35E4C1F1_ai < 0 && lv_itPlayer >= auto35E4C1F1_ae) ) ; lv_itPlayer += auto35E4C1F1_ai ) {
if ((EventTimer() == libGame_gv_players[lv_itPlayer].lv_multikillTimer)) {
if ((libGame_gv_players[lv_itPlayer].lv_multikillStreak > 0)) {
DialogControlSendAnimationEvent(libUIUI_gv_notificationDisplay.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lv_itPlayer], "ShowTimedNotification_Expire");
}
libGame_gv_players[lv_itPlayer].lv_multikillStreak = 0;
libGame_gf_HeroDeathDispatchKillingSpreeAnnouncement(lv_itPlayer);
break;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathPlayerMultikillTimerExpires_Init () {
libGame_gt_HeroDeathPlayerMultikillTimerExpires = TriggerCreate("libGame_gt_HeroDeathPlayerMultikillTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_HeroDeathPlayerMultikillTimerExpires, libGame_gv_players[1].lv_multikillTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathPlayerMultikillTimerExpires, libGame_gv_players[2].lv_multikillTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathPlayerMultikillTimerExpires, libGame_gv_players[3].lv_multikillTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathPlayerMultikillTimerExpires, libGame_gv_players[4].lv_multikillTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathPlayerMultikillTimerExpires, libGame_gv_players[5].lv_multikillTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathPlayerMultikillTimerExpires, libGame_gv_players[6].lv_multikillTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathPlayerMultikillTimerExpires, libGame_gv_players[7].lv_multikillTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathPlayerMultikillTimerExpires, libGame_gv_players[8].lv_multikillTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathPlayerMultikillTimerExpires, libGame_gv_players[9].lv_multikillTimer);
TriggerAddEventTimer(libGame_gt_HeroDeathPlayerMultikillTimerExpires, libGame_gv_players[10].lv_multikillTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Update Multikill Timer UI
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathUpdateMultikillTimerUI_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
fixed lv_remainingTimerDuration;
bool lv_playerStillUpdating;
fixed lv_animTime;
// Automatic Variable Declarations
const int auto93E1A67E_ae = libCore_gv_bALMaxPlayers;
const int auto93E1A67E_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_itPlayer = 1;
for ( ; ( (auto93E1A67E_ai >= 0 && lv_itPlayer <= auto93E1A67E_ae) || (auto93E1A67E_ai < 0 && lv_itPlayer >= auto93E1A67E_ae) ) ; lv_itPlayer += auto93E1A67E_ai ) {
if ((libGame_gv_players[lv_itPlayer].lv_multikillStreak == 5)) {
libGame_gf_HeroDeathDispatchKillingSpreeAnnouncement(lv_itPlayer);
}
lv_remainingTimerDuration = TimerGetRemaining(libGame_gv_players[lv_itPlayer].lv_multikillTimer);
if ((lv_remainingTimerDuration > 0.0)) {
lv_playerStillUpdating = true;
lv_animTime = (libGame_gv_heroDeathMultikillTimeoutDuration - lv_remainingTimerDuration);
libNtve_gf_SetDialogItemAnimationTime(libUIUI_gv_notificationDisplay.lv_multikillTimerCountdownImage, lv_animTime, libCore_gv_playerGroupFromPlayer[lv_itPlayer]);
}
}
if ((lv_playerStillUpdating == false)) {
TriggerEnable(TriggerGetCurrent(), false);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathUpdateMultikillTimerUI_Init () {
libGame_gt_HeroDeathUpdateMultikillTimerUI = TriggerCreate("libGame_gt_HeroDeathUpdateMultikillTimerUI_Func");
TriggerEnable(libGame_gt_HeroDeathUpdateMultikillTimerUI, false);
TriggerAddEventTimePeriodic(libGame_gt_HeroDeathUpdateMultikillTimerUI, 0.0625, c_timeGame);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Kill Stinger Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathKillStingerTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
const int auto740A276E_ae = libCore_gv_bALMaxEnginePlayerCount;
const int auto740A276E_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_itPlayer = 1;
for ( ; ( (auto740A276E_ai >= 0 && lv_itPlayer <= auto740A276E_ae) || (auto740A276E_ai < 0 && lv_itPlayer >= auto740A276E_ae) ) ; lv_itPlayer += auto740A276E_ai ) {
if ((EventTimer() == libGame_gv_heroDeathKillStingerQueue[lv_itPlayer].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Ally)])) {
libGame_gf_HeroDeathPlayNextSoundInQueueForPlayer(libGame_ge_HeroDeathKillStingerQueueType_Ally, lv_itPlayer);
break;
}
if ((EventTimer() == libGame_gv_heroDeathKillStingerQueue[lv_itPlayer].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Enemy)])) {
libGame_gf_HeroDeathPlayNextSoundInQueueForPlayer(libGame_ge_HeroDeathKillStingerQueueType_Enemy, lv_itPlayer);
break;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathKillStingerTimerExpires_Init () {
libGame_gt_HeroDeathKillStingerTimerExpires = TriggerCreate("libGame_gt_HeroDeathKillStingerTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[1].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Ally)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[2].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Ally)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[3].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Ally)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[4].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Ally)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[5].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Ally)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[6].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Ally)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[7].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Ally)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[8].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Ally)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[9].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Ally)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[10].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Ally)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[libCore_gv_oBSERVER_ObserverUIPlayer].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Ally)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[1].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Enemy)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[2].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Enemy)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[3].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Enemy)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[4].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Enemy)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[5].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Enemy)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[6].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Enemy)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[7].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Enemy)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[8].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Enemy)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[9].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Enemy)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[10].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Enemy)]);
TriggerAddEventTimer(libGame_gt_HeroDeathKillStingerTimerExpires, libGame_gv_heroDeathKillStingerQueue[libCore_gv_oBSERVER_ObserverUIPlayer].lv_killStingerTimer[(libGame_ge_HeroDeathKillStingerQueueType_Enemy)]);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Diablo - Diablo Dies
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathDiabloDiabloDies_Func (bool testConds, bool runActions) {
// Variable Declarations
bool lv_soulstoneRes;
unit lv_deadUnit;
int lv_deadPlayer;
int lv_killingPlayer;
int lv_respawnDuration;
int lv_currentStackCountofSoulstone;
int lv_currentStackCountofPrimeEvil;
int lv_removeAmount;
point lv_deadUnitsOriginalLocation;
fixed lv_respawnTime;
// Automatic Variable Declarations
// Variable Initialization
lv_deadUnit = EventUnit();
lv_deadPlayer = EventPlayer();
lv_killingPlayer = libNtve_gf_KillingPlayer();
lv_currentStackCountofSoulstone = UnitBehaviorCount(EventUnit(), "DiabloBlackSoulstoneTokenCounter");
lv_currentStackCountofPrimeEvil = UnitBehaviorCount(EventUnit(), "DiabloBlackSoulstoneEternalSoulstone");
lv_deadUnitsOriginalLocation = UnitGetPosition(EventUnit());
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
if (!((lv_deadPlayer >= 1))) {
return false;
}
if (!((lv_deadPlayer <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((lv_deadUnit == libGame_gv_players[lv_deadPlayer].lv_heroUnit))) {
return false;
}
if (!((UnitTestState(lv_deadUnit, c_unitStateHallucination) == false))) {
return false;
}
if (!((UnitGetType(lv_deadUnit) == "HeroDiablo"))) {
return false;
}
if (!((UnitHasBehavior2(lv_deadUnit, "DiabloBlackSoulstoneTokenCounter") == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_respawnDuration = FixedToInt(libCore_gf_HeroDeathTime(lv_deadPlayer, UnitLevel(lv_deadUnit)));
if ((PlayerHasTalent(lv_deadPlayer, "DiabloMasteryDyingBreathApocalypse") == true)) {
UnitCreateEffectUnitWithSource(lv_deadUnit, "DiabloApocalypseEnumerateTrackedUnits", lv_deadUnit, c_gameCatalogAbil, "DiabloApocalypse");
}
libGame_gv_players[lv_deadPlayer].lv_isDead = true;
libNtve_gf_CreateUnitsWithDefaultFacing(1, "DeadUnitCameraTarget", 0, lv_deadPlayer, UnitGetPosition(lv_deadUnit), lv_deadUnit);
libGame_gv_players[lv_deadPlayer].lv_cameraDeadUnitCameraTarget = UnitLastCreated();
libGame_gv_players[lv_deadPlayer].lv_cameraPlayerUnitGroupToFocusOn = libNtve_gf_ConvertUnitToUnitGroup(libGame_gv_players[lv_deadPlayer].lv_cameraDeadUnitCameraTarget);
libGame_gf_CameraUpdateCameraForPlayer(lv_deadPlayer);
if ((lv_currentStackCountofSoulstone >= 100)) {
lv_soulstoneRes = true;
PlayerCreateEffectPoint(lv_deadPlayer, "DiabloBlackSoulstoneResurrectDummyPersistent", libNtve_gf_PointWithZOffset(lv_deadUnitsOriginalLocation, 2.0));
UnitCreateEffectUnit(lv_deadUnit, "DiabloBlackSoulstoneRemove100TokenSet", lv_deadUnit);
if ((lv_currentStackCountofPrimeEvil >= 1)) {
UnitCreateEffectUnit(lv_deadUnit, "DiabloBlackSoulstoneAdd25TokenSet", lv_deadUnit);
}
}
libGame_gf_SendEventHeroKilled(lv_killingPlayer, lv_deadUnit);
if ((lv_soulstoneRes == true)) {
lv_respawnTime = libCore_gv_bALDiabloSoulstoneDeathTime;
}
else {
lv_respawnTime = libCore_gf_HeroDeathTime(lv_deadPlayer, UnitLevel(libGame_gv_players[lv_deadPlayer].lv_heroUnit));
}
libGame_gf_HeroDeathStartRespawnTimer(lv_deadPlayer, lv_respawnTime);
libGame_gf_HeroDeathUpdateUIElementsForDeath(true, true, true, lv_deadPlayer, lv_killingPlayer);
libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(true, lv_deadPlayer);
libGame_gf_HeroDeathPortHeroBackAndSetDeathState(lv_deadPlayer, libGame_gv_players[lv_deadPlayer].lv_spawnPoint);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathDiabloDiabloDies_Init () {
libGame_gt_HeroDeathDiabloDiabloDies = TriggerCreate("libGame_gt_HeroDeathDiabloDiabloDies_Func");
TriggerAddEventUnitDied(libGame_gt_HeroDeathDiabloDiabloDies, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Uther Eternal Devotion Proc
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathUtherEternalDevotionProc_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_deadUnit;
int lv_deadPlayer;
int lv_killingPlayer;
const fixed lv_spiritOfRedemptionLowDeathTimeAdjustment_C = 2.0;
fixed lv_currentDeathTime;
fixed lv_spiritOfRedemptionBuffDuration;
fixed lv_spiritOfRedemptionBuffImprovedDuration;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_deadUnit = EventPlayerEffectUsedUnit(c_effectUnitCaster);
lv_deadPlayer = UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster));
lv_killingPlayer = EventPlayerEffectUsedUnitOwner(c_effectPlayerTarget);
libGame_gv_players[lv_deadPlayer].lv_lastKillingPlayer = lv_killingPlayer;
libGame_gf_SendEventHeroKilled(lv_killingPlayer, lv_deadUnit);
UnitBehaviorAdd(lv_deadUnit, "Dead", lv_deadUnit, 1);
lv_currentDeathTime = libCore_gf_HeroDeathTime(lv_deadPlayer, UnitLevel(lv_deadUnit));
lv_spiritOfRedemptionBuffDuration = CatalogFieldValueGetAsFixed(c_gameCatalogBehavior, "SpiritOfRedemptionSpiritFormBuff", "Duration", 0);
CatalogFieldValueSetFixed(c_gameCatalogBehavior, "SpiritOfRedemptionSpiritFormBuff", "Duration", lv_deadPlayer, MinF((lv_currentDeathTime - lv_spiritOfRedemptionLowDeathTimeAdjustment_C), lv_spiritOfRedemptionBuffDuration));
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(lv_deadPlayer, UnitGetPosition(lv_deadUnit), 0.25, -1, 0.0, false);
libGame_gf_SendEventHeroEntersSpecialDeathState(lv_deadUnit);
if ((PlayerHasTalent(lv_deadPlayer, "UtherMasteryRedemption") == true) && (((UnitBehaviorDuration(lv_deadUnit, "RedemptionCooldown") <= (CatalogFieldValueGetAsFixed(c_gameCatalogBehavior, "UtherEternalVanguardRezDelay", "Duration", lv_deadPlayer) + lv_spiritOfRedemptionBuffDuration)) || (UnitBehaviorCount(lv_deadUnit, "RedemptionCarryBehavior") == 1)))) {
if ((UnitBehaviorCount(lv_deadUnit, "RedemptionCarryBehavior") == 0)) {
ActorCreate(ActorScopeFromUnit(lv_deadUnit), "RedemptionVisualModel", null, null, null);
}
}
else {
libGame_gf_HeroDeathStartRespawnTimer(lv_deadPlayer, libCore_gf_HeroDeathTime(lv_deadPlayer, UnitLevel(libGame_gv_players[lv_deadPlayer].lv_heroUnit)));
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathUtherEternalDevotionProc_Init () {
libGame_gt_HeroDeathUtherEternalDevotionProc = TriggerCreate("libGame_gt_HeroDeathUtherEternalDevotionProc_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_HeroDeathUtherEternalDevotionProc, c_playerAny, "SpiritofRedemptionApplyRezDelayBehavior");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Uther Redemption Proc
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathUtherRedemptionProc_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_utherPlayer;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_utherPlayer = EventPlayerEffectUsedUnitOwner(c_effectPlayerCaster);
libGame_gv_players[lv_utherPlayer].lv_isDead = false;
libGame_gf_SendEventHeroRespawn(lv_utherPlayer, EventPlayerEffectUsedUnit(c_effectUnitCaster));
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathUtherRedemptionProc_Init () {
libGame_gt_HeroDeathUtherRedemptionProc = TriggerCreate("libGame_gt_HeroDeathUtherRedemptionProc_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_HeroDeathUtherRedemptionProc, c_playerAny, "RedemptionProcSet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Tyrael Archangels Wrath Proc
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathTyraelArchangelsWrathProc_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_deadUnit;
int lv_deadPlayer;
int lv_killingPlayer;
// Automatic Variable Declarations
// Variable Initialization
// Conditions
if (testConds) {
if (!((UnitBehaviorCount(EventPlayerEffectUsedUnit(c_effectUnitCaster), "AbathurUltimateEvolutionHasPostDeathEffectsController") == 0))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_deadUnit = EventPlayerEffectUsedUnit(c_effectUnitCaster);
lv_deadPlayer = UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster));
lv_killingPlayer = EventPlayerEffectUsedUnitOwner(c_effectPlayerTarget);
libGame_gv_players[lv_deadPlayer].lv_lastKillingPlayer = lv_killingPlayer;
libGame_gf_SendEventHeroKilled(lv_killingPlayer, lv_deadUnit);
UnitBehaviorAdd(lv_deadUnit, "Dead", lv_deadUnit, 1);
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(lv_deadPlayer, UnitGetPosition(lv_deadUnit), 0.25, -1, 0.0, false);
libGame_gf_SendEventHeroEntersSpecialDeathState(lv_deadUnit);
libGame_gf_HeroDeathStartRespawnTimer(lv_deadPlayer, libCore_gf_HeroDeathTime(lv_deadPlayer, UnitLevel(libGame_gv_players[lv_deadPlayer].lv_heroUnit)));
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathTyraelArchangelsWrathProc_Init () {
libGame_gt_HeroDeathTyraelArchangelsWrathProc = TriggerCreate("libGame_gt_HeroDeathTyraelArchangelsWrathProc_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_HeroDeathTyraelArchangelsWrathProc, c_playerAny, "ArchangelsWrathApplyActiveBehavior");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Special Death State Dies (Tyrael) (Uther)
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathSpecialDeathStateDiesTyraelUther_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_deadPlayer;
int lv_killingPlayer;
unit lv_deadUnit;
// Automatic Variable Declarations
// Variable Initialization
// Conditions
if (testConds) {
if (!(((UnitHasBehavior2(EventUnit(), "TyraelArchangelsWrath") == true) || (UnitHasBehavior2(EventUnit(), "UtherEternalVanguard") == true)))) {
return false;
}
if (!((UnitTestState(EventUnit(), c_unitStateHallucination) == false))) {
return false;
}
if (!((UnitBehaviorCount(EventUnit(), "AbathurUltimateEvolutionHasPostDeathEffectsController") == 0))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_deadUnit = EventUnit();
lv_deadPlayer = UnitGetOwner(lv_deadUnit);
lv_killingPlayer = libGame_gv_players[lv_deadPlayer].lv_lastKillingPlayer;
libGame_gv_players[lv_deadPlayer].lv_isDead = true;
libNtve_gf_CreateUnitsWithDefaultFacing(1, "DeadUnitCameraTarget", 0, lv_deadPlayer, UnitGetPosition(lv_deadUnit), lv_deadUnit);
libGame_gv_players[lv_deadPlayer].lv_cameraDeadUnitCameraTarget = UnitLastCreated();
libGame_gv_players[lv_deadPlayer].lv_cameraPlayerUnitGroupToFocusOn = libNtve_gf_ConvertUnitToUnitGroup(libGame_gv_players[lv_deadPlayer].lv_cameraDeadUnitCameraTarget);
libGame_gf_CameraUpdateCameraForPlayer(lv_deadPlayer);
libGame_gf_HeroDeathUpdateUIElementsForDeath(true, false, true, lv_deadPlayer, lv_killingPlayer);
libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(true, lv_deadPlayer);
libGame_gf_HeroDeathPortHeroBackAndSetDeathState(lv_deadPlayer, libGame_gv_players[lv_deadPlayer].lv_spawnPoint);
libGame_gf_AfkPauseWarningTimerForPlayer(lv_deadPlayer, true);
if ((libCore_gv_brettTimersEnabled == true)) {
libGame_gv_players[lv_deadPlayer].lv_brettTimersTimeMod += libCore_gv_brettTimersDeathModifier;
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathSpecialDeathStateDiesTyraelUther_Init () {
libGame_gt_HeroDeathSpecialDeathStateDiesTyraelUther = TriggerCreate("libGame_gt_HeroDeathSpecialDeathStateDiesTyraelUther_Func");
TriggerAddEventUnitDied(libGame_gt_HeroDeathSpecialDeathStateDiesTyraelUther, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Death - Gall Dies
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDeathGallDies_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_deadPlayer;
int lv_killingPlayer;
// Automatic Variable Declarations
// Variable Initialization
// Conditions
if (testConds) {
if (!((UnitGetType(EventUnit()) == "HeroGall"))) {
return false;
}
if (!((UnitTestState(EventUnit(), c_unitStateHallucination) == false))) {
return false;
}
if (!((UnitBehaviorCount(EventUnit(), "AbathurUltimateEvolutionHasPostDeathEffectsController") == 0))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_deadPlayer = UnitGetOwner(EventUnit());
lv_killingPlayer = libGame_gv_players[lv_deadPlayer].lv_lastKillingPlayer;
libGame_gv_players[lv_deadPlayer].lv_isDead = true;
libNtve_gf_CreateUnitsWithDefaultFacing(1, "DeadUnitCameraTarget", 0, lv_deadPlayer, UnitGetPosition(EventUnit()), EventUnit());
libGame_gv_players[lv_deadPlayer].lv_cameraDeadUnitCameraTarget = UnitLastCreated();
libGame_gv_players[lv_deadPlayer].lv_cameraPlayerUnitGroupToFocusOn = libNtve_gf_ConvertUnitToUnitGroup(libGame_gv_players[lv_deadPlayer].lv_cameraDeadUnitCameraTarget);
libGame_gf_CameraUpdateCameraForPlayer(lv_deadPlayer);
libUIUI_gf_UIHeroConsoleShowHideUnitStatusFrameForPlayer(false, lv_deadPlayer);
libUIUI_gf_FullscreenOverlaysShowHideDeathOverlay(true, lv_deadPlayer);
libGame_gf_HeroDeathAddStingerSoundToQueueForPlayer("Gen_Hero_Death_Self", libGame_ge_HeroDeathKillStingerQueueType_Ally, lv_deadPlayer);
libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(true, lv_deadPlayer);
libGame_gf_HeroDeathPortHeroBackAndSetDeathState(lv_deadPlayer, libGame_gv_players[lv_deadPlayer].lv_spawnPoint);
libUIUI_gf_DeathRecapShowHideToastButtonForPlayer(true, lv_deadPlayer);
libGame_gf_AfkPauseWarningTimerForPlayer(lv_deadPlayer, true);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDeathGallDies_Init () {
libGame_gt_HeroDeathGallDies = TriggerCreate("libGame_gt_HeroDeathGallDies_Func");
TriggerAddEventUnitDied(libGame_gt_HeroDeathGallDies, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Code Lane System
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializeCodeLaneSystem_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_laneIndex;
int lv_waypointIndex;
// Automatic Variable Declarations
int auto6FB2B62C_ae;
const int auto6FB2B62C_ai = 1;
int autoF21E549D_ae;
const int autoF21E549D_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
AILaneWaypointClearAll();
auto6FB2B62C_ae = libGame_gv_laneCount;
lv_laneIndex = 1;
for ( ; ( (auto6FB2B62C_ai >= 0 && lv_laneIndex <= auto6FB2B62C_ae) || (auto6FB2B62C_ai < 0 && lv_laneIndex >= auto6FB2B62C_ae) ) ; lv_laneIndex += auto6FB2B62C_ai ) {
autoF21E549D_ae = libGame_gv_laneData[lv_laneIndex].lv_waypointCount;
lv_waypointIndex = 1;
for ( ; ( (autoF21E549D_ai >= 0 && lv_waypointIndex <= autoF21E549D_ae) || (autoF21E549D_ai < 0 && lv_waypointIndex >= autoF21E549D_ae) ) ; lv_waypointIndex += autoF21E549D_ai ) {
AILaneWaypointAdd(lv_laneIndex, libGame_gv_laneData[lv_laneIndex].lv_waypoints[lv_waypointIndex]);
}
if ((libGame_gv_laneData[lv_laneIndex].lv_heroMaxOrderWaypointIndex == 0)) {
libGame_gv_laneData[lv_laneIndex].lv_heroMaxOrderWaypointIndex = libGame_gv_laneData[lv_laneIndex].lv_waypointCount;
}
AILaneWaypointSetHeroMinChaosWaypointIndex(lv_laneIndex, libGame_gv_laneData[lv_laneIndex].lv_heroMinChaosWaypointIndex);
AILaneWaypointSetHeroMaxOrderWaypointIndex(lv_laneIndex, libGame_gv_laneData[lv_laneIndex].lv_heroMaxOrderWaypointIndex);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializeCodeLaneSystem_Init () {
libGame_gt_InitializeCodeLaneSystem = TriggerCreate("libGame_gt_InitializeCodeLaneSystem_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Player Leaves Game
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PlayerLeavesGame_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
int lv_team;
int lv_enemyTeam;
// Automatic Variable Declarations
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_players[EventPlayer()].lv_gameEndedForPlayer == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((libGame_gv_gameOver == false)) {
TimerStart(libGame_gv_players[EventPlayer()].lv_playerLeftAnnouncementTimer, libGame_gv_playerLeftAnnouncementTimerDuration_C, false, c_timeGame);
libGame_gv_players[EventPlayer()].lv_playerStatus = libGame_ge_PlayerStatusStorm_LefttheGame;
lv_team = libGame_gf_TeamNumberOfPlayer(EventPlayer());
libGame_gv_teams[lv_team].lv_activeHumanPlayers -= 1;
if ((libGame_gv_teams[lv_team].lv_activeHumanPlayers == 0)) {
lv_enemyTeam = (3 - lv_team);
TextExpressionSetToken("Param/Expression/lib_Game_2995AAD8", "A", FixedToText(libGame_gv_teamAbandonedTheGameTimerDuration_C, 0));
UIDisplayMessage(libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers, c_messageAreaChat, TextExpressionAssemble("Param/Expression/lib_Game_2995AAD8"));
TimerStart(libGame_gv_teams[lv_team].lv_abandonedTheGameTimer, libGame_gv_teamAbandonedTheGameTimerDuration_C, false, c_timeGame);
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PlayerLeavesGame_Init () {
libGame_gt_PlayerLeavesGame = TriggerCreate("libGame_gt_PlayerLeavesGame_Func");
TriggerAddEventPlayerLeft(libGame_gt_PlayerLeavesGame, c_playerAny, c_gameResultUndecided);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Player Leaves Game (IsHumanPlayer)
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PlayerLeavesGameIsHumanPlayer_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_itUnit;
int lv_itPlayer;
int lv_team;
int lv_enemyTeam;
// Automatic Variable Declarations
unitgroup auto534FCED5_g;
int auto534FCED5_u;
unitgroup auto9C0B1166_g;
int auto9C0B1166_u;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
if (!((libGame_gv_playerLeaveCheck[EventPlayer()] != 1))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((UnitGroupCount(libGame_gv_players[EventPlayer()].lv_heroUnitGroup, c_unitCountAll) == 0)) {
libGame_gv_playerLeaveCheck[EventPlayer()] = 1;
Wait(5.0, c_timeGame);
auto9C0B1166_g = libGame_gv_players[EventPlayer()].lv_heroUnitGroup;
auto9C0B1166_u = UnitGroupCount(auto9C0B1166_g, c_unitCountAll);
for (;; auto9C0B1166_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(auto9C0B1166_g, auto9C0B1166_u);
if (lv_itUnit == null) { break; }
UnitBehaviorAdd(lv_itUnit, "IsHumanPlayer", lv_itUnit, 1);
}
libGame_gv_playerLeaveCheck[EventPlayer()] = 0;
}
else {
auto534FCED5_g = libGame_gv_players[EventPlayer()].lv_heroUnitGroup;
auto534FCED5_u = UnitGroupCount(auto534FCED5_g, c_unitCountAll);
for (;; auto534FCED5_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(auto534FCED5_g, auto534FCED5_u);
if (lv_itUnit == null) { break; }
UnitBehaviorAdd(lv_itUnit, "IsHumanPlayer", lv_itUnit, 1);
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PlayerLeavesGameIsHumanPlayer_Init () {
libGame_gt_PlayerLeavesGameIsHumanPlayer = TriggerCreate("libGame_gt_PlayerLeavesGameIsHumanPlayer_Func");
TriggerAddEventPlayerLeft(libGame_gt_PlayerLeavesGameIsHumanPlayer, c_playerAny, c_gameResultUndecided);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Player Rejoins Game
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PlayerRejoinsGame_Func (bool testConds, bool runActions) {
// Variable Declarations
playergroup lv_announcementGroup;
int lv_team;
// Automatic Variable Declarations
// Variable Initialization
lv_announcementGroup = PlayerGroupEmpty();
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((libGame_gv_players[EventPlayer()].lv_playerLeftAnnoucnementPlayed == true)) {
lv_announcementGroup = libGame_gf_AlliedPlayerGroupOfPlayer(EventPlayer());
PlayerGroupAdd(lv_announcementGroup, libCore_gv_oBSERVER_ObserverUIPlayer);
libGame_gf_AnnouncementAddItemForPlayerGroup(lv_announcementGroup, libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_APlayerHasRejoinedTheGame, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
else {
TimerPause(libGame_gv_players[EventPlayer()].lv_playerLeftAnnouncementTimer, true);
}
libGame_gv_players[EventPlayer()].lv_playerStatus = libGame_ge_PlayerStatusStorm_Playing;
lv_team = libGame_gf_TeamNumberOfPlayer(EventPlayer());
libGame_gv_teams[lv_team].lv_activeHumanPlayers += 1;
TimerPause(libGame_gv_teams[lv_team].lv_abandonedTheGameTimer, true);
if ((libGame_gv_players[EventPlayer()].lv_heroUnit != null)) {
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(EventPlayer(), UnitGetPosition(libGame_gv_players[EventPlayer()].lv_heroUnit), 0.0, -1, 0.0, false);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PlayerRejoinsGame_Init () {
libGame_gt_PlayerRejoinsGame = TriggerCreate("libGame_gt_PlayerRejoinsGame_Func");
TriggerAddEventPlayerJoin(libGame_gt_PlayerRejoinsGame, c_playerAny);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Team Abandoned The Game Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TeamAbandonedTheGameTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itTeam;
int lv_enemyTeam;
// Automatic Variable Declarations
const int auto0AF30C00_ae = libCore_gv_bALMaxTeams;
const int auto0AF30C00_ai = 1;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_itTeam = 1;
for ( ; ( (auto0AF30C00_ai >= 0 && lv_itTeam <= auto0AF30C00_ae) || (auto0AF30C00_ai < 0 && lv_itTeam >= auto0AF30C00_ae) ) ; lv_itTeam += auto0AF30C00_ai ) {
if ((EventTimer() == libGame_gv_teams[lv_itTeam].lv_abandonedTheGameTimer)) {
lv_enemyTeam = (3 - lv_itTeam);
UIDisplayMessage(libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers, c_messageAreaChat, StringExternal("Param/Value/lib_Game_CAD91146"));
UnitKill(libGame_gv_teams[lv_itTeam].lv_core);
TriggerEnable(TriggerGetCurrent(), false);
break;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TeamAbandonedTheGameTimerExpires_Init () {
libGame_gt_TeamAbandonedTheGameTimerExpires = TriggerCreate("libGame_gt_TeamAbandonedTheGameTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_TeamAbandonedTheGameTimerExpires, libGame_gv_teams[1].lv_abandonedTheGameTimer);
TriggerAddEventTimer(libGame_gt_TeamAbandonedTheGameTimerExpires, libGame_gv_teams[2].lv_abandonedTheGameTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Player Left Announcement Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PlayerLeftAnnouncementTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
playergroup lv_announcementGroup;
int lv_itPlayer;
int lv_itTriggeringPlayer;
int lv_enemyTeam;
// Automatic Variable Declarations
const int autoAD9152EC_ae = libCore_gv_bALMaxEnginePlayerCount;
const int autoAD9152EC_ai = 1;
playergroup autoA2B8AD94_g;
// Variable Initialization
lv_announcementGroup = PlayerGroupEmpty();
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_itTriggeringPlayer = 1;
for ( ; ( (autoAD9152EC_ai >= 0 && lv_itTriggeringPlayer <= autoAD9152EC_ae) || (autoAD9152EC_ai < 0 && lv_itTriggeringPlayer >= autoAD9152EC_ae) ) ; lv_itTriggeringPlayer += autoAD9152EC_ai ) {
if ((EventTimer() == libGame_gv_players[lv_itTriggeringPlayer].lv_playerLeftAnnouncementTimer)) {
libGame_gv_players[lv_itTriggeringPlayer].lv_playerLeftAnnoucnementPlayed = true;
lv_announcementGroup = libGame_gf_AlliedPlayerGroupOfPlayer(lv_itTriggeringPlayer);
PlayerGroupAdd(lv_announcementGroup, libCore_gv_oBSERVER_ObserverUIPlayer);
autoA2B8AD94_g = lv_announcementGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(autoA2B8AD94_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
if ((lv_itPlayer != lv_itTriggeringPlayer)) {
libGame_gf_AnnouncementAddItemForPlayerGroup(libCore_gv_playerGroupFromPlayer[lv_itPlayer], libGame_ge_AnnouncementPriorities_Normal, libCore_ge_AnnouncerVOEvents_APlayerHasLeftTheGame, "", null, null, null, null, null, libGame_gv_announcement_QuickSoundOnlyTimerDuration_C, false);
}
}
break;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PlayerLeftAnnouncementTimerExpires_Init () {
libGame_gt_PlayerLeftAnnouncementTimerExpires = TriggerCreate("libGame_gt_PlayerLeftAnnouncementTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[1].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[2].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[3].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[4].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[5].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[6].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[7].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[8].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[9].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[10].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[11].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[12].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[13].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[14].lv_playerLeftAnnouncementTimer);
TriggerAddEventTimer(libGame_gt_PlayerLeftAnnouncementTimerExpires, libGame_gv_players[15].lv_playerLeftAnnouncementTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Loot Content
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializeLootContent_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
TriggerExecute(libGame_gt_InitializeWheelCommand, true, false);
TriggerExecute(libGame_gt_InitializeWheelUI, true, false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializeLootContent_Init () {
libGame_gt_InitializeLootContent = TriggerCreate("libGame_gt_InitializeLootContent_Func");
TriggerAddEventMapInit(libGame_gt_InitializeLootContent);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Wheel Command
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializeWheelCommand_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_c;
int lv_minPingIndex;
int lv_maxPingIndex;
int lv_i;
abilcmd lv_cmd;
string lv_dummyEffect;
string lv_instance;
int lv_pingIndex;
int lv_arrayIndex;
// Automatic Variable Declarations
int auto65AE22CB_ae;
const int auto65AE22CB_ai = 1;
// Variable Initialization
lv_c = UserDataInstanceCount(libGame_gv_wheelCmdUserType);
lv_minPingIndex = libGame_gv_wheelPingOffsetIndex;
// Actions
if (!runActions) {
return true;
}
auto65AE22CB_ae = lv_c;
lv_i = 1;
for ( ; ( (auto65AE22CB_ai >= 0 && lv_i <= auto65AE22CB_ae) || (auto65AE22CB_ai < 0 && lv_i >= auto65AE22CB_ae) ) ; lv_i += auto65AE22CB_ai ) {
lv_instance = UserDataInstance(libGame_gv_wheelCmdUserType, lv_i);
lv_pingIndex = UserDataGetInt(libGame_gv_wheelCmdUserType, lv_instance, "PingIndex", 1);
lv_cmd = UserDataGetAbilCmd("TheWheelOfCommand", lv_instance, "Command", 1);
lv_dummyEffect = UserDataGetGameLink(libGame_gv_wheelCmdUserType, lv_instance, "WheelDiffEffect", 1);
lv_maxPingIndex = MaxI(lv_maxPingIndex, lv_pingIndex);
lv_minPingIndex = MinI(lv_minPingIndex, lv_pingIndex);
lv_arrayIndex = (lv_pingIndex-libGame_gv_wheelPingOffsetIndex);
libGame_gv_wheelPingMapping[lv_arrayIndex].lv_action = (lv_instance);
libGame_gv_wheelPingMapping[lv_arrayIndex].lv_cmd = lv_cmd;
libGame_gv_wheelPingMapping[lv_arrayIndex].lv_effect = lv_dummyEffect;
}
libGame_gv_wheelPingIndexMax = lv_maxPingIndex;
libGame_gv_wheelPingIndexMin = lv_minPingIndex;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializeWheelCommand_Init () {
libGame_gt_InitializeWheelCommand = TriggerCreate("libGame_gt_InitializeWheelCommand_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Player Uses Expression Wheel
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PlayerUsesExpressionWheel_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
string lv_action;
unit lv_heroUnit;
int lv_pingIndex;
abilcmd lv_cmd;
order lv_order;
string lv_dummyEffect;
point lv_point;
int lv_stat;
string lv_statType;
string lv_mapID;
// Automatic Variable Declarations
// Variable Initialization
lv_player = EventPlayer();
lv_action = "";
lv_heroUnit = UnitGroupUnit(UnitGroupSelected(lv_player), 1);
lv_pingIndex = EventPingOption();
lv_stat = -1;
lv_statType = "LootWheelUsed";
lv_mapID = libCore_gv_mAPMapStringID;
// Conditions
if (testConds) {
if (!((((lv_pingIndex >= libGame_gv_wheelPingIndexMin) && (lv_pingIndex <= libGame_gv_wheelPingIndexMax)) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((UnitIsValid(lv_heroUnit) == false)) {
lv_heroUnit = libGame_gv_players[lv_player].lv_heroUnit;
}
if ((UnitIsValid(lv_heroUnit) == false)) {
return true;
}
lv_action = libGame_gf_GetWheelActionFromIndex(lv_pingIndex);
lv_cmd = libGame_gf_GetWheelCommandFromIndex(lv_pingIndex);
lv_dummyEffect = libGame_gf_GetWheelEffectFromIndex(lv_pingIndex);
lv_order = Order(lv_cmd);
lv_point = EventPingPoint();
if ((lv_mapID == "")) {
lv_mapID = "None";
}
if ((GameIsOnline() == true)) {
StatEventCreate(lv_statType);
lv_stat = StatEventLastCreated();
StatEventAddDataString(lv_stat, "MapID", lv_mapID);
StatEventAddDataInt(lv_stat, "PlayerID", lv_player);
StatEventAddDataString(lv_stat, "PlayerHandle", PlayerHandle(lv_player));
StatEventAddDataString(lv_stat, "WheelAction", lv_action);
StatEventAddDataString(lv_stat, "HeroID", (UnitGetType(lv_heroUnit)));
StatEventAddDataFixed(lv_stat, "XLoc", PointGetX(lv_point));
StatEventAddDataFixed(lv_stat, "YLoc", PointGetY(lv_point));
StatEventSend(lv_stat);
}
if ((UnitOrderIsValid(lv_heroUnit, lv_order) == false) && (lv_cmd != null)) {
return true;
}
else {
SoundPlayForPlayer(SoundLink("UI_Game_Click", -1), lv_player, PlayerGroupSingle(lv_player), 100.0, 0.0);
}
if ((lv_dummyEffect != null)) {
UnitAbilitySpendExplicit(lv_heroUnit, lv_cmd, c_spendLocationAll, 1.0, 1.0, 1.0, 1.0);
UnitCreateEffectPoint(lv_heroUnit, lv_dummyEffect, lv_point);
}
else {
UnitIssueOrder(lv_heroUnit, lv_order, c_orderQueueReplace);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PlayerUsesExpressionWheel_Init () {
libGame_gt_PlayerUsesExpressionWheel = TriggerCreate("libGame_gt_PlayerUsesExpressionWheel_Func");
TriggerAddEventPing(libGame_gt_PlayerUsesExpressionWheel, c_playerAny);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Wheel UI
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializeWheelUI_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
DialogControlHookupStandard(c_triggerControlTypeUnitStatus, "UIContainer\\FullscreenUpperContainer\\EmotePanel\\WheelAbilStatus");
libGame_gv_wheelUnitStatus = DialogControlLastCreated();
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializeWheelUI_Init () {
libGame_gt_InitializeWheelUI = TriggerCreate("libGame_gt_InitializeWheelUI_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Wheel Unit
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializeWheelUnit_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_p;
unit lv_u;
// Automatic Variable Declarations
// Variable Initialization
lv_p = EventPlayer();
lv_u = UnitGroupUnit(UnitGroupSelected(lv_p), 1);
// Actions
if (!runActions) {
return true;
}
if ((lv_u != null)) {
libGame_gf_SetWheelMonitorUnitForPlayers(lv_u, PlayerGroupSingle(lv_p));
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializeWheelUnit_Init () {
libGame_gt_InitializeWheelUnit = TriggerCreate("libGame_gt_InitializeWheelUnit_Func");
TriggerAddEventUnitSelected(libGame_gt_InitializeWheelUnit, null, c_playerAny, true);
TriggerAddEventUnitSelected(libGame_gt_InitializeWheelUnit, null, c_playerAny, false);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Loot - Yell Voice Line
//--------------------------------------------------------------------------------------------------
bool libGame_gt_LootYellVoiceLine_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_yellingPlayer;
int lv_stat;
string lv_statType;
string lv_voiceLine;
string lv_sound;
string lv_soundWithSuffix;
unit lv_heroUnit;
bool lv_castByWheel;
string lv_mapID;
// Automatic Variable Declarations
// Variable Initialization
lv_yellingPlayer = EventPlayer();
lv_stat = -1;
lv_statType = "LootVoiceLineUsed";
lv_voiceLine = libGame_gv_players[lv_yellingPlayer].lv_lootContent.lv_loot_VoiceLine.lv_voiceLineID;
lv_heroUnit = EventPlayerEffectUsedUnit(c_effectUnitCaster);
lv_castByWheel = (EventPlayerEffectUsed() == "LootYellVoiceLineWheelDummy");
lv_mapID = libCore_gv_mAPMapStringID;
// Actions
if (!runActions) {
return true;
}
if ((lv_voiceLine == null)) {
if ((GameIsOnline() == false)) {
libGame_gf_HeroSelectionRandomlyPickVoiceLine(lv_yellingPlayer);
lv_voiceLine = libGame_gv_players[lv_yellingPlayer].lv_lootContent.lv_loot_VoiceLine.lv_voiceLineID;
}
else {
return true;
}
}
if ((CatalogEntryIsValid(c_gameCatalogVoiceLine, lv_voiceLine) == true) && (CatalogEntryIsDefault(c_gameCatalogVoiceOver, lv_voiceLine) == false)) {
lv_sound = libGame_gv_players[lv_yellingPlayer].lv_lootContent.lv_loot_VoiceLine.lv_voiceLineSoundID;
lv_soundWithSuffix = (((lv_sound) + libGame_gv_players[lv_yellingPlayer].lv_vOSoundSuffix));
}
else {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_B8FD6953"), false);
return true;
}
if ((CatalogEntryIsValid(c_gameCatalogSound, lv_sound) == true) && (CatalogEntryIsDefault(c_gameCatalogSound, lv_sound) == false)) {
if ((CatalogEntryIsValid(c_gameCatalogSound, lv_soundWithSuffix) == true) && (CatalogEntryIsDefault(c_gameCatalogSound, lv_soundWithSuffix) == false)) {
ActorSend(libNtve_gf_MainActorofUnit(lv_heroUnit), libNtve_gf_Create((libGame_gv_lootVoiceLineActor), (lv_soundWithSuffix)));
}
else {
ActorSend(libNtve_gf_MainActorofUnit(lv_heroUnit), libNtve_gf_Create((libGame_gv_lootVoiceLineActor), (lv_sound)));
}
}
else {
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_9DB45286"), false);
return true;
}
if ((lv_mapID == "")) {
lv_mapID = "None";
}
if ((GameIsOnline() == true)) {
StatEventCreate(lv_statType);
lv_stat = StatEventLastCreated();
StatEventAddDataString(lv_stat, "MapID", lv_mapID);
StatEventAddDataInt(lv_stat, "PlayerID", lv_yellingPlayer);
StatEventAddDataString(lv_stat, "PlayerHandle", PlayerHandle(lv_yellingPlayer));
StatEventAddDataString(lv_stat, "VoiceLineID", (lv_voiceLine));
StatEventAddDataString(lv_stat, "HeroID", (UnitGetType(lv_heroUnit)));
StatEventAddDataFixed(lv_stat, "XLoc", PointGetX(UnitGetPosition(lv_heroUnit)));
StatEventAddDataFixed(lv_stat, "YLoc", PointGetY(UnitGetPosition(lv_heroUnit)));
StatEventAddDataInt(lv_stat, "IsWheel", (lv_castByWheel));
StatEventSend(lv_stat);
if ((lv_castByWheel == true)) {
TelemetryEventSend(c_telemetryItemUsed, "VoiceLine", (lv_voiceLine), "Wheel");
}
else {
TelemetryEventSend(c_telemetryItemUsed, "VoiceLine", (lv_voiceLine), "Hotkey");
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_LootYellVoiceLine_Init () {
libGame_gt_LootYellVoiceLine = TriggerCreate("libGame_gt_LootYellVoiceLine_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_LootYellVoiceLine, c_playerAny, "LootYellVoiceLineDummy");
TriggerAddEventPlayerEffectUsed(libGame_gt_LootYellVoiceLine, c_playerAny, "LootYellVoiceLineWheelDummy");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Loot - Spray
//--------------------------------------------------------------------------------------------------
bool libGame_gt_LootSpray_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_sprayingPlayer;
int lv_stat;
string lv_statType;
unit lv_heroUnit;
point lv_point;
string lv_spray;
bool lv_castByWheel;
string lv_mapID;
actorscope lv_scope;
// Automatic Variable Declarations
// Variable Initialization
lv_sprayingPlayer = EventPlayer();
lv_stat = -1;
lv_statType = "LootSprayUsed";
lv_heroUnit = EventPlayerEffectUsedUnit(c_effectUnitCaster);
lv_point = UnitGetPosition(lv_heroUnit);
lv_spray = libGame_gv_players[lv_sprayingPlayer].lv_lootContent.lv_loot_Spray.lv_sprayID;
lv_castByWheel = (EventPlayerEffectUsed() == "LootSprayWheelDummy");
lv_mapID = libCore_gv_mAPMapStringID;
lv_scope = ActorScopeFromUnit(EventPlayerEffectUsedUnit(c_effectUnitCaster));
// Conditions
if (testConds) {
if (!((lv_spray != null))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
ActorScopeSend(lv_scope, "Signal LootSprayKill");
ActorSend(ActorFromScope(lv_scope, "::Main"), libNtve_gf_Create(libCore_gv_mountModelActor3, (libGame_gv_players[lv_sprayingPlayer].lv_lootContent.lv_loot_Spray.lv_sprayModelID)));
ActorSend(ActorFromScope(lv_scope, libCore_gv_mountModelActor3), libNtve_gf_SpraySet(lv_spray));
if ((lv_mapID == "")) {
lv_mapID = "None";
}
if ((GameIsOnline() == true)) {
StatEventCreate(lv_statType);
lv_stat = StatEventLastCreated();
StatEventAddDataString(lv_stat, "MapID", lv_mapID);
StatEventAddDataInt(lv_stat, "PlayerID", lv_sprayingPlayer);
StatEventAddDataString(lv_stat, "PlayerHandle", PlayerHandle(lv_sprayingPlayer));
StatEventAddDataString(lv_stat, "SprayID", (lv_spray));
StatEventAddDataString(lv_stat, "HeroID", (UnitGetType(lv_heroUnit)));
StatEventAddDataFixed(lv_stat, "XLoc", PointGetX(UnitGetPosition(lv_heroUnit)));
StatEventAddDataFixed(lv_stat, "YLoc", PointGetY(UnitGetPosition(lv_heroUnit)));
StatEventAddDataInt(lv_stat, "IsWheel", (lv_castByWheel));
StatEventSend(lv_stat);
if ((lv_castByWheel == true)) {
TelemetryEventSend(c_telemetryItemUsed, "Spray", (lv_spray), "Wheel");
}
else {
TelemetryEventSend(c_telemetryItemUsed, "Spray", (lv_spray), "Hotkey");
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_LootSpray_Init () {
libGame_gt_LootSpray = TriggerCreate("libGame_gt_LootSpray_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_LootSpray, c_playerAny, "LootSprayDummy");
TriggerAddEventPlayerEffectUsed(libGame_gt_LootSpray, c_playerAny, "LootSprayWheelDummy");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Minion - Spawn Cycle
//--------------------------------------------------------------------------------------------------
bool libGame_gt_MinionSpawnCycle_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_lane;
int lv_waveComposition;
timer lv_waveTimer;
bool lv_paused;
// Automatic Variable Declarations
int auto2740E61A_ae;
const int auto2740E61A_ai = 1;
// Variable Initialization
lv_waveTimer = TimerCreate();
// Actions
if (!runActions) {
return true;
}
while (true) {
if (((libGame_gv_gameOver == true) || (libCore_gv_sYSMinionAI == false))) {
return true;
}
TimerStart(lv_waveTimer, libCore_gv_bALMinionWaveInterval, false, c_timeGame);
if ((libGame_gv_minionSpawningEnabled == true)) {
libGame_gv_minionWaveSpawnCounter += 1;
auto2740E61A_ae = libGame_gv_laneCount;
lv_lane = 1;
for ( ; ( (auto2740E61A_ai >= 0 && lv_lane <= auto2740E61A_ae) || (auto2740E61A_ai < 0 && lv_lane >= auto2740E61A_ae) ) ; lv_lane += auto2740E61A_ai ) {
if ((libGame_gv_laneData[lv_lane].lv_minionSpawningEnabled == true)) {
if ((libGame_gv_minionSystemPausedAdvanced[libGame_gv_teamOrderIndex_C][lv_lane] == false)) {
lv_waveComposition = libGame_gf_MinionDetermineWaveComposition(lv_lane, libGame_gv_teamOrderIndex_C);
libGame_gf_MinionSpawnWave(lv_lane, libCore_gv_cOMPUTER_TeamOrder, lv_waveComposition);
}
if ((libGame_gv_minionSystemPausedAdvanced[libGame_gv_teamChaosIndex_C][lv_lane] == false)) {
lv_waveComposition = libGame_gf_MinionDetermineWaveComposition(lv_lane, libGame_gv_teamChaosIndex_C);
libGame_gf_MinionSpawnWave(lv_lane, libCore_gv_cOMPUTER_TeamChaos, lv_waveComposition);
}
Wait(0.1875, c_timeGame);
}
}
Wait((TimerGetRemaining(lv_waveTimer) - 0.0625
), c_timeGame);
}
else {
Wait(TimerGetRemaining(lv_waveTimer), c_timeGame);
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_MinionSpawnCycle_Init () {
libGame_gt_MinionSpawnCycle = TriggerCreate("libGame_gt_MinionSpawnCycle_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero - Moonwell Cooldown On/Off
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroMoonwellCooldownOnOff_Func (bool testConds, bool runActions) {
// Variable Declarations
fixed lv_heightOffset;
int lv_index;
int lv_itPlayerIndex;
bool lv_isHeroUnit;
// Automatic Variable Declarations
const int auto96169CAC_ae = libCore_gv_bALMaxPlayers;
const int auto96169CAC_ai = 1;
unitgroup auto449DA977_g;
int auto449DA977_u;
unit auto449DA977_var;
const int autoB121EEB1_ae = libGame_gv_moonwellMaxMoonwellCount;
int autoB121EEB1_var;
unitgroup auto6F618D62_g;
int auto6F618D62_u;
unit auto6F618D62_var;
unitgroup auto82B7B41C_g;
int auto82B7B41C_u;
unit auto82B7B41C_var;
// Variable Initialization
lv_heightOffset = 4.1;
// Actions
if (!runActions) {
return true;
}
lv_itPlayerIndex = 1;
for ( ; ( (auto96169CAC_ai >= 0 && lv_itPlayerIndex <= auto96169CAC_ae) || (auto96169CAC_ai < 0 && lv_itPlayerIndex >= auto96169CAC_ae) ) ; lv_itPlayerIndex += auto96169CAC_ai ) {
if ((EventUnit() == libGame_gv_players[lv_itPlayerIndex].lv_heroUnit)) {
lv_isHeroUnit = true;
break;
}
}
if (((UnitIsValid(EventUnit()) == false) || (lv_isHeroUnit == false))) {
return true;
}
UIFlyerHelperOverride(PlayerGroupAll(), libNtve_ge_FlyerHelperDisplay_c_flyerDisplayNone);
if ((EventUnitBehaviorChange() == c_unitBehaviorChangeActivate)) {
libGame_gv_moonwellMoonwellonCooldown[UnitGetOwner(EventUnit())] = true;
UIFlyerHelperOverride(PlayerGroupSingle(UnitGetOwner(EventUnit())), libNtve_ge_FlyerHelperDisplay_c_flyerDisplayAll);
if (((UnitGetOwner(EventUnit()) < 1) || (UnitGetOwner(EventUnit()) > libCore_gv_bALMaxPlayers))) {
TextExpressionSetToken("Param/Expression/lib_Game_8CA366B7", "A", IntToText(UnitGetOwner(EventUnit())));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_Game_8CA366B7"), true);
}
auto6F618D62_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("TownMoonwell", "TownMoonwellL2", "TownMoonwellL3", UnitGetOwner(EventUnit()), c_unitAllianceAlly, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto6F618D62_u = UnitGroupCount(auto6F618D62_g, c_unitCountAll);
for (;; auto6F618D62_u -= 1) {
auto6F618D62_var = UnitGroupUnitFromEnd(auto6F618D62_g, auto6F618D62_u);
if (auto6F618D62_var == null) { break; }
libNtve_gf_SendActorMessageToUnit(auto6F618D62_var, "Signal MoonwellDrink");
UnitGroupAdd(libGame_gv_moonwellTextTagsUnitGroup[UnitGetOwner(EventUnit())], auto6F618D62_var);
}
if (((libCore_gv_mAPMapStringID == "BattlefieldOfEternity") || (libCore_gv_mAPMapStringID == "Shrines")) && (libGame_gf_TeamNumberOfPlayer(lv_itPlayerIndex) == libGame_gv_teamChaosIndex_C)) {
lv_heightOffset = 2.5;
}
else if (((libCore_gv_mAPMapStringID == "BattlefieldOfEternity") || (libCore_gv_mAPMapStringID == "Shrines")) && (libGame_gf_TeamNumberOfPlayer(lv_itPlayerIndex) == libGame_gv_teamOrderIndex_C)) {
lv_heightOffset = 4.8;
}
else if (((libCore_gv_mAPMapStringID == "ControlPoints") || (libCore_gv_mAPMapStringID == "Crypts"))) {
lv_heightOffset = 3.0;
}
else if (((libCore_gv_mAPMapStringID == "Volskaya") || (libCore_gv_mAPMapStringID == "Warhead Junction") || (libCore_gv_mAPMapStringID == "TowersOfDoom") || (libCore_gv_mAPMapStringID == "DragonShire"))) {
lv_heightOffset = 4.0;
}
auto82B7B41C_g = libGame_gv_moonwellTextTagsUnitGroup[UnitGetOwner(EventUnit())];
auto82B7B41C_u = UnitGroupCount(auto82B7B41C_g, c_unitCountAll);
for (;; auto82B7B41C_u -= 1) {
auto82B7B41C_var = UnitGroupUnitFromEnd(auto82B7B41C_g, auto82B7B41C_u);
if (auto82B7B41C_var == null) { break; }
lv_index += 1;
TextTagCreate((StringExternal("Param/Value/lib_Game_3F1D7629") + FixedToText(UnitBehaviorDuration(auto82B7B41C_var, "HealingFountainCooldown"), 0)), 20, UnitGetPosition(auto82B7B41C_var), lv_heightOffset, false, false, PlayerGroupSingle(UnitGetOwner(EventUnit())));
libGame_gv_moonwellTextTags[UnitGetOwner(EventUnit())][lv_index] = TextTagLastCreated();
libGame_gv_moonwellTextTagsUnit[UnitGetOwner(EventUnit())][lv_index] = auto82B7B41C_var;
}
}
else {
if ((EventUnitBehaviorChange() == c_unitBehaviorChangeDeactivate)) {
libGame_gv_moonwellMoonwellonCooldown[UnitGetOwner(EventUnit())] = false;
UIFlyerHelperOverride(PlayerGroupSingle(UnitGetOwner(EventUnit())), libNtve_ge_FlyerHelperDisplay_c_flyerDisplayAll);
auto449DA977_g = libGame_gv_moonwellTextTagsUnitGroup[UnitGetOwner(EventUnit())];
auto449DA977_u = UnitGroupCount(auto449DA977_g, c_unitCountAll);
for (;; auto449DA977_u -= 1) {
auto449DA977_var = UnitGroupUnitFromEnd(auto449DA977_g, auto449DA977_u);
if (auto449DA977_var == null) { break; }
libNtve_gf_SendActorMessageToUnit(auto449DA977_var, "Signal MoonwellReset");
UnitGroupRemove(libGame_gv_moonwellTextTagsUnitGroup[UnitGetOwner(EventUnit())], auto449DA977_var);
}
autoB121EEB1_var = 1;
for ( ; autoB121EEB1_var <= autoB121EEB1_ae; autoB121EEB1_var += 1 ) {
libGame_gv_moonwellTextTagsUnit[UnitGetOwner(EventUnit())][autoB121EEB1_var] = null;
TextTagDestroy(libGame_gv_moonwellTextTags[UnitGetOwner(EventUnit())][autoB121EEB1_var]);
libGame_gv_moonwellTextTags[UnitGetOwner(EventUnit())][autoB121EEB1_var] = c_textTagNone;
}
}
}
Wait(0.0625, c_timeGame);
UIFlyerHelperClearOverride(PlayerGroupAll());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroMoonwellCooldownOnOff_Init () {
libGame_gt_HeroMoonwellCooldownOnOff = TriggerCreate("libGame_gt_HeroMoonwellCooldownOnOff_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_HeroMoonwellCooldownOnOff, null, "HealingFountainCooldown", c_unitBehaviorChangeAny);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero - Moonwell Duration Text Tag Updates
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroMoonwellDurationTextTagUpdates_Func (bool testConds, bool runActions) {
// Variable Declarations
bool lv_notTutorial;
int lv_textTag;
int lv_itPlayer;
text lv_helpLabel;
int lv_team;
// Automatic Variable Declarations
const int autoCA847D3A_ae = libCore_gv_bALMaxPlayers;
const int autoCA847D3A_ai = 1;
const int auto67CB488E_ae = libGame_gv_moonwellMaxMoonwellCount;
int auto67CB488E_var;
// Variable Initialization
lv_textTag = c_textTagNone;
// Actions
if (!runActions) {
return true;
}
if (((libCore_gv_sYSGameMode == libCore_ge_GameModes_Normal) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_ArenaMode) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_AttackDefend) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_ModeC) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_Sandbox))) {
lv_notTutorial = true;
}
else {
lv_notTutorial = false;
}
lv_itPlayer = 1;
for ( ; ( (autoCA847D3A_ai >= 0 && lv_itPlayer <= autoCA847D3A_ae) || (autoCA847D3A_ai < 0 && lv_itPlayer >= autoCA847D3A_ae) ) ; lv_itPlayer += autoCA847D3A_ai ) {
lv_team = libGame_gf_TeamNumberOfPlayer(lv_itPlayer);
if ((libGame_gv_moonwellMoonwellonCooldown[lv_itPlayer] == true)) {
auto67CB488E_var = 1;
for ( ; auto67CB488E_var <= auto67CB488E_ae; auto67CB488E_var += 1 ) {
lv_textTag = libGame_gv_moonwellTextTags[lv_itPlayer][auto67CB488E_var];
if ((UnitIsAlive(libGame_gv_moonwellTextTagsUnit[lv_itPlayer][auto67CB488E_var]) == true)) {
TextTagShow(lv_textTag, PlayerGroupSingle(lv_itPlayer), true);
TextTagSetText(lv_textTag, (StringExternal("Param/Value/lib_Game_79F06999") + FixedToText(UnitBehaviorDuration(libGame_gv_players[lv_itPlayer].lv_heroUnit, "HealingFountainCooldown"), 0)));
}
else if ((lv_textTag != c_textTagNone)) {
TextTagDestroy(lv_textTag);
libGame_gv_moonwellTextTags[lv_itPlayer][auto67CB488E_var] = c_textTagNone;
}
}
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroMoonwellDurationTextTagUpdates_Init () {
libGame_gt_HeroMoonwellDurationTextTagUpdates = TriggerCreate("libGame_gt_HeroMoonwellDurationTextTagUpdates_Func");
TriggerAddEventTimePeriodic(libGame_gt_HeroMoonwellDurationTextTagUpdates, 1.0, c_timeGame);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Town - Town Hall Killed Moonwell Search
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TownTownHallKilledMoonwellSearch_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_i;
int lv_moonwells;
unit lv_dyingStructureUnit;
int lv_structureType;
int lv_townIndex;
int lv_structureIndex;
unit lv_structure;
// Automatic Variable Declarations
int autoF80B0BD0_ae;
const int autoF80B0BD0_ai = 1;
unitgroup auto82B2BCD2_g;
int auto82B2BCD2_u;
unit auto82B2BCD2_var;
// Variable Initialization
lv_dyingStructureUnit = EventUnit();
lv_structureType = libGame_gf_TownGetTownStructurePresetFromUnit(lv_dyingStructureUnit);
// Conditions
if (testConds) {
if (!((lv_structureType == libGame_ge_TownStructureTypes_TownHall))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_townIndex = libGame_gf_TownGetTownForUnit(lv_dyingStructureUnit);
autoF80B0BD0_ae = libGame_gv_townTownData[lv_townIndex].lv_structureCount;
lv_structureIndex = 1;
for ( ; ( (autoF80B0BD0_ai >= 0 && lv_structureIndex <= autoF80B0BD0_ae) || (autoF80B0BD0_ai < 0 && lv_structureIndex >= autoF80B0BD0_ae) ) ; lv_structureIndex += autoF80B0BD0_ai ) {
lv_structure = libGame_gv_townTownData[lv_townIndex].lv_structureUnits[lv_structureIndex];
if ((UnitIsAlive(lv_structure) == true) && ((libGame_gf_TownGetTownStructurePresetFromUnit(lv_structure) == libGame_ge_TownStructureTypes_Moonwell) || (libGame_gf_TownGetTownStructurePresetFromUnit(lv_structure) == libGame_ge_TownStructureTypes_Moonwell)) && (UnitBehaviorCount(lv_structure, "HealingFountainIgnoreLinkedMinimapIcons") == 0)) {
UnitKill(lv_structure);
}
}
if ((UnitGroupCount(UnitGroup("TownTownHallL2", UnitGetOwner(lv_dyingStructureUnit), RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) == 0) && (UnitGroupCount(UnitGroup("TownTownHallL3", UnitGetOwner(lv_dyingStructureUnit), RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) == 0)) {
auto82B2BCD2_g = UnitGroup("TownMoonwellL3", libGame_gf_ComputerPlayerInTeam(libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lv_dyingStructureUnit))), RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto82B2BCD2_u = UnitGroupCount(auto82B2BCD2_g, c_unitCountAll);
for (;; auto82B2BCD2_u -= 1) {
auto82B2BCD2_var = UnitGroupUnitFromEnd(auto82B2BCD2_g, auto82B2BCD2_u);
if (auto82B2BCD2_var == null) { break; }
if ((UnitBehaviorCount(auto82B2BCD2_var, "HealingFountainIgnoreLinkedMinimapIcons") == 1)) {
UnitKill(auto82B2BCD2_var);
}
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TownTownHallKilledMoonwellSearch_Init () {
libGame_gt_TownTownHallKilledMoonwellSearch = TriggerCreate("libGame_gt_TownTownHallKilledMoonwellSearch_Func");
TriggerAddEventUnitDied(libGame_gt_TownTownHallKilledMoonwellSearch, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero - Mount
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroMount_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_mountingUnit;
int lv_mountingPlayer;
string lv_mountingUnitType;
actor lv_heroActor;
int lv_heroIndex;
int lv_mountIndex;
string lv_poseAnimGroup;
string lv_poseAnimGroupStatus;
fixed lv_mountScale;
fixed lv_mountWalkAnimMoveSpeed;
string lv_mountModel;
string lv_actorNameForMount;
actor lv_mountActor;
// Automatic Variable Declarations
playergroup autoC797729B_g;
int autoC797729B_var;
// Variable Initialization
lv_mountingUnit = EventUnit();
lv_mountingPlayer = UnitGetOwner(lv_mountingUnit);
lv_mountingUnitType = UnitGetType(lv_mountingUnit);
lv_heroActor = libNtve_gf_MainActorofUnit(lv_mountingUnit);
lv_heroIndex = lv_mountingPlayer;
lv_poseAnimGroup = "";
lv_poseAnimGroupStatus = "";
lv_actorNameForMount = "MountModel";
// Conditions
if (testConds) {
if (!((UnitHasBehavior2(lv_mountingUnit, "Mounted") == true))) {
return false;
}
if (!((UnitGetOwner(lv_mountingUnit) > 0))) {
return false;
}
if (!((UnitGetOwner(lv_mountingUnit) <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((UnitHasBehavior2(lv_mountingUnit, "UltimateEvolutionTimedLife") == true)) {
autoC797729B_g = libGame_gf_AlliedPlayerGroupOfPlayer(lv_mountingPlayer);
autoC797729B_var = -1;
while (true) {
autoC797729B_var = PlayerGroupNextPlayer(autoC797729B_g, autoC797729B_var);
if (autoC797729B_var<0) { break; }
if ((lv_mountingUnitType == UnitGetType(libGame_gv_players[autoC797729B_var].lv_heroUnit))) {
lv_mountIndex = autoC797729B_var;
break;
}
}
}
else {
lv_mountIndex = lv_mountingPlayer;
}
lv_poseAnimGroup = libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountPoseAnimGroup;
lv_poseAnimGroupStatus = libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountPoseAnimGroupStatus;
lv_mountScale = libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountModelScale;
lv_mountWalkAnimMoveSpeed = libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountModelWalkAnimMoveSpeed;
if ((UnitHasBehavior2(lv_mountingUnit, "SiegeMode") == true)) {
UnitCreateEffectUnit(lv_mountingUnit, "SiegeModeRemoveSet", lv_mountingUnit);
}
ActorSend(lv_heroActor, (("StatusSet " + lv_poseAnimGroupStatus + " 1")));
lv_actorNameForMount = libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountActor;
if ((UnitHasBehavior2(lv_mountingUnit, "IsMorphMounted") == true)) {
lv_actorNameForMount = libGame_gv_morphMountModelActor;
}
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_noAttachedMountModel == false)) {
ActorSend(lv_heroActor, "PhysicsTerminate");
lv_mountModel = libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountModel;
ActorSend(lv_heroActor, libNtve_gf_Create(lv_actorNameForMount, (lv_mountModel)));
lv_mountActor = ActorFromActor(lv_heroActor, lv_actorNameForMount);
libCore_gf_SendMountActorMessagesToActor(lv_mountIndex, lv_mountActor);
if ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_isFlyer == true)) {
ActorSend(lv_mountActor, libNtve_gf_RefSet("::Host", "FlyerBillboard"));
}
ActorSend(lv_mountActor, libNtve_gf_SetScaleAbsolute(lv_mountScale, lv_mountScale, lv_mountScale, 0.0));
ActorSend(lv_heroActor, (("AnimGroupApply " + lv_poseAnimGroup + " {} {} Instant")));
if (((lv_poseAnimGroup == "Ridebike") || (lv_poseAnimGroup == "Ridenone"))) {
UnitBehaviorAdd(lv_mountingUnit, "HideHandAttachmentsWhileMounted", lv_mountingUnit, 1);
}
ActorSend(lv_heroActor, libNtve_gf_RefSet("::Host", lv_actorNameForMount));
ActorSend(lv_heroActor, libNtve_gf_HostSiteOpsSet("::Host", "SOpAttachMount", 0, 0));
ActorSend(lv_heroActor, libNtve_gf_RefSet("::HostForProps", "PropsHost"));
ActorSend(lv_mountActor, libNtve_gf_RefSet("::HostForProps", (lv_mountingUnitType)));
}
else {
ActorSend(lv_heroActor, (("AnimGroupApply " + lv_poseAnimGroup)));
}
ActorSend(lv_heroActor, libNtve_gf_SetWalkAnimMoveSpeed(lv_mountWalkAnimMoveSpeed));
ActorSend(lv_mountActor, libNtve_gf_Signal("MountSound"));
ActorSend(lv_heroActor, libNtve_gf_Create((libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountUpFXActor), ""));
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountSound != "")) {
ActorSend(lv_heroActor, libNtve_gf_Create("MountDismountSound", (libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountSound)));
}
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_loopingSound != "")) {
ActorSend(lv_heroActor, libNtve_gf_Create("MountLoopingSound", (libGame_gv_players[lv_mountIndex].lv_mountData.lv_loopingSound)));
}
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_stationarySound != "")) {
ActorSend(lv_heroActor, libNtve_gf_Create("MountStationarySound", (libGame_gv_players[lv_mountIndex].lv_mountData.lv_stationarySound)));
}
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_movingSound != "")) {
ActorSend(lv_heroActor, libNtve_gf_Create("MountMovingSound", (libGame_gv_players[lv_mountIndex].lv_mountData.lv_movingSound)));
}
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_moveStartSound != "")) {
CatalogLinkReplace(lv_mountingPlayer, c_gameCatalogSound, "GenericMountMoveStartSound", (libGame_gv_players[lv_mountIndex].lv_mountData.lv_moveStartSound));
}
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_moveStopSound != "")) {
CatalogLinkReplace(lv_mountingPlayer, c_gameCatalogSound, "GenericMountMoveStopSound", (libGame_gv_players[lv_mountIndex].lv_mountData.lv_moveStopSound));
}
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_turboSound != "")) {
CatalogLinkReplace(lv_mountingPlayer, c_gameCatalogSound, "GenericMountTurboSound", (libGame_gv_players[lv_mountIndex].lv_mountData.lv_turboSound));
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroMount_Init () {
libGame_gt_HeroMount = TriggerCreate("libGame_gt_HeroMount_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_HeroMount, null, "Mounted", c_unitBehaviorChangeActivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero - Dismount
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDismount_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_dismountingUnit;
int lv_dismountingPlayer;
int lv_heroIndex;
actor lv_heroActor;
int lv_mountIndex;
fixed lv_heroWalkAnimMoveSpeed;
string lv_poseAnimGroup;
string lv_poseAnimGroupStatus;
string lv_mountActorName;
// Automatic Variable Declarations
playergroup autoE3784089_g;
int autoE3784089_var;
// Variable Initialization
lv_dismountingUnit = EventUnit();
lv_dismountingPlayer = UnitGetOwner(lv_dismountingUnit);
lv_heroIndex = libCore_gf_GetHeroIndexForUnitType(UnitGetType(lv_dismountingUnit));
lv_heroActor = libNtve_gf_MainActorofUnit(lv_dismountingUnit);
lv_poseAnimGroup = "";
lv_poseAnimGroupStatus = "";
lv_mountActorName = "MountModel";
// Conditions
if (testConds) {
if (!((lv_dismountingPlayer <= libCore_gv_bALMaxEnginePlayerCount))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((UnitHasBehavior2(lv_dismountingUnit, "UltimateEvolutionTimedLife") == true)) {
autoE3784089_g = libGame_gf_AlliedPlayerGroupOfPlayer(lv_dismountingPlayer);
autoE3784089_var = -1;
while (true) {
autoE3784089_var = PlayerGroupNextPlayer(autoE3784089_g, autoE3784089_var);
if (autoE3784089_var<0) { break; }
if ((UnitGetType(lv_dismountingUnit) == UnitGetType(libGame_gv_players[autoE3784089_var].lv_heroUnit))) {
lv_mountIndex = autoE3784089_var;
break;
}
}
}
else {
lv_mountIndex = lv_dismountingPlayer;
}
lv_heroWalkAnimMoveSpeed = CatalogFieldValueGetAsFixed(c_gameCatalogActor, UnitGetType(lv_dismountingUnit), "WalkAnimMoveSpeed", lv_dismountingPlayer);
lv_poseAnimGroup = libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountPoseAnimGroup;
lv_poseAnimGroupStatus = libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountPoseAnimGroup;
lv_mountActorName = libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountActor;
ActorSend(lv_heroActor, (("StatusSet " + lv_poseAnimGroupStatus + " 0")));
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_isMorphMount == true)) {
lv_mountActorName = libGame_gv_morphMountModelActor;
}
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_noAttachedMountModel == false)) {
ActorSend(lv_heroActor, (("AnimBlendTimeApply 0")));
ActorSend(lv_heroActor, (("AnimGroupRemove " + lv_poseAnimGroup + " Instant")));
ActorSend(lv_heroActor, (("AnimBlendTimeApply")));
ActorSend(ActorFromScope(ActorScopeFromUnit(EventUnit()), lv_mountActorName), libNtve_gf_Destroy());
}
else {
ActorSend(lv_heroActor, (("AnimGroupRemove " + lv_poseAnimGroup)));
}
ActorSend(lv_heroActor, libNtve_gf_SetWalkAnimMoveSpeed(lv_heroWalkAnimMoveSpeed));
if ((UnitIsAlive(lv_dismountingUnit) == true)) {
ActorSend(lv_heroActor, libNtve_gf_Create((libGame_gv_players[lv_mountIndex].lv_mountData.lv_dismountFXActor), ""));
}
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_dismountSound != "")) {
ActorSend(lv_heroActor, libNtve_gf_Create("MountDismountSound", (libGame_gv_players[lv_mountIndex].lv_mountData.lv_dismountSound)));
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDismount_Init () {
libGame_gt_HeroDismount = TriggerCreate("libGame_gt_HeroDismount_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_HeroDismount, null, "Mounted", c_unitBehaviorChangeDeactivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero - Dismount On Cheer Dance Taunt Used
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDismountOnCheerDanceTauntUsed_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_triggeringUnit;
// Automatic Variable Declarations
// Variable Initialization
lv_triggeringUnit = EventUnit();
// Conditions
if (testConds) {
if (!((UnitHasBehavior2(lv_triggeringUnit, "Mounted") == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
UnitCreateEffectUnit(lv_triggeringUnit, "DismountCasterSet", lv_triggeringUnit);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDismountOnCheerDanceTauntUsed_Init () {
libGame_gt_HeroDismountOnCheerDanceTauntUsed = TriggerCreate("libGame_gt_HeroDismountOnCheerDanceTauntUsed_Func");
TriggerAddEventUnitAbility(libGame_gt_HeroDismountOnCheerDanceTauntUsed, null, AbilityCommand("HoldFire", 2), c_unitAbilStageExecute, false);
TriggerAddEventUnitAbility(libGame_gt_HeroDismountOnCheerDanceTauntUsed, null, AbilityCommand("HoldFire", 3), c_unitAbilStageExecute, false);
TriggerAddEventUnitAbility(libGame_gt_HeroDismountOnCheerDanceTauntUsed, null, AbilityCommand("HoldFire", 4), c_unitAbilStageExecute, false);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Apply Engine Interaction Behaviors
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ApplyEngineInteractionBehaviors_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
unit lv_unit;
// Automatic Variable Declarations
// Variable Initialization
lv_player = EventPlayer();
lv_unit = libGame_gv_players[lv_player].lv_heroUnit;
// Conditions
if (testConds) {
if (!(((PlayerMount(lv_player) == "MountTrainEngineToys19") || (PlayerMount(lv_player) == "MountTrainEngineToys19Var1") || (PlayerMount(lv_player) == "MountTrainEngineToys19Var2") || (PlayerMount(lv_player) == "MountTrainEngineToys19Var3") || (PlayerMount(lv_player) == "MountTrainEngineToys19Var4") || (PlayerMount(lv_player) == "MountTrainEngineToys19Var5")))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gv_playerIsEngine[lv_player] = true;
if ((PlayerMount(lv_player) == "MountTrainEngineToys19")) {
UnitBehaviorAdd(lv_unit, "IsEngineVar0", lv_unit, 1);
}
if ((PlayerMount(lv_player) == "MountTrainEngineToys19Var1")) {
UnitBehaviorAdd(lv_unit, "IsEngineVar1", lv_unit, 1);
}
if ((PlayerMount(lv_player) == "MountTrainEngineToys19Var2")) {
UnitBehaviorAdd(lv_unit, "IsEngineVar2", lv_unit, 1);
}
if ((PlayerMount(lv_player) == "MountTrainEngineToys19Var3")) {
UnitBehaviorAdd(lv_unit, "IsEngineVar3", lv_unit, 1);
}
if ((PlayerMount(lv_player) == "MountTrainEngineToys19Var4")) {
UnitBehaviorAdd(lv_unit, "IsEngineVar4", lv_unit, 1);
}
if ((PlayerMount(lv_player) == "MountTrainEngineToys19Var5")) {
UnitBehaviorAdd(lv_unit, "IsEngineVar5", lv_unit, 1);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ApplyEngineInteractionBehaviors_Init () {
libGame_gt_ApplyEngineInteractionBehaviors = TriggerCreate("libGame_gt_ApplyEngineInteractionBehaviors_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_ApplyEngineInteractionBehaviors, null, "Mounted", c_unitBehaviorChangeActivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Remove Engine Interaction Behaviors
//--------------------------------------------------------------------------------------------------
bool libGame_gt_RemoveEngineInteractionBehaviors_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_unit;
int lv_player;
int lv_int;
// Automatic Variable Declarations
const int autoB621CB98_ae = 10;
const int autoB621CB98_ai = 1;
// Variable Initialization
lv_unit = EventUnit();
lv_player = UnitGetOwner(lv_unit);
// Actions
if (!runActions) {
return true;
}
if ((libGame_gv_playerIsEngine[lv_player] == true)) {
libGame_gv_playerIsEngine[lv_player] = false;
libGame_gv_choochooSize[lv_player] = 0;
libGame_gv_cabooseEngineOwner[lv_player] = 0;
lv_int = 1;
for ( ; ( (autoB621CB98_ai >= 0 && lv_int <= autoB621CB98_ae) || (autoB621CB98_ai < 0 && lv_int >= autoB621CB98_ae) ) ; lv_int += autoB621CB98_ai ) {
libGame_gv_choochooTrains[lv_player][lv_int] = null;
}
}
UnitBehaviorRemove(lv_unit, "IsEngineVar0", 1);
UnitBehaviorRemove(lv_unit, "IsEngineVar1", 1);
UnitBehaviorRemove(lv_unit, "IsEngineVar2", 1);
UnitBehaviorRemove(lv_unit, "IsEngineVar3", 1);
UnitBehaviorRemove(lv_unit, "IsEngineVar4", 1);
UnitBehaviorRemove(lv_unit, "IsEngineVar5", 1);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_RemoveEngineInteractionBehaviors_Init () {
libGame_gt_RemoveEngineInteractionBehaviors = TriggerCreate("libGame_gt_RemoveEngineInteractionBehaviors_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_RemoveEngineInteractionBehaviors, null, "Mounted", c_unitBehaviorChangeDeactivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Mount Caboose
//--------------------------------------------------------------------------------------------------
bool libGame_gt_MountCaboose_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_mountingUnit;
int lv_mountingPlayer;
string lv_mountingUnitType;
actor lv_heroActor;
int lv_heroIndex;
int lv_mountIndex;
string lv_poseAnimGroup;
string lv_poseAnimGroupStatus;
fixed lv_mountScale;
fixed lv_mountWalkAnimMoveSpeed;
string lv_mountModel;
string lv_actorNameForMount;
actor lv_mountActor;
// Automatic Variable Declarations
playergroup auto34FCCFC4_g;
int auto34FCCFC4_var;
// Variable Initialization
lv_mountingUnit = EventUnit();
lv_mountingPlayer = UnitGetOwner(lv_mountingUnit);
lv_mountingUnitType = UnitGetType(lv_mountingUnit);
lv_heroActor = libNtve_gf_MainActorofUnit(lv_mountingUnit);
lv_heroIndex = lv_mountingPlayer;
lv_poseAnimGroup = "";
lv_poseAnimGroupStatus = "";
lv_mountModel = "MountTrainCartToys19";
lv_actorNameForMount = "MountCabooseActor";
// Conditions
if (testConds) {
if (!((UnitHasBehavior2(lv_mountingUnit, "MountCaboose") == true))) {
return false;
}
if (!((UnitGetOwner(lv_mountingUnit) > 0))) {
return false;
}
if (!((UnitGetOwner(lv_mountingUnit) <= libCore_gv_bALMaxPlayers))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((UnitHasBehavior2(lv_mountingUnit, "UltimateEvolutionTimedLife") == true)) {
auto34FCCFC4_g = libGame_gf_AlliedPlayerGroupOfPlayer(lv_mountingPlayer);
auto34FCCFC4_var = -1;
while (true) {
auto34FCCFC4_var = PlayerGroupNextPlayer(auto34FCCFC4_g, auto34FCCFC4_var);
if (auto34FCCFC4_var<0) { break; }
if ((UnitGetType(lv_mountingUnit) == UnitGetType(libGame_gv_players[auto34FCCFC4_var].lv_heroUnit))) {
lv_mountIndex = auto34FCCFC4_var;
break;
}
}
}
else {
lv_mountIndex = lv_mountingPlayer;
}
lv_mountIndex = lv_mountingPlayer;
lv_poseAnimGroup = "Ridebeast";
lv_poseAnimGroupStatus = "Ridebeast";
lv_mountScale = 1.0;
lv_mountWalkAnimMoveSpeed = 5.72;
if ((UnitHasBehavior2(lv_mountingUnit, "SiegeMode") == true)) {
UnitCreateEffectUnit(lv_mountingUnit, "SiegeModeRemoveSet", lv_mountingUnit);
}
ActorSend(lv_heroActor, (("StatusSet " + lv_poseAnimGroupStatus + " 1")));
lv_actorNameForMount = libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountActor;
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_noAttachedMountModel == false)) {
ActorSend(lv_heroActor, "PhysicsTerminate");
lv_mountModel = "MountTrainCartToys19";
ActorSend(lv_heroActor, libNtve_gf_Create(lv_actorNameForMount, (lv_mountModel)));
lv_mountActor = ActorFromActor(lv_heroActor, lv_actorNameForMount);
libCore_gf_SendMountActorMessagesToActor(lv_mountIndex, lv_mountActor);
if ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_isFlyer == true)) {
ActorSend(lv_mountActor, libNtve_gf_RefSet("::Host", "FlyerBillboard"));
}
if ((UnitHasBehavior2(lv_mountingUnit, "CabooseVar0") == true)) {
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Diff"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Emis"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Spec"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Norm"));
}
if ((UnitHasBehavior2(lv_mountingUnit, "CabooseVar1") == true)) {
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var1_Diff"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var1_Emis"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var1_Spec"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Norm"));
}
if ((UnitHasBehavior2(lv_mountingUnit, "CabooseVar2") == true)) {
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var2_Diff"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var2_Emis"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var2_Spec"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Norm"));
}
if ((UnitHasBehavior2(lv_mountingUnit, "CabooseVar3") == true)) {
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var3_Diff"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var3_Emis"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var3_Spec"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Norm"));
}
if ((UnitHasBehavior2(lv_mountingUnit, "CabooseVar4") == true)) {
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var4_Diff"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var4_Emis"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var4_Spec"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Norm"));
}
if ((UnitHasBehavior2(lv_mountingUnit, "CabooseVar5") == true)) {
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var5_Diff"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var5_Emis"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Var5_Spec"));
ActorSend(lv_mountActor, libNtve_gf_TextureSelectByID("Storm_Mount_TrainCart_Toys19_Norm"));
}
ActorSend(lv_mountActor, libNtve_gf_SetScaleAbsolute(lv_mountScale, lv_mountScale, lv_mountScale, 0.0));
ActorSend(lv_heroActor, (("AnimGroupApply " + lv_poseAnimGroup + " {} {} Instant")));
ActorSend(lv_heroActor, libNtve_gf_RefSet("::Host", lv_actorNameForMount));
ActorSend(lv_heroActor, libNtve_gf_HostSiteOpsSet("::Host", "SOpAttachMount", 0, 0));
if ((libGame_gv_players[lv_mountingPlayer].lv_mountData.lv_mountID == "MechaTassadarMorphForm")) {
ActorSend(lv_mountActor, libNtve_gf_HostSiteOpsSet("::Host", "SOpBasicScopeFollow", 0, 0));
}
ActorSend(lv_heroActor, libNtve_gf_RefSet("::HostForProps", "PropsHost"));
ActorSend(lv_mountActor, libNtve_gf_RefSet("::HostForProps", (lv_mountingUnitType)));
}
else {
ActorSend(lv_heroActor, (("AnimGroupApply " + lv_poseAnimGroup)));
}
ActorSend(lv_heroActor, libNtve_gf_SetWalkAnimMoveSpeed(lv_mountWalkAnimMoveSpeed));
ActorSend(lv_mountActor, libNtve_gf_Signal("MountSound"));
ActorSend(lv_heroActor, libNtve_gf_Create((libGame_gv_players[lv_mountIndex].lv_mountData.lv_mountUpFXActor), ""));
ActorSend(lv_heroActor, libNtve_gf_Create("MountDismountSound", ("Mount_Generic_Player_Activate_End")));
ActorSend(lv_heroActor, libNtve_gf_Create("MountLoopingSound", ("Mount_TrainCartToys19_Idle")));
ActorSend(lv_heroActor, libNtve_gf_Create("MountStationarySound", ("Mount_TrainCartToys19_Idle_ChooChoo")));
ActorSend(lv_heroActor, libNtve_gf_Create("MountMovingSound", ("Mount_TrainCartToys19_Ride")));
CatalogLinkReplace(lv_mountingPlayer, c_gameCatalogSound, "GenericMountMoveStartSound", ("Mount_TrainCartToys19_Start"));
CatalogLinkReplace(lv_mountingPlayer, c_gameCatalogSound, "GenericMountMoveStopSound", ("Mount_TrainCartToys19_Stop"));
CatalogLinkReplace(lv_mountingPlayer, c_gameCatalogSound, "GenericMountTurboSound", ("StormNoSound"));
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_MountCaboose_Init () {
libGame_gt_MountCaboose = TriggerCreate("libGame_gt_MountCaboose_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_MountCaboose, null, "MountCaboose", c_unitBehaviorChangeActivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Dismount Caboose
//--------------------------------------------------------------------------------------------------
bool libGame_gt_DismountCaboose_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_dismountingUnit;
int lv_dismountingPlayer;
int lv_heroIndex;
actor lv_heroActor;
int lv_mountIndex;
fixed lv_heroWalkAnimMoveSpeed;
string lv_poseAnimGroup;
string lv_poseAnimGroupStatus;
string lv_mountModel;
string lv_mountActorName;
// Automatic Variable Declarations
playergroup auto736967E5_g;
int auto736967E5_var;
// Variable Initialization
lv_dismountingUnit = EventUnit();
lv_dismountingPlayer = UnitGetOwner(lv_dismountingUnit);
lv_heroIndex = libCore_gf_GetHeroIndexForUnitType(UnitGetType(lv_dismountingUnit));
lv_heroActor = libNtve_gf_MainActorofUnit(lv_dismountingUnit);
lv_poseAnimGroup = "";
lv_poseAnimGroupStatus = "";
lv_mountModel = "MountTrainCartToys19";
lv_mountActorName = "MountCabooseActor";
// Conditions
if (testConds) {
if (!((lv_dismountingPlayer <= libCore_gv_bALMaxEnginePlayerCount))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
UnitCreateEffectUnit(lv_dismountingUnit, "ToyTrainFollowAbilityRemove", lv_dismountingUnit);
UnitBehaviorRemove(lv_dismountingUnit, "CabooseVar0", 1);
UnitBehaviorRemove(lv_dismountingUnit, "CabooseVar1", 1);
UnitBehaviorRemove(lv_dismountingUnit, "CabooseVar2", 1);
UnitBehaviorRemove(lv_dismountingUnit, "CabooseVar3", 1);
UnitBehaviorRemove(lv_dismountingUnit, "CabooseVar4", 1);
UnitBehaviorRemove(lv_dismountingUnit, "CabooseVar5", 1);
if ((UnitHasBehavior2(lv_dismountingUnit, "UltimateEvolutionTimedLife") == true)) {
auto736967E5_g = libGame_gf_AlliedPlayerGroupOfPlayer(lv_dismountingPlayer);
auto736967E5_var = -1;
while (true) {
auto736967E5_var = PlayerGroupNextPlayer(auto736967E5_g, auto736967E5_var);
if (auto736967E5_var<0) { break; }
if ((UnitGetType(lv_dismountingUnit) == UnitGetType(libGame_gv_players[auto736967E5_var].lv_heroUnit))) {
lv_mountIndex = auto736967E5_var;
break;
}
}
}
else {
lv_mountIndex = lv_dismountingPlayer;
}
lv_heroWalkAnimMoveSpeed = CatalogFieldValueGetAsFixed(c_gameCatalogActor, UnitGetType(lv_dismountingUnit), "WalkAnimMoveSpeed", lv_dismountingPlayer);
lv_poseAnimGroup = "Ridebeast";
lv_poseAnimGroupStatus = "Ridebeast";
lv_mountActorName = "MountCabooseActor";
ActorSend(lv_heroActor, (("StatusSet " + lv_poseAnimGroupStatus + " 0")));
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_isMorphMount == true)) {
lv_mountActorName = "MountCabooseActor";
}
if ((libGame_gv_players[lv_mountIndex].lv_mountData.lv_noAttachedMountModel == false)) {
ActorSend(lv_heroActor, (("AnimBlendTimeApply 0")));
ActorSend(lv_heroActor, (("AnimGroupRemove " + lv_poseAnimGroup + " Instant")));
ActorSend(lv_heroActor, (("AnimBlendTimeApply")));
ActorSend(ActorFromScope(ActorScopeFromUnit(EventUnit()), "MountModel"), libNtve_gf_Destroy());
}
else {
ActorSend(lv_heroActor, (("AnimGroupRemove " + lv_poseAnimGroup)));
}
ActorSend(lv_heroActor, libNtve_gf_SetWalkAnimMoveSpeed(lv_heroWalkAnimMoveSpeed));
if ((UnitIsAlive(lv_dismountingUnit) == true)) {
ActorSend(lv_heroActor, libNtve_gf_Create((libGame_gv_players[lv_mountIndex].lv_mountData.lv_dismountFXActor), ""));
}
ActorSend(lv_heroActor, libNtve_gf_Create("MountDismountSound", ("Mount_TrainCartToys19_Dismiss")));
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_DismountCaboose_Init () {
libGame_gt_DismountCaboose = TriggerCreate("libGame_gt_DismountCaboose_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_DismountCaboose, null, "MountCaboose", c_unitBehaviorChangeDeactivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Caboose Follow Logic
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CabooseFollowLogic_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_cabooseUnit;
unit lv_engineUnit;
int lv_cabooseOwner;
int lv_engine;
// Automatic Variable Declarations
// Variable Initialization
lv_cabooseUnit = EventPlayerEffectUsedUnit(c_effectUnitCaster);
lv_engineUnit = EventPlayerEffectUsedUnit(c_effectUnitTarget);
lv_cabooseOwner = UnitGetOwner(lv_cabooseUnit);
lv_engine = UnitGetOwner(lv_engineUnit);
// Conditions
if (testConds) {
if (!((UnitHasBehavior2(lv_cabooseUnit, "MountCaboose") == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
UnitBehaviorAdd(lv_cabooseUnit, "ToyTrainFollowAbility", lv_cabooseUnit, 1);
libGame_gv_cabooseEngineOwner[lv_cabooseOwner] = lv_engine;
if ((libGame_gv_choochooSize[lv_engine] == 0)) {
UnitIssueOrder(lv_cabooseUnit, OrderTargetingUnit(AbilityCommand("ToyTrainFollowAbility", 0), lv_engineUnit), c_orderQueueReplace);
libGame_gv_playerIsEngine[lv_engine] = true;
libGame_gv_choochooSize[lv_engine] += 1;
}
else {
UnitIssueOrder(lv_cabooseUnit, OrderTargetingUnit(AbilityCommand("ToyTrainFollowAbility", 0), libGame_gv_choochooTrains[lv_engine][libGame_gv_choochooSize[lv_engine]]), c_orderQueueReplace);
libGame_gv_choochooSize[lv_engine] += 1;
}
libGame_gv_choochooTrains[lv_engine][libGame_gv_choochooSize[lv_engine]] = lv_cabooseUnit;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CabooseFollowLogic_Init () {
libGame_gt_CabooseFollowLogic = TriggerCreate("libGame_gt_CabooseFollowLogic_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_CabooseFollowLogic, c_playerAny, "MountCabooseSmartCommandSet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Unit Loses Toy Train Follow Behavior
//--------------------------------------------------------------------------------------------------
bool libGame_gt_UnitLosesToyTrainFollowBehavior_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_unit;
int lv_owner;
int lv_cabooseChecker;
int lv_choochooClearer;
int lv_cabooseIndex;
// Automatic Variable Declarations
const int auto4868FB37_ae = 10;
const int auto4868FB37_ai = 1;
const int auto3DC0D354_ae = 10;
const int auto3DC0D354_ai = 1;
// Variable Initialization
lv_unit = EventPlayerEffectUsedUnit(c_effectUnitCaster);
lv_owner = UnitGetOwner(lv_unit);
// Actions
if (!runActions) {
return true;
}
lv_cabooseChecker = 1;
for ( ; ( (auto4868FB37_ai >= 0 && lv_cabooseChecker <= auto4868FB37_ae) || (auto4868FB37_ai < 0 && lv_cabooseChecker >= auto4868FB37_ae) ) ; lv_cabooseChecker += auto4868FB37_ai ) {
if ((libGame_gv_choochooTrains[libGame_gv_cabooseEngineOwner[lv_owner]][lv_cabooseChecker] == lv_unit)) {
lv_cabooseIndex = lv_cabooseChecker;
lv_choochooClearer = lv_cabooseChecker;
for ( ; ( (auto3DC0D354_ai >= 0 && lv_choochooClearer <= auto3DC0D354_ae) || (auto3DC0D354_ai < 0 && lv_choochooClearer >= auto3DC0D354_ae) ) ; lv_choochooClearer += auto3DC0D354_ai ) {
if ((libGame_gv_choochooTrains[libGame_gv_cabooseEngineOwner[lv_owner]][lv_choochooClearer] != null)) {
libGame_gv_choochooTrains[libGame_gv_cabooseEngineOwner[lv_owner]][lv_choochooClearer] = null;
libGame_gv_choochooSize[libGame_gv_cabooseEngineOwner[lv_owner]] -= 1;
}
}
break;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_UnitLosesToyTrainFollowBehavior_Init () {
libGame_gt_UnitLosesToyTrainFollowBehavior = TriggerCreate("libGame_gt_UnitLosesToyTrainFollowBehavior_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_UnitLosesToyTrainFollowBehavior, c_playerAny, "ToyTrainFollowAbilityRemove");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Game General NPC Proc Listener
//--------------------------------------------------------------------------------------------------
bool libGame_gt_GameGeneralNPCProcListener_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_killingPlayer;
unit lv_minion;
string lv_unitTypeOfMinion;
// Automatic Variable Declarations
// Variable Initialization
lv_killingPlayer = libGame_gf_HeroParticipatedInNPCTakedownKillingPlayer();
lv_minion = libGame_gf_HeroParticipatedInNPCTakedownMinion();
lv_unitTypeOfMinion = UnitGetType(lv_minion);
// Actions
if (!runActions) {
return true;
}
if (((UnitTypeTestAttribute(lv_unitTypeOfMinion, c_unitAttributeSummoned) == true) || (UnitTypeTestAttribute(lv_unitTypeOfMinion, c_unitAttributeUser1) == true) || (UnitTypeTestAttribute(lv_unitTypeOfMinion, c_unitAttributeMapBoss) == true))) {
return true;
}
if ((UnitTypeTestAttribute(lv_unitTypeOfMinion, c_unitAttributeStructure) == true)) {
return true;
}
if ((UnitTypeTestAttribute(lv_unitTypeOfMinion, c_unitAttributeMinion) == true) && (UnitFilterMatch(lv_minion, lv_killingPlayer, UnitFilter(0, 0, (1 << c_targetFilterCreep) | (1 << c_targetFilterMerc), 0)) == true)) {
libGame_gf_LeoricMithrilMaceProc(lv_killingPlayer, lv_minion);
libGame_gf_BribeProc(lv_killingPlayer, lv_minion);
libGame_gf_DiabloBlackSoulstoneProc(lv_killingPlayer, lv_minion);
libGame_gf_GenericSeasonedMarksmanProc(lv_killingPlayer, lv_minion);
libGame_gf_BrightwingHyperShiftProc(lv_killingPlayer, lv_minion);
libGame_gf_BrightwingPixieCharmProc(lv_killingPlayer, lv_minion);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_GameGeneralNPCProcListener_Init () {
libGame_gt_GameGeneralNPCProcListener = TriggerCreate("libGame_gt_GameGeneralNPCProcListener_Func");
libGame_gf_HeroParticipatedInNPCTakedown(libGame_gt_GameGeneralNPCProcListener);
}
//--------------------------------------------------------------------------------------------------
// Trigger: NPC Unit Dies
//--------------------------------------------------------------------------------------------------
bool libGame_gt_NPCUnitDies_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_unit;
string lv_unitType;
int lv_minionIndex;
// Automatic Variable Declarations
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_unit = EventUnit();
lv_unitType = UnitGetType(lv_unit);
if ((UnitTypeTestAttribute(lv_unitType, c_unitAttributeCreep) == true)) {
libGame_gf_CreepDies(lv_unit, libNtve_gf_KillingPlayer(), EventUnitDamageKillXP());
return true;
}
if ((UnitTypeTestAttribute(lv_unitType, c_unitAttributeSummoned) == true)) {
return true;
}
if ((UnitTypeTestAttribute(lv_unitType, c_unitAttributeMinion) == true) && (UnitTestState(lv_unit, c_unitStateHallucination) == false) && (libGame_gv_minionSystemStarted == true)) {
libGame_gf_MinionDies(lv_unit, libNtve_gf_KillingPlayer(), EventUnitDamageKillXP());
return true;
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_NPCUnitDies_Init () {
libGame_gt_NPCUnitDies = TriggerCreate("libGame_gt_NPCUnitDies_Func");
TriggerAddEventUnitDied(libGame_gt_NPCUnitDies, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Town Structure Dies
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TownStructureDies_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_dyingStructureUnit;
int lv_victimTeam;
int lv_townIndex;
int lv_structureType;
int lv_itPlayer;
unit lv_itUnit;
fixed lv_townHallAnimationExplodeTime;
playergroup lv_nearbyPlayersGroup;
playergroup lv_killingPlayersGroup;
int lv_killingFaction;
// Automatic Variable Declarations
const int auto81D7249A_ae = libCore_gv_bALMaxPlayers;
const int auto81D7249A_ai = 1;
unitgroup autoE376AD85_g;
int autoE376AD85_u;
playergroup auto8BB7E864_g;
// Variable Initialization
lv_dyingStructureUnit = EventUnit();
lv_structureType = libGame_ge_TownStructureTypes_None;
lv_townHallAnimationExplodeTime = 0.75;
lv_nearbyPlayersGroup = PlayerGroupEmpty();
lv_killingPlayersGroup = PlayerGroupEmpty();
lv_killingFaction = libGame_ge_Faction_Neutral;
// Conditions
if (testConds) {
if (!((UnitTypeTestAttribute(UnitGetType(lv_dyingStructureUnit), c_unitAttributeStructure) == true))) {
return false;
}
if (!((UnitTypeTestAttribute(UnitGetType(lv_dyingStructureUnit), c_unitAttributeSummoned) == false))) {
return false;
}
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_townIndex = libGame_gf_TownGetTownForUnit(lv_dyingStructureUnit);
lv_structureType = libGame_gf_TownGetTownStructurePresetFromUnit(lv_dyingStructureUnit);
lv_victimTeam = libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lv_dyingStructureUnit));
if ((libGame_gf_TownGetTownStructurePresetFromUnit(lv_dyingStructureUnit) == libGame_ge_TownStructureTypes_TownHall) && (libGame_gv_minionMapNeverSpawnsCatapults == false) && (libCore_gv_sYSMinionSpawningOn == true)) {
if ((libGame_gf_TownsAliveinLane(lv_victimTeam, libGame_gv_townTownData[lv_townIndex].lv_lane) == 1)) {
libUIUI_gf_UIFloatingCombatTextPeriodicCatapults(StringExternal("Param/Value/lib_Game_CA15EA74"), UnitGetPosition(lv_dyingStructureUnit));
if ((libGame_gv_minion_PeriodicCatapultsFirstWave == 0)) {
libGame_gv_minion_PeriodicCatapultsFirstWave = (libGame_gv_minionWaveSpawnCounter + 1);
}
}
if ((libGame_gf_TownsAliveinLane(lv_victimTeam, libGame_gv_townTownData[lv_townIndex].lv_lane) == 0)) {
libUIUI_gf_UIFloatingCombatTextPeriodicCatapults(StringExternal("Param/Value/lib_Game_3DAE31F1"), UnitGetPosition(lv_dyingStructureUnit));
}
}
libGame_gf_AwardXPForNPCKill(lv_dyingStructureUnit, EventPlayer(), c_unitAttributeStructure, libNtve_gf_KillingPlayer(), EventUnitDamageKillXP());
if ((UnitGetOwner(lv_dyingStructureUnit) == libCore_gv_cOMPUTER_TeamOrder)) {
lv_killingFaction = libGame_ge_Faction_Chaos;
}
else {
lv_killingFaction = libGame_ge_Faction_Order;
}
if ((lv_structureType == libGame_ge_TownStructureTypes_TownHall)) {
StatEventCreate("TownStructureDeath");
StatEventAddDataInt(StatEventLastCreated(), "TownID", lv_townIndex);
StatEventAddDataFixed(StatEventLastCreated(), "GameTime", libUIUI_gf_HeroesGameTime());
StatEventAddDataString(StatEventLastCreated(), "UnitType", (UnitGetType(lv_dyingStructureUnit)));
lv_itPlayer = 1;
for ( ; ( (auto81D7249A_ai >= 0 && lv_itPlayer <= auto81D7249A_ae) || (auto81D7249A_ai < 0 && lv_itPlayer >= auto81D7249A_ae) ) ; lv_itPlayer += auto81D7249A_ai ) {
if ((libGame_gv_players[lv_itPlayer].lv_faction == lv_killingFaction) && (((libGame_gv_players[lv_itPlayer].lv_heroUnit != null) && (DistanceBetweenPoints(UnitGetPosition(libGame_gv_players[lv_itPlayer].lv_heroUnit), UnitGetPosition(lv_dyingStructureUnit)) <= libCore_gv_bALHeroKillXPRadius)) || ((libGame_gv_players[lv_itPlayer].lv_activeVehicle != null) && (DistanceBetweenPoints(UnitGetPosition(libGame_gv_players[lv_itPlayer].lv_activeVehicle), UnitGetPosition(lv_dyingStructureUnit)) <= libCore_gv_bALHeroKillXPRadius)))) {
StatEventAddDataInt(StatEventLastCreated(), "KillingPlayer", lv_itPlayer);
}
}
StatEventSend(StatEventLastCreated());
}
if ((lv_structureType == libGame_ge_TownStructureTypes_TownHall)) {
if ((lv_killingFaction == libGame_ge_Faction_Order)) {
libGame_gv_teams[1].lv_townKills += 1;
libGame_gv_teams[2].lv_townsRemaining -= 1;
if ((libCore_gv_mAPMapStringID != "TowersOfDoom")) {
libCore_gv_data_XP_TrickleTotalTownHallMod[1] += libCore_gv_data_XP_TrickleTownHallMod_C;
}
}
else {
libGame_gv_teams[2].lv_townKills += 1;
if ((libCore_gv_mAPMapStringID != "TowersOfDoom")) {
libCore_gv_data_XP_TrickleTotalTownHallMod[2] += libCore_gv_data_XP_TrickleTownHallMod_C;
}
libGame_gv_teams[1].lv_townsRemaining -= 1;
}
autoE376AD85_g = UnitGroup(null, c_playerAny, RegionCircle(UnitGetPosition(lv_dyingStructureUnit), 20.0), libCore_gv_filtersHeroic, 0);
autoE376AD85_u = UnitGroupCount(autoE376AD85_g, c_unitCountAll);
for (;; autoE376AD85_u -= 1) {
lv_itUnit = UnitGroupUnitFromEnd(autoE376AD85_g, autoE376AD85_u);
if (lv_itUnit == null) { break; }
if ((libNtve_gf_PlayerIsEnemy(UnitGetOwner(lv_itUnit), UnitGetOwner(lv_dyingStructureUnit), libNtve_ge_PlayerRelation_Enemy) == true)) {
PlayerGroupAdd(lv_killingPlayersGroup, UnitGetOwner(lv_itUnit));
}
PlayerGroupAdd(lv_nearbyPlayersGroup, UnitGetOwner(lv_itUnit));
}
libGame_gf_BuildingDiesCameraShake(lv_townHallAnimationExplodeTime, "Heavy", lv_nearbyPlayersGroup);
libGame_gf_TownUpgradeBruiserMinions(lv_townIndex);
libGame_gf_TownAnnounceTownDestroyed(lv_townIndex, libGame_gf_TownGetTownHallPresetFromUnitID(UnitGetType(lv_dyingStructureUnit)));
libGame_gf_DropLootBannerinTownHallRubble(lv_townIndex);
TriggerExecute(libGame_gt_OnFireForcedUpdate, true, false);
auto8BB7E864_g = lv_killingPlayersGroup;
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto8BB7E864_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
libSond_gf_HeroVOStartCelebrateVOTimerForPlayer(lv_itPlayer, lv_killingPlayersGroup);
libGame_gv_scoreValues[lv_itPlayer].lv_townKills += 1;
}
if ((libGame_gv_townDestructionRemovesCoreInvulnerable == true) && (libCore_gv_sYSGameMode != libCore_ge_GameModes_TryMe) && (libGame_gf_TownAliveinLane(lv_victimTeam, libGame_gv_townTownData[lv_townIndex].lv_lane) == false)) {
UnitBehaviorRemove(libGame_gv_teams[lv_victimTeam].lv_core, "CoreInvulnerability", 1);
}
libGame_gf_TownUnhideMinimapIconsOnMoonwellUnits(lv_townIndex);
}
if ((lv_structureType == libGame_ge_TownStructureTypes_Moonwell) && (UnitHasBehavior2(lv_dyingStructureUnit, "HealingFountainIgnoreLinkedMinimapIcons") == false)) {
libGame_gf_TownRemoveMoonwellMinimapIconsFromTown(lv_townIndex);
}
libAIAI_gf_AITeamDelegateUpdateFortKeepcountinLaneforTeam(lv_victimTeam, AILaneWaypointGetClosestLane(UnitGetPosition(lv_dyingStructureUnit)));
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TownStructureDies_Init () {
libGame_gt_TownStructureDies = TriggerCreate("libGame_gt_TownStructureDies_Func");
TriggerAddEventUnitDied(libGame_gt_TownStructureDies, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Core Dies (Game Over)
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CoreDiesGameOver_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayerTracking;
const fixed lv_coreAnimationWaitExplodeTime = 2.8;
int lv_itPlayer;
unit lv_itHeroUnit;
// Automatic Variable Declarations
const int auto0239D8C8_ae = libCore_gv_bALMaxPlayers;
const int auto0239D8C8_ai = 1;
unitgroup autoFE95939E_g;
int autoFE95939E_u;
playergroup autoE67D1356_g;
int autoE67D1356_var;
playergroup autoB8F084BF_g;
int autoB8F084BF_var;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libCore_gv_sYSGameMode != libCore_ge_GameModes_ArenaMode))) {
return false;
}
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gv_gameOver = true;
if ((EventUnit() == libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_core)) {
libGame_gv_teamOrderCoreAlive = false;
}
TimerPause(libGame_gv_gameTimer, true);
TimerPause(libGame_gv_matchGameplayTimer, true);
UnitPauseAll(true);
lv_itPlayer = 1;
for ( ; ( (auto0239D8C8_ai >= 0 && lv_itPlayer <= auto0239D8C8_ae) || (auto0239D8C8_ai < 0 && lv_itPlayer >= auto0239D8C8_ae) ) ; lv_itPlayer += auto0239D8C8_ai ) {
autoFE95939E_g = libGame_gv_players[lv_itPlayer].lv_heroUnitGroup;
autoFE95939E_u = UnitGroupCount(autoFE95939E_g, c_unitCountAll);
for (;; autoFE95939E_u -= 1) {
lv_itHeroUnit = UnitGroupUnitFromEnd(autoFE95939E_g, autoFE95939E_u);
if (lv_itHeroUnit == null) { break; }
libNtve_gf_ChangeUnitDamage(lv_itHeroUnit, libNtve_ge_UnitDamageTakenDealt_Damage_Deal, libNtve_ge_UnitDamageChangeOption_No);
libNtve_gf_ChangeUnitDamage(lv_itHeroUnit, libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_No);
}
PlayerPauseAllCooldowns(lv_itPlayer, true);
PlayerPauseAllCharges(lv_itPlayer, true);
}
libNtve_gf_ChangeUnitDamage(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_core, libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_No);
libNtve_gf_ChangeUnitDamage(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_core, libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_No);
libAIAI_gf_MinionAIPauseUnpauseMinionAISystem(true);
VisRevealerCreate(libCore_gv_cOMPUTER_TeamOrder, RegionCircle(UnitGetPosition(EventUnit()), 4.0));
VisRevealerCreate(libCore_gv_cOMPUTER_TeamChaos, RegionCircle(UnitGetPosition(EventUnit()), 4.0));
libGame_gf_BuildingDiesCameraShake(lv_coreAnimationWaitExplodeTime, "Massive", libCore_gv_activeHumanPlayers);
autoE67D1356_g = libCore_gv_activeHumanPlayers;
autoE67D1356_var = -1;
while (true) {
autoE67D1356_var = PlayerGroupNextPlayer(autoE67D1356_g, autoE67D1356_var);
if (autoE67D1356_var<0) { break; }
CameraLockInput(autoE67D1356_var, true);
PlayerOptionOverride(autoE67D1356_var, "camerafollow", "0");
libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(false, autoE67D1356_var);
}
Wait(0.0625, c_timeGame);
autoB8F084BF_g = libCore_gv_activeHumanPlayers;
autoB8F084BF_var = -1;
while (true) {
autoB8F084BF_var = PlayerGroupNextPlayer(autoB8F084BF_g, autoB8F084BF_var);
if (autoB8F084BF_var<0) { break; }
CameraFollowUnitGroup(autoB8F084BF_var, CameraFollowUnitGroupGet(autoB8F084BF_var), false, false);
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(autoB8F084BF_var, UnitGetPosition(EventUnit()), libGame_gv_gameOver_CameraPanTime_C, -1, 10, false);
}
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(libCore_gv_oBSERVER_ObserverUIPlayer, UnitGetPosition(EventUnit()), libGame_gv_gameOver_CameraPanTime_C, -1, 10, false);
SetTalentsEnabled(false);
TriggerExecute(libGame_gt_DetermineWinningTeam, true, false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CoreDiesGameOver_Init () {
libGame_gt_CoreDiesGameOver = TriggerCreate("libGame_gt_CoreDiesGameOver_Func");
TriggerAddEventUnitDied(libGame_gt_CoreDiesGameOver, UnitRefFromVariable("libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_core"));
TriggerAddEventUnitDied(libGame_gt_CoreDiesGameOver, UnitRefFromVariable("libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_core"));
}
//--------------------------------------------------------------------------------------------------
// Trigger: On Fire Enable Messaging
//--------------------------------------------------------------------------------------------------
bool libGame_gt_OnFireEnableMessaging_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gv_onFirePrintingEnabled = true;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_OnFireEnableMessaging_Init () {
libGame_gt_OnFireEnableMessaging = TriggerCreate("libGame_gt_OnFireEnableMessaging_Func");
TriggerAddEventChatMessage(libGame_gt_OnFireEnableMessaging, c_playerAny, "-showonfire", true);
}
//--------------------------------------------------------------------------------------------------
// Trigger: On Fire Disable Messaging
//--------------------------------------------------------------------------------------------------
bool libGame_gt_OnFireDisableMessaging_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_iterator;
// Automatic Variable Declarations
int auto9788DB23_ae;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
libGame_gv_onFirePrintingEnabled = false;
auto9788DB23_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= auto9788DB23_ae ; lv_iterator += 1 ) {
libUIUI_gf_UIOnFireSetOnFireLevel(libGame_ge_OnFireLevel_Extinguished, lv_iterator);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_OnFireDisableMessaging_Init () {
libGame_gt_OnFireDisableMessaging = TriggerCreate("libGame_gt_OnFireDisableMessaging_Func");
TriggerAddEventChatMessage(libGame_gt_OnFireDisableMessaging, c_playerAny, "-showonfire", true);
}
//--------------------------------------------------------------------------------------------------
// Trigger: On Fire Start
//--------------------------------------------------------------------------------------------------
bool libGame_gt_OnFireStart_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_iterator;
// Automatic Variable Declarations
int auto037682B8_ae;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
if (((libCore_gv_sYSGameMode == libCore_ge_GameModes_ArenaMode) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_AttackDefend) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_Debug) || (libCore_gv_sYSGameMode == libCore_ge_GameModes_TryMe) || (libGame_gv_endofMatchAwardsDisabled == true) || ((GameIsMatchmade() == false) && (libCore_gv_dEBUGDebuggingEnabled == false) && (libCore_gv_sYSGameMode != libCore_ge_GameModes_Tutorial1) && (libCore_gv_sYSGameMode != libCore_ge_GameModes_TutorialMapMechanics)))) {
return true;
}
auto037682B8_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= auto037682B8_ae ; lv_iterator += 1 ) {
TimerStart(libGame_gv_onFireTimer[lv_iterator], c_timerDurationInfinite, false, c_timeGame);
TimerPause(TimerLastStarted(), true);
}
if ((libGame_gv_onFireEnabled == true)) {
libGame_gf_UpdateOnFireScore();
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_OnFireStart_Init () {
libGame_gt_OnFireStart = TriggerCreate("libGame_gt_OnFireStart_Func");
libGame_gf_GameOpenTimerStarted(libGame_gt_OnFireStart);
}
//--------------------------------------------------------------------------------------------------
// Trigger: On Fire Forced Update
//--------------------------------------------------------------------------------------------------
bool libGame_gt_OnFireForcedUpdate_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_heroKilledPlayer;
// Automatic Variable Declarations
// Variable Initialization
lv_heroKilledPlayer = libGame_gf_HeroKilledPlayer();
// Actions
if (!runActions) {
return true;
}
if ((lv_heroKilledPlayer <= libCore_gv_bALMaxPlayers) && (lv_heroKilledPlayer > 0)) {
libGame_gf_OnFireDeathMultiplier(lv_heroKilledPlayer);
}
if ((libGame_gv_onFireEnabled == true) && (libGame_gv_onFireUpdating == false)) {
libGame_gv_onFireUpdating = true;
libGame_gf_CalculateOnFireScore();
libGame_gv_onFireUpdating = false;
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_OnFireForcedUpdate_Init () {
libGame_gt_OnFireForcedUpdate = TriggerCreate("libGame_gt_OnFireForcedUpdate_Func");
libGame_gf_MercCampCaptured(libGame_gt_OnFireForcedUpdate);
libGame_gf_HeroKilled(libGame_gt_OnFireForcedUpdate);
libGame_gf_HeroEntersSpecialDeathState(libGame_gt_OnFireForcedUpdate);
libGame_gf_TownStructureEntersSpecialDeathState(libGame_gt_OnFireForcedUpdate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: On Fire Disable
//--------------------------------------------------------------------------------------------------
bool libGame_gt_OnFireDisable_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gv_onFireEnabled = false;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_OnFireDisable_Init () {
libGame_gt_OnFireDisable = TriggerCreate("libGame_gt_OnFireDisable_Func");
libGame_gf_GameOverEvent(libGame_gt_OnFireDisable);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Record On Fire Timers
//--------------------------------------------------------------------------------------------------
bool libGame_gt_RecordOnFireTimers_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_iterator;
// Automatic Variable Declarations
int autoD3A1C874_ae;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
autoD3A1C874_ae = libCore_gv_bALMaxPlayers;
lv_iterator = 1;
for ( ; lv_iterator <= autoD3A1C874_ae ; lv_iterator += 1 ) {
libGame_gf_ScoreValuesReportRealValueAndLog(lv_iterator, "OnFireTimeOnFire", TimerGetElapsed(libGame_gv_onFireTimer[lv_iterator]));
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_RecordOnFireTimers_Init () {
libGame_gt_RecordOnFireTimers = TriggerCreate("libGame_gt_RecordOnFireTimers_Func");
libGame_gf_GameOverEvent(libGame_gt_RecordOnFireTimers);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Level Up
//--------------------------------------------------------------------------------------------------
bool libGame_gt_LevelUp_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((UnitGetOwner(EventUnit()) > 0))) {
return false;
}
if (!((UnitGetOwner(EventUnit()) <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((UnitTypeTestFlag(UnitGetType(EventUnit()), c_unitFlagHero) == true))) {
return false;
}
if (!((UnitTestState(EventUnit(), c_unitStateHallucination) == false))) {
return false;
}
if (!((EventUnitBehavior() == "HeroDummyVeterancy"))) {
return false;
}
if (!((UnitHasBehavior2(EventUnit(), "AbnormalExperienceGain") == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gf_LevelUpHero(EventUnit());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_LevelUp_Init () {
libGame_gt_LevelUp = TriggerCreate("libGame_gt_LevelUp_Func");
TriggerAddEventUnitGainLevel(libGame_gt_LevelUp, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Recent Damage Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_RecentDamageTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_i;
int lv_playerIndex;
// Automatic Variable Declarations
const int autoB30A3530_ae = libCore_gv_bALMaxPlayers;
const int autoB30A3530_ai = 1;
const int auto28EF0F20_ae = libCore_gv_bALMaxPlayers;
const int auto28EF0F20_ai = 1;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_i = 1;
for ( ; ( (autoB30A3530_ai >= 0 && lv_i <= autoB30A3530_ae) || (autoB30A3530_ai < 0 && lv_i >= autoB30A3530_ae) ) ; lv_i += autoB30A3530_ai ) {
if ((EventTimer() == libGame_gv_players[lv_i].lv_recentDamageResetTimer)) {
lv_playerIndex = lv_i;
break;
}
}
if ((lv_playerIndex != 0)) {
lv_i = 1;
for ( ; ( (auto28EF0F20_ai >= 0 && lv_i <= auto28EF0F20_ae) || (auto28EF0F20_ai < 0 && lv_i >= auto28EF0F20_ae) ) ; lv_i += auto28EF0F20_ai ) {
libGame_gv_players[lv_playerIndex].lv_recentPlayerDamageReceived[lv_i] = 0.0;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_RecentDamageTimerExpires_Init () {
libGame_gt_RecentDamageTimerExpires = TriggerCreate("libGame_gt_RecentDamageTimerExpires_Func");
TriggerAddEventTimer(libGame_gt_RecentDamageTimerExpires, libGame_gv_players[1].lv_recentDamageResetTimer);
TriggerAddEventTimer(libGame_gt_RecentDamageTimerExpires, libGame_gv_players[2].lv_recentDamageResetTimer);
TriggerAddEventTimer(libGame_gt_RecentDamageTimerExpires, libGame_gv_players[3].lv_recentDamageResetTimer);
TriggerAddEventTimer(libGame_gt_RecentDamageTimerExpires, libGame_gv_players[4].lv_recentDamageResetTimer);
TriggerAddEventTimer(libGame_gt_RecentDamageTimerExpires, libGame_gv_players[5].lv_recentDamageResetTimer);
TriggerAddEventTimer(libGame_gt_RecentDamageTimerExpires, libGame_gv_players[6].lv_recentDamageResetTimer);
TriggerAddEventTimer(libGame_gt_RecentDamageTimerExpires, libGame_gv_players[7].lv_recentDamageResetTimer);
TriggerAddEventTimer(libGame_gt_RecentDamageTimerExpires, libGame_gv_players[8].lv_recentDamageResetTimer);
TriggerAddEventTimer(libGame_gt_RecentDamageTimerExpires, libGame_gv_players[9].lv_recentDamageResetTimer);
TriggerAddEventTimer(libGame_gt_RecentDamageTimerExpires, libGame_gv_players[10].lv_recentDamageResetTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Damage Tracking
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDamageTracking_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_eventUnitDamageSourcePlayer;
int lv_eventPlayer;
string lv_triggeringUnitType;
string lv_damagingUnitType;
int lv_damageTaken;
fixed lv_missionTime;
// Automatic Variable Declarations
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_missionTime = GameGetMissionTime();
lv_eventUnitDamageSourcePlayer = EventUnitDamageSourcePlayer();
lv_eventPlayer = EventPlayer();
lv_triggeringUnitType = UnitGetType(EventUnit());
lv_damagingUnitType = UnitGetType(EventUnitDamageSourceUnit());
lv_damageTaken = FixedToInt(EventUnitDamageAmount());
if ((lv_eventPlayer <= libCore_gv_bALMaxPlayers) && (UnitTypeTestAttribute(lv_triggeringUnitType, c_unitAttributeHeroic) == true) && (UnitTestState(EventUnit(), c_unitStateHallucination) == false) && (UnitHasBehavior(EventUnit(), "GenericVehicleBehaviorEmpty") == false) && (UnitHasBehavior(EventUnit(), "GenericVehicleBehaviorOccupied") == false)) {
if ((lv_eventUnitDamageSourcePlayer != 15)) {
libGame_gv_scoreValues[lv_eventPlayer].lv_damageTaken += FixedToInt(EventUnitDamageAbsorbed());
libGame_gv_scoreValues[lv_eventPlayer].lv_damageSoaked += FixedToInt(EventUnitDamageAbsorbed());
libGame_gf_AddGuardianDamage(EventUnitDamageAbsorbed(), lv_eventPlayer);
libGame_gf_AddScrapperDamage(lv_damageTaken, lv_eventUnitDamageSourcePlayer);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_eventPlayer, "DamageTaken", libGame_gv_scoreValues[lv_eventPlayer].lv_damageTaken);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_eventPlayer, "DamageSoaked", libGame_gv_scoreValues[lv_eventPlayer].lv_damageSoaked);
}
if ((UnitTypeTestAttribute(lv_damagingUnitType, c_unitAttributeHeroic) == true) && (UnitTestState(EventUnitDamageSourceUnit(), c_unitStateHallucination) == false)) {
if ((lv_eventUnitDamageSourcePlayer <= libCore_gv_bALMaxPlayers)) {
libGame_gv_players[lv_eventPlayer].lv_recentPlayerDamageReceived[lv_eventUnitDamageSourcePlayer] += IntToFixed(lv_damageTaken);
libGame_gv_players[lv_eventPlayer].lv_lastTimeHeroDealtDamage[lv_eventUnitDamageSourcePlayer] = lv_missionTime;
}
}
TimerStart(libGame_gv_players[lv_eventPlayer].lv_recentDamageResetTimer, libCore_gv_bALRecentDamageResetTime, false, c_timeGame);
}
if ((lv_eventUnitDamageSourcePlayer >= 1) && (lv_eventUnitDamageSourcePlayer <= libCore_gv_bALMaxPlayers) && ((lv_triggeringUnitType == "TownTownHallL2") || (lv_triggeringUnitType == "TownTownHallL3"))) {
libGame_gv_loot_TownHallAttackers[libGame_gf_TownGetTownForUnit(EventUnit())] = lv_eventUnitDamageSourcePlayer;
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDamageTracking_Init () {
libGame_gt_HeroDamageTracking = TriggerCreate("libGame_gt_HeroDamageTracking_Func");
TriggerAddEventUnitDamaged(libGame_gt_HeroDamageTracking, null, c_unitDamageTypeAny, c_unitDamageEither, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Damage Soaked Death Update
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroDamageSoakedDeathUpdate_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_deadUnit;
int lv_deadUnitOwner;
// Automatic Variable Declarations
// Variable Initialization
lv_deadUnit = EventUnit();
lv_deadUnitOwner = UnitGetOwner(lv_deadUnit);
// Conditions
if (testConds) {
if (!((lv_deadUnitOwner >= 1))) {
return false;
}
if (!((lv_deadUnitOwner <= 10))) {
return false;
}
if (!((libGame_gv_players[lv_deadUnitOwner].lv_heroUnit == lv_deadUnit))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gv_scoreValues[lv_deadUnitOwner].lv_damageSoaked -= FixedToInt(UnitGetPropertyFixed(lv_deadUnit, c_unitPropLifeMax, c_unitPropCurrent));
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_deadUnitOwner, "DamageSoaked", libGame_gv_scoreValues[lv_deadUnitOwner].lv_damageSoaked);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroDamageSoakedDeathUpdate_Init () {
libGame_gt_HeroDamageSoakedDeathUpdate = TriggerCreate("libGame_gt_HeroDamageSoakedDeathUpdate_Func");
TriggerAddEventUnitDied(libGame_gt_HeroDamageSoakedDeathUpdate, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero Kill Credit Proximity Tracking
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroKillCreditProximityTracking_Func (bool testConds, bool runActions) {
// Variable Declarations
const int lv_heroIndexMod = 2;
int lv_player;
unit lv_u;
fixed lv_missionTime;
int lv_firstIndex;
int lv_owner;
// Automatic Variable Declarations
const int auto98CCDFBA_ae = libCore_gv_bALMaxPlayers;
const int auto98CCDFBA_ai = lv_heroIndexMod;
unitgroup auto6101B342_g;
int auto6101B342_u;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_missionTime = GameGetMissionTime();
lv_firstIndex = ModI(FixedToInt((lv_missionTime / 0.0625)), lv_heroIndexMod);
lv_player = lv_firstIndex;
for ( ; ( (auto98CCDFBA_ai >= 0 && lv_player <= auto98CCDFBA_ae) || (auto98CCDFBA_ai < 0 && lv_player >= auto98CCDFBA_ae) ) ; lv_player += auto98CCDFBA_ai ) {
if ((UnitIsAlive(libGame_gv_players[lv_player].lv_heroUnit) == true)) {
auto6101B342_g = UnitGroupSearch(null, lv_player, UnitGetPosition(libGame_gv_players[lv_player].lv_heroUnit), libCore_gv_bALHeroKillXPRadius, libCore_gv_filtersHeroicEnemyandnotHallucination, 0);
auto6101B342_u = UnitGroupCount(auto6101B342_g, c_unitCountAll);
for (;; auto6101B342_u -= 1) {
lv_u = UnitGroupUnitFromEnd(auto6101B342_g, auto6101B342_u);
if (lv_u == null) { break; }
lv_owner = UnitGetOwner(lv_u);
if ((lv_owner <= libCore_gv_bALMaxPlayers)) {
libGame_gv_players[lv_player].lv_lastTimeHeroWasWithinXPRadius[lv_owner] = lv_missionTime;
}
}
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroKillCreditProximityTracking_Init () {
libGame_gt_HeroKillCreditProximityTracking = TriggerCreate("libGame_gt_HeroKillCreditProximityTracking_Func");
TriggerAddEventTimePeriodic(libGame_gt_HeroKillCreditProximityTracking, 0.0625, c_timeGame);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hero XP Changes
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HeroXPChanges_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_team;
// Automatic Variable Declarations
// Variable Initialization
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
if (!((EventPlayer() >= 1))) {
return false;
}
if (!((EventPlayer() <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((EventUnit() == libGame_gv_players[EventPlayer()].lv_heroUnit))) {
return false;
}
if (!((libGame_gv_players[EventPlayer()].lv_suppressLevelUpFXAndTeamXPTracking == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_team = libGame_gf_TeamNumberOfPlayer(EventPlayer());
libGame_gv_teams[lv_team].lv_xPTotals += EventUnitPropertyChangeInt();
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HeroXPChanges_Init () {
libGame_gt_HeroXPChanges = TriggerCreate("libGame_gt_HeroXPChanges_Func");
TriggerAddEventUnitProperty(libGame_gt_HeroXPChanges, null, c_unitPropXP);
}
//--------------------------------------------------------------------------------------------------
// Trigger: XP Trickle
//--------------------------------------------------------------------------------------------------
bool libGame_gt_XPTrickle_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_u;
// Automatic Variable Declarations
unitgroup autoAEA68A5B_g;
int autoAEA68A5B_u;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libCore_gv_sYSXPOn == true))) {
return false;
}
if (!((libGame_gv_xPTrickleEnabled == true))) {
return false;
}
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
autoAEA68A5B_g = libGame_gv_heroes;
autoAEA68A5B_u = UnitGroupCount(autoAEA68A5B_g, c_unitCountAll);
for (;; autoAEA68A5B_u -= 1) {
lv_u = UnitGroupUnitFromEnd(autoAEA68A5B_g, autoAEA68A5B_u);
if (lv_u == null) { break; }
libGame_gf_GrantXPToPlayer((libCore_gv_data_XP_TrickleAmount_C * (libGame_gv_xPTrickleModifier[libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lv_u))] + libCore_gv_data_XP_TrickleTotalTownHallMod[libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lv_u))])), UnitGetOwner(lv_u), libGame_ge_XPSources_Trickle);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_XPTrickle_Init () {
libGame_gt_XPTrickle = TriggerCreate("libGame_gt_XPTrickle_Func");
TriggerEnable(libGame_gt_XPTrickle, false);
TriggerAddEventTimePeriodic(libGame_gt_XPTrickle, libCore_gv_data_XP_TricklePeriod_C, c_timeGame);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Player - Home Shield Protection On
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PlayerHomeShieldProtectionOn_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_heroUnit;
int lv_heroUnitOwner;
// Automatic Variable Declarations
// Variable Initialization
lv_heroUnit = EventUnit();
lv_heroUnitOwner = UnitGetOwner(lv_heroUnit);
// Conditions
if (testConds) {
if (!((lv_heroUnitOwner >= 1))) {
return false;
}
if (!((lv_heroUnitOwner <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((UnitTypeTestAttribute(UnitGetType(lv_heroUnit), c_unitAttributeHeroic) == true))) {
return false;
}
if (!((UnitGetType(lv_heroUnit) != "HeroAbathur"))) {
return false;
}
if (!((UnitGetType(lv_heroUnit) != "SamuroMirrorImage"))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
UnitCreateEffectUnit(lv_heroUnit, "MountSummonCooldownResetModifyUnit", lv_heroUnit);
if (((libGame_gv_players[lv_heroUnitOwner].lv_heroUnit == lv_heroUnit) || (libGame_gv_players[lv_heroUnitOwner].lv_activeVehicle == lv_heroUnit))) {
libGame_gf_PlayerTurnMountCostsOnOffForPlayer(lv_heroUnitOwner, false);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PlayerHomeShieldProtectionOn_Init () {
libGame_gt_PlayerHomeShieldProtectionOn = TriggerCreate("libGame_gt_PlayerHomeShieldProtectionOn_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_PlayerHomeShieldProtectionOn, null, "HallOfStormsProtectionBuff", c_unitBehaviorChangeActivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Player - Home Shield Protection Off
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PlayerHomeShieldProtectionOff_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_heroUnit;
int lv_heroUnitOwner;
// Automatic Variable Declarations
// Variable Initialization
lv_heroUnit = EventUnit();
lv_heroUnitOwner = UnitGetOwner(lv_heroUnit);
// Conditions
if (testConds) {
if (!((lv_heroUnitOwner >= 1))) {
return false;
}
if (!((lv_heroUnitOwner <= libCore_gv_bALMaxPlayers))) {
return false;
}
if (!((UnitTypeTestAttribute(UnitGetType(lv_heroUnit), c_unitAttributeHeroic) == true))) {
return false;
}
if (!((UnitGetType(lv_heroUnit) != "HeroAbathur"))) {
return false;
}
if (!((UnitGetType(lv_heroUnit) != "SamuroMirrorImage"))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if (((libGame_gv_players[lv_heroUnitOwner].lv_heroUnit == lv_heroUnit) || (libGame_gv_players[lv_heroUnitOwner].lv_activeVehicle == lv_heroUnit))) {
libGame_gf_PlayerTurnMountCostsOnOffForPlayer(lv_heroUnitOwner, true);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PlayerHomeShieldProtectionOff_Init () {
libGame_gt_PlayerHomeShieldProtectionOff = TriggerCreate("libGame_gt_PlayerHomeShieldProtectionOff_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_PlayerHomeShieldProtectionOff, null, "HallOfStormsProtectionBuff", c_unitBehaviorChangeDeactivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Player - Shrub Proximity Reveal Proc
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PlayerShrubProximityRevealProc_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
UnitCreateEffectUnit(EventPlayerEffectUsedUnit(c_effectUnitTarget), "ShrubProximityRevealApplyRevealer", EventPlayerEffectUsedUnit(c_effectUnitCaster));
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PlayerShrubProximityRevealProc_Init () {
libGame_gt_PlayerShrubProximityRevealProc = TriggerCreate("libGame_gt_PlayerShrubProximityRevealProc_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_PlayerShrubProximityRevealProc, c_playerAny, "ShrubProximityRevealDummySet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Player - Hero Displacement Behaviors
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PlayerHeroDisplacementBehaviors_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
// Automatic Variable Declarations
// Variable Initialization
lv_player = UnitGetOwner(EventUnit());
// Conditions
if (testConds) {
if (!(((UnitGetOwner(EventUnit()) >= 1) && (UnitGetOwner(EventUnit()) <= 10) && (EventUnit() == libGame_gv_players[lv_player].lv_heroUnit) && (UnitIsAlive(EventUnit()) == true)))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gf_PlayerHeroDisplacementCameraLock(EventUnit(), EventUnitBehavior());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PlayerHeroDisplacementBehaviors_Init () {
libGame_gt_PlayerHeroDisplacementBehaviors = TriggerCreate("libGame_gt_PlayerHeroDisplacementBehaviors_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_PlayerHeroDisplacementBehaviors, null, "DragonKnightBullRushTargetKnockback", c_unitBehaviorChangeActivate);
TriggerAddEventUnitBehaviorChange(libGame_gt_PlayerHeroDisplacementBehaviors, null, "StitchesHooked", c_unitBehaviorChangeActivate);
TriggerAddEventUnitBehaviorChange(libGame_gt_PlayerHeroDisplacementBehaviors, null, "StitchesGorgeCameraLockBehavior", c_unitBehaviorChangeActivate);
TriggerAddEventUnitBehaviorChange(libGame_gt_PlayerHeroDisplacementBehaviors, null, "HaymakerTargetBehaviorKnockback", c_unitBehaviorChangeActivate);
TriggerAddEventUnitBehaviorChange(libGame_gt_PlayerHeroDisplacementBehaviors, null, "JudgementKnockback", c_unitBehaviorChangeActivate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Player - Regen Globe Dummy Impact
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PlayerRegenGlobeDummyImpact_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
UnitCreateEffectUnit(EventPlayerEffectUsedUnit(c_effectUnitTarget), "RegenGlobeImpactSet", EventPlayerEffectUsedUnit(c_effectUnitTarget));
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PlayerRegenGlobeDummyImpact_Init () {
libGame_gt_PlayerRegenGlobeDummyImpact = TriggerCreate("libGame_gt_PlayerRegenGlobeDummyImpact_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_PlayerRegenGlobeDummyImpact, c_playerAny, "RegenGlobePickupImpactDummySet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Player - Regen Globe Neutral Dummy Set
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PlayerRegenGlobeNeutralDummySet_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
if ((libGame_gf_TeamNumberOfPlayer(UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitTarget))) == libGame_gv_teamOrderIndex_C)) {
UnitSetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster), libCore_gv_cOMPUTER_TeamOrder, false);
}
else {
UnitSetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster), libCore_gv_cOMPUTER_TeamChaos, false);
}
UnitCreateEffectUnit(EventPlayerEffectUsedUnit(c_effectUnitCaster), "RegenGlobePickupSet", EventPlayerEffectUsedUnit(c_effectUnitTarget));
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PlayerRegenGlobeNeutralDummySet_Init () {
libGame_gt_PlayerRegenGlobeNeutralDummySet = TriggerCreate("libGame_gt_PlayerRegenGlobeNeutralDummySet_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_PlayerRegenGlobeNeutralDummySet, c_playerAny, "RegenGlobeNeutralDummySet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Player - Regen Globe Impact Score Tracking
//--------------------------------------------------------------------------------------------------
bool libGame_gt_PlayerRegenGlobeImpactScoreTracking_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_globePickupUnit;
int lv_globePickupPlayer;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_globePickupUnit = EventPlayerEffectUsedUnit(c_effectUnitTarget);
lv_globePickupPlayer = UnitGetOwner(lv_globePickupUnit);
libGame_gv_scoreValues[lv_globePickupPlayer].lv_regenGlobes = (libGame_gv_scoreValues[lv_globePickupPlayer].lv_regenGlobes + 1);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_PlayerRegenGlobeImpactScoreTracking_Init () {
libGame_gt_PlayerRegenGlobeImpactScoreTracking = TriggerCreate("libGame_gt_PlayerRegenGlobeImpactScoreTracking_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_PlayerRegenGlobeImpactScoreTracking, c_playerAny, "RegenGlobeImpactSet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Neutral Regen Globe Created Change Owner
//--------------------------------------------------------------------------------------------------
bool libGame_gt_NeutralRegenGlobeCreatedChangeOwner_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((UnitGetType(EventUnit()) == "RegenGlobeNeutral"))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
UnitSetOwner(EventUnit(), libCore_gv_cOMPUTER_Hostile, true);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_NeutralRegenGlobeCreatedChangeOwner_Init () {
libGame_gt_NeutralRegenGlobeCreatedChangeOwner = TriggerCreate("libGame_gt_NeutralRegenGlobeCreatedChangeOwner_Func");
TriggerAddEventUnitBehaviorChange(libGame_gt_NeutralRegenGlobeCreatedChangeOwner, null, "RegenGlobeTimedLife", c_unitBehaviorChangeCreate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Scaling Timer Expiration
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ScalingTimerExpiration_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gv_scalingTicks += 1;
if ((libGame_gv_scalingTicks > libCore_gv_dataScalingMaxScalingTicks)) {
libGame_gv_scalingTicks = libCore_gv_dataScalingMaxScalingTicks;
}
TriggerExecute(libGame_gt_JungleScalingTimerExpires, true, false);
TriggerExecute(libGame_gt_CoreScalingTimerExpires, true, false);
TriggerExecute(libGame_gt_TownScalingTimerExpires, true, false);
libGame_gf_SendEventScalingIncremented();
TimerStart(libGame_gv_scalingTimer, libGame_gv_bALScalingTimerDuration, false, c_timeGame);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ScalingTimerExpiration_Init () {
libGame_gt_ScalingTimerExpiration = TriggerCreate("libGame_gt_ScalingTimerExpiration_Func");
TriggerAddEventTimer(libGame_gt_ScalingTimerExpiration, libGame_gv_scalingTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Jungle - Scaling Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_JungleScalingTimerExpires_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((libCore_gv_sYSJungleCreepCamps == true))) {
return false;
}
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gf_JungleUpdateScalingForCamps();
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_JungleScalingTimerExpires_Init () {
libGame_gt_JungleScalingTimerExpires = TriggerCreate("libGame_gt_JungleScalingTimerExpires_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Core - Scaling Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_CoreScalingTimerExpires_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((libCore_gv_sYSMinionAI == true))) {
return false;
}
if (!((libCore_gv_sYSGameMode != libCore_ge_GameModes_ArenaMode))) {
return false;
}
if (!((libCore_gv_sYSGameMode != libCore_ge_GameModes_AttackDefend))) {
return false;
}
if (!((libCore_gv_sYSGameMode != libCore_ge_GameModes_ModeC))) {
return false;
}
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gf_CoreUpdateScaling();
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_CoreScalingTimerExpires_Init () {
libGame_gt_CoreScalingTimerExpires = TriggerCreate("libGame_gt_CoreScalingTimerExpires_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Town - Scaling Timer Expires
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TownScalingTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_townIndex;
int lv_structureIndex;
// Automatic Variable Declarations
int auto7FA69FE1_ae;
const int auto7FA69FE1_ai = 1;
int auto06675179_ae;
const int auto06675179_ai = 1;
unitgroup auto2636383B_g;
int auto2636383B_u;
unit auto2636383B_var;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libCore_gv_sYSMinionAI == true))) {
return false;
}
if (!((libCore_gv_sYSGameMode != libCore_ge_GameModes_ArenaMode))) {
return false;
}
if (!((libCore_gv_sYSGameMode != libCore_ge_GameModes_AttackDefend))) {
return false;
}
if (!((libGame_gv_gameOver == false))) {
return false;
}
if (!((libGame_gv_buildingScalingEnabled == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
auto7FA69FE1_ae = libGame_gv_townTownCount;
lv_townIndex = 1;
for ( ; ( (auto7FA69FE1_ai >= 0 && lv_townIndex <= auto7FA69FE1_ae) || (auto7FA69FE1_ai < 0 && lv_townIndex >= auto7FA69FE1_ae) ) ; lv_townIndex += auto7FA69FE1_ai ) {
auto06675179_ae = libGame_gv_townTownData[lv_townIndex].lv_structureCount;
lv_structureIndex = 1;
for ( ; ( (auto06675179_ai >= 0 && lv_structureIndex <= auto06675179_ae) || (auto06675179_ai < 0 && lv_structureIndex >= auto06675179_ae) ) ; lv_structureIndex += auto06675179_ai ) {
if ((UnitGetType(libGame_gv_townTownData[lv_townIndex].lv_structureUnits[lv_structureIndex]) != "KingsCore")) {
DataTableSetFixed(true, ("%BuildingScalingLifePercent%" + IntToString(UnitGetTag(libGame_gv_townTownData[lv_townIndex].lv_structureUnits[lv_structureIndex]))), UnitGetPropertyFixed(libGame_gv_townTownData[lv_townIndex].lv_structureUnits[lv_structureIndex], c_unitPropLifePercent, c_unitPropCurrent));
}
}
}
if ((libGame_gv_scalingTicks <= 15)) {
}
if ((libGame_gv_scalingTicks >= 11) && (libGame_gv_scalingTicks <= 20)) {
}
auto2636383B_g = UnitGroup(null, c_playerAny, RegionEntireMap(), UnitFilter((1 << c_targetFilterStructure), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto2636383B_u = UnitGroupCount(auto2636383B_g, c_unitCountAll);
for (;; auto2636383B_u -= 1) {
auto2636383B_var = UnitGroupUnitFromEnd(auto2636383B_g, auto2636383B_u);
if (auto2636383B_var == null) { break; }
if ((UnitGetType(auto2636383B_var) != "KingsCore")) {
UnitSetPropertyFixed(auto2636383B_var, c_unitPropLifePercent, DataTableGetFixed(true, ("%BuildingScalingLifePercent%" + IntToString(UnitGetTag(auto2636383B_var)))));
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TownScalingTimerExpires_Init () {
libGame_gt_TownScalingTimerExpires = TriggerCreate("libGame_gt_TownScalingTimerExpires_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Score Tracking Time CCd Enemy Heroes
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ScoreTrackingTimeCCdEnemyHeroes_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_triggeringUnit;
int lv_caster;
fixed lv_duration;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_triggeringUnit = EventUnit();
if (((UnitGetOwner(lv_triggeringUnit) <= 0) || (UnitGetOwner(lv_triggeringUnit) > libCore_gv_bALMaxPlayers) || (UnitTypeTestAttribute(UnitGetType(lv_triggeringUnit), c_unitAttributeHeroic) == false) || (UnitTestState(lv_triggeringUnit, c_unitStateHallucination) == true))) {
return true;
}
lv_caster = UnitBehaviorEffectPlayer(lv_triggeringUnit, EventUnitBehavior(), c_effectPlayerCaster, 0);
if (((lv_caster <= 0) || (lv_caster > libCore_gv_bALMaxPlayers))) {
return true;
}
lv_duration = UnitBehaviorDurationTotal(lv_triggeringUnit, EventUnitBehavior());
if ((lv_duration > 10.0)) {
lv_duration = 10.0;
}
libGame_gv_scoreValues[lv_caster].lv_timeCCdEnemyHeroes += lv_duration;
libGame_gf_ScoreValuesReportRealValueAndLog(lv_caster, "TimeCCdEnemyHeroes", libGame_gv_scoreValues[lv_caster].lv_timeCCdEnemyHeroes);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ScoreTrackingTimeCCdEnemyHeroes_Init () {
libGame_gt_ScoreTrackingTimeCCdEnemyHeroes = TriggerCreate("libGame_gt_ScoreTrackingTimeCCdEnemyHeroes_Func");
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_ScoreTrackingTimeCCdEnemyHeroes, null, c_behaviorCategorySlow, c_unitBehaviorChangeActivate);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_ScoreTrackingTimeCCdEnemyHeroes, null, c_behaviorCategorySlow, c_unitBehaviorChangeRefresh);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_ScoreTrackingTimeCCdEnemyHeroes, null, c_behaviorCategoryDebuffRoot, c_unitBehaviorChangeActivate);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_ScoreTrackingTimeCCdEnemyHeroes, null, c_behaviorCategoryDebuffRoot, c_unitBehaviorChangeRefresh);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_ScoreTrackingTimeCCdEnemyHeroes, null, c_behaviorCategoryStun, c_unitBehaviorChangeActivate);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_ScoreTrackingTimeCCdEnemyHeroes, null, c_behaviorCategoryStun, c_unitBehaviorChangeRefresh);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_ScoreTrackingTimeCCdEnemyHeroes, null, c_behaviorCategoryDebuffStasis, c_unitBehaviorChangeActivate);
TriggerAddEventUnitBehaviorChangeFromCategory(libGame_gt_ScoreTrackingTimeCCdEnemyHeroes, null, c_behaviorCategoryDebuffStasis, c_unitBehaviorChangeRefresh);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Score Tracking Physical Damage
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ScoreTrackingPhysicalDamage_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_damage;
int lv_damagingPlayer;
unit lv_damagingUnit;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_damagingPlayer = UnitGetOwner(EventUnitDamageSourceUnit());
lv_damagingUnit = EventUnitDamageSourceUnit();
lv_damage = FixedToInt(EventUnitDamageAmount());
if (((lv_damagingPlayer <= 0) || (lv_damagingPlayer > libCore_gv_bALMaxPlayers))) {
return true;
}
else {
libGame_gv_scoreValues[lv_damagingPlayer].lv_physicalDamage += lv_damage;
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ScoreTrackingPhysicalDamage_Init () {
libGame_gt_ScoreTrackingPhysicalDamage = TriggerCreate("libGame_gt_ScoreTrackingPhysicalDamage_Func");
TriggerAddEventUnitDamaged(libGame_gt_ScoreTrackingPhysicalDamage, null, c_unitDamageTypeBasic, c_unitDamageEither, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Score Tracking Spell Damage
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ScoreTrackingSpellDamage_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_damage;
int lv_damagingPlayer;
unit lv_damagingUnit;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_damagingPlayer = UnitGetOwner(EventUnitDamageSourceUnit());
lv_damagingUnit = EventUnitDamageSourceUnit();
lv_damage = FixedToInt(EventUnitDamageAmount());
if (((lv_damagingPlayer <= 0) || (lv_damagingPlayer > libCore_gv_bALMaxPlayers))) {
return true;
}
else {
libGame_gv_scoreValues[lv_damagingPlayer].lv_spellDamage += lv_damage;
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ScoreTrackingSpellDamage_Init () {
libGame_gt_ScoreTrackingSpellDamage = TriggerCreate("libGame_gt_ScoreTrackingSpellDamage_Func");
TriggerAddEventUnitDamaged(libGame_gt_ScoreTrackingSpellDamage, null, c_unitDamageTypeAbility, c_unitDamageEither, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Score Tracking Raven Tribute Collected
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ScoreTrackingRavenTributeCollected_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
int lv_itTeam;
int lv_triggeringPlayer;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_triggeringPlayer = libGame_gf_MapCursedHollowTributePickedUpPlayer();
libGame_gv_scoreValues[lv_triggeringPlayer].lv_tributesCollected += 1;
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_triggeringPlayer, "MapMechanics", libGame_gv_scoreValues[lv_triggeringPlayer].lv_tributesCollected);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_triggeringPlayer, "RavenTributesCollected", libGame_gv_scoreValues[lv_triggeringPlayer].lv_tributesCollected);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ScoreTrackingRavenTributeCollected_Init () {
libGame_gt_ScoreTrackingRavenTributeCollected = TriggerCreate("libGame_gt_ScoreTrackingRavenTributeCollected_Func");
libGame_gf_MapCursedHollowTributePickedUp(libGame_gt_ScoreTrackingRavenTributeCollected);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Score Tracking Dragon Activated
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ScoreTrackingDragonActivated_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
int lv_itTeam;
int lv_triggeringPlayer;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_triggeringPlayer = libGame_gf_MapDragonShireDragonActivatedDragonPlayer();
libGame_gv_scoreValues[lv_triggeringPlayer].lv_dragonCaptures += 1;
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_triggeringPlayer, "MapMechanics", libGame_gv_scoreValues[lv_triggeringPlayer].lv_dragonCaptures);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_triggeringPlayer, "DragonNumberOfDragonCaptures", libGame_gv_scoreValues[lv_triggeringPlayer].lv_dragonCaptures);
libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(libGame_gf_MapDragonShireDragonActivatedDragonPlayer())].lv_map_DragonCaptures += 1;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ScoreTrackingDragonActivated_Init () {
libGame_gt_ScoreTrackingDragonActivated = TriggerCreate("libGame_gt_ScoreTrackingDragonActivated_Func");
libGame_gf_MapDragonShireDragonActivated(libGame_gt_ScoreTrackingDragonActivated);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Score Tracking Dragon Shrine Captured
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ScoreTrackingDragonShrineCaptured_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
// Automatic Variable Declarations
playergroup auto2D8867FF_g;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
if ((libGame_gf_MapDragonShireObeliskOwnershipChangeTeam() == 0)) {
return true;
}
auto2D8867FF_g = libGame_gf_MapDragonShireObeliskOwnershipChangeCapturingPlayers();
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto2D8867FF_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
libGame_gv_scoreValues[lv_itPlayer].lv_dragonShrineCaptures += 1;
libGame_gf_SendMapSpecificAwardEvent(lv_itPlayer, libGame_gv_scoreValues[lv_itPlayer].lv_dragonShrineCaptures, false);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_itPlayer, "DragonShrinesCaptured", libGame_gv_scoreValues[lv_itPlayer].lv_dragonShrineCaptures);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ScoreTrackingDragonShrineCaptured_Init () {
libGame_gt_ScoreTrackingDragonShrineCaptured = TriggerCreate("libGame_gt_ScoreTrackingDragonShrineCaptured_Func");
libGame_gf_MapDragonShireObeliskOwnershipChange(libGame_gt_ScoreTrackingDragonShrineCaptured);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Score Tracking Skull Collected
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ScoreTrackingSkullCollected_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
int lv_itTeam;
int lv_triggeringPlayer;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_triggeringPlayer = libGame_gf_MapHauntedMinesSkullCollectedCollectingPlayer();
libGame_gv_scoreValues[lv_triggeringPlayer].lv_skullsCollected += 1;
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_triggeringPlayer, "MapMechanics", libGame_gv_scoreValues[lv_triggeringPlayer].lv_skullsCollected);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_triggeringPlayer, "MinesSkullsCollected", libGame_gv_scoreValues[lv_triggeringPlayer].lv_skullsCollected);
libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lv_triggeringPlayer)].lv_map_SkullsCollected += 1;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ScoreTrackingSkullCollected_Init () {
libGame_gt_ScoreTrackingSkullCollected = TriggerCreate("libGame_gt_ScoreTrackingSkullCollected_Func");
libGame_gf_MapHauntedMinesSkullCollected(libGame_gt_ScoreTrackingSkullCollected);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Score Tracking Seed Collected
//--------------------------------------------------------------------------------------------------
bool libGame_gt_ScoreTrackingSeedCollected_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itPlayer;
int lv_itTeam;
int lv_triggeringPlayer;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_triggeringPlayer = libGame_gf_MapGardenOfTerrorSeedsCollectedCollectingPlayer();
libGame_gv_scoreValues[lv_triggeringPlayer].lv_seedsCollected += 1;
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_triggeringPlayer, "MapMechanics", libGame_gv_scoreValues[lv_triggeringPlayer].lv_seedsCollected);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_triggeringPlayer, "GardensSeedsCollected", libGame_gv_scoreValues[lv_triggeringPlayer].lv_seedsCollected);
libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lv_triggeringPlayer)].lv_map_SeedsCollected += 1;
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_ScoreTrackingSeedCollected_Init () {
libGame_gt_ScoreTrackingSeedCollected = TriggerCreate("libGame_gt_ScoreTrackingSeedCollected_Func");
libGame_gf_MapGardenOfTerrorSeedsCollected(libGame_gt_ScoreTrackingSeedCollected);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Talents Choice Selected
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TalentsChoiceSelected_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gf_TalentsChooseTalentForPlayer(libGame_gv_talents_ActiveChoiceTierForPlayer[EventPlayer()], TalentTreeGetSelectedHeroTalentTreeColumn(EventPlayer(), libGame_gv_talents_ActiveChoiceTierForPlayer[EventPlayer()]), EventPlayer());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TalentsChoiceSelected_Init () {
libGame_gt_TalentsChoiceSelected = TriggerCreate("libGame_gt_TalentsChoiceSelected_Func");
TriggerAddEventHeroTalentTreeSelected(libGame_gt_TalentsChoiceSelected, c_playerAny);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Tower - Tower Dead State Gate Check
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TowerTowerDeadStateGateCheck_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
unitgroup autoD3969D85_g;
int autoD3969D85_u;
unit autoD3969D85_var;
// Actions
if (!runActions) {
return true;
}
autoD3969D85_g = UnitGroup(null, c_playerAny, RegionCircle(UnitGetPosition(EventUnit()), 6.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
autoD3969D85_u = UnitGroupCount(autoD3969D85_g, c_unitCountAll);
for (;; autoD3969D85_u -= 1) {
autoD3969D85_var = UnitGroupUnitFromEnd(autoD3969D85_g, autoD3969D85_u);
if (autoD3969D85_var == null) { break; }
if ((UnitTypeTestFlag(UnitGetType(autoD3969D85_var), c_unitFlagTownStructureGate) == true)) {
return true;
}
}
UnitBehaviorAdd(EventUnit(), "UnitGivesNoXP", EventUnit(), 1);
UnitKill(EventUnit());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TowerTowerDeadStateGateCheck_Init () {
libGame_gt_TowerTowerDeadStateGateCheck = TriggerCreate("libGame_gt_TowerTowerDeadStateGateCheck_Func");
TriggerAddEventUnitAbility(libGame_gt_TowerTowerDeadStateGateCheck, null, AbilityCommand("TowerDeadMorph", 0), c_abilMorphStageUnitEnd, false);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Tower - Tower Morph To Dead State Structure "Dies"
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TowerTowerMorphToDeadStateStructureDies_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_tower;
int lv_itPlayer;
int lv_townIndex;
int lv_structureIndex;
int lv_killingFaction;
int lv_xPAwarded;
// Automatic Variable Declarations
// Variable Initialization
lv_tower = EventPlayerEffectUsedUnit(c_effectUnitCaster);
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
lv_townIndex = libGame_gf_TownGetTownForUnit(EventPlayerEffectUsedUnit(c_effectUnitCaster));
lv_structureIndex = libGame_gf_TownGetTownStructureIndexForUnit(EventPlayerEffectUsedUnit(c_effectUnitCaster));
lv_xPAwarded = CatalogFieldValueGetAsInt(c_gameCatalogUnit, UnitGetType(EventPlayerEffectUsedUnit(c_effectUnitCaster)), "KillXP", c_playerAny);
libGame_gf_AwardXPForNPCKill(EventPlayerEffectUsedUnit(c_effectUnitCaster), UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster)), c_unitAttributeStructure, EventPlayerEffectUsedUnitOwner(c_effectPlayerTarget), lv_xPAwarded);
libGame_gf_SendEventTownStructureEntersSpecialDeathState(lv_tower);
if ((UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster)) == libCore_gv_cOMPUTER_TeamOrder)) {
lv_killingFaction = libGame_ge_Faction_Chaos;
}
else {
lv_killingFaction = libGame_ge_Faction_Order;
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TowerTowerMorphToDeadStateStructureDies_Init () {
libGame_gt_TowerTowerMorphToDeadStateStructureDies = TriggerCreate("libGame_gt_TowerTowerMorphToDeadStateStructureDies_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_TowerTowerMorphToDeadStateStructureDies, c_playerAny, "TownCannonTowerDeathSet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Town System
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializeTownSystem_Func (bool testConds, bool runActions) {
// Variable Declarations
const fixed lv_workerSpreadArc = 30.0;
int lv_town;
unit lv_u;
int lv_townStructureType;
int lv_townStructureIndex;
int lv_townEnemyTeam;
// Automatic Variable Declarations
int autoFDF0F771_ae;
const int autoFDF0F771_ai = 1;
unitgroup auto720E8216_g;
int auto720E8216_u;
unitgroup auto408FF192_g;
int auto408FF192_u;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libCore_gv_sYSTowns == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_townsRemaining = 0;
libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_townsRemaining = 0;
autoFDF0F771_ae = libGame_gv_townTownCount;
lv_town = 1;
for ( ; ( (autoFDF0F771_ai >= 0 && lv_town <= autoFDF0F771_ae) || (autoFDF0F771_ai < 0 && lv_town >= autoFDF0F771_ae) ) ; lv_town += autoFDF0F771_ai ) {
libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(libGame_gv_townTownData[lv_town].lv_owner)].lv_townsRemaining += 1;
libGame_gv_townTownData[lv_town].lv_structureCount = 0;
libGame_gv_townTownData[lv_town].lv_structuresAlive = 0;
if ((libGame_gv_townTownData[lv_town].lv_owner == libCore_gv_cOMPUTER_TeamOrder)) {
lv_townEnemyTeam = libCore_gv_cOMPUTER_TeamChaos;
}
else {
lv_townEnemyTeam = libCore_gv_cOMPUTER_TeamOrder;
}
auto720E8216_g = UnitGroup(null, libGame_gv_townTownData[lv_town].lv_owner, libGame_gv_townTownData[lv_town].lv_townRegion, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto720E8216_u = UnitGroupCount(auto720E8216_g, c_unitCountAll);
for (;; auto720E8216_u -= 1) {
lv_u = UnitGroupUnitFromEnd(auto720E8216_g, auto720E8216_u);
if (lv_u == null) { break; }
if ((libGame_gf_TownGetTownStructurePresetFromUnit(lv_u) == libGame_ge_TownStructureTypes_TownHall)) {
lv_townStructureType = libGame_gf_TownGetTownStructurePresetFromUnit(lv_u);
libGame_gf_TownAddStructureToTownArray(lv_town, lv_u, lv_townStructureType, lv_townEnemyTeam);
break;
}
}
auto408FF192_g = UnitGroup(null, libGame_gv_townTownData[lv_town].lv_owner, libGame_gv_townTownData[lv_town].lv_townRegion, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto408FF192_u = UnitGroupCount(auto408FF192_g, c_unitCountAll);
for (;; auto408FF192_u -= 1) {
lv_u = UnitGroupUnitFromEnd(auto408FF192_g, auto408FF192_u);
if (lv_u == null) { break; }
if ((libGame_gf_TownGetTownStructurePresetFromUnit(lv_u) != libGame_ge_TownStructureTypes_TownHall)) {
lv_townStructureType = libGame_gf_TownGetTownStructurePresetFromUnit(lv_u);
libGame_gf_TownAddStructureToTownArray(lv_town, lv_u, lv_townStructureType, lv_townEnemyTeam);
}
}
}
libGame_gf_SendEventTownDataInitialized();
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializeTownSystem_Init () {
libGame_gt_InitializeTownSystem = TriggerCreate("libGame_gt_InitializeTownSystem_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Kill Standalone Towers
//--------------------------------------------------------------------------------------------------
bool libGame_gt_KillStandaloneTowers_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
unitgroup auto61769700_g;
int auto61769700_u;
unit auto61769700_var;
// Actions
if (!runActions) {
return true;
}
if ((UnitGetType(EventUnit()) == "TownTownHallL2")) {
auto61769700_g = UnitGroupSearch(null, c_playerAny, UnitGetPosition(EventUnit()), 15.0, UnitFilter((1 << c_targetFilterStructure), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto61769700_u = UnitGroupCount(auto61769700_g, c_unitCountAll);
for (;; auto61769700_u -= 1) {
auto61769700_var = UnitGroupUnitFromEnd(auto61769700_g, auto61769700_u);
if (auto61769700_var == null) { break; }
if ((UnitGetType(auto61769700_var) == "TownCannonTowerL3Standalone")) {
UnitDamage(auto61769700_var, "TowerDeathDamage", auto61769700_var, 20000.0);
break;
}
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_KillStandaloneTowers_Init () {
libGame_gt_KillStandaloneTowers = TriggerCreate("libGame_gt_KillStandaloneTowers_Func");
TriggerAddEventUnitDied(libGame_gt_KillStandaloneTowers, null);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Moonwell Minimap Icons on Towns
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializeMoonwellIconsonTowns_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_town;
// Automatic Variable Declarations
int autoEEE30D1B_ae;
const int autoEEE30D1B_ai = 1;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libCore_gv_sYSTowns == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
Wait(0.0625, c_timeGame);
autoEEE30D1B_ae = libGame_gv_townTownCount;
lv_town = 1;
for ( ; ( (autoEEE30D1B_ai >= 0 && lv_town <= autoEEE30D1B_ae) || (autoEEE30D1B_ai < 0 && lv_town >= autoEEE30D1B_ae) ) ; lv_town += autoEEE30D1B_ai ) {
libGame_gf_TownAddMoonwellMinimapIconstoTown(lv_town);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializeMoonwellIconsonTowns_Init () {
libGame_gt_InitializeMoonwellIconsonTowns = TriggerCreate("libGame_gt_InitializeMoonwellIconsonTowns_Func");
libGame_gf_GameOpenTimerStarted(libGame_gt_InitializeMoonwellIconsonTowns);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Town - Mid-Late Game Power Transition On
//--------------------------------------------------------------------------------------------------
bool libGame_gt_TownMidLateGamePowerTransitionOn_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((libGame_gv_townMidLateGamePowerTransitionOn == false)) {
libGame_gv_townMidLateGamePowerTransitionOn = true;
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "Amount", 11, "200");
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "Amount", 12, "200");
CatalogFieldValueSet(c_gameCatalogWeapon, "KingsCore", "Period", 11, ".5");
CatalogFieldValueSet(c_gameCatalogWeapon, "KingsCore", "Period", 12, ".5");
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(2) + "]", 11, "2");
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(2) + "]", 12, "2");
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(10) + "]", 11, "2");
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(10) + "]", 12, "2");
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(7) + "]", 11, "2");
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(7) + "]", 12, "2");
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponSearch", "AreaArray[" + IntToString(0) + "].Radius", 11, ".0625");
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponSearch", "AreaArray[" + IntToString(0) + "].Radius", 12, ".0625");
CatalogFieldValueSet(c_gameCatalogWeapon, "CatapultMinion", "Range", 11, "11");
CatalogFieldValueSet(c_gameCatalogWeapon, "CatapultMinion", "Range", 12, "11");
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_D8B9060B"), true);
}
else {
libGame_gv_townMidLateGamePowerTransitionOn = false;
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "Amount", 11, CatalogFieldValueGet(c_gameCatalogUnit, "KingsCoreWeaponDamage", "Amount", 0));
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "Amount", 12, CatalogFieldValueGet(c_gameCatalogUnit, "KingsCoreWeaponDamage", "Amount", 0));
CatalogFieldValueSet(c_gameCatalogWeapon, "KingsCore", "Period", 11, CatalogFieldValueGet(c_gameCatalogWeapon, "KingsCore", "Period", 0));
CatalogFieldValueSet(c_gameCatalogWeapon, "KingsCore", "Period", 12, CatalogFieldValueGet(c_gameCatalogWeapon, "KingsCore", "Period", 0));
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(2) + "]", 11, CatalogFieldValueGet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(2) + "]", 0));
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(2) + "]", 12, CatalogFieldValueGet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(2) + "]", 0));
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(10) + "]", 11, CatalogFieldValueGet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(10) + "]", 0));
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(10) + "]", 12, CatalogFieldValueGet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(10) + "]", 0));
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(7) + "]", 11, CatalogFieldValueGet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(7) + "]", 0));
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(7) + "]", 12, CatalogFieldValueGet(c_gameCatalogEffect, "KingsCoreWeaponDamage", "AttributeFactor[" + IntToString(7) + "]", 0));
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponSearch", "AreaArray[" + IntToString(0) + "].Radius", 11, CatalogFieldValueGet(c_gameCatalogEffect, "KingsCoreWeaponSearch", "AreaArray[" + IntToString(0) + "].Radius", 0));
CatalogFieldValueSet(c_gameCatalogEffect, "KingsCoreWeaponSearch", "AreaArray[" + IntToString(0) + "].Radius", 12, CatalogFieldValueGet(c_gameCatalogEffect, "KingsCoreWeaponSearch", "AreaArray[" + IntToString(0) + "].Radius", 0));
CatalogFieldValueSet(c_gameCatalogWeapon, "CatapultMinion", "Range", 11, CatalogFieldValueGet(c_gameCatalogWeapon, "CatapultMinion", "Range", 0));
CatalogFieldValueSet(c_gameCatalogWeapon, "CatapultMinion", "Range", 12, CatalogFieldValueGet(c_gameCatalogWeapon, "CatapultMinion", "Range", 0));
TriggerDebugOutput(1, StringExternal("Param/Value/lib_Game_238C6FF6"), true);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_TownMidLateGamePowerTransitionOn_Init () {
libGame_gt_TownMidLateGamePowerTransitionOn = TriggerCreate("libGame_gt_TownMidLateGamePowerTransitionOn_Func");
TriggerAddEventChatMessage(libGame_gt_TownMidLateGamePowerTransitionOn, c_playerAny, "-morecore", true);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hall Of Storms - Knockback Launch Missile
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HallOfStormsKnockbackLaunchMissile_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_base;
unit lv_targetUnit;
fixed lv_abilityRange;
fixed lv_distanceFromBasePlayerTargetPoint;
fixed lv_baseRadius;
point lv_targetPoint;
point lv_actualTargetPoint;
fixed lv_modifiedDistance;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_base = EventPlayerEffectUsedUnit(c_effectUnitCaster);
lv_targetUnit = EventPlayerEffectUsedUnit(c_effectUnitTarget);
lv_abilityRange = libGame_gv_hallOfStormsKnockbackLaunchDistance;
lv_targetPoint = libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lv_base), libGame_gv_hallOfStormsKnockbackLaunchDistance, UnitGetPosition(lv_targetUnit));
lv_actualTargetPoint = lv_targetPoint;
if ((PointPathingPassable(lv_actualTargetPoint) == false)) {
lv_actualTargetPoint = libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lv_base))].lv_core), 7.5, UnitGetPosition(lv_base));
}
UnitCreateEffectPoint(lv_targetUnit, "HallOfStormsKnockbackLaunchMissile", lv_actualTargetPoint);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HallOfStormsKnockbackLaunchMissile_Init () {
libGame_gt_HallOfStormsKnockbackLaunchMissile = TriggerCreate("libGame_gt_HallOfStormsKnockbackLaunchMissile_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_HallOfStormsKnockbackLaunchMissile, c_playerAny, "HallOfStormsKnockbackDummySet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hall Of Storms - Knockback Unit Enters Region
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HallOfStormsKnockbackUnitEntersRegion_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
if ((UnitHasBehavior2(libGame_gf_UnitEntersSafeZonePuntRegionUnit(), "HallOfStormsKnockbackKillable") == true)) {
UnitKill(libGame_gf_UnitEntersSafeZonePuntRegionUnit());
}
else {
UnitCreateEffectPoint(libGame_gf_UnitEntersSafeZonePuntRegionUnit(), "HallOfStormsKnockbackLaunchMissile", libGame_gf_UnitEntersSafeZonePuntRegionPuntPoint());
PlayerCreateEffectUnit(UnitGetOwner(libGame_gf_UnitEntersSafeZonePuntRegionUnit()), "HallOfStormsKnockbackImpactSet", libGame_gf_UnitEntersSafeZonePuntRegionUnit());
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HallOfStormsKnockbackUnitEntersRegion_Init () {
libGame_gt_HallOfStormsKnockbackUnitEntersRegion = TriggerCreate("libGame_gt_HallOfStormsKnockbackUnitEntersRegion_Func");
TriggerEnable(libGame_gt_HallOfStormsKnockbackUnitEntersRegion, false);
libGame_gf_UnitEntersSafeZonePuntRegion(libGame_gt_HallOfStormsKnockbackUnitEntersRegion);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hall Of Storms - Unit Enters Region
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HallOfStormsUnitEntersRegion_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
UnitCreateEffectUnit(libGame_gf_UnitEntersSafeZoneRegionUnit(), "HallOfStormsAllyApplySet", libGame_gf_UnitEntersSafeZoneRegionUnit());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HallOfStormsUnitEntersRegion_Init () {
libGame_gt_HallOfStormsUnitEntersRegion = TriggerCreate("libGame_gt_HallOfStormsUnitEntersRegion_Func");
TriggerEnable(libGame_gt_HallOfStormsUnitEntersRegion, false);
libGame_gf_UnitEntersSafeZoneRegion(libGame_gt_HallOfStormsUnitEntersRegion);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Hall Of Storms - Unit Exits Region
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HallOfStormsUnitExitsRegion_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
UnitBehaviorRemove(libGame_gf_UnitExitsSafeZoneRegionUnit(), "HallOfStormsProtectionBuff", 1);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HallOfStormsUnitExitsRegion_Init () {
libGame_gt_HallOfStormsUnitExitsRegion = TriggerCreate("libGame_gt_HallOfStormsUnitExitsRegion_Func");
TriggerEnable(libGame_gt_HallOfStormsUnitExitsRegion, false);
libGame_gf_UnitExitsSafeZoneRegion(libGame_gt_HallOfStormsUnitExitsRegion);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Vehicle Reconnection Monitor
//--------------------------------------------------------------------------------------------------
bool libGame_gt_VehicleReconnectionMonitor_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((libGame_gv_players[EventPlayer()].lv_activeVehicle != null))) {
return false;
}
if (!((UnitIsValid(libGame_gv_players[EventPlayer()].lv_activeVehicle) == true))) {
return false;
}
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libUIUI_gf_UIHeroConsoleSetUpForPlayer(libGame_gv_players[EventPlayer()].lv_activeVehicle, EventPlayer());
libUIUI_gf_InitPathingLines(libGame_gv_players[EventPlayer()].lv_activeVehicle, EventPlayer());
libUIUI_gf_HeroConsoleUnitStatusBarsSetUnitForBars(libGame_gv_players[EventPlayer()].lv_activeVehicle, EventPlayer());
libGame_gf_UnitSelectionEnterVehicle(libGame_gv_players[EventPlayer()].lv_activeVehicle, libGame_gv_players[EventPlayer()].lv_heroUnit, EventPlayer());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_VehicleReconnectionMonitor_Init () {
libGame_gt_VehicleReconnectionMonitor = TriggerCreate("libGame_gt_VehicleReconnectionMonitor_Func");
TriggerAddEventPlayerJoin(libGame_gt_VehicleReconnectionMonitor, c_playerAny);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Kael'thas - Enters Vehicle
//--------------------------------------------------------------------------------------------------
bool libGame_gt_KaelthasEntersVehicle_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
// Automatic Variable Declarations
// Variable Initialization
lv_player = libGame_gf_UseVehicleHeroPlayer();
// Conditions
if (testConds) {
if (!((PlayerHasTalent(lv_player, "KaelthasPhoenixRebirth") == true))) {
return false;
}
if (!((libGDHL_gv_kaelthas_PhoenixUnit[lv_player] != null))) {
return false;
}
if (!((UnitIsAlive(libGDHL_gv_kaelthas_PhoenixUnit[lv_player]) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
UnitSelect(libGDHL_gv_kaelthas_PhoenixUnit[lv_player], lv_player, false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_KaelthasEntersVehicle_Init () {
libGame_gt_KaelthasEntersVehicle = TriggerCreate("libGame_gt_KaelthasEntersVehicle_Func");
TriggerEnable(libGame_gt_KaelthasEntersVehicle, false);
libGame_gf_HeroEnteredVehicleInstant(libGame_gt_KaelthasEntersVehicle);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Kael'thas - Stops Occupying Vehicle
//--------------------------------------------------------------------------------------------------
bool libGame_gt_KaelthasStopsOccupyingVehicle_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
// Automatic Variable Declarations
fixed auto76D38221_at;
// Variable Initialization
lv_player = libGame_gf_UnitStopsOccupyingVehiclePlayer();
// Conditions
if (testConds) {
if (!((PlayerHasTalent(libGame_gf_UnitStopsOccupyingVehiclePlayer(), "KaelthasPhoenixRebirth") == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
auto76D38221_at = 0;
while (!((UnitIsSelected(libGame_gv_players[lv_player].lv_heroUnit, lv_player) == true)) && auto76D38221_at <= 1.0) {
Wait(0.0625, c_timeGame);
auto76D38221_at = auto76D38221_at + 0.0625;
}
if ((libGDHL_gv_kaelthas_PhoenixUnit[lv_player] != null) && (UnitIsAlive(libGDHL_gv_kaelthas_PhoenixUnit[lv_player]) == true)) {
UnitSelect(libGDHL_gv_kaelthas_PhoenixUnit[lv_player], lv_player, true);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_KaelthasStopsOccupyingVehicle_Init () {
libGame_gt_KaelthasStopsOccupyingVehicle = TriggerCreate("libGame_gt_KaelthasStopsOccupyingVehicle_Func");
TriggerEnable(libGame_gt_KaelthasStopsOccupyingVehicle, false);
libGame_gf_UnitStopsOccupyingVehicleInstant(libGame_gt_KaelthasStopsOccupyingVehicle);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Unit Selection - Vehicle Entered
//--------------------------------------------------------------------------------------------------
bool libGame_gt_UnitSelectionVehicleEntered_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gf_UnitSelectionEnterVehicle(libGame_gf_UseVehicleVehicleUnit(), libGame_gf_UseVehiclePassengerHero(), libGame_gf_UseVehicleHeroPlayer());
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_UnitSelectionVehicleEntered_Init () {
libGame_gt_UnitSelectionVehicleEntered = TriggerCreate("libGame_gt_UnitSelectionVehicleEntered_Func");
libGame_gf_HeroEnteredVehicleInstant(libGame_gt_UnitSelectionVehicleEntered);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Unit Selection - Vehicle Swapped
//--------------------------------------------------------------------------------------------------
bool libGame_gt_UnitSelectionVehicleSwapped_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libGame_gf_UnitSelectionSwapVehicle(libGame_gf_VehicleSwappedOriginVehicle(), libGame_gf_VehicleSwappedNewVehicle(), UnitGetOwner(libGame_gf_VehicleSwappedPassengerHero()));
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_UnitSelectionVehicleSwapped_Init () {
libGame_gt_UnitSelectionVehicleSwapped = TriggerCreate("libGame_gt_UnitSelectionVehicleSwapped_Func");
libGame_gf_HeroSwappedVehicleInstant(libGame_gt_UnitSelectionVehicleSwapped);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Unit Selection - On Unit Deselected
//--------------------------------------------------------------------------------------------------
bool libGame_gt_UnitSelectionOnUnitDeselected_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
// Automatic Variable Declarations
unitgroup autoB7484277_g;
int autoB7484277_u;
unit autoB7484277_var;
// Variable Initialization
lv_player = EventPlayer();
// Conditions
if (testConds) {
if (!((UnitGetType(EventUnit()) != "RexxarMisha"))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((lv_player != c_playerAny) && (UnitGroupCount(UnitGroupSelected(lv_player), c_unitCountAll) == 0)) {
autoB7484277_g = libGame_gv_players[lv_player].lv_heroUnitGroup;
autoB7484277_u = UnitGroupCount(autoB7484277_g, c_unitCountAll);
for (;; autoB7484277_u -= 1) {
autoB7484277_var = UnitGroupUnitFromEnd(autoB7484277_g, autoB7484277_u);
if (autoB7484277_var == null) { break; }
if (true) {
UnitSelect(autoB7484277_var, lv_player, true);
}
else {
return true;
}
}
libGame_gv_players[lv_player].lv_cameraPlayerUnitGroupToFocusOn = UnitGroupCopy(libGame_gv_players[lv_player].lv_heroUnitGroup);
libGame_gf_CameraUpdateCameraForPlayer(lv_player);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_UnitSelectionOnUnitDeselected_Init () {
libGame_gt_UnitSelectionOnUnitDeselected = TriggerCreate("libGame_gt_UnitSelectionOnUnitDeselected_Func");
TriggerAddEventUnitSelected(libGame_gt_UnitSelectionOnUnitDeselected, null, c_playerAny, false);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Vehicles - Vehicle Entered
//--------------------------------------------------------------------------------------------------
bool libGame_gt_VehiclesVehicleEntered_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_hero;
unit lv_vehicle;
int lv_player;
int lv_index_Vehicle;
unit lv_linkedVehicle;
int lv_index_LinkedVehicle;
// Automatic Variable Declarations
// Variable Initialization
lv_hero = EventPlayerEffectUsedUnit(c_effectUnitCaster);
lv_vehicle = EventPlayerEffectUsedUnit(c_effectUnitTarget);
lv_player = UnitGetOwner(lv_hero);
lv_index_Vehicle = libMapM_gf_GetVehicleIndexOfUnit(lv_vehicle);
lv_linkedVehicle = libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_LinkedVehicle;
lv_index_LinkedVehicle = libMapM_gf_GetVehicleIndexOfUnit(lv_linkedVehicle);
// Conditions
if (testConds) {
if (!(((libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_UnitInsideVehicle == null) || (libMapM_gv_vehicle[lv_index_LinkedVehicle].lv_unit_UnitInsideVehicle == null)))) {
return false;
}
if (!(((UnitGetOwner(libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_UnitInsideVehicle) != lv_player) || (UnitGetOwner(libMapM_gv_vehicle[lv_index_LinkedVehicle].lv_unit_UnitInsideVehicle) != lv_player)))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if (((UnitIsAlive(lv_vehicle) == false) || (UnitIsAlive(lv_hero) == false))) {
UnitBehaviorRemove(lv_hero, "VehicleGenericUseVehicleCasterBehaviorImmediatelyApplied", 1);
return true;
}
UnitCreateEffectUnit(lv_hero, "UseVehicleApplyCasterBehavior", lv_hero);
if ((libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_UnitInsideVehicle != null) && (libMapM_gv_vehicle[lv_index_LinkedVehicle].lv_unit_Vehicle != null) && (libMapM_gv_vehicle[lv_index_LinkedVehicle].lv_unit_UnitInsideVehicle == null)) {
lv_vehicle = libMapM_gv_vehicle[lv_index_LinkedVehicle].lv_unit_Vehicle;
}
UnitCreateEffectUnit(lv_hero, "UseVehicleApplyVehicleBehavior", lv_vehicle);
UnitOrderCopy(lv_hero, lv_vehicle, 32);
libMapM_gf_PlayerEntersVehicle(lv_hero, lv_vehicle);
if ((UnitHasBehavior2(lv_vehicle, "VehicleGenericIsAttachedVehicle") == true)) {
UnitCreateEffectUnit(libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_LinkedVehicle, "AttachedVehicle_AddTrackedUnit", lv_hero);
}
else {
UnitCreateEffectUnit(libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_Vehicle, "VehicleAddTrackedUnit", lv_hero);
}
libGame_gf_VehiclesUseVehicle(lv_player, lv_hero, lv_vehicle, true, true);
libGame_gf_SendInstantEventPlayerEnteredVehicle(lv_player, lv_vehicle, lv_hero, lv_vehicle);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_VehiclesVehicleEntered_Init () {
libGame_gt_VehiclesVehicleEntered = TriggerCreate("libGame_gt_VehiclesVehicleEntered_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_VehiclesVehicleEntered, c_playerAny, "UseVehicleCastCompleteSet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Vehicles - Vehicle Swapped
//--------------------------------------------------------------------------------------------------
bool libGame_gt_VehiclesVehicleSwapped_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_originVehicle;
int lv_index_OriginVehicle;
unit lv_newVehicle;
int lv_index_NewVehicle;
unit lv_hero;
int lv_player;
// Automatic Variable Declarations
// Variable Initialization
lv_originVehicle = EventPlayerEffectUsedUnit(c_effectUnitCaster);
lv_index_OriginVehicle = libMapM_gf_GetVehicleIndexOfUnit(lv_originVehicle);
lv_newVehicle = libMapM_gv_vehicle[lv_index_OriginVehicle].lv_unit_LinkedVehicle;
lv_index_NewVehicle = libMapM_gf_GetVehicleIndexOfUnit(lv_newVehicle);
lv_hero = libMapM_gv_vehicle[lv_index_OriginVehicle].lv_unit_UnitInsideVehicle;
lv_player = UnitGetOwner(lv_hero);
// Conditions
if (testConds) {
if (!((UnitIsAlive(lv_originVehicle) == true))) {
return false;
}
if (!((UnitIsAlive(lv_newVehicle) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((UnitHasBehavior2(lv_newVehicle, "VehicleGenericIsAttachedVehicle") == true)) {
UnitCreateEffectUnit(lv_originVehicle, "AttachedVehicle_AddTrackedUnit", lv_hero);
UnitCreateEffectUnit(lv_originVehicle, "VehicleClearTrackedUnits", lv_hero);
}
else {
UnitCreateEffectUnit(lv_newVehicle, "AttachedVehicle_RemoveTrackedUnit", lv_hero);
UnitCreateEffectUnit(lv_newVehicle, "VehicleAddTrackedUnit", lv_hero);
}
UnitSetOwnerPreserveUpkeep(lv_originVehicle, libGame_gf_ComputerPlayerInTeam(libGame_gf_TeamNumberOfPlayer(lv_player)), true);
UnitBehaviorRemove(lv_originVehicle, "GenericVehicleBehaviorOccupied", 1);
UnitBehaviorAdd(lv_originVehicle, "GenericVehicleBehaviorEmpty", lv_originVehicle, 1);
UnitBehaviorAdd(lv_newVehicle, "GenericVehicleBehaviorOccupied", lv_newVehicle, 1);
AIRemovePlayerUnit(lv_originVehicle);
libMapM_gf_SwapVehicleForPlayer(lv_originVehicle, lv_newVehicle);
libGame_gf_VehiclesUseVehicle(lv_player, lv_hero, lv_newVehicle, false, false);
libGame_gf_SendInstantEventPlayerSwappedVehicle(UnitGetOwner(libMapM_gv_vehicle[lv_index_NewVehicle].lv_unit_UnitInsideVehicle), libMapM_gv_vehicle[lv_index_NewVehicle].lv_unit_UnitInsideVehicle, lv_originVehicle, lv_newVehicle);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_VehiclesVehicleSwapped_Init () {
libGame_gt_VehiclesVehicleSwapped = TriggerCreate("libGame_gt_VehiclesVehicleSwapped_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_VehiclesVehicleSwapped, c_playerAny, "VehicleGenericSwapSet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Vehicles - Vehicle Abandoned
//--------------------------------------------------------------------------------------------------
bool libGame_gt_VehiclesVehicleAbandoned_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
unit lv_vehicle;
int lv_index_Vehicle;
unit lv_linkedVehicle;
int lv_index_LinkedVehicle;
// Automatic Variable Declarations
// Variable Initialization
lv_player = EventPlayerEffectUsedUnitOwner(c_effectPlayerCaster);
lv_vehicle = EventPlayerEffectUsedUnit(c_effectUnitCaster);
lv_index_Vehicle = libMapM_gf_GetVehicleIndexOfUnit(lv_vehicle);
lv_linkedVehicle = libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_LinkedVehicle;
lv_index_LinkedVehicle = libMapM_gf_GetVehicleIndexOfUnit(lv_linkedVehicle);
// Actions
if (!runActions) {
return true;
}
if ((libMapM_gv_vehicle[lv_index_LinkedVehicle].lv_unit_UnitInsideVehicle == null)) {
ActorSend(libNtve_gf_MainActorofUnit(lv_vehicle), "Signal VehicleAbandoned");
ActorSend(libNtve_gf_MainActorofUnit(libMapM_gv_vehicle[lv_index_LinkedVehicle].lv_unit_Vehicle), "Signal VehicleAbandoned");
}
if ((UnitHasBehavior2(lv_vehicle, "VehicleGenericIsAttachedVehicle") == false)) {
UnitCreateEffectUnit(libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_Vehicle, "VehicleClearTrackedUnits", libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_UnitInsideVehicle);
}
else {
UnitCreateEffectUnit(libMapM_gv_vehicle[lv_index_LinkedVehicle].lv_unit_Vehicle, "AttachedVehicle_RemoveTrackedUnit", libMapM_gv_vehicle[lv_index_LinkedVehicle].lv_unit_UnitInsideVehicle);
}
UnitBehaviorRemove(libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_UnitInsideVehicle, "VehicleGenericUseVehicleCasterBehaviorImmediatelyApplied", 1);
libGame_gf_SendInstantEventUnitStopsOccupyingVehicle(lv_player, libMapM_gv_vehicle[lv_index_Vehicle].lv_unit_UnitInsideVehicle, lv_vehicle);
UnitBehaviorRemove(lv_vehicle, "GenericVehicleBehaviorOccupied", 1);
UnitBehaviorAdd(lv_vehicle, "GenericVehicleBehaviorEmpty", lv_vehicle, 1);
libGame_gf_UnitSelectionExitVehicle(lv_vehicle, libMapM_gv_vehicle[libMapM_gf_GetVehicleIndexOfUnit(lv_vehicle)].lv_unit_UnitInsideVehicle, lv_player);
libGame_gf_VehiclesReturnPlayerFromVehicleAtPoint(lv_player, UnitGetPosition(lv_vehicle));
UnitSetOwnerPreserveUpkeep(lv_vehicle, libGame_gf_ComputerPlayerInTeam(libGame_gf_TeamNumberOfPlayer(lv_player)), true);
AIRemovePlayerUnit(libGame_gv_players[lv_player].lv_activeVehicle);
libGame_gv_players[lv_player].lv_activeVehicle = null;
if ((UnitGetPropertyFixed(libGame_gv_players[lv_player].lv_heroUnit, c_unitPropLifePercent, c_unitPropCurrent) <= libUIUI_gv_uIDamageFlashLowHPThreshold)) {
libUIUI_gf_UIDamageFlashStartLowHPSoundAndScreenEffects(lv_player);
}
if ((libNtve_gf_UnitIsInsideTransport(libGame_gv_players[lv_player].lv_heroUnit) == true)) {
libUIUI_gf_UIHeroConsoleSetUpForPlayer(UnitTransport(libGame_gv_players[lv_player].lv_heroUnit), lv_player);
libUIUI_gf_HeroConsoleUnitStatusBarsSetUnitForBars(UnitTransport(libGame_gv_players[lv_player].lv_heroUnit), lv_player);
}
else {
libUIUI_gf_UIHeroConsoleSetUpForPlayer(libGame_gv_players[lv_player].lv_heroUnit, lv_player);
libUIUI_gf_HeroConsoleUnitStatusBarsSetUnitForBars(libGame_gv_players[lv_player].lv_heroUnit, lv_player);
}
libGame_gf_SendInstantEventPlayerAbandonedVehicle(lv_player, libMapM_gv_vehicle[libMapM_gf_GetVehicleIndexOfUnit(lv_vehicle)].lv_unit_UnitInsideVehicle, lv_vehicle);
libMapM_gf_PlayerLeavesVehicle(libMapM_gf_GetVehicleIndexOfUnit(lv_vehicle));
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_VehiclesVehicleAbandoned_Init () {
libGame_gt_VehiclesVehicleAbandoned = TriggerCreate("libGame_gt_VehiclesVehicleAbandoned_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_VehiclesVehicleAbandoned, c_playerAny, "LeaveVehicleApplyTimedLife");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Vehicles - Vehicle Dies
//--------------------------------------------------------------------------------------------------
bool libGame_gt_VehiclesVehicleDies_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_activeVehicleIndex;
unit lv_vehicle;
int lv_player;
// Automatic Variable Declarations
const int autoEB417FA1_ae = libCore_gv_bALMaxPlayers;
const int autoEB417FA1_ai = 1;
// Variable Initialization
lv_vehicle = EventPlayerEffectUsedUnit(c_effectUnitSource);
// Actions
if (!runActions) {
return true;
}
if (((lv_vehicle == null) || (libMapM_gf_GetVehicleIndexOfUnit(lv_vehicle) == 0))) {
return true;
}
lv_activeVehicleIndex = 1;
for ( ; ( (autoEB417FA1_ai >= 0 && lv_activeVehicleIndex <= autoEB417FA1_ae) || (autoEB417FA1_ai < 0 && lv_activeVehicleIndex >= autoEB417FA1_ae) ) ; lv_activeVehicleIndex += autoEB417FA1_ai ) {
if ((lv_vehicle == libGame_gv_players[lv_activeVehicleIndex].lv_activeVehicle)) {
lv_player = lv_activeVehicleIndex;
UnitBehaviorRemove(libMapM_gv_vehicle[libMapM_gf_GetVehicleIndexOfUnit(lv_vehicle)].lv_unit_UnitInsideVehicle, "VehicleGenericUseVehicleCasterBehaviorImmediatelyApplied", 1);
libGame_gf_UnitSelectionExitVehicle(lv_vehicle, libMapM_gv_vehicle[libMapM_gf_GetVehicleIndexOfUnit(lv_vehicle)].lv_unit_UnitInsideVehicle, lv_player);
libGame_gf_VehiclesReturnPlayerFromVehicleAtPoint(lv_player, UnitGetPosition(lv_vehicle));
AIRemovePlayerUnit(libGame_gv_players[lv_player].lv_activeVehicle);
libGame_gv_players[lv_player].lv_activeVehicle = null;
if ((UnitGetPropertyFixed(libGame_gv_players[lv_player].lv_heroUnit, c_unitPropLifePercent, c_unitPropCurrent) <= libUIUI_gv_uIDamageFlashLowHPThreshold)) {
libUIUI_gf_UIDamageFlashStartLowHPSoundAndScreenEffects(lv_player);
}
if ((libNtve_gf_UnitIsInsideTransport(libGame_gv_players[lv_player].lv_heroUnit) == true)) {
libUIUI_gf_UIHeroConsoleSetUpForPlayer(UnitTransport(libGame_gv_players[lv_player].lv_heroUnit), lv_player);
libUIUI_gf_HeroConsoleUnitStatusBarsSetUnitForBars(UnitTransport(libGame_gv_players[lv_player].lv_heroUnit), lv_player);
}
else {
libUIUI_gf_UIHeroConsoleSetUpForPlayer(libGame_gv_players[lv_player].lv_heroUnit, lv_player);
libUIUI_gf_HeroConsoleUnitStatusBarsSetUnitForBars(libGame_gv_players[lv_player].lv_heroUnit, lv_player);
}
break;
}
}
libGame_gf_SendEventCheckUnitForAbilityRedirect(lv_vehicle, libGame_gv_players[lv_player].lv_heroUnit, false, UnitGetPosition(lv_vehicle));
libGame_gf_SendInstantEventVehicleDestroyed(lv_player, libMapM_gv_vehicle[libMapM_gf_GetVehicleIndexOfUnit(lv_vehicle)].lv_unit_UnitInsideVehicle, lv_vehicle);
libGame_gf_SendInstantEventUnitStopsOccupyingVehicle(lv_player, libMapM_gv_vehicle[libMapM_gf_GetVehicleIndexOfUnit(lv_vehicle)].lv_unit_UnitInsideVehicle, lv_vehicle);
libMapM_gf_RemoveVehicle(lv_vehicle);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_VehiclesVehicleDies_Init () {
libGame_gt_VehiclesVehicleDies = TriggerCreate("libGame_gt_VehiclesVehicleDies_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_VehiclesVehicleDies, c_playerAny, "UseVehicleFinalDummy");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Vehicles - Regen Globe
//--------------------------------------------------------------------------------------------------
bool libGame_gt_VehiclesRegenGlobe_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_eventEffectTargetPlayer;
int lv_vehicleIndex;
unit lv_unitInVehicle;
unit lv_unitInLinkedVehicle;
// Automatic Variable Declarations
// Variable Initialization
lv_eventEffectTargetPlayer = UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitTarget));
lv_vehicleIndex = libMapM_gf_GetVehicleIndexOfUnit(libGame_gv_players[lv_eventEffectTargetPlayer].lv_activeVehicle);
lv_unitInVehicle = libMapM_gv_vehicle[lv_vehicleIndex].lv_unit_UnitInsideVehicle;
// Actions
if (!runActions) {
return true;
}
UnitCreateEffectUnit(lv_unitInVehicle, "RegenGlobeImpactSet", lv_unitInVehicle);
if ((libMapM_gv_vehicle[lv_vehicleIndex].lv_unit_LinkedVehicle != null)) {
lv_unitInLinkedVehicle = libMapM_gv_vehicle[libMapM_gf_GetVehicleIndexOfUnit(libMapM_gv_vehicle[lv_vehicleIndex].lv_unit_LinkedVehicle)].lv_unit_UnitInsideVehicle;
UnitCreateEffectUnit(lv_unitInLinkedVehicle, "RegenGlobeImpactSet", lv_unitInLinkedVehicle);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_VehiclesRegenGlobe_Init () {
libGame_gt_VehiclesRegenGlobe = TriggerCreate("libGame_gt_VehiclesRegenGlobe_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_VehiclesRegenGlobe, c_playerAny, "HeroGenericRegenGlobeVehicleDummy");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Vehicle - Dragon Knight - Bull Rush
//--------------------------------------------------------------------------------------------------
bool libGame_gt_VehicleDragonKnightBullRush_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_dragonKnight;
unit lv_targetUnit;
fixed lv_abilityRange;
fixed lv_distanceFromDragonKnightToPlayerTargetPoint;
fixed lv_dragonKnightRadius;
point lv_targetPoint;
point lv_actualTargetPoint;
fixed lv_modifiedDistance;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
lv_dragonKnight = EventPlayerEffectUsedUnit(c_effectUnitCaster);
lv_targetUnit = EventPlayerEffectUsedUnit(c_effectUnitTarget);
lv_abilityRange = libGame_gv_vehicleDragonKnightBullRushLaunchDistance;
lv_targetPoint = libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lv_targetUnit), libGame_gv_vehicleDragonKnightBullRushLaunchDistance, UnitGetPosition(lv_dragonKnight));
lv_modifiedDistance = (lv_abilityRange + 0.0);
lv_actualTargetPoint = lv_targetPoint;
while ((PointPathingPassable(lv_actualTargetPoint) == false)) {
lv_modifiedDistance += 0.125;
lv_actualTargetPoint = libNtve_gf_PointOffsetTowardsPoint(UnitGetPosition(lv_targetUnit), lv_modifiedDistance, UnitGetPosition(lv_dragonKnight));
if ((lv_modifiedDistance >= libGame_gv_vehicleDragonKnightBullRushCutoffDistance)) {
return true;
}
}
UnitCreateEffectPoint(lv_targetUnit, "DragonKnightBullRushLaunchUnit", lv_actualTargetPoint);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_VehicleDragonKnightBullRush_Init () {
libGame_gt_VehicleDragonKnightBullRush = TriggerCreate("libGame_gt_VehicleDragonKnightBullRush_Func");
TriggerAddEventPlayerEffectUsed(libGame_gt_VehicleDragonKnightBullRush, c_playerAny, "DragonKnightBullRushImpactSet");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialize Watch Towers
//--------------------------------------------------------------------------------------------------
bool libGame_gt_InitializeWatchTowers_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_u;
int lv_player;
int lv_i;
// Automatic Variable Declarations
unitgroup autoDB8A231F_g;
int autoDB8A231F_u;
// Variable Initialization
// Conditions
if (testConds) {
if (!((libCore_gv_sYSJungleWatchTowers == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
autoDB8A231F_g = UnitGroup("XelNagaWatchTower", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
autoDB8A231F_u = UnitGroupCount(autoDB8A231F_g, c_unitCountAll);
for (;; autoDB8A231F_u -= 1) {
lv_u = UnitGroupUnitFromEnd(autoDB8A231F_g, autoDB8A231F_u);
if (lv_u == null) { break; }
libGame_gv_watchTowersCurrentCount += 1;
libGame_gv_watchTowers[libGame_gv_watchTowersCurrentCount].lv_watchTowerUnit = lv_u;
UnitSetCustomValue(lv_u, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_WatchTowerIndex), libGame_gv_watchTowersCurrentCount);
libNtve_gf_CreateUnitsWithDefaultFacing(1, "WatchTowerCaptureBeacon", c_unitCreateIgnorePlacement, UnitGetOwner(lv_u), UnitGetPosition(lv_u), null);
libGame_gf_CapturePointCreate(UnitLastCreated(), libCore_gv_data_WatchTower_CaptureRadius_C, libCore_gv_data_WatchTower_CaptureTime_C, 0.0, libGame_ge_CapturePointDecay_DoNotDecay, libGame_ge_CapturePointDecay_Neutral, true);
libGame_gv_watchTowers[libGame_gv_watchTowersCurrentCount].lv_capturePointIndex = libGame_gf_LastCreatedCapturePoint();
AddUnitOfInterest(libGame_gv_watchTowers[libGame_gv_watchTowersCurrentCount].lv_watchTowerUnit, 3.5, 0.0, "VisionBeacon", libNtve_ge_GoalTeam_Both, libGame_gv_watchTowers[libGame_gv_watchTowersCurrentCount].lv_capturePointIndex);
}
TriggerEnable(libGame_gt_WatchTowersOwnershipChanges, true);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_InitializeWatchTowers_Init () {
libGame_gt_InitializeWatchTowers = TriggerCreate("libGame_gt_InitializeWatchTowers_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Watch Towers - Ownership Changes
//--------------------------------------------------------------------------------------------------
bool libGame_gt_WatchTowersOwnershipChanges_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_itWatchTower;
int lv_itPlayer;
int lv_capturePointIndex;
int lv_capturePointOwner;
// Automatic Variable Declarations
int autoD9163F59_ae;
playergroup auto1994BB0D_g;
int autoBF467B1A_val;
// Variable Initialization
lv_capturePointIndex = libGame_gf_CapturePointChangesOwnerCapturePointIndex();
lv_capturePointOwner = libGame_gf_CapturePointChangesOwnerOwner();
// Actions
if (!runActions) {
return true;
}
autoD9163F59_ae = libGame_gv_watchTowersMaxCount;
lv_itWatchTower = 1;
for ( ; lv_itWatchTower <= autoD9163F59_ae ; lv_itWatchTower += 1 ) {
if ((libGame_gv_watchTowers[lv_itWatchTower].lv_capturePointIndex == lv_capturePointIndex)) {
auto1994BB0D_g = libGame_gf_CapturePointChangesOwnerCapturingPlayers();
lv_itPlayer = -1;
while (true) {
lv_itPlayer = PlayerGroupNextPlayer(auto1994BB0D_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
libGame_gv_scoreValues[lv_itPlayer].lv_watchTowersCaptured += 1;
}
libGame_gf_WatchTowersChangeWatchTowerOwnership(lv_itWatchTower, lv_capturePointOwner);
autoBF467B1A_val = lv_capturePointOwner;
if (autoBF467B1A_val == libCore_gv_cOMPUTER_Neutral) {
}
else if (autoBF467B1A_val == libCore_gv_cOMPUTER_TeamChaos) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_itWatchTower].lv_watchTowerUnit, "Signal OwnerChaos");
UnitCreateEffectUnit(libGame_gv_watchTowers[lv_itWatchTower].lv_watchTowerUnit, "WatchtowerRevealDummy", libGame_gv_watchTowers[lv_itWatchTower].lv_watchTowerUnit);
}
else if (autoBF467B1A_val == libCore_gv_cOMPUTER_TeamOrder) {
libNtve_gf_SendActorMessageToUnit(libGame_gv_watchTowers[lv_itWatchTower].lv_watchTowerUnit, "Signal OwnerOrder");
UnitCreateEffectUnit(libGame_gv_watchTowers[lv_itWatchTower].lv_watchTowerUnit, "WatchtowerRevealDummy", libGame_gv_watchTowers[lv_itWatchTower].lv_watchTowerUnit);
}
else {
}
break;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_WatchTowersOwnershipChanges_Init () {
libGame_gt_WatchTowersOwnershipChanges = TriggerCreate("libGame_gt_WatchTowersOwnershipChanges_Func");
TriggerEnable(libGame_gt_WatchTowersOwnershipChanges, false);
libGame_gf_CapturePointChangesOwner(libGame_gt_WatchTowersOwnershipChanges);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Health Pack Generator - Health Pack Created
//--------------------------------------------------------------------------------------------------
bool libGame_gt_HealthPackGeneratorHealthPackCreated_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
AIAddCollectable(EventPlayerEffectUsedUnit(c_effectUnitTarget), "CollectHealthPack", 1.0);
return true;
}
//--------------------------------------------------------------------------------------------------
void libGame_gt_HealthPackGeneratorHealthPackCreated_Init () {
libGame_gt_HealthPackGeneratorHealthPackCreated = TriggerCreate("libGame_gt_HealthPackGeneratorHealthPackCreated_Func");
TriggerEnable(libGame_gt_HealthPackGeneratorHealthPackCreated, false);
TriggerAddEventPlayerEffectUsed(libGame_gt_HealthPackGeneratorHealthPackCreated, c_playerAny, "GenerateHealthPackAddBehaviortoGlobe");
}
void libGame_InitTriggers () {
libGame_gt_IncludeGame_Init();
libGame_gt_InitializeBanks_Init();
libGame_gt_InitializeGameSystems_Init();
libGame_gt_InitializePlayers_Init();
libGame_gt_InitializeVisibility_Init();
libGame_gt_AfkCheckPlayerScoreValuesForActivity_Init();
libGame_gt_AfkPlayerMovementDetection_Init();
libGame_gt_AfkCheckPlayerMoving_Init();
libGame_gt_AfkCheckPlayerEnteredVehicle_Init();
libGame_gt_AfkPlayerAfkWarningTimerExpires_Init();
libGame_gt_AfkPlayerAfkKickTimerExpires_Init();
libGame_gt_AnnouncementMessageTimerExpires_Init();
libGame_gt_CapturePointLogic_Init();
libGame_gt_DimCapturePoint_Init();
libGame_gt_UnDimCapturePoint_Init();
libGame_gt_TowerCoreIsUnderAttack_Init();
libGame_gt_TowerCoreUnderAttackAnnouncementOrder_Init();
libGame_gt_TowerCoreUnderAttackAnnouncementChaos_Init();
libGame_gt_TowerCoreAlertAnnouncementCooldownExpiresOrder_Init();
libGame_gt_TowerCoreAlertAnnouncementCooldownExpiresChaos_Init();
libGame_gt_TowerCoreHasTakenDamage_Init();
libGame_gt_CCRecognitionSlow_Init();
libGame_gt_CCRecognitionBlind_Init();
libGame_gt_CCRecognitionRoot_Init();
libGame_gt_CCRecognitionStun_Init();
libGame_gt_CCRecognitionTaunt_Init();
libGame_gt_CCRecognitionSilenced_Init();
libGame_gt_CCRecognitionStasis_Init();
libGame_gt_CCRecognitionTimeStopOn_Init();
libGame_gt_CCRecognitionTimeStopOffResumeCooldowns_Init();
libGame_gt_CCRecognitionTimeStopOffUnpathableFix_Init();
libGame_gt_DeathRecapHeroDies_Init();
libGame_gt_DeathRecapHeroRespawn_Init();
libGame_gt_DEBUGManualAssignAward_Init();
libGame_gt_EndofMatchAwardsDisabledResponse_Init();
libGame_gt_MapSpecificEventInitializeResponse_Init();
libGame_gt_MapSpecificEventUpdateResponse_Init();
libGame_gt_AddtoVengeanceTargets_Init();
libGame_gt_EscapeTrackingLowHealthDetected_Init();
libGame_gt_EventBasedAwardsDataReport_Init();
libGame_gt_TrackIfDeathOutnumbered_Init();
libGame_gt_TeamPlayerHeroDeathGracePeriod_Init();
libGame_gt_AddCombatMedicHealing_Init();
libGame_gt_TeamfightTracking_Init();
libGame_gt_SilencerDataCollection_Init();
libGame_gt_ProtectorDataCollection_Init();
libGame_gt_StunnerDataCollection_Init();
libGame_gt_TrapperDataCollection_Init();
libGame_gt_ClutchHealerIncrement_Init();
libGame_gt_HatTrickAwardCounter_Init();
libGame_gt_InitializeSecondaryAwardList_Init();
libGame_gt_OldXPEnableDisable_Init();
libGame_gt_ExperienceGlobeScaling_Init();
libGame_gt_ExperienceGlobeSpawn_Init();
libGame_gt_ExperienceGlobeGrantXP_Init();
libGame_gt_OldXPEnabledMinionVeterency_Init();
libGame_gt_StartGame_Init();
libGame_gt_PickingHeroesNormalMode_Init();
libGame_gt_StartGameShowTowerRadius_Init();
libGame_gt_AnnounceCountdown_Init();
libGame_gt_RunAnimations_Init();
libGame_gt_OpenTheGatesOpenTheGatesTimerExpires_Init();
libGame_gt_SpawnMinionsMinionSpawnStartTimerExpires_Init();
libGame_gt_TurnOnXPTrickleXPTrickleStartTimerExpires_Init();
libGame_gt_ConfineHeroesToBaseUntilCountdownEnds_Init();
libGame_gt_ConfineOtherUnitsToBaseUntilCountdownEnds_Init();
libGame_gt_ConfineCreatedUnitsToBaseUntilCountdownEnds_Init();
libGame_gt_RemoveUnitsCreatedOutsideOfBaseUntilCountdownEnds_Init();
libGame_gt_DetermineWinningTeam_Init();
libGame_gt_HeroDeathUpdateStatsAwardXPMakeAnnouccementsCORE_Init();
libGame_gt_HeroDeathDiabloParticipatedInTakedown_Init();
libGame_gt_HeroDeathSeasonedMarksmanParticipatedInTakedown_Init();
libGame_gt_HeroDeathWrathOfTheBoneKingParticipatedInTakedown_Init();
libGame_gt_HeroDeathHeroDies_Init();
libGame_gt_HeroDeathHeroDeathToastTimerExpires_Init();
libGame_gt_HeroDeathHeroRespawnSoundCueTimerExpires_Init();
libGame_gt_HeroDeathHeroRespawnTimerExpires_Init();
libGame_gt_HeroDeathTeamMultikillTimerExpires_Init();
libGame_gt_HeroDeathPlayerMultikillTimerExpires_Init();
libGame_gt_HeroDeathUpdateMultikillTimerUI_Init();
libGame_gt_HeroDeathKillStingerTimerExpires_Init();
libGame_gt_HeroDeathDiabloDiabloDies_Init();
libGame_gt_HeroDeathUtherEternalDevotionProc_Init();
libGame_gt_HeroDeathUtherRedemptionProc_Init();
libGame_gt_HeroDeathTyraelArchangelsWrathProc_Init();
libGame_gt_HeroDeathSpecialDeathStateDiesTyraelUther_Init();
libGame_gt_HeroDeathGallDies_Init();
libGame_gt_InitializeCodeLaneSystem_Init();
libGame_gt_PlayerLeavesGame_Init();
libGame_gt_PlayerLeavesGameIsHumanPlayer_Init();
libGame_gt_PlayerRejoinsGame_Init();
libGame_gt_TeamAbandonedTheGameTimerExpires_Init();
libGame_gt_PlayerLeftAnnouncementTimerExpires_Init();
libGame_gt_InitializeLootContent_Init();
libGame_gt_InitializeWheelCommand_Init();
libGame_gt_PlayerUsesExpressionWheel_Init();
libGame_gt_InitializeWheelUI_Init();
libGame_gt_InitializeWheelUnit_Init();
libGame_gt_LootYellVoiceLine_Init();
libGame_gt_LootSpray_Init();
libGame_gt_MinionSpawnCycle_Init();
libGame_gt_HeroMoonwellCooldownOnOff_Init();
libGame_gt_HeroMoonwellDurationTextTagUpdates_Init();
libGame_gt_TownTownHallKilledMoonwellSearch_Init();
libGame_gt_HeroMount_Init();
libGame_gt_HeroDismount_Init();
libGame_gt_HeroDismountOnCheerDanceTauntUsed_Init();
libGame_gt_ApplyEngineInteractionBehaviors_Init();
libGame_gt_RemoveEngineInteractionBehaviors_Init();
libGame_gt_MountCaboose_Init();
libGame_gt_DismountCaboose_Init();
libGame_gt_CabooseFollowLogic_Init();
libGame_gt_UnitLosesToyTrainFollowBehavior_Init();
libGame_gt_GameGeneralNPCProcListener_Init();
libGame_gt_NPCUnitDies_Init();
libGame_gt_TownStructureDies_Init();
libGame_gt_CoreDiesGameOver_Init();
libGame_gt_OnFireEnableMessaging_Init();
libGame_gt_OnFireDisableMessaging_Init();
libGame_gt_OnFireStart_Init();
libGame_gt_OnFireForcedUpdate_Init();
libGame_gt_OnFireDisable_Init();
libGame_gt_RecordOnFireTimers_Init();
libGame_gt_LevelUp_Init();
libGame_gt_RecentDamageTimerExpires_Init();
libGame_gt_HeroDamageTracking_Init();
libGame_gt_HeroDamageSoakedDeathUpdate_Init();
libGame_gt_HeroKillCreditProximityTracking_Init();
libGame_gt_HeroXPChanges_Init();
libGame_gt_XPTrickle_Init();
libGame_gt_PlayerHomeShieldProtectionOn_Init();
libGame_gt_PlayerHomeShieldProtectionOff_Init();
libGame_gt_PlayerShrubProximityRevealProc_Init();
libGame_gt_PlayerHeroDisplacementBehaviors_Init();
libGame_gt_PlayerRegenGlobeDummyImpact_Init();
libGame_gt_PlayerRegenGlobeNeutralDummySet_Init();
libGame_gt_PlayerRegenGlobeImpactScoreTracking_Init();
libGame_gt_NeutralRegenGlobeCreatedChangeOwner_Init();
libGame_gt_ScalingTimerExpiration_Init();
libGame_gt_JungleScalingTimerExpires_Init();
libGame_gt_CoreScalingTimerExpires_Init();
libGame_gt_TownScalingTimerExpires_Init();
libGame_gt_ScoreTrackingTimeCCdEnemyHeroes_Init();
libGame_gt_ScoreTrackingPhysicalDamage_Init();
libGame_gt_ScoreTrackingSpellDamage_Init();
libGame_gt_ScoreTrackingRavenTributeCollected_Init();
libGame_gt_ScoreTrackingDragonActivated_Init();
libGame_gt_ScoreTrackingDragonShrineCaptured_Init();
libGame_gt_ScoreTrackingSkullCollected_Init();
libGame_gt_ScoreTrackingSeedCollected_Init();
libGame_gt_TalentsChoiceSelected_Init();
libGame_gt_TowerTowerDeadStateGateCheck_Init();
libGame_gt_TowerTowerMorphToDeadStateStructureDies_Init();
libGame_gt_InitializeTownSystem_Init();
libGame_gt_KillStandaloneTowers_Init();
libGame_gt_InitializeMoonwellIconsonTowns_Init();
libGame_gt_TownMidLateGamePowerTransitionOn_Init();
libGame_gt_HallOfStormsKnockbackLaunchMissile_Init();
libGame_gt_HallOfStormsKnockbackUnitEntersRegion_Init();
libGame_gt_HallOfStormsUnitEntersRegion_Init();
libGame_gt_HallOfStormsUnitExitsRegion_Init();
libGame_gt_VehicleReconnectionMonitor_Init();
libGame_gt_KaelthasEntersVehicle_Init();
libGame_gt_KaelthasStopsOccupyingVehicle_Init();
libGame_gt_UnitSelectionVehicleEntered_Init();
libGame_gt_UnitSelectionVehicleSwapped_Init();
libGame_gt_UnitSelectionOnUnitDeselected_Init();
libGame_gt_VehiclesVehicleEntered_Init();
libGame_gt_VehiclesVehicleSwapped_Init();
libGame_gt_VehiclesVehicleAbandoned_Init();
libGame_gt_VehiclesVehicleDies_Init();
libGame_gt_VehiclesRegenGlobe_Init();
libGame_gt_VehicleDragonKnightBullRush_Init();
libGame_gt_InitializeWatchTowers_Init();
libGame_gt_WatchTowersOwnershipChanges_Init();
libGame_gt_HealthPackGeneratorHealthPackCreated_Init();
}
//--------------------------------------------------------------------------------------------------
// Library Initialization
//--------------------------------------------------------------------------------------------------
bool libGame_InitLib_completed = false;
void libGame_InitLib () {
if (libGame_InitLib_completed) {
return;
}
libGame_InitLib_completed = true;
libGame_InitLibraries();
libGame_InitVariables();
libGame_InitTriggers();
}
include "TriggerLibs/HeroesLib"
include "TriggerLibs/MapMechanicsLib"
include "TriggerLibs/AILib"
include "TriggerLibs/UILib"
include "TriggerLibs/StartingExperienceLib"
include "TriggerLibs/SoundLib"
include "TriggerLibs/GameDataHelperLib"
include "TriggerLibs/SupportLib"