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

Interaction Chain & Damage refactoring #9838

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
b648b31
Initial damage procs
PowerfulBacon Sep 2, 2023
08f8598
Converts half of all apply_damage instances to the new apply damage s…
PowerfulBacon Sep 2, 2023
7d9cc2f
Some more damage bits and pieces
PowerfulBacon Sep 3, 2023
40c6bd4
Bunch of damage related stuff
PowerfulBacon Sep 3, 2023
29eadfa
attack clicks
PowerfulBacon Sep 3, 2023
6512d03
Some alien improvements
PowerfulBacon Sep 3, 2023
8070348
Update living_damage_extensions.dm
PowerfulBacon Sep 3, 2023
ddc01b7
Completes 1/3 of the attackby to item_interact refactoring
PowerfulBacon Sep 3, 2023
2487eff
Converts 24 more files from attackby to item_interact
PowerfulBacon Sep 3, 2023
dcab4d9
Some more conversions
PowerfulBacon Sep 3, 2023
1816a37
A bunch more conversions from attackby to item interact
PowerfulBacon Sep 4, 2023
a45b587
Converts some more attackbys into item_interacts
PowerfulBacon Sep 4, 2023
e7ea856
Some more updates
PowerfulBacon Sep 4, 2023
b8ef4f1
Makes the code compile and work
PowerfulBacon Sep 4, 2023
57cc747
Fixes damages not applying to objects
PowerfulBacon Sep 4, 2023
224c6a2
Changes the damage types
PowerfulBacon Sep 5, 2023
95e6207
Moves some stuff out of species
PowerfulBacon Sep 5, 2023
2643781
Some fixes
PowerfulBacon Sep 5, 2023
d0c3c2e
More systemic damage part 1
PowerfulBacon Sep 6, 2023
13daaeb
Some more damage refactors
PowerfulBacon Sep 6, 2023
7563f3d
Damage conversions
PowerfulBacon Sep 8, 2023
10d805a
on_damaged
PowerfulBacon Sep 10, 2023
1376168
Returns the amount of damage dealt
PowerfulBacon Sep 15, 2023
f603e33
Mob attacks
PowerfulBacon Sep 15, 2023
4b67474
Adds in the unit test
PowerfulBacon Sep 15, 2023
a808490
Bunch of adjustBruteLoss conversions
PowerfulBacon Sep 16, 2023
4d720c0
adjustBruteLoss
PowerfulBacon Sep 16, 2023
652e29c
Slime damaging rework
PowerfulBacon Sep 16, 2023
b2e43f6
Update test_mob_attacks.dm
PowerfulBacon Sep 16, 2023
b0981b3
Fixes simplemobs not taking damage, fixes humans not updating their d…
PowerfulBacon Sep 16, 2023
6ac2528
Allows the larvae probability to be rigged in order to make the unit …
PowerfulBacon Sep 16, 2023
a5dca9e
Deal generic attack takes into account simplemob melee damage type
PowerfulBacon Sep 18, 2023
c901d28
Factory boss update health now makes sense
PowerfulBacon Sep 18, 2023
7cec74c
AdjustCloneLoss updates. Changes adjustBruteLoss to adjustBruteLossAb…
PowerfulBacon Sep 18, 2023
dd6b9db
Removes update health
PowerfulBacon Oct 14, 2023
fd91217
Adds in an item damage unit test that fails on all items
PowerfulBacon Oct 14, 2023
4dc4d72
Fixes a space at the start of the line
PowerfulBacon Oct 14, 2023
6ec406b
63 attackby conversions
PowerfulBacon Dec 21, 2023
03e3698
Update floodlight.dm
PowerfulBacon Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Converts half of all apply_damage instances to the new apply damage s…
…ystem
  • Loading branch information
