From 408cb5d8d8f705c52bdac8e4eac094ea2df81329 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 31 Jan 2016 11:46:56 +1030 Subject: [PATCH] Adds a coverage check to xenoflora splattering, adjusts brainloss across the board. --- code/game/gamemodes/cult/runes.dm | 2 +- code/game/machinery/cloning.dm | 3 +-- .../machinery/doors/airlock_electronics.dm | 5 ----- code/game/machinery/machinery.dm | 4 ++-- code/game/objects/items/devices/flashlight.dm | 2 +- code/game/objects/items/devices/scanners.dm | 8 ++++---- code/modules/assembly/mousetrap.dm | 8 ++++---- code/modules/hydroponics/seed.dm | 18 ++++++++++++++---- .../modules/mob/living/carbon/human/examine.dm | 3 --- code/modules/mob/living/carbon/human/life.dm | 11 ----------- code/modules/mob/living/carbon/human/say.dm | 10 ---------- .../mob/living/silicon/robot/analyzer.dm | 2 +- .../mob/living/simple_animal/borer/borer.dm | 2 +- .../simple_animal/borer/borer_captive.dm | 6 +++--- code/modules/power/apc.dm | 10 +++------- code/modules/projectiles/projectile/special.dm | 3 +-- .../Chemistry-Reagents-Dispenser.dm | 2 +- .../Chemistry-Reagents-Toxins.dm | 2 +- .../artifact/effects/unknown_effect_hurt.dm | 6 +++--- code/modules/virus2/effect.dm | 2 +- 20 files changed, 42 insertions(+), 67 deletions(-) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index c5ea0bf9a9..06eb8fd7c2 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -159,7 +159,7 @@ var/list/sacrificed = list() target << "Your entire broken soul and being is engulfed in corruption and flames as your mind shatters away into nothing." target.hallucination += 5000 target.apply_effect(15, STUTTER) - target.adjustBrainLoss(rand(1,5)) + target.adjustBrainLoss(1) initial_message = 1 if (!target.can_feel_pain()) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index d3c152fa25..e2c8398a0f 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -110,7 +110,6 @@ //Get the clone body ready H.adjustCloneLoss(150) // New damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite - H.adjustBrainLoss(50) // Even if healed to full health, it will have some brain damage H.Paralyse(4) //Here let's calculate their health so the pod doesn't immediately eject them!!! @@ -170,7 +169,7 @@ occupant.adjustCloneLoss(-2 * heal_rate) //Premature clones may have brain damage. - occupant.adjustBrainLoss(-1 * heal_rate) + occupant.adjustBrainLoss(-(n_ceil(0.5*heal_rate))) //So clones don't die of oxyloss in a running pod. if(occupant.reagents.get_reagent_amount("inaprovaline") < 30) diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index e69f750a5f..3ae0891b89 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -20,13 +20,8 @@ if (!ishuman(user) && !istype(user,/mob/living/silicon/robot)) return ..(user) - var/mob/living/carbon/human/H = user - if(H.getBrainLoss() >= 60) - return - var/t1 = text("Access control
\n") - if (last_configurator) t1 += "Operator: [last_configurator]
" diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 6798f2b736..6c391b75b5 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -232,8 +232,8 @@ Class Procs: */ if (ishuman(user)) var/mob/living/carbon/human/H = user - if(H.getBrainLoss() >= 60) - visible_message("[H] stares cluelessly at [src] and drools.") + if(H.getBrainLoss() >= 55) + visible_message("[H] stares cluelessly at [src].") return 1 else if(prob(H.getBrainLoss())) user << "You momentarily forget how to use [src]." diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 21e55e65ce..8b172cbe52 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -40,7 +40,7 @@ add_fingerprint(user) if(on && user.zone_sel.selecting == O_EYES) - if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly + if((CLUMSY in user.mutations) && prob(50)) //too dumb to use flashlight properly return ..() //just hit them in the head var/mob/living/carbon/human/H = M //mob has protective eyewear diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index a4644e274f..6f3ce0261c 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -26,7 +26,7 @@ REAGENT SCANNER /obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob) - if (( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << text("You try to analyze the floor's vitals!") for(var/mob/O in viewers(M, null)) O.show_message("\The [user] has analyzed the floor's vitals!", 1) @@ -130,10 +130,10 @@ REAGENT SCANNER // user.show_message("Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.") if (M.has_brain_worms()) user.show_message("Subject suffering from aberrant brain activity. Recommend further scanning.") - else if (M.getBrainLoss() >= 100 || !M.has_brain()) + else if (M.getBrainLoss() >= 60 || !M.has_brain()) user.show_message("Subject is brain dead.") - else if (M.getBrainLoss() >= 60) - user.show_message("Severe brain damage detected. Subject likely to have a traumatic brain injury!.") + else if (M.getBrainLoss() >= 25) + user.show_message("Severe brain damage detected. Subject likely to have a traumatic brain injury.") else if (M.getBrainLoss() >= 10) user.show_message("Significant brain damage detected. Subject may have had a concussion.") if(ishuman(M)) diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 3537fbee50..c3c395f15a 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -2,8 +2,8 @@ name = "mousetrap" desc = "A handy little spring-loaded trap for catching pesty rodents." icon_state = "mousetrap" - origin_tech = list(TECH_COMBAT = 1) - matter = list(DEFAULT_WALL_MATERIAL = 100, "waste" = 10) + origin_tech = list(TECH_COMBAT = 1) + matter = list(DEFAULT_WALL_MATERIAL = 100, "waste" = 10) var/armed = 0 @@ -54,7 +54,7 @@ if(!armed) user << "You arm [src]." else - if(((user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50))) + if((CLUMSY in user.mutations) && prob(50)) var/which_hand = "l_hand" if(!user.hand) which_hand = "r_hand" @@ -70,7 +70,7 @@ attack_hand(mob/living/user as mob) if(armed) - if(((user.getBrainLoss() >= 60 || CLUMSY in user.mutations)) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) var/which_hand = "l_hand" if(!user.hand) which_hand = "r_hand" diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 4d98cad9ed..f898e3b8ea 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -153,7 +153,6 @@ if(!body_coverage) return - target << "You are stung by \the [fruit]!" for(var/rid in chems) var/injecting = min(5,max(1,get_trait(TRAIT_POTENCY)/5)) @@ -178,9 +177,20 @@ for(var/mob/living/M in T.contents) if(!M.reagents) continue - for(var/chem in chems) - var/injecting = min(5,max(1,get_trait(TRAIT_POTENCY)/3)) - M.reagents.add_reagent(chem,injecting) + var/body_coverage = HEAD|FACE|EYES|UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS + for(var/obj/item/clothing/clothes in M) + if(M.l_hand == clothes || M.r_hand == clothes) + continue + body_coverage &= ~(clothes.body_parts_covered) + if(!body_coverage) + continue + var/datum/reagents/R = M.reagents + var/mob/living/carbon/human/H = M + if(istype(H)) + R = H.touching + if(istype(R)) + for(var/chem in chems) + R.add_reagent(chem,min(5,max(1,get_trait(TRAIT_POTENCY)/3))) //Applies an effect to a target atom. /datum/seed/proc/thrown_at(var/obj/item/thrown,var/atom/target, var/force_explode) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index d9a6850c3a..9b4670bb21 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -243,9 +243,6 @@ msg += "" - if(getBrainLoss() >= 60) - msg += "[T.He] [T.has] a stupid expression on [T.his] face.\n" - var/ssd_msg = species.get_ssd(src) if(ssd_msg && (!should_have_organ("brain") || has_brain()) && stat != DEAD) if(!key) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 0f7fcc00e2..f5575118e0 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -190,17 +190,6 @@ speech_problem_flag = 1 if (prob(10)) stuttering = max(10, stuttering) - // No. -- cib - /*if (getBrainLoss() >= 60 && stat != 2) - if (prob(3)) - switch(pick(1,2,3)) - if(1) - say(pick("IM A PONY NEEEEEEIIIIIIIIIGH", "without oxigen blob don't evoluate?", "CAPTAINS A COMDOM", "[pick("", "that meatball traitor")] [pick("joerge", "george", "gorge", "gdoruge")] [pick("mellens", "melons", "mwrlins")] is grifing me HAL;P!!!", "can u give me [pick("telikesis","halk","eppilapse")]?", "THe saiyans screwed", "Bi is THE BEST OF BOTH WORLDS>", "I WANNA PET TEH monkeyS", "stop grifing me!!!!", "SOTP IT#")) - if(2) - say(pick("FUS RO DAH","fucking 4rries!", "stat me", ">my face", "roll it easy!", "waaaaaagh!!!", "red wonz go fasta", "FOR TEH EMPRAH", "lol2cat", "dem dwarfs man, dem dwarfs", "SPESS MAHREENS", "hwee did eet fhor khayosss", "lifelike texture ;_;", "luv can bloooom", "PACKETS!!!")) - if(3) - emote("drool") - */ if(stat != 2) var/rn = rand(0, 200) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 685b122590..cbfb88676a 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -143,16 +143,6 @@ if(parent[3]) speech_problem_flag = 1 - var/braindam = getBrainLoss() - if(braindam >= 60) - speech_problem_flag = 1 - if(prob(braindam/4)) - message = stutter(message) - verb = pick("stammers", "stutters") - if(prob(braindam)) - message = uppertext(message) - verb = "yells loudly" - var/list/returns[3] returns[1] = message returns[2] = verb diff --git a/code/modules/mob/living/silicon/robot/analyzer.dm b/code/modules/mob/living/silicon/robot/analyzer.dm index 1f4024459e..22d716aadd 100644 --- a/code/modules/mob/living/silicon/robot/analyzer.dm +++ b/code/modules/mob/living/silicon/robot/analyzer.dm @@ -17,7 +17,7 @@ var/mode = 1; /obj/item/device/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob) - if(( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) user << text("\red You try to analyze the floor's vitals!") for(var/mob/O in viewers(M, null)) O.show_message(text("\red [user] has analyzed the floor's vitals!"), 1) diff --git a/code/modules/mob/living/simple_animal/borer/borer.dm b/code/modules/mob/living/simple_animal/borer/borer.dm index d4b5977a6e..ba09c9e5d6 100644 --- a/code/modules/mob/living/simple_animal/borer/borer.dm +++ b/code/modules/mob/living/simple_animal/borer/borer.dm @@ -83,7 +83,7 @@ return if(prob(5)) - host.adjustBrainLoss(rand(1,2)) + host.adjustBrainLoss(0.1) if(prob(host.brainloss/20)) host.say("*[pick(list("blink","blink_r","choke","aflap","drool","twitch","twitch_s","gasp"))]") diff --git a/code/modules/mob/living/simple_animal/borer/borer_captive.dm b/code/modules/mob/living/simple_animal/borer/borer_captive.dm index 45132f588e..b153c78c8c 100644 --- a/code/modules/mob/living/simple_animal/borer/borer_captive.dm +++ b/code/modules/mob/living/simple_animal/borer/borer_captive.dm @@ -46,14 +46,14 @@ spawn(rand(200,250)+B.host.brainloss) if(!B || !B.controlling) return - B.host.adjustBrainLoss(rand(5,10)) + B.host.adjustBrainLoss(rand(0.1,0.5)) H << "With an immense exertion of will, you regain control of your body!" B.host << "You feel control of the host brain ripped from your grasp, and retract your probosci before the wild neural impulses can damage you." B.detatch() verbs -= /mob/living/carbon/proc/release_control verbs -= /mob/living/carbon/proc/punish_host verbs -= /mob/living/carbon/proc/spawn_larvae - + return - + ..() diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index a062fd1910..b64a370e07 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -853,13 +853,9 @@ if ((!in_range(src, user) || !istype(src.loc, /turf) || hacker)) // AI-hacked APCs cannot be controlled by other AIs, unlinked cyborgs or humans. return 0 var/mob/living/carbon/human/H = user - if (istype(H)) - if(H.getBrainLoss() >= 60) - H.visible_message("[H] stares cluelessly at [src] and drools.") - return 0 - else if(prob(H.getBrainLoss())) - user << "You momentarily forget how to use [src]." - return 0 + if (istype(H) && prob(H.getBrainLoss())) + user << "You momentarily forget how to use [src]." + return 0 return 1 /obj/machinery/power/apc/Topic(href, href_list) diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index cd5189e4a3..4c72889ef0 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -135,8 +135,7 @@ on_hit(var/atom/target, var/blocked = 0) if(ishuman(target)) var/mob/living/carbon/human/M = target - M.adjustBrainLoss(20) - M.hallucination += 20 + M.confused += rand(5,8) /obj/item/projectile/icarus/pointdefense/process() Icarus_FireLaser(get_turf(original)) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index e77b86a30a..ccdb834ef0 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -191,7 +191,7 @@ step(M, pick(cardinal)) if(prob(5)) M.emote(pick("twitch", "drool", "moan")) - M.adjustBrainLoss(2) + M.adjustBrainLoss(0.1) /datum/reagent/nitrogen name = "Nitrogen" diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 3de830f644..25045f2a61 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -394,7 +394,7 @@ return M.jitteriness = max(M.jitteriness - 5, 0) if(prob(80)) - M.adjustBrainLoss(3 * removed) + M.adjustBrainLoss(0.1 * removed) if(prob(50)) M.drowsyness = max(M.drowsyness, 3) if(prob(10)) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm index 7ffeffa8eb..5bdb39a87c 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm @@ -13,7 +13,7 @@ C.adjustToxLoss(rand(5,25) * weakness) C.adjustBruteLoss(rand(5,25) * weakness) C.adjustFireLoss(rand(5,25) * weakness) - C.adjustBrainLoss(rand(5,25) * weakness) + C.adjustBrainLoss(rand(1,5) * weakness) C.apply_effect(25 * weakness, IRRADIATE) C.nutrition -= min(50 * weakness, C.nutrition) C.make_dizzy(6 * weakness) @@ -31,7 +31,7 @@ C.adjustFireLoss(1 * weakness) C.adjustToxLoss(1 * weakness) C.adjustOxyLoss(1 * weakness) - C.adjustBrainLoss(1 * weakness) + C.adjustBrainLoss(0.1 * weakness) C.updatehealth() /datum/artifact_effect/hurt/DoEffectPulse() @@ -45,5 +45,5 @@ C.adjustFireLoss(3 * weakness) C.adjustToxLoss(3 * weakness) C.adjustOxyLoss(3 * weakness) - C.adjustBrainLoss(3 * weakness) + C.adjustBrainLoss(0.1 * weakness) C.updatehealth() diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index bcb70768b3..0d6e696b5e 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -241,7 +241,7 @@ if (B && B.damage < B.min_broken_damage) B.take_damage(5) else - mob.setBrainLoss(50) + mob.setBrainLoss(10) /datum/disease2/effect/hallucinations name = "Hallucinational Syndrome"