diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index 5b898debb340..72a95074e574 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -33,19 +33,31 @@ b_volume *= Clamp(100 - (2 * heart.damage), 30, 100) / 100 //Effects of bloodloss + if(b_volume <= BLOOD_VOLUME_SAFE) + /// The blood volume turned into a %, with BLOOD_VOLUME_NORMAL being 100% + var/blood_percentage = b_volume / (BLOOD_VOLUME_NORMAL / 100) + /// How much oxyloss will there be from the next time blood processes + var/additional_oxyloss = (100 - blood_percentage) / 5 + /// The limit of the oxyloss gained, ignoring oxyloss from the switch statement + var/maximum_oxyloss = Clamp((100 - blood_percentage) / 2, oxyloss, 100) + if(oxyloss < maximum_oxyloss) + oxyloss += max(additional_oxyloss, 0) + + //Bloodloss effects on nutrition + if(nutrition >= 300) + nutrition -= 10 + else if(nutrition >= 200) + nutrition -= 3 + switch(b_volume) if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE) if(prob(1)) var/word = pick("dizzy","woozy","faint") to_chat(src, SPAN_DANGER("You feel [word].")) - if(oxyloss < 20) - oxyloss += 3 if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY) if(eye_blurry < 50) AdjustEyeBlur(6) - if(oxyloss < 50) - oxyloss += 10 - oxyloss += 2 + oxyloss += 3 if(prob(15)) apply_effect(rand(1,3), PARALYZE) var/word = pick("dizzy","woozy","faint") @@ -53,7 +65,7 @@ if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD) if(eye_blurry < 50) AdjustEyeBlur(6) - oxyloss += 5 + oxyloss += 8 toxloss += 3 if(prob(15)) apply_effect(rand(1,3), PARALYZE) @@ -62,13 +74,6 @@ if(0 to BLOOD_VOLUME_SURVIVE) death(create_cause_data("blood loss")) - // Without enough blood you slowly go hungry. - if(blood_volume < BLOOD_VOLUME_SAFE) - if(nutrition >= 300) - nutrition -= 10 - else if(nutrition >= 200) - nutrition -= 3 - // Xeno blood regeneration /mob/living/carbon/xenomorph/handle_blood() if(stat != DEAD) //Only living xenos regenerate blood