mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Many brainmed changes. (#7967)
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
degree = " a lot"
|
||||
if(damage < 5)
|
||||
degree = " a bit"
|
||||
owner.custom_pain("Something inside your [parent.name] hurts[degree].", amount)
|
||||
owner.custom_pain("Something inside your [parent.name] hurts[degree]!", amount)
|
||||
|
||||
/obj/item/organ/internal/proc/get_visible_state()
|
||||
if(damage > max_damage)
|
||||
|
||||
@@ -78,6 +78,9 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/brain/getToxLoss()
|
||||
return 0
|
||||
|
||||
/obj/item/organ/internal/brain/can_recover()
|
||||
return ~status & ORGAN_DEAD
|
||||
|
||||
@@ -140,7 +143,7 @@
|
||||
damprob = owner.chem_effects[CE_STABLE] ? 60 : 100
|
||||
if(!past_damage_threshold(6) && prob(damprob))
|
||||
take_internal_damage(1)
|
||||
if(!owner.paralysis && prob(15))
|
||||
if(!owner.paralysis)
|
||||
owner.Paralyse(3,5)
|
||||
to_chat(owner, "<span class='warning'>You feel extremely [pick("dizzy","woozy","faint")]...</span>")
|
||||
if(-(INFINITY) to BLOOD_VOLUME_SURVIVE) // Also see heart.dm, being below this point puts you into cardiac arrest.
|
||||
@@ -155,11 +158,10 @@
|
||||
/obj/item/organ/internal/brain/take_internal_damage(var/damage, var/silent)
|
||||
set waitfor = 0
|
||||
..()
|
||||
if(damage >= 10) //This probably won't be triggered by oxyloss or mercury. Probably.
|
||||
if(damage >= (max_damage / 3)) //This probably won't be triggered by oxyloss or mercury. Probably.
|
||||
var/damage_secondary = damage * 0.20
|
||||
owner.eye_blurry += damage_secondary
|
||||
owner.confused += damage_secondary * 2
|
||||
owner.Paralyse(damage_secondary)
|
||||
owner.Weaken(round(damage, 1))
|
||||
if(prob(30))
|
||||
addtimer(CALLBACK(src, .proc/brain_damage_callback, damage), rand(6, 20) SECONDS, TIMER_UNIQUE)
|
||||
@@ -194,9 +196,9 @@
|
||||
to_chat(owner, "<span class='danger'>Your hand won't respond properly, and you drop what you are holding!</span>")
|
||||
owner.drop_item()
|
||||
if(damage >= 0.6*max_damage)
|
||||
owner.slurring = max(owner.slurring, 2)
|
||||
owner.stuttering = max(owner.slurring, 2)
|
||||
if(is_broken())
|
||||
if(!owner.lying)
|
||||
if(!owner.lying && prob(5))
|
||||
to_chat(owner, "<span class='danger'>You black out!</span>")
|
||||
owner.Paralyse(10)
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
blood_max *= 0.8
|
||||
|
||||
if(world.time >= next_blood_squirt && istype(owner.loc, /turf) && do_spray.len)
|
||||
owner.visible_message("<span class='danger'>Blood squirts from \the [owner]'s [pick(do_spray)]!</span>", "<span class='danger'><font size='3'>Blood is squirting out of your [pick(do_spray)]!</font></span>")
|
||||
owner.visible_message("<span class='danger'>Blood squirts from \the [owner]'s [pick(do_spray)]!</span>", "<span class='danger'><font size=3>Blood is squirting out of your [pick(do_spray)]!</font></span>")
|
||||
owner.eye_blurry = 2
|
||||
owner.Stun(1)
|
||||
next_blood_squirt = world.time + 100
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
max_damage = 70
|
||||
relative_size = 60
|
||||
|
||||
var/tolerance = 5
|
||||
|
||||
/obj/item/organ/internal/liver/process()
|
||||
|
||||
..()
|
||||
@@ -28,45 +26,33 @@
|
||||
if(prob(1))
|
||||
spawn owner.delayed_vomit()
|
||||
|
||||
if(!(owner.life_tick % PROCESS_ACCURACY == 0))
|
||||
return
|
||||
|
||||
//A liver's duty is to get rid of toxins
|
||||
if(owner.getToxLoss() > 0 && owner.getToxLoss() <= tolerance)
|
||||
owner.adjustToxLoss(-0.2) //there isn't a lot of toxin damage, so we're going to be chill and slowly filter it out
|
||||
else if(owner.getToxLoss() > tolerance)
|
||||
if(is_bruised())
|
||||
//damaged liver works less efficiently
|
||||
owner.adjustToxLoss(-0.5)
|
||||
if(!owner.chem_effects[CE_ANTITOXIN]) //no damage to liver if anti-toxin is present
|
||||
src.damage += 0.1 * PROCESS_ACCURACY
|
||||
else if(is_broken())
|
||||
//non-functioning liver ADDS toxins
|
||||
owner.adjustToxLoss(-0.1) //roughly 33 minutes to kill someone straight out, stacks with 60+ tox proc tho
|
||||
else
|
||||
//functioning liver removes toxins at a cost
|
||||
owner.adjustToxLoss(-1)
|
||||
if(!owner.chem_effects[CE_ANTITOXIN]) //no damage to liver if anti-toxin is present
|
||||
src.damage += 0.05 * PROCESS_ACCURACY
|
||||
|
||||
|
||||
//High toxins levels are super dangerous
|
||||
if(owner.getToxLoss() >= 60 && !owner.chem_effects[CE_ANTITOXIN])
|
||||
//Healthy liver suffers on its own
|
||||
if (src.damage < min_broken_damage)
|
||||
src.damage += 0.2 * PROCESS_ACCURACY
|
||||
//Damaged one shares the fun
|
||||
else
|
||||
var/obj/item/organ/O = pick(owner.internal_organs)
|
||||
if(O)
|
||||
O.damage += 0.2 * PROCESS_ACCURACY
|
||||
|
||||
//Detox can heal small amounts of damage
|
||||
if (src.damage && src.damage < src.min_bruised_damage && owner.chem_effects[CE_ANTITOXIN])
|
||||
src.damage -= 0.2 * PROCESS_ACCURACY
|
||||
if (damage < max_damage && !owner.chem_effects[CE_TOXIN])
|
||||
heal_damage(0.2 * owner.chem_effects[CE_ANTITOXIN])
|
||||
|
||||
if(src.damage < 0)
|
||||
src.damage = 0
|
||||
// Get the effectiveness of the liver.
|
||||
var/filter_effect = 3
|
||||
if(is_bruised())
|
||||
filter_effect -= 1
|
||||
if(is_broken())
|
||||
filter_effect -= 2
|
||||
// Robotic organs filter better but don't get benefits from dylovene for filtering.
|
||||
if(BP_IS_ROBOTIC(src))
|
||||
filter_effect += 1
|
||||
if(getToxLoss() >= 60) //Too many toxins to process. Abort, abort.
|
||||
filter_effect -= 2
|
||||
else if(owner.chem_effects[CE_ANTITOXIN])
|
||||
filter_effect += 1
|
||||
|
||||
if(filter_effect < 2) //Trouble. You're not filtering well.
|
||||
owner.adjustToxLoss(0.8 * max(2 - filter_effect, 0))
|
||||
|
||||
// Heal a bit if needed and we're not busy. This allows recovery from low amounts of toxloss.
|
||||
if(!owner.total_radiation && damage > 0)
|
||||
if(damage < min_broken_damage)
|
||||
heal_damage(0.2)
|
||||
if(damage < min_bruised_damage)
|
||||
heal_damage(0.3)
|
||||
|
||||
var/filter_strength = INTOX_FILTER_HEALTHY
|
||||
if(is_bruised())
|
||||
|
||||
@@ -51,10 +51,18 @@
|
||||
|
||||
if(is_broken() || (is_bruised() && !rescued) && !owner.is_asystole()) // a thoracostomy can only help with a collapsed lung, not a mangled one
|
||||
if(prob(2))
|
||||
spawn owner.emote("me", 1, "coughs up blood!")
|
||||
owner.visible_message(
|
||||
"<B>\The [owner]</B> coughs up blood!",
|
||||
"<span class='warning'>You cough up blood!</span>",
|
||||
"You hear someone coughing!",
|
||||
)
|
||||
owner.drip(10)
|
||||
if(prob(4))
|
||||
spawn owner.emote("me", 1, "gasps for air!")
|
||||
owner.visible_message(
|
||||
"<B>\The [owner]</B> gasps for air!",
|
||||
"<span class='danger'>You can't breathe!</span>",
|
||||
"You hear someone gasp for air!",
|
||||
)
|
||||
owner.losebreath = 1
|
||||
|
||||
if(is_bruised() && rescued)
|
||||
|
||||
@@ -48,11 +48,9 @@
|
||||
robotic = 2
|
||||
robotic_name = null
|
||||
robotic_sprite = null
|
||||
tolerance = 20
|
||||
|
||||
/obj/item/organ/internal/liver/vaurca
|
||||
icon_state = "liver_vaurca"
|
||||
tolerance = 20
|
||||
|
||||
/obj/item/organ/internal/brain/vaurca
|
||||
icon_state = "brain_vaurca"
|
||||
|
||||
@@ -55,4 +55,3 @@
|
||||
name = "waste tract"
|
||||
parent_organ = BP_CHEST
|
||||
color = "#0033cc"
|
||||
tolerance = 20
|
||||
|
||||
Reference in New Issue
Block a user