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

[BOUNTY][PORT] Corporate Judo Port #4468

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
fdd0870
include
Coll6 Dec 2, 2024
b767ddc
Ported all Corp Judo abilites except Wheel Throw
Coll6 Dec 3, 2024
a23277a
Ported all media and icons from Paradise.
Coll6 Dec 3, 2024
bc44153
Restricted items close to Paradise settings.
Coll6 Dec 3, 2024
bfd072a
Merge branch 'Monkestation:master' into Corp-Judo
Coll6 Dec 3, 2024
2da4fc0
Merge branch 'Corp-Judo' of https://github.com/Coll6/Monkestation2.0 …
Coll6 Dec 3, 2024
9f8e29d
Ports Armbar debuff to setup for Wheel Throw
Coll6 Dec 3, 2024
7a019db
Wheel Throw ported.
Coll6 Dec 3, 2024
33cf0eb
Ports Wheel throw no batons and armbar effect
Coll6 Dec 4, 2024
087105f
reduce max moves to 6, stage goldblast 7s timer
Coll6 Dec 4, 2024
5b4a0a9
minor fix
Coll6 Dec 4, 2024
1b101bc
oops
Coll6 Dec 4, 2024
d0693ec
Adjusted stamina damage values for MonkeStation
Coll6 Dec 4, 2024
f9b7c38
Merge branch 'Monkestation:master' into Corp-Judo
Coll6 Dec 4, 2024
570c093
Merge branch 'Monkestation:master' into Corp-Judo
Coll6 Dec 22, 2024
03e295b
Merge branch 'Monkestation:master' into Corp-Judo
Coll6 Dec 27, 2024
9829286
Setup for combo change.
Coll6 Dec 27, 2024
3ff670a
Added active grab req for Judo Throw
Coll6 Dec 27, 2024
49c16a9
Flavor text for failed Judo Throw.
Coll6 Dec 27, 2024
5f06c5e
Setup for DMC style comboing (Refresh on combo)
Coll6 Dec 29, 2024
0c26e9e
Merge branch 'Monkestation:master' into Corp-Judo
Coll6 Dec 29, 2024
be55f54
Combo timer resets on combo additions.
Coll6 Dec 29, 2024
5094bfa
Combos now refresh time, removed left over code.
Coll6 Dec 30, 2024
7c1788d
Puts belt in HoS locker, 3 in sectech for 300
Coll6 Dec 30, 2024
379cfad
Merge branch 'Monkestation:master' into Corp-Judo
Coll6 Dec 30, 2024
64d034c
Fix stunharm, lowered timer, belts in sec lockers
Coll6 Jan 2, 2025
03c1f62
Teachings help and GC, base remove returns
Coll6 Jan 2, 2025
f5d0277
Applying comments
Coll6 Jan 2, 2025
51be495
Merge branch 'Monkestation:master' into Corp-Judo
Coll6 Jan 2, 2025
1e3e777
Fix harm bug, makes armbar refresh.
Coll6 Jan 2, 2025
0b0a522
Merge branch 'Monkestation:master' into Corp-Judo
Coll6 Jan 3, 2025
1bb1473
Applying comment. Teachings to_chat performance
Coll6 Jan 3, 2025
0879a68
Merge branch 'master' into Corp-Judo
Coll6 Jan 9, 2025
d614c27
Merge conflict.
Coll6 Jan 9, 2025
b2e4944
Merge branch 'Monkestation:master' into Corp-Judo
Coll6 Jan 12, 2025
4576630
Merge branch 'master' into Corp-Judo
Coll6 Jan 16, 2025
9f16cf4
Merge branch 'Monkestation:master' into Corp-Judo
Coll6 Jan 16, 2025
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
1 change: 1 addition & 0 deletions code/__DEFINES/melee.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define MARTIALART_PSYCHOBRAWL "psychotic brawling"
#define MARTIALART_SLEEPINGCARP "sleeping carp"
#define MARTIALART_WRESTLING "wrestling"
#define MARTIALART_JUDO "corporate judo"

