Skip to content

Commit

Permalink
Adds Corporate Judo, an optional alternative to the stun baton (decon…
Browse files Browse the repository at this point in the history
…flicted edition) (ParadiseSS13#21229)

* Adds Judo, Judo belt, and increased harm damage

* Judo users can no longer use batons (any type)

* Adds Discombobulate combo

* adds Eye-poke combo

* copy-paste related error fixes

* adds throw (knockdown) combo

* adds Armbar and Fatailty Combos

* assorted changes (spelling, args, unneeded checks)

* minor changes to belt item

* updated desc, fixes belt item pathing

* adds 3 belts to secvend

* Adds sprites courtsey AVeryReulctantSpider

* Assorted code cleanup (thx Henri)

* minor grammatical issues

* Adds Judo, Judo belt, and increased harm damage

* Judo users can no longer use batons (any type)

* Adds Discombobulate combo

* adds Eye-poke combo

* copy-paste related error fixes

* adds throw (knockdown) combo

* adds Armbar and Fatailty Combos

* assorted changes (spelling, args, unneeded checks)

* minor changes to belt item

* updated desc, fixes belt item pathing

* adds 3 belts to secvend

* Adds sprites courtsey AVeryReulctantSpider

* Assorted code cleanup (thx Henri)

* minor grammatical issues

* junk commit to re-open PR

* pronoun consistancy

* Lewc review #1

* de-jankification, buffs eye poke

* Reduces harm intent damage from 10 to 7

* descriptions

* lewc name change

* weight class is now bulky

* wheel throw fix, discombob buff (slight)

* Throw buff (Grab > disarm)

* partial lewcc review

* assorted reviews (HIIYAA edition)

* Eyepoke, discombobulate can be done on the ground

* hal second pass review

---------

Co-authored-by: DGamerL <[email protected]>
  • Loading branch information
silverplatedelta and DGamerL authored Jul 30, 2023
1 parent e862b01 commit 9186b7d
Show file tree
Hide file tree
Showing 15 changed files with 162 additions and 2 deletions.
3 changes: 2 additions & 1 deletion code/game/machinery/vendors/departmental_vendors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@
/obj/item/storage/box/evidence = 6,
/obj/item/flashlight/seclite = 4,
/obj/item/restraints/legcuffs/bola/energy = 7,
/obj/item/clothing/mask/muzzle/safety = 4)
/obj/item/clothing/mask/muzzle/safety = 4,
/obj/item/judobelt = 3)
contraband = list(/obj/item/clothing/glasses/sunglasses = 2, /obj/item/storage/fancy/donut_box = 2, /obj/item/hailer = 5)
refill_canister = /obj/item/vending_refill/security
prices = list(/obj/item/reagent_containers/food/snacks/donut = 40,
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/weapons/batons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
* * user - The attacking user
*/
/obj/item/melee/classic_baton/proc/baton_knockdown(mob/living/target, mob/living/user)
if(user.mind?.martial_art?.no_baton)
to_chat(user, user.mind.martial_art.no_baton_reason)
return
if(issilicon(target))
user.visible_message("<span class='danger'>[user] pulses [target]'s sensors with [src]!</span>",\
"<span class='danger'>You pulse [target]'s sensors with [src]!</span>")
Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/items/weapons/stunbaton.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_themselves()] with [src]!</span>",
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
return

if(user.mind?.martial_art?.no_baton)
to_chat(user, user.mind.martial_art.no_baton_reason)
return
if(issilicon(M)) // Can't stunbaton borgs and AIs
return ..()

Expand Down
17 changes: 17 additions & 0 deletions code/modules/martial_arts/combos/judo/armbar.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/datum/martial_combo/judo/armbar
name = "Armbar"
steps = list(MARTIAL_COMBO_STEP_DISARM, MARTIAL_COMBO_STEP_DISARM, MARTIAL_COMBO_STEP_GRAB)
explaination_text = "place an opponent who has been knocked down into an armbar, immobilizing them"
combo_text_override = "Disarm, disarm, grab"

/datum/martial_combo/judo/armbar/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA)
if(!IS_HORIZONTAL(target) || user.IsKnockedDown())
return MARTIAL_COMBO_FAIL
target.visible_message("<span class='warning'>[user] puts [target] into an armbar!</span>", \
"<span class='userdanger'>[user] wrestles you into an armbar!</span>")
playsound(get_turf(user), 'sound/weapons/slashmiss.ogg', 40, TRUE, -1)
target.apply_damage(45, STAMINA)
target.Immobilize(5 SECONDS)
target.KnockDown(5 SECONDS)
add_attack_logs(user, target, "Melee attacked with martial-art [src] : Armbar", ATKLOG_ALL)
return MARTIAL_COMBO_DONE
14 changes: 14 additions & 0 deletions code/modules/martial_arts/combos/judo/discombobulate.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/martial_combo/judo/discombobulate
name = "Discombobulate"
steps = list(MARTIAL_COMBO_STEP_DISARM, MARTIAL_COMBO_STEP_GRAB)
explaination_text = "Deliver a palm strike to your opponents ear, briefly confusing them"
combo_text_override = "Disarm, Grab"

