-
-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: correctly reflect damage #1941
Conversation
I fixed problem mentined by @Schiffers in 5ad00a8. Now reflected damage is based on damage after mitigation (actual dmg monster was hit for). I changed pr name accordingly. |
I've done some tests and works fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because in the line below, there is a check that guarantees that the reflected damage isn't higher than attacker damage. Earlier it used pre-mitigation damage. So when rat rolls say 2 damage, you can reflect damage lower or equal to 2 damage. Now its calculated based on post-mitigation damage (actual health loss), so with crazy high level, and endgame armor, rat is always gonna hit you for 0 damage, thus no reflect damage will occur. If it's not intended, then I would just remove "damage.secondary.value" from all three places where reflect is calculated. Line 6067 in 62995d6
|
Kudos, SonarCloud Quality Gate passed! |
Description
Behaviour
Actual
Damaging enemy with type they reflect heals you for ~42 million hp if you are using ek/rp weapons.
Expected
Damaging enemy with type they reflect damages you according to reflect map when using any damage source.
Fixes #1719
Type of change
How Has This Been Tested
I equipped fire axe and bonked gazer spectre. This resulted me receiving about 450 damage from reflect, and spectre received 80 damage. Did same with royal star - this resulted in smaller values, correct nevertheless.
Test Configuration: