Tooltips: Fix small display issue in Gen 2 (#1933)

This commit is contained in:
Karthik
2022-01-29 18:20:10 -05:00
committed by GitHub
parent 916f190bf4
commit 2b655fb509

View File

@@ -864,14 +864,16 @@ class BattleTooltips {
if (item) itemText = '<small>Item:</small> ' + item + itemEffect;
}
text += '<p>';
text += abilityText;
if (itemText) {
// ability/item on one line for your own switch tooltips, two lines everywhere else
text += (!isActive && serverPokemon ? ' / ' : '</p><p>');
if (abilityText || itemText) {
text += '<p>';
text += abilityText;
if (abilityText && itemText) {
// ability/item on one line for your own switch tooltips, two lines everywhere else
text += (!isActive && serverPokemon ? ' / ' : '</p><p>');
}
text += itemText;
text += '</p>';
}
text += '</p>';
text += this.renderStats(clientPokemon, serverPokemon, !isActive);