From a2bee3ec79a38d009b6434cf20e33e7d9c909ac0 Mon Sep 17 00:00:00 2001 From: sirDonovan Date: Wed, 23 Apr 2014 16:49:19 -0500 Subject: [PATCH] Remove abilities from pre-Gen 3 battles --- js/client-battle.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/js/client-battle.js b/js/client-battle.js index 14d963f71..13bd07a5c 100644 --- a/js/client-battle.js +++ b/js/client-battle.js @@ -397,7 +397,7 @@ controls += ' '; } } - if (this.finalDecision) { + if (this.finalDecision && this.battle.gen > 2) { controls += 'You might be trapped, so you won\'t be able to cancel a switch!
'; } } @@ -821,15 +821,17 @@ 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.baseAbility && !pokemon.ability) { - text += '

Possible abilities: ' + Tools.getAbility(template.abilities['0']).name; - if (template.abilities['1']) text += ', ' + Tools.getAbility(template.abilities['1']).name; - if (template.abilities['H']) text += ', ' + Tools.getAbility(template.abilities['H']).name; - text += '

'; - } else if (pokemon.ability) { - text += '

Ability: ' + Tools.getAbility(pokemon.ability).name + '

'; - } else if (pokemon.baseAbility) { - text += '

Ability: ' + Tools.getAbility(pokemon.baseAbility).name + '

'; + if (this.battle.gen > 2) { + if (!pokemon.baseAbility && !pokemon.ability) { + text += '

Possible abilities: ' + Tools.getAbility(template.abilities['0']).name; + if (template.abilities['1']) text += ', ' + Tools.getAbility(template.abilities['1']).name; + if (template.abilities['H']) text += ', ' + Tools.getAbility(template.abilities['H']).name; + text += '

'; + } else if (pokemon.ability) { + text += '

Ability: ' + Tools.getAbility(pokemon.ability).name + '

'; + } else if (pokemon.baseAbility) { + text += '

Ability: ' + Tools.getAbility(pokemon.baseAbility).name + '

'; + } } if (pokemon.item) { text += '

Item: ' + Tools.getItem(pokemon.item).name + '

';