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

Ports Tribal Claw (+bugfix) #2212

Merged
merged 14 commits into from
Aug 9, 2024
3 changes: 3 additions & 0 deletions monkestation/code/__DEFINES/martial_arts.dm
ven1883 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//Monkestation exclusive martial arts defines.

#define MARTIALART_TRIBALCLAW "tribal claw"
38 changes: 38 additions & 0 deletions monkestation/code/modules/martial_arts/granters/tribal_claw_gr.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/obj/item/book/granter/martial/tribal_claw
martial = /datum/martial_art/tribal_claw
name = "old scroll"
martial_name = "tribal claw"
desc = "A scroll filled with ancient draconic markings."
greet = "<span class='sciradio'>You have learned the ancient martial art of the Tribal Claw! You are now able to use your tail and claws in a fight much better than before. \
ven1883 marked this conversation as resolved.
Show resolved Hide resolved
Check the combos you are now able to perform using the Recall Teachings verb in the Tribal Claw tab</span>"
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll2"
remarks = list("I must prove myself worthy to the masters of the Knoises clan...",
"Use your tail to surprise any enemy...",
"Your sharp claws can disorient them...",
"I don't think this would combine with other martial arts...",
"Ooga Booga..."
)

/obj/item/book/granter/martial/tribal_claw/on_reading_finished(mob/living/carbon/user)
. = ..()
update_appearance()

/obj/item/book/granter/martial/tribal_claw/update_appearance(updates)
. = ..()
if(uses <= 0)
name = "empty scroll"
desc = "It's completely blank."
icon_state = "blankscroll"
else
name = initial(name)
desc = initial(desc)
icon_state = initial(icon_state)

/obj/item/book/granter/martial/tribal_claw/can_learn(mob/user)
if(!islizard(user))
to_chat(user, "<span class='warning'>You try to read the scroll but can't comprehend any of it.</span>")
return FALSE
else
return TRUE

119 changes: 119 additions & 0 deletions monkestation/code/modules/martial_arts/tribal_claw.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
//ported directly from Bee, cleaned up and updated to function with TG. thanks bee!

#define TAIL_SWEEP_COMBO "DH"
#define FACE_SCRATCH_COMBO "HH"
#define JUGULAR_CUT_COMBO "HD"
#define TAIL_GRAB_COMBO "DDG"

/datum/martial_art/tribal_claw
name = "Tribal Claw"
id = MARTIALART_TRIBALCLAW
allow_temp_override = FALSE
help_verb = /mob/living/carbon/human/proc/tribal_claw_help

/datum/martial_art/tribal_claw/proc/check_streak(mob/living/carbon/human/attacker, mob/living/carbon/human/target)
if(findtext(streak,TAIL_SWEEP_COMBO))
streak = ""
tailSweep(attacker,target)
return TRUE
if(findtext(streak,FACE_SCRATCH_COMBO))
streak = ""
faceScratch(attacker,target)
return TRUE
if(findtext(streak,JUGULAR_CUT_COMBO))
streak = ""
jugularCut(attacker,target)
return TRUE
if(findtext(streak,TAIL_GRAB_COMBO))
streak = ""
tailGrab(attacker,target)
return TRUE
return FALSE

//Tail Sweep, triggers an effect similar to Alien Queen's tail sweep but only affects stuff 1 tile next to you, basically 3x3.
/datum/martial_art/tribal_claw/proc/tailSweep(mob/living/carbon/human/attacker, mob/living/carbon/human/target)
if(attacker == current_target)
return
log_combat(attacker, target, "tail sweeped(Tribal Claw)", name)
target.visible_message("<span class='warning'>[attacker] sweeps [target]'s legs with their tail!</span>", \
"<span class='userdanger'>[attacker] sweeps your legs with their tail!</span>")
var/static/datum/action/cooldown/spell/aoe/repulse/xeno/tail_sweep = new
ven1883 marked this conversation as resolved.
Show resolved Hide resolved
tail_sweep.cast(attacker)

