Skip to content

Commit 9d7ecfc

Browse files
Merge pull request #511 from andrewbenington/species-form-fix
[FIX] species/form regression fix
2 parents 9c534ae + 1b8d8b9 commit 9d7ecfc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/core/pkm/OHPKM.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import {
5555
statsPreSplitToWasm,
5656
trainerMemoryToWasm,
5757
} from './convert'
58+
import { isEvolution } from './Lookup'
5859
import { adjustMovePPBetweenFormats, generateIVs, getAbilityFromNumber, ivsFromDVs } from './util'
5960

6061
export class OHPKM extends OhpkmV2Wasm implements PKMInterface {
@@ -696,7 +697,13 @@ export class OHPKM extends OhpkmV2Wasm implements PKMInterface {
696697
this.movePP = adjustMovePPBetweenFormats(this, other)
697698
this.movePPUps = other.movePPUps as FourMoves
698699

699-
this.speciesAndForme = new SpeciesAndForme(other.dexNum, other.formeNum)
700+
if (this.dexNum !== other.dexNum && isEvolution(this, other)) {
701+
this.speciesAndForme = new SpeciesAndForme(other.dexNum, other.formeNum)
702+
}
703+
704+
if (this.dexNum === other.dexNum || isEvolution(this, other)) {
705+
this.speciesAndForme = new SpeciesAndForme(other.dexNum, other.formeNum)
706+
}
700707

701708
this.heldItemIndex = other.heldItemIndex
702709
if (other.ability && !FORMATS_WITHOUT_ABILITIES.includes(other.format)) {

0 commit comments

Comments
 (0)