Use nature override property instead of overwriting base nature

This commit is contained in:
Flashfyre committed 2024-04-02 23:00:56 -04:00
1 parent b248209743
commit 84f6456972
10 files changed
+26 -17

No files matched your search

+1 -1
View File
@@ -1503,7 +1503,7 @@ export class SyncEncounterNatureAbAttr extends AbAttr {
}
apply(pokemon: Pokemon, cancelled: Utils.BooleanHolder, args: any[]): boolean {
(args[0] as Pokemon).setNature(pokemon.nature);
(args[0] as Pokemon).setNature(pokemon.getNature());
return true;
}
+1 -1
View File
@@ -64,7 +64,7 @@ function getDailyRunStarter(scene: BattleScene, starterSpeciesForm: PokemonSpeci
const starter: Starter = {
species: starterSpecies,
dexAttr: pokemon.getDexAttr(),
nature: pokemon.nature,
nature: pokemon.getNature(),
pokerus: pokemon.pokerus
};
pokemon.destroy();
+1 -1
View File
@@ -1038,7 +1038,7 @@ export const pokemonEvolutions: PokemonEvolutions = {
],
[Species.TOXEL]: [
new SpeciesFormEvolution(Species.TOXTRICITY, '', 'lowkey', 30, null,
new SpeciesEvolutionCondition(p => [ Nature.LONELY, Nature.BOLD, Nature.RELAXED, Nature.TIMID, Nature.SERIOUS, Nature.MODEST, Nature.MILD, Nature.QUIET, Nature.BASHFUL, Nature.CALM, Nature.GENTLE, Nature.CAREFUL ].indexOf(p.nature) > -1)),
new SpeciesEvolutionCondition(p => [ Nature.LONELY, Nature.BOLD, Nature.RELAXED, Nature.TIMID, Nature.SERIOUS, Nature.MODEST, Nature.MILD, Nature.QUIET, Nature.BASHFUL, Nature.CALM, Nature.GENTLE, Nature.CAREFUL ].indexOf(p.getNature()) > -1)),
new SpeciesFormEvolution(Species.TOXTRICITY, '', 'amped', 30, null, null)
],
[Species.SIZZLIPEDE]: [
+1 -1
View File
@@ -293,7 +293,7 @@ export class SpeciesDefaultFormMatchTrigger extends SpeciesFormChangeTrigger {
}
canChange(pokemon: Pokemon): boolean {
return this.formKey === pokemon.species.forms[pokemon.scene.getSpeciesFormIndex(pokemon.species, pokemon.gender, pokemon.nature, true)].formKey;
return this.formKey === pokemon.species.forms[pokemon.scene.getSpeciesFormIndex(pokemon.species, pokemon.gender, pokemon.getNature(), true)].formKey;
}
}