From 8cb31e9005f291e0bbf209f4e75935932cc85545 Mon Sep 17 00:00:00 2001 From: Atermonera Date: Mon, 3 Dec 2018 17:20:35 -0800 Subject: [PATCH 1/3] Promethean Regen tweaks. (The one with the devil's deal.) --- .../mob/living/carbon/human/human_powers.dm | 5 ++ .../human/species/station/prometheans.dm | 63 +++++++++++++++---- 2 files changed, 55 insertions(+), 13 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index 66f5d2c713f..809a5ef8ade 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -293,6 +293,7 @@ // Replace completely missing limbs. for(var/limb_type in src.species.has_limbs) var/obj/item/organ/external/E = src.organs_by_name[limb_type] + if(E && E.disfigured) E.disfigured = 0 if(E && (E.is_stump() || (E.status & (ORGAN_DESTROYED|ORGAN_DEAD|ORGAN_MUTATED)))) @@ -305,6 +306,10 @@ var/obj/item/organ/O = new limb_path(src) organ_data["descriptor"] = O.name to_chat(src, "You feel a slithering sensation as your [O.name] reform.") + + var/agony_to_apply = round(0.66 * O.max_damage) // 66% of the limb's health is converted into pain. + src.apply_damage(agony_to_apply, HALLOSS) + update_icons_body() active_regen = FALSE else diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans.dm b/code/modules/mob/living/carbon/human/species/station/prometheans.dm index b78d5307076..eef43e12086 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -153,7 +153,15 @@ var/datum/species/shapeshifter/promethean/prometheans H.gib() /datum/species/shapeshifter/promethean/handle_environment_special(var/mob/living/carbon/human/H) +<<<<<<< HEAD /* VOREStation Removal - Too crazy with our uncapped hunger and slowdown stuff. +======= + var/regen_brute = 1 + var/regen_burn = 1 + var/regen_tox = 1 + var/regen_oxy = 1 + +>>>>>>> 927311c... Merge pull request #5723 from Mechoid/PrometheanTweakening_The_Agonizing_One var/turf/T = H.loc if(istype(T)) var/obj/effect/decal/cleanable/C = locate() in T @@ -163,34 +171,63 @@ var/datum/species/shapeshifter/promethean/prometheans var/turf/simulated/S = T S.dirt = 0 +<<<<<<< HEAD H.nutrition = min(500, max(0, H.nutrition + rand(15, 30))) VOREStation Removal End */ +======= + T = get_turf(H) // Swap over to an actual turf, because we need to get the pressure. + if(istype(T)) // Make sure it exists, and is a turf again. + var/datum/gas_mixture/environment = T.return_air() + var/pressure = environment.return_pressure() + var/affecting_pressure = H.calculate_affecting_pressure(pressure) + if(affecting_pressure <= hazard_low_pressure) // Dangerous low pressure stops the regeneration of physical wounds. Body is focusing on keeping them intact rather than sealing. + regen_brute = 0 + regen_burn = 0 + +>>>>>>> 927311c... Merge pull request #5723 from Mechoid/PrometheanTweakening_The_Agonizing_One // Heal remaining damage. if(H.fire_stacks >= 0) if(H.getBruteLoss() || H.getFireLoss() || H.getOxyLoss() || H.getToxLoss()) var/nutrition_cost = 0 - var/nutrition_debt = H.getBruteLoss() + var/nutrition_debt = 0 var/starve_mod = 1 if(H.nutrition <= 25) starve_mod = 0.75 - H.adjustBruteLoss(-heal_rate * starve_mod) - nutrition_cost += nutrition_debt - H.getBruteLoss() - nutrition_debt = H.getFireLoss() - H.adjustFireLoss(-heal_rate * starve_mod) - nutrition_cost += nutrition_debt - H.getFireLoss() + if(regen_brute) + nutrition_debt = H.getBruteLoss() + H.adjustBruteLoss(-heal_rate * starve_mod) + nutrition_cost += nutrition_debt - H.getBruteLoss() - nutrition_debt = H.getOxyLoss() - H.adjustOxyLoss(-heal_rate * starve_mod) - nutrition_cost += nutrition_debt - H.getOxyLoss() + if(regen_burn) + nutrition_debt = H.getFireLoss() + H.adjustFireLoss(-heal_rate * starve_mod) + nutrition_cost += nutrition_debt - H.getFireLoss() - nutrition_debt = H.getToxLoss() - H.adjustToxLoss(-heal_rate * starve_mod) - nutrition_cost += nutrition_debt - H.getToxLoss() - H.nutrition -= (2 * nutrition_cost) //Costs Nutrition when damage is being repaired, corresponding to the amount of damage being repaired. + if(regen_oxy) + nutrition_debt = H.getOxyLoss() + H.adjustOxyLoss(-heal_rate * starve_mod) + nutrition_cost += nutrition_debt - H.getOxyLoss() + + if(regen_tox) + nutrition_debt = H.getToxLoss() + H.adjustToxLoss(-heal_rate * starve_mod) + nutrition_cost += nutrition_debt - H.getToxLoss() + + H.nutrition -= (3 * nutrition_cost) //Costs Nutrition when damage is being repaired, corresponding to the amount of damage being repaired. H.nutrition = max(0, H.nutrition) //Ensure it's not below 0. +<<<<<<< HEAD //else//VOREStation Removal //H.adjustToxLoss(2*heal_rate) // Doubled because 0.5 is miniscule, and fire_stacks are capped in both directions +======= + + var/agony_to_apply = ((1 / starve_mod) * nutrition_cost) //Regenerating damage causes minor pain over time. Small injures will be no issue, large ones will cause problems. + if((H.getHalLoss() + agony_to_apply) <= 70) // Don't permalock, but make it far easier to knock them down. + H.apply_damage(agony_to_apply, HALLOSS) + + else + H.adjustToxLoss(2*heal_rate) // Doubled because 0.5 is miniscule, and fire_stacks are capped in both directions +>>>>>>> 927311c... Merge pull request #5723 from Mechoid/PrometheanTweakening_The_Agonizing_One /datum/species/shapeshifter/promethean/get_blood_colour(var/mob/living/carbon/human/H) return (H ? rgb(H.r_skin, H.g_skin, H.b_skin) : ..()) From bffe666af7a400a47dcafed18bffa2d39472ef07 Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Sun, 24 Feb 2019 06:38:54 +1000 Subject: [PATCH 2/3] Preserves vorestation removals while porting tweaks --- .../human/species/station/prometheans.dm | 31 +++++++------------ 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans.dm b/code/modules/mob/living/carbon/human/species/station/prometheans.dm index eef43e12086..3c6d58fc552 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -153,15 +153,9 @@ var/datum/species/shapeshifter/promethean/prometheans H.gib() /datum/species/shapeshifter/promethean/handle_environment_special(var/mob/living/carbon/human/H) -<<<<<<< HEAD -/* VOREStation Removal - Too crazy with our uncapped hunger and slowdown stuff. -======= - var/regen_brute = 1 - var/regen_burn = 1 - var/regen_tox = 1 - var/regen_oxy = 1 ->>>>>>> 927311c... Merge pull request #5723 from Mechoid/PrometheanTweakening_The_Agonizing_One +/* VOREStation Removal - Too crazy with our uncapped hunger and slowdown stuff. + var/turf/T = H.loc if(istype(T)) var/obj/effect/decal/cleanable/C = locate() in T @@ -170,11 +164,16 @@ var/datum/species/shapeshifter/promethean/prometheans if (istype(T, /turf/simulated)) var/turf/simulated/S = T S.dirt = 0 - -<<<<<<< HEAD H.nutrition = min(500, max(0, H.nutrition + rand(15, 30))) VOREStation Removal End */ -======= + + var/regen_brute = 1 + var/regen_burn = 1 + var/regen_tox = 1 + var/regen_oxy = 1 + + var/turf/T = H.loc //VOREStation Addition: get the location as originally commented out + T = get_turf(H) // Swap over to an actual turf, because we need to get the pressure. if(istype(T)) // Make sure it exists, and is a turf again. var/datum/gas_mixture/environment = T.return_air() @@ -184,7 +183,6 @@ VOREStation Removal End */ regen_brute = 0 regen_burn = 0 ->>>>>>> 927311c... Merge pull request #5723 from Mechoid/PrometheanTweakening_The_Agonizing_One // Heal remaining damage. if(H.fire_stacks >= 0) if(H.getBruteLoss() || H.getFireLoss() || H.getOxyLoss() || H.getToxLoss()) @@ -216,18 +214,13 @@ VOREStation Removal End */ H.nutrition -= (3 * nutrition_cost) //Costs Nutrition when damage is being repaired, corresponding to the amount of damage being repaired. H.nutrition = max(0, H.nutrition) //Ensure it's not below 0. -<<<<<<< HEAD - //else//VOREStation Removal - //H.adjustToxLoss(2*heal_rate) // Doubled because 0.5 is miniscule, and fire_stacks are capped in both directions -======= var/agony_to_apply = ((1 / starve_mod) * nutrition_cost) //Regenerating damage causes minor pain over time. Small injures will be no issue, large ones will cause problems. if((H.getHalLoss() + agony_to_apply) <= 70) // Don't permalock, but make it far easier to knock them down. H.apply_damage(agony_to_apply, HALLOSS) - else - H.adjustToxLoss(2*heal_rate) // Doubled because 0.5 is miniscule, and fire_stacks are capped in both directions ->>>>>>> 927311c... Merge pull request #5723 from Mechoid/PrometheanTweakening_The_Agonizing_One + //else//VOREStation Removal + //H.adjustToxLoss(2*heal_rate) // Doubled because 0.5 is miniscule, and fire_stacks are capped in both directions /datum/species/shapeshifter/promethean/get_blood_colour(var/mob/living/carbon/human/H) return (H ? rgb(H.r_skin, H.g_skin, H.b_skin) : ..()) From 6740b839fcef22b4ccfdd19175b3f25043fc5374 Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Sun, 24 Feb 2019 06:44:02 +1000 Subject: [PATCH 3/3] Returns ability for prometheans to eat dirt --- .../carbon/human/species/station/prometheans.dm | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans.dm b/code/modules/mob/living/carbon/human/species/station/prometheans.dm index 3c6d58fc552..423d2ecf3b9 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -153,8 +153,10 @@ var/datum/species/shapeshifter/promethean/prometheans H.gib() /datum/species/shapeshifter/promethean/handle_environment_special(var/mob/living/carbon/human/H) - -/* VOREStation Removal - Too crazy with our uncapped hunger and slowdown stuff. + var/regen_brute = 1 + var/regen_burn = 1 + var/regen_tox = 1 + var/regen_oxy = 1 var/turf/T = H.loc if(istype(T)) @@ -164,15 +166,7 @@ var/datum/species/shapeshifter/promethean/prometheans if (istype(T, /turf/simulated)) var/turf/simulated/S = T S.dirt = 0 - H.nutrition = min(500, max(0, H.nutrition + rand(15, 30))) -VOREStation Removal End */ - - var/regen_brute = 1 - var/regen_burn = 1 - var/regen_tox = 1 - var/regen_oxy = 1 - - var/turf/T = H.loc //VOREStation Addition: get the location as originally commented out + H.nutrition = max(H.nutrition, min(500, H.nutrition + rand(15, 30))) //VOREStation Edit: Gives nutrition up to a point instead of being capped T = get_turf(H) // Swap over to an actual turf, because we need to get the pressure. if(istype(T)) // Make sure it exists, and is a turf again.