mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-07 16:55:51 +00:00
Fix bug with catching Pokemon
This commit is contained in:
parent
0b8ae6f05e
commit
0e366986b5
@ -2919,7 +2919,7 @@ export class AttemptCapturePhase extends PokemonPhase {
|
|||||||
const pokemon = this.getPokemon() as EnemyPokemon;
|
const pokemon = this.getPokemon() as EnemyPokemon;
|
||||||
this.scene.unshiftPhase(new VictoryPhase(this.scene, this.battlerIndex));
|
this.scene.unshiftPhase(new VictoryPhase(this.scene, this.battlerIndex));
|
||||||
|
|
||||||
const speciesForm = pokemon.fusionSpecies ? pokemon.getSpeciesForm() : pokemon.getFusionSpeciesForm();
|
const speciesForm = !pokemon.fusionSpecies ? pokemon.getSpeciesForm() : pokemon.getFusionSpeciesForm();
|
||||||
|
|
||||||
if (speciesForm.abilityHidden && (pokemon.fusionSpecies ? pokemon.fusionAbilityIndex : pokemon.abilityIndex) === speciesForm.getAbilityCount() - 1)
|
if (speciesForm.abilityHidden && (pokemon.fusionSpecies ? pokemon.fusionAbilityIndex : pokemon.abilityIndex) === speciesForm.getAbilityCount() - 1)
|
||||||
this.scene.validateAchv(achvs.HIDDEN_ABILITY);
|
this.scene.validateAchv(achvs.HIDDEN_ABILITY);
|
||||||
|
@ -97,7 +97,7 @@ export abstract class PokemonSpeciesForm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getAbility(abilityIndex: integer): Abilities {
|
getAbility(abilityIndex: integer): Abilities {
|
||||||
return !abilityIndex ? this.ability1 : abilityIndex === 1 && this.ability2 ? this.ability2 : this.abilityHidden
|
return !abilityIndex ? this.ability1 : abilityIndex === 1 && this.ability2 ? this.ability2 : this.abilityHidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
getLevelMoves(): LevelMoves {
|
getLevelMoves(): LevelMoves {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user