local P=require("\105\110\118\111\107\097\116\105\111\110\046\099\111\110\115\116\046\115\101\116\116\105\110\103\115")function GameMode.setupGameMode(E)E.gameMode=GameRules:GetGameModeEntity()E.gameMode:SetAlwaysShowPlayerInventory(P.ALWAYS_SHOW_PLAYER_INVENTORY)E.gameMode:SetAlwaysShowPlayerNames(P.ALWAYS_SHOW_PLAYER_NAMES)E.gameMode:SetAnnouncerDisabled(P.DISABLE_ANNOUNCER)E.gameMode:SetBotThinkingEnabled(P.USE_STANDARD_DOTA_BOT_THINKING)E.gameMode:SetBotsAlwaysPushWithHuman(P.BOTS_ALWAYS_PUSH_WITH_HUMAN)E.gameMode:SetBotsInLateGame(P.BOTS_LATE_GAME_BEHAVIOR)E.gameMode:SetBotsMaxPushTier(P.BOTS_MAX_PUSH_TIER)E.gameMode:SetBountyRuneSpawnInterval(P.BOUNTY_RUNE_SPAWN_INTERVAL)E.gameMode:SetBuybackEnabled(P.BUYBACK_ENABLED)E.gameMode:SetCameraDistanceOverride(P.CAMERA_DISTANCE_OVERRIDE)E.gameMode:SetCameraSmoothCountOverride(P.CAMERA_SMOOTH_COUNT)E.gameMode:SetCustomBackpackCooldownPercent(P.CUSTOM_BACKPACK_COOLDOWN_PERCENT)E.gameMode:SetCustomBackpackSwapCooldown(P.CUSTOM_BACKPACK_SWAP_COOLDOWN)E.gameMode:SetCustomBuybackCooldownEnabled(P.CUSTOM_BUYBACK_COOLDOWN_ENABLED)E.gameMode:SetCustomBuybackCostEnabled(P.CUSTOM_BUYBACK_COST_ENABLED)E.gameMode:SetCustomGlyphCooldown(P.CUSTOM_GLYPH_COOLDOWN)E.gameMode:SetCustomScanCooldown(P.CUSTOM_SCAN_COOLDOWN)E.gameMode:SetDaynightCycleDisabled(P.DISABLE_DAY_NIGHT_CYCLE)E.gameMode:SetDeathOverlayDisabled(P.DISABLE_DEATH_OVERLAY)E.gameMode:SetDraftingBanningTimeOverride(P.DRAFTING_BANNING_TIME)E.gameMode:SetDraftingHeroPickSelectTimeOverride(P.DRAFTING_HERO_PICK_SELECTION_TIME)E.gameMode:SetFixedRespawnTime(P.FIXED_RESPAWN_TIME)E.gameMode:SetFogOfWarDisabled(P.DISABLE_FOG_OF_WAR)E.gameMode:SetFountainConstantManaRegen(P.FOUNTAIN_CONSTANT_MANA_REGEN)E.gameMode:SetFountainPercentageHealthRegen(P.FOUNTAIN_PERCENTAGE_HEALTH_REGEN)E.gameMode:SetFountainPercentageManaRegen(P.FOUNTAIN_PERCENTAGE_MANA_REGEN)E.gameMode:SetFriendlyBuildingMoveToEnabled(P.ENABLE_FRIENDLY_BUILDING_MOVE_TO_CLICK)E.gameMode:SetGoldSoundDisabled(P.DISABLE_GOLD_SOUNDS)E.gameMode:SetHudCombatEventsDisabled(P.DISABLE_COMBAT_EVENTS_HUD)E.gameMode:SetKillingSpreeAnnouncerDisabled(P.DISABLE_KILLING_SPREE_ANNOUNCER)E.gameMode:SetLoseGoldOnDeath(P.LOSE_GOLD_ON_DEATH)E.gameMode:SetMaximumAttackSpeed(P.MAXIMUM_ATTACK_SPEED)E.gameMode:SetMinimumAttackSpeed(P.MINIMUM_ATTACK_SPEED)E.gameMode:SetPauseEnabled(P.ENABLE_PAUSE)E.gameMode:SetPowerRuneSpawnInterval(P.POWER_RUNE_SPAWN_INTERVAL)E.gameMode:SetRecommendedItemsDisabled(P.RECOMMENDED_BUILDS_DISABLED)E.gameMode:SetRemoveIllusionsOnDeath(P.REMOVE_ILLUSIONS_ON_DEATH)E.gameMode:SetRespawnTimeScale(P.RESPAWN_TIME_SCALE)E.gameMode:SetSelectionGoldPenaltyEnabled(P.ENABLE_SELECTION_GOLD_PENALTY)E.gameMode:SetStashPurchasingDisabled(P.DISABLE_STASH_PURCHASING)E.gameMode:SetStickyItemDisabled(P.DISABLE_STICKY_ITEM)E.gameMode:SetTopBarTeamValuesOverride(P.USE_CUSTOM_TOP_BAR_VALUES)E.gameMode:SetTopBarTeamValuesVisible(P.TOP_BAR_VISIBLE)E.gameMode:SetTowerBackdoorProtectionEnabled(P.ENABLE_TOWER_BACKDOOR_PROTECTION)E.gameMode:SetUnseenFogOfWarEnabled(P.USE_UNSEEN_FOG_OF_WAR)E.gameMode:SetUseDefaultDOTARuneSpawnLogic(P.USE_DEFAULT_DOTA_RUNE_SPAWN_LOGIC)E.gameMode:SetWeatherEffectsDisabled(P.DISABLE_WEATHER_EFFECTS)E.gameMode:SetCustomXPRequiredToReachNextLevel(P.XP_PER_LEVEL_TABLE)E.gameMode:SetUseCustomHeroLevels(P.USE_CUSTOM_HERO_LEVELS)if P.FORCE_PICKED_HERO~=nil then E.gameMode:SetCustomGameForceHero(P.FORCE_PICKED_HERO)end if P.CUSTOM_TERRAIN_WEATHER_EFFECT~=nil then E.gameMode:SetCustomTerrainWeatherEffect(P.CUSTOM_TERRAIN_WEATHER_EFFECT)end for P,C in pairs(P.ENABLED_RUNES)do E.gameMode:SetRuneEnabled(P,C)end E:d("  \115\101\116\117\112 \071\097\109\101\077\111\100\101")end
--- GameMode Setup
-- @submodule invokation.GameMode

