From 884b5421a0a58b63ee966b2352cfab98284d4f38 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Tue, 22 Oct 2019 23:41:43 +0000 Subject: [PATCH 01/16] ports #43784 --- code/modules/spells/spell_types/shapeshift.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/spells/spell_types/shapeshift.dm b/code/modules/spells/spell_types/shapeshift.dm index 1576c55326..0f265607ca 100644 --- a/code/modules/spells/spell_types/shapeshift.dm +++ b/code/modules/spells/spell_types/shapeshift.dm @@ -13,7 +13,7 @@ var/revert_on_death = TRUE var/die_with_shapeshifted_form = TRUE - var/convert_damage = FALSE //If you want to convert the caster's health to the shift, and vice versa. + var/convert_damage = TRUE //If you want to convert the caster's health to the shift, and vice versa. var/convert_damage_type = BRUTE //Since simplemobs don't have advanced damagetypes, what to convert damage back into. var/shapeshift_type var/list/possible_shapes = list(/mob/living/simple_animal/mouse,\ From e76f64ce167cafdb31dfed687e318b31131c7860 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Tue, 22 Oct 2019 23:49:29 +0000 Subject: [PATCH 02/16] #43784 --- .../modules/mob/living/carbon/damage_procs.dm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index cc0c0d7434..fbed6001d2 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -1,8 +1,8 @@ -/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE) +/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE) var/hit_percent = (100-blocked)/100 - if(hit_percent <= 0) + if(!forced && hit_percent <= 0) return 0 var/obj/item/bodypart/BP = null @@ -15,34 +15,35 @@ if(!BP) BP = bodyparts[1] + var/damage_amount = forced ? damage : damage * hit_percent switch(damagetype) if(BRUTE) if(BP) if(damage > 0 ? BP.receive_damage(damage * hit_percent, 0) : BP.heal_damage(abs(damage * hit_percent), 0)) update_damage_overlays() else //no bodypart, we deal damage with a more general method. - adjustBruteLoss(damage * hit_percent) + adjustBruteLoss(damage_amount, forced = forced) if(BURN) if(BP) if(damage > 0 ? BP.receive_damage(0, damage * hit_percent) : BP.heal_damage(0, abs(damage * hit_percent))) update_damage_overlays() else - adjustFireLoss(damage * hit_percent) + adjustFireLoss(damage_amount, forced = forced) if(TOX) - adjustToxLoss(damage * hit_percent) + adjustToxLoss(damage_amount, forced = forced) if(OXY) - adjustOxyLoss(damage * hit_percent) + adjustOxyLoss(damage_amount, forced = forced) if(CLONE) - adjustCloneLoss(damage * hit_percent) + adjustCloneLoss(damage_amount, forced = forced) if(STAMINA) if(BP) if(damage > 0 ? BP.receive_damage(0, 0, damage * hit_percent) : BP.heal_damage(0, 0, abs(damage * hit_percent))) update_damage_overlays() else - adjustStaminaLoss(damage * hit_percent) + adjustStaminaLoss(damage_amount, forced = forced) //citadel code if(AROUSAL) - adjustArousalLoss(damage * hit_percent) + adjustArousalLoss(damage_amount, forced = forced) return TRUE From 5b321fc821906c372f6b13ddc5b8b813da109b6e Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Tue, 22 Oct 2019 23:50:25 +0000 Subject: [PATCH 03/16] #43784 --- code/modules/mob/living/carbon/human/damage_procs.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/damage_procs.dm b/code/modules/mob/living/carbon/human/damage_procs.dm index 7641408529..9f6a572fc8 100644 --- a/code/modules/mob/living/carbon/human/damage_procs.dm +++ b/code/modules/mob/living/carbon/human/damage_procs.dm @@ -1,5 +1,5 @@ -/mob/living/carbon/human/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE) +/mob/living/carbon/human/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE) // depending on the species, it will run the corresponding apply_damage code there - return dna.species.apply_damage(damage, damagetype, def_zone, blocked, src) + return dna.species.apply_damage(damage, damagetype, def_zone, blocked, src, forced) From c5ec76e24d7535dd1b81e79160b139be837c8ff4 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Wed, 23 Oct 2019 00:04:09 +0000 Subject: [PATCH 04/16] Update species.dm --- .../mob/living/carbon/human/species.dm | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index a59d9e914b..a6032e4f85 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1946,10 +1946,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) append_message = "loosening their grip on [target_held_item]" log_combat(user, target, "shoved", append_message) -/datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H) +/datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, forced = FALSE) var/hit_percent = (100-(blocked+armor))/100 hit_percent = (hit_percent * (100-H.physiology.damage_resistance))/100 - if(hit_percent <= 0) + if(!forced && hit_percent <= 0) return 0 var/obj/item/bodypart/BP = null @@ -1971,37 +1971,44 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) switch(damagetype) if(BRUTE) H.damageoverlaytemp = 20 + var/damage_amount = forced ? damage : damage * hit_percent * brutemod * H.physiology.brute_mod if(BP) - if(damage > 0 ? BP.receive_damage(damage * hit_percent * brutemod * H.physiology.brute_mod, 0) : BP.heal_damage(abs(damage * hit_percent * brutemod * H.physiology.brute_mod), 0)) + if(damage > 0 ? BP.receive_damage(damage_amount, 0) : BP.heal_damage(abs(damage_amount), 0)) H.update_damage_overlays() if(HAS_TRAIT(H, TRAIT_MASO)) - H.adjustArousalLoss(damage * brutemod * H.physiology.brute_mod) + H.adjustArousalLoss(damage_amount, 0) if (H.getArousalLoss() >= 100 && ishuman(H) && H.has_dna()) H.mob_climax(forced_climax=TRUE) else//no bodypart, we deal damage with a more general method. - H.adjustBruteLoss(damage * hit_percent * brutemod * H.physiology.brute_mod) + H.adjustBruteLoss(damage_amount) if(BURN) H.damageoverlaytemp = 20 + var/damage_amount = forced ? damage : damage * hit_percent * burnmod * H.physiology.burn_mod if(BP) - if(damage > 0 ? BP.receive_damage(0, damage * hit_percent * burnmod * H.physiology.burn_mod) : BP.heal_damage(0, abs(damage * hit_percent * burnmod * H.physiology.burn_mod))) + if(damage > 0 ? BP.receive_damage(0, damage_amount) : BP.heal_damage(0, abs(damage * hit_percent * burnmod * H.physiology.burn_mod))) H.update_damage_overlays() else - H.adjustFireLoss(damage * hit_percent * burnmod * H.physiology.burn_mod) + H.adjustFireLoss(damage_amount) if(TOX) - H.adjustToxLoss(damage * hit_percent * H.physiology.tox_mod) + var/damage_amount = forced ? damage : damage * hit_percent * H.physiology.tox_mod + H.adjustToxLoss(damage_amount) if(OXY) - H.adjustOxyLoss(damage * hit_percent * H.physiology.oxy_mod) + var/damage_amount = forced ? damage : damage * hit_percent * H.physiology.oxy_mod + H.adjustOxyLoss(damage_amount) if(CLONE) - H.adjustCloneLoss(damage * hit_percent * H.physiology.clone_mod) + var/damage_amount = forced ? damage : damage * hit_percent * H.physiology.clone_mod + H.adjustCloneLoss(damage_amount) if(STAMINA) + var/damage_amount = forced ? damage : damage * hit_percent * H.physiology.stamina_mod if(BP) - if(damage > 0 ? BP.receive_damage(0, 0, damage * hit_percent * H.physiology.stamina_mod) : BP.heal_damage(0, 0, abs(damage * hit_percent * H.physiology.stamina_mod), only_robotic = FALSE, only_organic = FALSE)) + if(damage > 0 ? BP.receive_damage(0, 0, damage_amount) : BP.heal_damage(0, 0, abs(damage * hit_percent * H.physiology.stamina_mod), only_robotic = FALSE, only_organic = FALSE)) H.update_stamina() else - H.adjustStaminaLoss(damage * hit_percent * H.physiology.stamina_mod) + H.adjustStaminaLoss(damage_amount) if(BRAIN) - H.adjustOrganLoss(ORGAN_SLOT_BRAIN, damage * hit_percent * H.physiology.brain_mod) + var/damage_amount = forced ? damage : damage * hit_percent * H.physiology.brain_mod + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, damage_amount) if(AROUSAL) //Citadel edit - arousal H.adjustArousalLoss(damage * hit_percent) return 1 From 7d9a6d2a34eed602c5da5491c23bd7224b7d18e3 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Wed, 23 Oct 2019 00:05:12 +0000 Subject: [PATCH 05/16] Update zombies.dm --- code/modules/mob/living/carbon/human/species_types/zombies.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species_types/zombies.dm b/code/modules/mob/living/carbon/human/species_types/zombies.dm index fefaa025d3..a1dce4fb0f 100644 --- a/code/modules/mob/living/carbon/human/species_types/zombies.dm +++ b/code/modules/mob/living/carbon/human/species_types/zombies.dm @@ -45,7 +45,7 @@ /datum/species/zombie/infectious/spec_stun(mob/living/carbon/human/H,amount) . = min(20, amount) -/datum/species/zombie/infectious/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H) +/datum/species/zombie/infectious/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, forced = FALSE) . = ..() if(.) regen_cooldown = world.time + REGENERATION_DELAY From 13a06aa09921b0a639528f8b6368ed1e36e2f1a7 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Wed, 23 Oct 2019 00:05:44 +0000 Subject: [PATCH 06/16] Update damage_procs.dm --- code/modules/mob/living/damage_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index fbb6074ba2..5dd1613e61 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -8,7 +8,7 @@ Returns standard 0 if fail */ -/mob/living/proc/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE) +/mob/living/proc/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE) var/hit_percent = (100-blocked)/100 if(!damage || (hit_percent <= 0)) return 0 From 6d11e1bd1d85c8b810246c6493cf0754c3d4242e Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Wed, 23 Oct 2019 00:08:13 +0000 Subject: [PATCH 07/16] Update damage_procs.dm --- code/modules/mob/living/damage_procs.dm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 5dd1613e61..dc43ab8b07 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -12,19 +12,20 @@ var/hit_percent = (100-blocked)/100 if(!damage || (hit_percent <= 0)) return 0 + var/damage_amount = forced ? damage : damage * hit_percent switch(damagetype) if(BRUTE) - adjustBruteLoss(damage * hit_percent) + adjustBruteLoss(damage_amount, forced = forced) if(BURN) - adjustFireLoss(damage * hit_percent) + adjustFireLoss(damage_amount, forced = forced) if(TOX) - adjustToxLoss(damage * hit_percent) + adjustToxLoss(damage_amount, forced = forced) if(OXY) - adjustOxyLoss(damage * hit_percent) + adjustOxyLoss(damage_amount, forced = forced) if(CLONE) - adjustCloneLoss(damage * hit_percent) + adjustCloneLoss(damage_amount, forced = forced) if(STAMINA) - adjustStaminaLoss(damage * hit_percent) + adjustStaminaLoss(damage_amount, forced = forced) return 1 /mob/living/proc/apply_damage_type(damage = 0, damagetype = BRUTE) //like apply damage except it always uses the damage procs From 292b9979007f47938f1b89cf9a9451f723a37e44 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Wed, 23 Oct 2019 00:11:52 +0000 Subject: [PATCH 08/16] Update damage_procs.dm --- code/modules/mob/living/silicon/damage_procs.dm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/silicon/damage_procs.dm b/code/modules/mob/living/silicon/damage_procs.dm index 69d150b315..dd94e3e3f7 100644 --- a/code/modules/mob/living/silicon/damage_procs.dm +++ b/code/modules/mob/living/silicon/damage_procs.dm @@ -1,16 +1,17 @@ /mob/living/silicon/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE) var/hit_percent = (100-blocked)/100 - if(!damage || (hit_percent <= 0)) + if(!damage || (!forced && hit_percent <= 0)) return 0 + var/damage_amount = forced ? damage : damage * hit_percent switch(damagetype) if(BRUTE) - adjustBruteLoss(damage * hit_percent) + adjustBruteLoss(damage_amount, forced = forced) if(BURN) - adjustFireLoss(damage * hit_percent) + adjustFireLoss(damage_amount, forced = forced) if(OXY) - if(damage < 0) //we shouldn't be taking oxygen damage through this proc, but we'll let it heal. - adjustOxyLoss(damage * hit_percent) + if(damage < 0 || forced) //we shouldn't be taking oxygen damage through this proc, but we'll let it heal. + adjustOxyLoss(damage_amount, forced = forced) return 1 @@ -29,7 +30,7 @@ /mob/living/silicon/setCloneLoss(amount, updating_health = TRUE, forced = FALSE) return FALSE -/mob/living/silicon/adjustStaminaLoss(amount, updating_stamina = 1)//immune to stamina damage. +/mob/living/silicon/adjustStaminaLoss(amount, updating_stamina = 1, forced = FALSE)//immune to stamina damage. return FALSE /mob/living/silicon/setStaminaLoss(amount, updating_stamina = 1) From ffd160ebe890fcd2fe1b98ba0b8ebe6df07f0725 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Wed, 23 Oct 2019 00:13:00 +0000 Subject: [PATCH 09/16] Update pai_defense.dm --- code/modules/mob/living/silicon/pai/pai_defense.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/silicon/pai/pai_defense.dm b/code/modules/mob/living/silicon/pai/pai_defense.dm index f36e996b81..dda8ddfebd 100644 --- a/code/modules/mob/living/silicon/pai/pai_defense.dm +++ b/code/modules/mob/living/silicon/pai/pai_defense.dm @@ -81,8 +81,11 @@ /mob/living/silicon/pai/adjustCloneLoss(amount, updating_health = TRUE, forced = FALSE) return FALSE -/mob/living/silicon/pai/adjustStaminaLoss(amount) - take_holo_damage(amount & 0.25) +/mob/living/silicon/pai/adjustStaminaLoss(amount, updating_health, forced = FALSE) + if(forced) + take_holo_damage(amount) + else + take_holo_damage(amount * 0.25) /mob/living/silicon/pai/adjustOrganLoss(slot, amount, maximum = 500) //I kept this in, unlike tg Knockdown(amount * 0.2) From 1e0f31ad4a9662e61122a36817762452688c3543 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Wed, 23 Oct 2019 00:14:52 +0000 Subject: [PATCH 10/16] Update damage_procs.dm --- code/modules/mob/living/simple_animal/damage_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/damage_procs.dm b/code/modules/mob/living/simple_animal/damage_procs.dm index 1031c5b7ee..0cc097dc08 100644 --- a/code/modules/mob/living/simple_animal/damage_procs.dm +++ b/code/modules/mob/living/simple_animal/damage_procs.dm @@ -37,5 +37,5 @@ else if(damage_coeff[CLONE]) . = adjustHealth(amount * damage_coeff[CLONE] * CONFIG_GET(number/damage_multiplier), updating_health, forced) -/mob/living/simple_animal/adjustStaminaLoss(amount) +/mob/living/simple_animal/adjustStaminaLoss(amount, forced = FALSE) return From b78e6f27b6a544f707aa4967f54e4ab711f528a7 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Wed, 23 Oct 2019 00:18:21 +0000 Subject: [PATCH 11/16] ports #43784 --- code/modules/spells/spell_types/shapeshift.dm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/modules/spells/spell_types/shapeshift.dm b/code/modules/spells/spell_types/shapeshift.dm index 0f265607ca..46eb14013f 100644 --- a/code/modules/spells/spell_types/shapeshift.dm +++ b/code/modules/spells/spell_types/shapeshift.dm @@ -101,8 +101,10 @@ stored.forceMove(src) stored.notransform = TRUE if(source.convert_damage) - var/damapply = (stored.maxHealth - (stored.health + stored.maxHealth)/2) //Carbons go from -100 to 100 naturally, while simplemobs only go from 0 to 100. Can't do a direct conversion. - shape.apply_damage(damapply, source.convert_damage_type) + var/damage_percent = (stored.maxHealth - stored.health)/stored.maxHealth; + var/damapply = damage_percent * shape.maxHealth; + + shape.apply_damage(damapply, source.convert_damage_type, forced = TRUE); slink = soullink(/datum/soullink/shapeshift, stored , shape) slink.source = src @@ -152,8 +154,10 @@ stored.death() else if(source.convert_damage) stored.revive(full_heal = TRUE) - var/damapply = (shape.maxHealth - 2*shape.health) //Since we halved incoming damage, double outgoing. - stored.apply_damage(damapply, source.convert_damage_type) + var/damage_percent = (shape.maxHealth - shape.health)/shape.maxHealth; + var/damapply = stored.maxHealth * damage_percent + + stored.apply_damage(damapply, source.convert_damage_type, forced = TRUE) qdel(shape) qdel(src) From 3d63e9aa2057e8f60ada0474a45a39260fac3888 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Wed, 23 Oct 2019 00:50:05 +0000 Subject: [PATCH 12/16] throwing darts at the wall here --- code/modules/mob/living/carbon/damage_procs.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index fbed6001d2..27993fe330 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -19,13 +19,13 @@ switch(damagetype) if(BRUTE) if(BP) - if(damage > 0 ? BP.receive_damage(damage * hit_percent, 0) : BP.heal_damage(abs(damage * hit_percent), 0)) + if(damage > 0 ? BP.receive_damage(damage_amount, forced = forced) : BP.heal_damage(abs(damage_amount, forced = forced), 0)) update_damage_overlays() else //no bodypart, we deal damage with a more general method. adjustBruteLoss(damage_amount, forced = forced) if(BURN) if(BP) - if(damage > 0 ? BP.receive_damage(0, damage * hit_percent) : BP.heal_damage(0, abs(damage * hit_percent))) + if(damage > 0 ? BP.receive_damage(0, damage_amount, forced = forced) : BP.heal_damage(0, abs(damage_amount, forced = forced))) update_damage_overlays() else adjustFireLoss(damage_amount, forced = forced) From 3ec63ed12d910f971b44d279092160cbea3cecec Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Thu, 24 Oct 2019 02:32:21 +0000 Subject: [PATCH 13/16] I think I forgot this --- code/modules/mob/living/silicon/damage_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/damage_procs.dm b/code/modules/mob/living/silicon/damage_procs.dm index dd94e3e3f7..8fbd7afbdd 100644 --- a/code/modules/mob/living/silicon/damage_procs.dm +++ b/code/modules/mob/living/silicon/damage_procs.dm @@ -1,5 +1,5 @@ -/mob/living/silicon/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE) +/mob/living/silicon/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE) var/hit_percent = (100-blocked)/100 if(!damage || (!forced && hit_percent <= 0)) return 0 From 5a9f0aa1e484e7bfc2de0c2e31dc46db0b86df01 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Thu, 24 Oct 2019 02:33:48 +0000 Subject: [PATCH 14/16] this too --- code/modules/mob/living/carbon/human/species.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index a6032e4f85..76a7755648 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1986,7 +1986,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) H.damageoverlaytemp = 20 var/damage_amount = forced ? damage : damage * hit_percent * burnmod * H.physiology.burn_mod if(BP) - if(damage > 0 ? BP.receive_damage(0, damage_amount) : BP.heal_damage(0, abs(damage * hit_percent * burnmod * H.physiology.burn_mod))) + if(damage > 0 ? BP.receive_damage(0, damage_amount) : BP.heal_damage(0, abs(damage_amount))) H.update_damage_overlays() else H.adjustFireLoss(damage_amount) From c6939864c1dd391bd6d7c30223656a2a5e49c8f0 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Thu, 24 Oct 2019 02:42:38 +0000 Subject: [PATCH 15/16] and this --- code/modules/mob/living/carbon/damage_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 27993fe330..61d09a5f1f 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -37,7 +37,7 @@ adjustCloneLoss(damage_amount, forced = forced) if(STAMINA) if(BP) - if(damage > 0 ? BP.receive_damage(0, 0, damage * hit_percent) : BP.heal_damage(0, 0, abs(damage * hit_percent))) + if(damage > 0 ? BP.receive_damage(0, 0, damage_amount, forced = forced) : BP.heal_damage(0, 0, abs(damage_amount, forced = forced))) update_damage_overlays() else adjustStaminaLoss(damage_amount, forced = forced) From 3e9dfd644118aa963b15c9a8e8cb6727acd30a07 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Thu, 24 Oct 2019 02:59:15 +0000 Subject: [PATCH 16/16] i was suggested to try this --- code/modules/mob/living/carbon/damage_procs.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 61d09a5f1f..39a614fcbf 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -19,13 +19,13 @@ switch(damagetype) if(BRUTE) if(BP) - if(damage > 0 ? BP.receive_damage(damage_amount, forced = forced) : BP.heal_damage(abs(damage_amount, forced = forced), 0)) + if(damage > 0 ? BP.receive_damage(damage_amount) : BP.heal_damage(abs(damage_amount), 0)) update_damage_overlays() else //no bodypart, we deal damage with a more general method. adjustBruteLoss(damage_amount, forced = forced) if(BURN) if(BP) - if(damage > 0 ? BP.receive_damage(0, damage_amount, forced = forced) : BP.heal_damage(0, abs(damage_amount, forced = forced))) + if(damage > 0 ? BP.receive_damage(0, damage_amount) : BP.heal_damage(0, abs(damage_amount))) update_damage_overlays() else adjustFireLoss(damage_amount, forced = forced) @@ -37,7 +37,7 @@ adjustCloneLoss(damage_amount, forced = forced) if(STAMINA) if(BP) - if(damage > 0 ? BP.receive_damage(0, 0, damage_amount, forced = forced) : BP.heal_damage(0, 0, abs(damage_amount, forced = forced))) + if(damage > 0 ? BP.receive_damage(0, 0, damage_amount) : BP.heal_damage(0, 0, abs(damage_amount))) update_damage_overlays() else adjustStaminaLoss(damage_amount, forced = forced)