Random Battle: Fix Various Issues with Ubers (#3069)

This commit is contained in:
Kevin Lau
2017-01-02 16:56:01 -08:00
committed by The Immortal
parent 1aac19401f
commit e7feb63f6c

View File

@@ -2226,6 +2226,9 @@ exports.BattleScripts = {
Unown: 100,
};
let tier = template.tier;
if (tier.includes('Unreleased') && template.battleOnly) {
tier = baseTemplate.tier;
}
if (tier.charAt(0) === '(') {
tier = tier.slice(1, -1);
}
@@ -2334,7 +2337,7 @@ exports.BattleScripts = {
let tier = template.tier;
switch (tier) {
case 'Uber':
case 'Uber': case 'Bank-Uber':
// Ubers are limited to 2 but have a 20% chance of being added anyway.
if (uberCount > 1 && this.random(5) >= 1) continue;
break;