mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Lung cleanup ft. minor suffocation tweak (#96659)
## About The Pull Request ### Notable changes Before: When taking suffocation damage, 3 oxyloss damage is dealt, or 0.66 damage if below 0 health (soft crit threshold). If below 0 hp, and you have `NOCRITDAMAGE`, gets nullified. After: When taking suffocation damage, 3 oxyloss damage is dealt, reduced if you had a partially successful breath (i.e. 75% of a breath = 0.25x damage) or are in soft crit or hard crit (0.22x less damage). If in crit, and you have `NOCRITDAMAGE`, gets nullified. Before: You skip 1 in every 4 breaths when your health is below 0 (soft crit threshold), and skip every breath when your health is below -30 (hard crit threshold) After: You skip 1 in every 4 breaths when in soft crit, and skip every breath when in hard crit Before: You don't heal from successful breaths when below 0 health (soft crit threshold) After: You don't heal from successful breaths when in soft or hard crit ### Other changes - Removed `gasp` from losebreath processing, ie removed chance to gasp twice in one tick when choking. - Deletes `respiration_type`s - Deletes `crit_stabilizing_reagent` - Deletes species `breathid`, replaces it with `get_breath_type` that checks the species' lungs ## Why It's Good For The Game - There was a strange inconsistency where being in crit would drastically reduce the amount of suffocation damage you were dealt, but only if you were not breathing. If you were somehow breathing, you took the full damage. I thought this was a little obtuse, so I wanted to change it to be consistent: Being in crit is just a multiplier. - Making them check for `stat` instead of `health` means they affect people with `NO_SOFTCRIT` or `NO_HARDCRIT` nicer. - See above. - Really just to be cleaner, handle gasping in one place. - I'm not sure why we have `respiration_type`. The only time they're (practically) referred to is in reagent handling, but there are no reagents that set it anything but `ALL`. All it does is make our oxyloss handling made more complicated and harder to read for no purpose. So I decided to axe it - I think anything special handing that should arise should just have some bespoke checks instead. - Nothing set this value to anything else. And guess what, if you changed it, epinephrine still worked because it applies `NO_CRITDAMAGE`. - Species de-hardcoding. Makes it easier to add new breath types. ## Changelog 🆑 Melbert balance: Suffocation damage is slightly more consistent now: You take 3 oxyloss per suffocation tick, reduced for partially successful breaths and or if you are in crit. Alternatively, if you are in crit and you have epinephrine/atropine in your system, it gets nullified entirely. code: Cleaned up lungs a bit, particularly relating to abnormal lungs like plasmamen or fish, report any oddities with them. del: You no longer have a chance to gasp twice in one suffocation tick. /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
co-authored by
Ghom
san7890
parent
94ecd1d5a6
commit
cb87e54d93
@@ -75,9 +75,6 @@
|
||||
/// The affected biotype, if the reagent damages/heals toxin damage of an affected mob.
|
||||
/// See "Mob bio-types flags" in /code/_DEFINES/mobs.dm
|
||||
var/affected_biotype = MOB_ORGANIC
|
||||
/// The affected respiration type, if the reagent damages/heals oxygen damage of an affected mob.
|
||||
/// See "Mob bio-types flags" in /code/_DEFINES/mobs.dm
|
||||
var/affected_respiration_type = ALL
|
||||
/// A list of traits to apply while the reagent is being metabolized.
|
||||
var/list/metabolized_traits
|
||||
/// A list of traits to apply while the reagent is in a mob.
|
||||
|
||||
@@ -137,13 +137,12 @@
|
||||
taste_description = "bitter"
|
||||
chemical_flags = REAGENT_NO_RANDOM_RECIPE
|
||||
affected_biotype = MOB_ORGANIC | MOB_MINERAL | MOB_PLANT // "toxic to all living beings"
|
||||
affected_respiration_type = ALL
|
||||
|
||||
/datum/reagent/zauker/on_mob_life(mob/living/breather, seconds_per_tick, metabolization_ratio)
|
||||
. = ..()
|
||||
var/need_mob_update
|
||||
need_mob_update = breather.adjust_brute_loss(6 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += breather.adjust_oxy_loss(1 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += breather.adjust_oxy_loss(1 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += breather.adjust_fire_loss(2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += breather.adjust_tox_loss(2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
switch(affected_mob.stat)
|
||||
if(CONSCIOUS) //bad
|
||||
thou_shall_heal = max(death_is_coming/20, 3)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(2 * metabolization_ratio * seconds_per_tick, TRUE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(2 * metabolization_ratio * seconds_per_tick, TRUE, required_biotype = affected_biotype)
|
||||
if(SOFT_CRIT) //meh convert
|
||||
thou_shall_heal = round(death_is_coming/13,0.1)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(1 * metabolization_ratio * seconds_per_tick, TRUE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(1 * metabolization_ratio * seconds_per_tick, TRUE, required_biotype = affected_biotype)
|
||||
good_kind_of_healing = TRUE
|
||||
else //no convert
|
||||
thou_shall_heal = round(death_is_coming/10, 0.1)
|
||||
@@ -272,7 +272,7 @@
|
||||
if(!overdosed)
|
||||
oxycalc = min(oxycalc, affected_mob.get_oxy_loss() + 0.5) //if NOT overdosing, we lower our toxdamage to only the damage we actually healed with a minimum of 0.1*current_cycle. IE if we only heal 10 oxygen damage but we COULD have healed 20, we will only take toxdamage for the 10. We would take the toxdamage for the extra 10 if we were overdosing.
|
||||
var/need_mob_update
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(-2 * oxycalc * normalise_creation_purity() * metabolization_ratio * seconds_per_tick , FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(-2 * oxycalc * normalise_creation_purity() * metabolization_ratio * seconds_per_tick , FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_tox_loss(2 * oxycalc * metabolization_ratio * seconds_per_tick / CONVERMOL_RATIO, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if(SPT_PROB((current_cycle-1) / 2, seconds_per_tick) && affected_mob.losebreath)
|
||||
affected_mob.losebreath--
|
||||
@@ -302,7 +302,7 @@
|
||||
/datum/reagent/medicine/c2/tirimol/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
|
||||
. = ..()
|
||||
var/need_mob_update
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(-4.5 * metabolization_ratio * seconds_per_tick * normalise_creation_purity(), updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(-4.5 * metabolization_ratio * seconds_per_tick * normalise_creation_purity(), updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_stamina_loss(2 * metabolization_ratio * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
|
||||
if(drowsycd && COOLDOWN_FINISHED(src, drowsycd))
|
||||
affected_mob.adjust_drowsiness(20 SECONDS)
|
||||
@@ -615,7 +615,7 @@
|
||||
need_mob_update += affected_mob.adjust_tox_loss(-2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_brute_loss(-2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_fire_loss(-2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(-6 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(-6 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
|
||||
affected_mob.losebreath = 0
|
||||
|
||||
|
||||
@@ -591,7 +591,7 @@
|
||||
need_mob_update = cubano.adjust_brute_loss(-1 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += cubano.adjust_fire_loss(-1 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += cubano.adjust_tox_loss(-1 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += cubano.adjust_oxy_loss(-5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += cubano.adjust_oxy_loss(-5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
return UPDATE_MOB_HEALTH
|
||||
|
||||
@@ -1445,7 +1445,7 @@
|
||||
var/need_mob_update
|
||||
need_mob_update = drinker.adjust_brute_loss(-3.75 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += drinker.adjust_fire_loss(-3.75 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += drinker.adjust_oxy_loss(-5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += drinker.adjust_oxy_loss(-5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += drinker.adjust_tox_loss(-3.75 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
return UPDATE_MOB_HEALTH
|
||||
@@ -1757,7 +1757,7 @@
|
||||
need_mob_update = drinker.adjust_brute_loss(-heal_amt, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += drinker.adjust_fire_loss(-heal_amt, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += drinker.adjust_tox_loss(-heal_amt, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += drinker.adjust_oxy_loss(-heal_amt, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += drinker.adjust_oxy_loss(-heal_amt, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
// heal stamina loss on first metabolization, but only to a max of 20
|
||||
need_mob_update += drinker.adjust_stamina_loss(max(-heal_amt * 5, -20), updating_stamina = FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
@@ -1773,7 +1773,7 @@
|
||||
need_mob_update = drinker.adjust_brute_loss(-0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += drinker.adjust_fire_loss(-0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += drinker.adjust_tox_loss(-0.125 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += drinker.adjust_oxy_loss(-0.75 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += drinker.adjust_oxy_loss(-0.75 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += drinker.adjust_stamina_loss(-1.25 * metabolization_ratio * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
return UPDATE_MOB_HEALTH
|
||||
@@ -2207,7 +2207,7 @@
|
||||
if(drinker?.mind?.has_antag_datum(/datum/antagonist/wizard))
|
||||
var/need_mob_update
|
||||
need_mob_update = drinker.heal_bodypart_damage(1 * metabolization_ratio * seconds_per_tick, 1 * metabolization_ratio * seconds_per_tick, updating_health = FALSE)
|
||||
need_mob_update += drinker.adjust_oxy_loss(-1 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += drinker.adjust_oxy_loss(-1 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += drinker.adjust_tox_loss(-1 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += drinker.adjust_stamina_loss(-5 * metabolization_ratio * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/datum/reagent/consumable/orangejuice/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
|
||||
. = ..()
|
||||
if(affected_mob.get_oxy_loss() && SPT_PROB(16, seconds_per_tick))
|
||||
if(affected_mob.adjust_oxy_loss(-0.5 * metabolization_ratio, FALSE, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type))
|
||||
if(affected_mob.adjust_oxy_loss(-0.5 * metabolization_ratio, FALSE, updating_health = FALSE, required_biotype = affected_biotype))
|
||||
return UPDATE_MOB_HEALTH
|
||||
|
||||
/datum/reagent/consumable/tomatojuice
|
||||
@@ -824,7 +824,7 @@
|
||||
need_mob_update = affected_mob.adjust_brute_loss(-0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_fire_loss(-0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_tox_loss(-0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(-0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(-0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if(affected_mob.nutrition && (affected_mob.nutrition - 2 > 0))
|
||||
var/obj/item/organ/liver/liver = affected_mob.get_organ_slot(ORGAN_SLOT_LIVER)
|
||||
if(!(HAS_TRAIT(liver, TRAIT_MEDICAL_METABOLISM)))
|
||||
@@ -1220,7 +1220,7 @@
|
||||
/datum/reagent/consumable/mushroom_tea/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
|
||||
. = ..()
|
||||
if(islizard(affected_mob))
|
||||
if(affected_mob.adjust_oxy_loss(-0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type))
|
||||
if(affected_mob.adjust_oxy_loss(-0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype))
|
||||
return UPDATE_MOB_HEALTH
|
||||
|
||||
//Moth Stuff
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
. = ..()
|
||||
var/need_mob_update
|
||||
need_mob_update = affected_mob.adjust_tox_loss(0.4 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(4.4 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(4.4 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
return UPDATE_MOB_HEALTH
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
need_mob_update += affected_mob.adjust_tox_loss(0.5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if(SPT_PROB(30, seconds_per_tick))
|
||||
affected_mob.losebreath++
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(1, FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(1, FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
return UPDATE_MOB_HEALTH
|
||||
|
||||
|
||||
+1
-2
@@ -32,7 +32,6 @@
|
||||
addiction_types = list(/datum/addiction/medicine = 400)
|
||||
ph = 11
|
||||
affected_biotype = MOB_ORGANIC | MOB_MINERAL | MOB_PLANT // no healing ghosts
|
||||
affected_respiration_type = ALL
|
||||
|
||||
//Random healing of the 4 main groups
|
||||
/datum/reagent/impurity/healing/medicine_failure/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
|
||||
@@ -47,7 +46,7 @@
|
||||
if("tox")
|
||||
need_mob_update = affected_mob.adjust_tox_loss(-0.2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if("oxy")
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(-0.2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(-0.2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
return UPDATE_MOB_HEALTH
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
if(HAS_TRAIT(affected_mob, TRAIT_KNOCKEDOUT)) //Significantly more effective when unconscious
|
||||
power *= 2
|
||||
var/need_mob_update
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(-1.5 * power * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(-1.5 * power * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_brute_loss(-0.5 * power * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_fire_loss(-0.5 * power * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_tox_loss(-0.5 * power * metabolization_ratio * seconds_per_tick, updating_health = FALSE, forced = TRUE, required_biotype = affected_biotype) //heals TOXINLOVERs
|
||||
@@ -203,7 +203,7 @@
|
||||
power *= 2
|
||||
|
||||
var/need_mob_update
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(-1 * power * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(-1 * power * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_brute_loss(-0.5 * power * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_fire_loss(-0.75 * power * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_tox_loss(-0.5 * power * metabolization_ratio * seconds_per_tick, updating_health = FALSE, forced = TRUE, required_biotype = affected_biotype)
|
||||
@@ -424,7 +424,7 @@
|
||||
var/heal = -2 * healing * metabolization_ratio * seconds_per_tick
|
||||
var/need_mob_update
|
||||
need_mob_update = affected_mob.adjust_tox_loss(heal, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(heal, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(heal, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_brute_loss(heal, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_fire_loss(heal, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
if(need_mob_update)
|
||||
@@ -435,7 +435,7 @@
|
||||
var/hurt = 3 * metabolization_ratio * seconds_per_tick
|
||||
var/need_mob_update
|
||||
need_mob_update = affected_mob.adjust_tox_loss(hurt, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(hurt, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(hurt, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_brute_loss(hurt, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_fire_loss(hurt, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
if(need_mob_update)
|
||||
@@ -587,13 +587,8 @@
|
||||
/datum/reagent/medicine/salbutamol/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
|
||||
. = ..()
|
||||
var/need_mob_update
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(-6 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
if(affected_mob.losebreath >= 4)
|
||||
var/obj/item/organ/lungs/affected_lungs = affected_mob.get_organ_slot(ORGAN_SLOT_LUNGS)
|
||||
var/our_respiration_type = affected_lungs ? affected_lungs.respiration_type : affected_mob.mob_respiration_type // use lungs' respiration type or mob_respiration_type if no lungs
|
||||
if(our_respiration_type & affected_respiration_type)
|
||||
affected_mob.losebreath -= 4 * metabolization_ratio * seconds_per_tick
|
||||
need_mob_update = TRUE
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(-6 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
affected_mob.losebreath = max(0, affected_mob.losebreath - (4 * metabolization_ratio * seconds_per_tick))
|
||||
if(need_mob_update)
|
||||
return UPDATE_MOB_HEALTH
|
||||
|
||||
@@ -997,13 +992,10 @@
|
||||
need_mob_update = affected_mob.adjust_tox_loss(-4 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_brute_loss(-4 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_fire_loss(-4 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(-10 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(-10 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
. = UPDATE_MOB_HEALTH
|
||||
var/obj/item/organ/lungs/affected_lungs = affected_mob.get_organ_slot(ORGAN_SLOT_LUNGS)
|
||||
var/our_respiration_type = affected_lungs ? affected_lungs.respiration_type : affected_mob.mob_respiration_type
|
||||
if(our_respiration_type & affected_respiration_type)
|
||||
affected_mob.losebreath = 0
|
||||
affected_mob.losebreath = 0
|
||||
if(SPT_PROB(10, seconds_per_tick))
|
||||
affected_mob.set_dizzy_if_lower(10 SECONDS)
|
||||
affected_mob.set_jitter_if_lower(10 SECONDS)
|
||||
@@ -1040,16 +1032,8 @@
|
||||
need_mob_update = affected_mob.adjust_tox_loss(heal, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_brute_loss(heal, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_fire_loss(heal, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(heal, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
if(affected_mob.losebreath >= 4)
|
||||
var/obj/item/organ/lungs/affected_lungs = affected_mob.get_organ_slot(ORGAN_SLOT_LUNGS)
|
||||
var/our_respiration_type = affected_lungs ? affected_lungs.respiration_type : affected_mob.mob_respiration_type
|
||||
if(our_respiration_type & affected_respiration_type)
|
||||
affected_mob.losebreath -= 4 * metabolization_ratio * seconds_per_tick
|
||||
need_mob_update = TRUE
|
||||
if(affected_mob.losebreath < 0)
|
||||
affected_mob.losebreath = 0
|
||||
need_mob_update = TRUE
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(heal, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
affected_mob.losebreath = max(0, affected_mob.losebreath - (4 * metabolization_ratio * seconds_per_tick))
|
||||
need_mob_update += affected_mob.adjust_stamina_loss(-4 * metabolization_ratio * seconds_per_tick, updating_stamina = FALSE)
|
||||
if(SPT_PROB(10, seconds_per_tick))
|
||||
affected_mob.AdjustAllImmobility(-20)
|
||||
@@ -1070,11 +1054,7 @@
|
||||
var/need_mob_update
|
||||
need_mob_update = affected_mob.adjust_stamina_loss(5 * metabolization_ratio, updating_stamina = FALSE)
|
||||
need_mob_update += affected_mob.adjust_tox_loss(2 * metabolization_ratio, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
var/obj/item/organ/lungs/affected_lungs = affected_mob.get_organ_slot(ORGAN_SLOT_LUNGS)
|
||||
var/our_respiration_type = affected_lungs ? affected_lungs.respiration_type : affected_mob.mob_respiration_type
|
||||
if(our_respiration_type & affected_respiration_type)
|
||||
affected_mob.losebreath++
|
||||
need_mob_update = TRUE
|
||||
affected_mob.losebreath++
|
||||
if(need_mob_update)
|
||||
return UPDATE_MOB_HEALTH
|
||||
|
||||
@@ -1386,7 +1366,7 @@
|
||||
var/need_mob_update
|
||||
if(affected_mob.health < 50 && affected_mob.health > 0)
|
||||
var/heal = -1 * metabolization_ratio * seconds_per_tick
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(heal, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(heal, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_tox_loss(heal, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_brute_loss(heal, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_fire_loss(heal, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
@@ -1442,7 +1422,6 @@
|
||||
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
|
||||
randomized_spawns = REAGENT_SPAWN_ALL_RANDOM_SPAWNS
|
||||
affected_biotype = MOB_ORGANIC | MOB_MINERAL | MOB_PLANT // no healing ghosts
|
||||
affected_respiration_type = ALL
|
||||
|
||||
/datum/reagent/medicine/regen_jelly/expose_mob(mob/living/exposed_mob, reac_volume)
|
||||
. = ..()
|
||||
@@ -1459,7 +1438,7 @@
|
||||
var/need_mob_update
|
||||
need_mob_update = affected_mob.adjust_brute_loss(heal, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_fire_loss(heal, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(heal, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(heal, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_tox_loss(heal, updating_health = FALSE, forced = TRUE, required_biotype = affected_biotype) //heals TOXINLOVERs
|
||||
if(need_mob_update)
|
||||
return UPDATE_MOB_HEALTH
|
||||
@@ -1507,14 +1486,14 @@
|
||||
if(current_cycle < 25) //10u has to be processed before u get into THE FUN ZONE
|
||||
need_mob_update = affected_mob.adjust_brute_loss(-0.5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_fire_loss(-0.5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(-0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(-0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_tox_loss(-0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_stamina_loss(-1 * metabolization_ratio * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_organ_loss(ORGAN_SLOT_BRAIN, 0.5 * metabolization_ratio * seconds_per_tick, 150, affected_organ_flags) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that!
|
||||
else
|
||||
need_mob_update = affected_mob.adjust_brute_loss(-2.5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype) //slow to start, but very quick healing once it gets going
|
||||
need_mob_update += affected_mob.adjust_fire_loss(-2.5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(-1.5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(-1.5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_tox_loss(-1.5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_stamina_loss(-4 * metabolization_ratio * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_organ_loss(ORGAN_SLOT_BRAIN, 1 * metabolization_ratio * seconds_per_tick, 150, affected_organ_flags)
|
||||
@@ -1730,7 +1709,7 @@
|
||||
affected_mob.losebreath++
|
||||
need_mob_update = TRUE
|
||||
if(41 to 80)
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_stamina_loss(2 * metabolization_ratio * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
|
||||
affected_mob.adjust_jitter_up_to(40 SECONDS * metabolization_ratio * seconds_per_tick, 40 SECONDS)
|
||||
affected_mob.adjust_stutter_up_to(40 SECONDS * metabolization_ratio * seconds_per_tick, 40 SECONDS)
|
||||
@@ -1744,12 +1723,12 @@
|
||||
affected_mob.Paralyze(20) // you should be in a bad spot at this point unless epipen has been used
|
||||
if(81)
|
||||
to_chat(affected_mob, span_userdanger("You feel too exhausted to continue!")) // at this point you will eventually die unless you get charcoal
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_stamina_loss(2 * metabolization_ratio * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
|
||||
if(82 to INFINITY)
|
||||
REMOVE_TRAIT(affected_mob, TRAIT_SLEEPIMMUNE, type)
|
||||
affected_mob.Sleeping(200 SECONDS * metabolization_ratio * seconds_per_tick)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(30 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(30 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_stamina_loss(30 * metabolization_ratio * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
return UPDATE_MOB_HEALTH
|
||||
@@ -1918,12 +1897,12 @@
|
||||
|
||||
if(SPT_PROB(7.5, seconds_per_tick))
|
||||
affected_mob.losebreath += rand(2, 4)
|
||||
affected_mob.adjust_oxy_loss(METABOLIZE_FREE_CONSTANT(1) * rand(1, 3) * metabolization_ratio, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
affected_mob.adjust_oxy_loss(METABOLIZE_FREE_CONSTANT(1) * rand(1, 3) * metabolization_ratio, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if(prob(30))
|
||||
to_chat(affected_mob, span_danger("You can feel your blood clotting up in your veins!"))
|
||||
else if(prob(10))
|
||||
to_chat(affected_mob, span_userdanger("You feel like your blood has stopped moving!"))
|
||||
affected_mob.adjust_oxy_loss(METABOLIZE_FREE_CONSTANT(0.5) * rand(3, 4) * metabolization_ratio, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
affected_mob.adjust_oxy_loss(METABOLIZE_FREE_CONSTANT(0.5) * rand(3, 4) * metabolization_ratio, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
|
||||
if(prob(50))
|
||||
var/obj/item/organ/lungs/our_lungs = affected_mob.get_organ_slot(ORGAN_SLOT_LUNGS)
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
/datum/reagent/toxin/lexorin/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
|
||||
. = ..()
|
||||
if(!HAS_TRAIT(affected_mob, TRAIT_NOBREATH))
|
||||
affected_mob.adjust_oxy_loss(2.5 * normalise_creation_purity() * metabolization_ratio * seconds_per_tick, FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
affected_mob.adjust_oxy_loss(2.5 * normalise_creation_purity() * metabolization_ratio * seconds_per_tick, FALSE, required_biotype = affected_biotype)
|
||||
affected_mob.losebreath += 1 * normalise_creation_purity() * metabolization_ratio * seconds_per_tick
|
||||
. = UPDATE_MOB_HEALTH
|
||||
if(SPT_PROB(10, seconds_per_tick))
|
||||
@@ -371,7 +371,7 @@
|
||||
/datum/reagent/toxin/zombiepowder/proc/zombify(mob/living/holder_mob)
|
||||
PRIVATE_PROC(TRUE)
|
||||
|
||||
holder_mob.adjust_oxy_loss(0.25, FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
holder_mob.adjust_oxy_loss(0.25, FALSE, required_biotype = affected_biotype)
|
||||
if((data?["method"] & (INGEST|INHALE)) && holder_mob.stat != DEAD)
|
||||
holder_mob.apply_status_effect(/datum/status_effect/reagent_effect/fakedeath, type)
|
||||
|
||||
@@ -416,7 +416,7 @@
|
||||
|
||||
/datum/reagent/toxin/ghoulpowder/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
|
||||
. = ..()
|
||||
if(affected_mob.adjust_oxy_loss(0.5 * metabolization_ratio * seconds_per_tick, FALSE, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type))
|
||||
if(affected_mob.adjust_oxy_loss(0.5 * metabolization_ratio * seconds_per_tick, FALSE, updating_health = FALSE, required_biotype = affected_biotype))
|
||||
return UPDATE_MOB_HEALTH
|
||||
|
||||
/datum/reagent/toxin/mindbreaker
|
||||
@@ -806,7 +806,7 @@
|
||||
. = ..()
|
||||
var/heal = 4 * metabolization_ratio * seconds_per_tick
|
||||
var/need_mob_update
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(heal, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(heal, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_brute_loss(heal, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_tox_loss(heal, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
@@ -988,7 +988,7 @@
|
||||
affected_mob.Paralyze(60)
|
||||
if(2)
|
||||
affected_mob.losebreath += 10
|
||||
affected_mob.adjust_oxy_loss(2 * rand(5,25) * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
affected_mob.adjust_oxy_loss(2 * rand(5,25) * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update = TRUE
|
||||
if(3)
|
||||
if(!affected_mob.undergoing_cardiac_arrest() && affected_mob.can_heartattack())
|
||||
@@ -997,7 +997,7 @@
|
||||
affected_mob.visible_message(span_userdanger("[affected_mob] clutches at [affected_mob.p_their()] chest as if [affected_mob.p_their()] heart stopped!"))
|
||||
else
|
||||
affected_mob.losebreath += 10
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(rand(5,25), updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update = affected_mob.adjust_oxy_loss(rand(5,25), updating_health = FALSE, required_biotype = affected_biotype)
|
||||
if(need_mob_update)
|
||||
return UPDATE_MOB_HEALTH
|
||||
|
||||
@@ -1158,7 +1158,7 @@
|
||||
. = ..()
|
||||
if(current_cycle > 11)
|
||||
affected_mob.Paralyze(240 * metabolization_ratio * seconds_per_tick)
|
||||
if(affected_mob.adjust_oxy_loss(2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type))
|
||||
if(affected_mob.adjust_oxy_loss(2 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype))
|
||||
return UPDATE_MOB_HEALTH
|
||||
|
||||
/datum/reagent/toxin/heparin //Based on a real-life anticoagulant. I'm not a doctor, so this won't be realistic.
|
||||
@@ -1502,7 +1502,7 @@
|
||||
liver_tolerance_multiplier = 0
|
||||
silent_toxin = TRUE
|
||||
remove_paralysis(affected_mob)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(-3.5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
|
||||
need_mob_update += affected_mob.adjust_oxy_loss(-3.5 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update = affected_mob.adjust_tox_loss(-3.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
|
||||
need_mob_update += affected_mob.adjust_brute_loss(-6 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
need_mob_update += affected_mob.adjust_fire_loss(-6.75 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
|
||||
|
||||
Reference in New Issue
Block a user