Fix namebox not updating with theme

Fix namebox not updating with theme; ban certain species from being used by trainers
This commit is contained in:
Flashfyre committed 2024-04-04 18:00:21 -04:00
1 parent 3e99ed6bb6
commit 4f0b1fdcfb
4 files changed
+13 -5

No files matched your search

+6 -1
View File
@@ -167,6 +167,10 @@ export abstract class PokemonSpeciesForm {
return this.getRegion() > Region.NORMAL;
}
isTrainerForbidden(): boolean {
return [ Species.ETERNAL_FLOETTE, Species.BLOODMOON_URSALUNA ].includes(this.speciesId);
}
isRareRegional(): boolean {
switch (this.getRegion()) {
case Region.HISUI:
@@ -613,7 +617,8 @@ export default class PokemonSpecies extends PokemonSpeciesForm {
&& pokemonPrevolutions.hasOwnProperty(species.speciesId) === hasPrevolution
&& species.pseudoLegendary === pseudoLegendary
&& species.legendary === legendary
&& species.mythical === mythical;
&& species.mythical === mythical
&& (this.isTrainerForbidden() || !species.isTrainerForbidden());
};
}