Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nerfs stuns on being shocked #18389

Merged
merged 1 commit into from
Jul 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
if(shockCooldown > world.time)
return FALSE //Already shocked someone recently?
if(..())
shockCooldown = world.time + 10
shockCooldown = world.time + 2 SECONDS
return TRUE
else
return FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/grille.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
var/grille_type
var/broken_type = /obj/structure/grille/broken
var/shockcooldown = 0
var/my_shockcooldown = 1 SECONDS
var/my_shockcooldown = 2 SECONDS

/obj/structure/grille/detailed_examine()
return "A powered and knotted wire underneath this will cause the grille to shock anyone not wearing insulated gloves.<br>\
Expand Down
8 changes: 4 additions & 4 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,18 @@
//Stun
var/should_stun = (!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && !(flags & SHOCK_NOSTUN)
if(should_stun)
Stun(4 SECONDS)
Stun(1 SECONDS)
//Jitter and other fluff.
AdjustJitter(2000 SECONDS)
AdjustStuttering(4 SECONDS)
addtimer(CALLBACK(src, .proc/secondary_shock, should_stun), 2 SECONDS)
addtimer(CALLBACK(src, .proc/secondary_shock, should_stun), 1 SECONDS)
return shock_damage

///Called slightly after electrocute act to reduce jittering and apply a secondary stun.
///Called slightly after electrocute act to reduce jittering and apply a secondary knockdown.
/mob/living/carbon/proc/secondary_shock(should_stun)
AdjustJitter(-2000 SECONDS, bound_lower = 20 SECONDS) //Still jittery, but vastly less
if(should_stun)
Weaken(6 SECONDS)
KnockDown(6 SECONDS)

/mob/living/carbon/swap_hand()
var/obj/item/item_in_hand = get_active_hand()
Expand Down