[MIRROR] Proper MaxHealth checks and Crit Point (#10881)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-05-16 00:25:21 -07:00
committed by GitHub
parent 901dc552fc
commit 4ce45f8cc4
46 changed files with 92 additions and 94 deletions

View File

@@ -1,12 +1,6 @@
/datum/config_entry/number/health_threshold_softcrit /datum/config_entry/number/health_threshold_softcrit
default = 0 default = 0
/datum/config_entry/number/health_threshold_crit
default = 0
/datum/config_entry/number/health_threshold_dead
default = -100
/datum/config_entry/flag/bones_can_break /datum/config_entry/flag/bones_can_break
/datum/config_entry/flag/limbs_can_break /datum/config_entry/flag/limbs_can_break

View File

@@ -478,8 +478,8 @@
if(!allowed || (NOCLONE in WC.mutations) || !WC.dna) if(!allowed || (NOCLONE in WC.mutations) || !WC.dna)
occupantData["isViableSubject"] = 0 occupantData["isViableSubject"] = 0
occupantData["health"] = WC.health occupantData["health"] = WC.health
occupantData["maxHealth"] = WC.maxHealth occupantData["maxHealth"] = WC.getMaxHealth()
occupantData["minHealth"] = CONFIG_GET(number/health_threshold_dead) occupantData["minHealth"] = -(WC.getMaxHealth())
occupantData["uniqueEnzymes"] = WC.dna.unique_enzymes occupantData["uniqueEnzymes"] = WC.dna.unique_enzymes
occupantData["uniqueIdentity"] = WC.dna.uni_identity occupantData["uniqueIdentity"] = WC.dna.uni_identity
occupantData["structuralEnzymes"] = WC.dna.struc_enzymes occupantData["structuralEnzymes"] = WC.dna.struc_enzymes

View File

@@ -37,7 +37,7 @@
C.does_not_breathe = 0 //This means they don't autoheal the oxy damage from the next step C.does_not_breathe = 0 //This means they don't autoheal the oxy damage from the next step
if(C.stat != DEAD) if(C.stat != DEAD)
C.adjustOxyLoss(C.maxHealth * 2) C.adjustOxyLoss(C.getMaxHealth() * 2)
C.forbid_seeing_deadchat = TRUE C.forbid_seeing_deadchat = TRUE

View File

@@ -23,7 +23,7 @@
var/mob/living/carbon/human/C = src var/mob/living/carbon/human/C = src
var/healing_amount = 40 var/healing_amount = 40
if(src.mind.changeling.recursive_enhancement) if(src.mind.changeling.recursive_enhancement)
healing_amount = C.maxHealth healing_amount = C.getMaxHealth()
to_chat(src, span_notice("We completely heal ourselves.")) to_chat(src, span_notice("We completely heal ourselves."))
spawn(0) spawn(0)
C.adjustBruteLoss(-healing_amount) C.adjustBruteLoss(-healing_amount)

View File

@@ -109,7 +109,7 @@
if(src.imprinted != "empty") if(src.imprinted != "empty")
to_chat(U, span_danger("Capture failed!") + ": The soul stone has already been imprinted with [src.imprinted]'s mind!") to_chat(U, span_danger("Capture failed!") + ": The soul stone has already been imprinted with [src.imprinted]'s mind!")
return return
if ((T.health + T.halloss) > CONFIG_GET(number/health_threshold_crit) && T.stat != DEAD) if ((T.health + T.halloss) > T.get_crit_point() && T.stat != DEAD)
to_chat(U, span_danger("Capture failed!") + ": Kill or maim the victim first!") to_chat(U, span_danger("Capture failed!") + ": Kill or maim the victim first!")
return return
if(T.client == null) if(T.client == null)

View File

@@ -50,7 +50,7 @@
/obj/item/inserted_spell/asphyxiation/on_expire() /obj/item/inserted_spell/asphyxiation/on_expire()
..() ..()
// if((getOxyLoss() > (species.total_health/2)) || (health <= config.health_threshold_crit)) // if((getOxyLoss() > (species.total_health/2)) || (health <= get_crit_point())
/obj/item/inserted_spell/asphyxiation/proc/predict_crit(var/pulses_remaining, var/mob/living/carbon/human/victim, var/previous_damage = 0) /obj/item/inserted_spell/asphyxiation/proc/predict_crit(var/pulses_remaining, var/mob/living/carbon/human/victim, var/previous_damage = 0)
if(pulses_remaining <= 0) // Infinite loop protection if(pulses_remaining <= 0) // Infinite loop protection

View File

@@ -189,8 +189,8 @@
occupantData["name"] = occupant.name occupantData["name"] = occupant.name
occupantData["stat"] = occupant.stat occupantData["stat"] = occupant.stat
occupantData["health"] = occupant.health occupantData["health"] = occupant.health
occupantData["maxHealth"] = occupant.maxHealth occupantData["maxHealth"] = occupant.getMaxHealth()
occupantData["minHealth"] = CONFIG_GET(number/health_threshold_dead) occupantData["minHealth"] = -(occupant.getMaxHealth())
occupantData["bruteLoss"] = occupant.getBruteLoss() occupantData["bruteLoss"] = occupant.getBruteLoss()
occupantData["oxyLoss"] = occupant.getOxyLoss() occupantData["oxyLoss"] = occupant.getOxyLoss()
occupantData["toxLoss"] = occupant.getToxLoss() occupantData["toxLoss"] = occupant.getToxLoss()

View File

@@ -35,7 +35,7 @@
else else
var/h_ratio var/h_ratio
if(occupant) if(occupant)
h_ratio = occupant.health / occupant.maxHealth h_ratio = occupant.health / occupant.getMaxHealth()
switch(h_ratio) switch(h_ratio)
if(1.000) if(1.000)
icon_state = "scanner_green" icon_state = "scanner_green"

View File

@@ -67,8 +67,8 @@
occupantData["name"] = occupant.name occupantData["name"] = occupant.name
occupantData["stat"] = occupant.stat occupantData["stat"] = occupant.stat
occupantData["health"] = occupant.health occupantData["health"] = occupant.health
occupantData["maxHealth"] = occupant.maxHealth occupantData["maxHealth"] = occupant.getMaxHealth()
occupantData["minHealth"] = CONFIG_GET(number/health_threshold_dead) occupantData["minHealth"] = -(occupant.getMaxHealth())
occupantData["bruteLoss"] = occupant.getBruteLoss() occupantData["bruteLoss"] = occupant.getBruteLoss()
occupantData["oxyLoss"] = occupant.getOxyLoss() occupantData["oxyLoss"] = occupant.getOxyLoss()
occupantData["toxLoss"] = occupant.getToxLoss() occupantData["toxLoss"] = occupant.getToxLoss()
@@ -177,8 +177,8 @@
playsound(src.loc, 'sound/machines/defib_success.ogg', 50, 0) playsound(src.loc, 'sound/machines/defib_success.ogg', 50, 0)
if(oxy && victim.getOxyLoss()>oxyAlarm) if(oxy && victim.getOxyLoss()>oxyAlarm)
playsound(src.loc, 'sound/machines/defib_safetyOff.ogg', 50, 0) playsound(src.loc, 'sound/machines/defib_safetyOff.ogg', 50, 0)
if(healthAnnounce && ((victim.health / victim.maxHealth) * 100) <= healthAlarm) if(healthAnnounce && ((victim.health / victim.getMaxHealth()) * 100) <= healthAlarm)
atom_say("[round(((victim.health / victim.maxHealth) * 100))]% health.") atom_say("[round(((victim.health / victim.getMaxHealth()) * 100))]% health.")
// Surgery Helpers // Surgery Helpers
/obj/machinery/computer/operating/proc/build_surgery_list(mob/user) /obj/machinery/computer/operating/proc/build_surgery_list(mob/user)

View File

@@ -138,7 +138,7 @@
locked_down = R.lockcharge, locked_down = R.lockcharge,
locstring = "[A.name] ([T.x], [T.y])", locstring = "[A.name] ([T.x], [T.y])",
status = R.stat, status = R.stat,
health = round(R.health * 100 / R.maxHealth, 0.1), health = round(R.health * 100 / R.getMaxHealth(), 0.1),
charge = R.cell ? round(R.cell.percent()) : null, charge = R.cell ? round(R.cell.percent()) : null,
cell_capacity = R.cell ? R.cell.maxcharge : null, cell_capacity = R.cell ? R.cell.maxcharge : null,
module = R.module ? R.module.name : "No Module Detected", module = R.module ? R.module.name : "No Module Detected",

View File

@@ -113,7 +113,7 @@
occupantData["stat"] = occupant.stat occupantData["stat"] = occupant.stat
occupantData["health"] = occupant.health occupantData["health"] = occupant.health
occupantData["maxHealth"] = occupant.getMaxHealth() occupantData["maxHealth"] = occupant.getMaxHealth()
occupantData["minHealth"] = CONFIG_GET(number/health_threshold_dead) occupantData["minHealth"] = -(occupant.getMaxHealth())
occupantData["bruteLoss"] = occupant.getBruteLoss() occupantData["bruteLoss"] = occupant.getBruteLoss()
occupantData["oxyLoss"] = occupant.getOxyLoss() occupantData["oxyLoss"] = occupant.getOxyLoss()
occupantData["toxLoss"] = occupant.getToxLoss() occupantData["toxLoss"] = occupant.getToxLoss()

View File

@@ -104,7 +104,7 @@
holder.icon_state = "hudhealth-100" holder.icon_state = "hudhealth-100"
C.images += holder C.images += holder
else else
holder.icon_state = RoundHealth((patient.health-config.health_threshold_crit)/(patient.getMaxHealth()-config.health_threshold_crit)*100) holder.icon_state = RoundHealth((-patient.getMaxHealth()*0.5))/(patient.getMaxHealth()-(-getMaxHealth()*0.5)*100)
C.images += holder C.images += holder
holder = patient.hud_list[STATUS_HUD] holder = patient.hud_list[STATUS_HUD]

View File

@@ -298,10 +298,10 @@
H.updatehealth() H.updatehealth()
if(H.isSynthetic()) if(H.isSynthetic())
if(H.health + H.getOxyLoss() + H.getToxLoss() <= CONFIG_GET(number/health_threshold_dead)) if(H.health + H.getOxyLoss() + H.getToxLoss() <= -(H.getMaxHealth()))
return "buzzes, \"Resuscitation failed - Severe damage detected. Begin damage restoration before further attempts.\"" return "buzzes, \"Resuscitation failed - Severe damage detected. Begin damage restoration before further attempts.\""
else if(H.health + H.getOxyLoss() <= CONFIG_GET(number/health_threshold_dead)) //They need to be healed first. else if(H.health + H.getOxyLoss() <= -(H.getMaxHealth())) //They need to be healed first.
return "buzzes, \"Resuscitation failed - Severe tissue damage detected. Repair of anatomical damage required.\"" return "buzzes, \"Resuscitation failed - Severe tissue damage detected. Repair of anatomical damage required.\""
else if(HUSK in H.mutations) //Husked! Need to fix their husk status first. else if(HUSK in H.mutations) //Husked! Need to fix their husk status first.
@@ -434,7 +434,7 @@
H.apply_damage(burn_damage_amt, BURN, BP_TORSO) H.apply_damage(burn_damage_amt, BURN, BP_TORSO)
//set oxyloss so that the patient is just barely in crit, if possible //set oxyloss so that the patient is just barely in crit, if possible
var/barely_in_crit = CONFIG_GET(number/health_threshold_crit) - 1 var/barely_in_crit = H.get_crit_point() - 1
var/adjust_health = barely_in_crit - H.health //need to increase health by this much var/adjust_health = barely_in_crit - H.health //need to increase health by this much
H.adjustOxyLoss(-adjust_health) H.adjustOxyLoss(-adjust_health)

View File

@@ -44,7 +44,7 @@
if(user == owner && bound_mob) if(user == owner && bound_mob)
. += span_notice("[bound_mob]'s crystal") . += span_notice("[bound_mob]'s crystal")
if(isanimal(bound_mob)) if(isanimal(bound_mob))
. += span_notice("[bound_mob.health / bound_mob.maxHealth * 100]%") . += span_notice("[bound_mob.health / bound_mob.getMaxHealth() * 100]%")
if(bound_mob.ooc_notes) if(bound_mob.ooc_notes)
. += span_deptradio("OOC Notes:") + " <a href='byond://?src=\ref[bound_mob];ooc_notes=1'>\[View\]</a> - <a href='byond://?src=\ref[src];print_ooc_notes_chat=1'>\[Print\]</a>" . += span_deptradio("OOC Notes:") + " <a href='byond://?src=\ref[bound_mob];ooc_notes=1'>\[View\]</a> - <a href='byond://?src=\ref[src];print_ooc_notes_chat=1'>\[Print\]</a>"
. += span_deptradio("<a href='byond://?src=\ref[bound_mob];vore_prefs=1'>\[Mechanical Vore Preferences\]</a>") . += span_deptradio("<a href='byond://?src=\ref[bound_mob];vore_prefs=1'>\[Mechanical Vore Preferences\]</a>")
@@ -275,10 +275,10 @@
/obj/item/capture_crystal/proc/capture_chance(mob/living/M, user) /obj/item/capture_crystal/proc/capture_chance(mob/living/M, user)
if(capture_chance_modifier >= 100) //Master crystal always work if(capture_chance_modifier >= 100) //Master crystal always work
return 100 return 100
var/capture_chance = ((1 - (M.health / M.maxHealth)) * 100) //Inverted health percent! 100% = 0% var/capture_chance = ((1 - (M.health / M.getMaxHealth())) * 100) //Inverted health percent! 100% = 0%
//So I don't know how this works but here's a kind of explanation //So I don't know how this works but here's a kind of explanation
//Basic chance + ((Mob's max health - minimum calculated health) / (Max allowed health - Min allowed health)*(Chance at Max allowed health - Chance at minimum allowed health) //Basic chance + ((Mob's max health - minimum calculated health) / (Max allowed health - Min allowed health)*(Chance at Max allowed health - Chance at minimum allowed health)
capture_chance += 35 + ((M.maxHealth - 5)/ (1000-5)*(-100 - 35)) capture_chance += 35 + ((M.getMaxHealth() - 5)/ (1000-5)*(-100 - 35))
//Basically! Mobs over 1000 max health will be unable to be caught without using status effects. //Basically! Mobs over 1000 max health will be unable to be caught without using status effects.
//Thanks Aronai! //Thanks Aronai!
var/effect_count = 0 //This will give you a smol chance to capture if you have applied status effects, even if the chance would ordinarily be <0 var/effect_count = 0 //This will give you a smol chance to capture if you have applied status effects, even if the chance would ordinarily be <0

View File

@@ -65,8 +65,8 @@
if(DPS > 0) if(DPS > 0)
to_chat(user, span_notice("At your maximum health ([user.getMaxHealth()]), it would take approximately;")) to_chat(user, span_notice("At your maximum health ([user.getMaxHealth()]), it would take approximately;"))
to_chat(user, span_notice("[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_softcrit)) / DPS] seconds to softcrit you. ([CONFIG_GET(number/health_threshold_softcrit)] health)")) to_chat(user, span_notice("[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_softcrit)) / DPS] seconds to softcrit you. ([CONFIG_GET(number/health_threshold_softcrit)] health)"))
to_chat(user, span_notice("[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_crit)) / DPS] seconds to hardcrit you. ([CONFIG_GET(number/health_threshold_crit)] health)")) to_chat(user, span_notice("[(user.getMaxHealth() - user.get_crit_point()) / DPS] seconds to hardcrit you. ([user.get_crit_point()] health)"))
to_chat(user, span_notice("[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_dead)) / DPS] seconds to kill you. ([CONFIG_GET(number/health_threshold_dead)] health)")) to_chat(user, span_notice("[(user.getMaxHealth() - (-user.getMaxHealth())) / DPS] seconds to kill you. ([(-user.getMaxHealth())] health)"))
else else
to_chat(user, span_warning("You need to be a living mob, with hands, and for an object to be in your active hand, to use this verb.")) to_chat(user, span_warning("You need to be a living mob, with hands, and for an object to be in your active hand, to use this verb."))

View File

@@ -159,7 +159,7 @@
return FALSE return FALSE
//VOREStation add start //VOREStation add start
else if(forgive_resting && !isbelly(holder.loc)) //Doing it this way so we only think about the other conditions if the var is actually set else if(forgive_resting && !isbelly(holder.loc)) //Doing it this way so we only think about the other conditions if the var is actually set
if((holder.health == holder.maxHealth) && !hostile && (L.resting || L.weakened || L.stunned)) //If our health is full, no one is fighting us, we can forgive if((holder.health == holder.getMaxHealth()) && !hostile && (L.resting || L.weakened || L.stunned)) //If our health is full, no one is fighting us, we can forgive
var/mob/living/simple_mob/vore/eater = holder var/mob/living/simple_mob/vore/eater = holder
if(!eater.will_eat(L)) //We forgive people we can eat by eating them if(!eater.will_eat(L)) //We forgive people we can eat by eating them
set_stance(STANCE_IDLE) set_stance(STANCE_IDLE)

View File

@@ -65,7 +65,7 @@
intent = (L.a_intent ? L.a_intent : I_HELP) intent = (L.a_intent ? L.a_intent : I_HELP)
new_path = FALSE new_path = FALSE
data["max_health"] = L.maxHealth data["max_health"] = L.getMaxHealth()
data["health"] = L.health data["health"] = L.health
if(isanimal(L)) if(isanimal(L))
var/mob/living/simple_mob/S = L var/mob/living/simple_mob/S = L

View File

@@ -94,7 +94,7 @@
silent = 0 silent = 0
deaf_loop.stop() // CHOMPStation Add: Ear Ringing/Deafness - Not sure if we need this, but, safety. deaf_loop.stop() // CHOMPStation Add: Ear Ringing/Deafness - Not sure if we need this, but, safety.
else //ALIVE. LIGHTS ARE ON else //ALIVE. LIGHTS ARE ON
if( !container && (health < CONFIG_GET(number/health_threshold_dead) || ((world.time - timeofhostdeath) > CONFIG_GET(number/revival_brain_life))) ) if( !container && (health < -getMaxHealth() || ((world.time - timeofhostdeath) > CONFIG_GET(number/revival_brain_life))) )
death() death()
blinded = 1 blinded = 1
silent = 0 silent = 0

View File

@@ -2,7 +2,7 @@
//Start of a breath chain, calls breathe() //Start of a breath chain, calls breathe()
/mob/living/carbon/handle_breathing() /mob/living/carbon/handle_breathing()
if(SSair.current_cycle%4==2 || failed_last_breath || (health < CONFIG_GET(number/health_threshold_crit))) //First, resolve location and get a breath if(SSair.current_cycle%4==2 || failed_last_breath || (health < get_crit_point())) //First, resolve location and get a breath
breathe() breathe()
/mob/living/carbon/proc/breathe() /mob/living/carbon/proc/breathe()
@@ -12,7 +12,7 @@
var/datum/gas_mixture/breath = null var/datum/gas_mixture/breath = null
//First, check if we can breathe at all //First, check if we can breathe at all
if(health < CONFIG_GET(number/health_threshold_crit) && !(CE_STABLE in chem_effects)) //crit aka circulatory shock if(health < get_crit_point() && !(CE_STABLE in chem_effects)) //crit aka circulatory shock
AdjustLosebreath(1) AdjustLosebreath(1)
if(losebreath>0) //Suffocating so do not take a breath if(losebreath>0) //Suffocating so do not take a breath

View File

@@ -166,11 +166,11 @@
return shock_damage return shock_damage
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M) /mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
if (src.health >= CONFIG_GET(number/health_threshold_crit)) if (health >= get_crit_point())
if(src == M && ishuman(src)) if(src == M && ishuman(src))
var/mob/living/carbon/human/H = src var/mob/living/carbon/human/H = src
var/datum/gender/T = GLOB.gender_datums[H.get_visible_gender()] var/datum/gender/T = GLOB.gender_datums[H.get_visible_gender()]
src.visible_message( \ visible_message( \
span_notice("[src] examines [T.himself]."), \ span_notice("[src] examines [T.himself]."), \
span_notice("You check yourself for injuries.") \ span_notice("You check yourself for injuries.") \
) )

