From 772a3fec3be6bb590f83ae037dfe7d650ad4915b Mon Sep 17 00:00:00 2001
From: 4000daniel1 <95170823+4000daniel1@users.noreply.github.com>
Date: Mon, 17 Jul 2023 14:50:26 +0200
Subject: [PATCH] Some martial art tweaks (#16259)
* mm
* cl
* oops
* changes
* waltuh
---
code/modules/martial_arts/sol_combat.dm | 37 +++++++++++-----
.../living/carbon/human/human_attackhand.dm | 5 +--
html/changelogs/4000daniel1-PR-04.yml | 43 +++++++++++++++++++
3 files changed, 72 insertions(+), 13 deletions(-)
create mode 100644 html/changelogs/4000daniel1-PR-04.yml
diff --git a/code/modules/martial_arts/sol_combat.dm b/code/modules/martial_arts/sol_combat.dm
index 5138c6f2347..8d731987462 100644
--- a/code/modules/martial_arts/sol_combat.dm
+++ b/code/modules/martial_arts/sol_combat.dm
@@ -22,14 +22,31 @@
return 0
/datum/martial_art/sol_combat/proc/leg_sweep(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
- A.do_attack_animation(D)
- if(D.stat || D.weakened)
- return 0
- A.visible_message("[A] leg sweeps [D]!")
- playsound(get_turf(A), /singleton/sound_category/swing_hit_sound, 50, 1, -1)
- D.apply_damage(5, DAMAGE_BRUTE)
- D.Weaken(2)
- return 1
+ var/list/sweepedatoms = list()
+ var/atom/sweeptarget
+ var/distfromcaster
+
+ for(var/turf/T in range(1,A))
+ for(var/atom/movable/AM in T)
+ sweepedatoms += AM
+
+ for(var/am in sweepedatoms - A)
+ var/atom/movable/AM = am
+ if(AM.anchored)
+ continue
+
+ sweeptarget = get_edge_target_turf(A, get_dir(A, get_step_away(AM, A)))
+ distfromcaster = get_dist(A, AM)
+ if(isliving(AM))
+ var/mob/living/M = AM
+ if(M.stat || M.incapacitated() || distfromcaster == 0)
+ D.apply_damage(25, DAMAGE_BRUTE)
+ A.visible_message("[A] hits [M] with a powerful kick!")
+ else
+ A.spin(10,1)
+ M.Weaken(3)
+ A.visible_message(M, "[A] swiftly leg sweeps [M]!")
+ AM.throw_at(sweeptarget, ((Clamp((1 - (Clamp(distfromcaster - 2, 0, distfromcaster))), 1, 1))), 1)
/datum/martial_art/sol_combat/proc/quick_choke(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)//is actually lung punch
A.do_attack_animation(D)
@@ -45,7 +62,7 @@
A.visible_message("[A] karate chops [D]'s neck!")
playsound(get_turf(A), /singleton/sound_category/punch_sound, 50, 1, -1)
D.apply_damage(5, DAMAGE_BRUTE)
- D.silent += 10
+ D.silent += 30
return 1
/datum/martial_art/sol_combat/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
@@ -106,7 +123,7 @@
to_chat(usr, "You clench your fists and have a flashback of knowledge...")
to_chat(usr, "Neck Chop: Harm Harm Disarm. Injures the neck, stopping the victim from speaking for a while.")
- to_chat(usr, "Leg Sweep: Disarm Harm Disarm. Trips the victim, rendering them prone and unable to move for a short time.")
+ to_chat(usr, "Leg Sweep: Disarm Harm Disarm. Trips the victim and everyone else around you, rendering them prone and unable to move for a short time.")
to_chat(usr, "Lung Punch: Harm Disarm Harm. Delivers a strong punch just above the victim's abdomen, constraining the lungs. The victim will be unable to breathe for a short time.")
#undef NECK_CHOP
diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm
index f5dd5dc8753..77d9f26c5e3 100644
--- a/code/modules/mob/living/carbon/human/human_attackhand.dm
+++ b/code/modules/mob/living/carbon/human/human_attackhand.dm
@@ -313,6 +313,8 @@
else
if(M.max_stamina > 0)
disarm_cost = M.max_stamina / 6
+ if(attacker_style && attacker_style.disarm_act(H, src))
+ return TRUE
if(M.is_drowsy())
disarm_cost *= 1.25
if(M.stamina <= disarm_cost)
@@ -326,9 +328,6 @@
return FALSE
M.nutrition = Clamp(M.nutrition - disarm_cost, 0, M.max_nutrition)
- if(attacker_style && attacker_style.disarm_act(H, src))
- return TRUE
-
M.attack_log += text("\[[time_stamp()]\] Disarmed [src.name] ([src.ckey])")
src.attack_log += text("\[[time_stamp()]\] Has been disarmed by [M.name] ([M.ckey])")
diff --git a/html/changelogs/4000daniel1-PR-04.yml b/html/changelogs/4000daniel1-PR-04.yml
new file mode 100644
index 00000000000..a572c789213
--- /dev/null
+++ b/html/changelogs/4000daniel1-PR-04.yml
@@ -0,0 +1,43 @@
+################################
+# Example Changelog File
+#
+# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
+#
+# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
+# When it is, any changes listed below will disappear.
+#
+# Valid Prefixes:
+# bugfix
+# wip (For works in progress)
+# tweak
+# soundadd
+# sounddel
+# rscadd (general adding of nice things)
+# rscdel (general deleting of nice things)
+# imageadd
+# imagedel
+# maptweak
+# spellcheck (typo fixes)
+# experiment
+# balance
+# admin
+# backend
+# security
+# refactor
+#################################
+
+# Your name.
+author: 4000daniel1
+
+# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
+delete-after: True
+
+# Any changes you've made. See valid prefix list above.
+# INDENT WITH TWO SPACES. NOT TABS. SPACES.
+# SCREW THIS UP AND IT WON'T WORK.
+# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
+# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
+changes:
+ - balance: "It is now possible to disarm while exhausted if you know a martial art."
+ - balance: "Buffed the solarian combat martial art's leg sweep ability, it now lasts a little longer and is AoE."
+ - balance: "Its neck chop ability also silences the victim for twenty seconds longer now."