po-devs/pokemon-online — pull request #1318 by Fuzzysqurl (2014-11-29 06:22:35+00:00)
Title: Fix Auras + Tough Claws

All the numbers are the Decimal conversion from the Hex pulled from http://www.smogon.com/bw/articles/bw_complete_damage_formula then I subtracted 4096. This way the original formula will return a "1" if a 0 is passed for any reason (essentially keeping status quo). I added a little helpful key above Chainbp's function for easy reference and to make sure the numbers are consistent due to "rounding"