|
|
|
|
@@ -263,7 +263,7 @@ function SpawnSystem:PreSpawn()
|
|
|
|
|
if GameRules:IsGamePaused() then return 0.1 end
|
|
|
|
|
if GameRules:State_Get() == DOTA_GAMERULES_STATE_GAME_IN_PROGRESS then return nil end
|
|
|
|
|
if uiWaveInfo["RemainingTime"] == 0 then
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="item_locked_tip", duration=60, params={}, color="#ff0"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#item_locked_tip", duration=60, params={}, color="#ff0"})
|
|
|
|
|
return nil
|
|
|
|
|
end
|
|
|
|
|
uiWaveInfo["RemainingTime"] = math.max(math.floor(maxTime - GameRules:GetGameTime()),0)
|
|
|
|
|
@@ -284,9 +284,9 @@ function SpawnSystem:PreSpawn()
|
|
|
|
|
-- 通知提示
|
|
|
|
|
local difficulty = GameRules:GetCustomGameDifficulty()
|
|
|
|
|
if difficulty == CHALLENGE_MODE then
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="challenge_game_on", duration=25, params={}, color="#ff0"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#challenge_game_on", duration=25, params={}, color="#ff0"})
|
|
|
|
|
elseif difficulty >= FUNNY_MODE then
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="funny_game_on", duration=25, params={}, color="#ff0"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#funny_game_on", duration=25, params={}, color="#ff0"})
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@@ -407,7 +407,7 @@ function SpawnSystem:InitSpawn()
|
|
|
|
|
|
|
|
|
|
-- 无尽前提示
|
|
|
|
|
if wave == 50 then
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="spawn_unlimited", duration=133, params={count=50}, color="#0ff"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#spawn_unlimited", duration=133, params={count=50}, color="#0ff"})
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- 进入无尽
|
|
|
|
|
@@ -443,11 +443,11 @@ function SpawnSystem:InitSpawn()
|
|
|
|
|
SpawnSystem:StartUnlimited()
|
|
|
|
|
max_time = 180.5
|
|
|
|
|
left_time = max_time
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="start_unlimited", duration=180, params={}, color="#ff0"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#start_unlimited", duration=180, params={}, color="#ff0"})
|
|
|
|
|
if difficulty == CHALLENGE_MODE then
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="challenge_game_on", duration=180, params={}, color="#ff0"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#challenge_game_on", duration=180, params={}, color="#ff0"})
|
|
|
|
|
elseif difficulty >= FUNNY_MODE then
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="funny_game_on", duration=180, params={}, color="#ff0"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#funny_game_on", duration=180, params={}, color="#ff0"})
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@@ -690,10 +690,10 @@ function SpawnSystem:GameOver(hero)
|
|
|
|
|
-- 过挑战第一波BOSS算上榜
|
|
|
|
|
if wave > 100 then
|
|
|
|
|
CheckRank(hero)
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="power_game_end_info", duration=60, params={wave=hero.thtd_game_info["max_wave"],name=PlayerResource:GetPlayerName(hero:GetPlayerID())}, color="#ff0"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#power_game_end_info", duration=60, params={wave=hero.thtd_game_info["max_wave"],name=PlayerResource:GetPlayerName(hero:GetPlayerID())}, color="#ff0"})
|
|
|
|
|
ShowDetail(hero)
|
|
|
|
|
elseif wave > 50 then
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="normal_game_end_info", duration=30, params={wave=wave-51,name=PlayerResource:GetPlayerName(hero:GetPlayerID())}, color="#f00"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#normal_game_end_info", duration=30, params={wave=wave-51,name=PlayerResource:GetPlayerName(hero:GetPlayerID())}, color="#f00"})
|
|
|
|
|
end
|
|
|
|
|
SpawnSystem:RefreshCreepMaxCount()
|
|
|
|
|
end
|
|
|
|
|
@@ -719,7 +719,7 @@ function SpawnSystem:GameEnd()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if wave > 100 then
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="game_will_end", duration=60, params={}, color="#ff0"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#game_will_end", duration=60, params={}, color="#ff0"})
|
|
|
|
|
GameRules:GetGameModeEntity():SetContextThink(DoUniqueString("thtd_end_game"),
|
|
|
|
|
function()
|
|
|
|
|
GameRules:SetGameWinner(DOTA_TEAM_GOODGUYS)
|
|
|
|
|
@@ -900,9 +900,9 @@ function CheckPlayerConnect()
|
|
|
|
|
if (hero:GetPlayerOwner() == nil or hero:GetPlayerOwner():IsNull()) then
|
|
|
|
|
if hero.thtd_game_info["is_player_connected"] then
|
|
|
|
|
hero.thtd_game_info["is_player_connected"] = false
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="player_disconnect", duration=15, params={count=1}, color="#0ff"} )
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#player_disconnect", duration=15, params={count=1}, color="#0ff"} )
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="{d:count}", duration=15, params={count=hero.thtd_player_id+1}, color="#ff0"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="pause_game", duration=15, params={}, color="#ff0"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#pause_game", duration=15, params={}, color="#ff0"})
|
|
|
|
|
if GameRules:IsGamePaused() then PauseGame(false) end
|
|
|
|
|
PauseGame(true)
|
|
|
|
|
end
|
|
|
|
|
@@ -930,7 +930,7 @@ function SpawnSystem:WaveEndForEach()
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
if totalDamage < hero.thtd_wave_total_health * 0.9 then
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "display_chat_msg", {msg="damage_less_rank_tip", params={player_name=PlayerResource:GetPlayerName(hero:GetPlayerOwnerID())}})
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "display_chat_msg", {msg="#damage_less_rank_tip", params={player_name=PlayerResource:GetPlayerName(hero:GetPlayerOwnerID())}})
|
|
|
|
|
else
|
|
|
|
|
isMaxWave = true
|
|
|
|
|
end
|
|
|
|
|
@@ -1384,10 +1384,10 @@ function SpawnSystem:StartSpawn()
|
|
|
|
|
spawnerLine.nextBossName = thtd_bosses_list[RandomInt(1, #thtd_bosses_list)]
|
|
|
|
|
hero.next_boss_name = spawnerLine.nextBossName
|
|
|
|
|
if player ~= nil then
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="extra_bonus_nazrin", duration=60, params={count=1}, color="#0ff"} )
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="extra_bonus_minoriko_limit", duration=60, params={count=1}, color="#0ff"} )
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="extra_bonus_lily", duration=60, params={count=1}, color="#0ff"} )
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="extra_bosses_"..spawnerLine.nextBossName, duration=60, params={count=1}, color="#0ff"} )
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#extra_bonus_nazrin", duration=60, params={count=1}, color="#0ff"} )
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#extra_bonus_minoriko_limit", duration=60, params={count=1}, color="#0ff"} )
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#extra_bonus_lily", duration=60, params={count=1}, color="#0ff"} )
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#extra_bosses_"..spawnerLine.nextBossName, duration=60, params={count=1}, color="#0ff"} )
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
@@ -1451,8 +1451,8 @@ function SpawnSystem:StartSpawn()
|
|
|
|
|
local modifierName = RandomBossBuff[RandomInt(1, #RandomBossBuff)]
|
|
|
|
|
unit:AddNewModifier(unit, nil, modifierName, {})
|
|
|
|
|
if player ~= nil then
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="random_boss_has_buff", duration=20, params={}, color="#0ff"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="DOTA_Tooltip_"..modifierName.."_Description", duration=20, params={}, color="#0ff"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#random_boss_has_buff", duration=20, params={}, color="#0ff"})
|
|
|
|
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#DOTA_Tooltip_"..modifierName.."_Description", duration=20, params={}, color="#0ff"})
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|