diff --git a/js/client-battle.js b/js/client-battle.js index bcab30cdb..a9448616c 100644 --- a/js/client-battle.js +++ b/js/client-battle.js @@ -1122,10 +1122,14 @@ text += 'Types unknown'; } text += ''; - var exacthp = ''; - if (pokemon.maxhp != 100 && pokemon.maxhp != 1000 && pokemon.maxhp != 48) exacthp = ' (' + pokemon.hp + '/' + pokemon.maxhp + ')'; - if (pokemon.maxhp == 48 && isActive) exacthp = ' (' + pokemon.hp + '/' + pokemon.maxhp + ' pixels)'; - text += '

HP: ' + pokemon.hpDisplay() + exacthp + (pokemon.status ? ' ' + pokemon.status.toUpperCase() + '' : '') + '

'; + if (pokemon.fainted) { + text += '

HP: (fainted)

'; + } else { + var exacthp = ''; + if (pokemon.maxhp != 100 && pokemon.maxhp != 1000 && pokemon.maxhp != 48) exacthp = ' (' + pokemon.hp + '/' + pokemon.maxhp + ')'; + if (pokemon.maxhp == 48 && isActive) exacthp = ' (' + pokemon.hp + '/' + pokemon.maxhp + ' pixels)'; + text += '

HP: ' + pokemon.hpDisplay() + exacthp + (pokemon.status ? ' ' + pokemon.status.toUpperCase() + '' : '') + '

'; + } if (myPokemon) { if (this.battle.gen > 2) { text += '

Ability: ' + Tools.getAbility(myPokemon.baseAbility).name;