Fix Life Orb

Life Orb uses now BattlePokemon.prototype.modify which does the correct calculator for damage modifiers and in the correct order thanks to the ModifyDamage event.
This commit is contained in:
Joim 2013-06-27 23:46:31 +02:00
parent 0098202e05
commit b22269422a

View File

@ -1803,9 +1803,12 @@ exports.BattleItems = {
fling: {
basePower: 30
},
onBasePower: function(basePower, user) {
user.addVolatile('lifeorb');
return basePower * 1.3;
onModifyDamage: function(damage, source, target, move) {
if (damage > 0 && source) {
source.addVolatile('lifeorb');
damage = this.modify(damage, 1.3);
}
return damage;
},
effect: {
duration: 1,