mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-09 12:36:41 -05:00
Undo scripts.js regression
This commit is contained in:
parent
0ef4a02b0c
commit
d19dbef70a
|
|
@ -1105,7 +1105,7 @@ exports.BattleScripts = {
|
|||
var typeCombo = [type1, type2].sort().join('/');
|
||||
var rejectCombo = true;
|
||||
if (!type1 in hasStab && !type2 in hasStab) {
|
||||
if (typeCombo === 'Electric/Ice' || typeCombo === 'Fighting/Ghost' || typeCombo === 'Dark/Fightng') rejectCombo = false;
|
||||
if (typeCombo === 'Electric/Ice' || typeCombo === 'Fighting/Ghost' || typeCombo === 'Dark/Fighting') rejectCombo = false;
|
||||
} else {
|
||||
rejectCombo = false;
|
||||
}
|
||||
|
|
@ -1578,6 +1578,7 @@ exports.BattleScripts = {
|
|||
];
|
||||
var randoms = {};
|
||||
for (var i=0; i<6; i++) {
|
||||
if (randNums[i] < 1) randNums[i] = 1;
|
||||
randoms[randNums[i]] = true;
|
||||
}
|
||||
var team = [];
|
||||
|
|
@ -1589,17 +1590,16 @@ exports.BattleScripts = {
|
|||
];
|
||||
for (var p in this.data.Pokedex) {
|
||||
if (this.data.Pokedex[p].num in randoms) {
|
||||
var pokeName = (this.data.Pokedex[p].baseSpecies)? this.data.Pokedex[p].baseSpecies : p;
|
||||
var set = this.randomSet(this.getTemplate(pokeName), mons);
|
||||
var set = this.randomSet(this.getTemplate(p), mons);
|
||||
fashion = fashion.randomize();
|
||||
if (fashion.indexOf(set.item) === -1) set.item = fashion[0];
|
||||
team.push(set);
|
||||
delete randoms[this.data.Pokedex[p].num];
|
||||
mons++;
|
||||
randoms[this.data.Pokedex[p].num] = false;
|
||||
}
|
||||
}
|
||||
// Just in case the randoms generated the same number... highly unlikely
|
||||
var defaults = ['unown', 'castform', 'charizard', 'pikachu', 'arceus', 'cherrim'].randomize();
|
||||
var defaults = ['politoed', 'toxicroak', 'articuno', 'jirachi', 'tentacruel', 'liepard'].randomize();
|
||||
while (mons < 6) {
|
||||
var set = this.randomSet(this.getTemplate(defaults[mons]), mons);
|
||||
fashion = fashion.randomize();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user