From 70e9c69ff35525517b2091b05c9606059e1c1b11 Mon Sep 17 00:00:00 2001 From: Killian <49700375+KillianKirilenko@users.noreply.github.com> Date: Mon, 13 Jul 2020 17:08:25 +0100 Subject: [PATCH 1/2] pain_mod implementation (#7330) --- .../mob/living/carbon/human/human_damage.dm | 14 ++++++++++++++ .../mob/living/carbon/human/species/species.dm | 1 + 2 files changed, 15 insertions(+) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 9388240af6..b8343ad694 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -288,6 +288,20 @@ oxyloss = 0 else ..() + +/mob/living/carbon/human/adjustHalLoss(var/amount) + if(species.flags & NO_PAIN) + halloss = 0 + else + if(amount > 0) //only multiply it by the mod if it's positive, or else it takes longer to fade too! + amount = amount*species.pain_mod + ..(amount) + +/mob/living/carbon/human/setHalLoss(var/amount) + if(species.flags & NO_PAIN) + halloss = 0 + else + ..() /mob/living/carbon/human/getToxLoss() if(species.flags & NO_POISON) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index c9eb8216d1..619e011510 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -95,6 +95,7 @@ var/chemOD_threshold = 1 // Multiplier to overdose threshold; lower = easier overdosing var/chemOD_mod = 1 // Damage modifier for overdose; higher = more damage from ODs var/alcohol_mod = 1 // Multiplier to alcohol strength; 0.5 = half, 0 = no effect at all, 2 = double, etc. + var/pain_mod = 1 // Multiplier to pain effects; 0.5 = half, 0 = no effect (equal to NO_PAIN, really), 2 = double, etc. // set below is EMP interactivity for nonsynth carbons var/emp_sensitivity = 0 // bitflag. valid flags are: EMP_PAIN, EMP_BLIND, EMP_DEAFEN, EMP_CONFUSE, EMP_STUN, and EMP_(BRUTE/BURN/TOX/OXY)_DMG var/emp_dmg_mod = 1 // Multiplier to all EMP damage sustained by the mob, if it's EMP-sensitive