From 60f94a1c69965b70bb715513dd073bda43bda645 Mon Sep 17 00:00:00 2001 From: Doxxmedearly <38594443+Doxxmedearly@users.noreply.github.com> Date: Sun, 30 May 2021 13:35:51 -0400 Subject: [PATCH] Alcoholism Buff (#11957) --- code/__defines/chemistry.dm | 6 +++--- code/modules/organs/internal/liver.dm | 7 ++++++- html/changelogs/doxxmedearly - longer_intoxication.yml | 6 ++++++ 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 html/changelogs/doxxmedearly - longer_intoxication.yml diff --git a/code/__defines/chemistry.dm b/code/__defines/chemistry.dm index 17b08aff5e4..6f65586a00a 100644 --- a/code/__defines/chemistry.dm +++ b/code/__defines/chemistry.dm @@ -100,9 +100,9 @@ #define INTOX_DEATH 0.45 //How many units of intoxication to remove per second -#define INTOX_FILTER_HEALTHY 0.15 -#define INTOX_FILTER_BRUISED 0.10 -#define INTOX_FILTER_DAMAGED 0.05 +#define INTOX_FILTER_HEALTHY 0.10 +#define INTOX_FILTER_BRUISED 0.07 +#define INTOX_FILTER_DAMAGED 0.03 #define BASE_DIZZY 50 //Base dizziness from getting drunk. #define DIZZY_ADD_SCALE 15 //Amount added for every 0.01 percent over the JUDGEIMP limit diff --git a/code/modules/organs/internal/liver.dm b/code/modules/organs/internal/liver.dm index 6a131f7d633..df70a45dbda 100644 --- a/code/modules/organs/internal/liver.dm +++ b/code/modules/organs/internal/liver.dm @@ -63,7 +63,12 @@ filter_strength *= 1.1 if (owner.intoxication > 0) - owner.intoxication -= min(owner.intoxication, filter_strength) + var/bac = owner.get_blood_alcohol() + var/res = owner.species ? owner.species.ethanol_resistance : 1 + if(bac >= INTOX_MUSCLEIMP * res) //Excessive blood alcohol, difficult to filter + owner.intoxication -= min(owner.intoxication, filter_strength/2) + else + owner.intoxication -= min(owner.intoxication, filter_strength) if(!owner.intoxication) owner.handle_intoxication() diff --git a/html/changelogs/doxxmedearly - longer_intoxication.yml b/html/changelogs/doxxmedearly - longer_intoxication.yml new file mode 100644 index 00000000000..667539c7620 --- /dev/null +++ b/html/changelogs/doxxmedearly - longer_intoxication.yml @@ -0,0 +1,6 @@ +author: Doxxmedearly + +delete-after: True + +changes: + - tweak: "Intoxication lingers longer, especially when drunk."