/// The number of hits required to crit a target
#define HITS_TO_CRIT(damage) round(100 / damage, 0.1)
3 changes: 3 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file contains all of the "static" define strings that tie to a trait.

Check failure on line 1 in code/__DEFINES/traits/declarations.dm

View workflow job for this annotation

GitHub Actions / Run Linters

Define Sanity

TRAIT_NO_WEAPONTYPE is defined in code/__DEFINES/traits/declarations.dm but not added to code/_globalvars/traits/_traits.dm!
// WARNING: The sections here actually matter in this file as it's tested by CI. Please do not toy with the sections."

// BEGIN TRAIT DEFINES
Expand Down Expand Up @@ -1279,4 +1279,7 @@
/// Trait applied to objects and mobs that can attack a boulder and break it down. (See /obj/item/boulder/manual_process())
#define TRAIT_BOULDER_BREAKER "boulder_breaker"

///Used to prevent Corpo Judo users from using Baton weapons.
#define TRAIT_NO_WEAPONTYPE "no_weapontype"

// END TRAIT DEFINES
295 changes: 295 additions & 0 deletions code/datums/martial/corporate_judo.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
///
// PORTED FROM PARADISE STATION
///
#define DISCOMBOBULATE "DG"
#define EYE_POKE "HD"
#define JUDO_THROW "GD"
#define ARMBAR "DDG"
#define WHEEL_THROW "GDH"
#define GOLDEN_BLAST1 "EDEGDD"
#define GOLDEN_BLAST2 "GEDDGE"

//Don't know how a human would get a borg/stun but the cyberimp item sets worried me. So just in case.
#define BANNEDTYPES list(/obj/item/melee/baton, /obj/item/borg/stun)

///
// ITEM INFORMATION
///
/obj/item/storage/belt/security/blueshield/corpjudo
name = "\improper Corporate Judo Belt"
desc = "You could learn Judo the hard way, but at NT money can buy you everything."
icon_state = "judobelt"
worn_icon_state = "judo"
inhand_icon_state = "judo"

w_class = WEIGHT_CLASS_BULKY

var/datum/martial_art/corpjudo/style
/obj/item/storage/belt/security/blueshield/corpjudo/PopulateContents()
// Can fill with new /obj/item to fill with items
return

/obj/item/storage/belt/security/blueshield/corpjudo/Initialize(mapload)
. = ..()
style = new /datum/martial_art/corpjudo
atom_storage.max_slots = 3
atom_storage.remove_all()
atom_storage.set_holdable(list(
/obj/item/grenade/flashbang,
/obj/item/grenade/chem_grenade/teargas,
/obj/item/reagent_containers/spray/pepper,
/obj/item/restraints/handcuffs,
/obj/item/assembly/flash/handheld,
/obj/item/food/donut,
/obj/item/flashlight/seclite,
/obj/item/holosign_creator/security,
/obj/item/restraints/legcuffs/bola,
/obj/item/detective_scanner,
/obj/item/clothing/glasses,
/obj/item/clothing/gloves,
/obj/item/citationinator, //monkestation edit
/obj/item/food/spaghetti/security, //monkestation change: tactical belt
/obj/item/radio
))
PopulateContents()

/obj/item/storage/belt/security/blueshield/corpjudo/Destroy()
QDEL_NULL(style)
. = ..()

/obj/item/storage/belt/security/blueshield/corpjudo/equipped(mob/user, slot)
. = ..()
if(ishuman(user))
if(slot & ITEM_SLOT_BELT)
style.teach(user, TRUE)
style.blaststage = 0
ADD_TRAIT(user, TRAIT_NO_WEAPONTYPE, src)

