From c7ac4f6c0b3cd5d03e4abfad9f1868768aee2abd Mon Sep 17 00:00:00 2001 From: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com> Date: Sun, 9 Apr 2023 19:52:04 -0300 Subject: [PATCH] Electrocution will cause you to blurt out whatever you were typing (#74560) ## About The Pull Request Basically, calls force say on humans that get electrocuted. This also applies to baton hits, although they use a probability check. ## Why It's Good For The Game I just think force_say() is a funny and underutilized feature of tgui say. ## Changelog :cl: add: Being electrocuted will most of the time make you blurt out whatever you were typing. This includes batons. Be careful. /:cl: --- code/game/objects/items/melee/baton.dm | 12 ++++++++++++ .../modules/mob/living/carbon/human/human_defense.dm | 10 ++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/melee/baton.dm b/code/game/objects/items/melee/baton.dm index d333daa0ab1..a599207b03a 100644 --- a/code/game/objects/items/melee/baton.dm +++ b/code/game/objects/items/melee/baton.dm @@ -27,6 +27,8 @@ var/clumsy_knockdown_time = 18 SECONDS /// How much stamina damage we deal on a successful hit against a living, non-cyborg mob. var/stamina_damage = 55 + /// Chance of causing force_say() when stunning a human mob + var/force_say_chance = 33 /// Can we stun cyborgs? var/affect_cyborg = FALSE /// The path of the default sound to play when we stun something. @@ -197,6 +199,10 @@ target.Paralyze((isnull(stun_override) ? stun_time_cyborg : stun_override) * (trait_check ? 0.1 : 1)) additional_effects_cyborg(target, user) else + if(ishuman(target)) + var/mob/living/carbon/human/human_target = target + if(prob(force_say_chance)) + human_target.force_say() target.apply_damage(stamina_damage, STAMINA) if(!trait_check) target.Knockdown((isnull(stun_override) ? knockdown_time : stun_override)) @@ -264,6 +270,10 @@ else playsound(get_turf(src), 'sound/effects/bang.ogg', 10, TRUE) else + //straight up always force say for clumsy humans + if(ishuman(user)) + var/mob/living/carbon/human/human_user = user + human_user.force_say() user.Knockdown(clumsy_knockdown_time) user.apply_damage(stamina_damage, STAMINA) additional_effects_non_cyborg(user, user) // user is the target here @@ -368,6 +378,7 @@ item_flags = NONE force = 5 cooldown = 2.5 SECONDS + force_say_chance = 80 //very high force say chance because it's funny stamina_damage = 85 clumsy_knockdown_time = 24 SECONDS affect_cyborg = TRUE @@ -398,6 +409,7 @@ attack_verb_simple = list("beat") armor_type = /datum/armor/baton_security throwforce = 7 + force_say_chance = 50 stamina_damage = 60 knockdown_time = 5 SECONDS clumsy_knockdown_time = 15 SECONDS diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 23cb0e22f6f..246116acf26 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -485,10 +485,12 @@ //Don't go further if the shock was blocked/too weak. if(!.) return - //Note we both check that the user is in cardiac arrest and can actually heartattack - //If they can't, they're missing their heart and this would runtime - if(undergoing_cardiac_arrest() && can_heartattack() && !(flags & SHOCK_ILLUSION)) - if(shock_damage * siemens_coeff >= 1 && prob(25)) + if(!(flags & SHOCK_ILLUSION)) + if(shock_damage * siemens_coeff >= 5) + force_say() + //Note we both check that the user is in cardiac arrest and can actually heartattack + //If they can't, they're missing their heart and this would runtime + if(undergoing_cardiac_arrest() && can_heartattack() && (shock_damage * siemens_coeff >= 1) && prob(25)) var/obj/item/organ/internal/heart/heart = get_organ_slot(ORGAN_SLOT_HEART) if(heart.Restart() && stat == CONSCIOUS) to_chat(src, span_notice("You feel your heart beating again!"))