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
Some more damage bits and pieces
  • Loading branch information
PowerfulBacon committed Sep 3, 2023
commit 7d9cc2f5bb65207bb9cd98d1ffa2b7b91f0f6cf3
2 changes: 1 addition & 1 deletion _maps/_basemap.dm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to toggle this back when done!

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it.
#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it.

#include "map_files\generic\CentCom.dmm"

Expand Down
3 changes: 1 addition & 2 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include "code\__DEFINES\contracts.dm"
#include "code\__DEFINES\cooldowns.dm"
#include "code\__DEFINES\cult.dm"
#include "code\__DEFINES\damage.dm"
#include "code\__DEFINES\departments.dm"
#include "code\__DEFINES\devices.dm"
#include "code\__DEFINES\directional.dm"
Expand All @@ -83,7 +84,6 @@
#include "code\__DEFINES\fov.dm"
#include "code\__DEFINES\ghost.dm"
#include "code\__DEFINES\gravity.dm"
#include "code\__DEFINES\helpers.dm"
#include "code\__DEFINES\html_assistant.dm"
#include "code\__DEFINES\hud.dm"
#include "code\__DEFINES\icon_smoothing.dm"
Expand Down Expand Up @@ -2567,7 +2567,6 @@
#include "code\modules\guardian\abilities\minor\snares.dm"
#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"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
//Returns an integer given a hex input, supports negative values "-ff"
//skips preceding invalid characters
#define hex2num(X) text2num(X, 16)

/// subtypesof(), typesof() without the parent path
#define subtypesof(typepath) ( typesof(typepath) - typepath )
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@

GLOBAL_LIST_EMPTY(damage_type_singletons)

#define GET_DAMAGE(damage_type) (length(GLOB.damage_type_singletons) ? GLOB.damage_type_singletons[damage_type] : (GLOB.damage_type_singletons = create_damage_singletons())[damage_type])
#define GET_DAMAGE(damage_type) (length(GLOB.damage_type_singletons) ? GLOB.damage_type_singletons[damage_type] : (create_damage_singletons())[damage_type])

/proc/create_damage_singletons()
GLOB.damage_type_singletons = list()
for (var/type in subtypesof(/datum/damage))
GLOB.damage_type_singletons[type] = new type
return GLOB.damage_type_singletons

GLOBAL_LIST_EMPTY(damage_source_singletons)

#define GET_DAMAGE_SOURCE(source_type) (length(GLOB.damage_source_singletons) ? GLOB.damage_source_singletons[source_type] : (GLOB.damage_source_singletons = create_source_singletons())[source_type])
#define GET_DAMAGE_SOURCE(source_type) (length(GLOB.damage_source_singletons) ? GLOB.damage_source_singletons[source_type] : (create_source_singletons())[source_type])

/proc/create_source_singletons()
GLOB.damage_source_singletons = list()
for (var/type in subtypesof(/datum/damage_source))
GLOB.damage_source_singletons[type] = new type
return GLOB.damage_source_singletons

#define FIND_DAMAGE_SOURCE locate() in GLOB.damage_source_singletons
2 changes: 0 additions & 2 deletions code/__DEFINES/helpers.dm

This file was deleted.

2 changes: 1 addition & 1 deletion code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"<span class='userdanger'>[name] bites you!</span>", null, COMBAT_MESSAGE_RANGE)
// 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))
if(!bite_source.deal_attack(src, null, ML, /datum/damage/brute, rand(1, 3), target_zone))
return
// Check bio armour
if (prob(ML.run_armor_check(target_zone, BIO, silent = TRUE)))
Expand Down
3 changes: 1 addition & 2 deletions code/datums/diseases/advance/symptoms/skin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ Thresholds
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(/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 Expand Up @@ -522,7 +521,7 @@ Thresholds
speed = 5
damage_type = TOX
icon_state = "energy2"
armor_flag = BIO
damage_source = /datum/damage_source/biohazard
var/list/diseases

/obj/projectile/pimple/on_hit(atom/target, blocked)
Expand Down
5 changes: 1 addition & 4 deletions code/datums/martial/_martial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,11 @@
log_combat(A, D, "attempted to [atk_verb]")
return 0

var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
var/armor_block = D.run_armor_check(affecting, MELEE)

playsound(D.loc, A.dna.species.attack_sound, 25, 1, -1)
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_old(damage, A.dna.species.attack_type, affecting, armor_block)
D.apply_damage(A.dna.species.damage_source_type, A.dna.species.damage_type, damage, ran_zone(A.zone_selected))

log_combat(A, D, "punched")

Expand Down
9 changes: 3 additions & 6 deletions code/datums/martial/boxing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,20 @@
log_combat(A, D, "attempted to hit", atk_verb)
return 0


var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
var/armor_block = D.run_armor_check(affecting, MELEE)

playsound(D.loc, A.dna.species.attack_sound, 25, 1, -1)

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_old(damage, STAMINA, affecting, armor_block)
var/target_zone = ran_zone(A.zone_selected)
D.apply_damage(A.dna.species.damage_source_type, /datum/damage/stamina, damage, target_zone)
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)
if((D.stat != DEAD) && prob(knockout_prob))
D.visible_message("<span class='danger'>[A] knocks [D] out with a haymaker!</span>", \
"<span class='userdanger'>[A] knocks you out with a haymaker!</span>")
D.apply_effect(200,EFFECT_KNOCKDOWN,armor_block)
D.apply_effect(200,EFFECT_KNOCKDOWN, D.run_armor_check(target_zone, silent = TRUE))
D.SetSleeping(100)
D.force_say(A)
log_combat(A, D, "knocked out (boxing) ")
Expand Down
17 changes: 6 additions & 11 deletions code/datums/martial/cqc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,18 @@
return FALSE

