Skip to content

Commit

Permalink
add: Diona passive blood regen (ss220-space#4945)
Browse files Browse the repository at this point in the history
* no more blood regen

* some fixes

* Update diona.dm

* some more..

* missing tabulation
  • Loading branch information
Samirakis authored Aug 4, 2024
1 parent f2a7439 commit cddb76a
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion code/datums/components/aura_healing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
var/mob/living/simple_animal/animal_candidate = candidate
animal_candidate.adjustHealth(-simple_heal * seconds_per_tick, updating_health = FALSE)

if(candidate.blood_volume < BLOOD_VOLUME_NORMAL)
if(candidate.blood_volume < BLOOD_VOLUME_NORMAL && !isdiona(candidate))
candidate.blood_volume += blood_heal * seconds_per_tick

var/external_organ_heal_done = FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/datums/diseases/viruses/advance/symptoms/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Bonus
if(prob(10))
to_chat(M, span_notice("You can hear own heartbeat"))
check = TRUE
if(check == TRUE && (M.blood_volume < BLOOD_VOLUME_NORMAL) && !(NO_BLOOD in M.dna.species.species_traits))
if(check == TRUE && (M.blood_volume < BLOOD_VOLUME_NORMAL) && !(NO_BLOOD in M.dna.species.species_traits) && !isdiona(M))
M.blood_volume += 0.4
M.adjust_nutrition(-2)
return
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/clockwork/clockwork_structures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
if(M.health < M.maxHealth)
M.adjustHealth(-8)

if(ishuman(L) && L.blood_volume < BLOOD_VOLUME_NORMAL)
if(ishuman(L) && L.blood_volume < BLOOD_VOLUME_NORMAL && !isdiona(L))
L.blood_volume += 1

/obj/structure/clockwork/functional/beacon/Destroy()
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/cult/blood_magic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@
return

//Blood restoration
if(H.dna && !(NO_BLOOD in H.dna.species.species_traits) && H.dna.species.exotic_blood == null)
if(H.dna && !(NO_BLOOD in H.dna.species.species_traits) && H.dna.species.exotic_blood == null && !isdiona(H))
if(H.blood_volume < BLOOD_VOLUME_SAFE)
var/restore_blood = BLOOD_VOLUME_SAFE - H.blood_volume
if(uses * 2 < restore_blood)
Expand Down
23 changes: 20 additions & 3 deletions code/modules/mob/living/carbon/human/species/diona.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,22 @@
H.clear_alert("nolight")

/datum/species/diona/handle_reagents(mob/living/carbon/human/H, datum/reagent/R)
if(R.id == "glyphosate" || R.id == "atrazine")
H.adjustToxLoss(3) //Deal aditional damage
return TRUE

switch(R.id)

if("glyphosate", "atrazine")
H.adjustToxLoss(3) //Deal additional damage
return TRUE
if("iron")
H.reagents.remove_reagent(R.id, R.metabolization_rate * H.metabolism_efficiency * H.digestion_ratio)
return FALSE
if("salglu_solution")
if(prob(33))
H.adjustBruteLoss(-1)
H.adjustFireLoss(-1)
H.reagents.remove_reagent(R.id, R.metabolization_rate * H.metabolism_efficiency * H.digestion_ratio)
return FALSE

return ..()

/datum/species/diona/handle_life(mob/living/carbon/human/H)
Expand All @@ -118,6 +131,10 @@
update |= H.heal_damages(tox = 1, oxy = 1, updating_health = FALSE)
if(update)
H.updatehealth()
if(H.blood_volume < BLOOD_VOLUME_NORMAL)
H.blood_volume += 0.4
else if(light_amount < 0.2)
H.blood_volume -= 0.1

if(!is_vamp && H.nutrition < NUTRITION_LEVEL_STARVING + 50)
H.adjustBruteLoss(2)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/chemistry/reagents/medicine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@
var/mob/living/carbon/human/H = M
for(var/obj/item/organ/internal/I as anything in M.internal_organs) // 56 healing to all internal organs.
I.heal_internal_damage(8)
if(H.blood_volume < BLOOD_VOLUME_NORMAL * 0.9)// If below 90% blood, regenerate 210 units total
if(H.blood_volume < BLOOD_VOLUME_NORMAL * 0.9 && !isdiona(H))// If below 90% blood, regenerate 210 units total
H.blood_volume += 30
for(var/datum/disease/critical/heart_failure/HF in H.diseases)
HF.cure() //Won't fix a stopped heart, but it will sure fix a critical one. Shock is not fixed as healing will fix it
Expand Down

0 comments on commit cddb76a

Please sign in to comment.