Files
Bubberstation/code/modules/events/brain_trauma.dm
tralezab 921a7f63a3 makes some events only work on crewmembers, and some not work on centcom (#52966)
brain trauma, fake virus, and heart attack only work on crewmembers.
mass hallucination and appendicitis don't give the effect/pick to people on centcom, respectively
2020-08-24 01:07:24 -07:00

37 lines
1.1 KiB
Plaintext

/datum/round_event_control/brain_trauma
name = "Spontaneous Brain Trauma"
typepath = /datum/round_event/brain_trauma
weight = 25
/datum/round_event/brain_trauma
fakeable = FALSE
/datum/round_event/brain_trauma/start()
for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
if(!H.client)
continue
if(H.stat == DEAD) // What are you doing in this list
continue
if(!H.getorgan(/obj/item/organ/brain)) // If only I had a brain
continue
if(!SSjob.GetJob(H.mind.assigned_role) || (H.mind.assigned_role in GLOB.nonhuman_positions)) //please stop giving my centcom admin gimmicks full body paralysis
continue
traumatize(H)
announce_to_ghosts(H)
break
/datum/round_event/brain_trauma/proc/traumatize(mob/living/carbon/human/H)
var/resistance = pick(
50;TRAUMA_RESILIENCE_BASIC,
30;TRAUMA_RESILIENCE_SURGERY,
15;TRAUMA_RESILIENCE_LOBOTOMY,
5;TRAUMA_RESILIENCE_MAGIC)
var/trauma_type = pickweight(list(
BRAIN_TRAUMA_MILD = 60,
BRAIN_TRAUMA_SEVERE = 30,
BRAIN_TRAUMA_SPECIAL = 10
))
H.gain_trauma_type(trauma_type, resistance)