pokemon-showdown/mods/gen4/scripts.js
mizdra f262d02c42 Fix recoil in Gen 3-4 (#2461)
* Fix the 1/3 recoil moves in Gen 3-4
* Fix rounding recoil in Gen 3-4
2016-04-18 16:26:54 -04:00

16 lines
330 B
JavaScript

'use strict';
exports.BattleScripts = {
inherit: 'gen5',
gen: 4,
init: function () {
for (let i in this.data.Pokedex) {
delete this.data.Pokedex[i].abilities['H'];
}
},
calcRecoilDamage: function (damageDealt, move) {
return this.clampIntRange(Math.floor(damageDealt * move.recoil[0] / move.recoil[1]), 1);
},
};