diff --git a/code/datums/martial/_martial.dm b/code/datums/martial/_martial.dm
index dc8418f01c..d55330653f 100644
--- a/code/datums/martial/_martial.dm
+++ b/code/datums/martial/_martial.dm
@@ -10,7 +10,7 @@
var/help_verb
var/pacifism_check = TRUE //are the martial arts combos/attacks unable to be used by pacifist.
var/allow_temp_override = TRUE //if this martial art can be overridden by temporary martial arts
- var/damage_base //this is set on teach and is a random value between your species punchdamagelow and punchdamagehigh
+ var/damage_base //this is set by damage_roll proc and is a random value between your species punchdamagelow and punchdamagehigh.
/datum/martial_art/proc/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
return FALSE
@@ -36,6 +36,18 @@
current_target = new_target
streak = ""
+/datum/martial_art/proc/damage_roll(mob/living/carbon/human/A, mob/living/carbon/human/D)
+ //Here we roll for our damage to be added into the damage_base var. This is changed depending on whether we are in combat mode, lying down, or if our target is in combat mode.
+ var/damage = rand(A.dna.species.punchdamagelow, A.dna.species.punchdamagehigh)
+ if(!(D.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
+ damage *= 1.5
+ if(!CHECK_MOBILITY(A, MOBILITY_STAND))
+ damage *= 0.5
+ if(!(A.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
+ damage *= 0.25
+ damage_base = damage
+ return
+
/datum/martial_art/proc/teach(mob/living/carbon/human/H, make_temporary = FALSE)
if(!istype(H) || !H.mind)
return FALSE
@@ -52,7 +64,6 @@
H.verbs += help_verb
H.mind.martial_art = src
ADD_TRAIT(H, TRAIT_PUGILIST, MARTIAL_ARTIST_TRAIT)
- damage_base = rand(H.dna.species.punchdamagelow, H.dna.species.punchdamagehigh)
return TRUE
/datum/martial_art/proc/store(datum/martial_art/M,mob/living/carbon/human/H)
diff --git a/code/datums/martial/boxing.dm b/code/datums/martial/boxing.dm
index 5e1c8497d6..002da527c6 100644
--- a/code/datums/martial/boxing.dm
+++ b/code/datums/martial/boxing.dm
@@ -16,7 +16,7 @@
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
var/atk_verb = pick("left hook","right hook","straight punch")
-
+ damage_roll(A,D)
var/extra_damage = damage_base
if(extra_damage == A.dna.species.punchdamagelow)
playsound(D.loc, A.dna.species.miss_sound, 25, 1, -1)
diff --git a/code/datums/martial/cqc.dm b/code/datums/martial/cqc.dm
index 0055482b6c..fb1e85486e 100644
--- a/code/datums/martial/cqc.dm
+++ b/code/datums/martial/cqc.dm
@@ -113,6 +113,7 @@
/datum/martial_art/cqc/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(A.a_intent == INTENT_GRAB && A!=D && can_use(A)) // A!=D prevents grabbing yourself
add_to_streak("G",D)
+ damage_roll(A,D)
if(check_streak(A,D)) //if a combo is made no grab upgrade is done
return TRUE
old_grab_state = A.grab_state
@@ -130,6 +131,7 @@
if(!can_use(A))
return FALSE
add_to_streak("H",D)
+ damage_roll(A,D)
if(check_streak(A,D))
return TRUE
log_combat(A, D, "attacked (CQC)")
@@ -160,6 +162,7 @@
if(!can_use(A))
return FALSE
add_to_streak("D",D)
+ damage_roll(A,D)
var/obj/item/I = null
if(check_streak(A,D))
return TRUE
diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm
index bcc561a15b..314a7a93a5 100644
--- a/code/datums/martial/krav_maga.dm
+++ b/code/datums/martial/krav_maga.dm
@@ -132,6 +132,7 @@
if(check_streak(A,D))
return TRUE
log_combat(A, D, "grabbed (Krav Maga)")
+ damage_roll(A,D)
..()
/datum/martial_art/krav_maga/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
@@ -140,6 +141,7 @@
if(check_streak(A,D))
return TRUE
log_combat(A, D, "punched")
+ damage_roll(A,D)
var/picked_hit_type = pick("punches", "kicks")
var/bonus_damage = 0
if(CHECK_MOBILITY(D, MOBILITY_STAND))
@@ -162,6 +164,7 @@
return TRUE
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
var/armor_block = D.run_armor_check(affecting, "melee")
+ damage_roll(A,D)
if(D.mobility_flags & MOBILITY_STAND)
D.visible_message("[A] reprimands [D]!", \
"You're slapped by [A]!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, A)
diff --git a/code/datums/martial/mushpunch.dm b/code/datums/martial/mushpunch.dm
index 19041a0665..67f3b45767 100644
--- a/code/datums/martial/mushpunch.dm
+++ b/code/datums/martial/mushpunch.dm
@@ -7,6 +7,7 @@
to_chat(A, "You begin to wind up an attack...")
if(!do_after(A, 25, target = D))
to_chat(A, "Your attack was interrupted!")
+ damage_roll(A,D)
return TRUE //martial art code was a mistake
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
atk_verb = pick("punches", "smashes", "ruptures", "cracks")
diff --git a/code/datums/martial/plasma_fist.dm b/code/datums/martial/plasma_fist.dm
index 71fb00c467..cb17e4cd4b 100644
--- a/code/datums/martial/plasma_fist.dm
+++ b/code/datums/martial/plasma_fist.dm
@@ -65,18 +65,21 @@
/datum/martial_art/plasma_fist/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
add_to_streak("H",D)
+ damage_roll(A,D)
if(check_streak(A,D))
return TRUE
return FALSE
/datum/martial_art/plasma_fist/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
add_to_streak("D",D)
+ damage_roll(A,D)
if(check_streak(A,D))
return TRUE
return FALSE
/datum/martial_art/plasma_fist/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
add_to_streak("G",D)
+ damage_roll(A,D)
if(check_streak(A,D))
return TRUE
return FALSE
diff --git a/code/datums/martial/psychotic_brawl.dm b/code/datums/martial/psychotic_brawl.dm
index f96fb34397..d8cde9b33d 100644
--- a/code/datums/martial/psychotic_brawl.dm
+++ b/code/datums/martial/psychotic_brawl.dm
@@ -4,12 +4,15 @@
pacifism_check = FALSE //Quite uncontrollable and unpredictable, people will still end up harming others with it.
/datum/martial_art/psychotic_brawling/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
+ damage_roll(A,D)
return psycho_attack(A,D)
/datum/martial_art/psychotic_brawling/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
+ damage_roll(A,D)
return psycho_attack(A,D)
/datum/martial_art/psychotic_brawling/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
+ damage_roll(A,D)
return psycho_attack(A,D)
/datum/martial_art/psychotic_brawling/proc/psycho_attack(mob/living/carbon/human/A, mob/living/carbon/human/D)
diff --git a/code/datums/martial/rising_bass.dm b/code/datums/martial/rising_bass.dm
index 6ba5d2c9a3..e219fb8e03 100644
--- a/code/datums/martial/rising_bass.dm
+++ b/code/datums/martial/rising_bass.dm
@@ -156,18 +156,21 @@
/datum/martial_art/the_rising_bass/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
add_to_streak("D",D)
+ damage_roll(A,D)
if(check_streak(A,D))
return TRUE
return ..()
/datum/martial_art/the_rising_bass/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
add_to_streak("H",D)
+ damage_roll(A,D)
if(check_streak(A,D))
return TRUE
return ..()
/datum/martial_art/the_rising_bass/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
add_to_streak("G",D)
+ damage_roll(A,D)
if(check_streak(A,D))
return TRUE
return ..()
diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm
index 4646ac9ee9..691b2655d1 100644
--- a/code/datums/martial/sleeping_carp.dm
+++ b/code/datums/martial/sleeping_carp.dm
@@ -78,6 +78,7 @@
/datum/martial_art/the_sleeping_carp/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
add_to_streak("G",D)
+ damage_roll(A,D)
if(check_streak(A,D))
return TRUE
log_combat(A, D, "grabbed (Sleeping Carp)")
@@ -85,6 +86,7 @@
/datum/martial_art/the_sleeping_carp/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
add_to_streak("H",D)
+ damage_roll(A,D)
if(check_streak(A,D))
return TRUE
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
@@ -101,6 +103,7 @@
/datum/martial_art/the_sleeping_carp/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
add_to_streak("D",D)
+ damage_roll(A,D)
if(check_streak(A,D))
return TRUE
log_combat(A, D, "disarmed (Sleeping Carp)")
diff --git a/code/datums/martial/wrestling.dm b/code/datums/martial/wrestling.dm
index 349efdd342..1d565f447e 100644
--- a/code/datums/martial/wrestling.dm
+++ b/code/datums/martial/wrestling.dm
@@ -19,29 +19,29 @@
/datum/martial_art/wrestling/proc/check_streak(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
if(!can_use(A, D))
- return 0
+ return FALSE
switch(streak)
if("drop")
streak = ""
drop(A,D)
- return 1
+ return TRUE
if("strike")
streak = ""
strike(A,D)
- return 1
+ return TRUE
if("kick")
streak = ""
kick(A,D)
- return 1
+ return TRUE
if("throw")
streak = ""
throw_wrassle(A,D)
- return 1
+ return TRUE
if("slam")
streak = ""
slam(A,D)
- return 1
- return 0
+ return TRUE
+ return FALSE
/datum/action/slam
name = "Slam (Cinch) - Slam a grappled opponent into the floor."
@@ -138,7 +138,7 @@
/datum/martial_art/wrestling/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(check_streak(A,D))
- return 1
+ return TRUE
log_combat(A, D, "punched with wrestling")
..()
@@ -173,11 +173,11 @@
if (get_dist(A, D) > 1)
to_chat(A, "[D] is too far away!")
- return 0
+ return FALSE
if (!isturf(A.loc) || !isturf(D.loc))
to_chat(A, "You can't throw [D] from here!")
- return 0
+ return FALSE
A.setDir(turn(A.dir, 90))
var/turf/T = get_step(A, A.dir)
@@ -186,7 +186,7 @@
D.forceMove(T)
D.setDir(get_dir(D, A))
else
- return 0
+ return FALSE
sleep(delay)
@@ -195,11 +195,11 @@
if (get_dist(A, D) > 1)
to_chat(A, "[D] is too far away!")
- return 0
+ return FALSE
if (!isturf(A.loc) || !isturf(D.loc))
to_chat(A, "You can't throw [D] from here!")
- return 0
+ return FALSE
D.forceMove(A.loc) // Maybe this will help with the wallthrowing bug.
@@ -211,7 +211,7 @@
D.emote("scream")
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human.proc/DefaultCombatKnockdown, 20))
log_combat(A, D, "has thrown with wrestling")
- return 0
+ return FALSE
/datum/martial_art/wrestling/proc/FlipAnimation(mob/living/carbon/human/D)
set waitfor = FALSE
@@ -258,7 +258,7 @@
A.pixel_y = 0
D.pixel_x = 0
D.pixel_y = 0
- return 0
+ return FALSE
if (!isturf(A.loc) || !isturf(D.loc))
to_chat(A, "You can't slam [D] here!")
@@ -266,7 +266,7 @@
A.pixel_y = 0
D.pixel_x = 0
D.pixel_y = 0
- return 0
+ return FALSE
else
if (A)
A.pixel_x = 0
@@ -274,7 +274,7 @@
if (D)
D.pixel_x = 0
D.pixel_y = 0
- return 0
+ return FALSE
sleep(1)
@@ -286,11 +286,11 @@
if (get_dist(A, D) > 1)
to_chat(A, "[D] is too far away!")
- return 0
+ return FALSE
if (!isturf(A.loc) || !isturf(D.loc))
to_chat(A, "You can't slam [D] here!")
- return 0
+ return FALSE
D.forceMove(A.loc)
@@ -327,7 +327,7 @@
log_combat(A, D, "body-slammed")
- return 0
+ return FALSE
/datum/martial_art/wrestling/proc/CheckStrikeTurf(mob/living/carbon/human/A, turf/T)
if (A && (T && isturf(T) && get_dist(A, T) <= 1))
@@ -404,12 +404,12 @@
A.adjustBruteLoss(rand(10,20))
A.DefaultCombatKnockdown(60)
to_chat(A, "[D] is too far away!")
- return 0
+ return FALSE
if (!isturf(A.loc) || !isturf(D.loc))
A.pixel_y = 0
to_chat(A, "You can't drop onto [D] from here!")
- return 0
+ return FALSE
if(A)
animate(A, transform = matrix(90, MATRIX_ROTATE), time = 1, loop = 0)
@@ -442,14 +442,16 @@
return
/datum/martial_art/wrestling/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
+ damage_roll(A,D)
if(check_streak(A,D))
- return 1
+ return TRUE
log_combat(A, D, "wrestling-disarmed")
..()
/datum/martial_art/wrestling/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
+ damage_roll(A,D)
if(check_streak(A,D))
- return 1
+ return TRUE
if(!can_use(A,D))
return ..()
if(A.pulling == D || A == D) // don't stun grab yoursel
@@ -459,7 +461,7 @@
"[A] gets [D] in a cinch!")
D.Stun(rand(60,100))
log_combat(A, D, "cinched")
- return 1
+ return TRUE
/obj/item/storage/belt/champion/wrestling
name = "Wrestling Belt"
@@ -492,7 +494,7 @@
//Make sure that moves can only be used on people wearing the holodeck belt
/datum/martial_art/wrestling/holodeck/can_use(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
if(!(istype(D.mind?.martial_art, /datum/martial_art/wrestling/holodeck)))
- return 0
+ return FALSE
else
return ..()