From 753fa182bdae58bfe5b31b48a210cb2f6eddabb6 Mon Sep 17 00:00:00 2001 From: Kierany9 Date: Tue, 5 Feb 2019 20:06:12 +0100 Subject: [PATCH] Trauma gain formula fix/tweak (#42619) * bad math * cyberboss --- 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 cfbb4c8e05f..fe6612fc166 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -231,10 +231,10 @@ return var/brainloss = getBrainLoss() if(brainloss > BRAIN_DAMAGE_MILD) - 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% + if(prob(amount * (1 + max(0, (brainloss - BRAIN_DAMAGE_MILD)/100)))) //Base chance is the hit damage; for every point of damage past the threshold the chance is increased by 1% //learn how to do your bloody math properly goddamnit gain_trauma_type(BRAIN_TRAUMA_MILD) if(brainloss > BRAIN_DAMAGE_SEVERE) - 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(amount * (1 + max(0, (brainloss - BRAIN_DAMAGE_SEVERE)/100)))) //Base chance is the hit damage; for every point of damage past the threshold the chance is increased by 1% if(prob(20)) gain_trauma_type(BRAIN_TRAUMA_SPECIAL) else