Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 097d135

Browse files
authored
adjusts slurring from 51 drunk level to 16 drunk level and makes you slur different amounts based on your drunk level (#22585)
* adjusts * damnit * Update drunk.dm
1 parent 13359ce commit 097d135

File tree

3 files changed

+37
-12
lines changed

3 files changed

+37
-12
lines changed

code/__DEFINES/status_effects.dm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@
244244
#define set_derpspeech(duration) set_timed_status_effect(duration, /datum/status_effect/speech/stutter/derpspeech)
245245
#define set_derpspeech_if_lower(duration) set_timed_status_effect(duration, /datum/status_effect/speech/stutter/derpspeech, TRUE)
246246

247-
#define adjust_slurring(duration) adjust_timed_status_effect(duration, /datum/status_effect/speech/slurring/drunk)
248-
#define adjust_slurring_up_to(duration, up_to) adjust_timed_status_effect(duration, /datum/status_effect/speech/slurring/drunk, up_to)
249-
#define set_slurring(duration) set_timed_status_effect(duration, /datum/status_effect/speech/slurring/drunk)
250-
#define set_slurring_if_lower(duration) set_timed_status_effect(duration, /datum/status_effect/speech/slurring/drunk, TRUE)
247+
#define adjust_slurring(duration) adjust_timed_status_effect(duration, /datum/status_effect/speech/slurring/generic)
248+
#define adjust_slurring_up_to(duration, up_to) adjust_timed_status_effect(duration, /datum/status_effect/speech/slurring/generic, up_to)
249+
#define set_slurring(duration) set_timed_status_effect(duration, /datum/status_effect/speech/slurring/generic)
250+
#define set_slurring_if_lower(duration) set_timed_status_effect(duration, /datum/status_effect/speech/slurring/generic, TRUE)
251251

252252
#define adjust_dizzy(duration) adjust_timed_status_effect(duration, /datum/status_effect/dizziness)
253253
#define adjust_dizzy_up_to(duration, up_to) adjust_timed_status_effect(duration, /datum/status_effect/dizziness, up_to)

code/datums/status_effects/debuffs/drunk.dm

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,16 @@
146146

147147
// Over 11, Light drinkers will constantly gain slurring up to 10 seconds of slurring.
148148
if(HAS_TRAIT(owner, TRAIT_LIGHT_DRINKER) & (drunk_value >= 11))
149-
owner.adjust_slurring_up_to(2.4 SECONDS, 10 SECONDS)
149+
owner.adjust_timed_status_effect(4 SECONDS, /datum/status_effect/speech/slurring/drunk, max_duration = 10 SECONDS)
150150
if(HAS_TRAIT(owner, TRAIT_DRUNK_HEALING) & (drunk_value >= 11)) // To save headache this will be separate for drunken resilience & effects stack with lower tiers
151151
owner.adjustBruteLoss(-0.1, FALSE)
152152
owner.adjustFireLoss(-0.06, FALSE)
153153

154+
// over 21 normal people will start to slur
155+
if(drunk_value >= 21)
156+
if(!HAS_TRAIT(owner, TRAIT_ALCOHOL_TOLERANCE))
157+
owner.adjust_timed_status_effect(4 SECONDS, /datum/status_effect/speech/slurring/drunk, max_duration = 20 SECONDS)
158+
154159
// Over 41, we have a 30% chance to gain confusion, and we will always have 20 seconds of dizziness.
155160
if(drunk_value >= 41)
156161
if(prob(30))
@@ -162,16 +167,14 @@
162167
owner.adjustBruteLoss(-0.2, FALSE)
163168
owner.adjustFireLoss(-0.09, FALSE)
164169

165-
// Over 51, we have a 3% chance to gain a lot of confusion and vomit, and we will always have 50 seconds of dizziness and normal drinkers will start to slur
170+
// Over 51, we have a 3% chance to gain a lot of confusion and vomit, and we will always have 50 seconds of dizziness
166171
if(drunk_value >= 51)
167172
owner.set_dizzy_if_lower(50 SECONDS)
168173
if(prob(3))
169174
owner.adjust_confusion(15 SECONDS)
170175
if(iscarbon(owner))
171176
var/mob/living/carbon/carbon_owner = owner
172177
carbon_owner.vomit() // Vomiting clears toxloss - consider this a blessing
173-
if(!HAS_TRAIT(owner, TRAIT_ALCOHOL_TOLERANCE))
174-
owner.adjust_slurring_up_to(2.4 SECONDS, 7 SECONDS)
175178

176179
// Over 71, we will constantly have blurry eyes
177180
if(drunk_value >= 71)
@@ -186,7 +189,7 @@
186189
if(owner.stat == CONSCIOUS && prob(5))
187190
to_chat(owner, span_warning("Maybe you should lie down for a bit..."))
188191
if(HAS_TRAIT(owner, TRAIT_ALCOHOL_TOLERANCE))
189-
owner.adjust_slurring_up_to(2.4 SECONDS, 4 SECONDS)
192+
owner.adjust_timed_status_effect(4 SECONDS, /datum/status_effect/speech/slurring/drunk, max_duration = 20 SECONDS)
190193

191194
// Over 91, we gain even more toxloss, brain damage, and have a chance of dropping into a long sleep
192195
if(drunk_value >= 91)

code/datums/status_effects/debuffs/speech_debuffs.dm

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,36 @@
191191

192192
return modified_char
193193

194-
/datum/status_effect/speech/slurring/drunk
195-
id = "drunk_slurring"
194+
/datum/status_effect/speech/slurring/generic
195+
id = "generic_slurring"
196196
common_prob = 33
197-
uncommon_prob = 5
197+
uncommon_prob = 0
198198
replacement_prob = 5
199199
doubletext_prob = 10
200200
text_modification_file = "slurring_drunk_text.json"
201201

202+
/datum/status_effect/speech/slurring/drunk
203+
id = "drunk_slurring"
204+
// These defaults are updated when speech event occur.
205+
common_prob = -1
206+
uncommon_prob = -1
207+
replacement_prob = -1
208+
doubletext_prob = -1
209+
text_modification_file = "slurring_drunk_text.json"
210+
211+
/datum/status_effect/speech/slurring/drunk/handle_message(datum/source, list/message_args)
212+
var/current_drunkness = owner.get_drunk_amount()
213+
// These numbers are arbitarily picked
214+
// Common replacements start at about 20, and maxes out at about 85
215+
common_prob = clamp((current_drunkness * 0.8) - 16, 0, 50)
216+
// Uncommon replacements (burping) start at 50 and max out at 110 (when you are dying)
217+
uncommon_prob = clamp((current_drunkness * 0.2) - 10, 0, 12)
218+
// Replacements start at 20 and max out at about 60
219+
replacement_prob = clamp((current_drunkness * 0.4) - 8, 0, 12)
220+
// Double texting start out at about 25 and max out at about 60
221+
doubletext_prob = clamp((current_drunkness * 0.5) - 12, 0, 20)
222+
return ..()
223+
202224
/datum/status_effect/speech/slurring/cult
203225
id = "cult_slurring"
204226
common_prob = 50

0 commit comments

Comments
 (0)