mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-05-09 04:23:01 -05:00
Only show item and ability when really known
This commit is contained in:
parent
2699691491
commit
14a76f70cf
|
|
@ -1009,7 +1009,7 @@
|
|||
if (!pokemon) {
|
||||
pokemon = this.myPokemon[parseInt(thing)];
|
||||
battlePokemon = this.battle.getPokemon('other: old: ' + pokemon.ident, pokemon.details);
|
||||
} else if (pokemon.side === this.battle.mySide) {
|
||||
} else if (this.controlsShown && pokemon.side === this.battle.mySide) {
|
||||
myPokemon = this.myPokemon[pokemon.slot];
|
||||
}
|
||||
}
|
||||
|
|
@ -1052,11 +1052,15 @@
|
|||
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) {
|
||||
text += '<p>';
|
||||
if (this.battle.gen > 2) {
|
||||
text += 'Ability: ' + Tools.getAbility(pokemon.ability || myPokemon.baseAbility).name + ' / ';
|
||||
text += '<p>Ability: ' + Tools.getAbility(myPokemon.baseAbility).name;
|
||||
if (myPokemon.item) {
|
||||
text += ' / Item: ' + Tools.getItem(myPokemon.item).name;
|
||||
}
|
||||
text += '</p>';
|
||||
} else if (myPokemon.item) {
|
||||
text += '<p> / Item: ' + Tools.getItem(myPokemon.item).name + '</p>';
|
||||
}
|
||||
text += 'Item: ' + Tools.getItem(myPokemon.item).name + '</p>';
|
||||
text += '<p>' + myPokemon.stats['atk'] + ' Atk / ' + myPokemon.stats['def'] + ' Def / ' + myPokemon.stats['spa'];
|
||||
if (this.battle.gen === 1) {
|
||||
text += ' Spc / ';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user