Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

TransferAfflictions should transfer relative strength

Open A2ur3 opened this issue 1 year ago • 1 comments

Disclaimers

  • [X] I have searched the issue tracker to check if the issue has already been reported.
  • [X] My issue happened while using mods.

What happened?

let's say if there's a creature that transforms itself into something else when it's inside the submarine from original 1000 hp creature to new 1000 hp creature in this scenario, we do not want crew to deal 1000 damage again if they almost killed the creature outside this is where TransferAfflictions should work: you dealt 900 damage, so the new creature should have 100 hp left but that's not the case. In the situation above the new creature will have 910 hp left, because afflictions scale with max hp, which makes TransferAfflictions rather useless if spawned creature has more than 100 health

Reproduction steps

create similar creature mentioned above and test

Bug prevalence

Happens every time I play

Single player or multiplayer?

Single player

-

No response

Version

v1.2.8.0 (Winter Update hotfix 2)

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

A2ur3 avatar Mar 10 '24 13:03 A2ur3

Thank you for the report!

To me it seems like there's some kind of a bug here, but I'm not convinced TransferAfflictions not transferring relative strength is the problem.

If the monster has let's say 90 internal damage, which results in 900 vitality loss, transferring that 90 internal damage to the new monster as-is should result in 900 vitality loss on the new monster too. But regardless, this is something we need to look into, but as far as I can see, TransferAfflictions should not transfer relative strength.

Regalis11 avatar Mar 10 '24 15:03 Regalis11

Tested fix to the issue with methods described in the PR ticket. Affliction strength seems to translate correctly now.

kumilanka avatar Apr 26 '24 13:04 kumilanka