Alcatergit/Hbm-s-Nuclear-Tech-GIT

[Bug?] Set bonus damage cap applied before multiplier

Opened this issue · 1 comments

Essentially, if an entity were wearing an armor set with a hypothetical damage cap of 5 damage, and a multiplier of .5, and they took 10 damage, they would only sustain 2.5 damage with what I've observed.

Incoming damage: 10
Damage cap: 5
Modifier: 0.5

With my current observations on the damage cap system, the calculation would go something like this:

Incoming damage is greater than 5, set to 5
5 * 0.5 = 2.5
Final damage: 2.5

rather than:

Incoming damage * .5 = 5
5 is not greater than 5
Final damage: 5

With the first sequence, any incoming damage value would never exceed 2.5, despite the damage cap implying the maximum damage you can sustain while wearing the armor should be 5. This is vastly exacerbated by better armors, such as the Lunar cybernetic power armor, with a cap of 4 and modifier of .15, which makes it impossible to deal more than 0.6 damage to an entity wearing it (unless you deal more than 500 damage in a single hit.)

Might be obselete, I'm on the forge version of the mod (and I think I heard somewhere that the forge version doesn't update as often or something)

nope. No idea where I got that idea from...