Merge pull request #11267 from Arkatos1/Sling_Ability_Scaling

Shadowling Collective Mind ability now fully scales with required thralls threshold
This commit is contained in:
variableundefined
2019-04-10 19:03:27 +08:00
committed by GitHub
2 changed files with 6 additions and 4 deletions
@@ -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)
@@ -359,23 +359,23 @@
to_chat(target, "<span class='warning'>Your concentration has been broken. The mental hooks you have sent out now retract into your mind.</span>")
return
if(thralls >= 3 && !screech_acquired)
if(thralls >= CEILING(3 * ticker.mode.thrall_ratio, 1) && !screech_acquired)
screech_acquired = 1
to_chat(target, "<span class='shadowling'><i>The power of your thralls has granted you the <b>Sonic Screech</b> ability. This ability will shatter nearby windows and deafen enemies, plus stunning silicon lifeforms.</span>")
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, "<span class='shadowling'><i>The power of your thralls has granted you the <b>Blinding Smoke</b> ability. \
It will create a choking cloud that will blind any non-thralls who enter.</i></span>")
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, "<span class='shadowling'><i>The power of your thralls has granted you the <b>Drain Life</b> ability. You can now drain the health of nearby humans to heal yourself.</i></span>")
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, "<span class='shadowling'><i>The power of your thralls has granted you the <b>Black Recuperation</b> ability. \
This will, after a short time, bring a dead thrall completely back to life with no bodily defects.</i></span>")