PowerfulBacon committed Sep 2, 2023
commit 08f859880a01a678597a8297d0cce2043e2d5eb5
4 changes: 4 additions & 0 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2568,7 +2568,11 @@
#include "code\modules\guardian\abilities\minor\teleport.dm"
#include "code\modules\guardian\abilities\special\time.dm"
#include "code\modules\health\_DEFINES\damage.dm"
#include "code\modules\health\damage\damage_sources\chemical.dm"
#include "code\modules\health\damage\damage_sources\damage_source.dm"
#include "code\modules\health\damage\damage_sources\living_damage_extensions.dm"
#include "code\modules\health\damage\damage_sources\object_damage_extensions.dm"
#include "code\modules\health\damage\damage_sources\sharp.dm"
#include "code\modules\health\damage\damage_types\brute.dm"
#include "code\modules\health\damage\damage_types\burn.dm"
#include "code\modules\health\damage\damage_types\clone.dm"
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
send_item_attack_message(I, user)
if(I.force)
var/armour_block = run_armor_check(null, MELEE, armour_penetration = I.armour_penetration)
apply_damage(I.force, I.damtype, blocked = armour_block)
apply_damage_old(I.force, I.damtype, blocked = armour_block)
if(I.damtype == BRUTE)
if(prob(33))
I.add_mob_blood(src)
Expand Down
14 changes: 7 additions & 7 deletions code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@
var/mob/living/carbon/ML = A
if(istype(ML))
var/dam_zone = pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
var/obj/item/bodypart/affecting = null
if(ishuman(ML))
var/mob/living/carbon/human/H = ML
affecting = H.get_bodypart(ran_zone(dam_zone))
var/armor = ML.run_armor_check(affecting, MELEE)
if(prob(75))
ML.apply_damage(rand(1,3), BRUTE, affecting, armor)
var/datum/damage_source/sharp/light/bite_source = FIND_DAMAGE_SOURCE
ML.visible_message("<span class='danger'>[name] bites [ML]!</span>", \
"<span class='userdanger'>[name] bites you!</span>", null, COMBAT_MESSAGE_RANGE)
if(armor >= 2)
// Returns false if blocked
var/target_zone = ran_zone(dam_zone)
if(!bite_source.deal_attack(src, null, H, /datum/damage/brute, rand(1, 3), target_zone))
return
// Check bio armour
if (prob(ML.run_armor_check(target_zone, BIO, silent = TRUE)))
return
for(var/thing in diseases)
var/datum/disease/D = thing
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/butchering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

H.visible_message("<span class='danger'>[user] slits [H]'s throat!</span>", \
"<span class='userdanger'>[user] slits your throat...</span>")
H.apply_damage(item_force, BRUTE, BODY_ZONE_HEAD)
source.damage_direct(user, H, BODY_ZONE_HEAD)
H.bleed_rate = CLAMP(H.bleed_rate + 20, 0, 30)
H.apply_status_effect(/datum/status_effect/neck_slice)

Expand Down
3 changes: 2 additions & 1 deletion code/datums/components/caltrop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
if(HAS_TRAIT(H, TRAIT_LIGHT_STEP))
damage *= 0.5

H.apply_damage(damage, BRUTE, picked_def_zone)
var/datum/damage_source/sharp/light/damage_source = FIND_DAMAGE_SOURCE
damage_source.deal_attack(null, parent, H, damage, /datum/damage/brute, picked_def_zone)

if(COOLDOWN_FINISHED(src, caltrop_cooldown))
COOLDOWN_START(src, caltrop_cooldown, 1 SECONDS) //cooldown to avoid message spam.
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/cult_ritual_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
log_game("[key_name(cultist)] has begun inscribing the Narsie summon rune at [AREACOORD(cultist)]")

if(cultist.blood_volume)
cultist.apply_damage(initial(rune_to_scribe.scribe_damage), BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) // *cuts arm* *bone explodes* ever have one of those days?
cultist.apply_damage(tool.damage_source, tool.damtype, initial(rune_to_scribe.scribe_damage), pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) // *cuts arm* *bone explodes* ever have one of those days?

