b46d0e0c50
cl coiax add: Adds the Spontaneous Brain Trauma to the event pool. Sometimes your brain just goes a little wrong. /cl Brain traumas are !fun!, and even more !fun! than your appendix getting inflamed.
35 lines
927 B
Plaintext
35 lines
927 B
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
|
|
|
|
traumatize(H)
|
|
announce_to_ghosts(H)
|
|
break
|
|
|
|
/datum/round_event/brain_trauma/proc/traumatize(mob/living/carbon/human/H)
|
|
var/resistance = pickweight(list(
|
|
TRAUMA_RESILIENCE_BASIC = 50,
|
|
TRAUMA_RESILIENCE_SURGERY = 30,
|
|
TRAUMA_RESILIENCE_LOBOTOMY = 15,
|
|
TRAUMA_RESILIENCE_MAGIC = 5))
|
|
var/trauma_type = pickweight(list(
|
|
BRAIN_TRAUMA_MILD = 60,
|
|
BRAIN_TRAUMA_SEVERE = 30,
|
|
BRAIN_TRAUMA_SPECIAL = 10
|
|
))
|
|
|
|
H.gain_trauma_type(trauma_type, resistance)
|