From dc2d54cea84b8b4a66b8679918e7d6bde9b50ab6 Mon Sep 17 00:00:00 2001 From: BlueHNT <79374236+BlueHNT@users.noreply.github.com> Date: Thu, 21 Sep 2023 23:54:12 +0200 Subject: [PATCH] Ju Jitsu Update [REDO] (#2454) Co-authored-by: Bokkiewokkie <43698041+Bokkiewokkie@users.noreply.github.com> --- code/datums/martial/_martial.dm | 1 + .../code/modules/jobs/security/martial_art.dm | 100 +++++++++++++++--- nsv13/sound/weapons/chokehold.ogg | Bin 0 -> 9954 bytes 3 files changed, 89 insertions(+), 12 deletions(-) create mode 100644 nsv13/sound/weapons/chokehold.ogg diff --git a/code/datums/martial/_martial.dm b/code/datums/martial/_martial.dm index 475936d11cb..31c5cd1472c 100644 --- a/code/datums/martial/_martial.dm +++ b/code/datums/martial/_martial.dm @@ -9,6 +9,7 @@ var/reroute_deflection = FALSE //Delete the bullet, or actually deflect it in some direction? var/block_chance = 0 //Chance to block melee attacks using items while on throw mode. var/restraining = 0 //used in cqc's disarm_act to check if the disarmed is being restrained and so whether they should be put in a chokehold or not + var/armlockstate = 0 //used in jujitsu grab after hand armlock move var/help_verb var/no_guns = FALSE var/allow_temp_override = TRUE //if this martial art can be overridden by temporary martial arts diff --git a/nsv13/code/modules/jobs/security/martial_art.dm b/nsv13/code/modules/jobs/security/martial_art.dm index af918d05cd2..76f88c0170d 100644 --- a/nsv13/code/modules/jobs/security/martial_art.dm +++ b/nsv13/code/modules/jobs/security/martial_art.dm @@ -1,7 +1,7 @@ #define MARTIALART_JUJITSU "ju jitsu" - -#define TAKEDOWN_COMBO "DD" -#define JUDO_THROW "DHHG" +#define TAKEDOWN_COMBO "DG" +#define JUDO_THROW "HHG" +#define ARMLOCKING "DHGG" /obj/item/book/granter/martial/jujitsu martial = /datum/martial_art/jujitsu @@ -37,8 +37,11 @@ set desc = "Remember your police academy martial arts training." set category = "Jujitsu" to_chat(usr, "Combos:") - to_chat(usr, "Disarm, disarm will perform a takedown on the target, if they have been slowed / weakened first") - to_chat(usr, "Disarm, harm, harm, grab will execute a judo throw on the target,landing you on top of them in a pinning position. Provided that you have a grab on them on the final step...") + to_chat(usr, "Disarm, Grab will perform a takedown on the target, if they have been slowed / weakened first") + to_chat(usr, "Harm, Harm, Grab will execute a judo throw on the target,landing you on top of them in a pinning position. Provided that you have a grab on them on the final step...") + to_chat(usr, "Disarm, Harm, Grab, Grab will execute an armlock on the target, throwing you both to the ground. You however have more maneuverability than the perp from this position.") + + to_chat(usr, "In addition, you also have a small window of opportunity to forcefully grab the perp during armlock.") /datum/martial_art/jujitsu/proc/check_streak(mob/living/carbon/human/A, mob/living/carbon/human/D) if(findtext(streak,TAKEDOWN_COMBO)) @@ -49,6 +52,10 @@ streak = "" judo_throw(A,D) return TRUE + if(findtext(streak,ARMLOCKING)) + streak = "" + armlocking(A, D) + return TRUE return FALSE /datum/martial_art/jujitsu/proc/takedown(mob/living/carbon/human/A, mob/living/carbon/human/D) @@ -61,12 +68,15 @@ A.do_attack_animation(D, ATTACK_EFFECT_KICK) D.visible_message("[A] trips [D] up and pins them to the ground!", "[A] is pinning you to the ground!") playsound(get_turf(D), 'nsv13/sound/effects/judo_throw.ogg', 100, TRUE) - D.Paralyze(7 SECONDS) //Equivalent to a clown PDA + D.Paralyze(2 SECONDS) + D.Knockdown(7 SECONDS) A.shake_animation(10) - D.shake_animation(10) + D.shake_animation(20) + D.adjustOxyLoss(10) // you smashed him into the ground A.forceMove(get_turf(D)) - A.start_pulling(D, supress_message = FALSE) - A.setGrabState(GRAB_AGGRESSIVE) + if(A.mobility_flags & MOBILITY_STAND) //Fixes permanent slowdown + A.start_pulling(D, supress_message = FALSE) + A.setGrabState(GRAB_AGGRESSIVE) last_move = world.time /datum/martial_art/jujitsu/proc/judo_throw(mob/living/carbon/human/A, mob/living/carbon/human/D) @@ -81,25 +91,78 @@ target = get_turf(A) D.forceMove(target) A.setDir(newdir) - A.start_pulling(D, supress_message = FALSE) - A.setGrabState(GRAB_AGGRESSIVE) + D.dropItemToGround(D.get_active_held_item()) // yeet + if(A.mobility_flags & MOBILITY_STAND) //Fixes permanent slowdown + A.start_pulling(D, supress_message = FALSE) + A.setGrabState(GRAB_AGGRESSIVE) + D.adjustOxyLoss(40) // YOU THREW HIM, THREW HIM!! D.Paralyze(7 SECONDS) //Equivalent to a clown PDA D.visible_message("[A] throws [D] over their shoulder and pins them down!", "[A] throws you over their shoulder and pins you to the ground!") playsound(get_turf(D), 'nsv13/sound/effects/judo_throw.ogg', 100, TRUE) last_move = world.time +// Armlock state removal after 5s +/datum/martial_art/jujitsu/proc/drop_armlocking() + armlockstate = FALSE + +// Armlock +/datum/martial_art/jujitsu/proc/armlocking(mob/living/carbon/human/A, mob/living/carbon/human/D) + if(!can_use(A)) + return FALSE + if(world.time < last_move+cooldown) + to_chat(A, "You're too fatigued to perform this move right now...") + return FALSE + if(!D.stat) + D.visible_message("[A] locks [D] into a armlock position!", \ + "[A] locks you into a armlock position!") + A.Knockdown(20) // knockdown officer with the perp + A.adjustStaminaLoss(15) + D.adjustStaminaLoss(30) + D.Paralyze(70) + D.shake_animation(50) + A.start_pulling(D, supress_message = FALSE) + armlockstate = TRUE + addtimer(CALLBACK(src, PROC_REF(drop_armlocking)), 50, TIMER_UNIQUE) // you get 3 seconds after standing up to grab the perp + A.do_attack_animation(D, ATTACK_EFFECT_DISARM) + playsound(get_turf(D), 'nsv13/sound/effects/judo_throw.ogg', 100, TRUE) + last_move = world.time + return TRUE + /datum/martial_art/jujitsu/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D) if(!can_use(A)) return FALSE if(A==D) return FALSE //prevents grabbing yourself - if(A.a_intent == INTENT_GRAB) + if(A.a_intent == INTENT_GRAB && A.mobility_flags & MOBILITY_STAND) //Fixes permanent slowdown and missfire + if(armlockstate == TRUE) // neck grabs if armlocked + A.setGrabState(GRAB_NECK) + D.visible_message("[A] grabs [D] from the armlock position by the neck!", \ + "[A] grabs you from the armlock position by the neck!") + armlockstate = FALSE add_to_streak("G",D) if(check_streak(A,D)) //doing combos is prioritized over upgrading grabs return TRUE return FALSE /datum/martial_art/jujitsu/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) + var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected)) + var/def_check = D.getarmor(BODY_ZONE_CHEST, "melee") + var/bonus_damage = 0 + if((armlockstate == TRUE)) // disable chosen arm temporarily when armlocked + if(A.zone_selected == BODY_ZONE_L_ARM) + D.apply_damage(100, STAMINA, BODY_ZONE_L_ARM, def_check) + D.visible_message("[A] has cracked [D]'s arm!", "[A] cracks your arm, causing a coursing pain!") + armlockstate = FALSE + if(A.zone_selected == BODY_ZONE_R_ARM) + D.apply_damage(100, STAMINA, BODY_ZONE_R_ARM, def_check) + D.visible_message("[A] has cracked [D]'s arm!", "[A] cracks your arm, causing a coursing pain!") + armlockstate = FALSE + return FALSE + if((A.grab_state >= GRAB_AGGRESSIVE)) + bonus_damage += 5 + D.apply_damage(rand(2,3) + bonus_damage, A.dna.species.attack_type, affecting, def_check) // bonus damage when grabbing at least aggressively if required to kill + if((D.mobility_flags & MOBILITY_STAND)) + A.do_attack_animation(D, ATTACK_EFFECT_PUNCH) // makes punch be default if he's standing if(!can_use(A)) return FALSE add_to_streak("H",D) @@ -108,6 +171,19 @@ return FALSE /datum/martial_art/jujitsu/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) + var/bonus_stam = 0 + if((A.grab_state >= GRAB_AGGRESSIVE)) // If you shove during agressive grab it deals bonus stam + bonus_stam = 20 + if(!(D.mobility_flags & MOBILITY_STAND)) // If you shove while perp is on ground and aggressive grabbing, it deals even more stam + bonus_stam += 10 + D.adjustStaminaLoss(10 + bonus_stam) // deals minor stam damage with scaling dependant on grab and perp standing + A.do_attack_animation(D, ATTACK_EFFECT_DISARM) + if(A.pulling == D && A.grab_state >= GRAB_NECK) // LV3 hold minimum + D.visible_message("[A] puts [D] into a chokehold!", \ + "[A] puts you into a chokehold!") + playsound(get_turf(D), 'nsv13/sound/weapons/chokehold.ogg', 50, 1, 1) + D.SetSleeping(200) + return FALSE if(!can_use(A)) return FALSE add_to_streak("D",D) diff --git a/nsv13/sound/weapons/chokehold.ogg b/nsv13/sound/weapons/chokehold.ogg new file mode 100644 index 0000000000000000000000000000000000000000..43e0db0741f5c20d1f69ef94ef964a6a882becd8 GIT binary patch literal 9954 zcmeHsX;hQR)@}t534;a*3K%p%7=nNS!zkE*VG4vHB*-8t0U8ns%48$m+7Xb3Fp7X} z1P&ks2n2y
)c;=-CC8ZdUx$z!&6ne
z_OAFwM+X2I@HO;zdnX}9YnPqHsP(A*dlOjfM1&wiX+kmpcpa#v{0zz$k^EOcB$1kH
zp_ezPeKGs;pJAo!a#Jdh!#jNcw^p|1HrD1AB$5Io5aBN(Au2qHy*F-G5}O<4Xi2i%
zY)0B_W?{#$u(h`&+gp;%NlPI_88XL)$3-WHM@Km($3=R<@0jqo$k?caU2)-1)-%8t
zPm79VhvUCx$424zCG3q%j);oHvku_h_wJ2`B+s}AbNn`>LrC5mXOAas-eh673F*{)
z4Qy_IR9xiVgk9`N$52w(zak#iM8!qyjf_fggj0xsQ?S@fM&^KzWwVy2hk-oYa1In^
zCBQK`a`%xfS0glb9Hi}!N=SrLbR=m*Qp8^FJ~(4mY}7Juq9Z$TFBcI&typf%z-3z?
z3OE5kNYpfOt4&;!fzfvH)0)D$+}ZO?%f(wY4QJ^cdeb1WP`9SiB`ehU@IWCGAOb%*
zr(iSq&I-C2297~R=|+yQlw}8LY=nk!`Dfy47XxdZ6?8JDNVdx9f7rgmWw_b}VIXY=
zpRwBIj3B+q4l)z0Jp9t-?PhQpy{5+ev_8_AH5qbN#<^*~ldj!MS8~Y`q