[P2] Stop G-Max Pokemon from evolving (#4581)
This commit is contained in:
parent
e8f40c10c9
commit
f629a3e453
|
@ -1707,7 +1707,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
if (pokemonEvolutions.hasOwnProperty(this.species.speciesId)) {
|
if (pokemonEvolutions.hasOwnProperty(this.species.speciesId)) {
|
||||||
const evolutions = pokemonEvolutions[this.species.speciesId];
|
const evolutions = pokemonEvolutions[this.species.speciesId];
|
||||||
for (const e of evolutions) {
|
for (const e of evolutions) {
|
||||||
if (!e.item && this.level >= e.level && (!e.preFormKey || this.getFormKey() === e.preFormKey)) {
|
if (!e.item && this.level >= e.level && (isNullOrUndefined(e.preFormKey) || this.getFormKey() === e.preFormKey)) {
|
||||||
if (e.condition === null || (e.condition as SpeciesEvolutionCondition).predicate(this)) {
|
if (e.condition === null || (e.condition as SpeciesEvolutionCondition).predicate(this)) {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
@ -1718,7 +1718,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
if (this.isFusion() && this.fusionSpecies && pokemonEvolutions.hasOwnProperty(this.fusionSpecies.speciesId)) {
|
if (this.isFusion() && this.fusionSpecies && pokemonEvolutions.hasOwnProperty(this.fusionSpecies.speciesId)) {
|
||||||
const fusionEvolutions = pokemonEvolutions[this.fusionSpecies.speciesId].map(e => new FusionSpeciesFormEvolution(this.species.speciesId, e));
|
const fusionEvolutions = pokemonEvolutions[this.fusionSpecies.speciesId].map(e => new FusionSpeciesFormEvolution(this.species.speciesId, e));
|
||||||
for (const fe of fusionEvolutions) {
|
for (const fe of fusionEvolutions) {
|
||||||
if (!fe.item && this.level >= fe.level && (!fe.preFormKey || this.getFusionFormKey() === fe.preFormKey)) {
|
if (!fe.item && this.level >= fe.level && (isNullOrUndefined(fe.preFormKey) || this.getFusionFormKey() === fe.preFormKey)) {
|
||||||
if (fe.condition === null || (fe.condition as SpeciesEvolutionCondition).predicate(this)) {
|
if (fe.condition === null || (fe.condition as SpeciesEvolutionCondition).predicate(this)) {
|
||||||
return fe;
|
return fe;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue