Random Battle: Minor fixes

Closes #3976
This commit is contained in:
The Immortal 2017-09-11 10:30:16 +04:00
parent ed0d84b3cf
commit 68f636d2b2

View File

@ -1312,7 +1312,7 @@ class RandomTeams extends Dex.ModdedDex {
item = hasMove['destinybond'] ? 'Custap Berry' : ['Leftovers', 'Sitrus Berry'][this.random(2)];
} else if (template.species === 'Raichu-Alola' && hasMove['thunderbolt'] && !teamDetails.zMove && this.random(4) < 1) {
item = 'Aloraichium Z';
} else if (template.species === 'Zygarde-10%' && hasMove['substitute']) {
} else if (template.species === 'Zygarde-10%' && hasMove['substitute'] && !teamDetails.zMove) {
item = hasMove['outrage'] ? 'Dragonium Z' : 'Groundium Z';
} else if (ability === 'Imposter') {
item = 'Choice Scarf';
@ -1325,6 +1325,8 @@ class RandomTeams extends Dex.ModdedDex {
item = 'Flyinium Z';
} else if (hasMove['geomancy']) {
item = 'Power Herb';
} else if (hasMove['solarbeam'] && !hasAbility['Drought'] && !hasMove['sunnyday'] && !teamDetails['sun']) {
item = !teamDetails.zMove ? 'Grassium Z' : 'Power Herb';
} else if (hasMove['switcheroo'] || hasMove['trick']) {
let randomNum = this.random(3);
if (counter.Physical >= 3 && (template.baseStats.spe < 60 || template.baseStats.spe > 108 || randomNum)) {