mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
blood mechanics tweaks (#7377)
This commit is contained in:
@@ -2,10 +2,13 @@
|
||||
BLOOD SYSTEM
|
||||
****************************************************/
|
||||
//Blood levels. These are percentages based on the species blood_volume var.
|
||||
//Retained for archival/reference purposes - KK
|
||||
/*
|
||||
var/const/BLOOD_VOLUME_SAFE = 85
|
||||
var/const/BLOOD_VOLUME_OKAY = 75
|
||||
var/const/BLOOD_VOLUME_BAD = 60
|
||||
var/const/BLOOD_VOLUME_SURVIVE = 40
|
||||
*/
|
||||
var/const/CE_STABLE_THRESHOLD = 0.5
|
||||
|
||||
/mob/living/carbon/human/var/datum/reagents/vessel // Container for blood and BLOOD ONLY. Do not transfer other chems here.
|
||||
@@ -88,22 +91,22 @@ var/const/CE_STABLE_THRESHOLD = 0.5
|
||||
// dmg_coef = min(1, 10/chem_effects[CE_STABLE]) //TODO: add effect for increased damage
|
||||
// threshold_coef = min(dmg_coef / CE_STABLE_THRESHOLD, 1)
|
||||
|
||||
if(blood_volume >= BLOOD_VOLUME_SAFE)
|
||||
if(blood_volume_raw >= species.blood_volume*species.blood_level_safe)
|
||||
if(pale)
|
||||
pale = 0
|
||||
update_icons_body()
|
||||
else if(blood_volume >= BLOOD_VOLUME_OKAY)
|
||||
else if(blood_volume_raw >= species.blood_volume*species.blood_level_warning)
|
||||
if(!pale)
|
||||
pale = 1
|
||||
update_icons_body()
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
to_chat(src, "<font color='red'>You feel [word]</font>")
|
||||
var/word = pick("dizzy","woozy","faint","disoriented","unsteady")
|
||||
to_chat(src, "<font color='red'>You feel slightly [word]</font>")
|
||||
if(prob(1))
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
var/word = pick("dizzy","woozy","faint","disoriented","unsteady")
|
||||
to_chat(src, "<font color='red'>You feel [word]</font>")
|
||||
if(getOxyLoss() < 20 * threshold_coef)
|
||||
adjustOxyLoss(3 * dmg_coef)
|
||||
else if(blood_volume >= BLOOD_VOLUME_BAD)
|
||||
else if(blood_volume_raw >= species.blood_volume*species.blood_level_danger)
|
||||
if(!pale)
|
||||
pale = 1
|
||||
update_icons_body()
|
||||
@@ -113,13 +116,13 @@ var/const/CE_STABLE_THRESHOLD = 0.5
|
||||
adjustOxyLoss(1 * dmg_coef)
|
||||
if(prob(15))
|
||||
Paralyse(rand(1,3))
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
to_chat(src, "<font color='red'>You feel extremely [word]</font>")
|
||||
else if(blood_volume >= BLOOD_VOLUME_SURVIVE)
|
||||
var/word = pick("dizzy","woozy","faint","disoriented","unsteady")
|
||||
to_chat(src, "<font color='red'>You feel dangerously [word]</font>")
|
||||
else if(blood_volume_raw >= species.blood_volume*species.blood_level_fatal)
|
||||
adjustOxyLoss(5 * dmg_coef)
|
||||
// adjustToxLoss(3 * dmg_coef)
|
||||
if(prob(15))
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
var/word = pick("dizzy","woozy","faint","disoriented","unsteady")
|
||||
to_chat(src, "<font color='red'>You feel extremely [word]</font>")
|
||||
else //Not enough blood to survive (usually)
|
||||
if(!pale)
|
||||
@@ -131,7 +134,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5
|
||||
adjustOxyLoss(75 * dmg_coef) // 15 more than dexp fixes (also more than dex+dexp+tricord)
|
||||
|
||||
// Without enough blood you slowly go hungry.
|
||||
if(blood_volume < BLOOD_VOLUME_SAFE)
|
||||
if(blood_volume_raw < species.blood_volume*species.blood_level_safe)
|
||||
if(nutrition >= 300)
|
||||
adjust_nutrition(-10)
|
||||
else if(nutrition >= 200)
|
||||
|
||||
@@ -525,7 +525,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
//Burn damage can cause fluid loss due to blistering and cook-off
|
||||
|
||||
if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT) && !(species.flags & NO_BLOOD))
|
||||
var/fluid_loss = 0.4 * (damage/(owner.getMaxHealth() - config.health_threshold_dead)) * owner.species.blood_volume*(1 - BLOOD_VOLUME_SURVIVE/100)
|
||||
var/fluid_loss = 0.4 * (damage/(owner.getMaxHealth() - config.health_threshold_dead)) * owner.species.blood_volume*(1 - owner.species.blood_level_fatal)
|
||||
owner.remove_blood(fluid_loss)
|
||||
|
||||
// first check whether we can widen an existing wound
|
||||
|
||||
Reference in New Issue
Block a user