Skip to content

Commit

Permalink
[MIRROR] Significantly increases stamina recovery on most effects tha…
Browse files Browse the repository at this point in the history
…t provide it [MDB IGNORE] (#3786)

* Significantly increases stamina recovery on most effects that provide it (#83556)

## About The Pull Request

Currently, stamina healing is a niche side effect on many drugs, besides
a few effects (mostly heretic powers, an obscure side effect of some
drinks) that actually contribute to a significant shift in gameplay
style when you use them. In this PR I significantly increased the
stamina recovery on almost every drug and some effects that provide it.

Points of interest (not completely inclusive):
Syndicate stimulants heal 12 instead of 5 stamina damage. This will
bring you out of stam crit in two cycles, and let you heal out of the
slowdown from the stamina damage from a baton strike. The current rate
of 5 takes 5 seconds to heal out of stam crit, and the stamina reset
takes place before you heal out of stamina damage slowdown.
Bath salts heal stamina at the rate stimulants used to. Meth heals
stamina slightly slower.
Changeling adrenaline will instantly bring you out of stam crit if
you're in it; otherwise, it will heal 10 stamina damage.
Ephedrine heals 4 stamina per life, instead of 1.
Being so drunk that you black out and give up your body to ghost control
will make you heal stamina more quickly than an ascended rust heretic.
You will also likely be dying of liver damage.
## Why It's Good For The Game

At the levels they are set, most of these stamina healing effects have
almost no effect on gameplay whatsoever except in the case of tanking a
couple of extra disabler shots (only in the case of the high end drugs),
or being able to do stamina consuming tasks slightly longer (breaking
boulders, grinding with pestle and mortar, working out, ???).

Adjusting these numbers would make these drugs an actual factor in
combat situations that rely on stamina crit (stun batons, ebows, stamina
damaging poisons and diseases). Most of the drugs already have side
effects such as brain and organ damage, which in the current state
hugely outweighs any reason to use most of them besides a few that give
a movespeed buff or prevent baton knockdown (ephedrine, stimulants).

This only affects stamina healing. There has been no change to any other
interactions with things that knock down or cause any other kind of
stun.

These changes are in consideration of the fact that taking stamina
damage puts you in a cooldown before you can recover your stamina
naturally. Effects that cause steady stamina damage will bottom out your
stamina the way they do now, unless you use something to heal it.
## Changelog
:cl:
balance: Stamina healing has been significantly increased for most
reagents and passive effects.
/:cl:

* Significantly increases stamina recovery on most effects that provide it

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Joshua Kidder <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
4 people authored Jun 13, 2024
1 parent 122646b commit 3eff499
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 22 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ GLOBAL_LIST_INIT(leg_zones, list(BODY_ZONE_R_LEG, BODY_ZONE_L_LEG))
///If the obstacle is an object at the border of the turf (so no signal from being sent to the other turf)
#define SHOVE_DIRECTIONAL_BLOCKED (1<<6)

///Bitfield returned by listeners for COMSIG_CARBON_ENTER_STAMCRIT when they perform some action that prevents a mob going into stamcrit.
#define STAMCRIT_CANCELLED (1<<0)

///Deathmatch lobby current status
#define DEATHMATCH_NOT_PLAYING 0
#define DEATHMATCH_PRE_PLAYING 1
Expand Down
2 changes: 1 addition & 1 deletion code/datums/brain_damage/mild.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
return ..()

/datum/brain_trauma/mild/healthy/on_life(seconds_per_tick, times_fired)
owner.adjustStaminaLoss(-2.5 * seconds_per_tick) //no pain, no fatigue
owner.adjustStaminaLoss(-6 * seconds_per_tick) //no pain, no fatigue

/datum/brain_trauma/mild/healthy/on_lose()
owner.remove_status_effect(/datum/status_effect/grouped/screwy_hud/fake_healthy, type)
Expand Down
5 changes: 4 additions & 1 deletion code/datums/brain_damage/split_personality.dm
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,10 @@
if(prob(15))
playsound(owner,'sound/effects/sf_hiccup_male_01.ogg', 50)
owner.emote("hiccup")
owner.adjustStaminaLoss(-5) //too drunk to feel anything
//too drunk to feel anything
//if they're to this point, they're likely dying of liver damage
//and not accounting for that, the split personality is temporary
owner.adjustStaminaLoss(-25)
duration_in_seconds -= seconds_per_tick

/mob/living/split_personality/blackout
Expand Down
2 changes: 1 addition & 1 deletion code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
need_mob_update += itemUser.adjustFireLoss(-0.6 * seconds_between_ticks, updating_health = FALSE, forced = TRUE)
need_mob_update += itemUser.adjustToxLoss(-0.6 * seconds_between_ticks, updating_health = FALSE, forced = TRUE) //Because Slime People are people too
need_mob_update += itemUser.adjustOxyLoss(-0.6 * seconds_between_ticks, updating_health = FALSE, forced = TRUE)
need_mob_update += itemUser.adjustStaminaLoss(-0.6 * seconds_between_ticks, updating_stamina = FALSE, forced = TRUE)
need_mob_update += itemUser.adjustStaminaLoss(-3 * seconds_between_ticks, updating_stamina = FALSE, forced = TRUE)
need_mob_update += itemUser.adjustOrganLoss(ORGAN_SLOT_BRAIN, -0.6 * seconds_between_ticks)
if(need_mob_update)
itemUser.updatehealth()
Expand Down
2 changes: 1 addition & 1 deletion code/datums/status_effects/debuffs/spacer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
// This has some interesting side effects with gravitum or similar negating effects that may be worth nothing
owner.adjustStaminaLoss(-1 * stamina_heal_per_tick)
owner.AdjustAllImmobility(-1 * stun_heal_per_tick)
// For comparison: Ephedrine heals 1 stamina per tick / 0.5 per second
// For comparison: Ephedrine heals 4 stamina per tick / 2 per second
// and Nicotine heals 5 seconds of stun per tick / 2.5 per second

// The bad side (being on a planet)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/carbon/status_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
return
if(check_stun_immunity(CANKNOCKDOWN))
return
SEND_SIGNAL(src, COMSIG_CARBON_ENTER_STAMCRIT)
if (SEND_SIGNAL(src, COMSIG_CARBON_ENTER_STAMCRIT) & STAMCRIT_CANCELLED)
return

to_chat(src, span_notice("You're too exhausted to keep going..."))
add_traits(list(TRAIT_INCAPACITATED, TRAIT_IMMOBILIZED, TRAIT_FLOORED), STAMINA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
/datum/reagent/nitrium_high_metabolization/on_mob_life(mob/living/carbon/breather, seconds_per_tick, times_fired)
. = ..()
var/need_mob_update
need_mob_update = breather.adjustStaminaLoss(-2 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
need_mob_update = breather.adjustStaminaLoss(-4 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
need_mob_update += breather.adjustToxLoss(0.1 * (current_cycle-1) * REM * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype) // 1 toxin damage per cycle at cycle 10
if(need_mob_update)
return UPDATE_MOB_HEALTH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,7 @@
if(liver && HAS_TRAIT(liver, TRAIT_LAW_ENFORCEMENT_METABOLISM))
var/need_mob_update
need_mob_update = drinker.heal_bodypart_damage(2 * REM * seconds_per_tick, 2 * REM * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
need_mob_update += drinker.adjustStaminaLoss(-2 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
need_mob_update += drinker.adjustStaminaLoss(-5 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
if(need_mob_update)
return UPDATE_MOB_HEALTH

Expand Down Expand Up @@ -1655,7 +1655,8 @@
need_mob_update += drinker.adjustFireLoss(-heal_amt, updating_health = FALSE, required_bodytype = affected_bodytype)
need_mob_update += drinker.adjustToxLoss(-heal_amt, updating_health = FALSE, required_biotype = affected_biotype)
need_mob_update += drinker.adjustOxyLoss(-heal_amt, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
need_mob_update += drinker.adjustStaminaLoss(-heal_amt, updating_stamina = FALSE, required_biotype = affected_biotype)
// heal stamina loss on first metabolization, but only to a max of 20
need_mob_update += drinker.adjustStaminaLoss(max(-heal_amt * 5, -20), updating_stamina = FALSE, required_biotype = affected_biotype)
if(need_mob_update)
drinker.updatehealth()
drinker.visible_message(span_warning("[drinker] shivers with renewed vigor!"), span_notice("One taste of [LOWER_TEXT(name)] fills you with energy!"))
Expand Down Expand Up @@ -2080,7 +2081,7 @@
need_mob_update = drinker.heal_bodypart_damage(1 * REM * seconds_per_tick, 1 * REM * seconds_per_tick, updating_health = FALSE)
need_mob_update += drinker.adjustOxyLoss(-1 * REM * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
need_mob_update += drinker.adjustToxLoss(-1 * REM * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
need_mob_update += drinker.adjustStaminaLoss(-1 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
need_mob_update += drinker.adjustStaminaLoss(-5 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
if(need_mob_update)
return UPDATE_MOB_HEALTH

Expand Down Expand Up @@ -2137,7 +2138,7 @@
. = ..()
if(SPT_PROB(2, seconds_per_tick))
to_chat(drinker, span_notice("[pick("You feel disregard for the rule of law.", "You feel pumped!", "Your head is pounding.", "Your thoughts are racing..")]"))
if(drinker.adjustStaminaLoss(-0.25 * drinker.get_drunk_amount() * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype))
if(drinker.adjustStaminaLoss(-0.5 * drinker.get_drunk_amount() * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype))
return UPDATE_MOB_HEALTH

/datum/reagent/consumable/ethanol/old_timer
Expand Down
6 changes: 3 additions & 3 deletions code/modules/reagents/chemistry/reagents/drug_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
affected_mob.add_mood_event("tweaking", /datum/mood_event/stimulant_medium)
affected_mob.AdjustAllImmobility(-40 * REM * seconds_per_tick)
var/need_mob_update
need_mob_update = affected_mob.adjustStaminaLoss(-2 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
need_mob_update = affected_mob.adjustStaminaLoss(-5 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
affected_mob.set_jitter_if_lower(4 SECONDS * REM * seconds_per_tick)
need_mob_update += affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, rand(1, 4) * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
if(need_mob_update)
Expand Down Expand Up @@ -233,7 +233,7 @@
to_chat(affected_mob, span_notice("[high_message]"))
affected_mob.add_mood_event("salted", /datum/mood_event/stimulant_heavy)
var/need_mob_update
need_mob_update = affected_mob.adjustStaminaLoss(-5 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
need_mob_update = affected_mob.adjustStaminaLoss(-6 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
need_mob_update += affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
affected_mob.adjust_hallucinations(10 SECONDS * REM * seconds_per_tick)
if(need_mob_update)
Expand Down Expand Up @@ -811,7 +811,7 @@
if(!iscarbon(kronkaine_receptacle))
return
var/mob/living/carbon/druggo = kronkaine_receptacle
if(druggo.adjustStaminaLoss(-4 * trans_volume, updating_stamina = FALSE))
if(druggo.adjustStaminaLoss(-6 * trans_volume, updating_stamina = FALSE))
return UPDATE_MOB_HEALTH
//I wish i could give it some kind of bonus when smoked, but we don't have an INHALE method.

Expand Down
21 changes: 15 additions & 6 deletions code/modules/reagents/chemistry/reagents/medicine_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@
affected_mob.set_jitter_if_lower(20 SECONDS)

affected_mob.AdjustAllImmobility(-20 * REM * seconds_per_tick * normalise_creation_purity())
affected_mob.adjustStaminaLoss(-1 * REM * seconds_per_tick * normalise_creation_purity(), updating_stamina = FALSE)
affected_mob.adjustStaminaLoss(-4 * REM * seconds_per_tick * normalise_creation_purity(), updating_stamina = FALSE)

return UPDATE_MOB_HEALTH

Expand Down Expand Up @@ -868,7 +868,7 @@
if(affected_mob.losebreath < 0)
affected_mob.losebreath = 0
need_mob_update = TRUE
need_mob_update += affected_mob.adjustStaminaLoss(-0.5 * REM * seconds_per_tick, updating_stamina = FALSE)
need_mob_update += affected_mob.adjustStaminaLoss(-2 * REM * seconds_per_tick, updating_stamina = FALSE)
if(SPT_PROB(10, seconds_per_tick))
affected_mob.AdjustAllImmobility(-20)
need_mob_update = TRUE
Expand Down Expand Up @@ -1170,7 +1170,7 @@
if(need_mob_update)
. = UPDATE_MOB_HEALTH
affected_mob.AdjustAllImmobility(-60 * REM * seconds_per_tick)
affected_mob.adjustStaminaLoss(-5 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
affected_mob.adjustStaminaLoss(-12 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)

/datum/reagent/medicine/stimulants/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired)
. = ..()
Expand Down Expand Up @@ -1284,14 +1284,14 @@
need_mob_update += affected_mob.adjustFireLoss(-1 * REM * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
need_mob_update += affected_mob.adjustOxyLoss(-0.5 * REM * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
need_mob_update += affected_mob.adjustToxLoss(-0.5 * REM * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
need_mob_update += affected_mob.adjustStaminaLoss(-0.5 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
need_mob_update += affected_mob.adjustStaminaLoss(-2 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
need_mob_update += affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM * seconds_per_tick, 150, affected_organ_flags) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that!
else
need_mob_update = affected_mob.adjustBruteLoss(-5 * REM * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype) //slow to start, but very quick healing once it gets going
need_mob_update += affected_mob.adjustFireLoss(-5 * REM * seconds_per_tick, updating_health = FALSE, required_bodytype = affected_bodytype)
need_mob_update += affected_mob.adjustOxyLoss(-3 * REM * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
need_mob_update += affected_mob.adjustToxLoss(-3 * REM * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
need_mob_update += affected_mob.adjustStaminaLoss(-3 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
need_mob_update += affected_mob.adjustStaminaLoss(-8 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
need_mob_update += affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM * seconds_per_tick, 150, affected_organ_flags)
affected_mob.adjust_jitter_up_to(6 SECONDS * REM * seconds_per_tick, 1 MINUTES)
if(SPT_PROB(5, seconds_per_tick))
Expand Down Expand Up @@ -1379,13 +1379,22 @@
. = ..()
affected_mob.add_traits(list(TRAIT_SLEEPIMMUNE, TRAIT_BATON_RESISTANCE), type)
affected_mob.add_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
RegisterSignal(affected_mob, COMSIG_CARBON_ENTER_STAMCRIT, PROC_REF(on_stamcrit))

/datum/reagent/medicine/changelingadrenaline/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
affected_mob.remove_traits(list(TRAIT_SLEEPIMMUNE, TRAIT_BATON_RESISTANCE), type)
affected_mob.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
affected_mob.remove_status_effect(/datum/status_effect/dizziness)
affected_mob.remove_status_effect(/datum/status_effect/jitter)
UnregisterSignal(affected_mob, COMSIG_CARBON_ENTER_STAMCRIT)

/datum/reagent/medicine/changelingadrenaline/proc/on_stamcrit(mob/living/affected_mob)
SIGNAL_HANDLER
affected_mob?.setStaminaLoss(90, updating_stamina = TRUE)
to_chat(affected_mob, span_changeling("Our gene-stim flares! We are invigorated, but its potency wanes."))
volume -= (min(volume, 1))
return STAMCRIT_CANCELLED

/datum/reagent/medicine/changelingadrenaline/overdose_process(mob/living/metabolizer, seconds_per_tick, times_fired)
. = ..()
Expand Down Expand Up @@ -1468,7 +1477,7 @@
return
overdose_threshold = overdose_threshold + ((rand(-10, 10) / 10) * REM * seconds_per_tick) // for extra fun
metabolizer.AdjustAllImmobility(-5 * REM * seconds_per_tick)
metabolizer.adjustStaminaLoss(-0.5 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
metabolizer.adjustStaminaLoss(-3 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype)
metabolizer.set_jitter_if_lower(1 SECONDS * REM * seconds_per_tick)
metabolization_rate = 0.005 * REAGENTS_METABOLISM * rand(5, 20) // randomizes metabolism between 0.02 and 0.08 per second
return UPDATE_MOB_HEALTH
Expand Down
4 changes: 2 additions & 2 deletions code/modules/reagents/chemistry/reagents/other_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2801,7 +2801,7 @@
var/obj/item/bodypart/wounded_part = W.limb
if(wounded_part)
wounded_part.heal_damage(0.25 * REM * seconds_per_tick, 0.25 * REM * seconds_per_tick)
if(affected_mob.adjustStaminaLoss(-0.25 * REM * seconds_per_tick, updating_stamina = FALSE)) // the more wounds, the more stamina regen
if(affected_mob.adjustStaminaLoss(-1 * REM * seconds_per_tick, updating_stamina = FALSE)) // the more wounds, the more stamina regen
return UPDATE_MOB_HEALTH

// unholy water, but for heretics.
Expand Down Expand Up @@ -2985,7 +2985,7 @@
. = ..()
var/need_mob_update
need_mob_update = kronkus_enjoyer.adjustOrganLoss(ORGAN_SLOT_HEART, 0.1)
need_mob_update += kronkus_enjoyer.adjustStaminaLoss(-2, updating_stamina = FALSE)
need_mob_update += kronkus_enjoyer.adjustStaminaLoss(-6, updating_stamina = FALSE)
if(need_mob_update)
return UPDATE_MOB_HEALTH

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@
if(!isjellyperson(affected_mob)) //everyone but jellypeople get shocked as normal.
return ..()
affected_mob.AdjustAllImmobility(-40 *REM * seconds_per_tick)
if(affected_mob.adjustStaminaLoss(-2 * REM * seconds_per_tick, updating_stamina = FALSE))
if(affected_mob.adjustStaminaLoss(-10 * REM * seconds_per_tick, updating_stamina = FALSE))
. = UPDATE_MOB_HEALTH
if(is_species(affected_mob, /datum/species/jelly/luminescent))
var/mob/living/carbon/human/affected_human = affected_mob
Expand Down

0 comments on commit 3eff499

Please sign in to comment.