Add missing ceiling function to damage

This commit is contained in:
Flashfyre 2024-04-06 21:04:13 -04:00
parent 92dc7dc584
commit 054a3121e5

View File

@ -539,7 +539,7 @@ export class PostDefendContactDamageAbAttr extends PostDefendAbAttr {
applyPostDefend(pokemon: Pokemon, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean {
if (move.getMove().checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)) {
attacker.damageAndUpdate(attacker.getMaxHp() * (1 / this.damageRatio), HitResult.EFFECTIVE, false, false, false);
attacker.damageAndUpdate(Math.ceil(attacker.getMaxHp() * (1 / this.damageRatio)), HitResult.OTHER);
return true;
}