mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* commit 1 - get me out * she lives * adds wizards * thing * surprise end hits take 1 * s * d * surprise end hits take 2 * montreal * REAl * strangelight * guilford fall * natural disasters * envelope * h * lady elect * test 321 * test 123 Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> * hot toes test * ss * redundancy * s * test 2 * s² * s³ * s²³ * a pray! * life and limb * epic problem * hmm * update * fixes something * fixes something² * adds slaughter demons to the game * rend it * hmm * restores something * adds clockwork cult into the game * adds changelings to the game * cassevetes * test 101 * :) * against * shut the door * adds darkspawn to the game * sad * cashout * adds vampires to the game * 2 * summer freeze * pink frosty * test111 * adds game to the game * 2 * syndrome * test * test 2 * test 3 * test 4 * adds replay to the game? * maybe? * slo * hrn * test II * test III * test IV * new technique * ahm hum * d * sensible * c * ss13 * a * v * f --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
271 lines
8.4 KiB
Plaintext
271 lines
8.4 KiB
Plaintext
//Severe traumas, when your brain gets abused way too much.
|
|
//These range from very annoying to completely debilitating.
|
|
//They cannot be cured with chemicals, and require brain surgery to solve.
|
|
|
|
/datum/brain_trauma/severe
|
|
resilience = TRAUMA_RESILIENCE_SURGERY
|
|
random_cure_chance = 4
|
|
|
|
/datum/brain_trauma/severe/mute
|
|
name = "Mutism"
|
|
desc = "Patient is completely unable to speak."
|
|
scan_desc = "extensive damage to the brain's speech center"
|
|
gain_text = ""
|
|
lose_text = ""
|
|
|
|
/datum/brain_trauma/severe/mute/on_gain()
|
|
ADD_TRAIT(owner, TRAIT_MUTE, TRAUMA_TRAIT)
|
|
..()
|
|
|
|
/datum/brain_trauma/severe/mute/on_lose()
|
|
REMOVE_TRAIT(owner, TRAIT_MUTE, TRAUMA_TRAIT)
|
|
..()
|
|
|
|
/datum/brain_trauma/severe/aphasia
|
|
name = "Aphasia"
|
|
desc = "Patient is unable to speak or understand any language."
|
|
scan_desc = "extensive damage to the brain's language center"
|
|
gain_text = ""
|
|
lose_text = ""
|
|
|
|
/datum/brain_trauma/severe/aphasia/on_gain()
|
|
owner.add_blocked_language(subtypesof(/datum/language/) - /datum/language/aphasia, LANGUAGE_APHASIA)
|
|
owner.grant_language(/datum/language/aphasia, TRUE, TRUE, LANGUAGE_APHASIA)
|
|
..()
|
|
|
|
/datum/brain_trauma/severe/aphasia/on_lose()
|
|
owner.remove_blocked_language(subtypesof(/datum/language/), LANGUAGE_APHASIA)
|
|
owner.remove_language(/datum/language/aphasia, TRUE, TRUE, LANGUAGE_APHASIA)
|
|
..()
|
|
|
|
/datum/brain_trauma/severe/blindness
|
|
name = "Cerebral Blindness"
|
|
desc = "Patient's brain is no longer connected to its eyes."
|
|
scan_desc = "extensive damage to the brain's occipital lobe"
|
|
gain_text = span_warning("You can't see!")
|
|
lose_text = span_notice("Your vision returns.")
|
|
|
|
/datum/brain_trauma/severe/blindness/on_gain()
|
|
owner.become_blind(TRAUMA_TRAIT)
|
|
..()
|
|
|
|
/datum/brain_trauma/severe/blindness/on_lose()
|
|
owner.cure_blind(TRAUMA_TRAIT)
|
|
..()
|
|
|
|
/datum/brain_trauma/severe/paralysis
|
|
name = "Paralysis"
|
|
desc = "Patient's brain can no longer control part of its motor functions."
|
|
scan_desc = "cerebral paralysis"
|
|
gain_text = ""
|
|
lose_text = ""
|
|
var/paralysis_type
|
|
var/list/paralysis_traits = list()
|
|
//for descriptions
|
|
|
|
/datum/brain_trauma/severe/paralysis/New(specific_type)
|
|
if(specific_type)
|
|
paralysis_type = specific_type
|
|
if(!paralysis_type)
|
|
paralysis_type = pick("full","left","right","arms","legs","r_arm","l_arm","r_leg","l_leg")
|
|
var/subject
|
|
switch(paralysis_type)
|
|
if("full")
|
|
subject = "your body"
|
|
paralysis_traits = list(TRAIT_PARALYSIS_L_ARM, TRAIT_PARALYSIS_R_ARM, TRAIT_PARALYSIS_L_LEG, TRAIT_PARALYSIS_R_LEG)
|
|
if("left")
|
|
subject = "the left side of your body"
|
|
paralysis_traits = list(TRAIT_PARALYSIS_L_ARM, TRAIT_PARALYSIS_L_LEG)
|
|
if("right")
|
|
subject = "the right side of your body"
|
|
paralysis_traits = list(TRAIT_PARALYSIS_R_ARM, TRAIT_PARALYSIS_R_LEG)
|
|
if("arms")
|
|
subject = "your arms"
|
|
paralysis_traits = list(TRAIT_PARALYSIS_L_ARM, TRAIT_PARALYSIS_R_ARM)
|
|
if("legs")
|
|
subject = "your legs"
|
|
paralysis_traits = list(TRAIT_PARALYSIS_L_LEG, TRAIT_PARALYSIS_R_LEG)
|
|
if("r_arm")
|
|
subject = "your right arm"
|
|
paralysis_traits = list(TRAIT_PARALYSIS_R_ARM)
|
|
if("l_arm")
|
|
subject = "your left arm"
|
|
paralysis_traits = list(TRAIT_PARALYSIS_L_ARM)
|
|
if("r_leg")
|
|
subject = "your right leg"
|
|
paralysis_traits = list(TRAIT_PARALYSIS_R_LEG)
|
|
if("l_leg")
|
|
subject = "your left leg"
|
|
paralysis_traits = list(TRAIT_PARALYSIS_L_LEG)
|
|
|
|
gain_text = span_warning("You can't feel [subject] anymore!")
|
|
lose_text = span_notice("You can feel [subject] again!")
|
|
|
|
/datum/brain_trauma/severe/paralysis/on_gain()
|
|
..()
|
|
for(var/X in paralysis_traits)
|
|
ADD_TRAIT(owner, X, "trauma_paralysis")
|
|
|
|
/datum/brain_trauma/severe/paralysis/on_lose()
|
|
..()
|
|
for(var/X in paralysis_traits)
|
|
REMOVE_TRAIT(owner, X, "trauma_paralysis")
|
|
|
|
/datum/brain_trauma/severe/paralysis/paraplegic
|
|
random_gain = FALSE
|
|
paralysis_type = "legs"
|
|
resilience = TRAUMA_RESILIENCE_ABSOLUTE
|
|
|
|
/datum/brain_trauma/severe/narcolepsy
|
|
name = "Narcolepsy"
|
|
desc = "Patient may involuntarily fall asleep during normal activities."
|
|
scan_desc = "traumatic narcolepsy"
|
|
gain_text = ""
|
|
lose_text = ""
|
|
|
|
/datum/brain_trauma/severe/narcolepsy/on_life(delta_time, times_fired)
|
|
if(owner.IsSleeping())
|
|
return
|
|
|
|
var/sleep_chance = 1
|
|
var/drowsy = !!owner.has_status_effect(/datum/status_effect/drowsiness)
|
|
if(owner.m_intent == MOVE_INTENT_RUN)
|
|
sleep_chance += 2
|
|
if(drowsy)
|
|
sleep_chance += 3
|
|
|
|
if(DT_PROB(0.5 * sleep_chance, delta_time))
|
|
to_chat(owner, span_warning("You fall asleep."))
|
|
owner.Sleeping(6 SECONDS)
|
|
|
|
else if(!drowsy && DT_PROB(sleep_chance, delta_time))
|
|
to_chat(owner, span_warning("You feel tired..."))
|
|
owner.adjust_drowsiness(20 SECONDS)
|
|
|
|
/datum/brain_trauma/severe/monophobia
|
|
name = "Monophobia"
|
|
desc = "Patient feels sick and distressed when not around other people, leading to potentially lethal levels of stress."
|
|
scan_desc = "monophobia"
|
|
gain_text = ""
|
|
lose_text = ""
|
|
var/stress = 0
|
|
|
|
/datum/brain_trauma/severe/monophobia/on_gain()
|
|
..()
|
|
if(check_alone())
|
|
to_chat(owner, span_warning("You feel really lonely..."))
|
|
else
|
|
to_chat(owner, span_notice("You feel safe, as long as you have people around you."))
|
|
|
|
/datum/brain_trauma/severe/monophobia/on_life()
|
|
..()
|
|
if(check_alone())
|
|
stress = min(stress + 0.5, 100)
|
|
if(stress > 10 && (prob(5)))
|
|
stress_reaction()
|
|
else
|
|
stress = max(stress - 4, 0)
|
|
|
|
/datum/brain_trauma/severe/monophobia/proc/check_alone()
|
|
if(HAS_TRAIT(owner, TRAIT_BLIND))
|
|
return TRUE
|
|
for(var/mob/M in oview(owner, 7))
|
|
if(!isliving(M)) //ghosts ain't people
|
|
continue
|
|
if((istype(M, /mob/living/simple_animal/pet)) || M.ckey)
|
|
return FALSE
|
|
return TRUE
|
|
|
|
/datum/brain_trauma/severe/monophobia/proc/stress_reaction()
|
|
if(owner.stat != CONSCIOUS)
|
|
return
|
|
|
|
var/high_stress = (stress > 60) //things get psychosomatic from here on
|
|
switch(rand(1, 6))
|
|
if(1)
|
|
if(high_stress)
|
|
to_chat(owner, span_warning("You feel really sick at the thought of being alone!"))
|
|
else
|
|
to_chat(owner, span_warning("You feel sick..."))
|
|
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob/living/carbon, vomit), high_stress), 50) //blood vomit if high stress
|
|
if(2)
|
|
if(high_stress)
|
|
to_chat(owner, span_warning("You feel weak and scared! If only you weren't alone..."))
|
|
owner.adjustStaminaLoss(50)
|
|
else
|
|
to_chat(owner, span_warning("You can't stop shaking..."))
|
|
|
|
owner.adjust_dizzy(40 SECONDS)
|
|
owner.adjust_confusion(20 SECONDS)
|
|
owner.set_jitter_if_lower(40 SECONDS)
|
|
|
|
if(3, 4)
|
|
if(high_stress)
|
|
to_chat(owner, span_warning("You're going mad with loneliness!"))
|
|
owner.adjust_hallucinations(60 SECONDS)
|
|
else
|
|
to_chat(owner, span_warning("You feel really lonely..."))
|
|
|
|
if(5)
|
|
if(high_stress)
|
|
if(prob(15) && ishuman(owner))
|
|
var/mob/living/carbon/human/H = owner
|
|
H.set_heartattack(TRUE)
|
|
to_chat(H, span_userdanger("You feel a stabbing pain in your heart!"))
|
|
else
|
|
to_chat(owner, span_userdanger("You feel your heart lurching in your chest..."))
|
|
owner.adjustOxyLoss(8)
|
|
else
|
|
to_chat(owner, span_warning("Your heart skips a beat."))
|
|
owner.adjustOxyLoss(8)
|
|
|
|
else
|
|
//No effect
|
|
return
|
|
|
|
/datum/brain_trauma/severe/discoordination
|
|
name = "Discoordination"
|
|
desc = "Patient is unable to use complex tools or machinery."
|
|
scan_desc = "extreme discoordination"
|
|
gain_text = ""
|
|
lose_text = ""
|
|
|
|
/datum/brain_trauma/severe/discoordination/on_gain()
|
|
ADD_TRAIT(owner, TRAIT_MONKEYLIKE, TRAUMA_TRAIT)
|
|
..()
|
|
|
|
/datum/brain_trauma/severe/discoordination/on_lose()
|
|
REMOVE_TRAIT(owner, TRAIT_MONKEYLIKE, TRAUMA_TRAIT)
|
|
..()
|
|
|
|
/datum/brain_trauma/severe/pacifism
|
|
name = "Traumatic Non-Violence"
|
|
desc = "Patient is extremely unwilling to harm others in violent ways."
|
|
scan_desc = "pacific syndrome"
|
|
gain_text = ""
|
|
lose_text = ""
|
|
|
|
/datum/brain_trauma/severe/pacifism/on_gain()
|
|
ADD_TRAIT(owner, TRAIT_PACIFISM, TRAUMA_TRAIT)
|
|
..()
|
|
|
|
/datum/brain_trauma/severe/pacifism/on_lose()
|
|
REMOVE_TRAIT(owner, TRAIT_PACIFISM, TRAUMA_TRAIT)
|
|
..()
|
|
|
|
/datum/brain_trauma/severe/hypnotic_stupor
|
|
name = "Hypnotic Stupor"
|
|
desc = "Patient is prone to episodes of extreme stupor that leaves them extremely suggestible."
|
|
scan_desc = "oneiric feedback loop"
|
|
gain_text = ""
|
|
lose_text = ""
|
|
|
|
/datum/brain_trauma/severe/hypnotic_stupor/on_lose() //hypnosis must be cleared separately, but brain surgery should get rid of both anyway
|
|
..()
|
|
owner.remove_status_effect(/datum/status_effect/trance)
|
|
|
|
/datum/brain_trauma/severe/hypnotic_stupor/on_life()
|
|
..()
|
|
if(prob(1) && !owner.has_status_effect(/datum/status_effect/trance))
|
|
owner.apply_status_effect(/datum/status_effect/trance, rand(100,300), FALSE)
|