local S = require("invokation.const.settings")

--- GameMode Setup
-- @section game_mode

-- selene: allow(unused_variable)
function GameMode:setupGameMode()
  self.gameMode = GameRules:GetGameModeEntity()

  self.gameMode:SetAlwaysShowPlayerInventory(S.ALWAYS_SHOW_PLAYER_INVENTORY)
  self.gameMode:SetAlwaysShowPlayerNames(S.ALWAYS_SHOW_PLAYER_NAMES)
  self.gameMode:SetAnnouncerDisabled(S.DISABLE_ANNOUNCER)
  self.gameMode:SetBotThinkingEnabled(S.USE_STANDARD_DOTA_BOT_THINKING)
  self.gameMode:SetBotsAlwaysPushWithHuman(S.BOTS_ALWAYS_PUSH_WITH_HUMAN)
  self.gameMode:SetBotsInLateGame(S.BOTS_LATE_GAME_BEHAVIOR)
  self.gameMode:SetBotsMaxPushTier(S.BOTS_MAX_PUSH_TIER)
  self.gameMode:SetBountyRuneSpawnInterval(S.BOUNTY_RUNE_SPAWN_INTERVAL)
  self.gameMode:SetBuybackEnabled(S.BUYBACK_ENABLED)
  self.gameMode:SetCameraDistanceOverride(S.CAMERA_DISTANCE_OVERRIDE)
  self.gameMode:SetCameraSmoothCountOverride(S.CAMERA_SMOOTH_COUNT)
  self.gameMode:SetCustomBackpackCooldownPercent(S.CUSTOM_BACKPACK_COOLDOWN_PERCENT)
  self.gameMode:SetCustomBackpackSwapCooldown(S.CUSTOM_BACKPACK_SWAP_COOLDOWN)
  self.gameMode:SetCustomBuybackCooldownEnabled(S.CUSTOM_BUYBACK_COOLDOWN_ENABLED)
  self.gameMode:SetCustomBuybackCostEnabled(S.CUSTOM_BUYBACK_COST_ENABLED)
  self.gameMode:SetCustomGlyphCooldown(S.CUSTOM_GLYPH_COOLDOWN)
  self.gameMode:SetCustomScanCooldown(S.CUSTOM_SCAN_COOLDOWN)
  self.gameMode:SetDaynightCycleDisabled(S.DISABLE_DAY_NIGHT_CYCLE)
  self.gameMode:SetDeathOverlayDisabled(S.DISABLE_DEATH_OVERLAY)
  self.gameMode:SetDraftingBanningTimeOverride(S.DRAFTING_BANNING_TIME)
  self.gameMode:SetDraftingHeroPickSelectTimeOverride(S.DRAFTING_HERO_PICK_SELECTION_TIME)
  self.gameMode:SetFixedRespawnTime(S.FIXED_RESPAWN_TIME)
  self.gameMode:SetFogOfWarDisabled(S.DISABLE_FOG_OF_WAR)
  self.gameMode:SetFountainConstantManaRegen(S.FOUNTAIN_CONSTANT_MANA_REGEN)
  self.gameMode:SetFountainPercentageHealthRegen(S.FOUNTAIN_PERCENTAGE_HEALTH_REGEN)
  self.gameMode:SetFountainPercentageManaRegen(S.FOUNTAIN_PERCENTAGE_MANA_REGEN)
  self.gameMode:SetFriendlyBuildingMoveToEnabled(S.ENABLE_FRIENDLY_BUILDING_MOVE_TO_CLICK)
  self.gameMode:SetGoldSoundDisabled(S.DISABLE_GOLD_SOUNDS)
  self.gameMode:SetHudCombatEventsDisabled(S.DISABLE_COMBAT_EVENTS_HUD)
  self.gameMode:SetKillingSpreeAnnouncerDisabled(S.DISABLE_KILLING_SPREE_ANNOUNCER)
  self.gameMode:SetLoseGoldOnDeath(S.LOSE_GOLD_ON_DEATH)
  self.gameMode:SetMaximumAttackSpeed(S.MAXIMUM_ATTACK_SPEED)
  self.gameMode:SetMinimumAttackSpeed(S.MINIMUM_ATTACK_SPEED)
  self.gameMode:SetPauseEnabled(S.ENABLE_PAUSE)
  self.gameMode:SetPowerRuneSpawnInterval(S.POWER_RUNE_SPAWN_INTERVAL)
  self.gameMode:SetRecommendedItemsDisabled(S.RECOMMENDED_BUILDS_DISABLED)
  self.gameMode:SetRemoveIllusionsOnDeath(S.REMOVE_ILLUSIONS_ON_DEATH)
  self.gameMode:SetRespawnTimeScale(S.RESPAWN_TIME_SCALE)
  self.gameMode:SetSelectionGoldPenaltyEnabled(S.ENABLE_SELECTION_GOLD_PENALTY)
  self.gameMode:SetStashPurchasingDisabled(S.DISABLE_STASH_PURCHASING)
  self.gameMode:SetStickyItemDisabled(S.DISABLE_STICKY_ITEM)
  self.gameMode:SetTopBarTeamValuesOverride(S.USE_CUSTOM_TOP_BAR_VALUES)
  self.gameMode:SetTopBarTeamValuesVisible(S.TOP_BAR_VISIBLE)
  self.gameMode:SetTowerBackdoorProtectionEnabled(S.ENABLE_TOWER_BACKDOOR_PROTECTION)
  self.gameMode:SetUnseenFogOfWarEnabled(S.USE_UNSEEN_FOG_OF_WAR)
  self.gameMode:SetUseDefaultDOTARuneSpawnLogic(S.USE_DEFAULT_DOTA_RUNE_SPAWN_LOGIC)
  self.gameMode:SetWeatherEffectsDisabled(S.DISABLE_WEATHER_EFFECTS)

  -- Must be set before `SetUseCustomHeroLevels`
  self.gameMode:SetCustomXPRequiredToReachNextLevel(S.XP_PER_LEVEL_TABLE)
  self.gameMode:SetUseCustomHeroLevels(S.USE_CUSTOM_HERO_LEVELS)

  -- self.gameMode:SetCustomAttributeDerivedStatValue(nStatType, flNewValue)
  -- self.gameMode:SetHUDVisible(iHUDElement, bVisible)
  -- self.gameMode:SetKillableTombstones(S.KILLABLE_TOMBSTONES)
  -- self.gameMode:SetTopBarTeamValue(iTeam, nValue)

  if S.FORCE_PICKED_HERO ~= nil then
    self.gameMode:SetCustomGameForceHero(S.FORCE_PICKED_HERO)
  end

  if S.CUSTOM_TERRAIN_WEATHER_EFFECT ~= nil then
    self.gameMode:SetCustomTerrainWeatherEffect(S.CUSTOM_TERRAIN_WEATHER_EFFECT)
  end

  for rune, spawn in pairs(S.ENABLED_RUNES) do
    self.gameMode:SetRuneEnabled(rune, spawn)
  end

  self:d("  setup GameMode")
end
