From 59092d9f0b73227b00b65d5b953cea2f7cfded47 Mon Sep 17 00:00:00 2001 From: Arkatos1 Date: Sun, 7 Apr 2019 20:12:01 +0200 Subject: [PATCH] Adds thrall scaling for obtaining new Shadowling abilities --- code/game/gamemodes/shadowling/shadowling.dm | 2 ++ code/game/gamemodes/shadowling/shadowling_abilities.dm | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index f8f2680ffd7..230f797626d 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -53,6 +53,7 @@ Made by Xhuis var/objective_explanation var/warning_threshold var/victory_warning_announced = FALSE + var/thrall_ratio = 1 /proc/is_thrall(var/mob/living/M) return istype(M) && M.mind && ticker && ticker.mode && (M.mind in ticker.mode.shadowling_thralls) @@ -101,6 +102,7 @@ Made by Xhuis var/thrall_scaling = round(num_players() / 3) required_thralls = Clamp(thrall_scaling, 15, 25) + thrall_ratio = required_thralls / 15 warning_threshold = round(0.66 * required_thralls) diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 92dce32d420..30c79798b2f 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -359,23 +359,23 @@ to_chat(target, "Your concentration has been broken. The mental hooks you have sent out now retract into your mind.") return - if(thralls >= 3 && !screech_acquired) + if(thralls >= CEILING(3 * ticker.mode.thrall_ratio, 1) && !screech_acquired) screech_acquired = 1 to_chat(target, "The power of your thralls has granted you the Sonic Screech ability. This ability will shatter nearby windows and deafen enemies, plus stunning silicon lifeforms.") target.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/unearthly_screech(null)) - if(thralls >= 5 && !blind_smoke_acquired) + if(thralls >= CEILING(5 * ticker.mode.thrall_ratio, 1) && !blind_smoke_acquired) blind_smoke_acquired = 1 to_chat(target, "The power of your thralls has granted you the Blinding Smoke ability. \ It will create a choking cloud that will blind any non-thralls who enter.") target.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/blindness_smoke(null)) - if(thralls >= 7 && !drainLifeAcquired) + if(thralls >= CEILING(7 * ticker.mode.thrall_ratio, 1) && !drainLifeAcquired) drainLifeAcquired = 1 to_chat(target, "The power of your thralls has granted you the Drain Life ability. You can now drain the health of nearby humans to heal yourself.") target.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/drainLife(null)) - if(thralls >= 9 && !reviveThrallAcquired) + if(thralls >= CEILING(9 * ticker.mode.thrall_ratio, 1) && !reviveThrallAcquired) reviveThrallAcquired = 1 to_chat(target, "The power of your thralls has granted you the Black Recuperation ability. \ This will, after a short time, bring a dead thrall completely back to life with no bodily defects.")