// Path: src/com/dabomstew/pkrandom/pokemon/ItemList.java
// public class ItemList {
// 
//     private boolean[] items;
//     private boolean[] tms;
// 
//     public ItemList(int highestIndex) {
//         items = new boolean[highestIndex + 1];
//         tms = new boolean[highestIndex + 1];
//         for (int i = 1; i <= highestIndex; i++) {
//             items[i] = true;
//         }
//     }
// 
//     public boolean isTM(int index) {
//         if (index < 0 || index >= tms.length) {
//             return false;
//         }
//         return tms[index];
//     }
// 
//     public boolean isAllowed(int index) {
//         if (index < 0 || index >= tms.length) {
//             return false;
//         }
//         return items[index];
//     }
// 
//     public void banSingles(int... indexes) {
//         for (int index : indexes) {
//             items[index] = false;
//         }
//     }
// 
//     public void banRange(int startIndex, int length) {
//         for (int i = 0; i < length; i++) {
//             items[i + startIndex] = false;
//         }
//     }
// 
//     public void tmRange(int startIndex, int length) {
//         for (int i = 0; i < length; i++) {
//             tms[i + startIndex] = true;
//         }
//     }
// 
//     public int randomItem(Random random) {
//         int chosen = 0;
//         while (!items[chosen]) {
//             chosen = random.nextInt(items.length);
//         }
//         return chosen;
//     }
// 
//     public int randomNonTM(Random random) {
//         int chosen = 0;
//         while (!items[chosen] || tms[chosen]) {
//             chosen = random.nextInt(items.length);
//         }
//         return chosen;
//     }
// 
//     public int randomTM(Random random) {
//         int chosen = 0;
//         while (!tms[chosen]) {
//             chosen = random.nextInt(items.length);
//         }
//         return chosen;
//     }
// 
//     public ItemList copy() {
//         ItemList other = new ItemList(items.length - 1);
//         System.arraycopy(items, 0, other.items, 0, items.length);
//         System.arraycopy(tms, 0, other.tms, 0, tms.length);
//         return other;
//     }
// 
// }
// 
// Path: src/com/dabomstew/pkrandom/pokemon/Type.java
// public enum Type {
// 
//     NORMAL, FIGHTING, FLYING, GRASS, WATER, FIRE, ROCK, GROUND, PSYCHIC, BUG, DRAGON, ELECTRIC, GHOST, POISON, ICE, STEEL, DARK, GAS(
//             true), FAIRY(true), WOOD(true), ABNORMAL(true), WIND(true), SOUND(true), LIGHT(true), TRI(true);
// 
//     public boolean isHackOnly;
// 
//     private Type() {
//         this.isHackOnly = false;
//     }
// 
//     private Type(boolean isHackOnly) {
//         this.isHackOnly = isHackOnly;
//     }
// 
//     private static final List<Type> VALUES = Collections.unmodifiableList(Arrays.asList(values()));
//     private static final int SIZE = VALUES.size();
// 
//     public static Type randomType(Random random) {
//         return VALUES.get(random.nextInt(SIZE));
//     }
// 
//     public String camelCase() {
//         return RomFunctions.camelCase(this.toString());
//     }
// 
// }


