Added new code that transfers damage from before the mob had its limbs reset to after. The damage style is randomized, meaning that at most you can redistribute the damage and maybe gib a limb or two in the process at extreme values.
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.
I'll probably revisit the overengineered code from before but I've spent nearly the entire day on constantly testing this PR and it sucked!
To-do: Feedback that Staff of Changing a dead mob doesn't work (it doesn't work, but it has no message to indicate that it doesn't)
:cl:
bugfix: Mindless cyborgs, AIs and MoMMIs can now be properly transformed.
bugfix: Fixed a bug where a piece of code responsible for generalized damaged dealing could, in some cases (mostly regarding species resistances and weaknesses to damage types) do far more damage than intended.
tweak: Internal wounds will no longer be considered sources of damage to determine limb damage.
experiment: Attempted a fix where humans transformed into other humans through means such as the Staff of Change will now properly transfer their damage over instead of being completely healed. However, the damage taken this way is randomized and spread across the body.
DO NOT MERGE YET.
Added new code that transfers damage from before the mob had its limbs reset to after. The damage style is randomized, meaning that at most you can redistribute the damage and maybe gib a limb or two in the process at extreme values.
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.
I'll probably revisit the overengineered code from before but I've spent nearly the entire day on constantly testing this PR and it sucked!
To-do: Feedback that Staff of Changing a dead mob doesn't work (it doesn't work, but it has no message to indicate that it doesn't)
:cl: