Skip to content
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

IPCs take too much damage #9566

Closed
shazbot194 opened this issue Sep 17, 2018 · 4 comments
Closed

IPCs take too much damage #9566

shazbot194 opened this issue Sep 17, 2018 · 4 comments
Labels
Oversight This was forgotten about

Comments

@shazbot194
Copy link
Contributor

shazbot194 commented Sep 17, 2018

Problem Description:
IPCs take about 15% extra damage.

What did you expect to happen:
IPCs to take only 50% extra damage.

What happened instead.
IPCs take 65% extra damage.

Why is this bad/What are the consequences:
They take more damage then they are meant to.

Steps to reproduce the problem:
Shoot them with a revolver, it should do 90 damage, it instead does 99. Or review the code that dictates damage, here and here.

Possibly related stuff (which gamemode was it? What were you doing at the time? Was
anything else out of the ordinary happening?)
:
Nothing really, this is purely a code based issue.

This should probably either be fixed by adjusting the brute/burn mod to 2.27, or all documentation like the in code description and wiki to say 165%.

@AffectedArc07
Copy link
Member

AffectedArc07 commented Sep 17, 2018

image

edit: technically yes, but much more of an oversight

@marlyn-x86 marlyn-x86 added the Oversight This was forgotten about label Sep 17, 2018
@FalseIncarnate
Copy link
Contributor

FalseIncarnate commented Sep 24, 2018

Error is due to order of operations on damage calculation.

Revolver shoots bullets that deal 60 brute damage.
IPCs naturally take 2.5x brute damage, increasing this to 150 damage.
Robotic limbs then reduce damage by 66% (x 0.66), reducing this down to the resultant 99 damage observed.

Because the damage reduction from robotic limbs is calculated AFTER increasing the damage from the IPC weakness, this causes the end result to be higher than if you combined the two numbers prior to calculating the damage change.

Effectively, the math currently looks like this: (base_damage * species_mod) * limb_resist
You are expecting it to look like this: base_damage * (species_mod * limb_resist)

Things look nicer on paper (documentation) when you don't account for the actual ordering of things.

@shazbot194
Copy link
Contributor Author

shazbot194 commented Sep 24, 2018

It’s less an error of order of operations and more an error in math, as multiplication doesn’t care what order it’s in, that only applies when you start doing other things to it. To put it simply, someone a few years ago didn’t double check their math. In other words, base damage * (species mod * limb resistance) produces the same number as (base damage * species mod) * limb damage. This is also known as the Associative Property of multiplication. I can work this out further with numbers if you would like, but it’s really the person who originally did this never double checked their numbers.

@Pennwick
Copy link
Contributor

Seconding what Shazbot said. Though its less of bad math and the fact that I believe whoever chose 2.5 to be the IPC multiplier thought that damage for mechanical limbs was multiplied by .6 and not .66 which its actually multiplied by. This is indicated by the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Oversight This was forgotten about
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants