Zarel/Pokemon-Showdown — pull request #254 by Joimer (2013-06-25 05:59:45+00:00)
Title: Fix Life Orb

Life Orb is a damage modifier that is applied at the damage, not at the base power. The game computes it as damage * (0X14CC / 0x1000) and then rounds it with round, >=.5 up, otherwise down. This is a main difference with current mechanics, so it's a serious bug since 1 HP difference in an attack may be the cause of a victory or defeat.

Math.round is here pending a BattlePokemon.prototype.damage revamp on this situations.