mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-29 10:31:34 +00:00
## About The Pull Request After being put in stamcrit, future incoming stamina damage has "diminishing returns" applied*. The formula looks like `ceil(sqrt(amount of stamina damage) / 2) - times you have taken stamina damage in stamcrit`. This means eventually stamina based damage will do less than zero damage, and thus, not contribute to keeping stamcrit active. Very, very low amounts of stamina damage (such as from chems) contribute to DR 1/20th the amount. *_Note, this is not real diminishing returns because making it real diminishing returns would be pointless, you are capped to 120 stamina damage so 99.99% of the time you take stam damage while in stam crit you're already capped. This is just faking the effect._ In its current stat this means that a stun baton will stop being able to keep someone in stamcrit after the 5th hit, and a stock disabler will stop being able to keep someone in stamcrit after the 4th hit. ## Why It's Good For The Game Mostly just an experiment. I don't imagine it will shake up much about the baton situation in its current state. There's also no grace period after getting UP - so like you can just be stamcritted right after anyways. Maybe there should be one? Food for thought. And yes of course you can just space out your hits, you're not clever for thinking about that ## Changelog 🆑 Melbert balance: Taking stamina damage in stamcrit has diminishing returns associated, meaning you cannot be infinitely stamcrit. /🆑
25 lines
1.1 KiB
Plaintext
25 lines
1.1 KiB
Plaintext
/// Tests 100 stamina damage = stamcrit
|
|
/datum/unit_test/stamcrit
|
|
priority = TEST_LONGER
|
|
|
|
/datum/unit_test/stamcrit/Run()
|
|
var/mob/living/carbon/human/consistent/tider = allocate(__IMPLIED_TYPE__)
|
|
tider.stamina_regen_time = 0.2 SECONDS
|
|
tider.adjustStaminaLoss(99)
|
|
TEST_ASSERT(!tider.has_status_effect(/datum/status_effect/incapacitating/stamcrit), "Stamcrit should not be applied at 99 stamina damage")
|
|
tider.adjustStaminaLoss(1)
|
|
TEST_ASSERT(tider.has_status_effect(/datum/status_effect/incapacitating/stamcrit), "Stamcrit should be applied at 100 stamina damage")
|
|
sleep(tider.stamina_regen_time * 2)
|
|
TEST_ASSERT(!tider.has_status_effect(/datum/status_effect/incapacitating/stamcrit), "Stamcrit should be removed after regen time")
|
|
|
|
/// Tests stamina regen after the set time
|
|
/datum/unit_test/stam_regen
|
|
priority = TEST_LONGER
|
|
|
|
/datum/unit_test/stam_regen/Run()
|
|
var/mob/living/carbon/human/consistent/tider = allocate(__IMPLIED_TYPE__)
|
|
tider.stamina_regen_time = 0.2 SECONDS
|
|
tider.adjustStaminaLoss(50)
|
|
sleep(tider.stamina_regen_time * 2)
|
|
TEST_ASSERT_EQUAL(tider.getStaminaLoss(), 0, "Stamina should be fully regenerated after regen time")
|