Skip to content

Commit ddb6c6a

Browse files
committed
Tooltips: Add RBY Recover failure indicator
1 parent bb3f7c1 commit ddb6c6a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/battle-tooltips.ts

+16
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,22 @@ class BattleTooltips {
748748
}
749749
if (move.flags.wind) {
750750
text += `<p class="movetag">&#x2713; Wind <small>(activates Wind Power and Wind Rider)</small></p>`;
751+
752+
// RBY healing move glitch
753+
if (this.battle.gen === 1 && !toID(this.battle.tier).includes('stadium') &&
754+
['recover', 'softboiled', 'rest'].includes(move.id)) {
755+
const hpValues = [];
756+
let hp = serverPokemon.maxhp - 255;
757+
while (hp > 0) {
758+
hpValues.push(hp);
759+
if (hpValues.length >= 5) {
760+
// Reasonable cutoff for custom games
761+
hpValues.push('...');
762+
break;
763+
}
764+
hp -= 256;
765+
}
766+
text += `<p>Will fail if HP is ${hpValues.join(', ')}</p>`;
751767
}
752768
}
753769
return text;

0 commit comments

Comments
 (0)