Dota2 GameRules 设置项
转自 超级鸡蛋人!
我自己备份一下
GameRules:SetFirstBloodActive(false) -- 是否开启第一滴血
GameRules:SetGoldPerTick(0) -- 设置根据时间的金钱奖励
GameRules:SetGoldTickTime(999999.0) -- 设置金钱奖励时间
GameRules:SetStartingGold(10) -- 设置起始金钱
GameRules:SetTimeOfDay(240) -- 设置一天的时间
GameRules:SetHeroRespawnEnabled(false) -- 是否开启英雄重生
GameRules:SetSameHeroSelectionEnabled(false) -- 是否允许选择相同英雄
GameRules:SetHeroSelectionTime(60) -- 设置选择英雄时间
GameRules:SetStrategyTime(0) -- 设置决策时间
GameRules:SetShowcaseTime(0) -- 设置展示时间
GameRules:SetHideKillMessageHeaders(true) -- 是否隐藏击杀提示
GameRules:SetPostGameTime(300) -- 设置游戏结束后停留的时间
GameRules:SetPreGameTime(5) -- 设置游戏开始前准备的时间
GameRules:SetTreeRegrowTime(300) -- 设置树木再生时间
GameRules:SetUseBaseGoldBountyOnHeroes(true) -- 是否使用默认的击杀奖励
GameRules:SetUseUniversalShopMode(false) -- 是否没有在神秘商店也可以买到神秘商店的物品
-- 设置队伍人数
GameRules:SetCustomGameTeamMaxPlayers( DOTA_TEAM_FIRST, 0) -- 观战队伍
GameRules:SetCustomGameTeamMaxPlayers( DOTA_TEAM_GOODGUYS, 8) -- 天辉
GameRules:SetCustomGameTeamMaxPlayers( DOTA_TEAM_BADGUYS, 0) -- 夜魇
GameRules:SetCustomGameTeamMaxPlayers( DOTA_TEAM_NEUTRALS, 0) -- 野怪
GameRules:SetCustomGameTeamMaxPlayers( DOTA_TEAM_CUSTOM_1, 0) -- 自定义队伍1
-- 修改DOTA2默认的三围属性加成,回血和回蓝没用,过时属性也同样不生效
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_STRENGTH_DAMAGE, 1 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_STRENGTH_HP, 4 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_STRENGTH_HP_REGEN, 0.1 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_STRENGTH_STATUS_RESISTANCE_PERCENT, 1 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_STRENGTH_MAGIC_RESISTANCE_PERCENT, 0.01 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_AGILITY_DAMAGE, 1 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_AGILITY_ARMOR, 0.2 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_AGILITY_ATTACK_SPEED, 1 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_AGILITY_MOVE_SPEED_PERCENT, 0.011 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_INTELLIGENCE_DAMAGE, 1 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_INTELLIGENCE_MANA, 2 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_INTELLIGENCE_MANA_REGEN, 0.05 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_INTELLIGENCE_SPELL_AMP_PERCENT, 1 )
GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue( DOTA_ATTRIBUTE_INTELLIGENCE_MAGIC_RESISTANCE_PERCENT, 1 )