From d36c279166b3a89965eda2fa1c0166b9579b513b Mon Sep 17 00:00:00 2001 From: EscaShark Date: Thu, 30 Jan 2025 21:29:11 +0100 Subject: [PATCH] Altered Substitute/Shed Tail success condition to account for rounding up --- src/data/move.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index fba5b853f4a..cb6e91a2362 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1903,7 +1903,7 @@ export class AddSubstituteAttr extends MoveEffectAttr { } getCondition(): MoveConditionFunc { - return (user, target, move) => !user.getTag(SubstituteTag) && user.hp > Math.floor(user.getMaxHp() * this.hpCost) && user.getMaxHp() > 1; + return (user, target, move) => !user.getTag(SubstituteTag) && user.hp > (this.roundUp ? Math.ceil(user.getMaxHp() * this.hpCost) : Math.floor(user.getMaxHp() * this.hpCost)) && user.getMaxHp() > 1; } /**