From ed6da51a1f64a416644aca7bb2ac6d29675ff1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bastos=20Dias?= Date: Mon, 18 May 2026 17:04:45 +0100 Subject: [PATCH] Use ceiling HP percentages only with the HP Percentage Mod --- data/rulesets.ts | 2 +- sim/pokemon.ts | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data/rulesets.ts b/data/rulesets.ts index 22916b6a75..a975530704 100644 --- a/data/rulesets.ts +++ b/data/rulesets.ts @@ -1352,7 +1352,7 @@ export const Rulesets: import('../sim/dex-formats').FormatDataTable = { hppercentagemod: { effectType: 'Rule', name: 'HP Percentage Mod', - desc: "Shows the HP of Pokémon in percentages", + desc: "Shows the HP of Pokémon in rounded-up percentages", onBegin() { this.add('rule', 'HP Percentage Mod: HP is shown in percentages'); this.reportPercentages = true; diff --git a/sim/pokemon.ts b/sim/pokemon.ts index 2803eb6ef7..d28ed2c8ef 100644 --- a/sim/pokemon.ts +++ b/sim/pokemon.ts @@ -2063,7 +2063,14 @@ export class Pokemon { let shared; if (this.battle.reportExactHP) { shared = secret; - } else if (this.battle.dex.currentMod === 'champions') { + } else if (this.battle.reportPercentages) { + // HP Percentage Mod mechanics + let percentage = Math.ceil(100 * this.hp / this.maxhp); + if (percentage === 100 && this.hp < this.maxhp) { + percentage = 99; + } + shared = `${percentage}/100`; + } else if (this.battle.gen >= 7) { // Pokemon Champions mechanics const percentage = Math.floor(100 * this.hp / this.maxhp) || 1; shared = `${percentage}/100`; @@ -2072,13 +2079,6 @@ export class Pokemon { } else if (percentage === 50) { shared += this.hp * 2 > this.maxhp ? 'g' : 'y'; } - } else if (this.battle.reportPercentages || this.battle.gen >= 7) { - // HP Percentage Mod mechanics - let percentage = Math.ceil(100 * this.hp / this.maxhp); - if (percentage === 100 && this.hp < this.maxhp) { - percentage = 99; - } - shared = `${percentage}/100`; } else { /** * In-game accurate pixel health mechanics