Skip to content

Commit

Permalink
Fixes synthflesh not causing toxin damage on healing brute/burn. (tgs…
Browse files Browse the repository at this point in the history
…tation#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
  • Loading branch information
Higgin authored Nov 6, 2023
1 parent a7439f6 commit b666f6b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -497,13 +497,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()
Expand Down

0 comments on commit b666f6b

Please sign in to comment.