Don't allow trainer egg moves before level 60 and no rare egg moves at all

pull/827/head
Flashfyre 2024-05-13 17:03:53 -04:00
parent ed87293867
commit 7e5c7fb4f7
1 changed files with 1 additions and 7 deletions

View File

@ -1225,24 +1225,18 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
} }
} }
if (this.level >= 25) { // No egg moves below level 25 if (this.level >= 60) { // No egg moves below level 60
for (let i = 0; i < 3; i++) { for (let i = 0; i < 3; i++) {
const moveId = speciesEggMoves[this.species.getRootSpeciesId()][i]; const moveId = speciesEggMoves[this.species.getRootSpeciesId()][i];
if (!movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)')) if (!movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)'))
movePool.push([moveId, Math.min(this.level * 0.5, 40)]); movePool.push([moveId, Math.min(this.level * 0.5, 40)]);
} }
const moveId = speciesEggMoves[this.species.getRootSpeciesId()][3];
if (this.level >= 60 && !movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)')) // No rare egg moves before level 60
movePool.push([moveId, Math.min(this.level * 0.2, 20)]);
if (this.fusionSpecies) { if (this.fusionSpecies) {
for (let i = 0; i < 3; i++) { for (let i = 0; i < 3; i++) {
const moveId = speciesEggMoves[this.fusionSpecies.getRootSpeciesId()][i]; const moveId = speciesEggMoves[this.fusionSpecies.getRootSpeciesId()][i];
if (!movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)')) if (!movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)'))
movePool.push([moveId, Math.min(this.level * 0.5, 30)]); movePool.push([moveId, Math.min(this.level * 0.5, 30)]);
} }
const moveId = speciesEggMoves[this.fusionSpecies.getRootSpeciesId()][3];
if (this.level >= 60 && !movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)')) // No rare egg moves before level 60
movePool.push([moveId, Math.min(this.level * 0.2, 20)]);
} }
} }
} }