/datum/martial_art/cqc/proc/Slam(mob/living/carbon/human/A, mob/living/carbon/human/D)
var/def_check = D.getarmor(BODY_ZONE_CHEST, MELEE)
if(!can_use(A))
return FALSE
if(D.mobility_flags & MOBILITY_STAND)
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_old(10, BRUTE, blocked = def_check)
D.apply_damage(/datum/damage_source/impact, /datum/damage/brute, 10)
D.Paralyze(120)
log_combat(A, D, "slammed (CQC)")
return TRUE

/datum/martial_art/cqc/proc/Kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
var/def_check = D.getarmor(BODY_ZONE_CHEST, MELEE)
if(!can_use(A))
return FALSE
if(!D.stat || !D.IsParalyzed())
Expand All @@ -72,7 +70,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_old(10, A.dna.species.attack_type, blocked = def_check)
D.apply_damage(A.dna.species.damage_source_type, A.dna.species.damage_type, 10, BODY_ZONE_HEAD)
log_combat(A, D, "kicked (CQC)")
if(D.IsParalyzed() && !D.stat)
log_combat(A, D, "knocked out (Head kick)(CQC)")
Expand Down Expand Up @@ -109,7 +107,6 @@
return TRUE

/datum/martial_art/cqc/proc/Consecutive(mob/living/carbon/human/A, mob/living/carbon/human/D)
var/def_check = D.getarmor(BODY_ZONE_CHEST, MELEE)
if(!can_use(A))
return FALSE
if(!D.stat)
Expand All @@ -121,7 +118,7 @@
if(I && D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.adjustStaminaLoss(50)
D.apply_damage_old(25, A.dna.species.attack_type, blocked = def_check)
D.apply_damage(A.dna.species.damage_source_type, A.dna.species.damage_type, 25, BODY_ZONE_CHEST)
return TRUE

/datum/martial_art/cqc/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
Expand All @@ -145,7 +142,6 @@
return TRUE

/datum/martial_art/cqc/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
var/def_check = D.getarmor(BODY_ZONE_CHEST, MELEE)
if(!can_use(A))
return FALSE
add_to_streak("H",D)
Expand All @@ -158,7 +154,7 @@
if(!(D.mobility_flags & MOBILITY_STAND))
bonus_damage += 5
picked_hit_type = "stomps on"
D.apply_damage_old(bonus_damage, BRUTE, blocked = def_check)
D.apply_damage(A.dna.species.damage_source_type, D.dna.species.damage_type, bonus_damage, BODY_ZONE_CHEST)
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,13 +166,12 @@
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_old(10, BRUTE, blocked = def_check)
D.apply_damage(/datum/damage_source/punch, /datum/damage/brute, 10, BODY_ZONE_CHEST)
D.Paralyze(60)
log_combat(A, D, "sweeped (CQC)")
return TRUE

/datum/martial_art/cqc/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
var/def_check = D.getarmor(BODY_ZONE_CHEST, MELEE)
if(!can_use(A))
return FALSE
add_to_streak("D",D)
Expand All @@ -192,7 +187,7 @@
if(I && D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.Jitter(2)
D.apply_damage_old(5, A.dna.species.attack_type, blocked = def_check)
D.apply_damage(A.dna.species.damage_source_type, A.dna.species.damage_type, 5, BODY_ZONE_HEAD)
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
11 changes: 4 additions & 7 deletions code/datums/martial/karate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

//Floor Stomp - brute and stamina damage if target isn't standing
/datum/martial_art/karate/proc/floorKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
var/def_check = D.getarmor(BODY_ZONE_HEAD, MELEE)
if(!can_use(A))
return FALSE
if(!(D.mobility_flags & MOBILITY_STAND))
Expand All @@ -39,14 +38,13 @@
"<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_old(20, A.dna.species.attack_type, BODY_ZONE_HEAD, def_check)
D.apply_damage_old(10, STAMINA, BODY_ZONE_HEAD, def_check)
D.apply_damage(A.dna.species.damage_source_type, A.dna.species.damage_type, 20, BODY_ZONE_HEAD)
D.apply_damage(A.dna.species.damage_source_type, /datum/damage/stamina, 20, BODY_ZONE_HEAD)
return 1
return basic_hit(A,D)

//Calf Kick - paralyse one leg with stamina damage
/datum/martial_art/karate/proc/calfKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
var/def_check = D.getarmor(BODY_ZONE_L_LEG, MELEE)
if(!can_use(A))
return FALSE
if(!D.stat)
Expand All @@ -55,13 +53,12 @@
"<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_old(50, STAMINA, pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG), def_check)
D.apply_damage(A.dna.species.damage_source_type, /datum/damage/stamina, 50, pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
return 1
return basic_hit(A,D)

//Jumping Knee - brief knockdown and decent stamina damage
/datum/martial_art/karate/proc/jumpingKnee(mob/living/carbon/human/A, mob/living/carbon/human/D)
var/def_check = D.getarmor(BODY_ZONE_HEAD, MELEE)
if(!can_use(A))
return FALSE
if(!D.stat)
Expand All @@ -71,7 +68,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_old(30, STAMINA, BODY_ZONE_CHEST, def_check)
D.apply_damage(A.dna.species.damage_source_type, /datum/damage/stamina, 30, BODY_ZONE_CHEST)
D.Knockdown(10)
return 1
return basic_hit(A,D)
Expand Down
16 changes: 5 additions & 11 deletions code/datums/martial/krav_maga.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,11 @@
/datum/martial_art/krav_maga/proc/leg_sweep(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
if(D.stat || D.IsParalyzed())
return 0
var/obj/item/bodypart/affecting = D.get_bodypart(BODY_ZONE_CHEST)
var/armor_block = D.run_armor_check(affecting, MELEE)
D.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>", \
"<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_old(rand(20,30), STAMINA, affecting, armor_block)
D.apply_damage(/datum/damage_source/punch, /datum/damage/stamina, rand(20, 30), BODY_ZONE_CHEST)
D.Knockdown(60)
log_combat(A, D, "leg sweeped")
return 1
Expand All @@ -114,7 +112,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_old(5, A.dna.species.attack_type)
D.apply_damage(A.dna.species.damage_source_type, A.dna.species.damage_type, 5, BODY_ZONE_HEAD)
if(D.silent <= 10)
D.silent = CLAMP(D.silent + 10, 0, 10)
log_combat(A, D, "neck chopped")
Expand All @@ -130,14 +128,12 @@
if(check_streak(A,D))
return 1
log_combat(A, D, "punched")
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
var/armor_block = D.run_armor_check(affecting, MELEE)
var/picked_hit_type = pick("punched", "kicked")
var/bonus_damage = 0
if(!(D.mobility_flags & MOBILITY_STAND))
bonus_damage += 5
picked_hit_type = "stomped"
D.apply_damage_old(rand(5,10) + bonus_damage, A.dna.species.attack_type, affecting, armor_block)
D.apply_damage(A.dna.species.damage_source_type, A.dna.species.damage_type, rand(5, 10) + bonus_damage, ran_zone(A.zone_selected))
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 @@ -152,23 +148,21 @@
/datum/martial_art/krav_maga/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
if(check_streak(A,D))
return 1
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
var/armor_block = D.run_armor_check(affecting, MELEE)
if((D.mobility_flags & MOBILITY_STAND))
D.visible_message("<span class='danger'>[A] reprimands [D]!</span>", \
"<span class='userdanger'>You're slapped 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 jab [D]!</span>")
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
playsound(D, 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
D.apply_damage_old(rand(5,10), STAMINA, affecting, armor_block)
D.apply_damage(A.dna.species.damage_source_type, /datum/damage/stamina, rand(5, 10), ran_zone(A.zone_selected))
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_old(rand(10,15), STAMINA, affecting, armor_block)
D.apply_damage(A.dna.species.damage_source_type, /datum/damage/stamina, rand(10, 15), ran_zone(A.zone_selected))
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_old(rand(15,30), A.dna.species.attack_type)
D.apply_damage(A.dna.species.damage_source_type, A.dna.species.damage_type, rand(15, 30), ran_zone(A.zone_selected))
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_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)
D.apply_damage(/datum/damage_source/impact, /datum/damage/brute, rand(5,10), BODY_ZONE_HEAD)
A.apply_damage(/datum/damage_source/impact, /datum/damage/brute, rand(5,10), 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_old(rand(15,30), A.dna.species.attack_type)
D.apply_damage(A.dna.species.damage_source_type, A.dna.species.damage_type, rand(15, 30), ran_zone(A.zone_selected))
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
Loading