Add similar protections for egg move pools

This commit is contained in:
Sirz Benjie 2025-09-15 13:02:22 -05:00
parent b167e34e7d
commit e801afa8e9
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -245,7 +245,11 @@ function getEggPoolForSpecies(
excludeRare: boolean,
rareEggMoveWeight = 0,
): void {
for (const [idx, moveId] of speciesEggMoves[rootSpeciesId].entries()) {
const eggMoves = speciesEggMoves[rootSpeciesId];
if (eggMoves == null) {
return;
}
for (const [idx, moveId] of eggMoves.entries()) {
if (levelPool.has(moveId) || (idx === 3 && excludeRare)) {
continue;
}