var/scribe_mod = initial(rune_to_scribe.scribe_delay)
if(!initial(rune_to_scribe.no_scribe_boost) && (our_turf.type in turfs_that_boost_us))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/jousting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
var/msg
if(damage)
msg += "[user] [sharp? "impales" : "slams into"] [target] [sharp? "on" : "with"] their [parent]"
target.apply_damage(damage, BRUTE, user.zone_selected, 0)
I.deal_attack(user, target, user.zone_selected, override_damage = damage)
if(prob(knockdown_chance))
msg += " and knocks [target] [target_buckled? "off of [target.buckled]" : "down"]"
if(target_buckled)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/larryknife.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
leg = BODY_ZONE_R_LEG
else
leg = BODY_ZONE_L_LEG
C.apply_damage(knife_damage, BRUTE, leg)
C.apply_damage(/datum/damage_source/sharp/light, /datum/damage/brute, knife_damage, leg)
P.visible_message("<span class='warning'>[C.name] is stabbed by [P.name].</span>")
playsound(get_turf(P), 'sound/weapons/slice.ogg', 50, 1)
TIMER_COOLDOWN_START(src, COOLDOWN_LARRYKNIFE, 2 SECONDS)
Expand Down
3 changes: 1 addition & 2 deletions code/datums/components/spikes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
var/netdamage = spikedamage * damage_mod
if(istype(C) && cooldown <= world.time)
var/atom/movable/P = parent
var/def_check = C.getarmor(type = MELEE)
C.apply_damage(netdamage, BRUTE, blocked = def_check)
C.apply_damage(/datum/damage_source/sharp/light, /datum/damage/brute, netdamage)
P.visible_message("<span class='warning'>[C.name] is pricked on [P.name]'s spikes.</span>")
playsound(get_turf(P), 'sound/weapons/slice.ogg', 50, 1)
cooldown = (world.time + 8) //spike cooldown is equal to default unarmed attack speed
Expand Down
10 changes: 5 additions & 5 deletions code/datums/diseases/advance/symptoms/kitty.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
tail.Remove(M)
tail.forceMove(get_turf(M))
M.add_splatter_floor(get_turf(M))
M.apply_damage(5, BRUTE)
M.apply_damage(/datum/damage_source/forceful_laceration, /datum/damage/brute, 5, BODY_ZONE_PRECISE_GROIN)
M.emote("laugh")
playsound(M, 'sound/misc/desecration-01.ogg', 50, 1)
else if(!ears || !tail)
Expand Down Expand Up @@ -90,7 +90,7 @@
to_chat(H, "<span class='hypnophrase'>You pet [cat]!</span>")
cat.visible_message("<span class='warning'>[H] grabs [cat] roughly!</span>", "<span class='userdanger'>[H] roughly grabs you by the neck!</span>")
H.emote("laugh")
cat.apply_damage(5, BRUTE)
cat.apply_damage(/datum/damage_source/impact, /datum/damage/brute, 5)
dnacounter += 2 //real cats are purer, scarcer, and all around better
else if(H.throw_at(cat, 7, 2))
if(get_dist(cat, H) > 1)
Expand All @@ -110,7 +110,7 @@
targettail.forceMove(get_turf(target))
target.emote("scream")
target.add_splatter_floor(get_turf(target))
target.apply_damage(5, BRUTE)
target.apply_damage(/datum/damage_source/forceful_laceration, /datum/damage/brute, 5, BODY_ZONE_PRECISE_GROIN)
H.put_in_hands(targettail)
dnacounter += 1
playsound(target, 'sound/misc/desecration-01.ogg', 50, 1)
Expand All @@ -129,14 +129,14 @@
targetears.forceMove(get_turf(target))
target.emote("scream")
target.add_splatter_floor(get_turf(target))
target.apply_damage(5, BRUTE)
target.apply_damage(/datum/damage_source/forceful_laceration, /datum/damage/brute, 5, BODY_ZONE_HEAD)
H.put_in_hands(targetears)
playsound(target, 'sound/misc/desecration-01.ogg', 50, 1)
else
H.visible_message("<span class='warning'>[H] yanks on [target]'s ears!</span>", "<span class='hypnophrase'>You scratch behind [target]'s ears!</span>")
to_chat(target, "<span class='userdanger'>[H] yanks on your ears!</span>")
H.emote("laugh")
target.apply_damage(rand(1, 10), BRUTE)
target.apply_damage(/datum/damage_source/forceful_laceration, /datum/damage/brute, rand(1, 10))

/datum/symptom/toxoplasmosis/End(datum/disease/advance/A)
. = ..()
Expand Down
4 changes: 2 additions & 2 deletions code/datums/diseases/advance/symptoms/macrophage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
if(gigagerms)
phage = new /mob/living/simple_animal/hostile/macrophage/aggro(M.loc)
phage.melee_damage = max(5, A.resistance)
M.apply_damage(rand(10, 20))
M.apply_damage(/datum/damage_source/internal_rupture, /datum/damage/brute, rand(10, 20))
playsound(M, 'sound/effects/splat.ogg', 50, 1)
M.emote("scream")
else
phage = new(M.loc)
M.apply_damage(rand(1, 7))
M.apply_damage(/datum/damage_source/internal_rupture, /datum/damage/brute, rand(1, 7))
phage.health += A.resistance
phage.maxHealth += A.resistance
phage.infections += A
Expand Down
5 changes: 2 additions & 3 deletions code/datums/diseases/advance/symptoms/skin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,13 @@ Thresholds
done = TRUE
if(H.pulling && iscarbon(H.pulling)) //grabbing is handled with the disease instead of the component, so the component doesn't have to be processed
var/mob/living/carbon/C = H.pulling
var/def_check = C.getarmor(type = MELEE)
C.apply_damage(1*power, BRUTE, blocked = def_check)
C.apply_damage(/datum/damage_source/sharp/light, /datum/damage/brute, 1 * power, ran_zone())
C.visible_message("<span class='warning'>[C.name] is pricked on [H.name]'s spikes.</span>")
playsound(get_turf(C), 'sound/weapons/slice.ogg', 50, 1)
for(var/mob/living/carbon/C in ohearers(1, H))
if(C.pulling && C.pulling == H)
var/def_check = C.getarmor(type = MELEE)
C.apply_damage(3*power, BRUTE, blocked = def_check)
C.apply_damage(/datum/damage_source/sharp/light, /datum/damage/brute, 3 * power, ran_zone())
C.visible_message("<span class='warning'>[C.name] is pricked on [H.name]'s spikes.</span>")
playsound(get_turf(C), 'sound/weapons/slice.ogg', 50, 1)