View File

@@ -116,7 +116,7 @@
return FALSE; return FALSE;
//todo: make this whole CPR check into it's own individual proc instead of hogging up attack_hand_help_intent //todo: make this whole CPR check into it's own individual proc instead of hogging up attack_hand_help_intent
if((istype(H) && (health < CONFIG_GET(number/health_threshold_crit)) || stat == DEAD) && !on_fire) //Only humans can do CPR. if((istype(H) && (health < get_crit_point()) || stat == DEAD) && !on_fire) //Only humans can do CPR.
if(!H.check_has_mouth()) if(!H.check_has_mouth())
to_chat(H, span_danger("You don't have a mouth, you cannot perform CPR!")) to_chat(H, span_danger("You don't have a mouth, you cannot perform CPR!"))
return FALSE return FALSE
@@ -576,7 +576,7 @@
chest.fracture() chest.fracture()
// standard CPR ahead, adjust oxy and refresh health // standard CPR ahead, adjust oxy and refresh health
if(health > CONFIG_GET(number/health_threshold_crit) && prob(10)) if(health > get_crit_point() && prob(10))
if(get_xenochimera_component()) if(get_xenochimera_component())
visible_message(span_danger("\The [src]'s body twitches and gurgles a bit.")) visible_message(span_danger("\The [src]'s body twitches and gurgles a bit."))
to_chat(reviver, span_danger("You get the feeling [src] can't be revived by CPR alone.")) to_chat(reviver, span_danger("You get the feeling [src] can't be revived by CPR alone."))
@@ -628,7 +628,7 @@
// A bit of sanity. // A bit of sanity.
var/brain_damage = between(getBrainLoss(), damage_calc, brain.max_damage) var/brain_damage = between(getBrainLoss(), damage_calc, brain.max_damage)
setBrainLoss(brain_damage) setBrainLoss(brain_damage)
else if(health > CONFIG_GET(number/health_threshold_dead)) else if(health > -getMaxHealth())
adjustOxyLoss(-(min(getOxyLoss(), 5))) adjustOxyLoss(-(min(getOxyLoss(), 5)))
updatehealth() updatehealth()
to_chat(src, span_notice("You feel a breath of fresh air enter your lungs. It feels good.")) to_chat(src, span_notice("You feel a breath of fresh air enter your lungs. It feels good."))

