Increased alcohol/nicotine tolerance (#21546)

* booze

* Update mobs.dm

* nya

* Revert "nya"

This reverts commit faa0b97c0522a2860fb265d37ddd80f71e6a68c8.

* remove from master_files/sr defines

* better comment

* Update generic_addictions.dm

* reduce messages

* reduced nicotine rate
This commit is contained in:
lessthanthree
2023-06-26 20:54:37 +00:00
committed by GitHub
parent 2ade62ff93
commit 418e0ede0f
4 changed files with 68 additions and 29 deletions
+5 -5
View File
@@ -146,11 +146,11 @@
#define MAX_ADDICTION_POINTS 1000
///Addiction start/ends
#define WITHDRAWAL_STAGE1_START_CYCLE 61
#define WITHDRAWAL_STAGE1_END_CYCLE 120
#define WITHDRAWAL_STAGE2_START_CYCLE 121
#define WITHDRAWAL_STAGE2_END_CYCLE 180
#define WITHDRAWAL_STAGE3_START_CYCLE 181
#define WITHDRAWAL_STAGE1_START_CYCLE 121 // SKYRAT EDIT CHANGE - Original 61
#define WITHDRAWAL_STAGE1_END_CYCLE 240 // SKYRAT EDIT CHANGE - Original 120
#define WITHDRAWAL_STAGE2_START_CYCLE 241 // SKYRAT EDIT CHANGE - Original 121
#define WITHDRAWAL_STAGE2_END_CYCLE 360 // SKYRAT EDIT CHANGE - Original 180
#define WITHDRAWAL_STAGE3_START_CYCLE 361 // SKYRAT EDIT CHANGE - Original 181
///reagent tags - used to look up reagents for specific effects. Feel free to add to but comment it
/// This reagent does brute effects (BOTH damaging and healing)
+35 -4
View File
@@ -1,10 +1,12 @@
// SKYRAT EDIT CHANGE BEGIN (#21546 DRUNK EFFECTS)
// Defines for the ballmer peak.
#define BALLMER_PEAK_LOW_END 12.9
#define BALLMER_PEAK_HIGH_END 13.8
#define BALLMER_PEAK_WINDOWS_ME 26
#define BALLMER_PEAK_LOW_END 25.8 // Original 12.9
#define BALLMER_PEAK_HIGH_END 27.6 // Original 13.8
#define BALLMER_PEAK_WINDOWS_ME 37 // Original 26
/// The threshld which determine if someone is tipsy vs drunk
#define TIPSY_THRESHOLD 6
#define TIPSY_THRESHOLD 21 // Original 6
// SKYRAT EDIT CHANGE END (#21546 DRUNK EFFECTS)
/**
* The drunk status effect.
@@ -144,6 +146,8 @@
if(drunk_value > BALLMER_PEAK_WINDOWS_ME) // by this point you're into windows ME territory
owner.say(pick_list_replacements(VISTA_FILE, "ballmer_windows_me_msg"), forced = "ballmer")
// SKYRAT EDIT CHANGE BEGIN (#21546 DRUNK EFFECTS)
/* ORIGINAL
// Drunk slurring scales in intensity based on how drunk we are -at 16 you will likely not even notice it,
// but when we start to scale up you definitely will
if(drunk_value >= 16)
@@ -171,6 +175,33 @@
// Over 71, we will constantly have blurry eyes
if(drunk_value >= 71)
owner.set_eye_blur_if_lower((drunk_value * 2 SECONDS) - 140 SECONDS)
*/
// And drunk people will always lose jitteriness
owner.adjust_jitter(-6 SECONDS)
// Over 41, we have a 10% chance to gain confusion and occasionally slur words, scaling with drunk_value
if(drunk_value >= 41)
if(prob(clamp(drunk_value - 8, 0, 100)))
owner.adjust_timed_status_effect(4 SECONDS, /datum/status_effect/speech/slurring/drunk, max_duration = 20 SECONDS)
if(prob(10))
owner.adjust_confusion(4 SECONDS)
// Over 61, we start to get blurred vision
if(drunk_value >= 61)
owner.set_dizzy_if_lower(45 SECONDS)
if(prob(15))
owner.adjust_eye_blur_up_to(4 SECONDS, 20 SECONDS)
// Over 71, we will constantly have blurry eyes, we might vomit
if(drunk_value >= 71)
owner.set_eye_blur_if_lower(20 SECONDS)
if(prob(3))
owner.adjust_confusion(15 SECONDS)
if(iscarbon(owner))
var/mob/living/carbon/carbon_owner = owner
carbon_owner.vomit() // Vomiting clears toxloss - consider this a blessing
// SKYRAT EDIT CHANGE END (#21546 DRUNK EFFECTS)
// Over 81, we will gain constant toxloss
if(drunk_value >= 81)
@@ -2,3 +2,6 @@
/// Modular version of `chemical_flags`, so we don't have to worry about
/// it causing conflicts in the future.
var/chemical_flags_skyrat = NONE
/datum/reagent/drug/nicotine
addiction_types = list(/datum/addiction/nicotine = 4) // 1.6 per 2 seconds
@@ -1,47 +1,52 @@
// Alters nicotine withdrawal
/datum/addiction/nicotine
name = "nicotine"
addiction_relief_treshold = 0.03 // This used to be 0.01.
withdrawal_stage_messages = list("Feel like having a smoke...", "I really need a smoke now...", "I can't take it, I really need a smoke now!")
medium_withdrawal_moodlet = /datum/mood_event/nicotine_withdrawal_moderate
severe_withdrawal_moodlet = /datum/mood_event/nicotine_withdrawal_severe
/datum/addiction/nicotine/proc/trigger_random_side_effect(mob/living/carbon/affected_carbon, seconds_per_tick, strength)
switch(rand(1, 10))
if(1 to 3)
/datum/addiction/nicotine/proc/trigger_random_side_effect(mob/living/carbon/affected_carbon, seconds_per_tick, strength = 1)
switch(rand(1, 4))
if(1)
if(!HAS_TRAIT(affected_carbon, TRAIT_NOHUNGER))
affected_carbon.adjust_nutrition(-seconds_per_tick * 10 * strength)
if(3 to 5)
affected_carbon.emote("cough")
if(5 to 7)
affected_carbon.adjust_nutrition(-10 * REM * seconds_per_tick)
if(2)
to_chat(affected_carbon, span_warning("Your head hurts."))
affected_carbon.adjustStaminaLoss(4 * strength)
if(8)
affected_carbon.adjustStaminaLoss(50 * REM * seconds_per_tick)
if(3)
if(strength >= 2)
to_chat(affected_carbon, span_warning("You feel a little dizzy."))
affected_carbon.set_dizzy(strength * 6 SECONDS)
if(8 to 10)
to_chat(affected_carbon, span_warning("You feel tired."))
affected_carbon.adjustStaminaLoss(6 * strength)
if(4)
if(strength >= 2)
to_chat(affected_carbon, span_warning("You feel tired."))
affected_carbon.adjustStaminaLoss(75 * REM * seconds_per_tick)
/datum/addiction/nicotine/withdrawal_enters_stage_1(mob/living/carbon/affected_carbon, seconds_per_tick)
. = ..()
affected_carbon.set_jitter_if_lower(10 SECONDS)
to_chat(affected_carbon, span_danger("[withdrawal_stage_messages[1]]"))
/datum/addiction/nicotine/withdrawal_enters_stage_2(mob/living/carbon/affected_carbon, seconds_per_tick)
. = ..()
affected_carbon.set_jitter_if_lower(20 SECONDS)
to_chat(affected_carbon, span_danger("[withdrawal_stage_messages[2]]"))
/datum/addiction/nicotine/withdrawal_enters_stage_3(mob/living/carbon/affected_carbon, seconds_per_tick)
. = ..()
affected_carbon.set_jitter_if_lower(30 SECONDS)
to_chat(affected_carbon, span_danger("[withdrawal_stage_messages[3]]"))
/datum/addiction/nicotine/withdrawal_stage_1_process(mob/living/carbon/affected_carbon, seconds_per_tick)
if(SPT_PROB(0.3, seconds_per_tick))
to_chat(affected_carbon, span_danger("[withdrawal_stage_messages[1]]"))
/datum/addiction/nicotine/withdrawal_stage_2_process(mob/living/carbon/affected_carbon, seconds_per_tick)
. = ..()
if(SPT_PROB(3, seconds_per_tick))
if(SPT_PROB(0.5, seconds_per_tick))
trigger_random_side_effect(affected_carbon, seconds_per_tick, 1)
if(SPT_PROB(0.5, seconds_per_tick))
to_chat(affected_carbon, span_danger("[withdrawal_stage_messages[2]]"))
/datum/addiction/nicotine/withdrawal_stage_3_process(mob/living/carbon/affected_carbon, seconds_per_tick)
. = ..()
if(SPT_PROB(5, seconds_per_tick))
if(SPT_PROB(0.7, seconds_per_tick))
trigger_random_side_effect(affected_carbon, seconds_per_tick, 2)
if(SPT_PROB(0.7, seconds_per_tick))
to_chat(affected_carbon, span_danger("[withdrawal_stage_messages[3]]"))