From efc48dd8b5c81d79d0fab01edf239e855fd30351 Mon Sep 17 00:00:00 2001 From: X0-11 Date: Mon, 20 May 2024 15:58:06 +0100 Subject: [PATCH 1/9] minor armour thickness regeneration --- code/modules/mob/living/carbon/human/life.dm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 2fbabe0f98db3..e6dc4ffc2ab28 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -81,6 +81,8 @@ handle_medical_side_effects() + handle_armour_regen() + if(!client && !mind) species.handle_npc(src) @@ -1210,4 +1212,11 @@ /mob/living/carbon/human/handle_flight_failure() if(species.handle_flight_failure(src)) //If our species returns 1, then they're fully handling this. return - . = ..() \ No newline at end of file + . = ..() + +/mob/living/carbon/human/proc/handle_armour_regen() + for(var/i in list(head,wear_suit,w_uniform,shoes,gloves)) + var/obj/item/clothing/c = i + if(istype(c)) + if(c.armor_thickness < c.armor_thickness_max) + c.armor_thickness = min(c.armor_thickness + 0.1,c.armor_thickness_max) \ No newline at end of file From 8b1757210ed20c7074188c5baaf6ae6cef858575 Mon Sep 17 00:00:00 2001 From: X0-11 Date: Mon, 20 May 2024 17:27:50 +0100 Subject: [PATCH 2/9] less camera shake, more vision fuckery --- code/modules/halo/misc/suppression.dm | 10 +++++----- code/modules/projectiles/projectile/bullets.dm | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/code/modules/halo/misc/suppression.dm b/code/modules/halo/misc/suppression.dm index 96394c85f0aa4..f34e907cab246 100644 --- a/code/modules/halo/misc/suppression.dm +++ b/code/modules/halo/misc/suppression.dm @@ -4,22 +4,22 @@ return var/seconds_since_suppression = (world.time - time_last_suppressed)/10 var/shake_chance = SUPPRESSION_SHAKE_CHANCE - var/shake_multiplier = 0 + var/shake_intensity = 0 if(seconds_since_suppression <= 1.5) overlay_fullscreen("suppress",SUPPRESSION_FULLSCREEN_TYPE, SUPPRESS_LARGE) - shake_multiplier = 1.5 + shake_intensity = 1.25 //severe supression effects else if(seconds_since_suppression <=4) overlay_fullscreen("suppress",SUPPRESSION_FULLSCREEN_TYPE, SUPPRESS_MID) - shake_multiplier = 1 + shake_intensity = 0.75 //medium supression effects else if(seconds_since_suppression <=8) overlay_fullscreen("suppress",SUPPRESSION_FULLSCREEN_TYPE, SUPPRESS_SMALL) - shake_multiplier = 0.5 + shake_intensity = 0.25 //low supression effects if(prob(shake_chance)) - shake_camera(src, round(0.25 SECONDS * shake_multiplier), round(1*shake_multiplier)) + shake_camera(src, round(0.25 SECONDS * shake_multiplier), shake_intensity)) if(prob(SUPPRESSION_SCREAM_CHANCE)) emote("painscream",AUDIBLE_MESSAGE) time_last_suppressed = world.time \ No newline at end of file diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index d09b27fe41c8a..485789fdf478d 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -15,7 +15,8 @@ /obj/item/projectile/bullet/on_hit(var/atom/target, var/blocked = 0) if (..(target, blocked)) var/mob/living/L = target - shake_camera(L, 3, 2) + //The Suppression system should be handling screenshakes. + //shake_camera(L, 2, 1.5) /obj/item/projectile/bullet/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier) if(penetrating > 0 && damage > 20 && prob(damage)) From 30b22f9243b755d73df6d66703cebb3c38f5e580 Mon Sep 17 00:00:00 2001 From: X0-11 Date: Mon, 20 May 2024 17:44:57 +0100 Subject: [PATCH 3/9] diminishing effects for painkillers and speedboosters and also a rework of adrenaline, including the rush-time --- code/__defines/chemistry.dm | 7 ++++ code/game/gamemodes/cult/runes.dm | 2 +- code/modules/halo/chemicals/medicine.dm | 10 +++--- .../npc_factions/gear/tallista_spice.dm | 6 ++-- code/modules/mob/living/carbon/carbon.dm | 7 ++++ .../modules/projectiles/projectile/bullets.dm | 8 ++--- .../Chemistry-Reagents-Food-Drinks.dm | 2 +- .../Chemistry-Reagents-Medicine.dm | 36 ++++++++++--------- 8 files changed, 48 insertions(+), 30 deletions(-) diff --git a/code/__defines/chemistry.dm b/code/__defines/chemistry.dm index 20f2cac993f6e..7dfa7f4a378aa 100644 --- a/code/__defines/chemistry.dm +++ b/code/__defines/chemistry.dm @@ -14,6 +14,13 @@ #define REAGENTS_OVERDOSE 30 +//For chemical effects with diminishing returns, how much %wise should we lose for each second the chem is in us? +#define DIMINISHING_RETURNS_PERSECOND_LOSS 0.006 +//What is the lowest our multiplier can get? +#define DIMINISHING_RETURNS_CAP 0.4 + +#define ADRENAL_RUSH_TIME 4 SECONDS + #define CHEM_SYNTH_ENERGY 500 // How much energy does it take to synthesize 1 unit of chemical, in Joules. // Some on_mob_life() procs check for alien races. diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 33b99f9c5271a..ab8fe0a3f9926 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -575,7 +575,7 @@ M.AdjustStunned(-1) M.AdjustWeakened(-1) M.add_chemical_effect(CE_PAINKILLER, 40) - M.add_chemical_effect(CE_SPEEDBOOST, 1) + M.add_chemical_effect_diminishing(CE_SPEEDBOOST, 1,dose,metabolism) M.adjustOxyLoss(-10 * removed) M.heal_organ_damage(5 * removed, 5 * removed) M.adjustToxLoss(-5 * removed) diff --git a/code/modules/halo/chemicals/medicine.dm b/code/modules/halo/chemicals/medicine.dm index d782f67fb971f..335c817efbee6 100644 --- a/code/modules/halo/chemicals/medicine.dm +++ b/code/modules/halo/chemicals/medicine.dm @@ -48,7 +48,7 @@ description = "The remnants of biofoam, clogging the person's body and stopping further biofoam usage." reagent_state = LIQUID color = "#edd9c0" - metabolism = REM*3 + metabolism = REM*2 overdose = 0 scannable = 1 @@ -173,7 +173,7 @@ /datum/reagent/hyperzine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjustToxLoss(0.5) - M.add_chemical_effect(CE_SLOWREMOVE, 1) + M.add_chemical_effect_diminishing(CE_SLOWREMOVE, 1,dose,metabolism) M.add_chemical_effect(CE_PULSE, 2) /datum/reagent/hyperzine_concentrated @@ -192,7 +192,7 @@ H.adjustToxLoss(0.75) if(prob(10)) H.emote(pick("twitch", "blink_r", "shiver")) - H.add_chemical_effect(CE_SPEEDBOOST, 1) + H.add_chemical_effect_diminishing(CE_SPEEDBOOST, 1,dose,metabolism) H.add_chemical_effect(CE_PULSE, 2) /datum/reagent/hyperzine_concentrated/overdose(var/mob/living/carbon/human/H) @@ -262,7 +262,7 @@ flags = IGNORE_MOB_SIZE /datum/reagent/ketoprofen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - M.add_chemical_effect(CE_PAINKILLER, 40) + M.add_chemical_effect_diminishing(CE_PAINKILLER, 40,dose,metabolism) M.add_chemical_effect(CE_CRYO, -1) var/target = 310 //Target body temperature @@ -286,7 +286,7 @@ flags = IGNORE_MOB_SIZE /datum/reagent/polypseudomorphine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - M.add_chemical_effect(CE_PAINKILLER, POLYPSEUDOMORPHINE_PAINKILL) + M.add_chemical_effect_diminishing(CE_PAINKILLER, POLYPSEUDOMORPHINE_PAINKILL,dose,metabolism) for(var/datum/reagents/reag_hold in list(M.bloodstr,M.ingested,M.touching)) reag_hold.remove_reagent(/datum/reagent/hyperzine,100) reag_hold.remove_reagent(/datum/reagent/hyperzine_concentrated,100) diff --git a/code/modules/halo/factions/npc_factions/gear/tallista_spice.dm b/code/modules/halo/factions/npc_factions/gear/tallista_spice.dm index 0e84ed6e88a32..c2394008f586d 100644 --- a/code/modules/halo/factions/npc_factions/gear/tallista_spice.dm +++ b/code/modules/halo/factions/npc_factions/gear/tallista_spice.dm @@ -26,7 +26,7 @@ /datum/reagent/tallista_spice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() - M.add_chemical_effect(CE_SPEEDBOOST, 1) - M.add_chemical_effect(CE_SLOWREMOVE, 1) + M.add_chemical_effect_diminishing(CE_SPEEDBOOST, 1,dose,metabolism) + M.add_chemical_effect_diminishing(CE_SLOWREMOVE, 2,dose,metabolism) M.add_chemical_effect(CE_PULSE, 0.1) - M.add_chemical_effect(CE_PAINKILLER, 50) + M.add_chemical_effect_diminishing(CE_PAINKILLER, 100,dose,metabolism) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 8d7403ebda642..7323b2eb9d2cd 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -384,6 +384,13 @@ else chem_effects[effect] = magnitude +/mob/living/carbon/proc/add_chemical_effect_diminishing(var/effect,var/magnitude,var/dose,var/metab) + //This does some preprocessing to lower the final effect by how much has already been processed. + //How long has this been processing in us (seconds)? + var/dose_time = (dose / metab)/10 + var/dose_mult = max(1 - (DIMINISHING_RETURNS_PERSECOND_LOSS*dose_time),DIMINISHING_RETURNS_CAP) + add_chemical_effect(effect*dose_mult,magnitude) + /mob/living/carbon/proc/add_up_to_chemical_effect(var/effect, var/magnitude = 1) if(effect in chem_effects) chem_effects[effect] = max(magnitude, chem_effects[effect]) diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 485789fdf478d..e06b6a2dfe941 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -13,11 +13,11 @@ muzzle_type = /obj/effect/projectile/bullet/muzzle /obj/item/projectile/bullet/on_hit(var/atom/target, var/blocked = 0) - if (..(target, blocked)) +/* if (..(target, blocked)) var/mob/living/L = target - //The Suppression system should be handling screenshakes. - //shake_camera(L, 2, 1.5) - + The Suppression system should be handling screenshakes. + shake_camera(L, 2, 1.5) +*/ /obj/item/projectile/bullet/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier) if(penetrating > 0 && damage > 20 && prob(damage)) mob_passthrough_check = 1 diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index 04e2c081b54c8..b0ca147e22bff 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -866,7 +866,7 @@ /datum/reagent/drink/nuka_cola/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() - M.add_chemical_effect(CE_SPEEDBOOST, 1) + M.add_chemical_effect_diminishing(CE_SPEEDBOOST, 1,dose,metabolism) M.make_jittery(20) M.druggy = max(M.druggy, 30) M.dizziness += 5 diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 291ace090316a..42b70a39a4641 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -14,7 +14,7 @@ /datum/reagent/inaprovaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) M.add_chemical_effect(CE_STABLE) - M.add_chemical_effect(CE_PAINKILLER, 10) + M.add_chemical_effect_diminishing(CE_PAINKILLER, 10,dose,metabolism) M.add_chemical_effect(CE_BRAIN_REGEN, 1) // Slowly repairs brain damage. M.add_chemical_effect(CE_PULSE, -1) @@ -238,7 +238,7 @@ flags = IGNORE_MOB_SIZE /datum/reagent/paracetamol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - M.add_chemical_effect(CE_PAINKILLER, 25) + M.add_chemical_effect_diminishing(CE_PAINKILLER, 25,dose,metabolism) /datum/reagent/paracetamol/overdose(var/mob/living/carbon/M, var/alien) ..() @@ -256,7 +256,7 @@ flags = IGNORE_MOB_SIZE /datum/reagent/tramadol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - M.add_chemical_effect(CE_PAINKILLER, 80) + M.add_chemical_effect_diminishing(CE_PAINKILLER, 80,dose,metabolism) /datum/reagent/tramadol/overdose(var/mob/living/carbon/M, var/alien) ..() @@ -273,7 +273,7 @@ flags = IGNORE_MOB_SIZE /datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - M.add_chemical_effect(CE_PAINKILLER, 200) + M.add_chemical_effect_diminishing(CE_PAINKILLER, 200,dose,metabolism) /datum/reagent/oxycodone/overdose(var/mob/living/carbon/M, var/alien) ..() @@ -302,7 +302,7 @@ holder.remove_reagent(/datum/reagent/mindbreaker, 5) M.hallucination = max(0, M.hallucination - 10) M.adjustToxLoss(10 * removed) // Reduced from 12 to 10 to make its toxin buildup a little more sane with its slow metabolism. - M.add_chemical_effect(CE_PAINKILLER, 20) + M.add_chemical_effect_diminishing(CE_PAINKILLER, 20,dose,metabolism) /datum/reagent/alkysine name = "Alkysine" @@ -318,7 +318,7 @@ /datum/reagent/alkysine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return - M.add_chemical_effect(CE_PAINKILLER, 10) + M.add_chemical_effect_diminishing(CE_PAINKILLER, 10,dose,metabolism) M.add_chemical_effect(CE_BRAIN_REGEN, 2) // 1 to 2. Heals the brain twice as fast. M.adjustToxLoss(10 * removed) // Removed confusion and drowsiness, added toxin buildup. @@ -701,7 +701,7 @@ if(alien == IS_DIONA) return - M.add_chemical_effect(CE_PAINKILLER, 15) + M.add_chemical_effect_diminishing(CE_PAINKILLER, 15,dose,metabolism) M.add_chemical_effect(CE_ANTIVIRAL, 1) /datum/reagent/antidexafen/overdose(var/mob/living/carbon/M, var/alien) @@ -716,25 +716,29 @@ color = "#C8A5DC" scannable = 1 overdose = 0 + var/metab_adr = null /datum/reagent/adrenaline/affect_blood(var/mob/living/carbon/human/M, var/alien, var/removed) if(alien == IS_DIONA) return - if(dose > 1) //not that effective after initial rush - M.add_chemical_effect(CE_PAINKILLER, min(10*volume, 20)) - M.add_chemical_effect(CE_PULSE, 1) - else + var/break_threshold = M.species.adrenal_break_threshold + var/adrenal_break = 0 + if(!metab_adr)//Caching + metab_adr = initial(metabolism) * ADRENAL_RUSH_TIME + if(volume > break_threshold) + metabolism = adrenal_break/3 + adrenal_break = 1 + if(adrenal_break || dose < (metabolism * ADRENAL_RUSH_TIME)) //not that effective after initial rush M.add_chemical_effect(CE_PAINKILLER, min(30*volume, 80)) - M.add_chemical_effect(CE_PULSE, 1) // 2 -> 1 due to brutes breaking their hearts on this stuff. + M.add_chemical_effect(CE_PULSE, 2) + else + M.add_chemical_effect(CE_PAINKILLER, min(10*volume, 45)) + M.add_chemical_effect(CE_PULSE, 1) if(dose > 5) M.make_jittery(5) if(volume >= 5 && M.is_asystole()) remove_self(5) M.resuscitate() - while(volume >= M.species.adrenal_break_threshold)//slightly more than 100/5. - M.add_chemical_effect(CE_PAINKILLER,120*(M.species.adrenal_break_threshold/30)) //Reach a threshold of adrenaline, massive painkill effect - M.add_chemical_effect(CE_PULSE,2) //But your heart goes mental. 3 -> 2 due to brutes breaking their hearts on this stuff. - remove_self(M.species.adrenal_break_threshold) //And your body consumes the adrenaline for that last final push /datum/reagent/adrenaline/overdose(var/mob/living/carbon/M, var/alien) return From 928a9a316f3c124d1cc99389045de76c1d40f7d7 Mon Sep 17 00:00:00 2001 From: X0-11 Date: Mon, 20 May 2024 17:45:15 +0100 Subject: [PATCH 4/9] suppression less intense, but more obscuring --- code/__defines/suppression.dm | 6 +++--- code/modules/halo/misc/suppression.dm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/__defines/suppression.dm b/code/__defines/suppression.dm index 0e047f9e1b992..55cb52b17b2b0 100644 --- a/code/__defines/suppression.dm +++ b/code/__defines/suppression.dm @@ -1,5 +1,5 @@ -#define SUPPRESS_LARGE 5 -#define SUPPRESS_MID 3 -#define SUPPRESS_SMALL 2 +#define SUPPRESS_LARGE 9 +#define SUPPRESS_MID 6 +#define SUPPRESS_SMALL 3 #define SUPPRESSION_FULLSCREEN_TYPE /obj/screen/fullscreen/oxy \ No newline at end of file diff --git a/code/modules/halo/misc/suppression.dm b/code/modules/halo/misc/suppression.dm index f34e907cab246..fcd0b8ca05f21 100644 --- a/code/modules/halo/misc/suppression.dm +++ b/code/modules/halo/misc/suppression.dm @@ -19,7 +19,7 @@ //low supression effects if(prob(shake_chance)) - shake_camera(src, round(0.25 SECONDS * shake_multiplier), shake_intensity)) + shake_camera(src, round(0.25 SECONDS * shake_intensity), shake_intensity) if(prob(SUPPRESSION_SCREAM_CHANCE)) emote("painscream",AUDIBLE_MESSAGE) time_last_suppressed = world.time \ No newline at end of file From 80085c5dcf17079aa286cf9475389a4239438b0e Mon Sep 17 00:00:00 2001 From: X0-11 Date: Mon, 20 May 2024 17:57:31 +0100 Subject: [PATCH 5/9] oxycodone rebalance --- .../Chemistry-Reagents/Chemistry-Reagents-Medicine.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 42b70a39a4641..3a43c37ce2602 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -273,11 +273,11 @@ flags = IGNORE_MOB_SIZE /datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - M.add_chemical_effect_diminishing(CE_PAINKILLER, 200,dose,metabolism) + M.add_chemical_effect_diminishing(CE_PAINKILLER, 120,dose,metabolism) + M.druggy = max(M.druggy, 10) /datum/reagent/oxycodone/overdose(var/mob/living/carbon/M, var/alien) ..() - M.druggy = max(M.druggy, 10) M.hallucination = max(M.hallucination, 3) /* Other medicine */ From 3af6cfc1dc6ab035c6ffe370a503ec7c2e440047 Mon Sep 17 00:00:00 2001 From: X0-11 Date: Mon, 20 May 2024 18:03:29 +0100 Subject: [PATCH 6/9] oxycodone tweaks and reverse diminishing returns --- code/modules/mob/living/carbon/carbon.dm | 12 ++++++++++-- .../Chemistry-Reagents-Medicine.dm | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 7323b2eb9d2cd..78b98d65ff2e1 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -384,13 +384,21 @@ else chem_effects[effect] = magnitude -/mob/living/carbon/proc/add_chemical_effect_diminishing(var/effect,var/magnitude,var/dose,var/metab) +/mob/living/carbon/proc/add_chemical_effect_diminishing(var/effect,var/magnitude,var/dose,var/metab,var/reverse) //This does some preprocessing to lower the final effect by how much has already been processed. //How long has this been processing in us (seconds)? var/dose_time = (dose / metab)/10 - var/dose_mult = max(1 - (DIMINISHING_RETURNS_PERSECOND_LOSS*dose_time),DIMINISHING_RETURNS_CAP) + var/dose_mult_step1 = DIMINISHING_RETURNS_PERSECOND_LOSS * dose_time + var/dose_mult = 1 + if(reverse) + dose_mult = min(dose_mult_step1,1) + else + dose_mult = max(1 - dose_mult_step1,DIMINISHING_RETURNS_CAP) add_chemical_effect(effect*dose_mult,magnitude) +/mob/living/carbon/proc/add_chemical_effect_diminishing_reverse(var/effect,var/magnitude,var/dose,var/metab) + add_chemical_effect_diminishing(effect,magnitude,dose,metab,1) + /mob/living/carbon/proc/add_up_to_chemical_effect(var/effect, var/magnitude = 1) if(effect in chem_effects) chem_effects[effect] = max(magnitude, chem_effects[effect]) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 3a43c37ce2602..1fce2784bffac 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -273,7 +273,7 @@ flags = IGNORE_MOB_SIZE /datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - M.add_chemical_effect_diminishing(CE_PAINKILLER, 120,dose,metabolism) + M.add_chemical_effect_diminishing_reverse(CE_PAINKILLER, 120,dose,metabolism) M.druggy = max(M.druggy, 10) /datum/reagent/oxycodone/overdose(var/mob/living/carbon/M, var/alien) From 9039403754f0a23c3f8775dd9454e25c9f4e9bde Mon Sep 17 00:00:00 2001 From: X0-11 Date: Mon, 20 May 2024 19:30:06 +0100 Subject: [PATCH 7/9] fixes diminishing returns code --- code/modules/mob/living/carbon/carbon.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 78b98d65ff2e1..85fd47aa5f9fb 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -394,7 +394,7 @@ dose_mult = min(dose_mult_step1,1) else dose_mult = max(1 - dose_mult_step1,DIMINISHING_RETURNS_CAP) - add_chemical_effect(effect*dose_mult,magnitude) + add_chemical_effect(effect,magnitude*dose_mult) /mob/living/carbon/proc/add_chemical_effect_diminishing_reverse(var/effect,var/magnitude,var/dose,var/metab) add_chemical_effect_diminishing(effect,magnitude,dose,metab,1) From 5244bd1f073f69e829f840640d9a7ca796a3b8cb Mon Sep 17 00:00:00 2001 From: X0-11 Date: Mon, 20 May 2024 19:36:49 +0100 Subject: [PATCH 8/9] adrenaline tweak fix --- .../Chemistry-Reagents-Medicine.dm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 1fce2784bffac..06f1e8a050b40 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -234,7 +234,7 @@ color = "#C8A5DC" overdose = 60 scannable = 1 - metabolism = 0.02 + metabolism = REM * 0.5 flags = IGNORE_MOB_SIZE /datum/reagent/paracetamol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -252,7 +252,7 @@ color = "#CB68FC" overdose = 30 scannable = 1 - metabolism = 0.02 + metabolism = REM flags = IGNORE_MOB_SIZE /datum/reagent/tramadol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -717,17 +717,21 @@ scannable = 1 overdose = 0 var/metab_adr = null + var/adrenal_break = 0 /datum/reagent/adrenaline/affect_blood(var/mob/living/carbon/human/M, var/alien, var/removed) if(alien == IS_DIONA) return var/break_threshold = M.species.adrenal_break_threshold - var/adrenal_break = 0 if(!metab_adr)//Caching metab_adr = initial(metabolism) * ADRENAL_RUSH_TIME if(volume > break_threshold) - metabolism = adrenal_break/3 + metabolism = break_threshold*1.5 adrenal_break = 1 + else + if(adrenal_break) + adrenal_break = 0 + metabolism = initial(metabolism) if(adrenal_break || dose < (metabolism * ADRENAL_RUSH_TIME)) //not that effective after initial rush M.add_chemical_effect(CE_PAINKILLER, min(30*volume, 80)) M.add_chemical_effect(CE_PULSE, 2) From f9b585d133fd5598a259737d67272ce2db119883 Mon Sep 17 00:00:00 2001 From: X0-11 Date: Mon, 20 May 2024 19:47:33 +0100 Subject: [PATCH 9/9] diminishing returns ramp up tweak --- code/__defines/chemistry.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__defines/chemistry.dm b/code/__defines/chemistry.dm index 7dfa7f4a378aa..bd83b394f0023 100644 --- a/code/__defines/chemistry.dm +++ b/code/__defines/chemistry.dm @@ -15,7 +15,7 @@ #define REAGENTS_OVERDOSE 30 //For chemical effects with diminishing returns, how much %wise should we lose for each second the chem is in us? -#define DIMINISHING_RETURNS_PERSECOND_LOSS 0.006 +#define DIMINISHING_RETURNS_PERSECOND_LOSS 0.007 //What is the lowest our multiplier can get? #define DIMINISHING_RETURNS_CAP 0.4