View File

@@ -28,7 +28,7 @@
switch(damage) switch(damage)
if(-INFINITY to 0) if(-INFINITY to 0)
//TODO: fix husking //TODO: fix husking
if( ((getMaxHealth() - total_burn) < CONFIG_GET(number/health_threshold_dead) * huskmodifier) && stat == DEAD) // CHOMPEdit if( ((getMaxHealth() - total_burn) < (-getMaxHealth()) * huskmodifier) && stat == DEAD) // CHOMPEdit
ChangeToHusk() ChangeToHusk()
return return
if(1 to 25) if(1 to 25)
@@ -43,7 +43,7 @@
// CHOMPEdit End: Pain // CHOMPEdit End: Pain
//TODO: fix husking //TODO: fix husking
if( ((getMaxHealth() - total_burn) < CONFIG_GET(number/health_threshold_dead) * huskmodifier) && stat == DEAD) if( ((getMaxHealth() - total_burn) < (-getMaxHealth()) * huskmodifier) && stat == DEAD)
ChangeToHusk() ChangeToHusk()
return return

View File

@@ -558,7 +558,7 @@
if(!breath || (breath.total_moles == 0)) if(!breath || (breath.total_moles == 0))
failed_last_breath = 1 failed_last_breath = 1
if(health > CONFIG_GET(number/health_threshold_crit)) if(health > get_crit_point())
adjustOxyLoss(HUMAN_MAX_OXYLOSS) adjustOxyLoss(HUMAN_MAX_OXYLOSS)
else else
adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS) adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
@@ -1242,7 +1242,7 @@
else //ALIVE. LIGHTS ARE ON else //ALIVE. LIGHTS ARE ON
updatehealth() //TODO updatehealth() //TODO
if(health <= CONFIG_GET(number/health_threshold_dead) || (should_have_organ(O_BRAIN) && !has_brain())) if(health <= (-getMaxHealth()) || (should_have_organ(O_BRAIN) && !has_brain()))
death() death()
blinded = 1 blinded = 1
silent = 0 silent = 0
@@ -1250,7 +1250,7 @@
return 1 return 1
//UNCONSCIOUS. NO-ONE IS HOME //UNCONSCIOUS. NO-ONE IS HOME
if((getOxyLoss() > (species.total_health/2)) || (health <= (CONFIG_GET(number/health_threshold_crit) * species.crit_mod))) if((getOxyLoss() > (species.total_health/2)) || (health <= (get_crit_point() * species.crit_mod)))
Paralyse(3) Paralyse(3)
if(hallucination) if(hallucination)
@@ -2057,7 +2057,7 @@
if(stat == DEAD) if(stat == DEAD)
holder.icon_state = "-100" // X_X holder.icon_state = "-100" // X_X
else else
holder.icon_state = RoundHealth((health-CONFIG_GET(number/health_threshold_crit))/(getMaxHealth()-CONFIG_GET(number/health_threshold_crit))*100) holder.icon_state = RoundHealth((health-get_crit_point())/(getMaxHealth()-get_crit_point())*100)
if(block_hud) if(block_hud)
holder.icon_state = "hudblank" holder.icon_state = "hudblank"
health_us.icon_state = holder.icon_state health_us.icon_state = holder.icon_state

