Skip to content

Commit

Permalink
Nuts (#2991)
Browse files Browse the repository at this point in the history
* adds nut cracking

* minor tweaks

* newline

* I forgotted to add th the

* add synth + anaesthetised interactions

* minor wording tweaks and a new define

* more defines to pre-empt Golden hitting MY nuts

* grgragghhhh

* Update modular_nova/modules/nut_shot/human.dm

Co-authored-by: Tom <[email protected]>
  • Loading branch information
Steals-The-PRs and tf-4 authored Apr 25, 2024
1 parent 68eebb3 commit f590e82
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/human/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,10 @@ GLOBAL_LIST_EMPTY(features_by_species)
//This does not work against opponents who are knockdown immune, such as from wearing riot armor.
if(!HAS_TRAIT(src, TRAIT_BRAWLING_KNOCKDOWN_BLOCKED))
if((target.stat != DEAD) && prob(limb_accuracy) || (target.stat != DEAD) && staggered && (target.getStaminaLoss() + user.getBruteLoss()) >= 40)
// NOVA EDIT ADD START
if(target.try_nut_shot(user))
return
// NOVA EDIT ADD END
target.visible_message(span_danger("[user] knocks [target] down!"), \
span_userdanger("You're knocked down by [user]!"), span_hear("You hear aggressive shuffling followed by a loud thud!"), COMBAT_MESSAGE_RANGE, user)
to_chat(user, span_danger("You knock [target] down!"))
Expand Down
53 changes: 53 additions & 0 deletions modular_nova/modules/nut_shot/human.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/// How long someone is knocked down for when hit in the balls
#define NUTSHOT_KNOCKDOWN_TIME 1 SECONDS
/// The chance to make someone throw up when you punch them in the balls
#define NUTSHOT_VOMIT_CHANCE 20 // Also requires a knockdown punch, so the impact is a bit lower than it might appear.
/// The amount of damage you take when striking metallic balls
#define NUTSHOT_SELF_DAMAGE 10

// For when you want to hurt a motherfucker
/// Checks to see if it is possible to reach the mob's testicles and influence them through that - i.e. not medicated or unconscious. Knocks down when successful, with a small chance to vomit.
/mob/living/carbon/human/proc/try_nut_shot(mob/living/attacker)
if(stat >= UNCONSCIOUS)
return FALSE
if(!(attacker.zone_selected == BODY_ZONE_PRECISE_GROIN))
return FALSE
if(!has_balls(REQUIRE_GENITAL_EXPOSED))
return FALSE

var/balls_of_steel = issynthetic(src) // Update when we have cybernetic testes. When.
var/is_kick = body_position == LYING_DOWN

if(balls_of_steel) // hitting metal hurts
attacker.apply_damage(
damage = NUTSHOT_SELF_DAMAGE,
def_zone = is_kick ? pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) : pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
)

if(HAS_TRAIT(src, TRAIT_ANALGESIA))
visible_message(
span_info("[attacker] [is_kick ? "kicks" : "punches"] [src] right in the nuts... but they don't react at all! What the hell?"),
span_danger("You [is_kick ? "kick" : "punch"] [src] in the nuts with all your might... but your efforts are for naught as they remain impassive! Inhuman!")
)
return FALSE

// General applied effects
Knockdown(NUTSHOT_KNOCKDOWN_TIME)
var/nauseating = prob(NUTSHOT_VOMIT_CHANCE)
if(nauseating)
vomit(VOMIT_CATEGORY_DEFAULT)

visible_message(
span_danger("[attacker] [is_kick ? "kicks" : "punches"] [src] right in the nuts, causing them to \
[nauseating ? "throw up" : "double over"] in pain! \
[balls_of_steel ? "Who the fuck programmed them to do that?!" : "Fuck!"]"\
),
span_danger("You [is_kick ? "kick" : "punch"] [src] right in the nuts, causing them to \
[nauseating ? "throw up" : "double over"] in pain\
[balls_of_steel ? "... But holy shit it hurts your [is_kick ? "leg" : "hand"]" : "! Fuck"]!"\
),
)

#undef NUTSHOT_VOMIT_CHANCE
#undef NUTSHOT_SELF_DAMAGE
#undef NUTSHOT_KNOCKDOWN_TIME
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7981,6 +7981,7 @@
#include "modular_nova\modules\novaya_ert\code\survival_pack.dm"
#include "modular_nova\modules\novaya_ert\code\toolbox.dm"
#include "modular_nova\modules\novaya_ert\code\uniform.dm"
#include "modular_nova\modules\nut_shot\human.dm"
#include "modular_nova\modules\officestuff\code\officestuff.dm"
#include "modular_nova\modules\oneclickantag\code\oneclickantag.dm"
#include "modular_nova\modules\opposing_force\code\admin_procs.dm"
Expand Down

0 comments on commit f590e82

Please sign in to comment.