Expand Down
2 changes: 1 addition & 1 deletion code/datums/martial/_martial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
D.visible_message("<span class='danger'>[A] [atk_verb]ed [D]!</span>", \
"<span class='userdanger'>[A] [atk_verb]ed you!</span>", null, COMBAT_MESSAGE_RANGE)

D.apply_damage(damage, A.dna.species.attack_type, affecting, armor_block)
D.apply_damage_old(damage, A.dna.species.attack_type, affecting, armor_block)

log_combat(A, D, "punched")

Expand Down
2 changes: 1 addition & 1 deletion code/datums/martial/boxing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
D.visible_message("<span class='danger'>[A] [atk_verb]ed [D]!</span>", \
"<span class='userdanger'>[A] [atk_verb]ed you!</span>", null, COMBAT_MESSAGE_RANGE)

D.apply_damage(damage, STAMINA, affecting, armor_block)
D.apply_damage_old(damage, STAMINA, affecting, armor_block)
log_combat(A, D, "punched (boxing) ")
if(D.getStaminaLoss() > 50 && istype(D.mind?.martial_art, /datum/martial_art/boxing))
var/knockout_prob = D.getStaminaLoss() + rand(-15,15)
Expand Down
12 changes: 6 additions & 6 deletions code/datums/martial/cqc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
D.visible_message("<span class='warning'>[A] slams [D] into the ground!</span>", \
"<span class='userdanger'>[A] slams you into the ground!</span>")
playsound(get_turf(A), 'sound/weapons/slam.ogg', 50, 1, -1)
D.apply_damage(10, BRUTE, blocked = def_check)
D.apply_damage_old(10, BRUTE, blocked = def_check)
D.Paralyze(120)
log_combat(A, D, "slammed (CQC)")
return TRUE
Expand All @@ -72,7 +72,7 @@
playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
var/atom/throw_target = get_edge_target_turf(D, A.dir)
D.throw_at(throw_target, 1, 14, A)
D.apply_damage(10, A.dna.species.attack_type, blocked = def_check)
D.apply_damage_old(10, A.dna.species.attack_type, blocked = def_check)
log_combat(A, D, "kicked (CQC)")
if(D.IsParalyzed() && !D.stat)
log_combat(A, D, "knocked out (Head kick)(CQC)")
Expand Down Expand Up @@ -121,7 +121,7 @@
if(I && D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.adjustStaminaLoss(50)
D.apply_damage(25, A.dna.species.attack_type, blocked = def_check)
D.apply_damage_old(25, A.dna.species.attack_type, blocked = def_check)
return TRUE

/datum/martial_art/cqc/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
Expand Down Expand Up @@ -158,7 +158,7 @@
if(!(D.mobility_flags & MOBILITY_STAND))
bonus_damage += 5
picked_hit_type = "stomps on"
D.apply_damage(bonus_damage, BRUTE, blocked = def_check)
D.apply_damage_old(bonus_damage, BRUTE, blocked = def_check)
if(picked_hit_type == "kicks" || picked_hit_type == "stomps on")
playsound(get_turf(D), 'sound/weapons/cqchit2.ogg', 50, 1, -1)
else
Expand All @@ -170,7 +170,7 @@
D.visible_message("<span class='warning'>[A] leg sweeps [D]!", \
"<span class='userdanger'>[A] leg sweeps you!</span>")
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
D.apply_damage(10, BRUTE, blocked = def_check)
D.apply_damage_old(10, BRUTE, blocked = def_check)
D.Paralyze(60)
log_combat(A, D, "sweeped (CQC)")
return TRUE
Expand All @@ -192,7 +192,7 @@
if(I && D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.Jitter(2)
D.apply_damage(5, A.dna.species.attack_type, blocked = def_check)
D.apply_damage_old(5, A.dna.species.attack_type, blocked = def_check)
else
D.visible_message("<span class='danger'>[A] fails to disarm [D]!</span>", \
"<span class='userdanger'>[A] fails to disarm you!</span>", null, COMBAT_MESSAGE_RANGE)
Expand Down
8 changes: 4 additions & 4 deletions code/datums/martial/karate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"<span class='userdanger'>[A] stomped you in the head!</span>", null, COMBAT_MESSAGE_RANGE)
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 75, 1, -1)
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
D.apply_damage(20, A.dna.species.attack_type, BODY_ZONE_HEAD, def_check)
D.apply_damage(10, STAMINA, BODY_ZONE_HEAD, def_check)
D.apply_damage_old(20, A.dna.species.attack_type, BODY_ZONE_HEAD, def_check)
D.apply_damage_old(10, STAMINA, BODY_ZONE_HEAD, def_check)
return 1
return basic_hit(A,D)