View File

@@ -493,7 +493,7 @@
H.maxHealth = total_health H.maxHealth = total_health
H.health = H.maxHealth H.health = H.getMaxHealth()
/datum/species/shadekin/produceCopy(var/list/traits, var/mob/living/carbon/human/H, var/custom_base, var/reset_dna = TRUE) // Traitgenes reset_dna flag required, or genes get reset on resleeve /datum/species/shadekin/produceCopy(var/list/traits, var/mob/living/carbon/human/H, var/custom_base, var/reset_dna = TRUE) // Traitgenes reset_dna flag required, or genes get reset on resleeve

View File

@@ -140,7 +140,7 @@
if(!breath || (breath.total_moles == 0)) if(!breath || (breath.total_moles == 0))
H.failed_last_breath = 1 H.failed_last_breath = 1
if(H.health > CONFIG_GET(number/health_threshold_crit)) if(H.health > H.get_crit_point())
H.adjustOxyLoss(ALRAUNE_MAX_OXYLOSS) H.adjustOxyLoss(ALRAUNE_MAX_OXYLOSS)
else else
H.adjustOxyLoss(ALRAUNE_CRIT_MAX_OXYLOSS) H.adjustOxyLoss(ALRAUNE_CRIT_MAX_OXYLOSS)

View File

