darklab8 / fl-darkstat

Static site generator for Freeancer Discovery community to provide info about game stuff for players
Other
2 stars 2 forks source link

Update for new Armor resistance #60

Open dd84ai opened 3 hours ago

dd84ai commented 3 hours ago

in some next patch disco will have changed armor resistance to DamageReduction% = ArmorRating / (200 + ArmorRating)

update relevant code :)

Aingar commented 3 hours ago

the key for ships also changes from armor_mult to just armor, and the data type from float to int. Expected results for a few values for purposes of unit tests: 0 armor = 0.00f = 0% reduction 15 armor = 0.1304347826f = ~13% reduction 200 armor = 0.5f = 50% reduction

armor_pen on weapons also changes from float to int, and it simply reduces the ship's armor rating (if any) by its value, down to a zero. This causes the armorpen actual damage increase to not be calculable in a vacuum, so you'll probably just want to print the value and not do any calculations with it.

dd84ai commented 3 hours ago

Nice. thanks. Even with testing examples :yum: