mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-21 16:31:03 +00:00
[Hotfix] Fix wild spawns not having their HA (#3190)
This commit is contained in:
parent
a8adfc2476
commit
f25d4e1ee2
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user