mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Bloodloss now depends on wound type and limb
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/****************************************************
|
||||
BLOOD SYSTEM
|
||||
****************************************************/
|
||||
//Blood levels. These are percentages based on the species blood_volume far.
|
||||
//Blood levels. These are percentages based on the species blood_volume var.
|
||||
var/const/BLOOD_VOLUME_SAFE = 85
|
||||
var/const/BLOOD_VOLUME_OKAY = 75
|
||||
var/const/BLOOD_VOLUME_BAD = 60
|
||||
@@ -125,11 +125,23 @@ var/const/BLOOD_VOLUME_SURVIVE = 40
|
||||
|
||||
//Bleeding out
|
||||
var/blood_max = 0
|
||||
var/blood_loss_divisor = 30 //lower factor = more blood loss
|
||||
//This 30 is the "baseline" of a cut in the "vital" regions (head and torso).
|
||||
for(var/obj/item/organ/external/temp in organs)
|
||||
if(!(temp.status & ORGAN_BLEEDING) || (temp.robotic >= ORGAN_ROBOT))
|
||||
continue
|
||||
for(var/datum/wound/W in temp.wounds)
|
||||
if(W.bleeding())
|
||||
if(W.damage_type == PIERCE) //gunshots and spear stabs bleed more
|
||||
blood_loss_divisor -= 5
|
||||
if(W.damage_type == BRUISE) //bruises bleed less
|
||||
blood_loss_divisor += 5
|
||||
//the farther you get from those vital regions, the less you bleed
|
||||
//depending on how dangerous bleeding turns out to be, it might be better to only apply the reduction to hands and feet
|
||||
if((temp.organ_tag == ARM_LEFT) || (temp.organ_tag == ARM_RIGHT) || (temp.organ_tag == LEG_LEFT) || (temp.organ_tag == LEG_RIGHT))
|
||||
blood_loss_divisor += 5
|
||||
if((temp.organ_tag == HAND_LEFT) || (temp.organ_tag == HAND_RIGHT) || (temp.organ_tag == FOOT_LEFT) || (temp.organ_tag == FOOT_RIGHT))
|
||||
blood_loss_divisor += 10
|
||||
if(temp.applied_pressure)
|
||||
if(ishuman(temp.applied_pressure))
|
||||
var/mob/living/carbon/human/H = temp.applied_pressure
|
||||
@@ -139,9 +151,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 40
|
||||
var/min_eff_damage = max(0, W.damage - 10) / 6 //still want a little bit to drip out, for effect
|
||||
blood_max += max(min_eff_damage, W.damage - 30) / 30
|
||||
else
|
||||
blood_max += W.damage / 30
|
||||
if (temp.open)
|
||||
blood_max += 2 //Yer stomach is cut open
|
||||
blood_max += W.damage / blood_loss_divisor
|
||||
drip(blood_max)
|
||||
|
||||
//Makes a blood drop, leaking amt units of blood from the mob
|
||||
|
||||
Reference in New Issue
Block a user