reworks staggering effects (#5504)

Co-authored-by: silicons <no@you.cat>
This commit is contained in:
silicons
2023-05-21 23:12:23 +02:00
committed by GitHub
co-authored by silicons
parent feeee0874f
commit 419ce0126a
8 changed files with 83 additions and 38 deletions
@@ -1,18 +0,0 @@
#define MAX_STAGGER_STACKS 30
#define STACKS_TO_SLOWDOWN(amt) (amt * (1 / 3.5))
/datum/status_effect/stacking/staggered
identifier = "staggered"
duration = 1 SECONDS
max_stacks = MAX_STAGGER_STACKS
/datum/status_effect/stacking/staggered/on_stacks(old_stacks, new_stacks, decayed)
. = ..()
if(!new_stacks)
owner.remove_movespeed_modifier(/datum/movespeed_modifier/mob_staggered)
else
owner.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/mob_staggered, multiplicative_slowdown = STACKS_TO_SLOWDOWN(new_stacks))
#undef STACKS_TO_SLOWDOWN
#undef MAX_STAGGER_STACKS