Attempts to fix set_species causing full heals #36706
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added new code that transfers damage from before the mob had its limbs reset to after. The damage style tries to remember the previous damage the mob sustained and in what limbs, but it's not perfect; it only applies from human-to-human transformations, meaning that going from a human to a borg and back to a human will reset the damages.
Should work for Staff of Change, species-changing diseases, the Dissolve genetic power, species changes caused by the cursed dice, ghoulification, cursed mirrors, Nosferatu vampire transformations, the Synthskeleton chemical, and the "Randomized" chemical.
Also fixed a bug where mindless mobs couldn't be transformed from cyborgs, AIs and MoMMIs.
Fixed the limb damage code so that damage overflow to other limbs now works better.
Fixed take_overall_damage dealing far more damage than intended when transferring damage values; it not only had a damage multiplier code of its own that stacked with the limb damage's damage multiplier (meaning that dionae could take as much as 6x damage from burn) but it didn't consider the damage overflow of the limb that it targeted, increasing the amount of damage dealt. Now it will prevent the limb from dealing overflowing damage while it focuses on dishing out the damage itself.
Internal wounds will no longer be considered for the purposes of total damage. In gameplay terms this means that internal wounds don't cause a sudden 15 damage dealt whenever they happen anymore.
And yes, Nosferatu can probably be added back with this change.
🆑