//Face Scratch, deals 10 brute to head(reduced by armor), blurs the target's vision and gives them the confused effect for a short time.
/datum/martial_art/tribal_claw/proc/faceScratch(mob/living/carbon/human/attacker, mob/living/carbon/human/target)
var/def_check = target.getarmor(BODY_ZONE_HEAD, MELEE)
log_combat(attacker, target, "face scratched (Tribal Claw)", name)
target.visible_message("<span class='warning'>[attacker] scratches [target]'s face with their claws!</span>", \
"<span class='userdanger'>[attacker] scratches your face with their claws!</span>")
target.apply_damage(10, BRUTE, BODY_ZONE_HEAD, def_check)
target.adjust_confusion(5 SECONDS)
target.adjust_eye_blur(5 SECONDS)
attacker.do_attack_animation(target, ATTACK_EFFECT_CLAW)
playsound(get_turf(target), 'sound/weapons/slash.ogg', 50, 1, -1)

/*
Jugular Cut, can only be done if the target is in crit, being held in a tier 3 grab by the user or if they are sleeping.
Deals 15 brute to head(reduced by armor) and causes a rapid bleeding effect similar to throat slicing someone with a sharp item.
*/
//LIES!! TG completely FUCKED throat slitting and it's EXTREMELY DIFFICULT to replicate. This absolutely sucked to code.


/datum/martial_art/tribal_claw/proc/jugularCut(mob/living/carbon/attacker, mob/living/carbon/target)
var/def_check = target.getarmor(BODY_ZONE_HEAD, MELEE)
var/wound_type = /datum/wound/slash/flesh/critical
var/obj/item/bodypart/head = target.get_bodypart(BODY_ZONE_HEAD)
var/datum/wound/slash/flesh/jugcut = new wound_type()

if((target.health <= target.crit_threshold || (attacker.pulling == target && attacker.grab_state >= GRAB_NECK) || target.IsSleeping()))
log_combat(attacker, target, "jugular cut (Tribal Claw)", name)
target.visible_message("<span class='warning'>[attacker] cuts [target]'s jugular vein with their claws!</span>", \
"<span class='userdanger'>[attacker] cuts your jugular vein!</span>")
target.apply_damage(15, BRUTE, BODY_ZONE_HEAD, def_check)
jugcut.apply_wound(head)
attacker.do_attack_animation(target, ATTACK_EFFECT_CLAW)
playsound(get_turf(target), 'sound/weapons/slash.ogg', 50, 1, -1)
else
//the original code says that this should be a basic attack instead, but not quite sure I could get that to work without fanangling
return MARTIAL_ATTACK_FAIL


//Tail Grab, instantly puts your target in a T3 grab and makes them unable to talk for a short time.
/datum/martial_art/tribal_claw/proc/tailGrab(mob/living/carbon/human/attacker, mob/living/carbon/human/target)
log_combat(attacker, target, "tail grabbed (Tribal Claw)", name)
target.visible_message("<span class='warning'>[attacker] grabs [target] with their tail!</span>", \
"<span class='userdanger'>[attacker] grabs you with their tail!6</span>")
target.grabbedby(attacker, 1)
target.Knockdown(5) //Without knockdown target still stands up while T3 grabbed.
attacker.setGrabState(GRAB_NECK)
target.adjust_silence_up_to(10 SECONDS, 10 SECONDS)

/datum/martial_art/tribal_claw/harm_act(mob/living/carbon/human/attacker, mob/living/carbon/human/target)
add_to_streak("H",target)
if(check_streak(attacker,target))
return TRUE
return FALSE

/datum/martial_art/tribal_claw/disarm_act(mob/living/carbon/human/attacker, mob/living/carbon/human/target)
add_to_streak("D",target)
if(check_streak(attacker,target))
return TRUE
return FALSE

/datum/martial_art/tribal_claw/grab_act(mob/living/carbon/human/attacker, mob/living/carbon/human/target)
add_to_streak("G",target)
if(check_streak(attacker,target))
return TRUE
return FALSE

/mob/living/carbon/human/proc/tribal_claw_help()
set name = "Recall Teachings"
set desc = "Remember the martial techniques of the Tribal Claw"
set category = "Tribal Claw"

to_chat(usr, "<b><i>You retreat inward and recall the teachings of the Tribal Claw...</i></b>")

