CoFH/RedstoneArsenal — pull request #31 by adudney (2014-10-14 05:13:50+00:00)
Title: Fixes OPness/Bug of Flux-Infused Armor

This fixes the bug/extreme overpowered-ness of the Flux-Infused armor, as armor properties are applied once per piece, not once overall (see ISpecialArmor, ApplyArmor function, around line 131), so passing in a damage reduction of 0.8 for each armor piece applies 4 times overall, leading to a total reduction of 3.2. This causes the armor to allow no normal damage whatsoever to make it through, only armor ignoring damage. The same thing was happening with flux damage, it was applying a 0.5 reduction for each piece, thus reducing it by 2.0 total, this has been changed to 0.125 per piece, leading to a total reduction of 0.5. (These numbers are when wearing the complete set, wearing a single piece would give the correct output, while wearing the full set causes this bug.)

Also rebalanced the armor to be more in line with the rest of the items, costing 400RF/damage and storing 160000RF. The RF/damage is also affected by Unbreaking in exactly the same way the tools are. This adds a single new localization entry, info.redstonearsenal.armor.energyPerDamage. I am not comfortable enough in any other languages to edit their files, so for now the other localizations don't have this entry. If necessary I can copy the placeholder en_US entry into the other files to show people that it is a necessary key.

After this change, the armor has a full set reduction of 80%, which is equal to diamond, and each piece has a normal durability of 400 damage points, upgradable to 5000 damage points with Unbreaking 3 applied. Diamond armor, for comparison, has around ~400-500 durability per piece. This means that some pieces will be slightly stronger than their diamond counterparts, and some pieces will be weaker, but I believe that works out fine seeing as how this armor is completely indestructible.

Please feel free to ask any and all questions about the code or my findings, I'll be happy to answer :)