/obj/item/storage/belt/security/blueshield/corpjudo/dropped(mob/user)
. = ..()
if(ishuman(user))
if(user.get_item_by_slot(ITEM_SLOT_BELT) == src)
style.remove(user)
style.blaststage = 0
REMOVE_TRAIT(user, TRAIT_NO_WEAPONTYPE, src)


/mob/living/proc/is_weapon_restricted(mob/living/defender, obj/item/weapon, mob/living/attacker)
if(HAS_TRAIT(attacker, TRAIT_NO_WEAPONTYPE))
for(var/type in BANNEDTYPES)
if(istype(weapon, type))
if(attacker == defender)
to_chat(attacker, "<span class='warning'>Remember, the path of Corporate Judo is strength through balance and increased market share—not the folly of striking yourself with crude implements.</span>")
else
defender.visible_message("<span class='warning'>[attacker] remembers their Sensei's words: &quot;There is a time and place for everything...&quot; WAIT, YOU DON'T HAVE A SENSEI!</span>", \
"<span class='userdanger'>[attacker] freezes before striking, [attacker.p_their()] face giving off a pained expression!</span>")
return TRUE
return FALSE

/mob/living/attackby(obj/item/weapon, mob/living/user)
if(ishuman(user))
if(is_weapon_restricted(src, weapon, user))
return
Coll6 marked this conversation as resolved.
Show resolved Hide resolved
..()

/mob/living/attackby_secondary(obj/item/weapon, mob/living/user)
if(ishuman(user))
if(is_weapon_restricted(src, weapon, user))
return
Coll6 marked this conversation as resolved.
Show resolved Hide resolved
..()
///
// MARTIAL ART STYLE
///
/datum/martial_art/corpjudo
name = "Corporate Judo"
id = MARTIALART_JUDO
display_combos = TRUE
max_streak_length = 6
combo_timer = 7 SECONDS

var/blaststage = 0

/datum/martial_art/corpjudo/teach(mob/living/owner, make_temporary=FALSE)
if(..())
to_chat(owner, span_userdanger("You suddenly feel like you could negotiate with gravity itself... well at least your Boss."))

/datum/martial_art/corpjudo/on_remove(mob/living/owner)
to_chat(owner, span_userdanger("As the belt leaves your waist, the secrets of Judo vanish like quarterly profits."))

///
// MARTIAL ART STYLE: EFFECTS
///
/datum/status_effect/judo_armbar // Used to proc Judo: WHEEL THROW
id = "armbar"
alert_type = /atom/movable/screen/alert/status_effect/judo_armbar
duration = 5 SECONDS
status_type = STATUS_EFFECT_REPLACE

/atom/movable/screen/alert/status_effect/judo_armbar
name = "Armbar Pin"
desc = "Your arm is pinned in an unyielding lock, leaving you unsteady and vulnerable!"
icon_state = "debilitated"

///
// MARTIAL ART STYLE: ABILITIES
///
/datum/martial_art/corpjudo/proc/discombobulate(mob/living/carbon/human/attacker, mob/living/defender)
defender.visible_message("<span class='warning'>[attacker] strikes [defender] in the head with [attacker.p_their()] palm!</span>", \
"<span class='userdanger'>[attacker] strikes you with [attacker.p_their()] palm!</span>")
playsound(get_turf(attacker), 'sound/weapons/slap.ogg', 40, TRUE, -1)
defender.apply_damage(25, STAMINA)
defender.adjust_confusion(5 SECONDS)
log_combat(attacker, defender, "Melee attacked with martial-art [src] : Discombobulate")
return TRUE

/datum/martial_art/corpjudo/proc/eye_poke(mob/living/attacker, mob/living/defender)
defender.visible_message("<span class='warning'>[attacker] jabs [defender] in [attacker.p_their()] eyes!</span>", \
"<span class='userdanger'>[attacker] jabs you in the eyes!</span>")
playsound(get_turf(attacker), 'sound/weapons/whip.ogg', 40, TRUE, -1)
defender.apply_damage(10, BRUTE)
defender.adjust_eye_blur_up_to(5,30)
defender.set_temp_blindness(2 SECONDS)
log_combat(attacker, defender, "Melee attacked with martial-art [src] : Eye Poke")
return TRUE

