diff --git a/src/pokemon.c b/src/pokemon.c index ef90f10ba3..a2d4ed3ab9 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1198,6 +1198,9 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, SetBoxMonData(boxMon, MON_DATA_POKEBALL, &value); SetBoxMonData(boxMon, MON_DATA_OT_GENDER, &gSaveBlock2Ptr->playerGender); + u32 teraType = (boxMon->personality & 0x1) == 0 ? gSpeciesInfo[species].types[0] : gSpeciesInfo[species].types[1]; + SetBoxMonData(boxMon, MON_DATA_TERA_TYPE, &teraType); + if (fixedIV < USE_RANDOM_IVS) { SetBoxMonData(boxMon, MON_DATA_HP_IV, &fixedIV); @@ -2789,18 +2792,9 @@ u32 GetBoxMonData3(struct BoxPokemon *boxMon, s32 field, u8 *data) break; case MON_DATA_TERA_TYPE: if (gSpeciesInfo[substruct0->species].forceTeraType) - { retVal = gSpeciesInfo[substruct0->species].forceTeraType; - } - else if (substruct0->teraType == TYPE_NONE) // Tera Type hasn't been modified so we can just use the personality - { - const u8 *types = gSpeciesInfo[substruct0->species].types; - retVal = (boxMon->personality & 0x1) == 0 ? types[0] : types[1]; - } else - { retVal = substruct0->teraType; - } break; case MON_DATA_EVOLUTION_TRACKER: evoTracker.asField.a = substruct1->evolutionTracker1;