@@ -266,7 +266,7 @@
pseudodead = 1 pseudodead = 1
/datum/species/protean/handle_environment_special(var/mob/living/carbon/human/H) /datum/species/protean/handle_environment_special(var/mob/living/carbon/human/H)
if((H.getActualBruteLoss() + H.getActualFireLoss()) > H.maxHealth*0.5 && isturf(H.loc)) //So, only if we're not a blob (we're in nullspace) or in someone (or a locker, really, but whatever) if((H.getActualBruteLoss() + H.getActualFireLoss()) > H.getMaxHealth()*0.5 && isturf(H.loc)) //So, only if we're not a blob (we're in nullspace) or in someone (or a locker, really, but whatever)
return ..() //Any instakill shot runtimes since there are no organs after this. No point to not skip these checks, going to nullspace anyway. return ..() //Any instakill shot runtimes since there are no organs after this. No point to not skip these checks, going to nullspace anyway.
/*CHOMP Station removal start /*CHOMP Station removal start

View File

@@ -268,7 +268,7 @@
amount *= M.incoming_healing_percent amount *= M.incoming_healing_percent
if(tf_mob_holder && tf_mob_holder.loc == src) if(tf_mob_holder && tf_mob_holder.loc == src)
var/dmgmultiplier = tf_mob_holder.maxHealth / maxHealth var/dmgmultiplier = tf_mob_holder.getMaxHealth() / getMaxHealth()
dmgmultiplier *= amount dmgmultiplier *= amount
tf_mob_holder.adjustBruteLoss(dmgmultiplier) tf_mob_holder.adjustBruteLoss(dmgmultiplier)
@@ -358,7 +358,7 @@
if(!isnull(M.incoming_healing_percent)) if(!isnull(M.incoming_healing_percent))
amount *= M.incoming_healing_percent amount *= M.incoming_healing_percent
if(tf_mob_holder && tf_mob_holder.loc == src) if(tf_mob_holder && tf_mob_holder.loc == src)
var/dmgmultiplier = tf_mob_holder.maxHealth / maxHealth var/dmgmultiplier = tf_mob_holder.getMaxHealth() / getMaxHealth()
dmgmultiplier *= amount dmgmultiplier *= amount
tf_mob_holder.adjustFireLoss(dmgmultiplier) tf_mob_holder.adjustFireLoss(dmgmultiplier)
fireloss = min(max(fireloss + amount, 0),(getMaxHealth()*2)) fireloss = min(max(fireloss + amount, 0),(getMaxHealth()*2))
@@ -442,6 +442,16 @@
result *= M.max_health_percent result *= M.max_health_percent
return result return result
///Use this proc to get the damage in which the mob will be put into critical condition (hardcrit)
/mob/living/proc/get_crit_point()
return -(getMaxHealth()*0.5)
/mob/living/carbon/human/get_crit_point()
var/crit_point = -(getMaxHealth()*0.5)
if(species.crit_mod)
crit_point *= species.crit_mod
return crit_point
/mob/living/proc/setMaxHealth(var/newMaxHealth) /mob/living/proc/setMaxHealth(var/newMaxHealth)
var/h_mult = maxHealth / newMaxHealth //Calculate change multiplier var/h_mult = maxHealth / newMaxHealth //Calculate change multiplier
if(bruteloss) //In case a damage value is 0, divide by 0 bad if(bruteloss) //In case a damage value is 0, divide by 0 bad
@@ -1238,7 +1248,7 @@
add_attack_logs(src,M,"Thrown via grab to [end_T.x],[end_T.y],[end_T.z]") add_attack_logs(src,M,"Thrown via grab to [end_T.x],[end_T.y],[end_T.z]")
if(ishuman(M)) if(ishuman(M))
var/mob/living/carbon/human/N = M var/mob/living/carbon/human/N = M
if((N.health + N.halloss) < CONFIG_GET(number/health_threshold_crit) || N.stat == DEAD) if((N.health + N.halloss) < N.get_crit_point() || N.stat == DEAD)
N.adjustBruteLoss(rand(10,30)) N.adjustBruteLoss(rand(10,30))
src.drop_from_inventory(G) src.drop_from_inventory(G)

View File

@@ -105,7 +105,7 @@
// Returns percentage of AI's remaining hardware integrity (maxhealth - (bruteloss + fireloss)) // Returns percentage of AI's remaining hardware integrity (maxhealth - (bruteloss + fireloss))
/mob/living/silicon/ai/proc/hardware_integrity() /mob/living/silicon/ai/proc/hardware_integrity()
return (health - CONFIG_GET(number/health_threshold_dead)) / 2 return (health - (-getMaxHealth())) / 2
// Shows capacitor charge and hardware integrity information to the AI in Status tab. // Shows capacitor charge and hardware integrity information to the AI in Status tab.
/mob/living/silicon/ai/show_system_integrity() /mob/living/silicon/ai/show_system_integrity()

View File

@@ -2,7 +2,7 @@
if (src.stat == 2) if (src.stat == 2)
return return
else else
if (src.health <= CONFIG_GET(number/health_threshold_dead) && src.stat != 2) if (src.health <= (-getMaxHealth()) && src.stat != 2)
death() death()
return return

View File

@@ -80,7 +80,7 @@
//if(resting) // VOREStation edit. Our borgos would rather not. //if(resting) // VOREStation edit. Our borgos would rather not.
// Weaken(5) // Weaken(5)
if(health < CONFIG_GET(number/health_threshold_dead) && stat != 2) //die only once if(health < (-getMaxHealth()) && stat != 2) //die only once
death() death()
if (stat != 2) //Alive. if (stat != 2) //Alive.
@@ -250,7 +250,7 @@
healths.icon_state = "health3" healths.icon_state = "health3"
else if(health >= 0) else if(health >= 0)
healths.icon_state = "health4" healths.icon_state = "health4"
else if(health >= CONFIG_GET(number/health_threshold_dead)) else if(health >= (-getMaxHealth()))
healths.icon_state = "health5" healths.icon_state = "health5"
else else
healths.icon_state = "health6" healths.icon_state = "health6"

View File

@@ -51,7 +51,7 @@
for(var/i = 1 to spiderling_count) for(var/i = 1 to spiderling_count)
if(prob(swarmling_prob) && src) if(prob(swarmling_prob) && src)
var/mob/living/simple_mob/animal/giant_spider/swarmling = new swarmling_type(src.loc) var/mob/living/simple_mob/animal/giant_spider/swarmling = new swarmling_type(src.loc)
var/swarm_health = FLOOR(swarmling.maxHealth * 0.4, 1) var/swarm_health = FLOOR(swarmling.getMaxHealth() * 0.4, 1)
var/swarm_dam_lower = FLOOR(melee_damage_lower * 0.4, 1) var/swarm_dam_lower = FLOOR(melee_damage_lower * 0.4, 1)
var/swarm_dam_upper = FLOOR(melee_damage_upper * 0.4, 1) var/swarm_dam_upper = FLOOR(melee_damage_upper * 0.4, 1)
swarmling.name = "spiderling" swarmling.name = "spiderling"

View File

@@ -237,7 +237,7 @@ GLOBAL_LIST_EMPTY(wounds_being_tended_by_drakes)
return critter.health < (critter.getMaxHealth() * critter.sap_heal_threshold) return critter.health < (critter.getMaxHealth() * critter.sap_heal_threshold)
// Other animals just need to be injured. // Other animals just need to be injured.
return (friend.health < friend.maxHealth) return (friend.health < friend.getMaxHealth())
/mob/living/simple_mob/animal/sif/grafadreka/Initialize(mapload) /mob/living/simple_mob/animal/sif/grafadreka/Initialize(mapload)
@@ -435,12 +435,12 @@ GLOBAL_LIST_EMPTY(wounds_being_tended_by_drakes)
if(!can_tend_wounds(friend)) if(!can_tend_wounds(friend))
if(friend == src) if(friend == src)
if(health == maxHealth) if(health == getMaxHealth())
to_chat(src, span_warning("You are unwounded.")) to_chat(src, span_warning("You are unwounded."))
else else
to_chat(src, span_warning("You cannot tend any of your wounds.")) to_chat(src, span_warning("You cannot tend any of your wounds."))
else else
if(friend.health == friend.maxHealth) if(friend.health == friend.getMaxHealth())
return ..() return ..()
to_chat(src, span_warning("You cannot tend any of \the [friend]'s wounds.")) to_chat(src, span_warning("You cannot tend any of \the [friend]'s wounds."))
return TRUE return TRUE

View File

@@ -236,7 +236,7 @@
// return FALSE // return FALSE
//VOREStation add start //VOREStation add start
else if(forgive_resting && !isbelly(holder.loc)) //Doing it this way so we only think about the other conditions if the var is actually set else if(forgive_resting && !isbelly(holder.loc)) //Doing it this way so we only think about the other conditions if the var is actually set
if((holder.health == holder.maxHealth) && !hostile && (L.resting || L.weakened || L.stunned)) //If our health is full, no one is fighting us, we can forgive if((holder.health == holder.getMaxHealth()) && !hostile && (L.resting || L.weakened || L.stunned)) //If our health is full, no one is fighting us, we can forgive
var/mob/living/simple_mob/vore/eater = holder var/mob/living/simple_mob/vore/eater = holder
if(!eater.will_eat(L)) //We forgive people we can eat by eating them if(!eater.will_eat(L)) //We forgive people we can eat by eating them
set_stance(STANCE_IDLE) set_stance(STANCE_IDLE)

View File

@@ -319,7 +319,7 @@
set_stance(STANCE_FLEE) set_stance(STANCE_FLEE)
return return
if((holder.health < (holder.maxHealth / 4)) && !used_invis) if((holder.health < (holder.getMaxHealth() / 4)) && !used_invis)
holder.cloak() holder.cloak()
used_invis = 1 used_invis = 1
step_away(holder, target, 8) step_away(holder, target, 8)

View File

@@ -938,7 +938,7 @@ I think I covered everything.
return return
if(P.suiciding) if(P.suiciding)
return return
if(P.health <= (P.maxHealth * 0.95)) //Nom em' if(P.health <= (P.getMaxHealth() * 0.95)) //Nom em'
if(vocal) if(vocal)
if(last_speak + 30 SECONDS < world.time) if(last_speak + 30 SECONDS < world.time)
var/message_options = list( var/message_options = list(

View File

@@ -181,7 +181,7 @@
// return FALSE // return FALSE
//VOREStation add start //VOREStation add start
else if(forgive_resting && !isbelly(holder.loc)) //Doing it this way so we only think about the other conditions if the var is actually set else if(forgive_resting && !isbelly(holder.loc)) //Doing it this way so we only think about the other conditions if the var is actually set
if((holder.health == holder.maxHealth) && !hostile && (L.resting || L.weakened || L.stunned)) //If our health is full, no one is fighting us, we can forgive if((holder.health == holder.getMaxHealth()) && !hostile && (L.resting || L.weakened || L.stunned)) //If our health is full, no one is fighting us, we can forgive
var/mob/living/simple_mob/vore/eater = holder var/mob/living/simple_mob/vore/eater = holder
if(!eater.will_eat(L)) //We forgive people we can eat by eating them if(!eater.will_eat(L)) //We forgive people we can eat by eating them
set_stance(STANCE_IDLE) set_stance(STANCE_IDLE)

View File

@@ -333,7 +333,7 @@
/mob/living/simple_mob/shadekin/Found(var/atom/A) /mob/living/simple_mob/shadekin/Found(var/atom/A)
if(specific_targets && isliving(A)) //Healing! if(specific_targets && isliving(A)) //Healing!
var/mob/living/L = A var/mob/living/L = A
var/health_percent = (L.health/L.maxHealth)*100 var/health_percent = (L.health/L.getMaxHealth())*100
if(health_percent <= 50 && will_eat(A)) if(health_percent <= 50 && will_eat(A))
return A return A
. = ..() . = ..()

View File

@@ -191,7 +191,7 @@
// return FALSE // return FALSE
//VOREStation add start //VOREStation add start
else if(forgive_resting && !isbelly(holder.loc)) //Doing it this way so we only think about the other conditions if the var is actually set else if(forgive_resting && !isbelly(holder.loc)) //Doing it this way so we only think about the other conditions if the var is actually set
if((holder.health == holder.maxHealth) && !hostile && (L.resting || L.weakened || L.stunned)) //If our health is full, no one is fighting us, we can forgive if((holder.health == holder.getMaxHealth()) && !hostile && (L.resting || L.weakened || L.stunned)) //If our health is full, no one is fighting us, we can forgive
var/mob/living/simple_mob/vore/eater = holder var/mob/living/simple_mob/vore/eater = holder
if(!eater.will_eat(L)) //We forgive people we can eat by eating them if(!eater.will_eat(L)) //We forgive people we can eat by eating them
set_stance(STANCE_IDLE) set_stance(STANCE_IDLE)

View File

@@ -603,7 +603,7 @@ This function completely restores a damaged organ to perfect condition.
//Burn damage can cause fluid loss due to blistering and cook-off //Burn damage can cause fluid loss due to blistering and cook-off
if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT) && !(data.get_species_flags() & NO_BLOOD)) if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT) && !(data.get_species_flags() & NO_BLOOD))
var/fluid_loss = 0.1 * (damage/(owner.getMaxHealth() - CONFIG_GET(number/health_threshold_dead))) * owner.species.blood_volume*(1 - owner.species.blood_level_fatal) //CHOMPedit reduce fluid loss 4-fold so lasers dont suck your blood var/fluid_loss = 0.1 * (damage/(owner.getMaxHealth() - (-owner.getMaxHealth()))) * owner.species.blood_volume*(1 - owner.species.blood_level_fatal) //CHOMPedit reduce fluid loss 4-fold so lasers dont suck your blood
owner.remove_blood(fluid_loss) owner.remove_blood(fluid_loss)
// first check whether we can widen an existing wound // first check whether we can widen an existing wound
if(wounds.len > 0 && prob(max(50+(number_wounds-1)*10,90))) if(wounds.len > 0 && prob(max(50+(number_wounds-1)*10,90)))

View File

@@ -517,7 +517,7 @@
if(ishuman(target)) if(ishuman(target))
var/mob/living/carbon/human/M = target var/mob/living/carbon/human/M = target
M.druggy = max(M.druggy, 20) M.druggy = max(M.druggy, 20)
if(M.health < M.maxHealth) if(M.health < M.getMaxHealth())
to_chat(target, span_notice("As the beam strikes you, you feel a little healthier!")) to_chat(target, span_notice("As the beam strikes you, you feel a little healthier!"))
M.adjustBruteLoss(-5) M.adjustBruteLoss(-5)
M.adjustFireLoss(-5) M.adjustFireLoss(-5)
@@ -587,7 +587,7 @@
/obj/item/projectile/beam/medigun/on_hit(var/atom/target, var/blocked = 0) /obj/item/projectile/beam/medigun/on_hit(var/atom/target, var/blocked = 0)
if(ishuman(target)) if(ishuman(target))
var/mob/living/carbon/human/M = target var/mob/living/carbon/human/M = target
if(M.health < M.maxHealth) if(M.health < M.getMaxHealth())
var/obj/effect/overlay/pulse = new /obj/effect/overlay(get_turf(M)) var/obj/effect/overlay/pulse = new /obj/effect/overlay(get_turf(M))
pulse.icon = 'icons/effects/effects.dmi' pulse.icon = 'icons/effects/effects.dmi'
pulse.icon_state = XENO_CHEM_HEAL pulse.icon_state = XENO_CHEM_HEAL

View File

@@ -97,7 +97,7 @@
H.dna.digitigrade = R.dna.digitigrade // ensure cloned DNA is set appropriately from record??? for some reason it doesn't get set right despite the override to datum/dna/Clone() H.dna.digitigrade = R.dna.digitigrade // ensure cloned DNA is set appropriately from record??? for some reason it doesn't get set right despite the override to datum/dna/Clone()
//Apply damage //Apply damage
H.adjustCloneLoss((H.getMaxHealth() - CONFIG_GET(number/health_threshold_dead))*-0.75) H.adjustCloneLoss((H.getMaxHealth() - (H.getMaxHealth()))*-0.75)
H.Paralyse(4) H.Paralyse(4)
H.updatehealth() H.updatehealth()
@@ -181,7 +181,7 @@
use_power(7500) //This might need tweaking. use_power(7500) //This might need tweaking.
return return
else if(((occupant.health == occupant.maxHealth)) && (!eject_wait)) else if(((occupant.health == occupant.getMaxHealth())) && (!eject_wait))
playsound(src, 'sound/machines/ding.ogg', 50, 1) playsound(src, 'sound/machines/ding.ogg', 50, 1)
audible_message("\The [src] signals that the growing process is complete.", runemessage = "ding") audible_message("\The [src] signals that the growing process is complete.", runemessage = "ding")
connected_message("Growing Process Complete.") connected_message("Growing Process Complete.")
@@ -200,7 +200,7 @@
/obj/machinery/clonepod/transhuman/get_completion() /obj/machinery/clonepod/transhuman/get_completion()
if(occupant) if(occupant)
return 100 * ((occupant.health + abs(CONFIG_GET(number/health_threshold_dead))) / (occupant.maxHealth + abs(CONFIG_GET(number/health_threshold_dead)))) return 100 * ((occupant.health + (occupant.getMaxHealth()))) / (occupant.getMaxHealth() + abs(occupant.getMaxHealth()))
return 0 return 0
/obj/machinery/clonepod/transhuman/examine(mob/user, infix, suffix) /obj/machinery/clonepod/transhuman/examine(mob/user, infix, suffix)
@@ -517,7 +517,7 @@
if(occupant) if(occupant)
data["name"] = occupant.name data["name"] = occupant.name
data["health"] = occupant.health data["health"] = occupant.health
data["maxHealth"] = occupant.maxHealth data["maxHealth"] = occupant.getMaxHealth()
data["stat"] = occupant.stat data["stat"] = occupant.stat
data["mindStatus"] = !!occupant.mind data["mindStatus"] = !!occupant.mind
data["mindName"] = occupant.mind?.name data["mindName"] = occupant.mind?.name

View File

@@ -191,14 +191,14 @@ GLOBAL_LIST_INIT(digest_modes, list())
B.owner.adjust_nutrition(-5) // More costly for the pred, since metals and stuff B.owner.adjust_nutrition(-5) // More costly for the pred, since metals and stuff
if(B.health_impacts_size) if(B.health_impacts_size)
B.owner.handle_belly_update() B.owner.handle_belly_update()
if(L.health < L.maxHealth) if(L.health < L.getMaxHealth())
L.adjustToxLoss(-2) L.adjustToxLoss(-2)
L.adjustOxyLoss(-2) L.adjustOxyLoss(-2)
L.adjustCloneLoss(-1) L.adjustCloneLoss(-1)
B.owner.adjust_nutrition(-1) // Normal cost per old functionality B.owner.adjust_nutrition(-1) // Normal cost per old functionality
if(B.health_impacts_size) if(B.health_impacts_size)
B.owner.handle_belly_update() B.owner.handle_belly_update()
if(B.owner.nutrition > 90 && (L.health < L.maxHealth) && !H.isSynthetic()) if(B.owner.nutrition > 90 && (L.health < L.getMaxHealth()) && !H.isSynthetic())
L.adjustBruteLoss(-2.5) L.adjustBruteLoss(-2.5)
L.adjustFireLoss(-2.5) L.adjustFireLoss(-2.5)
L.adjustToxLoss(-5) L.adjustToxLoss(-5)
@@ -396,11 +396,11 @@ GLOBAL_LIST_INIT(digest_modes, list())
var/new_percent var/new_percent
if(ishuman(L)) if(ishuman(L))
old_percent = ((old_health + 50) / (L.maxHealth + 50)) * 100 old_percent = ((old_health + 50) / (L.getMaxHealth() + 50)) * 100
new_percent = ((L.health + 50) / (L.maxHealth + 50)) * 100 new_percent = ((L.health + 50) / (L.getMaxHealth() + 50)) * 100
else else
old_percent = (old_health / L.maxHealth) * 100 old_percent = (old_health / L.getMaxHealth()) * 100
new_percent = (L.health / L.maxHealth) * 100 new_percent = (L.health / L.getMaxHealth()) * 100
var/lets_announce = FALSE var/lets_announce = FALSE
if(new_percent <= 95 && old_percent > 95) if(new_percent <= 95 && old_percent > 95)
@@ -427,11 +427,11 @@ GLOBAL_LIST_INIT(digest_modes, list())
var/new_percent var/new_percent
if(ishuman(L)) if(ishuman(L))
old_percent = ((old_health + 50) / (L.maxHealth + 50)) * 100 old_percent = ((old_health + 50) / (L.getMaxHealth() + 50)) * 100
new_percent = ((L.health + 50) / (L.maxHealth + 50)) * 100 new_percent = ((L.health + 50) / (L.getMaxHealth() + 50)) * 100
else else
old_percent = (old_health / L.maxHealth) * 100 old_percent = (old_health / L.getMaxHealth()) * 100
new_percent = (L.health / L.maxHealth) * 100 new_percent = (L.health / L.getMaxHealth()) * 100
var/lets_announce = FALSE var/lets_announce = FALSE
if(new_percent >= 100 && old_percent < 100) if(new_percent >= 100 && old_percent < 100)

View File

@@ -289,9 +289,9 @@
M.digestion_in_progress = TRUE M.digestion_in_progress = TRUE
if(M.health > -36 || (ishuman(M) && M.health > -136)) if(M.health > -36 || (ishuman(M) && M.health > -136))
to_chat(M, span_vnotice("(Your predator has enabled gradual body digestion. Stick around for a second round of churning to reach the true finisher.)")) to_chat(M, span_vnotice("(Your predator has enabled gradual body digestion. Stick around for a second round of churning to reach the true finisher.)"))
if(M.health < M.maxHealth * -1) //Siplemobs etc if(M.health < M.getMaxHealth() * -1) //Siplemobs etc
if(ishuman(M)) if(ishuman(M))
if(M.health < (M.maxHealth * -1) -100) //Spacemans can go much deeper. Jank but maxHealth*-2 doesn't work with flat standard -100hp death threshold. if(M.health < (M.getMaxHealth() * -1) -100) //Spacemans can go much deeper. Jank but maxHealth*-2 doesn't work with flat standard -100hp death threshold.
if(slow_brutal) if(slow_brutal)
var/mob/living/carbon/human/P = M var/mob/living/carbon/human/P = M
var/vitals_only = TRUE var/vitals_only = TRUE
@@ -315,7 +315,7 @@
return return
var/digest_alert_owner = span_vnotice(belly_format_string(digest_messages_owner, M)) var/digest_alert_owner = span_vnotice(belly_format_string(digest_messages_owner, M))
var/digest_alert_prey = span_vnotice(belly_format_string(digest_messages_prey, M)) var/digest_alert_prey = span_vnotice(belly_format_string(digest_messages_prey, M))
var/compensation = M.maxHealth / 5 //Dead body bonus. var/compensation = M.getMaxHealth() / 5 //Dead body bonus.
if(ishuman(M)) if(ishuman(M))
compensation += M.getOxyLoss() //How much of the prey's damage was caused by passive crit oxyloss to compensate the lost nutrition. compensation += M.getOxyLoss() //How much of the prey's damage was caused by passive crit oxyloss to compensate the lost nutrition.

View File

@@ -1589,7 +1589,7 @@
return TRUE return TRUE
if("Health") if("Health")
var/mob/living/ourtarget = target var/mob/living/ourtarget = target
to_chat(user, span_notice("Current health reading for \The [ourtarget]: [ourtarget.health] / [ourtarget.maxHealth] ")) to_chat(user, span_notice("Current health reading for \The [ourtarget]: [ourtarget.health] / [ourtarget.getMaxHealth()] "))
return TRUE return TRUE
if("Process") if("Process")
var/mob/living/ourtarget = target var/mob/living/ourtarget = target

View File

@@ -52,7 +52,7 @@
target.adjustToxLoss(-5) target.adjustToxLoss(-5)
stored_life = max(0, stored_life - 5) stored_life = max(0, stored_life - 5)
if(target.health > (target.maxHealth / 4)) if(target.health > (target.getMaxHealth() / 4))
attempt_revive(target) attempt_revive(target)
stored_life = 0 stored_life = 0

View File

@@ -3,12 +3,6 @@
## level of health at which a mob goes into continual shock (soft crit) ## level of health at which a mob goes into continual shock (soft crit)
HEALTH_THRESHOLD_SOFTCRIT 0 HEALTH_THRESHOLD_SOFTCRIT 0
## level of health at which a mob becomes unconscious (crit)
HEALTH_THRESHOLD_CRIT -50
## level of health at which a mob becomes dead
HEALTH_THRESHOLD_DEAD -100
## Determines whether bones can be broken through excessive damage to the organ ## Determines whether bones can be broken through excessive damage to the organ
## 0 means bones can't break, 1 means they can ## 0 means bones can't break, 1 means they can
BONES_CAN_BREAK 1 BONES_CAN_BREAK 1