/datum/martial_art/corpjudo/proc/judothrow(mob/living/carbon/human/attacker, mob/living/defender)
if(!attacker.body_position == STANDING_UP || !defender.body_position == STANDING_UP)
return FALSE
defender.visible_message("<span class='warning'>[attacker] judo throws [defender] to ground!</span>", \
"<span class='userdanger'>[attacker] judo throws you to the ground!</span>")
playsound(get_turf(attacker), 'sound/weapons/slam.ogg', 40, TRUE, -1)
defender.apply_damage(62, STAMINA)
defender.Knockdown(7 SECONDS)
log_combat(attacker, defender, "Melee attacked with martial-art [src] : Judo Throw")
return TRUE

/datum/martial_art/corpjudo/proc/armbar(mob/living/carbon/human/attacker, mob/living/defender)
if(defender.body_position == STANDING_UP)
return FALSE
defender.visible_message("<span class='warning'>[attacker] puts [defender] into an armbar!</span>", \
"<span class='userdanger'>[attacker] wrestles you into an armbar!</span>")
playsound(get_turf(attacker), 'sound/weapons/slashmiss.ogg', 40, TRUE, -1)
if(attacker.body_position == STANDING_UP)
defender.drop_all_held_items()
defender.apply_damage(112, STAMINA)
defender.apply_status_effect(/datum/status_effect/judo_armbar)
defender.Knockdown(5 SECONDS)
log_combat(attacker, defender, "Melee attacked with martial-art [src] : Armbar")
return TRUE

/datum/martial_art/corpjudo/proc/wheel_throw/(mob/living/carbon/human/attacker, mob/living/defender)
if((defender.body_position == STANDING_UP) || !defender.has_status_effect(/datum/status_effect/judo_armbar))
return FALSE
reset_streak() // Don't reset combo unless it met the first requirements.
blaststage = 0
if(attacker.body_position == STANDING_UP)
defender.visible_message("<span class='warning'>[attacker] raises [defender] over [attacker.p_their()] shoulder, and slams [defender.p_them()] into the ground!</span>", \
"<span class='userdanger'>[attacker] throws you over [attacker.p_their()] shoulder, slamming you into the ground!</span>")
playsound(get_turf(attacker), 'sound/magic/tail_swing.ogg', 40, TRUE, -1)
defender.SpinAnimation(10, 1)
else
defender.visible_message("<span class='warning'>[attacker] manages to get a hold onto [defender], and pinning [defender.p_them()] to the ground!</span>", \
"<span class='userdanger'>[attacker] throws you over [attacker.p_their()] shoulder, slamming you into the ground!</span>")
playsound(get_turf(attacker), 'sound/weapons/slam.ogg', 40, TRUE, -1)
defender.apply_damage(250, STAMINA)
defender.Knockdown(15 SECONDS)
defender.set_confusion(10 SECONDS)
log_combat(attacker, defender, "Melee attacked with martial-art [src] : Wheel Throw / Floor Pin")
return TRUE

/datum/martial_art/corpjudo/proc/goldenblast(mob/living/carbon/human/attacker, mob/living/defender)
if(!blaststage)
return
blaststage = 0
defender.visible_message("<span class='warning'>[attacker] blasts [defender] with energy, sending [defender.p_them()] to the ground!</span>", \
"<span class='userdanger'>[attacker] makes strange hand gestures, screams wildly and prods you directly in the chest! You feel the wrath of the GOLDEN BOLT surge through your body! You've been utterly robusted!</span>")
playsound(get_turf(defender), 'sound/weapons/taser.ogg', 55, TRUE, -1)
playsound(get_turf(defender), 'sound/weapons/taserhit.ogg', 55, TRUE, -1)
defender.SpinAnimation(10, 1)
do_sparks(5, FALSE, defender)
attacker.say("GOLDEN BLAST!")
playsound(get_turf(defender), 'sound/weapons/goldenblast.ogg', 60, TRUE, -1)
defender.apply_damage(250, STAMINA)
defender.Knockdown(30 SECONDS)
defender.set_confusion(30 SECONDS)
//says this causes a full stun not sure if that is something wanted.
log_combat(attacker, defender, "Melee attacked with martial-art [src] : Golden Blast")
return TRUE