/datum/martial_combo/judo/discombobulate/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA)
target.visible_message("<span class='warning'>[user] strikes [target] in the head with [user.p_their()] palm!</span>", \
"<span class='userdanger'>[user] strikes you with [user.p_their()] palm!</span>")
playsound(get_turf(user), 'sound/weapons/slap.ogg', 40, TRUE, -1)
target.apply_damage(10, STAMINA)
target.AdjustConfused(5 SECONDS)
add_attack_logs(user, target, "Melee attacked with martial-art [src] : Discombobulate", ATKLOG_ALL)
return MARTIAL_COMBO_DONE
15 changes: 15 additions & 0 deletions code/modules/martial_arts/combos/judo/eyepoke.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/datum/martial_combo/judo/eyepoke
name = "Eye Poke"
steps = list(MARTIAL_COMBO_STEP_DISARM, MARTIAL_COMBO_STEP_HARM)
explaination_text = "Jab your opponent in the eye, damaging and blinding them breifly. Opponents with eye protection are still affected."
combo_text_override = "Disarm, Harm"

/datum/martial_combo/judo/eyepoke/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA)
target.visible_message("<span class='warning'>[user] jabs [target] in [user.p_their()] eyes!</span>", \
"<span class='userdanger'>[user] jabs you in the eyes!</span>")
playsound(get_turf(user), 'sound/weapons/whip.ogg', 40, TRUE, -1)
target.apply_damage(10, BRUTE)
target.AdjustEyeBlurry(50, 0, 30 SECONDS)
target.EyeBlind(2 SECONDS)
add_attack_logs(user, target, "Melee attacked with martial-art [src] : Eye Poke", ATKLOG_ALL)
return MARTIAL_COMBO_DONE
15 changes: 15 additions & 0 deletions code/modules/martial_arts/combos/judo/judothrow.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/datum/martial_combo/judo/judothrow
name = "Throw"
steps = list(MARTIAL_COMBO_STEP_GRAB, MARTIAL_COMBO_STEP_DISARM)
explaination_text = "Establish a gripset on your opponent and throw them to the floor, inflicting stamina damage"
combo_text_override = "Grab, Disarm"
/datum/martial_combo/judo/judothrow/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA)
if(user.IsKnockedDown() || IS_HORIZONTAL(target))
return MARTIAL_COMBO_FAIL
target.visible_message("<span class='warning'>[user] judo throws [target] to ground!</span>", \
"<span class='userdanger'>[user] judo throws you to the ground!</span>")
playsound(get_turf(user), 'sound/weapons/slam.ogg', 40, TRUE, -1)
target.apply_damage(25, STAMINA)
target.KnockDown(7 SECONDS)
add_attack_logs(user, target, "Melee attacked with martial-art [src] : Judo Throw", ATKLOG_ALL)
return MARTIAL_COMBO_DONE
18 changes: 18 additions & 0 deletions code/modules/martial_arts/combos/judo/wheelthrow.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/datum/martial_combo/judo/wheelthrow
name = "Wheel Throw"
steps = list(MARTIAL_COMBO_STEP_GRAB, MARTIAL_COMBO_STEP_DISARM, MARTIAL_COMBO_STEP_HARM)
explaination_text = "From an armbar, flip your opponent over your shoulder, slamming them onto the floor, leaving them stunned."
combo_text_override = "Grab, Disarm, Harm"

/datum/martial_combo/judo/wheelthrow/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA)
if(!IS_HORIZONTAL(target) || !target.IsImmobilized())
return MARTIAL_COMBO_FAIL
target.visible_message("<span class='warning'>[user] raises [target] over [user.p_their()] shoulder, and slams [target.p_them()] into the ground!</span>", \
"<span class='userdanger'>[user] throws you over [user.p_their()] shoulder, slamming you into the ground!</span>")
playsound(get_turf(user), 'sound/magic/tail_swing.ogg', 40, TRUE, -1)
target.SpinAnimation(10, 1)
target.apply_damage(200, STAMINA)
target.KnockDown(15 SECONDS)
target.SetConfused(10 SECONDS)
add_attack_logs(user, target, "Melee attacked with martial-art [src] : Wheel Throw", ATKLOG_ALL)
return MARTIAL_COMBO_DONE
65 changes: 65 additions & 0 deletions code/modules/martial_arts/judo.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/datum/martial_art/judo
name = "Corporate Judo"
has_explaination_verb = TRUE
no_baton = TRUE
combos = list(/datum/martial_combo/judo/discombobulate, /datum/martial_combo/judo/eyepoke, /datum/martial_combo/judo/judothrow, /datum/martial_combo/judo/armbar, /datum/martial_combo/judo/wheelthrow)
weight = 5 //takes priority over boxing and drunkneness, less priority than krav or CQC/carp
no_baton_reason = "<span class='warning'>The baton feels off balance in your hand due to your judo training!</span>"

