Skip to content

Commit 40ee6ab

Browse files
committed
Tooltips: Add RBY Recover failure indicator
1 parent 0553460 commit 40ee6ab

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

play.pokemonshowdown.com/src/battle-tooltips.ts

+16
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,22 @@ class BattleTooltips {
760760
}
761761
if (move.flags.wind) {
762762
text += `<p class="movetag">&#x2713; Wind <small>(activates Wind Power and Wind Rider)</small></p>`;
763+
764+
// RBY healing move glitch
765+
if (this.battle.gen === 1 && !toID(this.battle.tier).includes('stadium') &&
766+
['recover', 'softboiled', 'rest'].includes(move.id)) {
767+
const hpValues = [];
768+
let hp = serverPokemon.maxhp - 255;
769+
while (hp > 0) {
770+
hpValues.push(hp);
771+
if (hpValues.length >= 5) {
772+
// Reasonable cutoff for custom games
773+
hpValues.push('...');
774+
break;
775+
}
776+
hp -= 256;
777+
}
778+
text += `<p>Will fail if HP is ${hpValues.join(', ')}</p>`;
763779
}
764780

765781
// RBY healing move glitch

0 commit comments

Comments
 (0)