[Bug] Remove ability swap code in `PlayerPokemon.evolve()` (#3113)
This commit is contained in:
parent
0e5fd80431
commit
5edaec9f98
|
@ -3315,10 +3315,6 @@ export class PlayerPokemon extends Pokemon {
|
||||||
}
|
}
|
||||||
this.generateName();
|
this.generateName();
|
||||||
if (!isFusion) {
|
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
|
// Prevent pokemon with an illegal ability value from breaking things too badly
|
||||||
const abilityCount = this.getSpeciesForm().getAbilityCount();
|
const abilityCount = this.getSpeciesForm().getAbilityCount();
|
||||||
if (this.abilityIndex >= abilityCount) {
|
if (this.abilityIndex >= abilityCount) {
|
||||||
|
@ -3327,9 +3323,6 @@ export class PlayerPokemon extends Pokemon {
|
||||||
this.abilityIndex = 0;
|
this.abilityIndex = 0;
|
||||||
}
|
}
|
||||||
} else { // Do the same as above, but for fusions
|
} 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();
|
const abilityCount = this.getFusionSpeciesForm().getAbilityCount();
|
||||||
if (this.fusionAbilityIndex >= abilityCount) {
|
if (this.fusionAbilityIndex >= abilityCount) {
|
||||||
console.warn("this.fusionAbilityIndex is somehow an illegal value, please report this");
|
console.warn("this.fusionAbilityIndex is somehow an illegal value, please report this");
|
||||||
|
|
Loading…
Reference in New Issue