Use nature override property instead of overwriting base nature
This commit is contained in:
1 parent
b248209743
commit
84f6456972
10 files changed
+26
-17
No files matched your search
@@ -271,7 +271,7 @@ export class PokemonNatureChangeModifierType extends PokemonModifierType {
|
||||
constructor(nature: Nature) {
|
||||
super(`${getNatureName(nature)} Mint`, `Changes a Pokémon\'s nature to ${getNatureName(nature, true, true, true)}`, ((_type, args) => new Modifiers.PokemonNatureChangeModifier(this, (args[0] as PlayerPokemon).id, this.nature)),
|
||||
((pokemon: PlayerPokemon) => {
|
||||
if (pokemon.nature === this.nature)
|
||||
if (pokemon.getNature() === this.nature)
|
||||
return PartyUiHandler.NoEffectMessage;
|
||||
return null;
|
||||
}), `mint_${Utils.getEnumKeys(Stat).find(s => getNatureStatMultiplier(nature, Stat[s]) > 1)?.toLowerCase() || 'neutral' }`, 'mint');
|
||||
|
||||
@@ -1105,7 +1105,7 @@ export class PokemonNatureChangeModifier extends ConsumablePokemonModifier {
|
||||
|
||||
apply(args: any[]): boolean {
|
||||
const pokemon = args[0] as Pokemon;
|
||||
pokemon.nature = this.nature;
|
||||
pokemon.natureOverride = this.nature;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user