//Corporate Judo Belt

/obj/item/judobelt
name = "\improper Corporate Judo Belt"
desc = "Teaches the wearer NT Corporate Judo."
icon = 'icons/obj/clothing/belts.dmi'
lefthand_file = 'icons/mob/inhands/equipment/belt_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/belt_righthand.dmi'
icon_state = "judobelt"
item_state = "judo"
slot_flags = SLOT_BELT
w_class = WEIGHT_CLASS_BULKY
var/datum/martial_art/judo/style

/obj/item/judobelt/Initialize()
. = ..()
style = new()

/obj/item/judobelt/equipped(mob/user, slot)
if(!ishuman(user))
return
if(slot == slot_belt)
var/mob/living/carbon/human/H = user
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(H, "<span class='warning'>The arts of Corporate Judo echo uselessly in your head, the thought of violence disgusts you!</span>")
return
style.teach(H, 1)
to_chat(H, "<span class='userdanger'>The belt's nanites infuse you with the prowess of a black belt in Corporate Judo!</span>")
to_chat(H, "<span class='danger'>See the martial arts tab for an explanation of combos.</span>")
return

/obj/item/judobelt/dropped(mob/user)
..()
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
if(H.get_item_by_slot(slot_belt) == src)
style.remove(H)
to_chat(user, "<span class='sciradio'>You suddenly forget the arts of Corporate Judo...</span>")

//Increased harm damage
/datum/martial_art/judo/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
MARTIAL_ARTS_ACT_CHECK
var/picked_hit_type = pick("chops", "slices", "strikes")
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
D.apply_damage(7, BRUTE)
playsound(get_turf(D), 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
D.visible_message("<span class='danger'>[A] [picked_hit_type] [D]!</span>", \
"<span class='userdanger'>[A] [picked_hit_type] you!</span>")
add_attack_logs(A, D, "Melee attacked with [src]")
return TRUE

/datum/martial_art/judo/explaination_header(user)
to_chat(user, "<b><i>You recall the teachings of Corporate Judo.</i></b>")

/datum/martial_art/cqc/explaination_footer(user)
to_chat(user, "<b>Your unarmed strikes hit about twice as hard as your peers, on average.</b>")
4 changes: 4 additions & 0 deletions code/modules/martial_arts/martial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@
var/in_stance = FALSE
/// If the martial art allows parrying.
var/can_parry = FALSE
/// Set to TRUE to prevent users of this style from using stun batons (and stunprods)
var/no_baton = FALSE
/// The priority of which martial art is picked from all the ones someone knows, the higher the number, the higher the priority.
var/weight = 0
/// Message displayed when someone uses a baton when its forbidden by a martial art
var/no_baton_reason = "Your martial arts training prevents you from wielding batons."

/datum/martial_art/New()
. = ..()
Expand Down
Binary file modified icons/mob/clothing/belt.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/equipment/belt_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/equipment/belt_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/belts.dmi
Binary file not shown.
6 changes: 6 additions & 0 deletions paradise.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,7 @@
#include "code\modules\martial_arts\plasma_fist.dm"
#include "code\modules\martial_arts\sleeping_carp.dm"
#include "code\modules\martial_arts\wrestling.dm"
#include "code\modules\martial_arts\judo.dm"
#include "code\modules\martial_arts\combos\martial_combo.dm"
#include "code\modules\martial_arts\combos\adminfu\healing_palm.dm"
#include "code\modules\martial_arts\combos\cqc\consecutive.dm"
Expand All @@ -1862,6 +1863,11 @@
#include "code\modules\martial_arts\combos\sleeping_carp\crashing_kick.dm"
#include "code\modules\martial_arts\combos\sleeping_carp\gnashing_teeth.dm"
#include "code\modules\martial_arts\combos\sleeping_carp\keelhaul.dm"
#include "code\modules\martial_arts\combos\judo\discombobulate.dm"
#include "code\modules\martial_arts\combos\judo\eyepoke.dm"
#include "code\modules\martial_arts\combos\judo\judothrow.dm"
#include "code\modules\martial_arts\combos\judo\armbar.dm"
#include "code\modules\martial_arts\combos\judo\wheelthrow.dm"
#include "code\modules\maze_generation\maze_generator.dm"
#include "code\modules\maze_generation\maze_generator_blockwise.dm"
#include "code\modules\maze_generation\maze_helper_atoms.dm"
Expand Down

0 comments on commit 9186b7d

Please sign in to comment.