Replace (fainted) text with 0/X hp (#2604)

---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
This commit is contained in:
Ethan Strader 2026-03-15 01:58:23 -04:00 committed by GitHub
parent 49a311cc9b
commit fff081a1de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -870,8 +870,10 @@ export class BattleTooltips {
text += `<p class="tooltip-section"><strong>Possible Illusion #${illusionIndex}</strong>${levelBuf}</p>`;
}
if (pokemon.fainted) {
text += '<p><small>HP:</small> (fainted)</p>';
if (pokemon.fainted && pokemon.maxhp === 100) {
text += `<p><small>HP:</small> (fainted)</p>`;
} else if (pokemon.fainted) {
text += `<p><small>HP:</small> <span class="gray">0/${pokemon.maxhp} (fainted)</span></p>`;
} else if (this.battle.hardcoreMode) {
if (serverPokemon) {
const status = pokemon.status ? ` <span class="status ${pokemon.status}">${pokemon.status.toUpperCase()}</span>` : '';