From da579e89196bfbbafaa400c1cc4fffb72db70a3b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 7 Nov 2023 03:20:52 +0100 Subject: [PATCH] [MIRROR] Fixes synthflesh not causing toxin damage on healing brute/burn. [MDB IGNORE] (#24824) * Fixes synthflesh not causing toxin damage on healing brute/burn. (#79534) ## About The Pull Request does what it says on the tin - after the refactor of damage application, it was going with the minimum value of brute or burn loss vs. the amount healed, so in fact you could get toxin healing from synthflesh. ## Why It's Good For The Game synth could probably use some tweaks but this just takes it back to what it was supposed to do before, it should have a tradeoff of some sort * Fixes synthflesh not causing toxin damage on healing brute/burn. --------- Co-authored-by: Higgin --- .../reagents/chemistry/reagents/cat2_medicine_reagents.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm index c3e15747864..69f31b00700 100644 --- a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm @@ -502,13 +502,15 @@ show_message = 0 if(!(methods & (PATCH|TOUCH|VAPOR))) return - var/harmies = min(carbies.getBruteLoss(), carbies.adjustBruteLoss(-1.25 * reac_volume, updating_health = FALSE, required_bodytype = affected_bodytype)*-1) - var/burnies = min(carbies.getFireLoss(), carbies.adjustFireLoss(-1.25 * reac_volume, updating_health = FALSE, required_bodytype = affected_bodytype)*-1) + var/current_bruteloss = carbies.getBruteLoss() // because this will be changed after calling adjustBruteLoss() + var/current_fireloss = carbies.getFireLoss() // because this will be changed after calling adjustFireLoss() + var/harmies = clamp(carbies.adjustBruteLoss(-1.25 * reac_volume, updating_health = FALSE, required_bodytype = affected_bodytype), 0, current_bruteloss) + var/burnies = clamp(carbies.adjustFireLoss(-1.25 * reac_volume, updating_health = FALSE, required_bodytype = affected_bodytype), 0, current_fireloss) for(var/i in carbies.all_wounds) var/datum/wound/iter_wound = i iter_wound.on_synthflesh(reac_volume) var/need_mob_update = harmies + burnies - need_mob_update += carbies.adjustToxLoss((harmies+burnies)*(0.5 + (0.25*(1-creation_purity))), updating_health = FALSE, required_biotype = affected_biotype) //0.5 - 0.75 + need_mob_update = carbies.adjustToxLoss((harmies + burnies)*(0.5 + (0.25*(1-creation_purity))), updating_health = FALSE, required_biotype = affected_biotype) || need_mob_update //0.5 - 0.75 if(need_mob_update) carbies.updatehealth()