From f95c8480410d111b94a004951e15f5f582617530 Mon Sep 17 00:00:00 2001 From: hal9000PR Date: Wed, 6 Jan 2021 17:53:58 +0000 Subject: [PATCH 1/6] deflection, reflection and refraction --- code/datums/uplink_item.dm | 2 +- code/modules/martial_arts/martial.dm | 1 + code/modules/martial_arts/sleeping_carp.dm | 1 + code/modules/mob/living/carbon/human/human.dm | 12 +++++++++--- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index bb794d9ebd6..b11b2753e0d 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -853,7 +853,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) 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/martial.dm b/code/modules/martial_arts/martial.dm index 7c2648b987e..340d09eaa8f 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -8,6 +8,7 @@ var/temporary = FALSE var/datum/martial_art/base = null // The permanent style var/deflection_chance = 0 //Chance to deflect projectiles + var/reroute_deflection = FALSE // Can it reflect projectiles in a random direction? var/block_chance = 0 //Chance to block melee attacks using items while on throw mode. 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. diff --git a/code/modules/martial_arts/sleeping_carp.dm b/code/modules/martial_arts/sleeping_carp.dm index 9ca070f8bfd..fe171dd718c 100644 --- a/code/modules/martial_arts/sleeping_carp.dm +++ b/code/modules/martial_arts/sleeping_carp.dm @@ -2,6 +2,7 @@ /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 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 8a804dc801c..cd86b95234e 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -295,13 +295,19 @@ var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone)) apply_damage(5, BRUTE, affecting, run_armor_check(affecting, "melee")) -/mob/living/carbon/human/bullet_act() - if(mind && mind.martial_art && mind.martial_art.deflection_chance) //Some martial arts users can deflect projectiles! +/mob/living/carbon/human/bullet_act(obj/item/projectile/P, def_zone) + if(mind && mind.martial_art && mind.martial_art.deflection_chance && in_throw_mode) //Some martial arts users can deflect projectiles! if(!prob(mind.martial_art.deflection_chance)) return ..() if(!src.lying && !(HULK in mutations)) //But only if they're not lying down, and hulks can't do it visible_message("[src] deflects the projectile; [p_they()] can't be hit with ranged weapons!", "You deflect the projectile!") - return 0 + playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1) + if(mind.martial_art.reroute_deflection) + P.firer = src + P.setAngle(rand(0, 360)) + return -1 + else + return 0 ..() /mob/living/carbon/human/get_restraining_item() From 358883bcd819e9700f169c58332f000003508589 Mon Sep 17 00:00:00 2001 From: hal9000PR Date: Thu, 7 Jan 2021 10:21:10 +0000 Subject: [PATCH 2/6] mochi+sabre review --- code/modules/martial_arts/martial.dm | 30 ++++++++++++------- code/modules/mob/living/carbon/human/human.dm | 2 +- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 340d09eaa8f..805390a052e 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -6,19 +6,29 @@ 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/reroute_deflection = FALSE // Can it reflect projectiles in a random direction? - 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 + /// 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 /datum/martial_art/New() . = ..() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index cd86b95234e..f65815e863e 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -296,7 +296,7 @@ apply_damage(5, BRUTE, affecting, run_armor_check(affecting, "melee")) /mob/living/carbon/human/bullet_act(obj/item/projectile/P, def_zone) - if(mind && mind.martial_art && mind.martial_art.deflection_chance && in_throw_mode) //Some martial arts users can deflect projectiles! + if(mind?.martial_art?.deflection_chance && in_throw_mode) //Some martial arts users can deflect projectiles! if(!prob(mind.martial_art.deflection_chance)) return ..() if(!src.lying && !(HULK in mutations)) //But only if they're not lying down, and hulks can't do it From 31512f0102701c613c15a1e2b099ca68619c47d9 Mon Sep 17 00:00:00 2001 From: hal9000PR Date: Sat, 9 Jan 2021 22:08:00 +0000 Subject: [PATCH 3/6] buffs some combos, makes carps friendly --- .../combos/sleeping_carp/back_kick.dm | 18 ------------------ .../combos/sleeping_carp/crashing_kick.dm | 18 ++++++++++++++++++ .../combos/sleeping_carp/elbow_drop.dm | 2 +- .../combos/sleeping_carp/stomach_knee.dm | 2 +- code/modules/martial_arts/martial.dm | 1 + code/modules/martial_arts/sleeping_carp.dm | 2 +- paradise.dme | 2 +- 7 files changed, 23 insertions(+), 22 deletions(-) delete mode 100644 code/modules/martial_arts/combos/sleeping_carp/back_kick.dm create mode 100644 code/modules/martial_arts/combos/sleeping_carp/crashing_kick.dm 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..61103f8fbcf --- /dev/null +++ b/code/modules/martial_arts/combos/sleeping_carp/crashing_kick.dm @@ -0,0 +1,18 @@ +/datum/martial_combo/sleeping_carp/crashing_kick + name = "Crashing Waves Kick" + steps = list(MARTIAL_COMBO_STEP_HARM, MARTIAL_COMBO_STEP_GRAB) + explaination_text = "Kicks the target square in the chest. Knocks down." + +/datum/martial_combo/sleeping_carp/crashing_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 chest!", \ + "[user] kicks you in the chest, 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] : Crashing Kick", ATKLOG_ALL) + if(prob(80)) + user.say(pick("SURRPRIZU!","WOPAH!", "WATAAH", "ZOTA!", "SOLE STRIKE!")) + 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 index 0269c9bed4d..87533a84b14 100644 --- a/code/modules/martial_arts/combos/sleeping_carp/elbow_drop.dm +++ b/code/modules/martial_arts/combos/sleeping_carp/elbow_drop.dm @@ -1,7 +1,7 @@ /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." + explaination_text = "Opponent must be on the ground. Deals huge damage, instantly kills anyone." /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) diff --git a/code/modules/martial_arts/combos/sleeping_carp/stomach_knee.dm b/code/modules/martial_arts/combos/sleeping_carp/stomach_knee.dm index 312e575003d..b3fbd1cfaab 100644 --- a/code/modules/martial_arts/combos/sleeping_carp/stomach_knee.dm +++ b/code/modules/martial_arts/combos/sleeping_carp/stomach_knee.dm @@ -10,7 +10,7 @@ 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.AdjustLoseBreath(4) 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) diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 805390a052e..cd14b9a6191 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -275,6 +275,7 @@ var/datum/martial_art/the_sleeping_carp/theSleepingCarp = new(null) theSleepingCarp.teach(user) + user.faction += list("carp") //makes space carp peaceful to sleeping carp users user.drop_item() visible_message("[src] lights up in fire and quickly burns to ash.") new /obj/effect/decal/cleanable/ash(get_turf(src)) diff --git a/code/modules/martial_arts/sleeping_carp.dm b/code/modules/martial_arts/sleeping_carp.dm index fe171dd718c..ec0564c1a70 100644 --- a/code/modules/martial_arts/sleeping_carp.dm +++ b/code/modules/martial_arts/sleeping_carp.dm @@ -6,7 +6,7 @@ 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/wrist_wrench, /datum/martial_combo/sleeping_carp/crashing_kick, /datum/martial_combo/sleeping_carp/stomach_knee, /datum/martial_combo/sleeping_carp/head_kick, /datum/martial_combo/sleeping_carp/elbow_drop) /datum/martial_art/the_sleeping_carp/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) MARTIAL_ARTS_ACT_CHECK diff --git a/paradise.dme b/paradise.dme index 2e7219ff97d..d62cab8f901 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1712,7 +1712,7 @@ #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\crashing_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" From 3555fffa80db0bd1def33aeaff65d159c0c4955d Mon Sep 17 00:00:00 2001 From: hal9000PR Date: Sun, 10 Jan 2021 12:41:38 +0000 Subject: [PATCH 4/6] fixes elbow drop. --- code/modules/martial_arts/combos/sleeping_carp/elbow_drop.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/martial_arts/combos/sleeping_carp/elbow_drop.dm b/code/modules/martial_arts/combos/sleeping_carp/elbow_drop.dm index 87533a84b14..61dc8759f39 100644 --- a/code/modules/martial_arts/combos/sleeping_carp/elbow_drop.dm +++ b/code/modules/martial_arts/combos/sleeping_carp/elbow_drop.dm @@ -1,14 +1,15 @@ /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." + 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!") - target.death() //FINISH HIM! + 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) From 202ff60a87ce17fe8b4961c03978734b92a5b923 Mon Sep 17 00:00:00 2001 From: hal9000PR Date: Wed, 20 Jan 2021 10:42:12 +0000 Subject: [PATCH 5/6] merge conflicts go brrrr --- code/modules/mob/living/carbon/human/human_defense.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 18cb61c4244..a781c292f67 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -36,10 +36,16 @@ emp_act P.on_hit(src, 100, def_zone) return 2 - if(mind?.martial_art?.deflection_chance) //Some martial arts users can deflect projectiles! + if(mind?.martial_art?.deflection_chance && in_throw_mode) //Some martial arts users can deflect projectiles! if(!lying && !(HULK in mutations) && prob(mind.martial_art.deflection_chance)) //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!") + playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1) + 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)) From 32cdead5c6298487005be7f5ca5f7dbcf1a4128e Mon Sep 17 00:00:00 2001 From: hal9000PR Date: Fri, 22 Jan 2021 20:28:00 +0000 Subject: [PATCH 6/6] sabre review --- .../martial_arts/combos/sleeping_carp/crashing_kick.dm | 8 ++++---- code/modules/martial_arts/martial.dm | 2 +- code/modules/mob/living/carbon/human/human_defense.dm | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/martial_arts/combos/sleeping_carp/crashing_kick.dm b/code/modules/martial_arts/combos/sleeping_carp/crashing_kick.dm index 61103f8fbcf..80765922114 100644 --- a/code/modules/martial_arts/combos/sleeping_carp/crashing_kick.dm +++ b/code/modules/martial_arts/combos/sleeping_carp/crashing_kick.dm @@ -6,13 +6,13 @@ /datum/martial_combo/sleeping_carp/crashing_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 chest!", \ + target.visible_message("[user] kicks [target] in the chest!", "[user] kicks you in the chest, making you stumble and fall!") - step_to(target,get_step(target,target.dir),1) + step_to(target, get_step (target, target.dir), 1) target.Weaken(4) - playsound(get_turf(target), 'sound/weapons/punch1.ogg', 50, 1, -1) + playsound(target, 'sound/weapons/punch1.ogg', 50, TRUE, -1) add_attack_logs(user, target, "Melee attacked with martial-art [src] : Crashing Kick", ATKLOG_ALL) if(prob(80)) - user.say(pick("SURRPRIZU!","WOPAH!", "WATAAH", "ZOTA!", "SOLE STRIKE!")) + user.say(pick("SURRPRIZU!", "WOPAH!", "WATAAH", "ZOTA!", "SOLE STRIKE!")) 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 cd14b9a6191..7c0ef9ab00a 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -275,7 +275,7 @@ var/datum/martial_art/the_sleeping_carp/theSleepingCarp = new(null) theSleepingCarp.teach(user) - user.faction += list("carp") //makes space carp peaceful to sleeping carp users + user.faction |= list("carp") //makes space carp peaceful to sleeping carp users user.drop_item() visible_message("[src] lights up in fire and quickly burns to ash.") new /obj/effect/decal/cleanable/ash(get_turf(src)) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index a781c292f67..2d7fe622df2 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -40,10 +40,10 @@ emp_act if(!lying && !(HULK in mutations) && prob(mind.martial_art.deflection_chance)) //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!") - playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1) + 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)) + P.setAngle(rand(0, 360)) return -1 else return FALSE