diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 10ee68c1104..a566c5148bb 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -849,11 +849,11 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/stealthy_weapons/martialarts name = "Martial Arts Scroll" desc = "This scroll contains the secrets of an ancient martial arts technique. You will master unarmed combat, \ - deflecting all ranged weapon fire, but you also refuse to use dishonorable ranged weaponry. \ + deflecting ranged weapon fire when you are in a defensive stance (throw mode). Learning this art means you will also refuse to use dishonorable ranged weaponry. \ Unable to be understood by vampire and changeling agents." reference = "SCS" item = /obj/item/sleeping_carp_scroll - cost = 17 + cost = 13 excludefrom = list(/datum/game_mode/nuclear) refundable = TRUE cant_discount = TRUE diff --git a/code/modules/martial_arts/combos/sleeping_carp/back_kick.dm b/code/modules/martial_arts/combos/sleeping_carp/back_kick.dm deleted file mode 100644 index 3ebaa191e23..00000000000 --- a/code/modules/martial_arts/combos/sleeping_carp/back_kick.dm +++ /dev/null @@ -1,18 +0,0 @@ -/datum/martial_combo/sleeping_carp/back_kick - name = "Back Kick" - steps = list(MARTIAL_COMBO_STEP_HARM, MARTIAL_COMBO_STEP_GRAB) - explaination_text = "Opponent must be facing away. Knocks down." - -/datum/martial_combo/sleeping_carp/back_kick/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA) - if(user.dir == target.dir && !target.stat && !target.IsWeakened()) - user.do_attack_animation(target, ATTACK_EFFECT_KICK) - target.visible_message("[user] kicks [target] in the back!", \ - "[user] kicks you in the back, making you stumble and fall!") - step_to(target,get_step(target,target.dir),1) - target.Weaken(4) - playsound(get_turf(target), 'sound/weapons/punch1.ogg', 50, 1, -1) - add_attack_logs(user, target, "Melee attacked with martial-art [src] : Back Kick", ATKLOG_ALL) - if(prob(80)) - user.say(pick("SURRPRIZU!","BACK STRIKE!","WOPAH!", "WATAAH", "ZOTA!", "Never turn your back to the enemy!")) - return MARTIAL_COMBO_DONE - return MARTIAL_COMBO_DONE_BASIC_HIT diff --git a/code/modules/martial_arts/combos/sleeping_carp/crashing_kick.dm b/code/modules/martial_arts/combos/sleeping_carp/crashing_kick.dm new file mode 100644 index 00000000000..ad2f48f416b --- /dev/null +++ b/code/modules/martial_arts/combos/sleeping_carp/crashing_kick.dm @@ -0,0 +1,17 @@ +/datum/martial_combo/sleeping_carp/crashing_kick + name = "Crashing Waves Kick" + steps = list(MARTIAL_COMBO_STEP_HARM, MARTIAL_COMBO_STEP_DISARM) + explaination_text = "Kicks the target square in the chest, sending them flying." + +/datum/martial_combo/sleeping_carp/crashing_kick/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA) + if(target != user) // no you cannot kick yourself across rooms + user.do_attack_animation(target, ATTACK_EFFECT_KICK) + target.visible_message("[user] kicks [target] square in the chest, sending them flying!", + "You are kicked square in the chest by [user], sending you flying!") + playsound(target, 'sound/effects/hit_kick.ogg', 50, TRUE, -1) + var/atom/throw_target = get_edge_target_turf(target, user.dir) + target.throw_at(throw_target, 7, 14, user) + target.apply_damage(15, BRUTE, BODY_ZONE_CHEST) + add_attack_logs(user, target, "Melee attacked with martial-art [MA] : Crashing Waves Kick", ATKLOG_ALL) + return MARTIAL_COMBO_DONE + return MARTIAL_COMBO_DONE_BASIC_HIT diff --git a/code/modules/martial_arts/combos/sleeping_carp/elbow_drop.dm b/code/modules/martial_arts/combos/sleeping_carp/elbow_drop.dm deleted file mode 100644 index 61dc8759f39..00000000000 --- a/code/modules/martial_arts/combos/sleeping_carp/elbow_drop.dm +++ /dev/null @@ -1,19 +0,0 @@ -/datum/martial_combo/sleeping_carp/elbow_drop - name = "Elbow Drop" - steps = list(MARTIAL_COMBO_STEP_HARM, MARTIAL_COMBO_STEP_DISARM, MARTIAL_COMBO_STEP_HARM, MARTIAL_COMBO_STEP_DISARM, MARTIAL_COMBO_STEP_HARM) - explaination_text = "Opponent must be on the ground. Deals huge damage, instantly kills anyone in critical condition." - -/datum/martial_combo/sleeping_carp/elbow_drop/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA) - if(target.IsWeakened() || target.resting || target.stat) - user.do_attack_animation(target, ATTACK_EFFECT_PUNCH) - target.visible_message("[user] elbow drops [target]!", \ - "[user] piledrives you with [user.p_their()] elbow!") - if(target.health <= 0) //so it actually checks for crit now - target.death() //FINISH HIM! - target.apply_damage(50, BRUTE, "chest") - playsound(get_turf(target), 'sound/weapons/punch1.ogg', 75, 1, -1) - add_attack_logs(user, target, "Melee attacked with martial-art [src] : Elbow Drop", ATKLOG_ALL) - if(prob(80)) - user.say(pick("BANZAIII!", "KIYAAAA!", "OMAE WA MOU SHINDEIRU!", "YOU CAN'T SEE ME!", "MY TIME IS NOW!", "COWABUNGA")) - return MARTIAL_COMBO_DONE - return MARTIAL_COMBO_DONE_BASIC_HIT diff --git a/code/modules/martial_arts/combos/sleeping_carp/gnashing_teeth.dm b/code/modules/martial_arts/combos/sleeping_carp/gnashing_teeth.dm new file mode 100644 index 00000000000..79abc4b2e40 --- /dev/null +++ b/code/modules/martial_arts/combos/sleeping_carp/gnashing_teeth.dm @@ -0,0 +1,18 @@ +/datum/martial_combo/sleeping_carp/gnashing_teeth + name = "Gnashing Teeth" + steps = list(MARTIAL_COMBO_STEP_HARM, MARTIAL_COMBO_STEP_HARM) + explaination_text = "Every second consecutive punch deals extra damage, and you will shout to strike fear into your opponent's heart." + +/datum/martial_combo/sleeping_carp/gnashing_teeth/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA) + user.do_attack_animation(target, ATTACK_EFFECT_PUNCH) + var/atk_verb = pick("precisely kicks", "brutally chops", "cleanly hits", "viciously slams") + target.visible_message("[user] [atk_verb] [target]!", + "[user] [atk_verb] you!") + playsound(get_turf(target), 'sound/weapons/punch1.ogg', 25, TRUE, -1) + add_attack_logs(user, target, "Melee attacked with martial-art [MA] : Gnashing Teeth", ATKLOG_ALL) + target.apply_damage(20, BRUTE, user.zone_selected) + if(target.health >= 0) + user.say(pick("HUAH!", "HYA!", "CHOO!", "WUO!", "KYA!", "HUH!", "HIYOH!", "CARP STRIKE!", "CARP BITE!")) + else + user.say(pick("BANZAIII!", "KIYAAAA!", "OMAE WA MOU SHINDEIRU!", "YOU CAN'T SEE ME!", "MY TIME IS NOW!", "COWABUNGA!")) // COWABUNGA + return MARTIAL_COMBO_DONE diff --git a/code/modules/martial_arts/combos/sleeping_carp/head_kick.dm b/code/modules/martial_arts/combos/sleeping_carp/head_kick.dm deleted file mode 100644 index b45e10e73ce..00000000000 --- a/code/modules/martial_arts/combos/sleeping_carp/head_kick.dm +++ /dev/null @@ -1,19 +0,0 @@ -/datum/martial_combo/sleeping_carp/head_kick - name = "Head Kick" - steps = list(MARTIAL_COMBO_STEP_DISARM, MARTIAL_COMBO_STEP_HARM, MARTIAL_COMBO_STEP_HARM) - explaination_text = "Decent damage, forces opponent to drop item in hand." - -/datum/martial_combo/sleeping_carp/head_kick/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA) - if(!target.stat && !target.IsWeakened()) - user.do_attack_animation(target, ATTACK_EFFECT_KICK) - target.visible_message("[user] kicks [target] in the head!", \ - "[user] kicks you in the jaw!") - target.apply_damage(20, BRUTE, "head") - target.drop_item() - playsound(get_turf(target), 'sound/weapons/punch1.ogg', 50, 1, -1) - add_attack_logs(user, target, "Melee attacked with martial-art [src] : Head Kick", ATKLOG_ALL) - if(prob(60)) - user.say(pick("OOHYOO!", "OOPYAH!", "HYOOAA!", "WOOAAA!", "SHURYUKICK!", "HIYAH!")) - target.Stun(4) - return MARTIAL_COMBO_DONE - return MARTIAL_COMBO_DONE_BASIC_HIT diff --git a/code/modules/martial_arts/combos/sleeping_carp/keelhaul.dm b/code/modules/martial_arts/combos/sleeping_carp/keelhaul.dm new file mode 100644 index 00000000000..1deabdd2d15 --- /dev/null +++ b/code/modules/martial_arts/combos/sleeping_carp/keelhaul.dm @@ -0,0 +1,20 @@ +/datum/martial_combo/sleeping_carp/keelhaul + name = "Keelhaul" + steps = list(MARTIAL_COMBO_STEP_HARM, MARTIAL_COMBO_STEP_GRAB) + explaination_text = "Kicks an opponent to the floor, knocking them down and dealing stamina damage to them!" + +/datum/martial_combo/sleeping_carp/keelhaul/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA) + user.do_attack_animation(target, ATTACK_EFFECT_KICK) + playsound(get_turf(target), 'sound/effects/hit_kick.ogg', 50, TRUE, -1) + if(!target.IsWeakened() && !target.resting && !target.stat) + target.apply_damage(10, BRUTE, BODY_ZONE_HEAD) + target.Weaken(2) + target.visible_message("[user] kicks [target] in the head, sending them face first into the floor!", + "You are kicked in the head by [user], sending you crashing to the floor!") + else + target.apply_damage(5, BRUTE, BODY_ZONE_HEAD) + target.visible_message("[user] kicks [target] in the head, leaving them reeling in pain!", + "You are kicked in the head by [user], and you reel in pain!") + target.apply_damage(40, STAMINA) + add_attack_logs(user, target, "Melee attacked with martial-art [MA] : Keelhaul", ATKLOG_ALL) + return MARTIAL_COMBO_DONE diff --git a/code/modules/martial_arts/combos/sleeping_carp/stomach_knee.dm b/code/modules/martial_arts/combos/sleeping_carp/stomach_knee.dm deleted file mode 100644 index 312e575003d..00000000000 --- a/code/modules/martial_arts/combos/sleeping_carp/stomach_knee.dm +++ /dev/null @@ -1,20 +0,0 @@ -/datum/martial_combo/sleeping_carp/stomach_knee - name = "Stomach Knee" - steps = list(MARTIAL_COMBO_STEP_GRAB, MARTIAL_COMBO_STEP_HARM) - explaination_text = "Knocks the wind out of opponent and stuns." - combo_text_override = "Grab, switch hands, Harm" - -/datum/martial_combo/sleeping_carp/stomach_knee/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA) - if(!target.stat && !target.IsWeakened()) - user.do_attack_animation(target, ATTACK_EFFECT_KICK) - target.visible_message("[user] knees [target] in the stomach!", \ - "[user] winds you with a knee in the stomach!") - target.audible_message("[target] gags!") - target.AdjustLoseBreath(3) - target.Stun(2) - playsound(get_turf(target), 'sound/weapons/punch1.ogg', 50, 1, -1) - add_attack_logs(user, target, "Melee attacked with martial-art [src] : Stomach Knee", ATKLOG_ALL) - if(prob(80)) - user.say(pick("HWOP!", "KUH!", "YAKUUH!", "KYUH!", "KNEESTRIKE!")) - return MARTIAL_COMBO_DONE - return MARTIAL_COMBO_DONE_BASIC_HIT diff --git a/code/modules/martial_arts/combos/sleeping_carp/wrist_wrench.dm b/code/modules/martial_arts/combos/sleeping_carp/wrist_wrench.dm deleted file mode 100644 index 38c21e7309e..00000000000 --- a/code/modules/martial_arts/combos/sleeping_carp/wrist_wrench.dm +++ /dev/null @@ -1,20 +0,0 @@ -/datum/martial_combo/sleeping_carp/wrist_wrench - name = "Wrist Wrench" - steps = list(MARTIAL_COMBO_STEP_DISARM, MARTIAL_COMBO_STEP_DISARM) - explaination_text = "Forces opponent to drop item in hand." - -/datum/martial_combo/sleeping_carp/wrist_wrench/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA) - if(!target.stat && !target.stunned && !target.IsWeakened()) - user.do_attack_animation(target, ATTACK_EFFECT_PUNCH) - target.visible_message("[user] grabs [target]'s wrist and wrenches it sideways!", \ - "[user] grabs your wrist and violently wrenches it to the side!") - playsound(get_turf(user), 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - add_attack_logs(user, target, "Melee attacked with martial-art [src] : Wrist Wrench", ATKLOG_ALL) - if(prob(60)) - user.say(pick("WRISTY TWIRLY!", "WE FIGHT LIKE MEN!", "YOU DISHONOR YOURSELF!", "POHYAH!", "WHERE IS YOUR BATON NOW?", "SAY UNCLE!")) - target.emote("scream") - target.drop_item() - target.apply_damage(5, BRUTE, pick("l_arm", "r_arm")) - target.Stun(3) - return MARTIAL_COMBO_DONE - return MARTIAL_COMBO_DONE_BASIC_HIT diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 15f4b7ac837..c43f745d4cb 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -6,19 +6,31 @@ var/streak = "" var/max_streak_length = 6 var/temporary = FALSE - var/datum/martial_art/base = null // The permanent style - var/deflection_chance = 0 //Chance to deflect projectiles - var/block_chance = 0 //Chance to block melee attacks using items while on throw mode. + /// The permanent style. + var/datum/martial_art/base = null + /// Chance to deflect projectiles while on throw mode. + var/deflection_chance = 0 + /// Can it reflect projectiles in a random direction? + var/reroute_deflection = FALSE + ///Chance to block melee attacks using items while on throw mode. + var/block_chance = 0 var/help_verb = null - var/no_guns = FALSE //set to TRUE to prevent users of this style from using guns (sleeping carp, highlander). They can still pick them up, but not fire them. - var/no_guns_message = "" //message to tell the style user if they try and use a gun while no_guns = TRUE (DISHONORABRU!) + /// Set to TRUE to prevent users of this style from using guns (sleeping carp, highlander). They can still pick them up, but not fire them. + var/no_guns = FALSE + /// Message to tell the style user if they try and use a gun while no_guns = TRUE (DISHONORABRU!) + var/no_guns_message = "" - var/has_explaination_verb = FALSE // If the martial art has it's own explaination verb + /// If the martial art has it's own explaination verb. + var/has_explaination_verb = FALSE - var/list/combos = list() // What combos can the user do? List of combo types - var/list/datum/martial_art/current_combos = list() // What combos are currently (possibly) being performed - var/last_hit = 0 // When the last hit happened - var/in_stance = FALSE // If the user is preparing a martial arts stance + /// What combos can the user do? List of combo types. + var/list/combos = list() + /// What combos are currently (possibly) being performed. + var/list/datum/martial_art/current_combos = list() + /// When the last hit happened. + var/last_hit = 0 + /// If the user is preparing a martial arts stance. + var/in_stance = FALSE /datum/martial_art/New() . = ..() @@ -177,6 +189,9 @@ /datum/martial_art/proc/explaination_footer(user) return +/datum/martial_art/proc/try_deflect(mob/user) + return prob(deflection_chance) + //ITEMS /obj/item/clothing/gloves/boxing @@ -258,12 +273,6 @@ to_chat(user, "Your blood lust distracts you too much to be able to concentrate on the contents of the scroll!") return - to_chat(user, "You have learned the ancient martial art of the Sleeping Carp! \ - Your hand-to-hand combat has become much more effective, and you are now able to deflect any projectiles directed toward you. \ - However, you are also unable to use any ranged weaponry. \ - You can learn more about your newfound art by using the Recall Teachings verb in the Sleeping Carp tab.") - - var/datum/martial_art/the_sleeping_carp/theSleepingCarp = new(null) theSleepingCarp.teach(user) user.drop_item() diff --git a/code/modules/martial_arts/sleeping_carp.dm b/code/modules/martial_arts/sleeping_carp.dm index faded5e7fec..bc6f15301d5 100644 --- a/code/modules/martial_arts/sleeping_carp.dm +++ b/code/modules/martial_arts/sleeping_carp.dm @@ -2,10 +2,11 @@ /datum/martial_art/the_sleeping_carp name = "The Sleeping Carp" deflection_chance = 100 + reroute_deflection = TRUE no_guns = TRUE no_guns_message = "Use of ranged weaponry would bring dishonor to the clan." has_explaination_verb = TRUE - combos = list(/datum/martial_combo/sleeping_carp/wrist_wrench, /datum/martial_combo/sleeping_carp/back_kick, /datum/martial_combo/sleeping_carp/stomach_knee, /datum/martial_combo/sleeping_carp/head_kick, /datum/martial_combo/sleeping_carp/elbow_drop) + combos = list(/datum/martial_combo/sleeping_carp/crashing_kick, /datum/martial_combo/sleeping_carp/keelhaul, /datum/martial_combo/sleeping_carp/gnashing_teeth) /datum/martial_art/the_sleeping_carp/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D) MARTIAL_ARTS_ACT_CHECK @@ -19,17 +20,30 @@ MARTIAL_ARTS_ACT_CHECK A.do_attack_animation(D, ATTACK_EFFECT_PUNCH) var/atk_verb = pick("punches", "kicks", "chops", "hits", "slams") - D.visible_message("[A] [atk_verb] [D]!", \ + D.visible_message("[A] [atk_verb] [D]!", "[A] [atk_verb] you!") - D.apply_damage(rand(10,15), BRUTE) - playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, 1, -1) - if(prob(50)) - A.say(pick("HUAH!", "HYA!", "CHOO!", "WUO!", "KYA!", "HUH!", "HIYOH!", "CARP STRIKE!", "CARP BITE!")) - if(prob(D.getBruteLoss()) && !D.lying) - D.visible_message("[D] stumbles and falls!", "The blow sends you to the ground!") - D.Weaken(4) + D.apply_damage(rand(10, 15), BRUTE, A.zone_selected) + playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, TRUE, -1) add_attack_logs(A, D, "Melee attacked with martial-art [src] : Punched", ATKLOG_ALL) return TRUE /datum/martial_art/the_sleeping_carp/explaination_header(user) to_chat(usr, "You retreat inward and recall the teachings of the Sleeping Carp...") + +/datum/martial_art/the_sleeping_carp/teach(mob/living/carbon/human/H, make_temporary) + . = ..() + H.faction |= "carp"// :D + to_chat(H, "You have learned the ancient martial art of the Sleeping Carp! \ + Your hand-to-hand combat has become much more effective, and you are now able to deflect any projectiles directed toward you when in throw mode. \ + However, you are also unable to use any ranged weaponry. \ + You can learn more about your newfound art by using the Recall Teachings verb in the Sleeping Carp tab.") + +/datum/martial_art/the_sleeping_carp/remove(mob/living/carbon/human/H) + . = ..() + H.faction -= "carp"// :C + +/datum/martial_art/the_sleeping_carp/explaination_footer(user) + to_chat(user, "In addition, by having your throw mode on when being shot at, you enter an active defensive mode where you will block and deflect all projectiles fired at you!") + +/datum/martial_art/the_sleeping_carp/try_deflect(mob/user) + return user.in_throw_mode && ..() // in case an admin wants to var edit carp to have less deflection chance diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 48cc3754905..139a3868f1d 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -37,10 +37,16 @@ emp_act return 2 if(mind?.martial_art?.deflection_chance) //Some martial arts users can deflect projectiles! - if(!lying && !HAS_TRAIT(src, TRAIT_HULK) && prob(mind.martial_art.deflection_chance)) //But only if they're not lying down, and hulks can't do it + if(!lying && !HAS_TRAIT(src, TRAIT_HULK) && mind.martial_art.try_deflect(src)) //But only if they're not lying down, and hulks can't do it add_attack_logs(P.firer, src, "hit by [P.type] but got deflected by martial arts '[mind.martial_art]'") visible_message("[src] deflects the projectile; [p_they()] can't be hit with ranged weapons!", "You deflect the projectile!") - return FALSE + playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE) + if(mind.martial_art.reroute_deflection) + P.firer = src + P.setAngle(rand(0, 360)) + return -1 + else + return FALSE var/obj/item/organ/external/organ = get_organ(check_zone(def_zone)) if(isnull(organ)) diff --git a/paradise.dme b/paradise.dme index 3ccb2456af2..6b5a77b75a8 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1720,11 +1720,9 @@ #include "code\modules\martial_arts\combos\plasma_fist\plasma_fist.dm" #include "code\modules\martial_arts\combos\plasma_fist\throwback.dm" #include "code\modules\martial_arts\combos\plasma_fist\tornado_sweep.dm" -#include "code\modules\martial_arts\combos\sleeping_carp\back_kick.dm" -#include "code\modules\martial_arts\combos\sleeping_carp\elbow_drop.dm" -#include "code\modules\martial_arts\combos\sleeping_carp\head_kick.dm" -#include "code\modules\martial_arts\combos\sleeping_carp\stomach_knee.dm" -#include "code\modules\martial_arts\combos\sleeping_carp\wrist_wrench.dm" +#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\maze_generation\maze_generator.dm" #include "code\modules\maze_generation\maze_generator_blockwise.dm" #include "code\modules\maze_generation\maze_helper_atoms.dm"