Random Battle: Fix AG check

The original check didn’t do anything because Megas are selected in
randomSet and not in randomTeam.
This commit is contained in:
The Immortal 2015-12-15 01:23:31 +04:00
parent 58d85bec38
commit 583fc9b483

View File

@ -1096,7 +1096,7 @@ exports.BattleScripts = {
name = template.baseSpecies;
}
let battleForme = this.checkBattleForme(template);
if (battleForme && (battleForme.isMega ? !teamDetails.megaCount : this.random(2))) {
if (battleForme && battleForme.tier !== 'AG' && (battleForme.isMega ? !teamDetails.megaCount : this.random(2))) {
template = this.getTemplate(template.otherFormes.length >= 2 ? template.otherFormes[this.random(template.otherFormes.length)] : template.otherFormes[0]);
}
@ -2033,8 +2033,6 @@ exports.BattleScripts = {
let tier = template.tier;
switch (tier) {
case 'AG':
continue;
case 'Uber':
// Ubers are limited to 2 but have a 20% chance of being added anyway.
if (uberCount > 1 && this.random(5) >= 1) continue;