https://github.com/smogon/pokemon-showdown/blob/master/data/random-teams.ts lines 1527 to 1545 state:Can either of you show me the code that proves your answer is correct?
Code:
// Limit one Pokemon per tier, two for Monotype
if ((tierCount[tier] >= (isMonotype ? 2 : 1)) && !this.randomChance(1, Math.pow(5, tierCount[tier]))) {
continue;
}
if (!isMonotype) {
// Limit two of any type
let skip = false;
for (const typeName of types) {
if (typeCount[typeName] > 1) {
skip = true;
break;
}
}
if (skip) continue;
}
// Limit one of any type combination, two in Monotype
if (typeComboCount[typeCombo] >= (isMonotype ? 2 : 1)) continue;