Skip to content

Commit

Permalink
Fix fusion with dual type + monotype with shared primary type.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavion3 committed Feb 14, 2025
1 parent 727bf0d commit 7fb8d99
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/field/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
} else if (fusionType1 !== types[0]) {
secondType = fusionType1;
}


if (secondType === Type.UNKNOWN && Utils.isNullOrUndefined(fusionType2)) { // If second pokemon was monotype and shared its primary type
secondType = (customTypes && this.customPokemonData.types.length > 1 && this.customPokemonData.types[1] !== Type.UNKNOWN)
? this.customPokemonData.types[1] : (speciesForm.type2 ?? Type.UNKNOWN);
}
} else {
// If not a fusion, just get the second type from the species, checking for permanent changes from ME
secondType = (customTypes && this.customPokemonData.types.length > 1 && this.customPokemonData.types[1] !== Type.UNKNOWN)
Expand Down

0 comments on commit 7fb8d99

Please sign in to comment.