diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index f630cc16a48b..433bbf0203d5 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -135,10 +135,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { // If abilityIndex is not provided, determine it based on species and hidden ability if (species.abilityHidden && hasHiddenAbility) { // If the species has a hidden ability and the hidden ability is present - this.abilityIndex = species.ability2 ? 2 : 1; // Use ability index 2 if species has a second ability, otherwise use 1 + this.abilityIndex = 2; } else { // If there is no hidden ability or species does not have a hidden ability - this.abilityIndex = species.ability2 ? randAbilityIndex : 0; // Use random ability index if species has a second ability, otherwise use 0 + this.abilityIndex = species.ability2 !== species.ability1 ? randAbilityIndex : 0; // Use random ability index if species has a second ability, otherwise use 0 } } if (formIndex !== undefined) {