Proper MaxHealth checks and Crit Point (#17704)

* Fixes maxhealth checks not including modifiers and mxHP

Death at:
W/ 100max hp: https://i.imgur.com/nR8DtzG.png
W/ 125max hp: https://i.imgur.com/87eD2hW.png
W/ 25max hp: https://i.imgur.com/SP6rPWc.png

* Crit Point

* small xenochimera fix

* Update game_options.txt
This commit is contained in:
Cameron Lennox
2025-05-15 00:25:30 -07:00
committed by GitHub
parent 216d98c2e7
commit 40861f50e0
47 changed files with 92 additions and 94 deletions
+2 -2
View File
@@ -65,8 +65,8 @@
if(DPS > 0)
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_crit)) / DPS] seconds to hardcrit you. ([CONFIG_GET(number/health_threshold_crit)] 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.get_crit_point()) / DPS] seconds to hardcrit you. ([user.get_crit_point()] health)"))
to_chat(user, span_notice("[(user.getMaxHealth() - (-user.getMaxHealth())) / DPS] seconds to kill you. ([(-user.getMaxHealth())] health)"))
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."))
+1 -1
View File
@@ -158,7 +158,7 @@
return FALSE
//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
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
if(!eater.will_eat(L)) //We forgive people we can eat by eating them
set_stance(STANCE_IDLE)
@@ -65,7 +65,7 @@
intent = (L.a_intent ? L.a_intent : I_HELP)
new_path = FALSE
data["max_health"] = L.maxHealth
data["max_health"] = L.getMaxHealth()
data["health"] = L.health
if(isanimal(L))
var/mob/living/simple_mob/S = L
+1 -1
View File
@@ -93,7 +93,7 @@
blinded = 1
silent = 0
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()
blinded = 1
silent = 0
+2 -2
View File
@@ -2,7 +2,7 @@
//Start of a breath chain, calls breathe()
/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()
/mob/living/carbon/proc/breathe()
@@ -12,7 +12,7 @@
var/datum/gas_mixture/breath = null
//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)
if(losebreath>0) //Suffocating so do not take a breath
+2 -2
View File
@@ -165,11 +165,11 @@
return shock_damage
/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))
var/mob/living/carbon/human/H = src
var/datum/gender/T = GLOB.gender_datums[H.get_visible_gender()]
src.visible_message( \
visible_message( \
span_notice("[src] examines [T.himself]."), \
span_notice("You check yourself for injuries.") \
)
@@ -116,7 +116,7 @@
return FALSE;
//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())
to_chat(H, span_danger("You don't have a mouth, you cannot perform CPR!"))
return FALSE
@@ -576,7 +576,7 @@
chest.fracture()
// 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())
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."))
@@ -628,7 +628,7 @@
// A bit of sanity.
var/brain_damage = between(getBrainLoss(), damage_calc, brain.max_damage)
setBrainLoss(brain_damage)
else if(health > CONFIG_GET(number/health_threshold_dead))
else if(health > -getMaxHealth())
adjustOxyLoss(-(min(getOxyLoss(), 5)))
updatehealth()
to_chat(src, span_notice("You feel a breath of fresh air enter your lungs. It feels good."))
@@ -18,7 +18,7 @@
health = getMaxHealth() - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute
//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()
return
+4 -4
View File
@@ -609,7 +609,7 @@
if(!breath || (breath.total_moles == 0))
failed_last_breath = 1
if(health > CONFIG_GET(number/health_threshold_crit))
if(health > get_crit_point())
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
else
adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
@@ -1293,7 +1293,7 @@
else //ALIVE. LIGHTS ARE ON
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()
blinded = 1
silent = 0
@@ -1301,7 +1301,7 @@
return 1
//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)
if(hallucination)
@@ -2106,7 +2106,7 @@
if(stat == DEAD)
holder.icon_state = "-100" // X_X
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)
holder.icon_state = "hudblank"
health_us.icon_state = holder.icon_state
@@ -323,7 +323,7 @@
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
@@ -138,7 +138,7 @@
if(!breath || (breath.total_moles == 0))
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)
else
H.adjustOxyLoss(ALRAUNE_CRIT_MAX_OXYLOSS)
@@ -266,7 +266,7 @@
pseudodead = 1
/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.
var/obj/item/organ/internal/nano/refactory/refactory = locate() in H.internal_organs
+13 -3
View File
@@ -268,7 +268,7 @@
amount *= M.incoming_healing_percent
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
tf_mob_holder.adjustBruteLoss(dmgmultiplier)
@@ -358,7 +358,7 @@
if(!isnull(M.incoming_healing_percent))
amount *= M.incoming_healing_percent
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
tf_mob_holder.adjustFireLoss(dmgmultiplier)
fireloss = min(max(fireloss + amount, 0),(getMaxHealth()*2))
@@ -442,6 +442,16 @@
result *= M.max_health_percent
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)
var/h_mult = maxHealth / newMaxHealth //Calculate change multiplier
if(bruteloss) //In case a damage value is 0, divide by 0 bad
@@ -1240,7 +1250,7 @@
add_attack_logs(src,M,"Thrown via grab to [end_T.x],[end_T.y],[end_T.z]")
if(ishuman(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))
src.drop_from_inventory(G)
+1 -1
View File
@@ -105,7 +105,7 @@
// Returns percentage of AI's remaining hardware integrity (maxhealth - (bruteloss + fireloss))
/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.
/mob/living/silicon/ai/show_system_integrity()
@@ -2,7 +2,7 @@
if (src.stat == 2)
return
else
if (src.health <= CONFIG_GET(number/health_threshold_dead) && src.stat != 2)
if (src.health <= (-getMaxHealth()) && src.stat != 2)
death()
return
@@ -80,7 +80,7 @@
//if(resting) // VOREStation edit. Our borgos would rather not.
// Weaken(5)
if(health < CONFIG_GET(number/health_threshold_dead) && stat != 2) //die only once
if(health < (-getMaxHealth()) && stat != 2) //die only once
death()
if (stat != 2) //Alive.
@@ -242,7 +242,7 @@
healths.icon_state = "health3"
else if(health >= 0)
healths.icon_state = "health4"
else if(health >= CONFIG_GET(number/health_threshold_dead))
else if(health >= (-getMaxHealth()))
healths.icon_state = "health5"
else
healths.icon_state = "health6"
@@ -51,7 +51,7 @@
for(var/i = 1 to spiderling_count)
if(prob(swarmling_prob) && src)
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_upper = FLOOR(melee_damage_upper * 0.4, 1)
swarmling.name = "spiderling"
@@ -237,7 +237,7 @@ GLOBAL_LIST_EMPTY(wounds_being_tended_by_drakes)
return critter.health < (critter.getMaxHealth() * critter.sap_heal_threshold)
// 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)
@@ -435,12 +435,12 @@ GLOBAL_LIST_EMPTY(wounds_being_tended_by_drakes)
if(!can_tend_wounds(friend))
if(friend == src)
if(health == maxHealth)
if(health == getMaxHealth())
to_chat(src, span_warning("You are unwounded."))
else
to_chat(src, span_warning("You cannot tend any of your wounds."))
else
if(friend.health == friend.maxHealth)
if(friend.health == friend.getMaxHealth())
return ..()
to_chat(src, span_warning("You cannot tend any of \the [friend]'s wounds."))
return TRUE
@@ -236,7 +236,7 @@
// return FALSE
//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
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
if(!eater.will_eat(L)) //We forgive people we can eat by eating them
set_stance(STANCE_IDLE)
@@ -319,7 +319,7 @@
set_stance(STANCE_FLEE)
return
if((holder.health < (holder.maxHealth / 4)) && !used_invis)
if((holder.health < (holder.getMaxHealth() / 4)) && !used_invis)
holder.cloak()
used_invis = 1
step_away(holder, target, 8)
@@ -939,7 +939,7 @@ I think I covered everything.
return
if(P.suiciding)
return
if(P.health <= (P.maxHealth * 0.95)) //Nom em'
if(P.health <= (P.getMaxHealth() * 0.95)) //Nom em'
if(vocal)
if(last_speak + 30 SECONDS < world.time)
var/message_options = list(
@@ -181,7 +181,7 @@
// return FALSE
//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
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
if(!eater.will_eat(L)) //We forgive people we can eat by eating them
set_stance(STANCE_IDLE)
@@ -261,7 +261,7 @@
/mob/living/simple_mob/shadekin/Found(var/atom/A)
if(specific_targets && isliving(A)) //Healing!
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))
return A
. = ..()
@@ -191,7 +191,7 @@
// return FALSE
//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
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
if(!eater.will_eat(L)) //We forgive people we can eat by eating them
set_stance(STANCE_IDLE)
+1 -1
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
if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT) && !(data.get_species_flags() & NO_BLOOD))
var/fluid_loss = 0.4 * (damage/(owner.getMaxHealth() - CONFIG_GET(number/health_threshold_dead))) * owner.species.blood_volume*(1 - owner.species.blood_level_fatal)
var/fluid_loss = 0.4 * (damage/(owner.getMaxHealth() - (-owner.getMaxHealth()))) * owner.species.blood_volume*(1 - owner.species.blood_level_fatal)
owner.remove_blood(fluid_loss)
// first check whether we can widen an existing wound
+2 -2
View File
@@ -460,7 +460,7 @@
if(ishuman(target))
var/mob/living/carbon/human/M = target
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!"))
M.adjustBruteLoss(-5)
M.adjustFireLoss(-5)
@@ -530,7 +530,7 @@
/obj/item/projectile/beam/medigun/on_hit(var/atom/target, var/blocked = 0)
if(ishuman(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))
pulse.icon = 'icons/effects/effects.dmi'
pulse.icon_state = XENO_CHEM_HEAL
+4 -4
View File
@@ -94,7 +94,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()
//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.updatehealth()
@@ -178,7 +178,7 @@
use_power(7500) //This might need tweaking.
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)
audible_message("\The [src] signals that the growing process is complete.", runemessage = "ding")
connected_message("Growing Process Complete.")
@@ -197,7 +197,7 @@
/obj/machinery/clonepod/transhuman/get_completion()
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
/obj/machinery/clonepod/transhuman/examine(mob/user, infix, suffix)
@@ -506,7 +506,7 @@
if(occupant)
data["name"] = occupant.name
data["health"] = occupant.health
data["maxHealth"] = occupant.maxHealth
data["maxHealth"] = occupant.getMaxHealth()
data["stat"] = occupant.stat
data["mindStatus"] = !!occupant.mind
data["mindName"] = occupant.mind?.name
+10 -10
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
if(B.health_impacts_size)
B.owner.handle_belly_update()
if(L.health < L.maxHealth)
if(L.health < L.getMaxHealth())
L.adjustToxLoss(-2)
L.adjustOxyLoss(-2)
L.adjustCloneLoss(-1)
B.owner.adjust_nutrition(-1) // Normal cost per old functionality
if(B.health_impacts_size)
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.adjustFireLoss(-2.5)
L.adjustToxLoss(-5)
@@ -396,11 +396,11 @@ GLOBAL_LIST_INIT(digest_modes, list())
var/new_percent
if(ishuman(L))
old_percent = ((old_health + 50) / (L.maxHealth + 50)) * 100
new_percent = ((L.health + 50) / (L.maxHealth + 50)) * 100
old_percent = ((old_health + 50) / (L.getMaxHealth() + 50)) * 100
new_percent = ((L.health + 50) / (L.getMaxHealth() + 50)) * 100
else
old_percent = (old_health / L.maxHealth) * 100
new_percent = (L.health / L.maxHealth) * 100
old_percent = (old_health / L.getMaxHealth()) * 100
new_percent = (L.health / L.getMaxHealth()) * 100
var/lets_announce = FALSE
if(new_percent <= 95 && old_percent > 95)
@@ -427,11 +427,11 @@ GLOBAL_LIST_INIT(digest_modes, list())
var/new_percent
if(ishuman(L))
old_percent = ((old_health + 50) / (L.maxHealth + 50)) * 100
new_percent = ((L.health + 50) / (L.maxHealth + 50)) * 100
old_percent = ((old_health + 50) / (L.getMaxHealth() + 50)) * 100
new_percent = ((L.health + 50) / (L.getMaxHealth() + 50)) * 100
else
old_percent = (old_health / L.maxHealth) * 100
new_percent = (L.health / L.maxHealth) * 100
old_percent = (old_health / L.getMaxHealth()) * 100
new_percent = (L.health / L.getMaxHealth()) * 100
var/lets_announce = FALSE
if(new_percent >= 100 && old_percent < 100)
+3 -3
View File
@@ -289,9 +289,9 @@
M.digestion_in_progress = TRUE
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.)"))
if(M.health < M.maxHealth * -1) //Siplemobs etc
if(M.health < M.getMaxHealth() * -1) //Siplemobs etc
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)
var/mob/living/carbon/human/P = M
var/vitals_only = TRUE
@@ -315,7 +315,7 @@
return
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/compensation = M.maxHealth / 5 //Dead body bonus.
var/compensation = M.getMaxHealth() / 5 //Dead body bonus.
if(ishuman(M))
compensation += M.getOxyLoss() //How much of the prey's damage was caused by passive crit oxyloss to compensate the lost nutrition.
+1 -1
View File
@@ -1589,7 +1589,7 @@
return TRUE
if("Health")
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
if("Process")
var/mob/living/ourtarget = target
@@ -52,7 +52,7 @@
target.adjustToxLoss(-5)
stored_life = max(0, stored_life - 5)
if(target.health > (target.maxHealth / 4))
if(target.health > (target.getMaxHealth() / 4))
attempt_revive(target)
stored_life = 0