Skip to content

Commit c5c44c4

Browse files
committed
Tooltips: Add RBY Recover failure indicator
1 parent b01c150 commit c5c44c4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

+13
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,19 @@ class BattleTooltips {
761761
if (move.flags.wind) {
762762
text += `<p class="movetag">&#x2713; Wind <small>(activates Wind Power and Wind Rider)</small></p>`;
763763
}
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+
if (hp > 0 && hp % 256 !== 0) {
770+
hpValues.push(hp);
771+
if (hp - 256 > 0) {
772+
hpValues.push(hp - 256);
773+
}
774+
}
775+
if (hpValues.length) text += `<p>Will fail if HP is ${hpValues.join(', ')}</p>`;
776+
}
764777
}
765778
return text;
766779
}

0 commit comments

Comments
 (0)