diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index f744ab1e737..780d7ca17e7 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -384,6 +384,8 @@ give_guns(humanc) if(GLOB.summon_magic_triggered) give_magic(humanc) + if(GLOB.curse_of_madness_triggered) + give_madness(humanc, GLOB.curse_of_madness_triggered) GLOB.joined_player_list += character.ckey diff --git a/code/modules/spells/spell_types/curse.dm b/code/modules/spells/spell_types/curse.dm index 699c19911cb..94f5da9c749 100644 --- a/code/modules/spells/spell_types/curse.dm +++ b/code/modules/spells/spell_types/curse.dm @@ -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, "You sent a curse of madness with the message \"[message]\"!") 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("A Curse of Madness has stricken the station, shattering their minds with the awful secret: \"[message]\"") 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, "Your protective headgear successfully deflects mind controlling brainwaves!") continue - H.playsound_local(H,'sound/hallucinations/veryfar_noise.ogg',40,1) - to_chat(H, "[message]") - to_chat(H, "Your mind shatters!") - 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, "[message]") + to_chat(H, "Your mind shatters!") + 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)