Skip to content

Commit eef41bd

Browse files
committed
Update
1 parent 4effa9e commit eef41bd

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

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

+4-7
Original file line numberDiff line numberDiff line change
@@ -767,16 +767,13 @@ class BattleTooltips {
767767
['recover', 'softboiled', 'rest'].includes(move.id)) {
768768
const hpValues = [];
769769
let hp = serverPokemon.maxhp - 255;
770-
while (hp > 0) {
770+
if (hp > 0 && hp % 256 !== 0) {
771771
hpValues.push(hp);
772-
if (hpValues.length >= 5) {
773-
// Reasonable cutoff for custom games
774-
hpValues.push('...');
775-
break;
772+
if (hp - 256 > 0) {
773+
hpValues.push(hp - 256);
776774
}
777-
hp -= 256;
778775
}
779-
text += `<p>Will fail if HP is ${hpValues.join(', ')}</p>`;
776+
if (hpValues.length) text += `<p>Will fail if HP is ${hpValues.join(', ')}</p>`;
780777
}
781778

782779
// RBY healing move glitch

0 commit comments

Comments
 (0)