After a curse of madness has been triggered, even latejoiners are affected

🆑 coiax
tweak: After a Curse of Madness has ravaged the mind of the station,
the lingering magics also affect anyone arriving to the station late.
/🆑

Why? People joining late get summoned guns, and summoned magic, they should
get summoned madness as well. Why should they miss out on the "fun"?
This commit is contained in:
Jack Edge
2019-01-01 23:44:31 +00:00
parent 1191194f51
commit a8ed0da296
2 changed files with 22 additions and 13 deletions
+20 -13
View File
@@ -1,9 +1,13 @@
GLOBAL_VAR_INIT(curse_of_madness_triggered, FALSE)
/proc/curse_of_madness(mob/user, message)
if(user) //in this case either someone holding a spellbook or a badmin
to_chat(user, "<span class='warning'>You sent a curse of madness with the message \"[message]\"!</span>")
message_admins("[ADMIN_LOOKUPFLW(user)] sent a curse of madness with the message \"[message]\"!")
log_game("[key_name(user)] sent a curse of madness with the message \"[message]\"!")
GLOB.curse_of_madness_triggered = message // So latejoiners are also afflicted.
deadchat_broadcast("<span class='deadsay'>A <span class='name'>Curse of Madness</span> has stricken the station, shattering their minds with the awful secret: \"<span class='big hypnophrase'>[message]</span>\"</span>")
for(var/mob/living/carbon/human/H in GLOB.player_list)
@@ -18,16 +22,19 @@
if(istype(H.get_item_by_slot(SLOT_HEAD), /obj/item/clothing/head/foilhat))
to_chat(H, "<span class='warning'>Your protective headgear successfully deflects mind controlling brainwaves!</span>")
continue
H.playsound_local(H,'sound/hallucinations/veryfar_noise.ogg',40,1)
to_chat(H, "<span class='reallybig hypnophrase'>[message]</span>")
to_chat(H, "<span class='warning'>Your mind shatters!</span>")
switch(rand(1,10))
if(1 to 3)
H.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
H.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
if(4 to 6)
H.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY)
if(7 to 8)
H.gain_trauma_type(BRAIN_TRAUMA_MAGIC, TRAUMA_RESILIENCE_LOBOTOMY)
if(9 to 10)
H.gain_trauma_type(BRAIN_TRAUMA_SPECIAL, TRAUMA_RESILIENCE_LOBOTOMY)
give_madness(H, message)
/proc/give_madness(mob/living/carbon/human/H, message)
H.playsound_local(H,'sound/hallucinations/veryfar_noise.ogg',40,1)
to_chat(H, "<span class='reallybig hypnophrase'>[message]</span>")
to_chat(H, "<span class='warning'>Your mind shatters!</span>")
switch(rand(1,10))
if(1 to 3)
H.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
H.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
if(4 to 6)
H.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY)
if(7 to 8)
H.gain_trauma_type(BRAIN_TRAUMA_MAGIC, TRAUMA_RESILIENCE_LOBOTOMY)
if(9 to 10)
H.gain_trauma_type(BRAIN_TRAUMA_SPECIAL, TRAUMA_RESILIENCE_LOBOTOMY)