bugfix: ensure hit recoil moves always do at least 1hp in recoil

This commit is contained in:
Madi Simpson 2024-05-03 14:06:50 -07:00 committed by Samuel H
parent d48f0aa97d
commit 06ae04abad

View File

@ -685,7 +685,7 @@ export class RecoilAttr extends MoveEffectAttr {
return false; return false;
const recoilDamage = Math.max(Math.floor((!this.useHp ? user.turnData.damageDealt : user.getMaxHp()) * this.damageRatio), const recoilDamage = Math.max(Math.floor((!this.useHp ? user.turnData.damageDealt : user.getMaxHp()) * this.damageRatio),
!this.useHp && user.turnData.damageDealt ? 1 : 0); user.turnData.damageDealt ? 1 : 0);
if (!recoilDamage) if (!recoilDamage)
return false; return false;