Fix default starter hidden ability for new accounts

pull/195/head
Flashfyre 2024-04-19 12:24:52 -04:00
parent 77c584981b
commit e17aee5d48
1 changed files with 5 additions and 0 deletions

View File

@ -342,6 +342,11 @@ export class GameData {
} else {
if ([ '1.0.0', '1.0.1' ].includes(systemData.gameVersion))
this.migrateStarterAbilities(systemData);
// Migrate ability starter data if empty for caught species
Object.keys(systemData.starterData).forEach(sd => {
if (systemData.dexData[sd].caughtAttr && !systemData.starterData[sd].abilityAttr)
systemData.starterData[sd].abilityAttr = 1;
});
this.starterData = systemData.starterData;
}