Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Revert evolution ability swap fix #3113

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/field/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3318,10 +3318,6 @@ export class PlayerPokemon extends Pokemon {
}
this.generateName();
if (!isFusion) {
// If a pokemon has its second ability and it evolves into a pokemon that doesn't have a second ability, switch to its first ability instead of its hidden ability
if (this.getSpeciesForm().ability2 === Abilities.NONE && this.abilityIndex === 1) {
this.abilityIndex = 0;
}
// Prevent pokemon with an illegal ability value from breaking things too badly
const abilityCount = this.getSpeciesForm().getAbilityCount();
if (this.abilityIndex >= abilityCount) {
Expand All @@ -3330,9 +3326,6 @@ export class PlayerPokemon extends Pokemon {
this.abilityIndex = 0;
}
} else { // Do the same as above, but for fusions
if (this.getFusionSpeciesForm().ability2 === Abilities.NONE && this.fusionAbilityIndex === 1) {
this.fusionAbilityIndex = 0;
}
const abilityCount = this.getFusionSpeciesForm().getAbilityCount();
if (this.fusionAbilityIndex >= abilityCount) {
console.warn("this.fusionAbilityIndex is somehow an illegal value, please report this");
Expand Down
Loading