We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4effa9e commit eef41bdCopy full SHA for eef41bd
play.pokemonshowdown.com/src/battle-tooltips.ts
@@ -767,16 +767,13 @@ class BattleTooltips {
767
['recover', 'softboiled', 'rest'].includes(move.id)) {
768
const hpValues = [];
769
let hp = serverPokemon.maxhp - 255;
770
- while (hp > 0) {
+ if (hp > 0 && hp % 256 !== 0) {
771
hpValues.push(hp);
772
- if (hpValues.length >= 5) {
773
- // Reasonable cutoff for custom games
774
- hpValues.push('...');
775
- break;
+ if (hp - 256 > 0) {
+ hpValues.push(hp - 256);
776
}
777
- hp -= 256;
778
779
- text += `<p>Will fail if HP is ${hpValues.join(', ')}</p>`;
+ if (hpValues.length) text += `<p>Will fail if HP is ${hpValues.join(', ')}</p>`;
780
781
782
// RBY healing move glitch
0 commit comments