mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-29 02:06:07 +00:00
bugfix: ensure hit recoil moves always do at least 1hp in recoil
This commit is contained in:
parent
d48f0aa97d
commit
06ae04abad
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user