summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java5
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java7
2 files changed, 6 insertions, 6 deletions
diff --git a/src/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java
index 75b0800..9e4ab8a 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java
@@ -325,11 +325,6 @@ public abstract class AbstractRomHandler implements RomHandler {
return mainPokemonList.get(this.random.nextInt(mainPokemonList.size()));
}
- public Pokemon randomForme() {
- checkPokemonRestrictions();
- return altFormesList.get(this.random.nextInt(altFormesList.size()));
- }
-
@Override
public Pokemon randomNonLegendaryPokemon() {
checkPokemonRestrictions();
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java
index 782d921..17a77b2 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java
@@ -2626,7 +2626,12 @@ public class Gen5RomHandler extends AbstractDSRomHandler {
NARCArchive pokespritesNARC = this.readNARC(romEntry.getString("PokemonGraphics"));
// First prepare the palette, it's the easy bit
- byte[] rawPalette = pokespritesNARC.files.get(pk.number * 20 + 18);
+ int palIndex = pk.number * 20 + 18;
+ if (random.nextInt(10) == 0) {
+ // shiny
+ palIndex++;
+ }
+ byte[] rawPalette = pokespritesNARC.files.get(palIndex);
int[] palette = new int[16];
for (int i = 1; i < 16; i++) {
palette[i] = GFXFunctions.conv16BitColorToARGB(readWord(rawPalette, 40 + i * 2));