mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 15:33:29 +02:00
[Beta] Fresh Start no longer overrides IV unlocks (#6333)
Unpack ivs when copying dexData
This commit is contained in:
parent
8904cfc37b
commit
187cd9e356
@ -3741,7 +3741,9 @@ export class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
const dexEntry = globalScene.gameData.dexData[speciesId];
|
const dexEntry = globalScene.gameData.dexData[speciesId];
|
||||||
const starterDataEntry = globalScene.gameData.starterData[speciesId];
|
const starterDataEntry = globalScene.gameData.starterData[speciesId];
|
||||||
|
|
||||||
|
// Unpacking to make a copy by values, not references
|
||||||
const copiedDexEntry = { ...dexEntry };
|
const copiedDexEntry = { ...dexEntry };
|
||||||
|
copiedDexEntry.ivs = [...dexEntry.ivs];
|
||||||
const copiedStarterDataEntry = { ...starterDataEntry };
|
const copiedStarterDataEntry = { ...starterDataEntry };
|
||||||
if (applyChallenge) {
|
if (applyChallenge) {
|
||||||
applyChallenges(ChallengeType.STARTER_SELECT_MODIFY, speciesId, copiedDexEntry, copiedStarterDataEntry);
|
applyChallenges(ChallengeType.STARTER_SELECT_MODIFY, speciesId, copiedDexEntry, copiedStarterDataEntry);
|
||||||
|
Loading…
Reference in New Issue
Block a user