[Beta] Fresh Start no longer overrides IV unlocks (#6333)

Unpack ivs when copying dexData
This commit is contained in:
Wlowscha 2025-08-22 09:23:45 +02:00 committed by GitHub
parent 8904cfc37b
commit 187cd9e356
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3741,7 +3741,9 @@ export class StarterSelectUiHandler extends MessageUiHandler {
const dexEntry = globalScene.gameData.dexData[speciesId];
const starterDataEntry = globalScene.gameData.starterData[speciesId];
// Unpacking to make a copy by values, not references
const copiedDexEntry = { ...dexEntry };
copiedDexEntry.ivs = [...dexEntry.ivs];
const copiedStarterDataEntry = { ...starterDataEntry };
if (applyChallenge) {
applyChallenges(ChallengeType.STARTER_SELECT_MODIFY, speciesId, copiedDexEntry, copiedStarterDataEntry);