diff options
author | Ajarmar <axel.jarmar@gmail.com> | 2022-06-16 09:51:15 +0200 |
---|---|---|
committer | rafa_99 <raroma09@gmail.com> | 2022-06-17 03:17:47 +0100 |
commit | e20e59fe09b480b120e4e9f9a290a19b2f2aa4b7 (patch) | |
tree | 1b318b7b52414621ca4ffa93b8abf883489aa9bd /src/com/sneed | |
parent | 85bcec8b1873843bf066f66c96ed606e1ded96c5 (diff) |
Update pre-4.5.0 settings to fix custom starters
Diffstat (limited to 'src/com/sneed')
-rw-r--r-- | src/com/sneed/pkrandom/SettingsUpdater.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/sneed/pkrandom/SettingsUpdater.java b/src/com/sneed/pkrandom/SettingsUpdater.java index 575c8c2..5b638d4 100644 --- a/src/com/sneed/pkrandom/SettingsUpdater.java +++ b/src/com/sneed/pkrandom/SettingsUpdater.java @@ -292,6 +292,20 @@ public class SettingsUpdater { } if (oldVersion < 319) { + + // 5-10 custom starters, offset by 1 because of new "Random" option + int starter1 = FileFunctions.read2ByteInt(dataBlock, 5); + int starter2 = FileFunctions.read2ByteInt(dataBlock, 7); + int starter3 = FileFunctions.read2ByteInt(dataBlock, 9); + + starter1 += 1; + starter2 += 1; + starter3 += 1; + + FileFunctions.write2ByteInt(dataBlock, 5, starter1); + FileFunctions.write2ByteInt(dataBlock, 7, starter2); + FileFunctions.write2ByteInt(dataBlock, 9, starter3); + // 50 elite four unique pokemon (3 bits) insertExtraByte(50, (byte) 0); } |