Correctly apply Technician before item boost to Ball move

This commit is contained in:
urkerab 2015-12-29 21:51:08 +00:00
parent 73432847b4
commit 0b22081e7b

View File

@ -36,6 +36,10 @@ var BattleTooltips = (function () {
BattleTooltips.prototype.boostBasePower_Ball = function (BattleRoom, move, pokemon, min, max) {
var myPokemon = BattleRoom.myPokemon[pokemon.slot];
var technician = Tools.getAbility(myPokemon.baseAbility).name === 'Technician';
if (technician) {
if (min <= 60) min *= 1.5;
if (max <= 60) max *= 1.5;
}
var itemCheck = false;
if (!BattleRoom.battle.hasPseudoWeather('Magic Room') && (!pokemon.volatiles || !pokemon.volatiles['embargo'])) {
var item = Tools.getItem(myPokemon.item);
@ -58,10 +62,6 @@ var BattleTooltips = (function () {
itemCheck = true;
}
}
if (technician) {
if (min <= 60) min *= 1.5;
if (max <= 60) max *= 1.5;
}
var basePowerComment = min === max ? '' : Math.floor(min) + ' to ';
basePowerComment += Math.floor(max);
if (technician) basePowerComment += ' (Technician boosted)';