import java.util.Arrays;
import java.util.List;
import com.dabomstew.pkrandom.pokemon.ItemList;
import com.dabomstew.pkrandom.pokemon.Trainer;
import com.dabomstew.pkrandom.pokemon.Type;
            efrlgAbilityNamesPointer = 0x1C0, efrlgItemDataPointer = 0x1C8, efrlgMoveDataPointer = 0x1CC,
            efrlgPokemonStatsPointer = 0x1BC, efrlgFrontSpritesPointer = 0x128, efrlgPokemonPalettesPointer = 0x130;

    public static final byte[] emptyPokemonSig = new byte[] { 0x32, (byte) 0x96, 0x32, (byte) 0x96, (byte) 0x96, 0x32,
            0x00, 0x00, 0x03, 0x01, (byte) 0xAA, 0x0A, 0x00, 0x00, 0x00, 0x00, (byte) 0xFF, 0x78, 0x00, 0x00, 0x0F,
            0x0F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00 };

    public static final int baseStatsEntrySize = 0x1C;

    public static final int bsHPOffset = 0, bsAttackOffset = 1, bsDefenseOffset = 2, bsSpeedOffset = 3,
            bsSpAtkOffset = 4, bsSpDefOffset = 5, bsPrimaryTypeOffset = 6, bsSecondaryTypeOffset = 7,
            bsCatchRateOffset = 8, bsCommonHeldItemOffset = 12, bsRareHeldItemOffset = 14, bsGenderRatioOffset = 16,
            bsGrowthCurveOffset = 19, bsAbility1Offset = 22, bsAbility2Offset = 23;

    public static final int textTerminator = 0xFF, textVariable = 0xFD;

    public static final byte freeSpaceByte = (byte) 0xFF;

    public static final int rseStarter2Offset = 2, rseStarter3Offset = 4, frlgStarter2Offset = 515,
            frlgStarter3Offset = 461, frlgStarterRepeatOffset = 5;

    public static final int frlgBaseStarter1 = 1, frlgBaseStarter2 = 4, frlgBaseStarter3 = 7;

    public static final int frlgStarterItemsOffset = 218;

    public static final int gbaAddRxOpcode = 0x30, gbaUnconditionalJumpOpcode = 0xE0, gbaSetRxOpcode = 0x20,
            gbaCmpRxOpcode = 0x28, gbaNopOpcode = 0x46C0;

    public static final int gbaR0 = 0, gbaR1 = 1, gbaR2 = 2, gbaR3 = 3, gbaR4 = 4, gbaR5 = 5, gbaR6 = 6, gbaR7 = 7;

// Path: src/com/dabomstew/pkrandom/pokemon/ItemList.java
// public class ItemList {
// 
//     private boolean[] items;
//     private boolean[] tms;
// 
//     public ItemList(int highestIndex) {
//         items = new boolean[highestIndex + 1];
//         tms = new boolean[highestIndex + 1];
//         for (int i = 1; i <= highestIndex; i++) {
//             items[i] = true;
//         }
//     }
// 
//     public boolean isTM(int index) {
//         if (index < 0 || index >= tms.length) {
//             return false;
//         }
//         return tms[index];
//     }
// 
//     public boolean isAllowed(int index) {
//         if (index < 0 || index >= tms.length) {
//             return false;
//         }
//         return items[index];
//     }
// 
//     public void banSingles(int... indexes) {
//         for (int index : indexes) {
//             items[index] = false;
//         }
//     }
// 
//     public void banRange(int startIndex, int length) {
//         for (int i = 0; i < length; i++) {
//             items[i + startIndex] = false;
//         }
//     }
// 
//     public void tmRange(int startIndex, int length) {
//         for (int i = 0; i < length; i++) {
//             tms[i + startIndex] = true;
//         }
//     }
// 
//     public int randomItem(Random random) {
//         int chosen = 0;
//         while (!items[chosen]) {
//             chosen = random.nextInt(items.length);
//         }
//         return chosen;
//     }
// 
//     public int randomNonTM(Random random) {
//         int chosen = 0;
//         while (!items[chosen] || tms[chosen]) {
//             chosen = random.nextInt(items.length);
//         }
//         return chosen;
//     }
// 
//     public int randomTM(Random random) {
//         int chosen = 0;
//         while (!tms[chosen]) {
//             chosen = random.nextInt(items.length);
//         }
//         return chosen;
//     }
// 
//     public ItemList copy() {
//         ItemList other = new ItemList(items.length - 1);
//         System.arraycopy(items, 0, other.items, 0, items.length);
//         System.arraycopy(tms, 0, other.tms, 0, tms.length);
//         return other;
//     }
// 
// }
// 
// Path: src/com/dabomstew/pkrandom/pokemon/Type.java
// public enum Type {
// 
//     NORMAL, FIGHTING, FLYING, GRASS, WATER, FIRE, ROCK, GROUND, PSYCHIC, BUG, DRAGON, ELECTRIC, GHOST, POISON, ICE, STEEL, DARK, GAS(
//             true), FAIRY(true), WOOD(true), ABNORMAL(true), WIND(true), SOUND(true), LIGHT(true), TRI(true);
// 
//     public boolean isHackOnly;
// 
//     private Type() {
//         this.isHackOnly = false;
//     }
// 
//     private Type(boolean isHackOnly) {
//         this.isHackOnly = isHackOnly;
//     }
// 
//     private static final List<Type> VALUES = Collections.unmodifiableList(Arrays.asList(values()));
//     private static final int SIZE = VALUES.size();
// 
//     public static Type randomType(Random random) {
//         return VALUES.get(random.nextInt(SIZE));
//     }
// 
//     public String camelCase() {
//         return RomFunctions.camelCase(this.toString());
//     }
// 
// }


