mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-01 07:10:46 -05:00
Merge pull request #549 from urkerab/tooltip-pokemon-fainted
Fix HP display for fainted Pokemon
This commit is contained in:
@@ -1122,10 +1122,14 @@
|
||||
text += 'Types unknown';
|
||||
}
|
||||
text += '</h2>';
|
||||
var exacthp = '';
|
||||
if (pokemon.maxhp != 100 && pokemon.maxhp != 1000 && pokemon.maxhp != 48) exacthp = ' (' + pokemon.hp + '/' + pokemon.maxhp + ')';
|
||||
if (pokemon.maxhp == 48 && isActive) exacthp = ' <small>(' + pokemon.hp + '/' + pokemon.maxhp + ' pixels)</small>';
|
||||
text += '<p>HP: ' + pokemon.hpDisplay() + exacthp + (pokemon.status ? ' <span class="status ' + pokemon.status + '">' + pokemon.status.toUpperCase() + '</span>' : '') + '</p>';
|
||||
if (pokemon.fainted) {
|
||||
text += '<p>HP: (fainted)</p>';
|
||||
} else {
|
||||
var exacthp = '';
|
||||
if (pokemon.maxhp != 100 && pokemon.maxhp != 1000 && pokemon.maxhp != 48) exacthp = ' (' + pokemon.hp + '/' + pokemon.maxhp + ')';
|
||||
if (pokemon.maxhp == 48 && isActive) exacthp = ' <small>(' + pokemon.hp + '/' + pokemon.maxhp + ' pixels)</small>';
|
||||
text += '<p>HP: ' + pokemon.hpDisplay() + exacthp + (pokemon.status ? ' <span class="status ' + pokemon.status + '">' + pokemon.status.toUpperCase() + '</span>' : '') + '</p>';
|
||||
}
|
||||
if (myPokemon) {
|
||||
if (this.battle.gen > 2) {
|
||||
text += '<p>Ability: ' + Tools.getAbility(myPokemon.baseAbility).name;
|
||||
|
||||
Reference in New Issue
Block a user