mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 22:09:27 +02:00
Check game mode for wave 20 trainer evo ban
This commit is contained in:
parent
fe0ce0e27f
commit
0ebbd9ce24
@ -670,9 +670,6 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali
|
|||||||
}
|
}
|
||||||
|
|
||||||
getTrainerSpeciesForLevel(level: number, allowEvolving: boolean = false, strength: PartyMemberStrength, currentWave: number = 0): Species {
|
getTrainerSpeciesForLevel(level: number, allowEvolving: boolean = false, strength: PartyMemberStrength, currentWave: number = 0): Species {
|
||||||
if (currentWave === 20) { //Don't allow first gym leader wave 20 to evolve their mons
|
|
||||||
allowEvolving = false;
|
|
||||||
}
|
|
||||||
return this.getSpeciesForLevel(level, allowEvolving, true, strength, currentWave);
|
return this.getSpeciesForLevel(level, allowEvolving, true, strength, currentWave);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1170,6 +1170,9 @@ function getGymLeaderPartyTemplate(scene: BattleScene) {
|
|||||||
export function getRandomPartyMemberFunc(speciesPool: Species[], trainerSlot: TrainerSlot = TrainerSlot.TRAINER, ignoreEvolution: boolean = false, postProcess?: (enemyPokemon: EnemyPokemon) => void) {
|
export function getRandomPartyMemberFunc(speciesPool: Species[], trainerSlot: TrainerSlot = TrainerSlot.TRAINER, ignoreEvolution: boolean = false, postProcess?: (enemyPokemon: EnemyPokemon) => void) {
|
||||||
return (scene: BattleScene, level: number, strength: PartyMemberStrength) => {
|
return (scene: BattleScene, level: number, strength: PartyMemberStrength) => {
|
||||||
let species = Utils.randSeedItem(speciesPool);
|
let species = Utils.randSeedItem(speciesPool);
|
||||||
|
if (scene.gameMode.isClassic && scene.currentBattle.waveIndex === 20) {
|
||||||
|
ignoreEvolution = true;
|
||||||
|
}
|
||||||
if (!ignoreEvolution) {
|
if (!ignoreEvolution) {
|
||||||
species = getPokemonSpecies(species).getTrainerSpeciesForLevel(level, true, strength, scene.currentBattle.waveIndex);
|
species = getPokemonSpecies(species).getTrainerSpeciesForLevel(level, true, strength, scene.currentBattle.waveIndex);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user