Vampire Blood Heal Tweaks (#11409)

This commit is contained in:
Geeves
2021-03-20 16:49:10 +01:00
committed by GitHub
parent 9ba4c46d11
commit b644ea8b9f
3 changed files with 41 additions and 16 deletions
+23 -11
View File
@@ -580,39 +580,49 @@
if(tox_loss)
to_heal = min(10, tox_loss)
adjustToxLoss(0 - to_heal)
blood_used += round(to_heal * 1.2)
blood_used += round(to_heal * 0.25)
if(oxy_loss)
to_heal = min(10, oxy_loss)
adjustOxyLoss(0 - to_heal)
blood_used += round(to_heal * 1.2)
blood_used += round(to_heal * 0.25)
if(ext_loss)
to_heal = min(20, ext_loss)
heal_overall_damage(min(10, getBruteLoss()), min(10, getFireLoss()))
blood_used += round(to_heal * 1.2)
blood_used += round(to_heal * 0.25)
if(clone_loss)
to_heal = min(10, clone_loss)
adjustCloneLoss(0 - to_heal)
blood_used += round(to_heal * 1.2)
blood_used += round(to_heal * 0.25)
var/list/organs = get_damaged_organs(1, 1)
if(length(organs))
adjustHalLoss(-20)
var/list/damaged_organs = get_damaged_organs(TRUE, TRUE, FALSE)
if(length(damaged_organs))
// Heal an absurd amount, basically regenerate one organ.
heal_organ_damage(50, 50)
blood_used += 12
heal_organ_damage(50, 50, FALSE)
blood_used += 3
var/missing_blood = species.blood_volume - REAGENT_VOLUME(vessel, /decl/reagent/blood)
if(missing_blood)
to_heal = min(20, missing_blood)
vessel.add_reagent(/decl/reagent/blood, to_heal)
blood_used += round(to_heal * 0.1) // gonna need to regen a shitton of blood, since human mobs have around 560 normally
for(var/A in organs)
var/healed = FALSE
var/obj/item/organ/external/E = A
if(BP_IS_ROBOTIC(E))
continue
if(E.status & ORGAN_ARTERY_CUT)
E.status &= ~ORGAN_ARTERY_CUT
blood_used += 12
blood_used += 2
if(E.status & ORGAN_TENDON_CUT)
E.status &= ~ORGAN_TENDON_CUT
blood_used += 12
blood_used += 2
if(E.status & ORGAN_BROKEN)
E.status &= ~ORGAN_BROKEN
E.stage = 0
blood_used += 12
blood_used += 3
healed = TRUE
if(healed)
@@ -643,6 +653,8 @@
vampire.status &= ~VAMP_HEALING
to_chat(src, SPAN_NOTICE("Your body has finished healing. You are ready to continue."))
break
else
vampire.blood_usable -= blood_used
// We broke out of the loop naturally. Gotta catch that.
if(vampire.status & VAMP_HEALING)
@@ -256,9 +256,11 @@
////////////////////////////////////////////
//Returns a list of damaged organs
/mob/living/carbon/human/proc/get_damaged_organs(var/brute, var/burn)
/mob/living/carbon/human/proc/get_damaged_organs(var/brute, var/burn, var/prosthetic = TRUE)
var/list/obj/item/organ/external/parts = list()
for(var/obj/item/organ/external/O in organs)
if(!prosthetic && BP_IS_ROBOTIC(O))
continue
if((brute && O.brute_dam) || (burn && O.burn_dam))
parts += O
return parts
@@ -274,11 +276,12 @@
//Heals ONE external organ, organ gets randomly selected from damaged ones.
//It automatically updates damage overlays if necesary
//It automatically updates health status
/mob/living/carbon/human/heal_organ_damage(var/brute, var/burn)
var/list/obj/item/organ/external/parts = get_damaged_organs(brute,burn)
if(!parts.len) return
/mob/living/carbon/human/heal_organ_damage(var/brute, var/burn, var/prosthetic = TRUE)
var/list/obj/item/organ/external/parts = get_damaged_organs(brute, burn, prosthetic)
if(!length(parts))
return
var/obj/item/organ/external/picked = pick(parts)
if(picked.heal_damage(brute,burn))
if(picked.heal_damage(brute, burn, prosthetic))
UpdateDamageIcon()
BITSET(hud_updateflag, HEALTH_HUD)
updatehealth()
@@ -0,0 +1,10 @@
author: Geeves
delete-after: True
changes:
- tweak: "Vampires now recover from pain damage when they do blood heal."
- bugfix: "Vampire blood heal no longer attempts to heal prosthetics, it never could in the first place."
- rscadd: "Vampire blood heal now regens blood."
- bugfix: "Fixed vampire blood heal not actually using blood."
- tweak: "Since blood heal now uses blood, the amount of blood it uses has been reduced to make it balanced."