///
// Combo Adders
///
/datum/martial_art/corpjudo/help_act(mob/living/attacker, mob/living/defender)
if(!can_use(attacker))
return FALSE
add_to_streak("E", defender)
if(check_streak(attacker, defender))
return TRUE

/datum/martial_art/corpjudo/harm_act(mob/living/attacker, mob/living/defender)
var/picked_hit_type = pick("chops", "slices", "strikes")
attacker.do_attack_animation(defender, ATTACK_EFFECT_PUNCH)
defender.apply_damage(10, BRUTE)
playsound(get_turf(defender), 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
defender.visible_message("<span class='danger'>[attacker] [picked_hit_type] [defender]!</span>", \
"<span class='userdanger'>[attacker] [picked_hit_type] you!</span>")
log_combat(attacker, defender, "Melee attacked with [src]")
add_to_streak("H", defender)
if(check_streak(attacker, defender))
return TRUE
return MARTIAL_ATTACK_SUCCESS

/datum/martial_art/corpjudo/disarm_act(mob/living/attacker, mob/living/defender)
if(!can_use(attacker))
return FALSE
add_to_streak("D", defender)

if(check_streak(attacker, defender))
return TRUE

/datum/martial_art/corpjudo/grab_act(mob/living/attacker, mob/living/defender)
if(attacker != defender && can_use(attacker)) // attacker != defender prevents grabbing yourself
add_to_streak("G", defender)
if(check_streak(attacker, defender))
return TRUE

/datum/martial_art/corpjudo/proc/check_streak(mob/living/attacker, mob/living/defender)
to_chat(world, "Do they have armbarpin:[defender.has_status_effect(/datum/status_effect/judo_armbar)], their current combot: [streak]")
if(!can_use(attacker))
return FALSE
if(streak == WHEEL_THROW)
//reset_streak()
return wheel_throw(attacker, defender)
if(streak == DISCOMBOBULATE)
reset_streak()
blaststage = 0
return discombobulate(attacker, defender)
if(streak == EYE_POKE)
reset_streak()
blaststage = 0
return eye_poke(attacker, defender)
if(streak == JUDO_THROW && !defender.has_status_effect(/datum/status_effect/judo_armbar))
reset_streak()
blaststage = 0
return judothrow(attacker, defender)
if(streak == ARMBAR)
reset_streak()
blaststage = 0
return armbar(attacker, defender)
if(streak == GOLDEN_BLAST1)
reset_streak()
blaststage = 1
return TRUE
if(streak == GOLDEN_BLAST2)
reset_streak()
return goldenblast(attacker, defender)
return FALSE

#undef DISCOMBOBULATE
#undef EYE_POKE
#undef JUDO_THROW
#undef ARMBAR
#undef WHEEL_THROW
#undef GOLDEN_BLAST1
#undef GOLDEN_BLAST2
#undef BANNEDTYPES
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.
Binary file added sound/weapons/goldenblast.ogg
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,7 @@
#include "code\datums\mapgen\Cavegens\LavalandGenerator.dm"
#include "code\datums\martial\_martial.dm"
#include "code\datums\martial\boxing.dm"
#include "code\datums\martial\corporate_judo.dm"
#include "code\datums\martial\cqc.dm"
#include "code\datums\martial\hugs_of_the_gondola.dm"
#include "code\datums\martial\krav_maga.dm"
Expand Down
Loading