From 10fbb1eddd9be4c8a7bcc443a76950d8886c58f2 Mon Sep 17 00:00:00 2001 From: TDSSS <32099540+TDSSS@users.noreply.github.com> Date: Mon, 19 Nov 2018 08:37:51 +0100 Subject: [PATCH] Dynamic threshold, purged redspace --- code/game/gamemodes/shadowling/shadowling.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 4ec44ac83b9..3dbdd1376ee 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -51,6 +51,7 @@ Made by Xhuis var/shadowling_ascended = 0 //If at least one shadowling has ascended var/shadowling_dead = 0 //is shadowling kill var/objective_explanation + var/warning_threshold var/victory_warning_announced = FALSE /proc/is_thrall(var/mob/living/M) @@ -101,6 +102,8 @@ Made by Xhuis var/thrall_scaling = round(num_players() / 3) required_thralls = Clamp(thrall_scaling, 15, 25) + warning_threshold = round(0.66 * required_thralls) + ..() return 1 @@ -164,11 +167,9 @@ Made by Xhuis to_chat(new_thrall_mind.current, "You may communicate with your allies by speaking in the Shadowling Hivemind (:8).") if(jobban_isbanned(new_thrall_mind.current, ROLE_SHADOWLING) || jobban_isbanned(new_thrall_mind.current, ROLE_SYNDICATE)) replace_jobbanned_player(new_thrall_mind.current, ROLE_SHADOWLING) - if(!victory_warning_announced && (length(shadowling_thralls) >= (required_thralls - 3)))//are the slings very close to winning? + if(!victory_warning_announced && (length(shadowling_thralls) >= warning_threshold))//are the slings very close to winning? victory_warning_announced = TRUE //then let's give the station a warning - command_announcement.Announce("Large concentration of psychic redspace energy detected by long-ranged scanners. Shadowling ascension event imminent. Prevent it at all costs!","Central Command Higher Dimensional Affairs", 'sound/AI/spanomalies.ogg') - - + command_announcement.Announce("Large concentration of psychic bluespace energy detected by long-ranged scanners. Shadowling ascension event imminent. Prevent it at all costs!","Central Command Higher Dimensional Affairs", 'sound/AI/spanomalies.ogg') return 1 /datum/game_mode/proc/remove_thrall(datum/mind/thrall_mind, var/kill = 0)