From 8b41dacba960b7515e632aab87ff65f7c1036bc7 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 9 Dec 2017 16:12:30 -0500 Subject: [PATCH] switches lobes for grammar n shit --- code/datums/brain_damage/severe.dm | 179 +++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 code/datums/brain_damage/severe.dm diff --git a/code/datums/brain_damage/severe.dm b/code/datums/brain_damage/severe.dm new file mode 100644 index 0000000000..08cee65085 --- /dev/null +++ b/code/datums/brain_damage/severe.dm @@ -0,0 +1,179 @@ +//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 + +/datum/brain_trauma/severe/mute + name = "Mutism" + desc = "Patient is completely unable to speak." + scan_desc = "extensive damage to the brain's language center" + gain_text = "You forget how to speak!" + lose_text = "You suddenly remember how to speak." + +/datum/brain_trauma/severe/mute/on_gain() + owner.disabilities |= MUTE + ..() + +//no fiddling with genetics to get out of this one +/datum/brain_trauma/severe/mute/on_life() + if(!(owner.disabilities & MUTE)) + on_gain() + ..() + +/datum/brain_trauma/severe/mute/on_lose() + owner.disabilities &= ~MUTE + ..() + +/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 = "You can't see!" + lose_text = "Your vision returns." + +/datum/brain_trauma/severe/blindness/on_gain() + owner.become_blind() + ..() + +//no fiddling with genetics to get out of this one +/datum/brain_trauma/severe/blindness/on_life() + if(!(owner.disabilities & BLIND)) + on_gain() + ..() + +/datum/brain_trauma/severe/blindness/on_lose() + owner.cure_blind() + ..() + +/datum/brain_trauma/severe/paralysis + name = "Paralysis" + desc = "Patient's brain can no longer control its motor functions." + scan_desc = "cerebral paralysis" + gain_text = "You can't feel your body anymore!" + lose_text = "You can feel your limbs again!" + +/datum/brain_trauma/severe/paralysis/on_life() + owner.Knockdown(200, ignore_canknockdown = TRUE) + ..() + +/datum/brain_trauma/severe/paralysis/on_lose() + owner.SetKnockdown(0) + ..() + +/datum/brain_trauma/severe/narcolepsy + name = "Narcolepsy" + desc = "Patient may involuntarily fall asleep during normal activities." + scan_desc = "traumatic narcolepsy" + gain_text = "You have a constant feeling of drowsiness..." + lose_text = "You feel awake and aware again." + +/datum/brain_trauma/severe/narcolepsy/on_life() + ..() + if(owner.IsSleeping()) + return + var/sleep_chance = 1 + if(owner.m_intent == MOVE_INTENT_RUN) + sleep_chance += 2 + if(owner.drowsyness) + sleep_chance += 3 + if(prob(sleep_chance)) + to_chat(owner, "You fall asleep.") + owner.Sleeping(60) + else if(!owner.drowsyness && prob(sleep_chance * 2)) + to_chat(owner, "You feel tired...") + owner.drowsyness += 10 + +/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 = "severe monophobia" + gain_text = "" + lose_text = "You feel like you could be safe on your own." + var/stress = 0 + +/datum/brain_trauma/severe/monophobia/on_gain() + ..() + if(check_alone()) + to_chat(owner, "You feel really lonely...") + else + to_chat(owner, "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 -= 4 + +/datum/brain_trauma/severe/monophobia/proc/check_alone() + if(owner.disabilities & 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, "You feel sick...") + else + to_chat(owner, "You feel really sick at the thought of being alone!") + addtimer(CALLBACK(owner, /mob/living/carbon.proc/vomit, high_stress), 50) //blood vomit if high stress + if(2) + if(!high_stress) + to_chat(owner, "You can't stop shaking...") + owner.dizziness += 20 + owner.confused += 20 + owner.Jitter(20) + else + to_chat(owner, "You feel weak and scared! If only you weren't alone...") + owner.dizziness += 20 + owner.confused += 20 + owner.Jitter(20) + owner.adjustStaminaLoss(50) + + if(3, 4) + if(!high_stress) + to_chat(owner, "You feel really lonely...") + else + to_chat(owner, "You're going mad with loneliness!") + owner.hallucination += 20 + + if(5) + if(!high_stress) + to_chat(owner, "Your heart skips a beat.") + owner.adjustOxyLoss(8) + else + if(prob(15) && ishuman(owner)) + var/mob/living/carbon/human/H = owner + H.set_heartattack(TRUE) + to_chat(H, "You feel a stabbing pain in your heart!") + else + to_chat(owner, "You feel your heart lurching in your chest...") + owner.adjustOxyLoss(8) + +/datum/brain_trauma/severe/discoordination + name = "Discoordination" + desc = "Patient is unable to use complex tools or machinery." + scan_desc = "extreme discoordination" + gain_text = "You can barely control your hands!" + lose_text = "You feel in control of your hands again." + +/datum/brain_trauma/severe/discoordination/on_gain() + owner.disabilities |= MONKEYLIKE + ..() + +/datum/brain_trauma/severe/discoordination/on_lose() + owner.disabilities &= ~MONKEYLIKE + ..()