to_chat(usr, "<span class='notice'>Tail Sweep</span>: Disarm Harm. Pushes everyone around you away and knocks them down.")
to_chat(usr, "<span class='notice'>Face Scratch</span>: Harm Harm. Damages your target's head and confuses them for a short time.")
to_chat(usr, "<span class='notice'>Jugular Cut</span>: Harm Disarm. Causes your target to rapidly lose blood, works only if you grab your target by their neck, if they are sleeping, or in critical condition.")
to_chat(usr, "<span class='notice'>Tail Grab</span>: Disarm Disarm Grab. Grabs your target by their neck and makes them unable to talk for a short time.")
23 changes: 23 additions & 0 deletions monkestation/code/modules/martial_arts/wounds/wounds.dm
ven1883 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//EXPERIMENTAL DO NOT USE

/*

// Subtype for throat slices
/datum/wound/slash/flesh/critical/artery
name = "Slashed Artery"
desc = "Patient has a slashed artery, causing severe and life-threatening bleeding."
examine_desc = "is ruptured, spraying blood wildly"
initial_flow = 12
minimum_flow = 6

/datum/wound/slash/flesh/critical/artery/update_descriptions()
if(!limb.can_bleed())
occur_text = "is ruptured"

/datum/wound_pregen_data/flesh_slash/avulsion/artery
abstract = FALSE
can_be_randomly_generated = FALSE

wound_path_to_generate = /datum/wound/slash/flesh/critical/artery

*/
10 changes: 8 additions & 2 deletions monkestation/code/modules/uplink/uplink_items/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,23 @@
restricted_species = list(SPECIES_MOTH)
surplus = 0

/datum/uplink_item/race_restricted/monkey_barrel
/datum/uplink_item/species_restricted/monkey_barrel
name = "Angry Monkey Barrel"
desc = "Expert Syndicate Scientists put pissed a couple monkeys off and put them in a barrel. It isn't that complicated, but it's very effective"
cost = 7
item = /obj/item/grenade/monkey_barrel
restricted_species = list(SPECIES_SIMIAN)

/datum/uplink_item/race_restricted/monkey_ball
/datum/uplink_item/species_restricted/monkey_ball
name = "Monkey Ball"
desc = "Stolen experimental MonkeTech designed to bring a monkey's speed to dangerous levels."
cost = 12
item = /obj/vehicle/ridden/monkey_ball
restricted_species = list(SPECIES_SIMIAN)

/datum/uplink_item/species_restricted/tribal_claw_scroll
name = "Silver-Scale Scroll"
desc = "A scroll with ancient heritage. It can teach the user the secrets of Tribal Claw, an offensive martial art reliant on one's claws and tail."
cost = 10
ven1883 marked this conversation as resolved.
Show resolved Hide resolved
item = /obj/item/book/granter/martial/tribal_claw
restricted_species = list(SPECIES_LIZARD)
4 changes: 4 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5713,6 +5713,7 @@
#include "interface\fonts\vcr_osd_mono.dm"
#include "monkestation\code\__DEFINES\_module_defines.dm"
#include "monkestation\code\__DEFINES\antag_defines.dm"
#include "monkestation\code\__DEFINES\martial_arts.dm"
#include "monkestation\code\__DEFINES\projectile.dm"
#include "monkestation\code\__DEFINES\signals.dm"
#include "monkestation\code\__HELPERS\_lists.dm"
Expand Down Expand Up @@ -6568,6 +6569,9 @@
#include "monkestation\code\modules\mapping\access_helpers.dm"
#include "monkestation\code\modules\mapping\mapping_helpers.dm"
#include "monkestation\code\modules\maptext\maptext_image_helper.dm"
#include "monkestation\code\modules\martial_arts\tribal_claw.dm"
#include "monkestation\code\modules\martial_arts\granters\tribal_claw_gr.dm"
#include "monkestation\code\modules\martial_arts\wounds\wounds.dm"
#include "monkestation\code\modules\mech_comp\_interface.dm"
#include "monkestation\code\modules\mech_comp\_message.dm"
#include "monkestation\code\modules\mech_comp\vending_machine.dm"
Expand Down
Loading