From 0e366986b53bbd934434ae216089f5e2611b962e Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Tue, 5 Dec 2023 23:31:34 -0500 Subject: [PATCH] Fix bug with catching Pokemon --- src/battle-phases.ts | 2 +- src/data/pokemon-species.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 65209f3ed..3c7025754 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -2919,7 +2919,7 @@ export class AttemptCapturePhase extends PokemonPhase { const pokemon = this.getPokemon() as EnemyPokemon; 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) this.scene.validateAchv(achvs.HIDDEN_ABILITY); diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 476ed855c..ef24da7a9 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -97,7 +97,7 @@ export abstract class PokemonSpeciesForm { } 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 {