mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 06:19:29 +02:00
Prevent Ditto from being randomly generated as part of a fusion
This commit is contained in:
parent
8d37225259
commit
324cc03af0
@ -888,17 +888,24 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali
|
||||
getCompatibleFusionSpeciesFilter(): PokemonSpeciesFilter {
|
||||
const hasEvolution = pokemonEvolutions.hasOwnProperty(this.speciesId);
|
||||
const hasPrevolution = pokemonPrevolutions.hasOwnProperty(this.speciesId);
|
||||
const pseudoLegendary = this.subLegendary;
|
||||
const subLegendary = this.subLegendary;
|
||||
const legendary = this.legendary;
|
||||
const mythical = this.mythical;
|
||||
return species => {
|
||||
return (pseudoLegendary || legendary || mythical ||
|
||||
(pokemonEvolutions.hasOwnProperty(species.speciesId) === hasEvolution
|
||||
&& pokemonPrevolutions.hasOwnProperty(species.speciesId) === hasPrevolution))
|
||||
&& species.subLegendary === pseudoLegendary
|
||||
return (
|
||||
subLegendary
|
||||
|| legendary
|
||||
|| mythical
|
||||
|| (
|
||||
pokemonEvolutions.hasOwnProperty(species.speciesId) === hasEvolution
|
||||
&& pokemonPrevolutions.hasOwnProperty(species.speciesId) === hasPrevolution
|
||||
)
|
||||
)
|
||||
&& species.subLegendary === subLegendary
|
||||
&& species.legendary === legendary
|
||||
&& species.mythical === mythical
|
||||
&& (this.isTrainerForbidden() || !species.isTrainerForbidden());
|
||||
&& (this.isTrainerForbidden() || !species.isTrainerForbidden())
|
||||
&& species.speciesId !== Species.DITTO;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2030,15 +2030,17 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
const hasHiddenAbility = !Utils.randSeedInt(hiddenAbilityChance.value);
|
||||
const randAbilityIndex = Utils.randSeedInt(2);
|
||||
|
||||
const filter = !forStarter ? this.species.getCompatibleFusionSpeciesFilter()
|
||||
: species => {
|
||||
const filter = !forStarter ?
|
||||
this.species.getCompatibleFusionSpeciesFilter()
|
||||
: (species: PokemonSpecies) => {
|
||||
return pokemonEvolutions.hasOwnProperty(species.speciesId)
|
||||
&& !pokemonPrevolutions.hasOwnProperty(species.speciesId)
|
||||
&& !species.pseudoLegendary
|
||||
&& !species.subLegendary
|
||||
&& !species.legendary
|
||||
&& !species.mythical
|
||||
&& !species.isTrainerForbidden()
|
||||
&& species.speciesId !== this.species.speciesId;
|
||||
&& species.speciesId !== this.species.speciesId
|
||||
&& species.speciesId !== Species.DITTO;
|
||||
};
|
||||
|
||||
let fusionOverride: PokemonSpecies | undefined = undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user