From 48739b563ec0a92671128e56e10f4021b6e9f28f Mon Sep 17 00:00:00 2001 From: XDTM Date: Sat, 28 Apr 2018 11:47:55 +0200 Subject: [PATCH 1/2] Changes the trauma formula so constant small ticks don't keep triggering traumas --- code/modules/mob/living/carbon/damage_procs.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 8aa52e6c867..45ffeee0f70 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -217,7 +217,7 @@ //Some sources of brain damage shouldn't be deadly /mob/living/carbon/adjustBrainLoss(amount, maximum = BRAIN_DAMAGE_DEATH) if(status_flags & GODMODE) - return 0 + return FALSE var/prev_brainloss = getBrainLoss() var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN) if(!B) @@ -227,20 +227,20 @@ return var/brainloss = getBrainLoss() if(brainloss > BRAIN_DAMAGE_MILD) - if(prob((amount * 2) + (brainloss - BRAIN_DAMAGE_MILD - (20 * LAZYLEN(get_traumas())) / 5))) //1 damage|50 brain damage = 4% chance + if(prob(amount * ((2 * (100 + brainloss - BRAIN_DAMAGE_MILD)) / 100))) //Base chance is the hit damage; for every point of damage past the threshold the chance is increased by 2% gain_trauma_type(BRAIN_TRAUMA_MILD) if(brainloss > BRAIN_DAMAGE_SEVERE) - if(prob(amount + (brainloss - BRAIN_DAMAGE_SEVERE - (20 * LAZYLEN(get_traumas())) / 15))) //1 damage|150 brain damage = 3% chance + if(prob(amount * ((2 * (100 + brainloss - BRAIN_DAMAGE_SEVERE)) / 100))) //Base chance is the hit damage; for every point of damage past the threshold the chance is increased by 2% if(prob(20)) gain_trauma_type(BRAIN_TRAUMA_SPECIAL) else gain_trauma_type(BRAIN_TRAUMA_SEVERE) - if(prev_brainloss < 40 && brainloss >= 40) + if(prev_brainloss < BRAIN_DAMAGE_MILD && brainloss >= BRAIN_DAMAGE_MILD) to_chat(src, "You feel lightheaded.") - else if(prev_brainloss < 120 && brainloss >= 120) + else if(prev_brainloss < BRAIN_DAMAGE_SEVERE && brainloss >= BRAIN_DAMAGE_SEVERE) to_chat(src, "You feel less in control of your thoughts.") - else if(prev_brainloss < 180 && brainloss >= 180) + else if(prev_brainloss < (BRAIN_DAMAGE_DEATH - 20) && (BRAIN_DAMAGE_DEATH - 20)) to_chat(src, "You can feel your mind flickering on and off...") /mob/living/carbon/setBrainLoss(amount) From e733e139c55e000fab5e6edbd85f83b56326333e Mon Sep 17 00:00:00 2001 From: XDTM Date: Tue, 1 May 2018 12:23:20 +0200 Subject: [PATCH 2/2] fix --- 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 45ffeee0f70..8a801d3c13c 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -240,7 +240,7 @@ to_chat(src, "You feel lightheaded.") else if(prev_brainloss < BRAIN_DAMAGE_SEVERE && brainloss >= BRAIN_DAMAGE_SEVERE) to_chat(src, "You feel less in control of your thoughts.") - else if(prev_brainloss < (BRAIN_DAMAGE_DEATH - 20) && (BRAIN_DAMAGE_DEATH - 20)) + else if(prev_brainloss < (BRAIN_DAMAGE_DEATH - 20) && brainloss >= (BRAIN_DAMAGE_DEATH - 20)) to_chat(src, "You can feel your mind flickering on and off...") /mob/living/carbon/setBrainLoss(amount)