// Path: src/com/dabomstew/pkrandom/constants/Gen3Constants.java
import java.util.Arrays;
import java.util.List;
import com.dabomstew.pkrandom.pokemon.ItemList;
import com.dabomstew.pkrandom.pokemon.Trainer;
import com.dabomstew.pkrandom.pokemon.Type;

            efrlgAbilityNamesPointer = 0x1C0, efrlgItemDataPointer = 0x1C8, efrlgMoveDataPointer = 0x1CC,
            efrlgPokemonStatsPointer = 0x1BC, efrlgFrontSpritesPointer = 0x128, efrlgPokemonPalettesPointer = 0x130;

    public static final byte[] emptyPokemonSig = new byte[] { 0x32, (byte) 0x96, 0x32, (byte) 0x96, (byte) 0x96, 0x32,
            0x00, 0x00, 0x03, 0x01, (byte) 0xAA, 0x0A, 0x00, 0x00, 0x00, 0x00, (byte) 0xFF, 0x78, 0x00, 0x00, 0x0F,
            0x0F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00 };

    public static final int baseStatsEntrySize = 0x1C;

    public static final int bsHPOffset = 0, bsAttackOffset = 1, bsDefenseOffset = 2, bsSpeedOffset = 3,
            bsSpAtkOffset = 4, bsSpDefOffset = 5, bsPrimaryTypeOffset = 6, bsSecondaryTypeOffset = 7,
            bsCatchRateOffset = 8, bsCommonHeldItemOffset = 12, bsRareHeldItemOffset = 14, bsGenderRatioOffset = 16,
            bsGrowthCurveOffset = 19, bsAbility1Offset = 22, bsAbility2Offset = 23;

    public static final int textTerminator = 0xFF, textVariable = 0xFD;

    public static final byte freeSpaceByte = (byte) 0xFF;

    public static final int rseStarter2Offset = 2, rseStarter3Offset = 4, frlgStarter2Offset = 515,
            frlgStarter3Offset = 461, frlgStarterRepeatOffset = 5;

    public static final int frlgBaseStarter1 = 1, frlgBaseStarter2 = 4, frlgBaseStarter3 = 7;

    public static final int frlgStarterItemsOffset = 218;

    public static final int gbaAddRxOpcode = 0x30, gbaUnconditionalJumpOpcode = 0xE0, gbaSetRxOpcode = 0x20,
            gbaCmpRxOpcode = 0x28, gbaNopOpcode = 0x46C0;

    public static final int gbaR0 = 0, gbaR1 = 1, gbaR2 = 2, gbaR3 = 3, gbaR4 = 4, gbaR5 = 5, gbaR6 = 6, gbaR7 = 7;

    public static final Type[] typeTable = constructTypeTable();