From f25d4e1ee2ec0a04d1631fd1e1bcb74a90295e2a Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Sun, 28 Jul 2024 14:06:38 -0700 Subject: [PATCH] [Hotfix] Fix wild spawns not having their HA (#3190) --- src/field/pokemon.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index cd9ff748b0a3..b6cba8387df3 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) {