Expand All @@ -55,7 +55,7 @@
"<span class='userdanger'>[A] roundhouse kicked you in the calf!</span>", null, COMBAT_MESSAGE_RANGE)
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 75, 1, -1)
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
D.apply_damage(50, STAMINA, pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG), def_check)
D.apply_damage_old(50, STAMINA, pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG), def_check)
return 1
return basic_hit(A,D)

Expand All @@ -71,7 +71,7 @@
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 75, 1, -1)
D.emote("gasp")
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
D.apply_damage(30, STAMINA, BODY_ZONE_CHEST, def_check)
D.apply_damage_old(30, STAMINA, BODY_ZONE_CHEST, def_check)
D.Knockdown(10)
return 1
return basic_hit(A,D)
Expand Down
10 changes: 5 additions & 5 deletions code/datums/martial/krav_maga.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"<span class='userdanger'>Your legs are sweeped by [A]!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", null, A)
to_chat(A, "<span class='danger'>You leg sweep [D]!</span>")
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, TRUE, -1)
D.apply_damage(rand(20,30), STAMINA, affecting, armor_block)
D.apply_damage_old(rand(20,30), STAMINA, affecting, armor_block)
D.Knockdown(60)
log_combat(A, D, "leg sweeped")
return 1
Expand All @@ -114,7 +114,7 @@
D.visible_message("<span class='warning'>[A] karate chops [D]'s neck!</span>", \
"<span class='userdanger'>[A] karate chops your neck, rendering you unable to speak!</span>", null, COMBAT_MESSAGE_RANGE)
playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1)
D.apply_damage(5, A.dna.species.attack_type)
D.apply_damage_old(5, A.dna.species.attack_type)
if(D.silent <= 10)
D.silent = CLAMP(D.silent + 10, 0, 10)
log_combat(A, D, "neck chopped")
Expand All @@ -137,7 +137,7 @@
if(!(D.mobility_flags & MOBILITY_STAND))
bonus_damage += 5
picked_hit_type = "stomped"
D.apply_damage(rand(5,10) + bonus_damage, A.dna.species.attack_type, affecting, armor_block)
D.apply_damage_old(rand(5,10) + bonus_damage, A.dna.species.attack_type, affecting, armor_block)
if(picked_hit_type == "kicked" || picked_hit_type == "stomped")
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
playsound(get_turf(D), 'sound/effects/hit_kick.ogg', 50, 1, -1)
Expand All @@ -160,15 +160,15 @@
to_chat(A, "<span class='danger'>You jab [D]!</span>")
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
playsound(D, 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
D.apply_damage(rand(5,10), STAMINA, affecting, armor_block)
D.apply_damage_old(rand(5,10), STAMINA, affecting, armor_block)
log_combat(A, D, "punched nonlethally")
if(!(D.mobility_flags & MOBILITY_STAND))
D.visible_message("<span class='danger'>[A] reprimands [D]!</span>", \
"<span class='userdanger'>You're manhandled by [A]!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, A)
to_chat(A, "<span class='danger'>You stomp [D]!</span>")
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
playsound(D, 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
D.apply_damage(rand(10,15), STAMINA, affecting, armor_block)
D.apply_damage_old(rand(10,15), STAMINA, affecting, armor_block)
log_combat(A, D, "stomped nonlethally")
if(prob(D.getStaminaLoss()))
D.visible_message("<span class='warning'>[D] sputters and recoils in pain!</span>", "<span class='userdanger'>You recoil in pain as you are jabbed in a nerve!</span>")
Expand Down
2 changes: 1 addition & 1 deletion code/datums/martial/mushpunch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
atk_verb = pick("punches", "smashes", "ruptures", "cracks")
D.visible_message("<span class='danger'>[A] [atk_verb] [D] with inhuman strength, sending [D.p_them()] flying backwards!</span>", \
"<span class='userdanger'>[A] [atk_verb] you with inhuman strength, sending you flying backwards!</span>")
D.apply_damage(rand(15,30), A.dna.species.attack_type)
D.apply_damage_old(rand(15,30), A.dna.species.attack_type)
playsound(D, 'sound/effects/meteorimpact.ogg', 25, 1, -1)
var/throwtarget = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time.
Expand Down
6 changes: 3 additions & 3 deletions code/datums/martial/psychotic_brawl.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
D.visible_message("<span class='danger'>[A] [atk_verb] [D]!</span>", \
"<span class='userdanger'>[A] [atk_verb] you!</span>")
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 40, 1, -1)
D.apply_damage(rand(5,10), A.dna.species.attack_type, BODY_ZONE_HEAD)
A.apply_damage(rand(5,10), A.dna.species.attack_type, BODY_ZONE_HEAD)
D.apply_damage_old(rand(5,10), A.dna.species.attack_type, BODY_ZONE_HEAD)
A.apply_damage_old(rand(5,10), A.dna.species.attack_type, BODY_ZONE_HEAD)
if(!istype(D.head,/obj/item/clothing/head/helmet/) && !istype(D.head,/obj/item/clothing/head/hardhat))
D.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5)
A.Stun(rand(10,45))
Expand All @@ -59,7 +59,7 @@
atk_verb = pick("punches", "kicks", "hits", "slams into")
D.visible_message("<span class='danger'>[A] [atk_verb] [D] with inhuman strength, sending [D.p_them()] flying backwards!</span>", \
"<span class='userdanger'>[A] [atk_verb] you with inhuman strength, sending you flying backwards!</span>")
D.apply_damage(rand(15,30), A.dna.species.attack_type)
D.apply_damage_old(rand(15,30), A.dna.species.attack_type)
playsound(get_turf(D), 'sound/effects/meteorimpact.ogg', 25, 1, -1)
var/throwtarget = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time.
Expand Down
10 changes: 5 additions & 5 deletions code/datums/martial/sleeping_carp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
D.emote("scream")
D.dropItemToGround(D.get_active_held_item())
D.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
D.apply_damage_old(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
D.Stun(60)
return 1

Expand Down Expand Up @@ -89,7 +89,7 @@
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
"<span class='userdanger'>[A] kicks you in the jaw!</span>")
D.apply_damage(20, A.dna.species.attack_type, BODY_ZONE_HEAD, blocked = def_check)
D.apply_damage_old(20, A.dna.species.attack_type, BODY_ZONE_HEAD, blocked = def_check)
D.drop_all_held_items()
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
D.Stun(80)
Expand All @@ -105,7 +105,7 @@
"<span class='userdanger'>[A] piledrives you with their elbow!</span>")
if(D.stat)
D.death() //FINISH HIM!
D.apply_damage(50, A.dna.species.attack_type, BODY_ZONE_CHEST, blocked = def_check)
D.apply_damage_old(50, A.dna.species.attack_type, BODY_ZONE_CHEST, blocked = def_check)
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 75, 1, -1)
return 1
return basic_hit(A,D)
Expand Down Expand Up @@ -137,7 +137,7 @@
var/atk_verb = pick("punches", "kicks", "chops", "hits", "slams")
D.visible_message("<span class='danger'>[A] [atk_verb] [D]!</span>", \
"<span class='userdanger'>[A] [atk_verb] you!</span>")
D.apply_damage(15, BRUTE, blocked = def_check)
D.apply_damage_old(15, BRUTE, blocked = def_check)
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, 1, -1)
log_combat(A, D, "[atk_verb] (Sleeping Carp)")
return 1
Expand Down Expand Up @@ -194,7 +194,7 @@
user.Paralyze(60)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
H.apply_damage_old(2*force, BRUTE, BODY_ZONE_HEAD)
else
user.take_bodypart_damage(2*force)
return
Expand Down
Loading