Pressure damage starts lower, increases over exposed time (#94710)

## About The Pull Request


https://github.com/tgstation/tgstation/pull/93647#issuecomment-3449350868

Pressure damage starts at 2(*2) per life tick and increases by 0.5 every
1.2 minutes you are exposed to low pressure

It's capped at 5(*2) damage per tick which takes 7.2 minutes of exposure
to get to (or 216 life ticks)

Here is the maths

<img width="495" height="689" alt="image"
src="https://github.com/user-attachments/assets/a3bc9889-799c-42a8-a2fe-1b043aa367a2"
/>

`l` is 0 (don't worry about it)
`u` is seconds exposed

`n(x)` is new formula. Crit in 40 seconds (20 life ticks)
`o(x)` is old (flat 2). Crit in 50 seconds (25 life ticks)
`b(x)` is buffed (flat 4) Crit in 26 seconds (12.5 life ticks... it
rounds up)


## Why It's Good For The Game

I think the higher pressure damage is a bit harsh for people exposed for
a short period of time, the damage slow down stacks up fast.

By scaling it up over time, pressure damage becomes a lot harder to
shrug off with chems, though doesn't overly punish people who are just
caught unawares. This should assuage some of the pressure related
concerns.

## Changelog

🆑 Melbert
balance: Pressure damage scales over time. It starts at 2 per second
(pre-buff value) but increases by 0.5 damage every 1.2 minutes you are
exposed, up to 5 per second (requiring 7.2 full minutes of exposure).
/🆑
This commit is contained in:
MrMelbert
2026-01-22 19:17:56 +00:00
committed by GitHub
parent 8de874ee19
commit c73e605b4b
4 changed files with 12 additions and 4 deletions
@@ -99,11 +99,12 @@
/// Beyond this temperature, being on fire will increase body temperature by less and less
#define BODYTEMP_FIRE_TEMP_SOFTCAP 1200
/// The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE
/// The amount of pressure damage someone takes in a high pressure damage is equal to (pressure / HAZARD_HIGH_PRESSURE) * PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE
#define PRESSURE_DAMAGE_COEFFICIENT 2
#define MAX_HIGH_PRESSURE_DAMAGE 2
/// The amount of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value).
#define LOW_PRESSURE_DAMAGE 4
/// The amount of damage someone takes when in a low pressure area scales up over time, starting at BASE_LOW_PRESSURE_DAMAGE, up to MAX_LOW_PRESSURE_DAMAGE.
#define BASE_LOW_PRESSURE_DAMAGE 2
#define MAX_LOW_PRESSURE_DAMAGE (BASE_LOW_PRESSURE_DAMAGE * 2.5)
/// Humans are slowed by the difference between bodytemp and BODYTEMP_COLD_DAMAGE_LIMIT divided by this
#define COLD_SLOWDOWN_FACTOR 20
@@ -1324,6 +1324,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
// No pressure issues here clear pressure alerts
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
H.clear_alert(ALERT_PRESSURE)
H.seconds_in_low_pressure = 0
// Low pressure here, show an alert
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
@@ -1332,6 +1333,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
H.clear_alert(ALERT_PRESSURE)
else
H.throw_alert(ALERT_PRESSURE, /atom/movable/screen/alert/lowpressure, 1)
H.seconds_in_low_pressure = 0
// Very low pressure, show an alert and take damage
else
@@ -1339,9 +1341,10 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(HAS_TRAIT(H, TRAIT_RESISTLOWPRESSURE))
H.clear_alert(ALERT_PRESSURE)
else
var/pressure_damage = LOW_PRESSURE_DAMAGE * H.physiology.pressure_mod * H.physiology.brute_mod * seconds_per_tick
var/pressure_damage = min(round(1 + (H.seconds_in_low_pressure / 80 SECONDS), 0.05) * BASE_LOW_PRESSURE_DAMAGE, MAX_LOW_PRESSURE_DAMAGE) * H.physiology.pressure_mod * H.physiology.brute_mod * seconds_per_tick
H.adjust_brute_loss(pressure_damage, required_bodytype = BODYTYPE_ORGANIC)
H.throw_alert(ALERT_PRESSURE, /atom/movable/screen/alert/lowpressure, 2)
H.seconds_in_low_pressure += seconds_per_tick
/**
* Handles exposure to the skin of various gases.
@@ -703,6 +703,7 @@
if(heal_flags & HEAL_TEMP)
set_coretemperature(get_body_temp_normal(apply_change = FALSE))
heat_exposure_stacks = 0
seconds_in_low_pressure = 0
return ..()
@@ -90,3 +90,6 @@
VAR_PRIVATE/base_mob_height = HUMAN_HEIGHT_MEDIUM
/// Actual height of the mob. Don't touch this one, it is set via update_mob_height()
VAR_FINAL/mob_height = HUMAN_HEIGHT_MEDIUM
/// Tracks how long in seconds we've been in a low pressure environment
VAR_FINAL/seconds_in_low_pressure = 0