add floor for potential non int multipliers

pull/759/head
Matthew Ross 2024-05-11 18:55:24 -07:00
parent 7ff81c3638
commit f4cf65ebb1
1 changed files with 2 additions and 1 deletions

View File

@ -1015,7 +1015,8 @@ export class DamageBoostAbAttr extends PreAttackAbAttr {
*/
applyPreAttack(pokemon: Pokemon, passive: boolean, defender: Pokemon, move: PokemonMove, args: any[]): boolean {
if (this.condition(pokemon, defender, move.getMove())) {
(args[0] as Utils.NumberHolder).value *= this.damageMultiplier;
const power = args[0] as Utils.NumberHolder;
power.value = Math.floor(power.value * this.damageMultiplier);
return true;
}