From 5863fe37d25d46ad67fbf9beb9c337f47c732f03 Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Mon, 25 Jan 2021 17:04:35 -0500 Subject: [PATCH] Adds rate of healing limit to the healing rod --- code/datums/status_effects/buffs.dm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index e6b2e8d2008..d9d8495f922 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -109,6 +109,10 @@ alert_type = null var/hand var/deathTick = 0 + /// How many points the rod has to heal with, starts with 25, maxes at 50, or whatever heal_points_max is set to. + var/heal_points = 25 + /// Max heal points for the rod to spend on healing people + var/max_heal_points = 50 /datum/status_effect/hippocraticOath/on_apply() //Makes the user passive, it's in their oath not to harm! @@ -178,7 +182,11 @@ itemUser.adjustBrainLoss(-1.5) itemUser.adjustCloneLoss(-0.5) //Becasue apparently clone damage is the bastion of all health //Heal all those around you, unbiased + if(heal_points < (max_heal_points)) + heal_points = max((heal_points += 3), max_heal_points) for(var/mob/living/L in view(7, owner)) + if(heal_points <= 0) + break if(L.health < L.maxHealth) new /obj/effect/temp_visual/heal(get_turf(L), "#375637") if(iscarbon(L)) @@ -189,18 +197,23 @@ L.adjustStaminaLoss(-3.5) L.adjustBrainLoss(-3.5) L.adjustCloneLoss(-1) //Becasue apparently clone damage is the bastion of all health + heal_points-- if(ishuman(L)) var/mob/living/carbon/human/H = L for(var/obj/item/organ/external/E in H.bodyparts) if(prob(10)) E.mend_fracture() E.internal_bleeding = FALSE + heal_points-- else if(issilicon(L)) L.adjustBruteLoss(-3.5) L.adjustFireLoss(-3.5) + heal_points-- else if(isanimal(L)) var/mob/living/simple_animal/SM = L SM.adjustHealth(-3.5) + if(prob(50)) + heal_points -- // Animals are simpler /obj/screen/alert/status_effect/regenerative_core name = "Reinforcing Tendrils"