mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-05 21:17:43 -05:00
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:
parent
58d85bec38
commit
583fc9b483
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user