Alcohol Intoxication Overhaul (#19062)

This PR will make broad changes to the way that alcohol/butanol
intoxication works in game, with the intention of making alcohol
consumption actually impactful, and last much longer than it currently
does. It also includes some quality of life changes to the way that
liver damage works, better indication of the player's level of
intoxication to better communicate when the player is getting **too**
drunk, and the frequency of vomiting. Players will **no longer** die
extremely fast from getting drunk, will be able to get drunk, and stay
drunk.

- The rate of liver alcohol filtration has been reduced to 0.015
intoxication every second. This calculates out to the elimination of
0.015 BAC (One standard drink) every ten minutes.
- New messages have been added to indicate when the player is drunker
than drunk.
- At 0.10 BAC the "You feel drunk!" message is replaced with the message
"You feel absolutely smashed!"
- At 0.15 BAC the "You feel drunk!" message is replaced with the message
"You feel the room spinning..."
- Liver damage no longer occurs when the player vomits from
intoxication, and instead occurs when the player blacks out or loses
consciousness (0.20 and 0.30 BAC, respectively)
- The liver will no longer regenerate BAC is above 0.20.
- The coefficient multiplier that Unathi metabolise butanol has been
buffed from 3 to 9 (They now metabolise butanol at roughly the same rate
that Humans metabolise Alcohol)

One thing of note is that these changes have indirectly fixed a "bug"
that was occurring for Unathi with Butanolic beverages; The liver was
filtering out intoxication faster than Unathi were able to metabolise
some lower strength butanolic drinks, making them unable to get drunk
from things like sarezhi wine. With the buff to intoxication, and the
reduction in liver filtration speed, butanol is going to be returned to
being very potent for Unathi (This seems to be the way it was originally
intended?) so Unathi players who are used to Butanol being quite useless
at intoxicating Unathi are going to need to be especially careful.

Also, I have done testing on my local test server, but to be frank the
tickrate of my test server is very fast, and I'm not entirely sure just
how well these changes will translate to a live environment with a
heavier server load and longer tick times.

---------

Signed-off-by: Crosarius <30341877+Crosarius@users.noreply.github.com>
Co-authored-by: Cody Brittain <cbrittain10@yahoo.com>
This commit is contained in:
Crosarius
2024-05-05 21:13:27 +00:00
committed by GitHub
co-authored by Cody Brittain
parent 9dda1e1b12
commit 5eb6738fa7
5 changed files with 39 additions and 22 deletions
@@ -27,24 +27,26 @@
if(bac > INTOX_BUZZED*SR && bac < INTOX_MUSCLEIMP*SR)
sprint_cost_factor += -0.1
if(prob(5))
to_chat(src,"<span class='notice'>You feel buzzed.</span>")
to_chat(src, SPAN_NOTICE("You feel buzzed."))
if(bac > INTOX_JUDGEIMP*SR)
if (dizziness == 0)
to_chat(src,"<span class='notice'>You feel a little tipsy.</span>")
to_chat(src, SPAN_NOTICE("You feel a little tipsy."))
var/target_dizziness = BASE_DIZZY + ((bac - INTOX_JUDGEIMP*SR)*DIZZY_ADD_SCALE*100)
make_dizzy(target_dizziness - dizziness)
if(bac > INTOX_MUSCLEIMP*SR)
if(bac > INTOX_MUSCLEIMP*SR && bac < INTOX_REACTION*SR)
slurring = max(slurring, 25)
if (prob(5))
to_chat(src,"<span class='notice'>You feel drunk!</span>")
to_chat(src, SPAN_NOTICE("You feel drunk!"))
move_delay_mod += 2
sprint_cost_factor += 0.2
if(bac > INTOX_REACTION*SR)
if(bac > INTOX_REACTION*SR && bac < INTOX_BALANCE*SR)
if (prob(5))
to_chat(src, SPAN_NOTICE("You feel absolutely smashed!"))
if (confused == 0)
to_chat(src,"<span class='warning'>You feel uncoordinated and unsteady on your feet!</span>")
to_chat(src, SPAN_WARNING("You feel uncoordinated and unsteady on your feet!"))
confused = max(confused, 10)
slurring = max(slurring, 50)
@@ -54,28 +56,31 @@
var/chance = BASE_VOMIT_CHANCE + ((bac - INTOX_VOMIT*SR)*VOMIT_CHANCE_SCALE*100)
if (prob(chance))
delayed_vomit()
add_chemical_effect(CE_HEPATOTOXIC, 1)
if(bac > INTOX_BALANCE*SR)
slurring = max(slurring, 100)
if (prob(5))
to_chat(src, SPAN_NOTICE("You feel the room spinning..."))
if (life_tick % 4 == 1 && !lying && !buckled_to && prob(10))
src.visible_message("<span class='warning'>[src] loses balance and falls to the ground!</span>","<span class='warning'>You lose balance and fall to the ground!</span>")
src.visible_message(SPAN_WARNING("[src] loses balance and falls to the ground!"),SPAN_WARNING("You lose balance and fall to the ground!"))
Paralyse(3 SECONDS)
if(bac > INTOX_CONSCIOUS*SR)
slurring = max(slurring, 90)
src.visible_message("<span class='danger'>[src] loses consciousness!</span>","<span class='danger'>You lose consciousness!</span>")
src.visible_message(SPAN_DANGER("[src] loses consciousness!"),SPAN_DANGER("You lose consciousness!"))
paralysis = max(paralysis, 60 SECONDS)
sleeping = max(sleeping, 60 SECONDS)
adjustBrainLoss(5,30)
add_chemical_effect(CE_HEPATOTOXIC, 3)
else if(bac > INTOX_BLACKOUT*SR)
slurring = max(slurring, 80)
src.visible_message("<span class='danger'>[src] blackouts!</span>","<span class='danger'>You blackout!</span>")
src.visible_message(SPAN_DANGER("[src] blacks out!"),SPAN_DANGER("You black out!"))
paralysis = max(paralysis, 20 SECONDS)
sleeping = max(sleeping, 20 SECONDS)
adjustBrainLoss(3,10)
add_chemical_effect(CE_HEPATOTOXIC, 1)
else if(prob(10))
slurring = max(slurring, 70)
to_chat(src,"<span class='warning'>You decide that you like the ground and spend a few seconds to rest.</span>")
to_chat(src,SPAN_WARNING("You decide that you like the ground and spend a few seconds to rest."))
sleeping = max(sleeping, 6 SECONDS)
adjustBrainLoss(1,5)