summaryrefslogtreecommitdiff
path: root/src/com/pkrandom/constants
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/pkrandom/constants')
-rw-r--r--src/com/pkrandom/constants/Abilities.java294
-rw-r--r--src/com/pkrandom/constants/GBConstants.java52
-rw-r--r--src/com/pkrandom/constants/Gen1Constants.java352
-rw-r--r--src/com/pkrandom/constants/Gen1Items.java285
-rw-r--r--src/com/pkrandom/constants/Gen2Constants.java431
-rw-r--r--src/com/pkrandom/constants/Gen2Items.java285
-rw-r--r--src/com/pkrandom/constants/Gen3Constants.java1319
-rw-r--r--src/com/pkrandom/constants/Gen3Items.java410
-rw-r--r--src/com/pkrandom/constants/Gen4Constants.java2107
-rw-r--r--src/com/pkrandom/constants/Gen5Constants.java1948
-rw-r--r--src/com/pkrandom/constants/Gen6Constants.java2171
-rw-r--r--src/com/pkrandom/constants/Gen7Constants.java2243
-rw-r--r--src/com/pkrandom/constants/GlobalConstants.java252
-rw-r--r--src/com/pkrandom/constants/Items.java1670
-rw-r--r--src/com/pkrandom/constants/Moves.java854
-rw-r--r--src/com/pkrandom/constants/N3DSConstants.java212
-rw-r--r--src/com/pkrandom/constants/Species.java1407
17 files changed, 16292 insertions, 0 deletions
diff --git a/src/com/pkrandom/constants/Abilities.java b/src/com/pkrandom/constants/Abilities.java
new file mode 100644
index 0000000..ee4819d
--- /dev/null
+++ b/src/com/pkrandom/constants/Abilities.java
@@ -0,0 +1,294 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Abilities.java - defines an index number constant for every Ability. --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+public class Abilities {
+ public static final int stench = 1;
+ public static final int drizzle = 2;
+ public static final int speedBoost = 3;
+ public static final int battleArmor = 4;
+ public static final int sturdy = 5;
+ public static final int damp = 6;
+ public static final int limber = 7;
+ public static final int sandVeil = 8;
+ public static final int staticTheAbilityNotTheKeyword = 9; // lol
+ public static final int voltAbsorb = 10;
+ public static final int waterAbsorb = 11;
+ public static final int oblivious = 12;
+ public static final int cloudNine = 13;
+ public static final int compoundEyes = 14;
+ public static final int insomnia = 15;
+ public static final int colorChange = 16;
+ public static final int immunity = 17;
+ public static final int flashFire = 18;
+ public static final int shieldDust = 19;
+ public static final int ownTempo = 20;
+ public static final int suctionCups = 21;
+ public static final int intimidate = 22;
+ public static final int shadowTag = 23;
+ public static final int roughSkin = 24;
+ public static final int wonderGuard = 25;
+ public static final int levitate = 26;
+ public static final int effectSpore = 27;
+ public static final int synchronize = 28;
+ public static final int clearBody = 29;
+ public static final int naturalCure = 30;
+ public static final int lightningRod = 31;
+ public static final int sereneGrace = 32;
+ public static final int swiftSwim = 33;
+ public static final int chlorophyll = 34;
+ public static final int illuminate = 35;
+ public static final int trace = 36;
+ public static final int hugePower = 37;
+ public static final int poisonPoint = 38;
+ public static final int innerFocus = 39;
+ public static final int magmaArmor = 40;
+ public static final int waterVeil = 41;
+ public static final int magnetPull = 42;
+ public static final int soundproof = 43;
+ public static final int rainDish = 44;
+ public static final int sandStream = 45;
+ public static final int pressure = 46;
+ public static final int thickFat = 47;
+ public static final int earlyBird = 48;
+ public static final int flameBody = 49;
+ public static final int runAway = 50;
+ public static final int keenEye = 51;
+ public static final int hyperCutter = 52;
+ public static final int pickup = 53;
+ public static final int truant = 54;
+ public static final int hustle = 55;
+ public static final int cuteCharm = 56;
+ public static final int plus = 57;
+ public static final int minus = 58;
+ public static final int forecast = 59;
+ public static final int stickyHold = 60;
+ public static final int shedSkin = 61;
+ public static final int guts = 62;
+ public static final int marvelScale = 63;
+ public static final int liquidOoze = 64;
+ public static final int overgrow = 65;
+ public static final int blaze = 66;
+ public static final int torrent = 67;
+ public static final int swarm = 68;
+ public static final int rockHead = 69;
+ public static final int drought = 70;
+ public static final int arenaTrap = 71;
+ public static final int vitalSpirit = 72;
+ public static final int whiteSmoke = 73;
+ public static final int purePower = 74;
+ public static final int shellArmor = 75;
+ public static final int airLock = 76; // Was 77 in Gen 3, since 76 was Cacophony
+ public static final int tangledFeet = 77;
+ public static final int motorDrive = 78;
+ public static final int rivalry = 79;
+ public static final int steadfast = 80;
+ public static final int snowCloak = 81;
+ public static final int gluttony = 82;
+ public static final int angerPoint = 83;
+ public static final int unburden = 84;
+ public static final int heatproof = 85;
+ public static final int simple = 86;
+ public static final int drySkin = 87;
+ public static final int download = 88;
+ public static final int ironFist = 89;
+ public static final int poisonHeal = 90;
+ public static final int adaptability = 91;
+ public static final int skillLink = 92;
+ public static final int hydration = 93;
+ public static final int solarPower = 94;
+ public static final int quickFeet = 95;
+ public static final int normalize = 96;
+ public static final int sniper = 97;
+ public static final int magicGuard = 98;
+ public static final int noGuard = 99;
+ public static final int stall = 100;
+ public static final int technician = 101;
+ public static final int leafGuard = 102;
+ public static final int klutz = 103;
+ public static final int moldBreaker = 104;
+ public static final int superLuck = 105;
+ public static final int aftermath = 106;
+ public static final int anticipation = 107;
+ public static final int forewarn = 108;
+ public static final int unaware = 109;
+ public static final int tintedLens = 110;
+ public static final int filter = 111;
+ public static final int slowStart = 112;
+ public static final int scrappy = 113;
+ public static final int stormDrain = 114;
+ public static final int iceBody = 115;
+ public static final int solidRock = 116;
+ public static final int snowWarning = 117;
+ public static final int honeyGather = 118;
+ public static final int frisk = 119;
+ public static final int reckless = 120;
+ public static final int multitype = 121;
+ public static final int flowerGift = 122;
+ public static final int badDreams = 123;
+ public static final int pickpocket = 124;
+ public static final int sheerForce = 125;
+ public static final int contrary = 126;
+ public static final int unnerve = 127;
+ public static final int defiant = 128;
+ public static final int defeatist = 129;
+ public static final int cursedBody = 130;
+ public static final int healer = 131;
+ public static final int friendGuard = 132;
+ public static final int weakArmor = 133;
+ public static final int heavyMetal = 134;
+ public static final int lightMetal = 135;
+ public static final int multiscale = 136;
+ public static final int toxicBoost = 137;
+ public static final int flareBoost = 138;
+ public static final int harvest = 139;
+ public static final int telepathy = 140;
+ public static final int moody = 141;
+ public static final int overcoat = 142;
+ public static final int poisonTouch = 143;
+ public static final int regenerator = 144;
+ public static final int bigPecks = 145;
+ public static final int sandRush = 146;
+ public static final int wonderSkin = 147;
+ public static final int analytic = 148;
+ public static final int illusion = 149;
+ public static final int imposter = 150;
+ public static final int infiltrator = 151;
+ public static final int mummy = 152;
+ public static final int moxie = 153;
+ public static final int justified = 154;
+ public static final int rattled = 155;
+ public static final int magicBounce = 156;
+ public static final int sapSipper = 157;
+ public static final int prankster = 158;
+ public static final int sandForce = 159;
+ public static final int ironBarbs = 160;
+ public static final int zenMode = 161;
+ public static final int victoryStar = 162;
+ public static final int turboblaze = 163;
+ public static final int teravolt = 164;
+ public static final int aromaVeil = 165;
+ public static final int flowerVeil = 166;
+ public static final int cheekPouch = 167;
+ public static final int protean = 168;
+ public static final int furCoat = 169;
+ public static final int magician = 170;
+ public static final int bulletproof = 171;
+ public static final int competitive = 172;
+ public static final int strongJaw = 173;
+ public static final int refrigerate = 174;
+ public static final int sweetVeil = 175;
+ public static final int stanceChange = 176;
+ public static final int galeWings = 177;
+ public static final int megaLauncher = 178;
+ public static final int grassPelt = 179;
+ public static final int symbiosis = 180;
+ public static final int toughClaws = 181;
+ public static final int pixilate = 182;
+ public static final int gooey = 183;
+ public static final int aerilate = 184;
+ public static final int parentalBond = 185;
+ public static final int darkAura = 186;
+ public static final int fairyAura = 187;
+ public static final int auraBreak = 188;
+ public static final int primordialSea = 189;
+ public static final int desolateLand = 190;
+ public static final int deltaStream = 191;
+ public static final int stamina = 192;
+ public static final int wimpOut = 193;
+ public static final int emergencyExit = 194;
+ public static final int waterCompaction = 195;
+ public static final int merciless = 196;
+ public static final int shieldsDown = 197;
+ public static final int stakeout = 198;
+ public static final int waterBubble = 199;
+ public static final int steelworker = 200;
+ public static final int berserk = 201;
+ public static final int slushRush = 202;
+ public static final int longReach = 203;
+ public static final int liquidVoice = 204;
+ public static final int triage = 205;
+ public static final int galvanize = 206;
+ public static final int surgeSurfer = 207;
+ public static final int schooling = 208;
+ public static final int disguise = 209;
+ public static final int battleBond = 210;
+ public static final int powerConstruct = 211;
+ public static final int corrosion = 212;
+ public static final int comatose = 213;
+ public static final int queenlyMajesty = 214;
+ public static final int innardsOut = 215;
+ public static final int dancer = 216;
+ public static final int battery = 217;
+ public static final int fluffy = 218;
+ public static final int dazzling = 219;
+ public static final int soulHeart = 220;
+ public static final int tanglingHair = 221;
+ public static final int receiver = 222;
+ public static final int powerOfAlchemy = 223;
+ public static final int beastBoost = 224;
+ public static final int rksSystem = 225;
+ public static final int electricSurge = 226;
+ public static final int psychicSurge = 227;
+ public static final int mistySurge = 228;
+ public static final int grassySurge = 229;
+ public static final int fullMetalBody = 230;
+ public static final int shadowShield = 231;
+ public static final int prismArmor = 232;
+ public static final int neuroforce = 233;
+ public static final int intrepidSword = 234;
+ public static final int dauntlessShield = 235;
+ public static final int libero = 236;
+ public static final int ballFetch = 237;
+ public static final int cottonDown = 238;
+ public static final int propellerTail = 239;
+ public static final int mirrorArmor = 240;
+ public static final int gulpMissile = 241;
+ public static final int stalwart = 242;
+ public static final int steamEngine = 243;
+ public static final int punkRock = 244;
+ public static final int sandSpit = 245;
+ public static final int iceScales = 246;
+ public static final int ripen = 247;
+ public static final int iceFace = 248;
+ public static final int powerSpot = 249;
+ public static final int mimicry = 250;
+ public static final int screenCleaner = 251;
+ public static final int steelySpirit = 252;
+ public static final int perishBody = 253;
+ public static final int wanderingSpirit = 254;
+ public static final int gorillaTactics = 255;
+ public static final int neutralizingGas = 256;
+ public static final int pastelVeil = 257;
+ public static final int hungerSwitch = 258;
+ public static final int quickDraw = 259;
+ public static final int unseenFist = 260;
+ public static final int curiousMedicine = 261;
+ public static final int transistor = 262;
+ public static final int dragonsMaw = 263;
+ public static final int chillingNeigh = 264;
+ public static final int grimNeigh = 265;
+ public static final int asOneChillingNeigh = 266;
+ public static final int asOneGrimNeigh = 267;
+}
diff --git a/src/com/pkrandom/constants/GBConstants.java b/src/com/pkrandom/constants/GBConstants.java
new file mode 100644
index 0000000..bc47bb3
--- /dev/null
+++ b/src/com/pkrandom/constants/GBConstants.java
@@ -0,0 +1,52 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- GBConstants.java - constants that are relevant for all of the GB --*/
+/*-- games --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+import com.pkrandom.pokemon.Type;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+public class GBConstants {
+
+ public static final int minRomSize = 0x80000, maxRomSize = 0x200000;
+
+ public static final int jpFlagOffset = 0x14A, versionOffset = 0x14C, crcOffset = 0x14E, romSigOffset = 0x134,
+ isGBCOffset = 0x143, romCodeOffset = 0x13F;
+
+ public static final int stringTerminator = 0x50, stringPrintedTextEnd = 0x57, stringPrintedTextPromptEnd = 0x58;
+
+ public static final int bankSize = 0x4000;
+
+ public static final byte gbZ80Jump = (byte) 0xC3, gbZ80Nop = 0x00, gbZ80XorA = (byte) 0xAF, gbZ80LdA = 0x3E,
+ gbZ80LdAToFar = (byte) 0xEA, gbZ80Ret = (byte) 0xC9, gbZ80JumpRelative = (byte) 0x18;
+
+ public static final Set<Type> physicalTypes = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
+ Type.NORMAL, Type.FIGHTING, Type.POISON, Type.GROUND, Type.FLYING, Type.BUG,
+ Type.ROCK, Type.GHOST, Type.STEEL)));
+
+}
diff --git a/src/com/pkrandom/constants/Gen1Constants.java b/src/com/pkrandom/constants/Gen1Constants.java
new file mode 100644
index 0000000..5b2b725
--- /dev/null
+++ b/src/com/pkrandom/constants/Gen1Constants.java
@@ -0,0 +1,352 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Gen1Constants.java - Constants for Red/Green/Blue/Yellow --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import com.pkrandom.pokemon.ItemList;
+import com.pkrandom.pokemon.Trainer;
+import com.pkrandom.pokemon.Type;
+
+public class Gen1Constants {
+
+ public static final int baseStatsEntrySize = 0x1C;
+
+ public static final int bsHPOffset = 1, bsAttackOffset = 2, bsDefenseOffset = 3, bsSpeedOffset = 4,
+ bsSpecialOffset = 5, bsPrimaryTypeOffset = 6, bsSecondaryTypeOffset = 7, bsCatchRateOffset = 8,
+ bsExpYieldOffset = 9, bsFrontSpriteOffset = 11, bsLevel1MovesOffset = 15, bsGrowthCurveOffset = 19,
+ bsTMHMCompatOffset = 20;
+
+ public static final int encounterTableEnd = 0xFFFF, encounterTableSize = 10, yellowSuperRodTableSize = 4;
+
+ public static final int trainerClassCount = 47;
+
+ public static final int champRivalOffsetFromGymLeaderMoves = 0x44;
+
+ public static final int tmCount = 50, hmCount = 5;
+
+ public static final int[] gymLeaderTMs = new int[] { 34, 11, 24, 21, 6, 46, 38, 27 };
+
+ public static final int[] tclassesCounts = new int[] { 21, 47 };
+
+ public static final List<Integer> singularTrainers = Arrays.asList(28, 32, 33, 34, 35, 36, 37, 38, 39, 43, 45, 46);
+
+ public static final List<Integer> bannedMovesWithXAccBanned = Arrays.asList(
+ Moves.sonicBoom, Moves.dragonRage, Moves.spore);
+
+ public static final List<Integer> bannedMovesWithoutXAccBanned = Arrays.asList(
+ Moves.sonicBoom, Moves.dragonRage, Moves.spore, Moves.hornDrill, Moves.fissure, Moves.guillotine);
+
+ // ban transform because of Transform assumption glitch
+ public static final List<Integer> bannedLevelupMoves = Collections.singletonList(Moves.transform);
+
+ public static final List<Integer> fieldMoves = Arrays.asList(
+ Moves.cut, Moves.fly, Moves.surf, Moves.strength, Moves.flash, Moves.dig, Moves.teleport);
+
+ public static final int damagePoison20PercentEffect = 2, damageAbsorbEffect = 3, damageBurn10PercentEffect = 4,
+ damageFreeze10PercentEffect = 5, damageParalyze10PercentEffect = 6, dreamEaterEffect = 8,
+ noDamageAtkPlusOneEffect = 10, noDamageDefPlusOneEffect = 11, noDamageSpecialPlusOneEffect = 13,
+ noDamageEvasionPlusOneEffect = 15, noDamageAtkMinusOneEffect = 18, noDamageDefMinusOneEffect = 19,
+ noDamageSpeMinusOneEffect = 20, noDamageAccuracyMinusOneEffect = 22, flinch10PercentEffect = 31,
+ noDamageSleepEffect = 32, damagePoison40PercentEffect = 33, damageBurn30PercentEffect = 34,
+ damageFreeze30PercentEffect = 35, damageParalyze30PercentEffect = 36, flinch30PercentEffect = 37,
+ chargeEffect = 39, flyEffect = 43, damageRecoilEffect = 48, noDamageConfusionEffect = 49,
+ noDamageAtkPlusTwoEffect = 50, noDamageDefPlusTwoEffect = 51, noDamageSpePlusTwoEffect = 52,
+ noDamageSpecialPlusTwoEffect = 53, noDamageDefMinusTwoEffect = 59, noDamagePoisonEffect = 66,
+ noDamageParalyzeEffect = 67, damageAtkMinusOneEffect = 68, damageDefMinusOneEffect = 69,
+ damageSpeMinusOneEffect = 70, damageSpecialMinusOneEffect = 71, damageConfusionEffect = 76,
+ twineedleEffect = 77, hyperBeamEffect = 80;
+
+ // Taken from critical_hit_moves.asm; we could read this from the ROM, but it's easier to hardcode it.
+ public static final List<Integer> increasedCritMoves = Arrays.asList(Moves.karateChop, Moves.razorLeaf, Moves.crabhammer, Moves.slash);
+
+ public static final List<Integer> earlyRequiredHMs = Collections.singletonList(Moves.cut);
+
+ public static final int hmsStartIndex = Gen1Items.hm01, tmsStartIndex = Gen1Items.tm01;
+
+ public static final List<Integer> requiredFieldTMs = Arrays.asList(3, 4, 8, 10, 12, 14, 16, 19, 20,
+ 22, 25, 26, 30, 40, 43, 44, 45, 47);
+
+ public static final int towerMapsStartIndex = 0x90, towerMapsEndIndex = 0x94;
+
+ public static final String guaranteedCatchPrefix = "CF7EFE01";
+
+ public static final Type[] typeTable = constructTypeTable();
+
+ private static Type[] constructTypeTable() {
+ Type[] table = new Type[0x20];
+ table[0x00] = Type.NORMAL;
+ table[0x01] = Type.FIGHTING;
+ table[0x02] = Type.FLYING;
+ table[0x03] = Type.POISON;
+ table[0x04] = Type.GROUND;
+ table[0x05] = Type.ROCK;
+ table[0x07] = Type.BUG;
+ table[0x08] = Type.GHOST;
+ table[0x14] = Type.FIRE;
+ table[0x15] = Type.WATER;
+ table[0x16] = Type.GRASS;
+ table[0x17] = Type.ELECTRIC;
+ table[0x18] = Type.PSYCHIC;
+ table[0x19] = Type.ICE;
+ table[0x1A] = Type.DRAGON;
+ return table;
+ }
+
+ public static byte typeToByte(Type type) {
+ for (int i = 0; i < typeTable.length; i++) {
+ if (typeTable[i] == type) {
+ return (byte) i;
+ }
+ }
+ return (byte) 0;
+ }
+
+ public static final ItemList allowedItems = setupAllowedItems();
+
+ private static ItemList setupAllowedItems() {
+ ItemList allowedItems = new ItemList(Gen1Items.tm50); // 251-255 are junk TMs
+ // Assorted key items & junk
+ // 23/01/2014: ban fake PP Up
+ allowedItems.banSingles(Gen1Items.townMap, Gen1Items.bicycle, Gen1Items.questionMark7,
+ Gen1Items.safariBall, Gen1Items.pokedex, Gen1Items.oldAmber, Gen1Items.cardKey, Gen1Items.ppUpGlitch,
+ Gen1Items.coin, Gen1Items.ssTicket, Gen1Items.goldTeeth);
+ allowedItems.banRange(Gen1Items.boulderBadge, 8);
+ allowedItems.banRange(Gen1Items.domeFossil, 5);
+ allowedItems.banRange(Gen1Items.coinCase, 10);
+ // Unused
+ allowedItems.banRange(Gen1Items.unused84, 112);
+ // HMs
+ allowedItems.banRange(hmsStartIndex, hmCount);
+ // Real TMs
+ allowedItems.tmRange(tmsStartIndex, tmCount);
+ return allowedItems;
+ }
+
+ public static void tagTrainersUniversal(List<Trainer> trs) {
+ // Gym Leaders
+ tbc(trs, 34, 0, "GYM1");
+ tbc(trs, 35, 0, "GYM2");
+ tbc(trs, 36, 0, "GYM3");
+ tbc(trs, 37, 0, "GYM4");
+ tbc(trs, 38, 0, "GYM5");
+ tbc(trs, 40, 0, "GYM6");
+ tbc(trs, 39, 0, "GYM7");
+ tbc(trs, 29, 2, "GYM8");
+
+ // Other giovanni teams
+ tbc(trs, 29, 0, "GIO1");
+ tbc(trs, 29, 1, "GIO2");
+
+ // Elite 4
+ tbc(trs, 44, 0, "ELITE1");
+ tbc(trs, 33, 0, "ELITE2");
+ tbc(trs, 46, 0, "ELITE3");
+ tbc(trs, 47, 0, "ELITE4");
+ }
+
+ public static void tagTrainersRB(List<Trainer> trs) {
+ // Gary Battles
+ tbc(trs, 25, 0, "RIVAL1-0");
+ tbc(trs, 25, 1, "RIVAL1-1");
+ tbc(trs, 25, 2, "RIVAL1-2");
+
+ tbc(trs, 25, 3, "RIVAL2-0");
+ tbc(trs, 25, 4, "RIVAL2-1");
+ tbc(trs, 25, 5, "RIVAL2-2");
+
+ tbc(trs, 25, 6, "RIVAL3-0");
+ tbc(trs, 25, 7, "RIVAL3-1");
+ tbc(trs, 25, 8, "RIVAL3-2");
+
+ tbc(trs, 42, 0, "RIVAL4-0");
+ tbc(trs, 42, 1, "RIVAL4-1");
+ tbc(trs, 42, 2, "RIVAL4-2");
+
+ tbc(trs, 42, 3, "RIVAL5-0");
+ tbc(trs, 42, 4, "RIVAL5-1");
+ tbc(trs, 42, 5, "RIVAL5-2");
+
+ tbc(trs, 42, 6, "RIVAL6-0");
+ tbc(trs, 42, 7, "RIVAL6-1");
+ tbc(trs, 42, 8, "RIVAL6-2");
+
+ tbc(trs, 42, 9, "RIVAL7-0");
+ tbc(trs, 42, 10, "RIVAL7-1");
+ tbc(trs, 42, 11, "RIVAL7-2");
+
+ tbc(trs, 43, 0, "RIVAL8-0");
+ tbc(trs, 43, 1, "RIVAL8-1");
+ tbc(trs, 43, 2, "RIVAL8-2");
+
+ // Gym Trainers
+ tbc(trs, 5, 0, "GYM1");
+
+ tbc(trs, 15, 0, "GYM2");
+ tbc(trs, 6, 0, "GYM2");
+
+ tbc(trs, 4, 7, "GYM3");
+ tbc(trs, 20, 0, "GYM3");
+ tbc(trs, 41, 2, "GYM3");
+
+ tbc(trs, 3, 16, "GYM4");
+ tbc(trs, 3, 17, "GYM4");
+ tbc(trs, 6, 10, "GYM4");
+ tbc(trs, 18, 0, "GYM4");
+ tbc(trs, 18, 1, "GYM4");
+ tbc(trs, 18, 2, "GYM4");
+ tbc(trs, 32, 0, "GYM4");
+
+ tbc(trs, 21, 2, "GYM5");
+ tbc(trs, 21, 3, "GYM5");
+ tbc(trs, 21, 6, "GYM5");
+ tbc(trs, 21, 7, "GYM5");
+ tbc(trs, 22, 0, "GYM5");
+ tbc(trs, 22, 1, "GYM5");
+
+ tbc(trs, 19, 0, "GYM6");
+ tbc(trs, 19, 1, "GYM6");
+ tbc(trs, 19, 2, "GYM6");
+ tbc(trs, 19, 3, "GYM6");
+ tbc(trs, 45, 21, "GYM6");
+ tbc(trs, 45, 22, "GYM6");
+ tbc(trs, 45, 23, "GYM6");
+
+ tbc(trs, 8, 8, "GYM7");
+ tbc(trs, 8, 9, "GYM7");
+ tbc(trs, 8, 10, "GYM7");
+ tbc(trs, 8, 11, "GYM7");
+ tbc(trs, 11, 3, "GYM7");
+ tbc(trs, 11, 4, "GYM7");
+ tbc(trs, 11, 5, "GYM7");
+
+ tbc(trs, 22, 2, "GYM8");
+ tbc(trs, 22, 3, "GYM8");
+ tbc(trs, 24, 5, "GYM8");
+ tbc(trs, 24, 6, "GYM8");
+ tbc(trs, 24, 7, "GYM8");
+ tbc(trs, 31, 0, "GYM8");
+ tbc(trs, 31, 8, "GYM8");
+ tbc(trs, 31, 9, "GYM8");
+ }
+
+ public static void tagTrainersYellow(List<Trainer> trs) {
+ // Rival Battles
+ tbc(trs, 25, 0, "IRIVAL");
+
+ tbc(trs, 25, 1, "RIVAL1-0");
+
+ tbc(trs, 25, 2, "RIVAL2-0");
+
+ tbc(trs, 42, 0, "RIVAL3-0");
+
+ tbc(trs, 42, 1, "RIVAL4-0");
+ tbc(trs, 42, 2, "RIVAL4-1");
+ tbc(trs, 42, 3, "RIVAL4-2");
+
+ tbc(trs, 42, 4, "RIVAL5-0");
+ tbc(trs, 42, 5, "RIVAL5-1");
+ tbc(trs, 42, 6, "RIVAL5-2");
+
+ tbc(trs, 42, 7, "RIVAL6-0");
+ tbc(trs, 42, 8, "RIVAL6-1");
+ tbc(trs, 42, 9, "RIVAL6-2");
+
+ tbc(trs, 43, 0, "RIVAL7-0");
+ tbc(trs, 43, 1, "RIVAL7-1");
+ tbc(trs, 43, 2, "RIVAL7-2");
+
+ // Rocket Jessie & James
+ tbc(trs, 30, 41, "THEMED:JESSIE&JAMES");
+ tbc(trs, 30, 42, "THEMED:JESSIE&JAMES");
+ tbc(trs, 30, 43, "THEMED:JESSIE&JAMES");
+ tbc(trs, 30, 44, "THEMED:JESSIE&JAMES");
+
+ // Gym Trainers
+ tbc(trs, 5, 0, "GYM1");
+
+ tbc(trs, 6, 0, "GYM2");
+ tbc(trs, 15, 0, "GYM2");
+
+ tbc(trs, 4, 7, "GYM3");
+ tbc(trs, 20, 0, "GYM3");
+ tbc(trs, 41, 2, "GYM3");
+
+ tbc(trs, 3, 16, "GYM4");
+ tbc(trs, 3, 17, "GYM4");
+ tbc(trs, 6, 10, "GYM4");
+ tbc(trs, 18, 0, "GYM4");
+ tbc(trs, 18, 1, "GYM4");
+ tbc(trs, 18, 2, "GYM4");
+ tbc(trs, 32, 0, "GYM4");
+
+ tbc(trs, 21, 2, "GYM5");
+ tbc(trs, 21, 3, "GYM5");
+ tbc(trs, 21, 6, "GYM5");
+ tbc(trs, 21, 7, "GYM5");
+ tbc(trs, 22, 0, "GYM5");
+ tbc(trs, 22, 1, "GYM5");
+
+ tbc(trs, 19, 0, "GYM6");
+ tbc(trs, 19, 1, "GYM6");
+ tbc(trs, 19, 2, "GYM6");
+ tbc(trs, 19, 3, "GYM6");
+ tbc(trs, 45, 21, "GYM6");
+ tbc(trs, 45, 22, "GYM6");
+ tbc(trs, 45, 23, "GYM6");
+
+ tbc(trs, 8, 8, "GYM7");
+ tbc(trs, 8, 9, "GYM7");
+ tbc(trs, 8, 10, "GYM7");
+ tbc(trs, 8, 11, "GYM7");
+ tbc(trs, 11, 3, "GYM7");
+ tbc(trs, 11, 4, "GYM7");
+ tbc(trs, 11, 5, "GYM7");
+
+ tbc(trs, 22, 2, "GYM8");
+ tbc(trs, 22, 3, "GYM8");
+ tbc(trs, 24, 5, "GYM8");
+ tbc(trs, 24, 6, "GYM8");
+ tbc(trs, 24, 7, "GYM8");
+ tbc(trs, 31, 0, "GYM8");
+ tbc(trs, 31, 8, "GYM8");
+ tbc(trs, 31, 9, "GYM8");
+ }
+
+ private static void tbc(List<Trainer> allTrainers, int classNum, int number, String tag) {
+ int currnum = -1;
+ for (Trainer t : allTrainers) {
+ if (t.trainerclass == classNum) {
+ currnum++;
+ if (currnum == number) {
+ t.tag = tag;
+ return;
+ }
+ }
+ }
+ }
+
+}
diff --git a/src/com/pkrandom/constants/Gen1Items.java b/src/com/pkrandom/constants/Gen1Items.java
new file mode 100644
index 0000000..8374ed1
--- /dev/null
+++ b/src/com/pkrandom/constants/Gen1Items.java
@@ -0,0 +1,285 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Gen1Items.java - defines an index number constant for every item in --*/
+/*-- the Generation 1 games. --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+public class Gen1Items {
+ // https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Generation_I)
+ public static final int nothing = 0;
+ public static final int masterBall = 1;
+ public static final int ultraBall = 2;
+ public static final int greatBall = 3;
+ public static final int pokeBall = 4;
+ public static final int townMap = 5;
+ public static final int bicycle = 6;
+ public static final int questionMark7 = 7;
+ public static final int safariBall = 8;
+ public static final int pokedex = 9;
+ public static final int moonStone = 10;
+ public static final int antidote = 11;
+ public static final int burnHeal = 12;
+ public static final int iceHeal = 13;
+ public static final int awakening = 14;
+ public static final int parlyzHeal = 15;
+ public static final int fullRestore = 16;
+ public static final int maxPotion = 17;
+ public static final int hyperPotion = 18;
+ public static final int superPotion = 19;
+ public static final int potion = 20;
+ public static final int boulderBadge = 21;
+ public static final int cascadeBadge = 22;
+ public static final int thunderBadge = 23;
+ public static final int rainbowBadge = 24;
+ public static final int soulBadge = 25;
+ public static final int marshBadge = 26;
+ public static final int volcanoBadge = 27;
+ public static final int earthBadge = 28;
+ public static final int escapeRope = 29;
+ public static final int repel = 30;
+ public static final int oldAmber = 31;
+ public static final int fireStone = 32;
+ public static final int thunderstone = 33;
+ public static final int waterStone = 34;
+ public static final int hpUp = 35;
+ public static final int protein = 36;
+ public static final int iron = 37;
+ public static final int carbos = 38;
+ public static final int calcium = 39;
+ public static final int rareCandy = 40;
+ public static final int domeFossil = 41;
+ public static final int helixFossil = 42;
+ public static final int secretKey = 43;
+ public static final int questionMark44 = 44;
+ public static final int bikeVoucher = 45;
+ public static final int xAccuracy = 46;
+ public static final int leafStone = 47;
+ public static final int cardKey = 48;
+ public static final int nugget = 49;
+ public static final int ppUpGlitch = 50;
+ public static final int pokeDoll = 51;
+ public static final int fullHeal = 52;
+ public static final int revive = 53;
+ public static final int maxRevive = 54;
+ public static final int guardSpec = 55;
+ public static final int superRepel = 56;
+ public static final int maxRepel = 57;
+ public static final int direHit = 58;
+ public static final int coin = 59;
+ public static final int freshWater = 60;
+ public static final int sodaPop = 61;
+ public static final int lemonade = 62;
+ public static final int ssTicket = 63;
+ public static final int goldTeeth = 64;
+ public static final int xAttack = 65;
+ public static final int xDefend = 66;
+ public static final int xSpeed = 67;
+ public static final int xSpecial = 68;
+ public static final int coinCase = 69;
+ public static final int oaksParcel = 70;
+ public static final int itemfinder = 71;
+ public static final int silphScope = 72;
+ public static final int pokeFlute = 73;
+ public static final int liftKey = 74;
+ public static final int expAll = 75;
+ public static final int oldRod = 76;
+ public static final int goodRod = 77;
+ public static final int superRod = 78;
+ public static final int ppUp = 79;
+ public static final int ether = 80;
+ public static final int maxEther = 81;
+ public static final int elixer = 82;
+ public static final int maxElixer = 83;
+ public static final int unused84 = 84;
+ public static final int unused85 = 85;
+ public static final int unused86 = 86;
+ public static final int unused87 = 87;
+ public static final int unused88 = 88;
+ public static final int unused89 = 89;
+ public static final int unused90 = 90;
+ public static final int unused91 = 91;
+ public static final int unused92 = 92;
+ public static final int unused93 = 93;
+ public static final int unused94 = 94;
+ public static final int unused95 = 95;
+ public static final int unused96 = 96;
+ public static final int unused97 = 97;
+ public static final int unused98 = 98;
+ public static final int unused99 = 99;
+ public static final int unused100 = 100;
+ public static final int unused101 = 101;
+ public static final int unused102 = 102;
+ public static final int unused103 = 103;
+ public static final int unused104 = 104;
+ public static final int unused105 = 105;
+ public static final int unused106 = 106;
+ public static final int unused107 = 107;
+ public static final int unused108 = 108;
+ public static final int unused109 = 109;
+ public static final int unused110 = 110;
+ public static final int unused111 = 111;
+ public static final int unused112 = 112;
+ public static final int unused113 = 113;
+ public static final int unused114 = 114;
+ public static final int unused115 = 115;
+ public static final int unused116 = 116;
+ public static final int unused117 = 117;
+ public static final int unused118 = 118;
+ public static final int unused119 = 119;
+ public static final int unused120 = 120;
+ public static final int unused121 = 121;
+ public static final int unused122 = 122;
+ public static final int unused123 = 123;
+ public static final int unused124 = 124;
+ public static final int unused125 = 125;
+ public static final int unused126 = 126;
+ public static final int unused127 = 127;
+ public static final int unused128 = 128;
+ public static final int unused129 = 129;
+ public static final int unused130 = 130;
+ public static final int unused131 = 131;
+ public static final int unused132 = 132;
+ public static final int unused133 = 133;
+ public static final int unused134 = 134;
+ public static final int unused135 = 135;
+ public static final int unused136 = 136;
+ public static final int unused137 = 137;
+ public static final int unused138 = 138;
+ public static final int unused139 = 139;
+ public static final int unused140 = 140;
+ public static final int unused141 = 141;
+ public static final int unused142 = 142;
+ public static final int unused143 = 143;
+ public static final int unused144 = 144;
+ public static final int unused145 = 145;
+ public static final int unused146 = 146;
+ public static final int unused147 = 147;
+ public static final int unused148 = 148;
+ public static final int unused149 = 149;
+ public static final int unused150 = 150;
+ public static final int unused151 = 151;
+ public static final int unused152 = 152;
+ public static final int unused153 = 153;
+ public static final int unused154 = 154;
+ public static final int unused155 = 155;
+ public static final int unused156 = 156;
+ public static final int unused157 = 157;
+ public static final int unused158 = 158;
+ public static final int unused159 = 159;
+ public static final int unused160 = 160;
+ public static final int unused161 = 161;
+ public static final int unused162 = 162;
+ public static final int unused163 = 163;
+ public static final int unused164 = 164;
+ public static final int unused165 = 165;
+ public static final int unused166 = 166;
+ public static final int unused167 = 167;
+ public static final int unused168 = 168;
+ public static final int unused169 = 169;
+ public static final int unused170 = 170;
+ public static final int unused171 = 171;
+ public static final int unused172 = 172;
+ public static final int unused173 = 173;
+ public static final int unused174 = 174;
+ public static final int unused175 = 175;
+ public static final int unused176 = 176;
+ public static final int unused177 = 177;
+ public static final int unused178 = 178;
+ public static final int unused179 = 179;
+ public static final int unused180 = 180;
+ public static final int unused181 = 181;
+ public static final int unused182 = 182;
+ public static final int unused183 = 183;
+ public static final int unused184 = 184;
+ public static final int unused185 = 185;
+ public static final int unused186 = 186;
+ public static final int unused187 = 187;
+ public static final int unused188 = 188;
+ public static final int unused189 = 189;
+ public static final int unused190 = 190;
+ public static final int unused191 = 191;
+ public static final int unused192 = 192;
+ public static final int unused193 = 193;
+ public static final int unused194 = 194;
+ public static final int unused195 = 195;
+ public static final int hm01 = 196;
+ public static final int hm02 = 197;
+ public static final int hm03 = 198;
+ public static final int hm04 = 199;
+ public static final int hm05 = 200;
+ public static final int tm01 = 201;
+ public static final int tm02 = 202;
+ public static final int tm03 = 203;
+ public static final int tm04 = 204;
+ public static final int tm05 = 205;
+ public static final int tm06 = 206;
+ public static final int tm07 = 207;
+ public static final int tm08 = 208;
+ public static final int tm09 = 209;
+ public static final int tm10 = 210;
+ public static final int tm11 = 211;
+ public static final int tm12 = 212;
+ public static final int tm13 = 213;
+ public static final int tm14 = 214;
+ public static final int tm15 = 215;
+ public static final int tm16 = 216;
+ public static final int tm17 = 217;
+ public static final int tm18 = 218;
+ public static final int tm19 = 219;
+ public static final int tm20 = 220;
+ public static final int tm21 = 221;
+ public static final int tm22 = 222;
+ public static final int tm23 = 223;
+ public static final int tm24 = 224;
+ public static final int tm25 = 225;
+ public static final int tm26 = 226;
+ public static final int tm27 = 227;
+ public static final int tm28 = 228;
+ public static final int tm29 = 229;
+ public static final int tm30 = 230;
+ public static final int tm31 = 231;
+ public static final int tm32 = 232;
+ public static final int tm33 = 233;
+ public static final int tm34 = 234;
+ public static final int tm35 = 235;
+ public static final int tm36 = 236;
+ public static final int tm37 = 237;
+ public static final int tm38 = 238;
+ public static final int tm39 = 239;
+ public static final int tm40 = 240;
+ public static final int tm41 = 241;
+ public static final int tm42 = 242;
+ public static final int tm43 = 243;
+ public static final int tm44 = 244;
+ public static final int tm45 = 245;
+ public static final int tm46 = 246;
+ public static final int tm47 = 247;
+ public static final int tm48 = 248;
+ public static final int tm49 = 249;
+ public static final int tm50 = 250;
+ public static final int tm51 = 251;
+ public static final int tm52 = 252;
+ public static final int tm53 = 253;
+ public static final int tm54 = 254;
+ public static final int tm55 = 255;
+}
diff --git a/src/com/pkrandom/constants/Gen2Constants.java b/src/com/pkrandom/constants/Gen2Constants.java
new file mode 100644
index 0000000..d567947
--- /dev/null
+++ b/src/com/pkrandom/constants/Gen2Constants.java
@@ -0,0 +1,431 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Gen2Constants.java - Constants for Gold/Silver/Crystal --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import com.pkrandom.pokemon.ItemList;
+import com.pkrandom.pokemon.Trainer;
+import com.pkrandom.pokemon.Type;
+
+public class Gen2Constants {
+
+ public static final int vietCrystalCheckOffset = 0x63;
+
+ public static final byte vietCrystalCheckValue = (byte) 0xF5;
+
+ public static final String vietCrystalROMName = "Pokemon VietCrystal";
+
+ public static final int pokemonCount = 251, moveCount = 251;
+
+ public static final int baseStatsEntrySize = 0x20;
+
+ public static final Type[] typeTable = constructTypeTable();
+
+ public static final int bsHPOffset = 1, bsAttackOffset = 2, bsDefenseOffset = 3, bsSpeedOffset = 4,
+ bsSpAtkOffset = 5, bsSpDefOffset = 6, bsPrimaryTypeOffset = 7, bsSecondaryTypeOffset = 8,
+ bsCatchRateOffset = 9, bsCommonHeldItemOffset = 11, bsRareHeldItemOffset = 12, bsPicDimensionsOffset = 17,
+ bsGrowthCurveOffset = 22, bsTMHMCompatOffset = 24, bsMTCompatOffset = 31;
+
+ public static final String[] starterNames = new String[] { "CYNDAQUIL", "TOTODILE", "CHIKORITA" };
+
+ public static final int fishingGroupCount = 12, pokesPerFishingGroup = 11, fishingGroupEntryLength = 3,
+ timeSpecificFishingGroupCount = 11, pokesPerTSFishingGroup = 4;
+
+ public static final int landEncounterSlots = 7, seaEncounterSlots = 3;
+
+ public static final int oddEggPokemonCount = 14;
+
+ public static final int tmCount = 50, hmCount = 7;
+
+ public static final String mtMenuCancelString = "CANCEL";
+
+ public static final byte mtMenuInitByte = (byte) 0x80;
+
+ public static final int maxTrainerNameLength = 17;
+
+ public static final int fleeingSetTwoOffset = 0xE, fleeingSetThreeOffset = 0x17;
+
+ public static final int mapGroupCount = 26, mapsInLastGroup = 11;
+
+ public static final int noDamageSleepEffect = 1, damagePoisonEffect = 2, damageAbsorbEffect = 3, damageBurnEffect = 4,
+ damageFreezeEffect = 5, damageParalyzeEffect = 6, dreamEaterEffect = 8, noDamageAtkPlusOneEffect = 10,
+ noDamageDefPlusOneEffect = 11, noDamageSpAtkPlusOneEffect = 13, noDamageEvasionPlusOneEffect = 16,
+ noDamageAtkMinusOneEffect = 18, noDamageDefMinusOneEffect = 19, noDamageSpeMinusOneEffect = 20,
+ noDamageAccuracyMinusOneEffect = 23, noDamageEvasionMinusOneEffect = 24, flinchEffect = 31, toxicEffect = 33,
+ razorWindEffect = 39, bindingEffect = 42, damageRecoilEffect = 48, noDamageConfusionEffect = 49,
+ noDamageAtkPlusTwoEffect = 50, noDamageDefPlusTwoEffect = 51, noDamageSpePlusTwoEffect = 52,
+ noDamageSpDefPlusTwoEffect = 54, noDamageAtkMinusTwoEffect = 58, noDamageDefMinusTwoEffect = 59,
+ noDamageSpeMinusTwoEffect = 60, noDamageSpDefMinusTwoEffect = 62, noDamagePoisonEffect = 66,
+ noDamageParalyzeEffect = 67, damageAtkMinusOneEffect = 68, damageDefMinusOneEffect = 69,
+ damageSpeMinusOneEffect = 70, damageSpDefMinusOneEffect = 72, damageAccuracyMinusOneEffect = 73,
+ skyAttackEffect = 75, damageConfusionEffect = 76, twineedleEffect = 77, hyperBeamEffect = 80,
+ snoreEffect = 92, flailAndReversalEffect = 102, trappingEffect = 106, swaggerEffect = 118,
+ damageBurnAndThawUserEffect = 125, damageUserDefPlusOneEffect = 138, damageUserAtkPlusOneEffect = 139,
+ damageUserAllPlusOneEffect = 140, skullBashEffect = 145, twisterEffect = 146, futureSightEffect = 148,
+ stompEffect = 150, solarbeamEffect = 151, thunderEffect = 152, semiInvulnerableEffect = 155,
+ defenseCurlEffect = 156;
+
+ // Taken from critical_hit_moves.asm; we could read this from the ROM, but it's easier to hardcode it.
+ public static final List<Integer> increasedCritMoves = Arrays.asList(Moves.karateChop, Moves.razorWind, Moves.razorLeaf,
+ Moves.crabhammer, Moves.slash, Moves.aeroblast, Moves.crossChop);
+
+ public static final List<Integer> requiredFieldTMs = Arrays.asList(4, 20, 22, 26, 28, 34, 35, 39,
+ 40, 43, 44, 46);
+
+ public static final List<Integer> fieldMoves = Arrays.asList(
+ Moves.cut, Moves.fly, Moves.surf, Moves.strength, Moves.flash, Moves.dig, Moves.teleport,
+ Moves.whirlpool, Moves.waterfall, Moves.rockSmash, Moves.headbutt, Moves.sweetScent);
+
+ public static final List<Integer> earlyRequiredHMMoves = Collections.singletonList(Moves.cut);
+
+ // ban thief because trainers are broken with it (items are not returned).
+ // ban transform because of Transform assumption glitch
+ public static final List<Integer> bannedLevelupMoves = Arrays.asList(Moves.transform, Moves.thief);
+
+ public static final List<Integer> brokenMoves = Arrays.asList(
+ Moves.sonicBoom, Moves.dragonRage, Moves.hornDrill, Moves.fissure, Moves.guillotine);
+
+ public static final List<Integer> illegalVietCrystalMoves = Arrays.asList(
+ Moves.protect, Moves.rest, Moves.spikeCannon, Moves.detect);
+
+ public static final int tmBlockOneIndex = Gen2Items.tm01, tmBlockOneSize = 4,
+ tmBlockTwoIndex = Gen2Items.tm05, tmBlockTwoSize = 24,
+ tmBlockThreeIndex = Gen2Items.tm29, tmBlockThreeSize = 22;
+
+ public static final int priorityHitEffectIndex = 0x67, protectEffectIndex = 0x6F, endureEffectIndex = 0x74,
+ forceSwitchEffectIndex = 0x1C,counterEffectIndex = 0x59, mirrorCoatEffectIndex = 0x90;
+
+ public static final String friendshipValueForEvoLocator = "FEDCDA";
+
+ private static Type[] constructTypeTable() {
+ Type[] table = new Type[256];
+ table[0x00] = Type.NORMAL;
+ table[0x01] = Type.FIGHTING;
+ table[0x02] = Type.FLYING;
+ table[0x03] = Type.POISON;
+ table[0x04] = Type.GROUND;
+ table[0x05] = Type.ROCK;
+ table[0x07] = Type.BUG;
+ table[0x08] = Type.GHOST;
+ table[0x09] = Type.STEEL;
+ table[0x14] = Type.FIRE;
+ table[0x15] = Type.WATER;
+ table[0x16] = Type.GRASS;
+ table[0x17] = Type.ELECTRIC;
+ table[0x18] = Type.PSYCHIC;
+ table[0x19] = Type.ICE;
+ table[0x1A] = Type.DRAGON;
+ table[0x1B] = Type.DARK;
+ return table;
+ }
+
+ public static byte typeToByte(Type type) {
+ if (type == null) {
+ return 0x13; // ???-type
+ }
+ switch (type) {
+ case NORMAL:
+ return 0x00;
+ case FIGHTING:
+ return 0x01;
+ case FLYING:
+ return 0x02;
+ case POISON:
+ return 0x03;
+ case GROUND:
+ return 0x04;
+ case ROCK:
+ return 0x05;
+ case BUG:
+ return 0x07;
+ case GHOST:
+ return 0x08;
+ case FIRE:
+ return 0x14;
+ case WATER:
+ return 0x15;
+ case GRASS:
+ return 0x16;
+ case ELECTRIC:
+ return 0x17;
+ case PSYCHIC:
+ return 0x18;
+ case ICE:
+ return 0x19;
+ case DRAGON:
+ return 0x1A;
+ case STEEL:
+ return 0x09;
+ case DARK:
+ return 0x1B;
+ default:
+ return 0; // normal by default
+ }
+ }
+
+ public static ItemList allowedItems;
+
+ public static ItemList nonBadItems;
+
+ static {
+ setupAllowedItems();
+ }
+
+ private static void setupAllowedItems() {
+ allowedItems = new ItemList(Gen2Items.hm07); // 250-255 are junk and cancel
+ // Assorted key items
+ allowedItems.banSingles(Gen2Items.bicycle, Gen2Items.coinCase, Gen2Items.itemfinder, Gen2Items.oldRod,
+ Gen2Items.goodRod, Gen2Items.superRod, Gen2Items.gsBall, Gen2Items.blueCard, Gen2Items.basementKey,
+ Gen2Items.pass, Gen2Items.squirtBottle, Gen2Items.rainbowWing);
+ allowedItems.banRange(Gen2Items.redScale, 6);
+ allowedItems.banRange(Gen2Items.cardKey, 4);
+ // HMs
+ allowedItems.banRange(Gen2Items.hm01, 7);
+ // Unused items (Teru-Samas and dummy TMs)
+ allowedItems.banSingles(Gen2Items.terusama6, Gen2Items.terusama25, Gen2Items.terusama45,
+ Gen2Items.terusama50, Gen2Items.terusama56, Gen2Items.terusama90, Gen2Items.terusama100,
+ Gen2Items.terusama120, Gen2Items.terusama135, Gen2Items.terusama136, Gen2Items.terusama137,
+ Gen2Items.terusama141, Gen2Items.terusama142, Gen2Items.terusama145, Gen2Items.terusama147,
+ Gen2Items.terusama148, Gen2Items.terusama149, Gen2Items.terusama153, Gen2Items.terusama154,
+ Gen2Items.terusama155, Gen2Items.terusama162, Gen2Items.terusama171, Gen2Items.terusama176,
+ Gen2Items.terusama179, Gen2Items.terusama190, Gen2Items.tm04Unused, Gen2Items.tm28Unused);
+ // Real TMs
+ allowedItems.tmRange(tmBlockOneIndex, tmBlockOneSize);
+ allowedItems.tmRange(tmBlockTwoIndex, tmBlockTwoSize);
+ allowedItems.tmRange(tmBlockThreeIndex, tmBlockThreeSize);
+
+ // non-bad items
+ // ban specific pokemon hold items, berries, apricorns, mail
+ nonBadItems = allowedItems.copy();
+ nonBadItems.banSingles(Gen2Items.luckyPunch, Gen2Items.metalPowder, Gen2Items.silverLeaf,
+ Gen2Items.goldLeaf, Gen2Items.redApricorn, Gen2Items.bluApricorn, Gen2Items.whtApricorn,
+ Gen2Items.blkApricorn, Gen2Items.pnkApricorn, Gen2Items.stick, Gen2Items.thickClub,
+ Gen2Items.flowerMail, Gen2Items.lightBall, Gen2Items.berry, Gen2Items.brickPiece);
+ nonBadItems.banRange(Gen2Items.ylwApricorn, 2);
+ nonBadItems.banRange(Gen2Items.normalBox, 2);
+ nonBadItems.banRange(Gen2Items.surfMail, 9);
+ }
+
+ public static void universalTrainerTags(List<Trainer> allTrainers) {
+ // Gym Leaders
+ tbc(allTrainers, 1, 0, "GYM1");
+ tbc(allTrainers, 3, 0, "GYM2");
+ tbc(allTrainers, 2, 0, "GYM3");
+ tbc(allTrainers, 4, 0, "GYM4");
+ tbc(allTrainers, 7, 0, "GYM5");
+ tbc(allTrainers, 6, 0, "GYM6");
+ tbc(allTrainers, 5, 0, "GYM7");
+ tbc(allTrainers, 8, 0, "GYM8");
+ tbc(allTrainers, 17, 0, "GYM9");
+ tbc(allTrainers, 18, 0, "GYM10");
+ tbc(allTrainers, 19, 0, "GYM11");
+ tbc(allTrainers, 21, 0, "GYM12");
+ tbc(allTrainers, 26, 0, "GYM13");
+ tbc(allTrainers, 35, 0, "GYM14");
+ tbc(allTrainers, 46, 0, "GYM15");
+ tbc(allTrainers, 64, 0, "GYM16");
+
+ // Elite 4 & Red
+ tbc(allTrainers, 11, 0, "ELITE1");
+ tbc(allTrainers, 15, 0, "ELITE2");
+ tbc(allTrainers, 13, 0, "ELITE3");
+ tbc(allTrainers, 14, 0, "ELITE4");
+ tbc(allTrainers, 16, 0, "CHAMPION");
+ tbc(allTrainers, 63, 0, "UBER");
+
+ // Silver
+ // Order in rom is BAYLEEF, QUILAVA, CROCONAW teams
+ // Starters go CYNDA, TOTO, CHIKO
+ // So we want 0=CROCONAW/FERALI, 1=BAYLEEF/MEGAN, 2=QUILAVA/TYPHLO
+ tbc(allTrainers, 9, 0, "RIVAL1-1");
+ tbc(allTrainers, 9, 1, "RIVAL1-2");
+ tbc(allTrainers, 9, 2, "RIVAL1-0");
+
+ tbc(allTrainers, 9, 3, "RIVAL2-1");
+ tbc(allTrainers, 9, 4, "RIVAL2-2");
+ tbc(allTrainers, 9, 5, "RIVAL2-0");
+
+ tbc(allTrainers, 9, 6, "RIVAL3-1");
+ tbc(allTrainers, 9, 7, "RIVAL3-2");
+ tbc(allTrainers, 9, 8, "RIVAL3-0");
+
+ tbc(allTrainers, 9, 9, "RIVAL4-1");
+ tbc(allTrainers, 9, 10, "RIVAL4-2");
+ tbc(allTrainers, 9, 11, "RIVAL4-0");
+
+ tbc(allTrainers, 9, 12, "RIVAL5-1");
+ tbc(allTrainers, 9, 13, "RIVAL5-2");
+ tbc(allTrainers, 9, 14, "RIVAL5-0");
+
+ tbc(allTrainers, 42, 0, "RIVAL6-1");
+ tbc(allTrainers, 42, 1, "RIVAL6-2");
+ tbc(allTrainers, 42, 2, "RIVAL6-0");
+
+ tbc(allTrainers, 42, 3, "RIVAL7-1");
+ tbc(allTrainers, 42, 4, "RIVAL7-2");
+ tbc(allTrainers, 42, 5, "RIVAL7-0");
+
+ // Female Rocket Executive (Ariana)
+ tbc(allTrainers, 55, 0, "THEMED:ARIANA");
+ tbc(allTrainers, 55, 1, "THEMED:ARIANA");
+
+ // others (unlabeled in this game, using HGSS names)
+ tbc(allTrainers, 51, 2, "THEMED:PETREL");
+ tbc(allTrainers, 51, 3, "THEMED:PETREL");
+
+ tbc(allTrainers, 51, 1, "THEMED:PROTON");
+ tbc(allTrainers, 31, 0, "THEMED:PROTON");
+
+ // Sprout Tower
+ tbc(allTrainers, 56, 0, "THEMED:SPROUTTOWER");
+ tbc(allTrainers, 56, 1, "THEMED:SPROUTTOWER");
+ tbc(allTrainers, 56, 2, "THEMED:SPROUTTOWER");
+ tbc(allTrainers, 56, 3, "THEMED:SPROUTTOWER");
+ tbc(allTrainers, 56, 6, "THEMED:SPROUTTOWER");
+ tbc(allTrainers, 56, 7, "THEMED:SPROUTTOWER");
+ tbc(allTrainers, 56, 8, "THEMED:SPROUTTOWER");
+ }
+
+ public static void goldSilverTags(List<Trainer> allTrainers) {
+ tbc(allTrainers, 24, 0, "GYM1");
+ tbc(allTrainers, 24, 1, "GYM1");
+ tbc(allTrainers, 36, 4, "GYM2");
+ tbc(allTrainers, 36, 5, "GYM2");
+ tbc(allTrainers, 36, 6, "GYM2");
+ tbc(allTrainers, 61, 0, "GYM2");
+ tbc(allTrainers, 61, 3, "GYM2");
+ tbc(allTrainers, 25, 0, "GYM3");
+ tbc(allTrainers, 25, 1, "GYM3");
+ tbc(allTrainers, 29, 0, "GYM3");
+ tbc(allTrainers, 29, 1, "GYM3");
+ tbc(allTrainers, 56, 4, "GYM4");
+ tbc(allTrainers, 56, 5, "GYM4");
+ tbc(allTrainers, 57, 0, "GYM4");
+ tbc(allTrainers, 57, 1, "GYM4");
+ tbc(allTrainers, 50, 1, "GYM5");
+ tbc(allTrainers, 50, 3, "GYM5");
+ tbc(allTrainers, 50, 4, "GYM5");
+ tbc(allTrainers, 50, 6, "GYM5");
+ tbc(allTrainers, 58, 0, "GYM7");
+ tbc(allTrainers, 58, 1, "GYM7");
+ tbc(allTrainers, 58, 2, "GYM7");
+ tbc(allTrainers, 33, 0, "GYM7");
+ tbc(allTrainers, 33, 1, "GYM7");
+ tbc(allTrainers, 27, 2, "GYM8");
+ tbc(allTrainers, 27, 4, "GYM8");
+ tbc(allTrainers, 27, 3, "GYM8");
+ tbc(allTrainers, 28, 2, "GYM8");
+ tbc(allTrainers, 28, 3, "GYM8");
+ tbc(allTrainers, 54, 17, "GYM9");
+ tbc(allTrainers, 38, 20, "GYM10");
+ tbc(allTrainers, 39, 17, "GYM10");
+ tbc(allTrainers, 39, 18, "GYM10");
+ tbc(allTrainers, 49, 2, "GYM11");
+ tbc(allTrainers, 43, 1, "GYM11");
+ tbc(allTrainers, 32, 2, "GYM11");
+ tbc(allTrainers, 61, 4, "GYM12");
+ tbc(allTrainers, 61, 5, "GYM12");
+ tbc(allTrainers, 25, 8, "GYM12");
+ tbc(allTrainers, 53, 18, "GYM12");
+ tbc(allTrainers, 29, 13, "GYM12");
+ tbc(allTrainers, 25, 2, "GYM13");
+ tbc(allTrainers, 25, 5, "GYM13");
+ tbc(allTrainers, 53, 4, "GYM13");
+ tbc(allTrainers, 54, 4, "GYM13");
+ tbc(allTrainers, 57, 5, "GYM14");
+ tbc(allTrainers, 57, 6, "GYM14");
+ tbc(allTrainers, 52, 1, "GYM14");
+ tbc(allTrainers, 52, 10, "GYM14");
+ }
+
+ public static void crystalTags(List<Trainer> allTrainers) {
+ tbc(allTrainers, 24, 0, "GYM1");
+ tbc(allTrainers, 24, 1, "GYM1");
+ tbc(allTrainers, 36, 4, "GYM2");
+ tbc(allTrainers, 36, 5, "GYM2");
+ tbc(allTrainers, 36, 6, "GYM2");
+ tbc(allTrainers, 61, 0, "GYM2");
+ tbc(allTrainers, 61, 3, "GYM2");
+ tbc(allTrainers, 25, 0, "GYM3");
+ tbc(allTrainers, 25, 1, "GYM3");
+ tbc(allTrainers, 29, 0, "GYM3");
+ tbc(allTrainers, 29, 1, "GYM3");
+ tbc(allTrainers, 56, 4, "GYM4");
+ tbc(allTrainers, 56, 5, "GYM4");
+ tbc(allTrainers, 57, 0, "GYM4");
+ tbc(allTrainers, 57, 1, "GYM4");
+ tbc(allTrainers, 50, 1, "GYM5");
+ tbc(allTrainers, 50, 3, "GYM5");
+ tbc(allTrainers, 50, 4, "GYM5");
+ tbc(allTrainers, 50, 6, "GYM5");
+ tbc(allTrainers, 58, 0, "GYM7");
+ tbc(allTrainers, 58, 1, "GYM7");
+ tbc(allTrainers, 58, 2, "GYM7");
+ tbc(allTrainers, 33, 0, "GYM7");
+ tbc(allTrainers, 33, 1, "GYM7");
+ tbc(allTrainers, 27, 2, "GYM8");
+ tbc(allTrainers, 27, 4, "GYM8");
+ tbc(allTrainers, 27, 3, "GYM8");
+ tbc(allTrainers, 28, 2, "GYM8");
+ tbc(allTrainers, 28, 3, "GYM8");
+ tbc(allTrainers, 54, 17, "GYM9");
+ tbc(allTrainers, 38, 20, "GYM10");
+ tbc(allTrainers, 39, 17, "GYM10");
+ tbc(allTrainers, 39, 18, "GYM10");
+ tbc(allTrainers, 49, 2, "GYM11");
+ tbc(allTrainers, 43, 1, "GYM11");
+ tbc(allTrainers, 32, 2, "GYM11");
+ tbc(allTrainers, 61, 4, "GYM12");
+ tbc(allTrainers, 61, 5, "GYM12");
+ tbc(allTrainers, 25, 8, "GYM12");
+ tbc(allTrainers, 53, 18, "GYM12");
+ tbc(allTrainers, 29, 13, "GYM12");
+ tbc(allTrainers, 25, 2, "GYM13");
+ tbc(allTrainers, 25, 5, "GYM13");
+ tbc(allTrainers, 53, 4, "GYM13");
+ tbc(allTrainers, 54, 4, "GYM13");
+ tbc(allTrainers, 57, 5, "GYM14");
+ tbc(allTrainers, 57, 6, "GYM14");
+ tbc(allTrainers, 52, 1, "GYM14");
+ tbc(allTrainers, 52, 10, "GYM14");
+ }
+
+ private static void tbc(List<Trainer> allTrainers, int classNum, int number, String tag) {
+ int currnum = -1;
+ for (Trainer t : allTrainers) {
+ // adjusted to not change the above but use 0-indexing properly
+ if (t.trainerclass == classNum - 1) {
+ currnum++;
+ if (currnum == number) {
+ t.tag = tag;
+ return;
+ }
+ }
+ }
+ }
+
+}
diff --git a/src/com/pkrandom/constants/Gen2Items.java b/src/com/pkrandom/constants/Gen2Items.java
new file mode 100644
index 0000000..cd45ad9
--- /dev/null
+++ b/src/com/pkrandom/constants/Gen2Items.java
@@ -0,0 +1,285 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Gen2Items.java - defines an index number constant for every item in --*/
+/*-- the Generation 2 games. --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+public class Gen2Items {
+ // https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Generation_II)
+ public static final int nothing = 0;
+ public static final int masterBall = 1;
+ public static final int ultraBall = 2;
+ public static final int brightPowder = 3;
+ public static final int greatBall = 4;
+ public static final int pokeBall = 5;
+ public static final int terusama6 = 6;
+ public static final int bicycle = 7;
+ public static final int moonStone = 8;
+ public static final int antidote = 9;
+ public static final int burnHeal = 10;
+ public static final int iceHeal = 11;
+ public static final int awakening = 12;
+ public static final int parlyzHeal = 13;
+ public static final int fullRestore = 14;
+ public static final int maxPotion = 15;
+ public static final int hyperPotion = 16;
+ public static final int superPotion = 17;
+ public static final int potion = 18;
+ public static final int escapeRope = 19;
+ public static final int repel = 20;
+ public static final int maxElixer = 21;
+ public static final int fireStone = 22;
+ public static final int thunderstone = 23;
+ public static final int waterStone = 24;
+ public static final int terusama25 = 25;
+ public static final int hpUp = 26;
+ public static final int protein = 27;
+ public static final int iron = 28;
+ public static final int carbos = 29;
+ public static final int luckyPunch = 30;
+ public static final int calcium = 31;
+ public static final int rareCandy = 32;
+ public static final int xAccuracy = 33;
+ public static final int leafStone = 34;
+ public static final int metalPowder = 35;
+ public static final int nugget = 36;
+ public static final int pokeDoll = 37;
+ public static final int fullHeal = 38;
+ public static final int revive = 39;
+ public static final int maxRevive = 40;
+ public static final int guardSpec = 41;
+ public static final int superRepel = 42;
+ public static final int maxRepel = 43;
+ public static final int direHit = 44;
+ public static final int terusama45 = 45;
+ public static final int freshWater = 46;
+ public static final int sodaPop = 47;
+ public static final int lemonade = 48;
+ public static final int xAttack = 49;
+ public static final int terusama50 = 50;
+ public static final int xDefend = 51;
+ public static final int xSpeed = 52;
+ public static final int xSpecial = 53;
+ public static final int coinCase = 54;
+ public static final int itemfinder = 55;
+ public static final int terusama56 = 56;
+ public static final int expShare = 57;
+ public static final int oldRod = 58;
+ public static final int goodRod = 59;
+ public static final int silverLeaf = 60;
+ public static final int superRod = 61;
+ public static final int ppUp = 62;
+ public static final int ether = 63;
+ public static final int maxEther = 64;
+ public static final int elixer = 65;
+ public static final int redScale = 66;
+ public static final int secretPotion = 67;
+ public static final int ssTicket = 68;
+ public static final int mysteryEgg = 69;
+ public static final int clearBell = 70; // exclusive to Crystal
+ public static final int silverWing = 71;
+ public static final int moomooMilk = 72;
+ public static final int quickClaw = 73;
+ public static final int psnCureBerry = 74;
+ public static final int goldLeaf = 75;
+ public static final int softSand = 76;
+ public static final int sharpBeak = 77;
+ public static final int przCureBerry = 78;
+ public static final int burntBerry = 79;
+ public static final int iceBerry = 80;
+ public static final int poisonBarb = 81;
+ public static final int kingsRock = 82;
+ public static final int bitterBerry = 83;
+ public static final int mintBerry = 84;
+ public static final int redApricorn = 85;
+ public static final int tinyMushroom = 86;
+ public static final int bigMushroom = 87;
+ public static final int silverPowder = 88;
+ public static final int bluApricorn = 89;
+ public static final int terusama90 = 90;
+ public static final int amuletCoin = 91;
+ public static final int ylwApricorn = 92;
+ public static final int grnApricorn = 93;
+ public static final int cleanseTag = 94;
+ public static final int mysticWater = 95;
+ public static final int twistedSpoon = 96;
+ public static final int whtApricorn = 97;
+ public static final int blackbelt = 98;
+ public static final int blkApricorn = 99;
+ public static final int terusama100 = 100;
+ public static final int pnkApricorn = 101;
+ public static final int blackGlasses = 102;
+ public static final int slowpokeTail = 103;
+ public static final int pinkBow = 104;
+ public static final int stick = 105;
+ public static final int smokeBall = 106;
+ public static final int neverMeltIce = 107;
+ public static final int magnet = 108;
+ public static final int miracleBerry = 109;
+ public static final int pearl = 110;
+ public static final int bigPearl = 111;
+ public static final int everstone = 112;
+ public static final int spellTag = 113;
+ public static final int rageCandyBar = 114;
+ public static final int gsBall = 115; // exclusive to Crystal
+ public static final int blueCard = 116; // exclusive to Crystal
+ public static final int miracleSeed = 117;
+ public static final int thickClub = 118;
+ public static final int focusBand = 119;
+ public static final int terusama120 = 120;
+ public static final int energyPowder = 121;
+ public static final int energyRoot = 122;
+ public static final int healPowder = 123;
+ public static final int revivalHerb = 124;
+ public static final int hardStone = 125;
+ public static final int luckyEgg = 126;
+ public static final int cardKey = 127;
+ public static final int machinePart = 128;
+ public static final int eggTicket = 129; // exclusive to Crystal
+ public static final int lostItem = 130;
+ public static final int stardust = 131;
+ public static final int starPiece = 132;
+ public static final int basementKey = 133;
+ public static final int pass = 134;
+ public static final int terusama135 = 135;
+ public static final int terusama136 = 136;
+ public static final int terusama137 = 137;
+ public static final int charcoal = 138;
+ public static final int berryJuice = 139;
+ public static final int scopeLens = 140;
+ public static final int terusama141 = 141;
+ public static final int terusama142 = 142;
+ public static final int metalCoat = 143;
+ public static final int dragonFang = 144;
+ public static final int terusama145 = 145;
+ public static final int leftovers = 146;
+ public static final int terusama147 = 147;
+ public static final int terusama148 = 148;
+ public static final int terusama149 = 149;
+ public static final int mysteryBerry = 150;
+ public static final int dragonScale = 151;
+ public static final int berserkGene = 152;
+ public static final int terusama153 = 153;
+ public static final int terusama154 = 154;
+ public static final int terusama155 = 155;
+ public static final int sacredAsh = 156;
+ public static final int heavyBall = 157;
+ public static final int flowerMail = 158;
+ public static final int levelBall = 159;
+ public static final int lureBall = 160;
+ public static final int fastBall = 161;
+ public static final int terusama162 = 162;
+ public static final int lightBall = 163;
+ public static final int friendBall = 164;
+ public static final int moonBall = 165;
+ public static final int loveBall = 166;
+ public static final int normalBox = 167;
+ public static final int gorgeousBox = 168;
+ public static final int sunStone = 169;
+ public static final int polkadotBow = 170;
+ public static final int terusama171 = 171;
+ public static final int upGrade = 172;
+ public static final int berry = 173;
+ public static final int goldBerry = 174;
+ public static final int squirtBottle = 175;
+ public static final int terusama176 = 176;
+ public static final int parkBall = 177;
+ public static final int rainbowWing = 178;
+ public static final int terusama179 = 179;
+ public static final int brickPiece = 180;
+ public static final int surfMail = 181;
+ public static final int litebluemail = 182;
+ public static final int portraitmail = 183;
+ public static final int lovelyMail = 184;
+ public static final int eonMail = 185;
+ public static final int morphMail = 186;
+ public static final int blueskyMail = 187;
+ public static final int musicMail = 188;
+ public static final int mirageMail = 189;
+ public static final int terusama190 = 190;
+ public static final int tm01 = 191;
+ public static final int tm02 = 192;
+ public static final int tm03 = 193;
+ public static final int tm04 = 194;
+ public static final int tm04Unused = 195;
+ public static final int tm05 = 196;
+ public static final int tm06 = 197;
+ public static final int tm07 = 198;
+ public static final int tm08 = 199;
+ public static final int tm09 = 200;
+ public static final int tm10 = 201;
+ public static final int tm11 = 202;
+ public static final int tm12 = 203;
+ public static final int tm13 = 204;
+ public static final int tm14 = 205;
+ public static final int tm15 = 206;
+ public static final int tm16 = 207;
+ public static final int tm17 = 208;
+ public static final int tm18 = 209;
+ public static final int tm19 = 210;
+ public static final int tm20 = 211;
+ public static final int tm21 = 212;
+ public static final int tm22 = 213;
+ public static final int tm23 = 214;
+ public static final int tm24 = 215;
+ public static final int tm25 = 216;
+ public static final int tm26 = 217;
+ public static final int tm27 = 218;
+ public static final int tm28 = 219;
+ public static final int tm28Unused = 220;
+ public static final int tm29 = 221;
+ public static final int tm30 = 222;
+ public static final int tm31 = 223;
+ public static final int tm32 = 224;
+ public static final int tm33 = 225;
+ public static final int tm34 = 226;
+ public static final int tm35 = 227;
+ public static final int tm36 = 228;
+ public static final int tm37 = 229;
+ public static final int tm38 = 230;
+ public static final int tm39 = 231;
+ public static final int tm40 = 232;
+ public static final int tm41 = 233;
+ public static final int tm42 = 234;
+ public static final int tm43 = 235;
+ public static final int tm44 = 236;
+ public static final int tm45 = 237;
+ public static final int tm46 = 238;
+ public static final int tm47 = 239;
+ public static final int tm48 = 240;
+ public static final int tm49 = 241;
+ public static final int tm50 = 242;
+ public static final int hm01 = 243;
+ public static final int hm02 = 244;
+ public static final int hm03 = 245;
+ public static final int hm04 = 246;
+ public static final int hm05 = 247;
+ public static final int hm06 = 248;
+ public static final int hm07 = 249;
+ public static final int hm08 = 250;
+ public static final int hm09 = 251;
+ public static final int hm10 = 252;
+ public static final int hm11 = 253;
+ public static final int hm12 = 254;
+ public static final int cancel = 255;
+}
diff --git a/src/com/pkrandom/constants/Gen3Constants.java b/src/com/pkrandom/constants/Gen3Constants.java
new file mode 100644
index 0000000..2f747d4
--- /dev/null
+++ b/src/com/pkrandom/constants/Gen3Constants.java
@@ -0,0 +1,1319 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Gen3Constants.java - Constants for Ruby/Sapphire/FR/LG/Emerald --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+import java.util.*;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import java.util.stream.Stream;
+
+import com.pkrandom.pokemon.ItemList;
+import com.pkrandom.pokemon.Trainer;
+import com.pkrandom.pokemon.Type;
+
+public class Gen3Constants {
+
+ public static final int RomType_Ruby = 0;
+ public static final int RomType_Sapp = 1;
+ public static final int RomType_Em = 2;
+ public static final int RomType_FRLG = 3;
+
+ public static final int size8M = 0x800000, size16M = 0x1000000, size32M = 0x2000000;
+
+ public static final String unofficialEmeraldROMName = "YJencrypted";
+
+ public static final int romNameOffset = 0xA0, romCodeOffset = 0xAC, romVersionOffset = 0xBC,
+ headerChecksumOffset = 0xBD;
+
+ public static final int pokemonCount = 386;
+
+ public static final String wildPokemonPointerPrefix = "0348048009E00000FFFF0000";
+
+ public static final String mapBanksPointerPrefix = "80180068890B091808687047";
+
+ public static final String rsPokemonNamesPointerSuffix = "30B50025084CC8F7";
+
+ public static final String frlgMapLabelsPointerPrefix = "AC470000AE470000B0470000";
+
+ public static final String rseMapLabelsPointerPrefix = "C078288030BC01BC00470000";
+
+ public static final String pokedexOrderPointerPrefix = "0448814208D0481C0004000C05E00000";
+
+ public static final String rsFrontSpritesPointerPrefix = "05E0";
+
+ public static final String rsFrontSpritesPointerSuffix = "1068191C";
+
+ public static final String rsPokemonPalettesPointerPrefix = "04D90148006817E0";
+
+ public static final String rsPokemonPalettesPointerSuffix = "080C064A11404840";
+
+ private static final String runningShoesCheckPrefixRS = "0440002C1DD08620", runningShoesCheckPrefixFRLG = "02200540002D29D0",
+ runningShoesCheckPrefixE = "0640002E1BD08C20";
+
+ public static final int efrlgPokemonNamesPointer = 0x144, efrlgMoveNamesPointer = 0x148,
+ 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();
+
+ public static final int grassSlots = 12, surfingSlots = 5, rockSmashSlots = 5, fishingSlots = 10;
+
+ public static final int tmCount = 50, hmCount = 8;
+
+ public static final List<Integer> hmMoves = Arrays.asList(
+ Moves.cut, Moves.fly, Moves.surf, Moves.strength, Moves.flash, Moves.rockSmash, Moves.waterfall, Moves.dive);
+
+ public static final int tmItemOffset = Gen3Items.tm01;
+
+ public static final int rseItemDescCharsPerLine = 18, frlgItemDescCharsPerLine = 24;
+
+ public static final int regularTextboxCharsPerLine = 36;
+
+ public static final int pointerSearchRadius = 500;
+
+ public static final int itemDataDescriptionOffset = 0x14;
+
+ public static final String deoxysObeyCode = "CD21490088420FD0";
+
+ public static final int mewObeyOffsetFromDeoxysObey = 0x16;
+
+ public static final String levelEvoKantoDexCheckCode = "972814DD";
+
+ public static final String stoneEvoKantoDexCheckCode = "972808D9";
+
+ public static final int levelEvoKantoDexJumpAmount = 0x14, stoneEvoKantoDexJumpAmount = 0x08;
+
+ public static final String rsPokedexScriptIdentifier = "326629010803";
+
+ public static final String rsNatDexScriptPart1 = "31720167";
+
+ public static final String rsNatDexScriptPart2 = "32662901082B00801102006B02021103016B020211DABE4E020211675A6A02022A008003";
+
+ public static final String frlgPokedexScriptIdentifier = "292908258101";
+
+ public static final String frlgNatDexScript = "292908258101256F0103";
+
+ public static final String frlgNatDexFlagChecker = "260D809301210D800100";
+
+ public static final String frlgE4FlagChecker = "2B2C0800000000000000";
+
+ public static final String frlgOaksLabKantoDexChecker = "257D011604800000260D80D400";
+
+ public static final String frlgOaksLabFix = "257D011604800100";
+
+ public static final String frlgOakOutsideHouseCheck = "1604800000260D80D4001908800580190980068083000880830109802109803C";
+
+ public static final String frlgOakOutsideHouseFix = "1604800100";
+
+ public static final String frlgOakAideCheckPrefix = "00B5064800880028";
+
+ public static final String ePokedexScriptIdentifier = "3229610825F00129E40816CD40010003";
+
+ public static final String eNatDexScriptPart1 = "31720167";
+
+ public static final String eNatDexScriptPart2 = "3229610825F00129E40825F30116CD40010003";
+
+ public static final String friendshipValueForEvoLocator = "DB2900D8";
+
+ public static final String perfectOddsBranchLocator = "FE2E2FD90020";
+
+ public static final int unhackedMaxPokedex = 411, unhackedRealPokedex = 386, hoennPokesStart = 252;
+
+ public static final int evolutionMethodCount = 15;
+
+ public static final int cacophonyIndex = 76, airLockIndex = 77, highestAbilityIndex = 77;
+
+ public static final int emMeteorFallsStevenIndex = 804;
+
+ public static final Map<Integer,List<Integer>> abilityVariations = setupAbilityVariations();
+
+ private static Map<Integer,List<Integer>> setupAbilityVariations() {
+ Map<Integer,List<Integer>> map = new HashMap<>();
+ map.put(Abilities.insomnia, Arrays.asList(Abilities.insomnia, Abilities.vitalSpirit));
+ map.put(Abilities.clearBody, Arrays.asList(Abilities.clearBody, Abilities.whiteSmoke));
+ map.put(Abilities.hugePower, Arrays.asList(Abilities.hugePower, Abilities.purePower));
+ map.put(Abilities.battleArmor, Arrays.asList(Abilities.battleArmor, Abilities.shellArmor));
+ map.put(Abilities.cloudNine, Arrays.asList(Abilities.cloudNine, Gen3Constants.airLockIndex));
+
+ return map;
+ }
+
+ public static final List<Integer> uselessAbilities = Arrays.asList(Abilities.forecast, Gen3Constants.cacophonyIndex);
+
+ public static final int frlgMapLabelsStart = 0x58;
+
+ public static final int noDamageSleepEffect = 1, damagePoisonEffect = 2, damageAbsorbEffect = 3, damageBurnEffect = 4,
+ damageFreezeEffect = 5, damageParalyzeEffect = 6, dreamEaterEffect = 8, noDamageAtkPlusOneEffect = 10,
+ noDamageDefPlusOneEffect = 11, noDamageSpAtkPlusOneEffect = 13, noDamageEvasionPlusOneEffect = 16,
+ noDamageAtkMinusOneEffect = 18, noDamageDefMinusOneEffect = 19, noDamageSpeMinusOneEffect = 20,
+ noDamageAccuracyMinusOneEffect = 23, noDamageEvasionMinusOneEffect = 24, flinchEffect = 31, toxicEffect = 33,
+ razorWindEffect = 39, bindingEffect = 42, increasedCritEffect = 43, damageRecoil25PercentEffect = 48,
+ noDamageConfusionEffect = 49, noDamageAtkPlusTwoEffect = 50, noDamageDefPlusTwoEffect = 51,
+ noDamageSpePlusTwoEffect = 52, noDamageSpAtkPlusTwoEffect = 53, noDamageSpDefPlusTwoEffect = 54,
+ noDamageAtkMinusTwoEffect = 58, noDamageDefMinusTwoEffect = 59, noDamageSpeMinusTwoEffect = 60,
+ noDamageSpDefMinusTwoEffect = 62, noDamagePoisonEffect = 66, noDamageParalyzeEffect = 67,
+ damageAtkMinusOneEffect = 68, damageDefMinusOneEffect = 69, damageSpeMinusOneEffect = 70,
+ damageSpAtkMinusOneEffect = 71, damageSpDefMinusOneEffect = 72, damageAccuracyMinusOneEffect = 73,
+ skyAttackEffect = 75, damageConfusionEffect = 76, twineedleEffect = 77, rechargeEffect = 80,
+ snoreEffect = 92, trappingEffect = 106, minimizeEffect = 108, swaggerEffect = 118,
+ damageBurnAndThawUserEffect = 125, damageUserDefPlusOneEffect = 138, damageUserAtkPlusOneEffect = 139,
+ damageUserAllPlusOneEffect = 140, skullBashEffect = 145, twisterEffect = 146,
+ futureSightAndDoomDesireEffect = 148, flinchWithMinimizeBonusEffect = 150, solarbeamEffect = 151,
+ thunderEffect = 152, semiInvulnerableEffect = 155, defenseCurlEffect = 156, fakeOutEffect = 158,
+ spitUpEffect = 161, flatterEffect = 166, noDamageBurnEffect = 167, chargeEffect = 174,
+ damageUserAtkAndDefMinusOneEffect = 182, damageRecoil33PercentEffect = 198, teeterDanceEffect = 199,
+ blazeKickEffect = 200, poisonFangEffect = 202, damageUserSpAtkMinusTwoEffect = 204,
+ noDamageAtkAndDefMinusOneEffect = 205, noDamageDefAndSpDefPlusOneEffect = 206,
+ noDamageAtkAndDefPlusOneEffect = 208, poisonTailEffect = 209, noDamageSpAtkAndSpDefPlusOneEffect = 211,
+ noDamageAtkAndSpePlusOneEffect = 212;
+
+ public static final List<Integer> soundMoves = Arrays.asList(Moves.growl, Moves.roar, Moves.sing, Moves.supersonic,
+ Moves.screech, Moves.snore, Moves.uproar, Moves.metalSound, Moves.grassWhistle, Moves.hyperVoice,
+ Moves.perishSong, Moves.healBell);
+
+ public static final List<Integer> rsRequiredFieldTMs = Arrays.asList(1, 2, 6, 7, 11, 18, 22, 23,
+ 26, 30, 37, 48);
+
+ public static final List<Integer> eRequiredFieldTMs = Arrays.asList(2, 6, 7, 11, 18, 22, 23, 30,
+ 37, 48);
+
+ public static final List<Integer> frlgRequiredFieldTMs = Arrays.asList(1, 2, 7, 8, 9, 11, 12, 14,
+ 17, 18, 21, 22, 25, 32, 36, 37, 40, 41, 44, 46, 47, 48, 49, 50);
+
+ public static final List<Integer> rseFieldMoves = Arrays.asList(
+ Moves.cut, Moves.fly, Moves.surf, Moves.strength, Moves.flash, Moves.dig, Moves.teleport,
+ Moves.waterfall, Moves.rockSmash, Moves.sweetScent, Moves.dive, Moves.secretPower);
+
+ public static final List<Integer> frlgFieldMoves = Arrays.asList(
+ Moves.cut, Moves.fly, Moves.surf, Moves.strength, Moves.flash, Moves.dig, Moves.teleport,
+ Moves.waterfall, Moves.rockSmash, Moves.sweetScent);
+
+ public static final List<Integer> rseEarlyRequiredHMMoves = Collections.singletonList(Moves.rockSmash);
+
+ public static final List<Integer> frlgEarlyRequiredHMMoves = Collections.singletonList(Moves.cut);
+
+ private static List<String> rsShopNames = Arrays.asList(
+ "Slateport Vitamins",
+ "Slateport TMs",
+ "Oldale Poké Mart (Before Pokédex)",
+ "Oldale Poké Mart (After Pokédex)",
+ "Lavaridge Herbs",
+ "Lavaridge Poké Mart",
+ "Fallarbor Poké Mart",
+ "Verdanturf Poké Mart",
+ "Petalburg Poké Mart (Before 4 Badges)",
+ "Petalburg Poké Mart (After 4 Badges)",
+ "Slateport Poké Mart",
+ "Mauville Poké Mart",
+ "Rustboro Poké Mart (Before Delivering Devon Goods)",
+ "Rustboro Poké Mart (After Delivering Devon Goods)",
+ "Fortree Poké Mart",
+ "Lilycove Department Store 2F Left",
+ "Lilycove Department Store 2F Right",
+ "Lilycove Department Store 3F Left",
+ "Lilycove Department Store 3F Right",
+ "Lilycove Department Store 4F Left (TMs)",
+ "Lilycove Department Store 4F Right (TMs)",
+ "Mossdeep Poké Mart",
+ "Sootopolis Poké Mart",
+ "Pokémon League Poké Mart"
+ );
+
+ private static List<String> frlgShopNames = Arrays.asList(
+ "Trainer Tower Poké Mart",
+ "Two Island Market Stall (Initial)",
+ "Two Island Market Stall (After Saving Lostelle)",
+ "Two Island Market Stall (After Hall of Fame)",
+ "Two Island Market Stall (After Ruby/Sapphire Quest)",
+ "Viridian Poké Mart",
+ "Pewter Poké Mart",
+ "Cerulean Poké Mart",
+ "Lavender Poké Mart",
+ "Vermillion Poké Mart",
+ "Celadon Department 2F South",
+ "Celadon Department 2F North (TMs)",
+ "Celadon Department 4F",
+ "Celadon Department 5F South",
+ "Celadon Department 5F North",
+ "Fuchsia Poké Mart",
+ "Cinnabar Poké Mart",
+ "Indigo Plateau Poké Mart",
+ "Saffron Poké Mart",
+ "Seven Island Poké Mart",
+ "Three Island Poké Mart",
+ "Four Island Poké Mart",
+ "Six Island Poké Mart"
+ );
+
+ private static List<String> emShopNames = Arrays.asList(
+ "Slateport Vitamins",
+ "Slateport TMs",
+ "Oldale Poké Mart (Before Pokédex)",
+ "Oldale Poké Mart (After Pokédex)",
+ "Lavaridge Herbs",
+ "Lavaridge Poké Mart",
+ "Fallarbor Poké Mart",
+ "Verdanturf Poké Mart",
+ "Petalburg Poké Mart (Before 4 Badges)",
+ "Petalburg Poké Mart (After 4 Badges)",
+ "Slateport Poké Mart",
+ "Mauville Poké Mart",
+ "Rustboro Poké Mart (Before Delivering Devon Goods)",
+ "Rustboro Poké Mart (After Delivering Devon Goods)",
+ "Fortree Poké Mart",
+ "Lilycove Department Store 2F Left",
+ "Lilycove Department Store 2F Right",
+ "Lilycove Department Store 3F Left",
+ "Lilycove Department Store 3F Right",
+ "Lilycove Department Store 4F Left (TMs)",
+ "Lilycove Department Store 4F Right (TMs)",
+ "Mossdeep Poké Mart",
+ "Sootopolis Poké Mart",
+ "Pokémon League Poké Mart",
+ "Battle Frontier Poké Mart",
+ "Trainer Hill Poké Mart (Before Hall of Fame)",
+ "Trainer Hill Poké Mart (After Hall of Fame)"
+ );
+
+ public static List<String> getShopNames(int romType) {
+ if (romType == RomType_Ruby || romType == RomType_Sapp) {
+ return rsShopNames;
+ } else if (romType == RomType_FRLG) {
+ return frlgShopNames;
+ } else if (romType == RomType_Em) {
+ return emShopNames;
+ }
+ return null;
+ }
+
+ public static final List<Integer> evolutionItems = Arrays.asList(Gen3Items.sunStone, Gen3Items.moonStone,
+ Gen3Items.fireStone, Gen3Items.thunderstone, Gen3Items.waterStone, Gen3Items.leafStone);
+
+ public static final List<Integer> xItems = Arrays.asList(Gen3Items.guardSpec, Gen3Items.direHit, Gen3Items.xAttack,
+ Gen3Items.xDefend, Gen3Items.xSpeed, Gen3Items.xAccuracy, Gen3Items.xSpecial);
+
+ public static final List<Integer> consumableHeldItems = Collections.unmodifiableList(Arrays.asList(
+ Gen3Items.cheriBerry, Gen3Items.chestoBerry, Gen3Items.pechaBerry, Gen3Items.rawstBerry,
+ Gen3Items.rawstBerry, Gen3Items.leppaBerry, Gen3Items.oranBerry, Gen3Items.persimBerry, Gen3Items.lumBerry,
+ Gen3Items.sitrusBerry, Gen3Items.figyBerry, Gen3Items.wikiBerry, Gen3Items.magoBerry, Gen3Items.aguavBerry,
+ Gen3Items.iapapaBerry, Gen3Items.liechiBerry, Gen3Items.ganlonBerry, Gen3Items.salacBerry,
+ Gen3Items.petayaBerry, Gen3Items.apicotBerry, Gen3Items.lansatBerry, Gen3Items.starfBerry,
+ Gen3Items.berryJuice, Gen3Items.whiteHerb, Gen3Items.mentalHerb));
+
+ public static final List<Integer> allHeldItems = setupAllHeldItems();
+
+ private static List<Integer> setupAllHeldItems() {
+ List<Integer> list = new ArrayList<>();
+ list.addAll(Arrays.asList(Gen3Items.brightPowder, Gen3Items.quickClaw, Gen3Items.choiceBand,
+ Gen3Items.kingsRock, Gen3Items.silverPowder, Gen3Items.focusBand, Gen3Items.scopeLens,
+ Gen3Items.metalCoat, Gen3Items.leftovers, Gen3Items.softSand, Gen3Items.hardStone,
+ Gen3Items.miracleSeed, Gen3Items.blackGlasses, Gen3Items.blackBelt, Gen3Items.magnet,
+ Gen3Items.mysticWater, Gen3Items.sharpBeak, Gen3Items.poisonBarb, Gen3Items.neverMeltIce,
+ Gen3Items.spellTag, Gen3Items.twistedSpoon, Gen3Items.charcoal, Gen3Items.dragonFang,
+ Gen3Items.silkScarf, Gen3Items.shellBell, Gen3Items.seaIncense, Gen3Items.laxIncense));
+ list.addAll(consumableHeldItems);
+ return Collections.unmodifiableList(list);
+ }
+
+ public static final List<Integer> generalPurposeConsumableItems = Collections.unmodifiableList(Arrays.asList(
+ Gen3Items.cheriBerry, Gen3Items.chestoBerry, Gen3Items.pechaBerry, Gen3Items.rawstBerry,
+ Gen3Items.aspearBerry, Gen3Items.leppaBerry, Gen3Items.oranBerry, Gen3Items.persimBerry, Gen3Items.lumBerry,
+ Gen3Items.sitrusBerry, Gen3Items.ganlonBerry, Gen3Items.salacBerry,
+ // An NPC pokemon's nature is generated randomly with IVs during gameplay. Therefore, we do not include
+ // the flavor berries because, prior to Gen 7, they aren't worth the risk.
+ Gen3Items.apicotBerry, Gen3Items.lansatBerry, Gen3Items.starfBerry, Gen3Items.berryJuice,
+ Gen3Items.whiteHerb, Gen3Items.mentalHerb
+ ));
+
+ public static final List<Integer> generalPurposeItems = Collections.unmodifiableList(Arrays.asList(
+ Gen3Items.brightPowder, Gen3Items.quickClaw, Gen3Items.kingsRock, Gen3Items.focusBand, Gen3Items.scopeLens,
+ Gen3Items.leftovers, Gen3Items.shellBell, Gen3Items.laxIncense
+ ));
+
+ public static final Map<Type, List<Integer>> typeBoostingItems = initializeTypeBoostingItems();
+
+ private static Map<Type, List<Integer>> initializeTypeBoostingItems() {
+ Map<Type, List<Integer>> map = new HashMap<>();
+ map.put(Type.BUG, Arrays.asList(Gen3Items.silverPowder));
+ map.put(Type.DARK, Arrays.asList(Gen3Items.blackGlasses));
+ map.put(Type.DRAGON, Arrays.asList(Gen3Items.dragonFang));
+ map.put(Type.ELECTRIC, Arrays.asList(Gen3Items.magnet));
+ map.put(Type.FIGHTING, Arrays.asList(Gen3Items.blackBelt));
+ map.put(Type.FIRE, Arrays.asList(Gen3Items.charcoal));
+ map.put(Type.FLYING, Arrays.asList(Gen3Items.sharpBeak));
+ map.put(Type.GHOST, Arrays.asList(Gen3Items.spellTag));
+ map.put(Type.GRASS, Arrays.asList(Gen3Items.miracleSeed));
+ map.put(Type.GROUND, Arrays.asList(Gen3Items.softSand));
+ map.put(Type.ICE, Arrays.asList(Gen3Items.neverMeltIce));
+ map.put(Type.NORMAL, Arrays.asList(Gen3Items.silkScarf));
+ map.put(Type.POISON, Arrays.asList(Gen3Items.poisonBarb));
+ map.put(Type.PSYCHIC, Arrays.asList(Gen3Items.twistedSpoon));
+ map.put(Type.ROCK, Arrays.asList(Gen3Items.hardStone));
+ map.put(Type.STEEL, Arrays.asList(Gen3Items.metalCoat));
+ map.put(Type.WATER, Arrays.asList(Gen3Items.mysticWater, Gen3Items.seaIncense));
+ map.put(null, Collections.emptyList()); // ??? type
+ return Collections.unmodifiableMap(map);
+ }
+
+ public static final Map<Integer, List<Integer>> speciesBoostingItems = initializeSpeciesBoostingItems();
+
+ private static Map<Integer, List<Integer>> initializeSpeciesBoostingItems() {
+ Map<Integer, List<Integer>> map = new HashMap<>();
+ map.put(Species.latias, Arrays.asList(Gen3Items.soulDew));
+ map.put(Species.latios, Arrays.asList(Gen3Items.soulDew));
+ map.put(Species.clamperl, Arrays.asList(Gen3Items.deepSeaTooth, Gen3Items.deepSeaScale));
+ map.put(Species.pikachu, Arrays.asList(Gen3Items.lightBall));
+ map.put(Species.chansey, Arrays.asList(Gen3Items.luckyPunch));
+ map.put(Species.ditto, Arrays.asList(Gen3Items.metalPowder));
+ map.put(Species.cubone, Arrays.asList(Gen3Items.thickClub));
+ map.put(Species.marowak, Arrays.asList(Gen3Items.thickClub));
+ map.put(Species.farfetchd, Arrays.asList(Gen3Items.stick));
+ return Collections.unmodifiableMap(map);
+ }
+
+ private static Type[] constructTypeTable() {
+ Type[] table = new Type[256];
+ table[0x00] = Type.NORMAL;
+ table[0x01] = Type.FIGHTING;
+ table[0x02] = Type.FLYING;
+ table[0x03] = Type.POISON;
+ table[0x04] = Type.GROUND;
+ table[0x05] = Type.ROCK;
+ table[0x06] = Type.BUG;
+ table[0x07] = Type.GHOST;
+ table[0x08] = Type.STEEL;
+ table[0x0A] = Type.FIRE;
+ table[0x0B] = Type.WATER;
+ table[0x0C] = Type.GRASS;
+ table[0x0D] = Type.ELECTRIC;
+ table[0x0E] = Type.PSYCHIC;
+ table[0x0F] = Type.ICE;
+ table[0x10] = Type.DRAGON;
+ table[0x11] = Type.DARK;
+ return table;
+ }
+
+ public static byte typeToByte(Type type) {
+ if (type == null) {
+ return 0x09; // ???-type
+ }
+ switch (type) {
+ case NORMAL:
+ return 0x00;
+ case FIGHTING:
+ return 0x01;
+ case FLYING:
+ return 0x02;
+ case POISON:
+ return 0x03;
+ case GROUND:
+ return 0x04;
+ case ROCK:
+ return 0x05;
+ case BUG:
+ return 0x06;
+ case GHOST:
+ return 0x07;
+ case FIRE:
+ return 0x0A;
+ case WATER:
+ return 0x0B;
+ case GRASS:
+ return 0x0C;
+ case ELECTRIC:
+ return 0x0D;
+ case PSYCHIC:
+ return 0x0E;
+ case ICE:
+ return 0x0F;
+ case DRAGON:
+ return 0x10;
+ case STEEL:
+ return 0x08;
+ case DARK:
+ return 0x11;
+ default:
+ return 0; // normal by default
+ }
+ }
+
+ public static ItemList allowedItems, nonBadItemsRSE, nonBadItemsFRLG;
+ public static List<Integer> regularShopItems, opShopItems;
+
+ public static String getRunningShoesCheckPrefix(int romType) {
+ if (romType == Gen3Constants.RomType_Ruby || romType == Gen3Constants.RomType_Sapp) {
+ return runningShoesCheckPrefixRS;
+ } else if (romType == Gen3Constants.RomType_FRLG) {
+ return runningShoesCheckPrefixFRLG;
+ } else {
+ return runningShoesCheckPrefixE;
+ }
+ }
+
+ static {
+ setupAllowedItems();
+ }
+
+ private static void setupAllowedItems() {
+ allowedItems = new ItemList(Gen3Items.oldSeaMap);
+ // Key items (+1 unknown item)
+ allowedItems.banRange(Gen3Items.machBike, 30);
+ allowedItems.banRange(Gen3Items.oaksParcel, 28);
+ // Unknown blank items
+ allowedItems.banRange(Gen3Items.unknown52, 11);
+ allowedItems.banRange(Gen3Items.unknown87, 6);
+ allowedItems.banRange(Gen3Items.unknown99, 4);
+ allowedItems.banRange(Gen3Items.unknown112, 9);
+ allowedItems.banRange(Gen3Items.unknown176, 3);
+ allowedItems.banRange(Gen3Items.unknown226, 28);
+ allowedItems.banRange(Gen3Items.unknown347, 2);
+ allowedItems.banSingles(Gen3Items.unknown72, Gen3Items.unknown82, Gen3Items.unknown105, Gen3Items.unknown267);
+ // HMs
+ allowedItems.banRange(Gen3Items.hm01, 8);
+ // TMs
+ allowedItems.tmRange(Gen3Items.tm01, 50);
+
+ // non-bad items
+ // ban specific pokemon hold items, berries, apricorns, mail
+ nonBadItemsRSE = allowedItems.copy();
+ nonBadItemsRSE.banSingles(Gen3Items.lightBall, Gen3Items.oranBerry, Gen3Items.soulDew);
+ nonBadItemsRSE.banRange(Gen3Items.orangeMail, 12); // mail
+ nonBadItemsRSE.banRange(Gen3Items.figyBerry, 33); // berries
+ nonBadItemsRSE.banRange(Gen3Items.luckyPunch, 4); // pokemon specific
+ nonBadItemsRSE.banRange(Gen3Items.redScarf, 5); // contest scarves
+
+ // FRLG-exclusive bad items
+ // Ban Shoal items and Shards, since they don't do anything
+ nonBadItemsFRLG = nonBadItemsRSE.copy();
+ nonBadItemsFRLG.banRange(Gen3Items.shoalSalt, 6);
+
+ regularShopItems = new ArrayList<>();
+
+ regularShopItems.addAll(IntStream.rangeClosed(Gen3Items.ultraBall,Gen3Items.pokeBall).boxed().collect(Collectors.toList()));
+ regularShopItems.addAll(IntStream.rangeClosed(Gen3Items.potion,Gen3Items.revive).boxed().collect(Collectors.toList()));
+ regularShopItems.addAll(IntStream.rangeClosed(Gen3Items.superRepel,Gen3Items.repel).boxed().collect(Collectors.toList()));
+
+ opShopItems = new ArrayList<>();
+
+ // "Money items" etc
+ opShopItems.add(Gen3Items.rareCandy);
+ opShopItems.addAll(IntStream.rangeClosed(Gen3Items.tinyMushroom,Gen3Items.bigMushroom).boxed().collect(Collectors.toList()));
+ opShopItems.addAll(IntStream.rangeClosed(Gen3Items.pearl,Gen3Items.nugget).boxed().collect(Collectors.toList()));
+ opShopItems.add(Gen3Items.luckyEgg);
+ }
+
+ public static ItemList getNonBadItems(int romType) {
+ if (romType == Gen3Constants.RomType_FRLG) {
+ return nonBadItemsFRLG;
+ } else {
+ return nonBadItemsRSE;
+ }
+ }
+
+ public static void trainerTagsRS(List<Trainer> trs, int romType) {
+ // Gym Trainers
+ tag(trs, "GYM1", 0x140, 0x141);
+ tag(trs, "GYM2", 0x1AA, 0x1A9, 0xB3);
+ tag(trs, "GYM3", 0xBF, 0x143, 0xC2, 0x289);
+ tag(trs, "GYM4", 0xC9, 0x288, 0xCB, 0x28A, 0xCD);
+ tag(trs, "GYM5", 0x47, 0x59, 0x49, 0x5A, 0x48, 0x5B, 0x4A);
+ tag(trs, "GYM6", 0x191, 0x28F, 0x28E, 0x194);
+ tag(trs, "GYM7", 0xE9, 0xEA, 0xEB, 0xF4, 0xF5, 0xF6);
+ tag(trs, "GYM8", 0x82, 0x266, 0x83, 0x12D, 0x81, 0x74, 0x80, 0x265);
+
+ // Gym Leaders
+ tag(trs, 0x109, "GYM1-LEADER");
+ tag(trs, 0x10A, "GYM2-LEADER");
+ tag(trs, 0x10B, "GYM3-LEADER");
+ tag(trs, 0x10C, "GYM4-LEADER");
+ tag(trs, 0x10D, "GYM5-LEADER");
+ tag(trs, 0x10E, "GYM6-LEADER");
+ tag(trs, 0x10F, "GYM7-LEADER");
+ tag(trs, 0x110, "GYM8-LEADER");
+ // Elite 4
+ tag(trs, 0x105, "ELITE1");
+ tag(trs, 0x106, "ELITE2");
+ tag(trs, 0x107, "ELITE3");
+ tag(trs, 0x108, "ELITE4");
+ tag(trs, 0x14F, "CHAMPION");
+ // Brendan
+ tag(trs, 0x208, "RIVAL1-2");
+ tag(trs, 0x20B, "RIVAL1-0");
+ tag(trs, 0x20E, "RIVAL1-1");
+
+ tag(trs, 0x209, "RIVAL2-2");
+ tag(trs, 0x20C, "RIVAL2-0");
+ tag(trs, 0x20F, "RIVAL2-1");
+
+ tag(trs, 0x20A, "RIVAL3-2");
+ tag(trs, 0x20D, "RIVAL3-0");
+ tag(trs, 0x210, "RIVAL3-1");
+
+ tag(trs, 0x295, "RIVAL4-2");
+ tag(trs, 0x296, "RIVAL4-0");
+ tag(trs, 0x297, "RIVAL4-1");
+
+ // May
+ tag(trs, 0x211, "RIVAL1-2");
+ tag(trs, 0x214, "RIVAL1-0");
+ tag(trs, 0x217, "RIVAL1-1");
+
+ tag(trs, 0x212, "RIVAL2-2");
+ tag(trs, 0x215, "RIVAL2-0");
+ tag(trs, 0x218, "RIVAL2-1");
+
+ tag(trs, 0x213, "RIVAL3-2");
+ tag(trs, 0x216, "RIVAL3-0");
+ tag(trs, 0x219, "RIVAL3-1");
+
+ tag(trs, 0x298, "RIVAL4-2");
+ tag(trs, 0x299, "RIVAL4-0");
+ tag(trs, 0x29A, "RIVAL4-1");
+
+ // Wally
+ tag(trs, "THEMED:WALLY-STRONG", 0x207, 0x290, 0x291, 0x292, 0x293, 0x294);
+
+ if (romType == RomType_Ruby) {
+ tag(trs, "THEMED:MAXIE-LEADER", 0x259, 0x25A);
+ tag(trs, "THEMED:COURTNEY-STRONG", 0x257, 0x258);
+ tag(trs, "THEMED:TABITHA-STRONG", 0x254, 0x255);
+ } else {
+ tag(trs, "THEMED:ARCHIE-LEADER", 0x23, 0x22);
+ tag(trs, "THEMED:MATT-STRONG", 0x1E, 0x1F);
+ tag(trs, "THEMED:SHELLY-STRONG", 0x20, 0x21);
+ }
+
+ }
+
+ public static void trainerTagsE(List<Trainer> trs) {
+ // Gym Trainers
+ tag(trs, "GYM1", 0x140, 0x141, 0x23B);
+ tag(trs, "GYM2", 0x1AA, 0x1A9, 0xB3, 0x23C, 0x23D, 0x23E);
+ tag(trs, "GYM3", 0xBF, 0x143, 0xC2, 0x289, 0x322);
+ tag(trs, "GYM4", 0x288, 0xC9, 0xCB, 0x28A, 0xCA, 0xCC, 0x1F5, 0xCD);
+ tag(trs, "GYM5", 0x47, 0x59, 0x49, 0x5A, 0x48, 0x5B, 0x4A);
+ tag(trs, "GYM6", 0x192, 0x28F, 0x191, 0x28E, 0x194, 0x323);
+ tag(trs, "GYM7", 0xE9, 0xEA, 0xEB, 0xF4, 0xF5, 0xF6, 0x24F, 0x248, 0x247, 0x249, 0x246, 0x23F);
+ tag(trs, "GYM8", 0x265, 0x80, 0x1F6, 0x73, 0x81, 0x76, 0x82, 0x12D, 0x83, 0x266);
+
+ // Gym Leaders + Emerald Rematches!
+ tag(trs, "GYM1-LEADER", 0x109, 0x302, 0x303, 0x304, 0x305);
+ tag(trs, "GYM2-LEADER", 0x10A, 0x306, 0x307, 0x308, 0x309);
+ tag(trs, "GYM3-LEADER", 0x10B, 0x30A, 0x30B, 0x30C, 0x30D);
+ tag(trs, "GYM4-LEADER", 0x10C, 0x30E, 0x30F, 0x310, 0x311);
+ tag(trs, "GYM5-LEADER", 0x10D, 0x312, 0x313, 0x314, 0x315);
+ tag(trs, "GYM6-LEADER", 0x10E, 0x316, 0x317, 0x318, 0x319);
+ tag(trs, "GYM7-LEADER", 0x10F, 0x31A, 0x31B, 0x31C, 0x31D);
+ tag(trs, "GYM8-LEADER", 0x110, 0x31E, 0x31F, 0x320, 0x321);
+
+ // Elite 4
+ tag(trs, 0x105, "ELITE1");
+ tag(trs, 0x106, "ELITE2");
+ tag(trs, 0x107, "ELITE3");
+ tag(trs, 0x108, "ELITE4");
+ tag(trs, 0x14F, "CHAMPION");
+
+ // Brendan
+ tag(trs, 0x208, "RIVAL1-2");
+ tag(trs, 0x20B, "RIVAL1-0");
+ tag(trs, 0x20E, "RIVAL1-1");
+
+ tag(trs, 0x251, "RIVAL2-2");
+ tag(trs, 0x250, "RIVAL2-0");
+ tag(trs, 0x257, "RIVAL2-1");
+
+ tag(trs, 0x209, "RIVAL3-2");
+ tag(trs, 0x20C, "RIVAL3-0");
+ tag(trs, 0x20F, "RIVAL3-1");
+
+ tag(trs, 0x20A, "RIVAL4-2");
+ tag(trs, 0x20D, "RIVAL4-0");
+ tag(trs, 0x210, "RIVAL4-1");
+
+ tag(trs, 0x295, "RIVAL5-2");
+ tag(trs, 0x296, "RIVAL5-0");
+ tag(trs, 0x297, "RIVAL5-1");
+
+ // May
+ tag(trs, 0x211, "RIVAL1-2");
+ tag(trs, 0x214, "RIVAL1-0");
+ tag(trs, 0x217, "RIVAL1-1");
+
+ tag(trs, 0x258, "RIVAL2-2");
+ tag(trs, 0x300, "RIVAL2-0");
+ tag(trs, 0x301, "RIVAL2-1");
+
+ tag(trs, 0x212, "RIVAL3-2");
+ tag(trs, 0x215, "RIVAL3-0");
+ tag(trs, 0x218, "RIVAL3-1");
+
+ tag(trs, 0x213, "RIVAL4-2");
+ tag(trs, 0x216, "RIVAL4-0");
+ tag(trs, 0x219, "RIVAL4-1");
+
+ tag(trs, 0x298, "RIVAL5-2");
+ tag(trs, 0x299, "RIVAL5-0");
+ tag(trs, 0x29A, "RIVAL5-1");
+
+ // Themed
+ tag(trs, "THEMED:MAXIE-LEADER", 0x259, 0x25A, 0x2DE);
+ tag(trs, "THEMED:TABITHA-STRONG", 0x202, 0x255, 0x2DC);
+ tag(trs, "THEMED:ARCHIE-LEADER", 0x22);
+ tag(trs, "THEMED:MATT-STRONG", 0x1E);
+ tag(trs, "THEMED:SHELLY-STRONG", 0x20, 0x21);
+ tag(trs, "THEMED:WALLY-STRONG", 0x207, 0x290, 0x291, 0x292, 0x293, 0x294);
+
+ // Steven
+ tag(trs, emMeteorFallsStevenIndex, "UBER");
+
+ }
+
+ public static void trainerTagsFRLG(List<Trainer> trs) {
+
+ // Gym Trainers
+ tag(trs, "GYM1", 0x8E);
+ tag(trs, "GYM2", 0xEA, 0x96);
+ tag(trs, "GYM3", 0xDC, 0x8D, 0x1A7);
+ tag(trs, "GYM4", 0x10A, 0x84, 0x109, 0xA0, 0x192, 0x10B, 0x85);
+ tag(trs, "GYM5", 0x125, 0x124, 0x120, 0x127, 0x126, 0x121);
+ tag(trs, "GYM6", 0x11A, 0x119, 0x1CF, 0x11B, 0x1CE, 0x1D0, 0x118);
+ tag(trs, "GYM7", 0xD5, 0xB1, 0xB2, 0xD6, 0xB3, 0xD7, 0xB4);
+ tag(trs, "GYM8", 0x129, 0x143, 0x188, 0x190, 0x142, 0x128, 0x191, 0x144);
+
+ // Gym Leaders
+ tag(trs, 0x19E, "GYM1-LEADER");
+ tag(trs, 0x19F, "GYM2-LEADER");
+ tag(trs, 0x1A0, "GYM3-LEADER");
+ tag(trs, 0x1A1, "GYM4-LEADER");
+ tag(trs, 0x1A2, "GYM5-LEADER");
+ tag(trs, 0x1A4, "GYM6-LEADER");
+ tag(trs, 0x1A3, "GYM7-LEADER");
+ tag(trs, 0x15E, "GYM8-LEADER");
+
+ // Giovanni
+ tag(trs, 0x15C, "GIO1-LEADER");
+ tag(trs, 0x15D, "GIO2-LEADER");
+
+ // E4 Round 1
+ tag(trs, 0x19A, "ELITE1-1");
+ tag(trs, 0x19B, "ELITE2-1");
+ tag(trs, 0x19C, "ELITE3-1");
+ tag(trs, 0x19D, "ELITE4-1");
+
+ // E4 Round 2
+ tag(trs, 0x2DF, "ELITE1-2");
+ tag(trs, 0x2E0, "ELITE2-2");
+ tag(trs, 0x2E1, "ELITE3-2");
+ tag(trs, 0x2E2, "ELITE4-2");
+
+ // Rival Battles
+
+ // Initial Rival
+ tag(trs, 0x148, "RIVAL1-0");
+ tag(trs, 0x146, "RIVAL1-1");
+ tag(trs, 0x147, "RIVAL1-2");
+
+ // Route 22 (weak)
+ tag(trs, 0x14B, "RIVAL2-0");
+ tag(trs, 0x149, "RIVAL2-1");
+ tag(trs, 0x14A, "RIVAL2-2");
+
+ // Cerulean
+ tag(trs, 0x14E, "RIVAL3-0");
+ tag(trs, 0x14C, "RIVAL3-1");
+ tag(trs, 0x14D, "RIVAL3-2");
+
+ // SS Anne
+ tag(trs, 0x1AC, "RIVAL4-0");
+ tag(trs, 0x1AA, "RIVAL4-1");
+ tag(trs, 0x1AB, "RIVAL4-2");
+
+ // Pokemon Tower
+ tag(trs, 0x1AF, "RIVAL5-0");
+ tag(trs, 0x1AD, "RIVAL5-1");
+ tag(trs, 0x1AE, "RIVAL5-2");
+
+ // Silph Co
+ tag(trs, 0x1B2, "RIVAL6-0");
+ tag(trs, 0x1B0, "RIVAL6-1");
+ tag(trs, 0x1B1, "RIVAL6-2");
+
+ // Route 22 (strong)
+ tag(trs, 0x1B5, "RIVAL7-0");
+ tag(trs, 0x1B3, "RIVAL7-1");
+ tag(trs, 0x1B4, "RIVAL7-2");
+
+ // E4 Round 1
+ tag(trs, 0x1B8, "RIVAL8-0");
+ tag(trs, 0x1B6, "RIVAL8-1");
+ tag(trs, 0x1B7, "RIVAL8-2");
+
+ // E4 Round 2
+ tag(trs, 0x2E5, "RIVAL9-0");
+ tag(trs, 0x2E3, "RIVAL9-1");
+ tag(trs, 0x2E4, "RIVAL9-2");
+
+ }
+
+ private static void tag(List<Trainer> trainers, int trainerNum, String tag) {
+ trainers.get(trainerNum - 1).tag = tag;
+ }
+
+ private static void tag(List<Trainer> allTrainers, String tag, int... numbers) {
+ for (int num : numbers) {
+ allTrainers.get(num - 1).tag = tag;
+ }
+ }
+
+ public static void setMultiBattleStatusEm(List<Trainer> trs) {
+ // 25 + 569: Double Battle with Team Aqua Grunts on Mt. Pyre
+ // 105 + 237: Double Battle with Hex Maniac Patricia and Psychic Joshua
+ // 397 + 508: Double Battle with Dragon Tamer Aaron and Cooltrainer Marley
+ // 404 + 654: Double Battle with Bird Keeper Edwardo and Camper Flint
+ // 504 + 505: Double Battle with Ninja Boy Jonas and Parasol Lady Kayley
+ // 514 + 734: Double Battle with Tabitha and Maxie in Mossdeep Space Center
+ // 572 + 573: Double Battle with Sailor Brenden and Battle Girl Lilith
+ // 721 + 730: Double Battle with Team Magma Grunts in Team Magma Hideout
+ // 848 + 850: Double Battle with Psychic Mariela and Gentleman Everett
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.ALWAYS, 25, 105, 237, 397, 404, 504, 505, 508, 514,
+ 569, 572, 573, 654, 721, 730, 734, 848, 850
+ );
+
+ // 1 + 124: Potential Double Battle with Hiker Sawyer and Beauty Melissa
+ // 3 + 192: Potential Double Battle with Team Aqua Grunts in Team Aqua Hideout
+ // 8 + 14: Potential Double Battle with Team Aqua Grunts in Seafloor Cavern
+ // 9 + 236 + 247: Potential Double Battle with Pokemon Breeder Gabrielle, Psychic William, and Psychic Kayla
+ // 11 + 767: Potential Double Battle with Cooltrainer Marcel and Cooltrainer Cristin
+ // 12 + 195: Potential Double Battle with Bird Keeper Alberto and Guitarist Fernando
+ // 13 + 106: Potential Double Battle with Collector Ed and Hex Maniac Kindra
+ // 15 + 450: Potential Double Battle with Swimmer Declan and Swimmer Grace
+ // 18 + 596: Potential Double Battle with Team Aqua Grunts in Weather Institute
+ // 28 + 193: Potential Double Battle with Team Aqua Grunts in Team Aqua Hideout
+ // 29 + 249: Potential Double Battle with Expert Fredrick and Psychic Jacki
+ // 31 + 35 + 145: Potential Double Battles with Black Belt Zander, Hex Maniac Leah, and PokéManiac Mark
+ // 33 + 567: Potential Double Battle with Shelly and Team Aqua Grunt in Seafloor Cavern
+ // 37 + 715: Potential Double Battle with Aroma Lady Rose and Youngster Deandre
+ // 38 + 417: Potential Double Battle with Cooltrainer Felix and Cooltrainer Dianne
+ // 57 + 698: Potential Double Battle with Tuber Lola and Tuber Chandler
+ // 64 + 491 + 697: Potential Double Battles with Tuber Ricky, Sailor Edmond, and Tuber Hailey
+ // 107 + 764: Potential Double Battle with Hex Maniac Tammy and Bug Maniac Cale
+ // 108 + 475: Potential Double Battle with Hex Maniac Valerie and Psychic Cedric
+ // 115 + 502: Potential Double Battle with Lady Daphne and Pokéfan Annika
+ // 118 + 129: Potential Double Battle with Lady Brianna and Beauty Bridget
+ // 130 + 301: Potential Double Battle with Beauty Olivia and Pokéfan Bethany
+ // 131 + 614: Potential Double Battle with Beauty Tiffany and Lass Crissy
+ // 137 + 511: Potential Double Battle with Expert Mollie and Expert Conor
+ // 144 + 375: Potential Double Battle with Beauty Thalia and Youngster Demetrius
+ // 146 + 579: Potential Double Battle with Team Magma Grunts on Mt. Chimney
+ // 160 + 595: Potential Double Battle with Swimmer Roland and Triathlete Isabella
+ // 168 + 455: Potential Double Battle with Swimmer Santiago and Swimmer Katie
+ // 170 + 460: Potential Double Battle with Swimmer Franklin and Swimmer Debra
+ // 171 + 385: Potential Double Battle with Swimmer Kevin and Triathlete Taila
+ // 180 + 509: Potential Double Battle with Black Belt Hitoshi and Battle Girl Reyna
+ // 182 + 307 + 748 + 749: Potential Double Battles with Black Belt Koichi, Expert Timothy, Triathlete Kyra, and Ninja Boy Jaiden
+ // 191 + 649: Potential Double Battle with Guitarist Kirk and Battle Girl Vivian
+ // 194 + 802: Potential Double Battle with Guitarist Shawn and Bug Maniac Angelo
+ // 201 + 648: Potential Double Battle with Kindler Cole and Cooltrainer Gerald
+ // 204 + 501: Potential Double Battle with Kindler Jace and Hiker Eli
+ // 217 + 566: Potential Double Battle with Picnicker Autumn and Triathlete Julio
+ // 232 + 701: Potential Double Battle with Psychic Edward and Triathlete Alyssa
+ // 233 + 246: Potential Double Battle with Psychic Preston and Psychic Maura
+ // 234 + 244 + 575 + 582: Potential Double Battles with Psychic Virgil, Psychic Hannah, Hex Maniac Sylvia, and Gentleman Nate
+ // 235 + 245: Potential Double Battle with Psychic Blake and Psychic Samantha
+ // 248 + 849: Potential Double Battle with Psychic Alexis and Psychic Alvaro
+ // 273 + 605: Potential Double Battle with School Kid Jerry and Lass Janice
+ // 302 + 699: Potential Double Battle with Pokéfan Isabel and Pokéfan Kaleb
+ // 321 + 571: Potential Double Battle with Youngster Tommy and Hiker Marc
+ // 324 + 325: Potential Double Battle with Cooltrainer Quincy and Cooltrainer Katelynn
+ // 345 + 742: Potential Double Battle with Fisherman Carter and Bird Keeper Elijah
+ // 377 + 459: Potential Double Battle with Triathlete Pablo and Swimmer Sienna
+ // 383 + 576: Potential Double Battle with Triathlete Isobel and Swimmer Leonardo
+ // 400 + 761: Potential Double Battle with Bird Keeper Phil and Parasol Lady Rachel
+ // 401 + 655: Potential Double Battle with Bird Keeper Jared and Picnicker Ashley
+ // 403 + 506: Potential Double Battle with Bird Keeper Presley and Expert Auron
+ // 413 + 507: Potential Double Battle with Bird Keeper Alex and Sailor Kelvin
+ // 415 + 759: Potential Double Battle with Ninja Boy Yasu and Guitarist Fabian
+ // 416 + 760: Potential Double Battle with Ninja Boy Takashi and Kindler Dayton
+ // 418 + 547: Potential Double Battle with Tuber Jani and Ruin Maniac Garrison
+ // 420 + 710 + 711: Potential Double Battles with Ninja Boy Lung, Camper Lawrence, and PokéManiac Wyatt
+ // 436 + 762: Potential Double Battle with Parasol Lady Angelica and Cooltrainer Leonel
+ // 445 + 739: Potential Double Battle with Swimmer Beth and Triathlete Camron
+ // 464 + 578: Potential Double Battle with Swimmer Carlee and Swimmer Harrison
+ // 494 + 495: Potential Double Battle with Sailor Phillip and Sailor Leonard (S.S. Tidal)
+ // 503 + 539: Potential Double Battle with Cooltrainer Jazmyn and Bug Catcher Davis
+ // 512 + 700: Potential Double Battle with Collector Edwin and Guitarist Joseph
+ // 513 + 752: Potential Double Battle with Collector Hector and Psychic Marlene
+ // 540 + 546: Potential Double Battle with Cooltrainer Mitchell and Cooltrainer Halle
+ // 577 + 674: Potential Double Battle with Cooltrainer Athena and Bird Keeper Aidan
+ // 580 + 676: Potential Double Battle with Swimmer Clarence and Swimmer Tisha
+ // 583 + 584 + 585 + 591: Potential Double Battles with Hex Maniac Kathleen, Gentleman Clifford, Psychic Nicholas, and Psychic Macey
+ // 594 + 733: Potential Double Battle with Expert Paxton and Cooltrainer Darcy
+ // 598 + 758: Potential Double Battle with Cooltrainer Jonathan and Expert Makayla
+ // 629 + 712: Potential Double Battle with Hiker Lucas and Picnicker Angelina
+ // 631 + 753 + 754: Potential Double Battles with Hiker Clark, Hiker Devan, and Youngster Johnson
+ // 653 + 763: Potential Double Battle with Ninja Boy Riley and Battle Girl Callie
+ // 694 + 695: Potential Double Battle with Rich Boy Dawson and Lady Sarah
+ // 702 + 703: Potential Double Battle with Guitarist Marcos and Black Belt Rhett
+ // 704 + 705: Potential Double Battle with Camper Tyron and Aroma Lady Celina
+ // 706 + 707: Potential Double Battle with Picnicker Bianca and Kindler Hayden
+ // 708 + 709: Potential Double Battle with Picnicker Sophie and Bird Keeper Coby
+ // 713 + 714: Potential Double Battle with Fisherman Kai and Picnicker Charlotte
+ // 719 + 720: Potential Double Battle with Team Magma Grunts in Team Magma Hideout
+ // 727 + 728: Potential Double Battle with Team Magma Grunts in Team Magma Hideout
+ // 735 + 736: Potential Double Battle with Swimmer Pete and Swimmer Isabelle
+ // 737 + 738: Potential Double Battle with Ruin Maniac Andres and Bird Keeper Josue
+ // 740 + 741: Potential Double Battle with Sailor Cory and Cooltrainer Carolina
+ // 743 + 744 + 745: Potential Double Battles with Picnicker Celia, Ruin Maniac Bryan, and Camper Branden
+ // 746 + 747: Potential Double Battle with Kindler Bryant and Aroma Lady Shayla
+ // 750 + 751: Potential Double Battle with Psychic Alix and Battle Girl Helene
+ // 755 + 756 + 757: Potential Double Battles with Triathlete Melina, Psychic Brandi, and Battle Girl Aisha
+ // 765 + 766: Potential Double Battle with Pokémon Breeder Myles and Pokémon Breeder Pat
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.POTENTIAL, 1, 3, 8, 9, 11, 12, 13, 14, 15, 18, 28,
+ 29, 31, 33, 35, 37, 38, 57, 64, 106, 107, 108, 115, 118, 124, 129, 130, 131, 137, 144, 145, 146, 160,
+ 168, 170, 171, 180, 182, 191, 192, 193, 194, 195, 201, 204, 217, 232, 233, 234, 235, 236, 244, 245, 246,
+ 247, 248, 249, 273, 301, 302, 307, 321, 324, 325, 345, 375, 377, 383, 385, 400, 401, 403, 413, 415, 416,
+ 417, 418, 420, 436, 445, 450, 455, 459, 460, 464, 475, 491, 494, 495, 501, 502, 503, 506, 507, 509, 511,
+ 512, 513, 539, 540, 546, 547, 566, 567, 571, 575, 576, 577, 578, 579, 580, 582, 583, 584, 585, 591, 594,
+ 595, 596, 598, 605, 614, 629, 631, 648, 649, 653, 655, 674, 676, 694, 695, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 719, 720, 727, 728, 733, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758,
+ 759, 760, 761, 762, 763, 764, 765, 766, 767, 802, 849
+ );
+ }
+
+ private static void setMultiBattleStatus(List<Trainer> allTrainers, Trainer.MultiBattleStatus status, int... numbers) {
+ for (int num : numbers) {
+ if (allTrainers.size() > (num - 1)) {
+ allTrainers.get(num - 1).multiBattleStatus = status;
+ }
+ }
+ }
+
+ public static final Map<Integer,Integer> balancedItemPrices = Stream.of(new Integer[][] {
+ // Skip item index 0. All prices divided by 10
+ {Gen3Items.masterBall, 300},
+ {Gen3Items.ultraBall, 120},
+ {Gen3Items.greatBall, 60},
+ {Gen3Items.pokeBall, 20},
+ {Gen3Items.safariBall, 50},
+ {Gen3Items.netBall, 100},
+ {Gen3Items.diveBall, 100},
+ {Gen3Items.nestBall, 100},
+ {Gen3Items.repeatBall, 100},
+ {Gen3Items.timerBall, 100},
+ {Gen3Items.luxuryBall, 100},
+ {Gen3Items.premierBall, 20},
+ {Gen3Items.potion, 30},
+ {Gen3Items.antidote, 10},
+ {Gen3Items.burnHeal, 25},
+ {Gen3Items.iceHeal, 25},
+ {Gen3Items.awakening, 25},
+ {Gen3Items.parlyzHeal, 20},
+ {Gen3Items.fullRestore, 300},
+ {Gen3Items.maxPotion, 250},
+ {Gen3Items.hyperPotion, 120},
+ {Gen3Items.superPotion, 70},
+ {Gen3Items.fullHeal, 60},
+ {Gen3Items.revive, 150},
+ {Gen3Items.maxRevive, 400},
+ {Gen3Items.freshWater, 40},
+ {Gen3Items.sodaPop, 60},
+ {Gen3Items.lemonade, 70},
+ {Gen3Items.moomooMilk, 80},
+ {Gen3Items.energyPowder, 40},
+ {Gen3Items.energyRoot, 110},
+ {Gen3Items.healPowder, 45},
+ {Gen3Items.revivalHerb, 280},
+ {Gen3Items.ether, 300},
+ {Gen3Items.maxEther, 450},
+ {Gen3Items.elixir, 1500},
+ {Gen3Items.maxElixir, 1800},
+ {Gen3Items.lavaCookie, 45},
+ {Gen3Items.blueFlute, 2},
+ {Gen3Items.yellowFlute, 2},
+ {Gen3Items.redFlute, 2},
+ {Gen3Items.blackFlute, 2},
+ {Gen3Items.whiteFlute, 2},
+ {Gen3Items.berryJuice, 10},
+ {Gen3Items.sacredAsh, 1000},
+ {Gen3Items.shoalSalt, 2},
+ {Gen3Items.shoalShell, 2},
+ {Gen3Items.redShard, 40},
+ {Gen3Items.blueShard, 40},
+ {Gen3Items.yellowShard, 40},
+ {Gen3Items.greenShard, 40},
+ {Gen3Items.unknown52, 0},
+ {Gen3Items.unknown53, 0},
+ {Gen3Items.unknown54, 0},
+ {Gen3Items.unknown55, 0},
+ {Gen3Items.unknown56, 0},
+ {Gen3Items.unknown57, 0},
+ {Gen3Items.unknown58, 0},
+ {Gen3Items.unknown59, 0},
+ {Gen3Items.unknown60, 0},
+ {Gen3Items.unknown61, 0},
+ {Gen3Items.unknown62, 0},
+ {Gen3Items.hpUp, 980},
+ {Gen3Items.protein, 980},
+ {Gen3Items.iron, 980},
+ {Gen3Items.carbos, 980},
+ {Gen3Items.calcium, 980},
+ {Gen3Items.rareCandy, 1000},
+ {Gen3Items.ppUp, 980},
+ {Gen3Items.zinc, 980},
+ {Gen3Items.ppMax, 2490},
+ {Gen3Items.unknown72, 0},
+ {Gen3Items.guardSpec, 70},
+ {Gen3Items.direHit, 65},
+ {Gen3Items.xAttack, 50},
+ {Gen3Items.xDefend, 55},
+ {Gen3Items.xSpeed, 35},
+ {Gen3Items.xAccuracy, 95},
+ {Gen3Items.xSpecial, 35},
+ {Gen3Items.pokeDoll, 100},
+ {Gen3Items.fluffyTail, 100},
+ {Gen3Items.unknown82, 0},
+ {Gen3Items.superRepel, 50},
+ {Gen3Items.maxRepel, 70},
+ {Gen3Items.escapeRope, 55},
+ {Gen3Items.repel, 35},
+ {Gen3Items.unknown87, 0},
+ {Gen3Items.unknown88, 0},
+ {Gen3Items.unknown89, 0},
+ {Gen3Items.unknown90, 0},
+ {Gen3Items.unknown91, 0},
+ {Gen3Items.unknown92, 0},
+ {Gen3Items.sunStone, 300},
+ {Gen3Items.moonStone, 300},
+ {Gen3Items.fireStone, 300},
+ {Gen3Items.thunderstone, 300},
+ {Gen3Items.waterStone, 300},
+ {Gen3Items.leafStone, 300},
+ {Gen3Items.unknown99, 0},
+ {Gen3Items.unknown100, 0},
+ {Gen3Items.unknown101, 0},
+ {Gen3Items.unknown102, 0},
+ {Gen3Items.tinyMushroom, 50},
+ {Gen3Items.bigMushroom, 500},
+ {Gen3Items.unknown105, 0},
+ {Gen3Items.pearl, 140},
+ {Gen3Items.bigPearl, 750},
+ {Gen3Items.stardust, 200},
+ {Gen3Items.starPiece, 980},
+ {Gen3Items.nugget, 1000},
+ {Gen3Items.heartScale, 500},
+ {Gen3Items.unknown112, 0},
+ {Gen3Items.unknown113, 0},
+ {Gen3Items.unknown114, 0},
+ {Gen3Items.unknown115, 0},
+ {Gen3Items.unknown116, 0},
+ {Gen3Items.unknown117, 0},
+ {Gen3Items.unknown118, 0},
+ {Gen3Items.unknown119, 0},
+ {Gen3Items.unknown120, 0},
+ {Gen3Items.orangeMail, 5},
+ {Gen3Items.harborMail, 5},
+ {Gen3Items.glitterMail, 5},
+ {Gen3Items.mechMail, 5},
+ {Gen3Items.woodMail, 5},
+ {Gen3Items.waveMail, 5},
+ {Gen3Items.beadMail, 5},
+ {Gen3Items.shadowMail, 5},
+ {Gen3Items.tropicMail, 5},
+ {Gen3Items.dreamMail, 5},
+ {Gen3Items.fabMail, 5},
+ {Gen3Items.retroMail, 5},
+ {Gen3Items.cheriBerry, 20},
+ {Gen3Items.chestoBerry, 25},
+ {Gen3Items.pechaBerry, 10},
+ {Gen3Items.rawstBerry, 25},
+ {Gen3Items.aspearBerry, 25},
+ {Gen3Items.leppaBerry, 300},
+ {Gen3Items.oranBerry, 5},
+ {Gen3Items.persimBerry, 20},
+ {Gen3Items.lumBerry, 50},
+ {Gen3Items.sitrusBerry, 50},
+ {Gen3Items.figyBerry, 10},
+ {Gen3Items.wikiBerry, 10},
+ {Gen3Items.magoBerry, 10},
+ {Gen3Items.aguavBerry, 10},
+ {Gen3Items.iapapaBerry, 10},
+ {Gen3Items.razzBerry, 50},
+ {Gen3Items.blukBerry, 50},
+ {Gen3Items.nanabBerry, 50},
+ {Gen3Items.wepearBerry, 50},
+ {Gen3Items.pinapBerry, 50},
+ {Gen3Items.pomegBerry, 50},
+ {Gen3Items.kelpsyBerry, 50},
+ {Gen3Items.qualotBerry, 50},
+ {Gen3Items.hondewBerry, 50},
+ {Gen3Items.grepaBerry, 50},
+ {Gen3Items.tamatoBerry, 50},
+ {Gen3Items.cornnBerry, 50},
+ {Gen3Items.magostBerry, 50},
+ {Gen3Items.rabutaBerry, 50},
+ {Gen3Items.nomelBerry, 50},
+ {Gen3Items.spelonBerry, 50},
+ {Gen3Items.pamtreBerry, 50},
+ {Gen3Items.watmelBerry, 50},
+ {Gen3Items.durinBerry, 50},
+ {Gen3Items.belueBerry, 50},
+ {Gen3Items.liechiBerry, 100},
+ {Gen3Items.ganlonBerry, 100},
+ {Gen3Items.salacBerry, 100},
+ {Gen3Items.petayaBerry, 100},
+ {Gen3Items.apicotBerry, 100},
+ {Gen3Items.lansatBerry, 100},
+ {Gen3Items.starfBerry, 100},
+ {Gen3Items.enigmaBerry, 100},
+ {Gen3Items.unknown176, 0},
+ {Gen3Items.unknown177, 0},
+ {Gen3Items.unknown178, 0},
+ {Gen3Items.brightPowder, 300},
+ {Gen3Items.whiteHerb, 100},
+ {Gen3Items.machoBrace, 300},
+ {Gen3Items.expShare, 600},
+ {Gen3Items.quickClaw, 450},
+ {Gen3Items.sootheBell, 100},
+ {Gen3Items.mentalHerb, 100},
+ {Gen3Items.choiceBand, 1000},
+ {Gen3Items.kingsRock, 500},
+ {Gen3Items.silverPowder, 200},
+ {Gen3Items.amuletCoin, 1500},
+ {Gen3Items.cleanseTag, 100},
+ {Gen3Items.soulDew, 20},
+ {Gen3Items.deepSeaTooth, 300},
+ {Gen3Items.deepSeaScale, 300},
+ {Gen3Items.smokeBall, 20},
+ {Gen3Items.everstone, 20},
+ {Gen3Items.focusBand, 300},
+ {Gen3Items.luckyEgg, 1000},
+ {Gen3Items.scopeLens, 500},
+ {Gen3Items.metalCoat, 300},
+ {Gen3Items.leftovers, 1000},
+ {Gen3Items.dragonScale, 300},
+ {Gen3Items.lightBall, 10},
+ {Gen3Items.softSand, 200},
+ {Gen3Items.hardStone, 200},
+ {Gen3Items.miracleSeed, 200},
+ {Gen3Items.blackGlasses, 200},
+ {Gen3Items.blackBelt, 200},
+ {Gen3Items.magnet, 200},
+ {Gen3Items.mysticWater, 200},
+ {Gen3Items.sharpBeak, 200},
+ {Gen3Items.poisonBarb, 200},
+ {Gen3Items.neverMeltIce, 200},
+ {Gen3Items.spellTag, 200},
+ {Gen3Items.twistedSpoon, 200},
+ {Gen3Items.charcoal, 200},
+ {Gen3Items.dragonFang, 200},
+ {Gen3Items.silkScarf, 200},
+ {Gen3Items.upGrade, 300},
+ {Gen3Items.shellBell, 600},
+ {Gen3Items.seaIncense, 200},
+ {Gen3Items.laxIncense, 300},
+ {Gen3Items.luckyPunch, 1},
+ {Gen3Items.metalPowder, 1},
+ {Gen3Items.thickClub, 50},
+ {Gen3Items.stick, 20},
+ {Gen3Items.unknown226, 0},
+ {Gen3Items.unknown227, 0},
+ {Gen3Items.unknown228, 0},
+ {Gen3Items.unknown229, 0},
+ {Gen3Items.unknown230, 0},
+ {Gen3Items.unknown231, 0},
+ {Gen3Items.unknown232, 0},
+ {Gen3Items.unknown233, 0},
+ {Gen3Items.unknown234, 0},
+ {Gen3Items.unknown235, 0},
+ {Gen3Items.unknown236, 0},
+ {Gen3Items.unknown237, 0},
+ {Gen3Items.unknown238, 0},
+ {Gen3Items.unknown239, 0},
+ {Gen3Items.unknown240, 0},
+ {Gen3Items.unknown241, 0},
+ {Gen3Items.unknown242, 0},
+ {Gen3Items.unknown243, 0},
+ {Gen3Items.unknown244, 0},
+ {Gen3Items.unknown245, 0},
+ {Gen3Items.unknown246, 0},
+ {Gen3Items.unknown247, 0},
+ {Gen3Items.unknown248, 0},
+ {Gen3Items.unknown249, 0},
+ {Gen3Items.unknown250, 0},
+ {Gen3Items.unknown251, 0},
+ {Gen3Items.unknown252, 0},
+ {Gen3Items.unknown253, 0},
+ {Gen3Items.redScarf, 10},
+ {Gen3Items.blueScarf, 10},
+ {Gen3Items.pinkScarf, 10},
+ {Gen3Items.greenScarf, 10},
+ {Gen3Items.yellowScarf, 10},
+ {Gen3Items.machBike, 0},
+ {Gen3Items.coinCase, 0},
+ {Gen3Items.itemfinder, 0},
+ {Gen3Items.oldRod, 0},
+ {Gen3Items.goodRod, 0},
+ {Gen3Items.superRod, 0},
+ {Gen3Items.ssTicket, 0},
+ {Gen3Items.contestPass, 0},
+ {Gen3Items.unknown267, 0},
+ {Gen3Items.wailmerPail, 0},
+ {Gen3Items.devonGoods, 0},
+ {Gen3Items.sootSack, 0},
+ {Gen3Items.basementKey, 0},
+ {Gen3Items.acroBike, 0},
+ {Gen3Items.pokeblockCase, 0},
+ {Gen3Items.letter, 0},
+ {Gen3Items.eonTicket, 0},
+ {Gen3Items.redOrb, 0},
+ {Gen3Items.blueOrb, 0},
+ {Gen3Items.scanner, 0},
+ {Gen3Items.goGoggles, 0},
+ {Gen3Items.meteorite, 0},
+ {Gen3Items.rm1Key, 0},
+ {Gen3Items.rm2Key, 0},
+ {Gen3Items.rm4Key, 0},
+ {Gen3Items.rm6Key, 0},
+ {Gen3Items.storageKey, 0},
+ {Gen3Items.rootFossil, 0},
+ {Gen3Items.clawFossil, 0},
+ {Gen3Items.devonScope, 0},
+ {Gen3Items.tm01, 300},
+ {Gen3Items.tm02, 300},
+ {Gen3Items.tm03, 300},
+ {Gen3Items.tm04, 150},
+ {Gen3Items.tm05, 100},
+ {Gen3Items.tm06, 300},
+ {Gen3Items.tm07, 200},
+ {Gen3Items.tm08, 150},
+ {Gen3Items.tm09, 200},
+ {Gen3Items.tm10, 200},
+ {Gen3Items.tm11, 200},
+ {Gen3Items.tm12, 150},
+ {Gen3Items.tm13, 300},
+ {Gen3Items.tm14, 550},
+ {Gen3Items.tm15, 750},
+ {Gen3Items.tm16, 200},
+ {Gen3Items.tm17, 200},
+ {Gen3Items.tm18, 200},
+ {Gen3Items.tm19, 300},
+ {Gen3Items.tm20, 200},
+ {Gen3Items.tm21, 100},
+ {Gen3Items.tm22, 300},
+ {Gen3Items.tm23, 300},
+ {Gen3Items.tm24, 300},
+ {Gen3Items.tm25, 550},
+ {Gen3Items.tm26, 300},
+ {Gen3Items.tm27, 100},
+ {Gen3Items.tm28, 200},
+ {Gen3Items.tm29, 300},
+ {Gen3Items.tm30, 300},
+ {Gen3Items.tm31, 300},
+ {Gen3Items.tm32, 100},
+ {Gen3Items.tm33, 200},
+ {Gen3Items.tm34, 300},
+ {Gen3Items.tm35, 300},
+ {Gen3Items.tm36, 300},
+ {Gen3Items.tm37, 200},
+ {Gen3Items.tm38, 550},
+ {Gen3Items.tm39, 200},
+ {Gen3Items.tm40, 300},
+ {Gen3Items.tm41, 150},
+ {Gen3Items.tm42, 300},
+ {Gen3Items.tm43, 200},
+ {Gen3Items.tm44, 300},
+ {Gen3Items.tm45, 300},
+ {Gen3Items.tm46, 200},
+ {Gen3Items.tm47, 300},
+ {Gen3Items.tm48, 300},
+ {Gen3Items.tm49, 150},
+ {Gen3Items.tm50, 550},
+ {Gen3Items.hm01, 0},
+ {Gen3Items.hm02, 0},
+ {Gen3Items.hm03, 0},
+ {Gen3Items.hm04, 0},
+ {Gen3Items.hm05, 0},
+ {Gen3Items.hm06, 0},
+ {Gen3Items.hm07, 0},
+ {Gen3Items.hm08, 0},
+ {Gen3Items.unknown347, 0},
+ {Gen3Items.unknown348, 0},
+ {Gen3Items.oaksParcel, 0},
+ {Gen3Items.pokeFlute, 0},
+ {Gen3Items.secretKey, 0},
+ {Gen3Items.bikeVoucher, 0},
+ {Gen3Items.goldTeeth, 0},
+ {Gen3Items.oldAmber, 0},
+ {Gen3Items.cardKey, 0},
+ {Gen3Items.liftKey, 0},
+ {Gen3Items.helixFossil, 0},
+ {Gen3Items.domeFossil, 0},
+ {Gen3Items.silphScope, 0},
+ {Gen3Items.bicycle, 0},
+ {Gen3Items.townMap, 0},
+ {Gen3Items.vsSeeker, 0},
+ {Gen3Items.fameChecker, 0},
+ {Gen3Items.tmCase, 0},
+ {Gen3Items.berryPouch, 0},
+ {Gen3Items.teachyTV, 0},
+ {Gen3Items.triPass, 0},
+ {Gen3Items.rainbowPass, 0},
+ {Gen3Items.tea, 0},
+ {Gen3Items.mysticTicket, 0},
+ {Gen3Items.auroraTicket, 0},
+ {Gen3Items.powderJar, 0},
+ {Gen3Items.ruby, 0},
+ {Gen3Items.sapphire, 0},
+ {Gen3Items.magmaEmblem, 0},
+ {Gen3Items.oldSeaMap, 0},
+ }).collect(Collectors.toMap(kv -> kv[0], kv -> kv[1]));
+}
diff --git a/src/com/pkrandom/constants/Gen3Items.java b/src/com/pkrandom/constants/Gen3Items.java
new file mode 100644
index 0000000..8e02916
--- /dev/null
+++ b/src/com/pkrandom/constants/Gen3Items.java
@@ -0,0 +1,410 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Gen3Items.java - defines an index number constant for every item in --*/
+/*-- the Generation 3 games. --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+public class Gen3Items {
+ // https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Generation_III)
+ public static final int nothing = 0;
+ public static final int masterBall = 1;
+ public static final int ultraBall = 2;
+ public static final int greatBall = 3;
+ public static final int pokeBall = 4;
+ public static final int safariBall = 5;
+ public static final int netBall = 6;
+ public static final int diveBall = 7;
+ public static final int nestBall = 8;
+ public static final int repeatBall = 9;
+ public static final int timerBall = 10;
+ public static final int luxuryBall = 11;
+ public static final int premierBall = 12;
+ public static final int potion = 13;
+ public static final int antidote = 14;
+ public static final int burnHeal = 15;
+ public static final int iceHeal = 16;
+ public static final int awakening = 17;
+ public static final int parlyzHeal = 18;
+ public static final int fullRestore = 19;
+ public static final int maxPotion = 20;
+ public static final int hyperPotion = 21;
+ public static final int superPotion = 22;
+ public static final int fullHeal = 23;
+ public static final int revive = 24;
+ public static final int maxRevive = 25;
+ public static final int freshWater = 26;
+ public static final int sodaPop = 27;
+ public static final int lemonade = 28;
+ public static final int moomooMilk = 29;
+ public static final int energyPowder = 30;
+ public static final int energyRoot = 31;
+ public static final int healPowder = 32;
+ public static final int revivalHerb = 33;
+ public static final int ether = 34;
+ public static final int maxEther = 35;
+ public static final int elixir = 36;
+ public static final int maxElixir = 37;
+ public static final int lavaCookie = 38;
+ public static final int blueFlute = 39;
+ public static final int yellowFlute = 40;
+ public static final int redFlute = 41;
+ public static final int blackFlute = 42;
+ public static final int whiteFlute = 43;
+ public static final int berryJuice = 44;
+ public static final int sacredAsh = 45;
+ public static final int shoalSalt = 46;
+ public static final int shoalShell = 47;
+ public static final int redShard = 48;
+ public static final int blueShard = 49;
+ public static final int yellowShard = 50;
+ public static final int greenShard = 51;
+ public static final int unknown52 = 52;
+ public static final int unknown53 = 53;
+ public static final int unknown54 = 54;
+ public static final int unknown55 = 55;
+ public static final int unknown56 = 56;
+ public static final int unknown57 = 57;
+ public static final int unknown58 = 58;
+ public static final int unknown59 = 59;
+ public static final int unknown60 = 60;
+ public static final int unknown61 = 61;
+ public static final int unknown62 = 62;
+ public static final int hpUp = 63;
+ public static final int protein = 64;
+ public static final int iron = 65;
+ public static final int carbos = 66;
+ public static final int calcium = 67;
+ public static final int rareCandy = 68;
+ public static final int ppUp = 69;
+ public static final int zinc = 70;
+ public static final int ppMax = 71;
+ public static final int unknown72 = 72;
+ public static final int guardSpec = 73;
+ public static final int direHit = 74;
+ public static final int xAttack = 75;
+ public static final int xDefend = 76;
+ public static final int xSpeed = 77;
+ public static final int xAccuracy = 78;
+ public static final int xSpecial = 79;
+ public static final int pokeDoll = 80;
+ public static final int fluffyTail = 81;
+ public static final int unknown82 = 82;
+ public static final int superRepel = 83;
+ public static final int maxRepel = 84;
+ public static final int escapeRope = 85;
+ public static final int repel = 86;
+ public static final int unknown87 = 87;
+ public static final int unknown88 = 88;
+ public static final int unknown89 = 89;
+ public static final int unknown90 = 90;
+ public static final int unknown91 = 91;
+ public static final int unknown92 = 92;
+ public static final int sunStone = 93;
+ public static final int moonStone = 94;
+ public static final int fireStone = 95;
+ public static final int thunderstone = 96;
+ public static final int waterStone = 97;
+ public static final int leafStone = 98;
+ public static final int unknown99 = 99;
+ public static final int unknown100 = 100;
+ public static final int unknown101 = 101;
+ public static final int unknown102 = 102;
+ public static final int tinyMushroom = 103;
+ public static final int bigMushroom = 104;
+ public static final int unknown105 = 105;
+ public static final int pearl = 106;
+ public static final int bigPearl = 107;
+ public static final int stardust = 108;
+ public static final int starPiece = 109;
+ public static final int nugget = 110;
+ public static final int heartScale = 111;
+ public static final int unknown112 = 112;
+ public static final int unknown113 = 113;
+ public static final int unknown114 = 114;
+ public static final int unknown115 = 115;
+ public static final int unknown116 = 116;
+ public static final int unknown117 = 117;
+ public static final int unknown118 = 118;
+ public static final int unknown119 = 119;
+ public static final int unknown120 = 120;
+ public static final int orangeMail = 121;
+ public static final int harborMail = 122;
+ public static final int glitterMail = 123;
+ public static final int mechMail = 124;
+ public static final int woodMail = 125;
+ public static final int waveMail = 126;
+ public static final int beadMail = 127;
+ public static final int shadowMail = 128;
+ public static final int tropicMail = 129;
+ public static final int dreamMail = 130;
+ public static final int fabMail = 131;
+ public static final int retroMail = 132;
+ public static final int cheriBerry = 133;
+ public static final int chestoBerry = 134;
+ public static final int pechaBerry = 135;
+ public static final int rawstBerry = 136;
+ public static final int aspearBerry = 137;
+ public static final int leppaBerry = 138;
+ public static final int oranBerry = 139;
+ public static final int persimBerry = 140;
+ public static final int lumBerry = 141;
+ public static final int sitrusBerry = 142;
+ public static final int figyBerry = 143;
+ public static final int wikiBerry = 144;
+ public static final int magoBerry = 145;
+ public static final int aguavBerry = 146;
+ public static final int iapapaBerry = 147;
+ public static final int razzBerry = 148;
+ public static final int blukBerry = 149;
+ public static final int nanabBerry = 150;
+ public static final int wepearBerry = 151;
+ public static final int pinapBerry = 152;
+ public static final int pomegBerry = 153;
+ public static final int kelpsyBerry = 154;
+ public static final int qualotBerry = 155;
+ public static final int hondewBerry = 156;
+ public static final int grepaBerry = 157;
+ public static final int tamatoBerry = 158;
+ public static final int cornnBerry = 159;
+ public static final int magostBerry = 160;
+ public static final int rabutaBerry = 161;
+ public static final int nomelBerry = 162;
+ public static final int spelonBerry = 163;
+ public static final int pamtreBerry = 164;
+ public static final int watmelBerry = 165;
+ public static final int durinBerry = 166;
+ public static final int belueBerry = 167;
+ public static final int liechiBerry = 168;
+ public static final int ganlonBerry = 169;
+ public static final int salacBerry = 170;
+ public static final int petayaBerry = 171;
+ public static final int apicotBerry = 172;
+ public static final int lansatBerry = 173;
+ public static final int starfBerry = 174;
+ public static final int enigmaBerry = 175;
+ public static final int unknown176 = 176;
+ public static final int unknown177 = 177;
+ public static final int unknown178 = 178;
+ public static final int brightPowder = 179;
+ public static final int whiteHerb = 180;
+ public static final int machoBrace = 181;
+ public static final int expShare = 182;
+ public static final int quickClaw = 183;
+ public static final int sootheBell = 184;
+ public static final int mentalHerb = 185;
+ public static final int choiceBand = 186;
+ public static final int kingsRock = 187;
+ public static final int silverPowder = 188;
+ public static final int amuletCoin = 189;
+ public static final int cleanseTag = 190;
+ public static final int soulDew = 191;
+ public static final int deepSeaTooth = 192;
+ public static final int deepSeaScale = 193;
+ public static final int smokeBall = 194;
+ public static final int everstone = 195;
+ public static final int focusBand = 196;
+ public static final int luckyEgg = 197;
+ public static final int scopeLens = 198;
+ public static final int metalCoat = 199;
+ public static final int leftovers = 200;
+ public static final int dragonScale = 201;
+ public static final int lightBall = 202;
+ public static final int softSand = 203;
+ public static final int hardStone = 204;
+ public static final int miracleSeed = 205;
+ public static final int blackGlasses = 206;
+ public static final int blackBelt = 207;
+ public static final int magnet = 208;
+ public static final int mysticWater = 209;
+ public static final int sharpBeak = 210;
+ public static final int poisonBarb = 211;
+ public static final int neverMeltIce = 212;
+ public static final int spellTag = 213;
+ public static final int twistedSpoon = 214;
+ public static final int charcoal = 215;
+ public static final int dragonFang = 216;
+ public static final int silkScarf = 217;
+ public static final int upGrade = 218;
+ public static final int shellBell = 219;
+ public static final int seaIncense = 220;
+ public static final int laxIncense = 221;
+ public static final int luckyPunch = 222;
+ public static final int metalPowder = 223;
+ public static final int thickClub = 224;
+ public static final int stick = 225;
+ public static final int unknown226 = 226;
+ public static final int unknown227 = 227;
+ public static final int unknown228 = 228;
+ public static final int unknown229 = 229;
+ public static final int unknown230 = 230;
+ public static final int unknown231 = 231;
+ public static final int unknown232 = 232;
+ public static final int unknown233 = 233;
+ public static final int unknown234 = 234;
+ public static final int unknown235 = 235;
+ public static final int unknown236 = 236;
+ public static final int unknown237 = 237;
+ public static final int unknown238 = 238;
+ public static final int unknown239 = 239;
+ public static final int unknown240 = 240;
+ public static final int unknown241 = 241;
+ public static final int unknown242 = 242;
+ public static final int unknown243 = 243;
+ public static final int unknown244 = 244;
+ public static final int unknown245 = 245;
+ public static final int unknown246 = 246;
+ public static final int unknown247 = 247;
+ public static final int unknown248 = 248;
+ public static final int unknown249 = 249;
+ public static final int unknown250 = 250;
+ public static final int unknown251 = 251;
+ public static final int unknown252 = 252;
+ public static final int unknown253 = 253;
+ public static final int redScarf = 254;
+ public static final int blueScarf = 255;
+ public static final int pinkScarf = 256;
+ public static final int greenScarf = 257;
+ public static final int yellowScarf = 258;
+ public static final int machBike = 259;
+ public static final int coinCase = 260;
+ public static final int itemfinder = 261;
+ public static final int oldRod = 262;
+ public static final int goodRod = 263;
+ public static final int superRod = 264;
+ public static final int ssTicket = 265;
+ public static final int contestPass = 266;
+ public static final int unknown267 = 267;
+ public static final int wailmerPail = 268;
+ public static final int devonGoods = 269;
+ public static final int sootSack = 270;
+ public static final int basementKey = 271;
+ public static final int acroBike = 272;
+ public static final int pokeblockCase = 273;
+ public static final int letter = 274;
+ public static final int eonTicket = 275;
+ public static final int redOrb = 276;
+ public static final int blueOrb = 277;
+ public static final int scanner = 278;
+ public static final int goGoggles = 279;
+ public static final int meteorite = 280;
+ public static final int rm1Key = 281;
+ public static final int rm2Key = 282;
+ public static final int rm4Key = 283;
+ public static final int rm6Key = 284;
+ public static final int storageKey = 285;
+ public static final int rootFossil = 286;
+ public static final int clawFossil = 287;
+ public static final int devonScope = 288;
+ public static final int tm01 = 289;
+ public static final int tm02 = 290;
+ public static final int tm03 = 291;
+ public static final int tm04 = 292;
+ public static final int tm05 = 293;
+ public static final int tm06 = 294;
+ public static final int tm07 = 295;
+ public static final int tm08 = 296;
+ public static final int tm09 = 297;
+ public static final int tm10 = 298;
+ public static final int tm11 = 299;
+ public static final int tm12 = 300;
+ public static final int tm13 = 301;
+ public static final int tm14 = 302;
+ public static final int tm15 = 303;
+ public static final int tm16 = 304;
+ public static final int tm17 = 305;
+ public static final int tm18 = 306;
+ public static final int tm19 = 307;
+ public static final int tm20 = 308;
+ public static final int tm21 = 309;
+ public static final int tm22 = 310;
+ public static final int tm23 = 311;
+ public static final int tm24 = 312;
+ public static final int tm25 = 313;
+ public static final int tm26 = 314;
+ public static final int tm27 = 315;
+ public static final int tm28 = 316;
+ public static final int tm29 = 317;
+ public static final int tm30 = 318;
+ public static final int tm31 = 319;
+ public static final int tm32 = 320;
+ public static final int tm33 = 321;
+ public static final int tm34 = 322;
+ public static final int tm35 = 323;
+ public static final int tm36 = 324;
+ public static final int tm37 = 325;
+ public static final int tm38 = 326;
+ public static final int tm39 = 327;
+ public static final int tm40 = 328;
+ public static final int tm41 = 329;
+ public static final int tm42 = 330;
+ public static final int tm43 = 331;
+ public static final int tm44 = 332;
+ public static final int tm45 = 333;
+ public static final int tm46 = 334;
+ public static final int tm47 = 335;
+ public static final int tm48 = 336;
+ public static final int tm49 = 337;
+ public static final int tm50 = 338;
+ public static final int hm01 = 339;
+ public static final int hm02 = 340;
+ public static final int hm03 = 341;
+ public static final int hm04 = 342;
+ public static final int hm05 = 343;
+ public static final int hm06 = 344;
+ public static final int hm07 = 345;
+ public static final int hm08 = 346;
+ public static final int unknown347 = 347;
+ public static final int unknown348 = 348;
+
+ /* Exclusive to FRLG and Emerald */
+ public static final int oaksParcel = 349;
+ public static final int pokeFlute = 350;
+ public static final int secretKey = 351;
+ public static final int bikeVoucher = 352;
+ public static final int goldTeeth = 353;
+ public static final int oldAmber = 354;
+ public static final int cardKey = 355;
+ public static final int liftKey = 356;
+ public static final int helixFossil = 357;
+ public static final int domeFossil = 358;
+ public static final int silphScope = 359;
+ public static final int bicycle = 360;
+ public static final int townMap = 361;
+ public static final int vsSeeker = 362;
+ public static final int fameChecker = 363;
+ public static final int tmCase = 364;
+ public static final int berryPouch = 365;
+ public static final int teachyTV = 366;
+ public static final int triPass = 367;
+ public static final int rainbowPass = 368;
+ public static final int tea = 369;
+ public static final int mysticTicket = 370;
+ public static final int auroraTicket = 371;
+ public static final int powderJar = 372;
+ public static final int ruby = 373;
+ public static final int sapphire = 374;
+
+ /* Exclusive to Emerald */
+ public static final int magmaEmblem = 375;
+ public static final int oldSeaMap = 376;
+}
diff --git a/src/com/pkrandom/constants/Gen4Constants.java b/src/com/pkrandom/constants/Gen4Constants.java
new file mode 100644
index 0000000..91c5ff2
--- /dev/null
+++ b/src/com/pkrandom/constants/Gen4Constants.java
@@ -0,0 +1,2107 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Gen4Constants.java - Constants for DPPt and HGSS --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+import java.util.*;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import java.util.stream.Stream;
+
+import com.pkrandom.pokemon.*;
+
+public class Gen4Constants {
+
+ public static final int Type_DP = 0;
+ public static final int Type_Plat = 1;
+ public static final int Type_HGSS = 2;
+
+ public static final int arm9Offset = 0x02000000;
+
+ public static final int pokemonCount = 493, moveCount = 467;
+ private static final int dpFormeCount = 5, platHgSsFormeCount = 12;
+ public static final int formeOffset = 2;
+
+ 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, bsTMHMCompatOffset = 28;
+
+ public static final String starterCriesPrefix = "0004000C10BD0000000000000000000000E000000000000000E0000000000200";
+
+ public static final byte[] hgssStarterCodeSuffix = { 0x03, 0x03, 0x1A, 0x12, 0x1, 0x23, 0x0, 0x0 };
+
+ public static final int[] hgssFilesWithRivalScript = { 7, 23, 96, 110, 819, 850, 866 };
+
+ public static final byte[] hgssRivalScriptMagic = { (byte) 0xCE, 0x00, 0x0C, (byte) 0x80, 0x11, 0x00, 0x0C,
+ (byte) 0x80, (byte) 152, 0, 0x1C, 0x00, 0x05 };
+
+ public static final int[] ptFilesWithRivalScript = { 31, 36, 112, 123, 186, 427, 429, 1096 };
+
+ public static final int[] dpFilesWithRivalScript = { 34, 90, 118, 180, 195, 394 };
+
+ public static final byte[] dpptRivalScriptMagic = { (byte) 0xDE, 0x00, 0x0C, (byte) 0x80, 0x11, 0x00, 0x0C,
+ (byte) 0x80, (byte) 0x83, 0x01, 0x1C, 0x00, 0x01 };
+
+ public static final byte[] dpptTagBattleScriptMagic1 = { (byte) 0xDE, 0x00, 0x0C, (byte) 0x80, 0x28, 0x00, 0x04,
+ (byte) 0x80 };
+
+ public static final byte[] dpptTagBattleScriptMagic2 = { 0x11, 0x00, 0x0C, (byte) 0x80, (byte) 0x86, 0x01, 0x1C,
+ 0x00, 0x01 };
+
+ public static final int[] ptFilesWithTagScript = { 2, 136, 201, 236 };
+
+ public static final int[] dpFilesWithTagScript = { 2, 131, 230 };
+
+ public static final int dpStarterStringIndex = 19, ptStarterStringIndex = 36;
+
+ public static final int fossilCount = 7;
+
+ public static final String dpptTMDataPrefix = "D100D200D300D400", hgssTMDataPrefix = "1E003200";
+
+ public static final int tmCount = 92, hmCount = 8;
+
+ public static final int tmItemOffset = Items.tm01;
+
+ private static final int dpptTextCharsPerLine = 38, hgssTextCharsPerLine = 36;
+
+ public static final String dpItemPalettesPrefix = "8D018E01210132018D018F0122013301",
+ pthgssItemPalettesPrefix = "8D018E01210133018D018F0122013401";
+
+ public static final int ptSpearPillarPortalScriptFile = 237;
+
+ public static final int evolutionMethodCount = 26;
+
+ public static final int highestAbilityIndex = Abilities.badDreams;
+
+ public static final List<Integer> consumableHeldItems = Arrays.asList(
+ Items.cheriBerry, Items.chestoBerry, Items.pechaBerry, Items.rawstBerry, Items.aspearBerry,
+ Items.leppaBerry, Items.oranBerry, Items.persimBerry, Items.lumBerry, Items.sitrusBerry, Items.figyBerry,
+ Items.wikiBerry, Items.magoBerry, Items.aguavBerry, Items.iapapaBerry, Items.occaBerry, Items.passhoBerry,
+ Items.wacanBerry, Items.rindoBerry, Items.yacheBerry, Items.chopleBerry, Items.kebiaBerry, Items.shucaBerry,
+ Items.cobaBerry, Items.payapaBerry, Items.tangaBerry, Items.chartiBerry, Items.kasibBerry, Items.habanBerry,
+ Items.colburBerry, Items.babiriBerry, Items.chilanBerry, Items.liechiBerry, Items.ganlonBerry,
+ Items.salacBerry, Items.petayaBerry, Items.apicotBerry, Items.lansatBerry, Items.starfBerry,
+ Items.enigmaBerry, Items.micleBerry, Items.custapBerry, Items.jabocaBerry, Items.rowapBerry,
+ Items.berryJuice, Items.whiteHerb, Items.mentalHerb, Items.powerHerb, Items.focusSash);
+
+ public static final List<Integer> allHeldItems = setupAllHeldItems();
+
+ private static List<Integer> setupAllHeldItems() {
+ List<Integer> list = new ArrayList<>();
+ list.addAll(Arrays.asList(Items.brightPowder, Items.quickClaw, Items.choiceBand, Items.kingsRock,
+ Items.silverPowder, Items.focusBand, Items.scopeLens, Items.metalCoat, Items.leftovers, Items.softSand,
+ Items.hardStone, Items.miracleSeed, Items.blackGlasses, Items.blackBelt, Items.magnet,
+ Items.mysticWater, Items.sharpBeak, Items.poisonBarb, Items.neverMeltIce, Items.spellTag,
+ Items.twistedSpoon, Items.charcoal, Items.dragonFang, Items.silkScarf, Items.shellBell,
+ Items.seaIncense, Items.laxIncense, Items.wideLens, Items.muscleBand, Items.wiseGlasses,
+ Items.expertBelt, Items.lightClay, Items.lifeOrb, Items.toxicOrb, Items.flameOrb, Items.zoomLens,
+ Items.metronome, Items.ironBall, Items.laggingTail, Items.destinyKnot, Items.blackSludge, Items.icyRock,
+ Items.smoothRock, Items.heatRock, Items.dampRock, Items.gripClaw, Items.choiceScarf, Items.stickyBarb,
+ Items.shedShell, Items.bigRoot, Items.choiceSpecs, Items.flamePlate, Items.splashPlate, Items.zapPlate,
+ Items.meadowPlate, Items.iciclePlate, Items.fistPlate, Items.toxicPlate, Items.earthPlate,
+ Items.skyPlate, Items.mindPlate, Items.insectPlate, Items.stonePlate, Items.spookyPlate,
+ Items.dracoPlate, Items.dreadPlate, Items.ironPlate, Items.oddIncense, Items.rockIncense,
+ Items.fullIncense, Items.waveIncense, Items.roseIncense, Items.razorClaw, Items.razorFang));
+ list.addAll(consumableHeldItems);
+ return list;
+ }
+
+ public static final List<Integer> generalPurposeConsumableItems = Collections.unmodifiableList(Arrays.asList(
+ Items.cheriBerry, Items.chestoBerry, Items.pechaBerry, Items.rawstBerry, Items.aspearBerry, Items.leppaBerry,
+ Items.oranBerry, Items.persimBerry, Items.lumBerry, Items.sitrusBerry, Items.ganlonBerry, Items.salacBerry,
+ // An NPC pokemon's nature is generated randomly with IVs during gameplay. Therefore, we do not include
+ // the flavor berries because, prior to Gen 7, they aren't worth the risk.
+ Items.apicotBerry, Items.lansatBerry, Items.starfBerry, Items.enigmaBerry, Items.micleBerry, Items.custapBerry,
+ Items.jabocaBerry, Items.rowapBerry, Items.berryJuice, Items.whiteHerb, Items.mentalHerb, Items.focusSash));
+
+ public static final List<Integer> generalPurposeItems = Collections.unmodifiableList(Arrays.asList(
+ Items.brightPowder, Items.quickClaw, Items.kingsRock, Items.focusBand, Items.scopeLens, Items.leftovers,
+ Items.shellBell, Items.laxIncense, Items.wideLens, Items.expertBelt, Items.lifeOrb, Items.zoomLens,
+ Items.destinyKnot, Items.shedShell, Items.razorClaw, Items.razorFang));
+
+ public static final Map<Type, List<Integer>> typeBoostingItems = initializeTypeBoostingItems();
+
+ private static Map<Type, List<Integer>> initializeTypeBoostingItems() {
+ Map<Type, List<Integer>> map = new HashMap<>();
+ map.put(Type.BUG, Arrays.asList(Items.silverPowder, Items.insectPlate));
+ map.put(Type.DARK, Arrays.asList(Items.blackGlasses, Items.dreadPlate));
+ map.put(Type.DRAGON, Arrays.asList(Items.dragonFang, Items.dracoPlate));
+ map.put(Type.ELECTRIC, Arrays.asList(Items.magnet, Items.zapPlate));
+ map.put(Type.FIGHTING, Arrays.asList(Items.blackBelt, Items.fistPlate));
+ map.put(Type.FIRE, Arrays.asList(Items.charcoal, Items.flamePlate));
+ map.put(Type.FLYING, Arrays.asList(Items.sharpBeak, Items.skyPlate));
+ map.put(Type.GHOST, Arrays.asList(Items.spellTag, Items.spookyPlate));
+ map.put(Type.GRASS, Arrays.asList(Items.miracleSeed, Items.meadowPlate, Items.roseIncense));
+ map.put(Type.GROUND, Arrays.asList(Items.softSand, Items.earthPlate));
+ map.put(Type.ICE, Arrays.asList(Items.neverMeltIce, Items.iciclePlate));
+ map.put(Type.NORMAL, Arrays.asList(Items.silkScarf));
+ map.put(Type.POISON, Arrays.asList(Items.poisonBarb, Items.toxicPlate));
+ map.put(Type.PSYCHIC, Arrays.asList(Items.twistedSpoon, Items.mindPlate, Items.oddIncense));
+ map.put(Type.ROCK, Arrays.asList(Items.hardStone, Items.stonePlate, Items.rockIncense));
+ map.put(Type.STEEL, Arrays.asList(Items.metalCoat, Items.ironPlate));
+ map.put(Type.WATER, Arrays.asList(Items.mysticWater, Items.seaIncense, Items.splashPlate, Items.waveIncense));
+ map.put(null, Collections.emptyList()); // ??? type
+ return Collections.unmodifiableMap(map);
+ }
+
+ public static final Map<Integer, List<Integer>> moveBoostingItems = initializeMoveBoostingItems();
+
+ private static Map<Integer, List<Integer>> initializeMoveBoostingItems() {
+ Map<Integer, List<Integer>> map = new HashMap<>();
+ map.put(Moves.bounce, Arrays.asList(Items.powerHerb));
+ map.put(Moves.dig, Arrays.asList(Items.powerHerb));
+ map.put(Moves.dive, Arrays.asList(Items.powerHerb));
+ map.put(Moves.fly, Arrays.asList(Items.powerHerb));
+ map.put(Moves.razorWind, Arrays.asList(Items.powerHerb));
+ map.put(Moves.skullBash, Arrays.asList(Items.powerHerb));
+ map.put(Moves.skyAttack, Arrays.asList(Items.powerHerb));
+ map.put(Moves.solarBeam, Arrays.asList(Items.powerHerb));
+
+ map.put(Moves.fling, Arrays.asList(Items.toxicOrb, Items.flameOrb, Items.ironBall));
+
+ map.put(Moves.trick, Arrays.asList(Items.toxicOrb, Items.flameOrb, Items.fullIncense, Items.laggingTail));
+ map.put(Moves.switcheroo, Arrays.asList(Items.toxicOrb, Items.flameOrb, Items.fullIncense, Items.laggingTail));
+
+ map.put(Moves.trickRoom, Arrays.asList(Items.ironBall));
+
+ map.put(Moves.facade, Arrays.asList(Items.toxicOrb, Items.flameOrb));
+
+ map.put(Moves.psychoShift, Arrays.asList(Items.toxicOrb, Items.flameOrb));
+
+ map.put(Moves.lightScreen, Arrays.asList(Items.lightClay));
+ map.put(Moves.reflect, Arrays.asList(Items.lightClay));
+
+ map.put(Moves.hail, Arrays.asList(Items.icyRock));
+
+ map.put(Moves.sandstorm, Arrays.asList(Items.smoothRock));
+
+ map.put(Moves.sunnyDay, Arrays.asList(Items.heatRock));
+
+ map.put(Moves.rainDance, Arrays.asList(Items.dampRock));
+
+ map.put(Moves.bind, Arrays.asList(Items.gripClaw));
+ map.put(Moves.clamp, Arrays.asList(Items.gripClaw));
+ map.put(Moves.fireSpin, Arrays.asList(Items.gripClaw));
+ map.put(Moves.magmaStorm, Arrays.asList(Items.gripClaw));
+ map.put(Moves.outrage, Arrays.asList(Items.gripClaw));
+ map.put(Moves.sandTomb, Arrays.asList(Items.gripClaw));
+ map.put(Moves.uproar, Arrays.asList(Items.gripClaw));
+ map.put(Moves.whirlpool, Arrays.asList(Items.gripClaw));
+ map.put(Moves.wrap, Arrays.asList(Items.gripClaw));
+
+ map.put(Moves.absorb, Arrays.asList(Items.bigRoot));
+ map.put(Moves.aquaRing, Arrays.asList(Items.bigRoot));
+ map.put(Moves.drainPunch, Arrays.asList(Items.bigRoot));
+ map.put(Moves.dreamEater, Arrays.asList(Items.bigRoot));
+ map.put(Moves.gigaDrain, Arrays.asList(Items.bigRoot));
+ map.put(Moves.ingrain, Arrays.asList(Items.bigRoot));
+ map.put(Moves.leechLife, Arrays.asList(Items.bigRoot));
+ map.put(Moves.leechSeed, Arrays.asList(Items.bigRoot));
+ map.put(Moves.megaDrain, Arrays.asList(Items.bigRoot));
+
+ return Collections.unmodifiableMap(map);
+ }
+
+ public static final Map<Type, Integer> weaknessReducingBerries = initializeWeaknessReducingBerries();
+
+ private static Map<Type, Integer> initializeWeaknessReducingBerries() {
+ Map<Type, Integer> map = new HashMap<>();
+ map.put(Type.FIRE, Items.occaBerry);
+ map.put(Type.WATER, Items.passhoBerry);
+ map.put(Type.ELECTRIC, Items.wacanBerry);
+ map.put(Type.GRASS, Items.rindoBerry);
+ map.put(Type.ICE, Items.yacheBerry);
+ map.put(Type.FIGHTING, Items.chopleBerry);
+ map.put(Type.POISON, Items.kebiaBerry);
+ map.put(Type.GROUND, Items.shucaBerry);
+ map.put(Type.FLYING, Items.cobaBerry);
+ map.put(Type.PSYCHIC, Items.payapaBerry);
+ map.put(Type.BUG, Items.tangaBerry);
+ map.put(Type.ROCK, Items.chartiBerry);
+ map.put(Type.GHOST, Items.kasibBerry);
+ map.put(Type.DRAGON, Items.habanBerry);
+ map.put(Type.DARK, Items.colburBerry);
+ map.put(Type.STEEL, Items.babiriBerry);
+ return Collections.unmodifiableMap(map);
+ }
+
+ public static final Map<Integer, List<Integer>> speciesBoostingItems = initializeSpeciesBoostingItems();
+
+ private static Map<Integer, List<Integer>> initializeSpeciesBoostingItems() {
+ Map<Integer, List<Integer>> map = new HashMap<>();
+ map.put(Species.dialga, Arrays.asList(Items.adamantOrb));
+ map.put(Species.palkia, Arrays.asList(Items.lustrousOrb));
+ map.put(Species.latias, Arrays.asList(Items.soulDew));
+ map.put(Species.latios, Arrays.asList(Items.soulDew));
+ map.put(Species.clamperl, Arrays.asList(Items.deepSeaTooth, Items.deepSeaScale));
+ map.put(Species.pikachu, Arrays.asList(Items.lightBall));
+ map.put(Species.chansey, Arrays.asList(Items.luckyPunch));
+ map.put(Species.ditto, Arrays.asList(Items.metalPowder, Items.quickPowder));
+ map.put(Species.cubone, Arrays.asList(Items.thickClub));
+ map.put(Species.marowak, Arrays.asList(Items.thickClub));
+ map.put(Species.farfetchd, Arrays.asList(Items.leek));
+ return Collections.unmodifiableMap(map);
+ }
+
+ public static final Map<Integer, List<Integer>> abilityBoostingItems = initializeAbilityBoostingItems();
+
+ private static Map<Integer, List<Integer>> initializeAbilityBoostingItems() {
+ Map<Integer, List<Integer>> map = new HashMap<>();
+ map.put(Abilities.guts, Arrays.asList(Items.flameOrb, Items.toxicOrb));
+ map.put(Abilities.magicGuard, Arrays.asList(Items.stickyBarb, Items.lifeOrb));
+ return Collections.unmodifiableMap(map);
+ }
+
+ public static final Map<Integer,List<Integer>> abilityVariations = setupAbilityVariations();
+
+ private static Map<Integer,List<Integer>> setupAbilityVariations() {
+ Map<Integer,List<Integer>> map = new HashMap<>();
+ map.put(Abilities.insomnia, Arrays.asList(Abilities.insomnia, Abilities.vitalSpirit));
+ map.put(Abilities.clearBody, Arrays.asList(Abilities.clearBody, Abilities.whiteSmoke));
+ map.put(Abilities.hugePower, Arrays.asList(Abilities.hugePower, Abilities.purePower));
+ map.put(Abilities.battleArmor, Arrays.asList(Abilities.battleArmor, Abilities.shellArmor));
+ map.put(Abilities.cloudNine, Arrays.asList(Abilities.cloudNine, Abilities.airLock));
+ map.put(Abilities.filter, Arrays.asList(Abilities.filter, Abilities.solidRock));
+
+ return map;
+ }
+
+ // Note: Flower Gift is NOT useless in this generation; it is in this list solely for consistency with future generations.
+ public static final List<Integer> uselessAbilities = Arrays.asList(Abilities.forecast, Abilities.multitype, Abilities.flowerGift);
+
+ public static final int dpptSetVarScript = 0x28, hgssSetVarScript = 0x29;
+
+ public static final int scriptListTerminator = 0xFD13;
+
+ public static final int itemScriptVariable = 0x8008;
+
+ private static List<String> dpShopNames = Arrays.asList(
+ "Sunyshore Secondary",
+ "Jubilife Secondary",
+ "Floaroma Secondary",
+ "Oreburgh Secondary",
+ "Eterna Secondary",
+ "Eterna Herbs",
+ "Snowpoint Secondary",
+ "Solaceon Secondary",
+ "Pastoria Secondary",
+ "Celestic Secondary",
+ "Hearthome Secondary",
+ "Canalave Secondary",
+ "Veilstone Department Store Secret Base Decorations 1",
+ "Veilstone Department Store Secret Base Decorations 2",
+ "Veilstone Department Store Vitamins",
+ "Veilstone Department Store TMs 1",
+ "Sunyshore Market Seals 1",
+ "Sunyshore Market Seals 2",
+ "Sunyshore Market Seals 3",
+ "Sunyshore Market Seals 4",
+ "Veilstone Department Store TMs 2",
+ "Sunyshore Market Seals 5",
+ "Sunyshore Market Seals 6",
+ "Sunyshore Market Seals 7",
+ "Pokemon League Secondary",
+ "Veilstone Department Store X Items",
+ "Veilstone Department Store Healing",
+ "Veilstone Department Store Balls Etc.",
+ "Progressive Shops"
+ );
+
+ private static List<String> ptShopNames = Arrays.asList(
+ "Jubilife Secondary",
+ "Sunyshore Secondary",
+ "Floaroma Secondary",
+ "Oreburgh Secondary",
+ "Eterna Herbs",
+ "Canalave Secondary",
+ "Pastoria Secondary",
+ "Celestic Secondary",
+ "Snowpoint Secondary",
+ "Solaceon Secondary",
+ "Eterna Secondary",
+ "Hearthome Secondary",
+ "Veilstone Department Store B1 Berries",
+ "Veilstone Department Store Secret Base Decorations 1",
+ "Veilstone Department Store Vitamins",
+ "Veilstone Department Store Secret Base Decorations 2",
+ "Veilstone Department Store TMs 1",
+ "Sunyshore Market Seals 1",
+ "Sunyshore Market Seals 2",
+ "Sunyshore Market Seals 3",
+ "Sunyshore Market Seals 4",
+ "Veilstone Department Store TMs 2",
+ "Sunyshore Market Seals 5",
+ "Sunyshore Market Seals 6",
+ "Sunyshore Market Seals 7",
+ "Pokemon League Secondary",
+ "Veilstone Department Store X Items",
+ "Veilstone Department Store Healing",
+ "Veilstone Department Store Balls Etc.",
+ "Progressive Shops"
+ );
+
+ private static List<String> hgssShopNames = Arrays.asList(
+ "Cherrygrove Secondary",
+ "Cerulean Secondary",
+ "Ecruteak Secondary",
+ "Celadon Department Store Mail",
+ "Saffron Secondary",
+ "Violet Secondary",
+ "Blackthorn Secondary",
+ "Olivine Secondary",
+ "Fuchsia Secondary",
+ "Lavender Secondary",
+ "Pewter Secondary",
+ "Viridian Secondary",
+ "Azalea Secondary",
+ "Mahogany Before Hideout",
+ "Safari Zone Gate Southwest",
+ "Goldenrod Herb Shop",
+ "Cianwood Pharmacy",
+ "Veilstone Department Store Secret Base Decorations 1",
+ "Veilstone Department Store Secret Base Decorations 2",
+ "Goldenrod Department Store Vitamins",
+ "Celadon Department Store Vitamins",
+ "Mt. Moon Square",
+ "Sunyshore Market Seals 1",
+ "Sunyshore Market Seals 2",
+ "Sunyshore Market Seals 3",
+ "Sunyshore Market Seals 4",
+ "Sunyshore Market Seals 5",
+ "Sunyshore Market Seals 6",
+ "Unused Secondary",
+ "Sunyshore Market Seals 7",
+ "Pokeathlon Dome Data Card Shop 25-27",
+ "Goldenrod Department Store X Items",
+ "Celadon Department Store X Items",
+ "Mahogany After Hideout",
+ "Goldenrod Department Store Healing",
+ "Celadon Department Store Healing",
+ "Goldenrod Department Store Balls Etc.",
+ "Goldenrod TMs",
+ "Celadon Department Store Balls Etc.",
+ "Celadon TMs",
+ "Pokeathlon Dome Athlete Shop Sunday (Pre-National Dex)",
+ "Pokeathlon Dome Data Card Shop 19-24",
+ "Pokeathlon Dome Data Card Shop 1-6",
+ "Pokeathlon Dome Athlete Shop Monday (Pre-National Dex)",
+ "Pokeathlon Dome Athlete Shop Tuesday (Pre-National Dex)",
+ "Pokeathlon Dome Data Card Shop 7-12",
+ "Pokeathlon Dome Athlete Shop Wednesday (Pre-National Dex)",
+ "Pokeathlon Dome Athlete Shop Thursday (Pre-National Dex)",
+ "Pokeathlon Dome Athlete Shop Friday (Pre-National Dex)",
+ "Pokeathlon Dome Athlete Shop Saturday (Pre-National Dex)",
+ "Pokeathlon Dome Data Card Shop 13-18",
+ "Pokeathlon Dome Athlete Shop Sunday (Post-National Dex)",
+ "Pokeathlon Dome Athlete Shop Monday (Post-National Dex)",
+ "Pokeathlon Dome Athlete Shop Tuesday (Post-National Dex)",
+ "Pokeathlon Dome Athlete Shop Wednesday (Post-National Dex)",
+ "Pokeathlon Dome Athlete Shop Thursday (Post-National Dex)",
+ "Pokeathlon Dome Athlete Shop Friday (Post-National Dex)",
+ "Pokeathlon Dome Athlete Shop Saturday (Post-National Dex)",
+ "Progressive Shops"
+ );
+
+ public static List<String> getShopNames(int romType) {
+ if (romType == Type_DP) {
+ return dpShopNames;
+ } else if (romType == Type_Plat) {
+ return ptShopNames;
+ } else if (romType == Type_HGSS) {
+ return hgssShopNames;
+ }
+ return null;
+ }
+
+ public static final List<Integer> evolutionItems = Arrays.asList(Items.sunStone, Items.moonStone, Items.fireStone,
+ Items.thunderStone, Items.waterStone, Items.leafStone, Items.shinyStone, Items.duskStone, Items.dawnStone,
+ Items.ovalStone, Items.kingsRock, Items.deepSeaTooth, Items.deepSeaScale, Items.metalCoat, Items.dragonScale,
+ Items.upgrade, Items.protector, Items.electirizer, Items.magmarizer, Items.dubiousDisc, Items.reaperCloth,
+ Items.razorClaw, Items.razorFang);
+
+ public static final Map<Integer,String> formeSuffixes = setupFormeSuffixes();
+ public static final Map<Integer,FormeInfo> formeMappings = setupFormeMappings();
+ public static final Map<Integer,Integer> cosmeticForms = setupCosmeticForms();
+
+ private static final Map<Integer,Map<Integer,String>> formeSuffixesByBaseForme = setupFormeSuffixesByBaseForme();
+ private static final Map<Integer,String> dummyFormeSuffixes = setupDummyFormeSuffixes();
+
+ private static final Map<Integer,Map<Integer,Integer>> absolutePokeNumsByBaseForme = setupAbsolutePokeNumsByBaseForme();
+ private static final Map<Integer,Integer> dummyAbsolutePokeNums = setupDummyAbsolutePokeNums();
+
+ public static String getFormeSuffixByBaseForme(int baseForme, int formNum) {
+ return formeSuffixesByBaseForme.getOrDefault(baseForme,dummyFormeSuffixes).getOrDefault(formNum,"");
+ }
+
+ public static Integer getAbsolutePokeNumByBaseForme(int baseForme, int formNum) {
+ return absolutePokeNumsByBaseForme.getOrDefault(baseForme,dummyAbsolutePokeNums).getOrDefault(formNum,baseForme);
+ }
+
+ public static final String lyraEthanMarillSpritePrefix = "274E0604C301274E0704E101274E0804";
+
+ public static final List<Integer> hgssBigOverworldPokemon = Arrays.asList(
+ 536, // MMODEL_FOLLOWER_MON_STEELIX
+ 537, // MMODEL_FOLLOWER_MON_STEELIX_F
+ 579, // MMODEL_FOLLOWER_MON_LUGIA
+ 580, // MMODEL_FOLLOWER_MON_HO_OH
+ 651, // MMODEL_FOLLOWER_MON_WAILORD
+ 712, // MMODEL_FOLLOWER_MON_KYOGRE
+ 713, // MMODEL_FOLLOWER_MON_GROUDON
+ 714, // MMODEL_FOLLOWER_MON_RAYQUAZA
+ 833, // MMODEL_FOLLOWER_MON_DIALGA
+ 834, // MMODEL_FOLLOWER_MON_PALKIA
+ 836, // MMODEL_FOLLOWER_MON_REGIGIGAS
+ 837, // MMODEL_FOLLOWER_MON_GIRATINA
+ 838, // MMODEL_FOLLOWER_MON_GIRATINA_ORIGIN
+ 845, // MMODEL_FOLLOWER_MON_ARCEUS_NORMAL
+ 846, // MMODEL_FOLLOWER_MON_ARCEUS_FIGHTING
+ 847, // MMODEL_FOLLOWER_MON_ARCEUS_FLYING
+ 848, // MMODEL_FOLLOWER_MON_ARCEUS_POISON
+ 849, // MMODEL_FOLLOWER_MON_ARCEUS_GROUND
+ 850, // MMODEL_FOLLOWER_MON_ARCEUS_ROCK
+ 851, // MMODEL_FOLLOWER_MON_ARCEUS_BUG
+ 852, // MMODEL_FOLLOWER_MON_ARCEUS_GHOST
+ 853, // MMODEL_FOLLOWER_MON_ARCEUS_STEEL
+ 854, // MMODEL_FOLLOWER_MON_ARCEUS_MYSTERY
+ 855, // MMODEL_FOLLOWER_MON_ARCEUS_FIRE
+ 856, // MMODEL_FOLLOWER_MON_ARCEUS_WATER
+ 857, // MMODEL_FOLLOWER_MON_ARCEUS_GRASS
+ 858, // MMODEL_FOLLOWER_MON_ARCEUS_ELECTRIC
+ 859, // MMODEL_FOLLOWER_MON_ARCEUS_PSYCHIC
+ 860, // MMODEL_FOLLOWER_MON_ARCEUS_ICE
+ 861, // MMODEL_FOLLOWER_MON_ARCEUS_DRAGON
+ 862 // MMODEL_FOLLOWER_MON_ARCEUS_DARK
+ );
+
+ public static final List<Integer> hgssBannedOverworldPokemon = Arrays.asList(
+ // Unown alts (to avoid 28x chance of getting Unown)
+ // Arcues alts (to avoid 18x chance of getting Arceus)
+ 502, // MMODEL_FOLLOWER_MON_UNOWN_B
+ 503, // MMODEL_FOLLOWER_MON_UNOWN_C
+ 504, // MMODEL_FOLLOWER_MON_UNOWN_D
+ 505, // MMODEL_FOLLOWER_MON_UNOWN_E
+ 506, // MMODEL_FOLLOWER_MON_UNOWN_F
+ 507, // MMODEL_FOLLOWER_MON_UNOWN_G
+ 508, // MMODEL_FOLLOWER_MON_UNOWN_H
+ 509, // MMODEL_FOLLOWER_MON_UNOWN_I
+ 510, // MMODEL_FOLLOWER_MON_UNOWN_J
+ 511, // MMODEL_FOLLOWER_MON_UNOWN_K
+ 512, // MMODEL_FOLLOWER_MON_UNOWN_L
+ 513, // MMODEL_FOLLOWER_MON_UNOWN_M
+ 514, // MMODEL_FOLLOWER_MON_UNOWN_N
+ 515, // MMODEL_FOLLOWER_MON_UNOWN_O
+ 516, // MMODEL_FOLLOWER_MON_UNOWN_P
+ 517, // MMODEL_FOLLOWER_MON_UNOWN_Q
+ 518, // MMODEL_FOLLOWER_MON_UNOWN_R
+ 519, // MMODEL_FOLLOWER_MON_UNOWN_S
+ 520, // MMODEL_FOLLOWER_MON_UNOWN_T
+ 521, // MMODEL_FOLLOWER_MON_UNOWN_U
+ 522, // MMODEL_FOLLOWER_MON_UNOWN_V
+ 523, // MMODEL_FOLLOWER_MON_UNOWN_W
+ 524, // MMODEL_FOLLOWER_MON_UNOWN_X
+ 525, // MMODEL_FOLLOWER_MON_UNOWN_Y
+ 526, // MMODEL_FOLLOWER_MON_UNOWN_Z
+ 527, // MMODEL_FOLLOWER_MON_UNOWN_QMARK
+ 528, // MMODEL_FOLLOWER_MON_UNOWN_EXCL
+ 846, // MMODEL_FOLLOWER_MON_ARCEUS_FIGHTING
+ 847, // MMODEL_FOLLOWER_MON_ARCEUS_FLYING
+ 848, // MMODEL_FOLLOWER_MON_ARCEUS_POISON
+ 849, // MMODEL_FOLLOWER_MON_ARCEUS_GROUND
+ 850, // MMODEL_FOLLOWER_MON_ARCEUS_ROCK
+ 851, // MMODEL_FOLLOWER_MON_ARCEUS_BUG
+ 852, // MMODEL_FOLLOWER_MON_ARCEUS_GHOST
+ 853, // MMODEL_FOLLOWER_MON_ARCEUS_STEEL
+ 854, // MMODEL_FOLLOWER_MON_ARCEUS_MYSTERY
+ 855, // MMODEL_FOLLOWER_MON_ARCEUS_FIRE
+ 856, // MMODEL_FOLLOWER_MON_ARCEUS_WATER
+ 857, // MMODEL_FOLLOWER_MON_ARCEUS_GRASS
+ 858, // MMODEL_FOLLOWER_MON_ARCEUS_ELECTRIC
+ 859, // MMODEL_FOLLOWER_MON_ARCEUS_PSYCHIC
+ 860, // MMODEL_FOLLOWER_MON_ARCEUS_ICE
+ 861, // MMODEL_FOLLOWER_MON_ARCEUS_DRAGON
+ 862 // MMODEL_FOLLOWER_MON_ARCEUS_DARK
+ );
+
+ public static final int convertOverworldSpriteToSpecies(int overworldSpriteID) {
+ int speciesID = overworldSpriteID - 296;
+
+ // Venusaur
+ if (overworldSpriteID >= 300) {
+ speciesID -= 1;
+ }
+
+ // Pikachu
+ if (overworldSpriteID >= 323) {
+ speciesID -= 1;
+ }
+
+ // Meganium
+ if (overworldSpriteID >= 453) {
+ speciesID -= 1;
+ }
+
+ // Pichu
+ if (overworldSpriteID >= 472) {
+ speciesID -= 1;
+ }
+
+ // Unown
+ if (overworldSpriteID >= 528) {
+ speciesID -= 27;
+ } else if (overworldSpriteID > 501) {
+ speciesID -= (overworldSpriteID - 501);
+ }
+
+ // Wobbuffet
+ if (overworldSpriteID >= 530) {
+ speciesID -= 1;
+ }
+
+ // Steelix
+ if (overworldSpriteID >= 537) {
+ speciesID -= 1;
+ }
+
+ // Heracross
+ if (overworldSpriteID >= 544) {
+ speciesID -= 1;
+ }
+
+ // Deoxys
+ if (overworldSpriteID >= 719) {
+ speciesID -= 3;
+ } else if (overworldSpriteID > 716) {
+ speciesID -= (overworldSpriteID - 716);
+ }
+
+ // Burmy
+ if (overworldSpriteID >= 747) {
+ speciesID -= 2;
+ } else if (overworldSpriteID > 745) {
+ speciesID -= (overworldSpriteID - 745);
+ }
+
+ // Wormadam
+ if (overworldSpriteID >= 750) {
+ speciesID -= 2;
+ } else if (overworldSpriteID > 748) {
+ speciesID -= (overworldSpriteID - 748);
+ }
+
+ // Combee
+ if (overworldSpriteID >= 753) {
+ speciesID -= 1;
+ }
+
+ // Shellos
+ if (overworldSpriteID >= 761) {
+ speciesID -= 1;
+ }
+
+ // Gastrodon
+ if (overworldSpriteID >= 763) {
+ speciesID -= 1;
+ }
+
+ // Gible
+ if (overworldSpriteID >= 784) {
+ speciesID -= 1;
+ }
+
+ // Gabite
+ if (overworldSpriteID >= 786) {
+ speciesID -= 1;
+ }
+
+ // Garchomp
+ if (overworldSpriteID >= 788) {
+ speciesID -= 1;
+ }
+
+ // Hippopotas
+ if (overworldSpriteID >= 793) {
+ speciesID -= 1;
+ }
+
+ // Hippowdon
+ if (overworldSpriteID >= 795) {
+ speciesID -= 1;
+ }
+
+ // Rotom
+ if (overworldSpriteID >= 829) {
+ speciesID -= 5;
+ } else if (overworldSpriteID > 824) {
+ speciesID -= (overworldSpriteID - 824);
+ }
+
+ // Giratina
+ if (overworldSpriteID >= 838) {
+ speciesID -= 1;
+ }
+
+ // Arceus
+ if (overworldSpriteID > 845) {
+ speciesID -= (overworldSpriteID - 845);
+ }
+
+ return speciesID;
+ }
+
+ // The original slot each of the 20 "alternate" slots is mapped to
+ // swarmx2, dayx2, nightx2, pokeradarx4, GBAx10
+ // NOTE: in the game data there are 6 fillers between pokeradar and GBA
+
+ public static final int[] dpptAlternateSlots = new int[] { 0, 1, 2, 3, 2, 3, 4, 5, 10, 11, 8, 9, 8, 9, 8, 9, 8, 9,
+ 8, 9 };
+
+ public static final String[] dpptWaterSlotSetNames = new String[] { "Surfing", "Filler", "Old Rod", "Good Rod",
+ "Super Rod" };
+
+ public static final String[] hgssTimeOfDayNames = new String[] { "Morning", "Day", "Night" };
+
+ public static final String[] hgssNonGrassSetNames = new String[] { "", "Surfing", "Rock Smash", "Old Rod",
+ "Good Rod", "Super Rod" };
+ public static final int hgssGoodRodReplacementIndex = 3, hgssSuperRodReplacementIndex = 1;
+
+ public static final MoveCategory[] moveCategoryIndices = { MoveCategory.PHYSICAL, MoveCategory.SPECIAL,
+ MoveCategory.STATUS };
+
+ public static byte moveCategoryToByte(MoveCategory cat) {
+ switch (cat) {
+ case PHYSICAL:
+ return 0;
+ case SPECIAL:
+ return 1;
+ case STATUS:
+ default:
+ return 2;
+ }
+ }
+
+ public static final int noDamageSleepEffect = 1, damagePoisonEffect = 2, damageAbsorbEffect = 3, damageBurnEffect = 4,
+ damageFreezeEffect = 5, damageParalyzeEffect = 6, dreamEaterEffect = 8, noDamageAtkPlusOneEffect = 10,
+ noDamageDefPlusOneEffect = 11, noDamageSpAtkPlusOneEffect = 13, noDamageEvasionPlusOneEffect = 16,
+ noDamageAtkMinusOneEffect = 18, noDamageDefMinusOneEffect = 19, noDamageSpeMinusOneEffect = 20,
+ noDamageAccuracyMinusOneEffect = 23, noDamageEvasionMinusOneEffect = 24, flinchEffect = 31, toxicEffect = 33,
+ razorWindEffect = 39, bindingEffect = 42, increasedCritEffect = 43, damageRecoil25PercentEffect = 48,
+ noDamageConfusionEffect = 49, noDamageAtkPlusTwoEffect = 50, noDamageDefPlusTwoEffect = 51,
+ noDamageSpePlusTwoEffect = 52, noDamageSpAtkPlusTwoEffect = 53, noDamageSpDefPlusTwoEffect = 54,
+ noDamageAtkMinusTwoEffect = 58, noDamageDefMinusTwoEffect = 59, noDamageSpeMinusTwoEffect = 60,
+ noDamageSpDefMinusTwoEffect = 62, noDamagePoisonEffect = 66, noDamageParalyzeEffect = 67,
+ damageAtkMinusOneEffect = 68, damageDefMinusOneEffect = 69, damageSpeMinusOneEffect = 70,
+ damageSpAtkMinusOneEffect = 71, damageSpDefMinusOneEffect = 72, damageAccuracyMinusOneEffect = 73,
+ skyAttackEffect = 75, damageConfusionEffect = 76, twineedleEffect = 77, rechargeEffect = 80, snoreEffect = 92,
+ trappingEffect = 106, minimizeEffect = 108, swaggerEffect = 118, damageBurnAndThawUserEffect = 125,
+ damageUserDefPlusOneEffect = 138, damageUserAtkPlusOneEffect = 139, damageUserAllPlusOneEffect = 140,
+ skullBashEffect = 145, twisterEffect = 146, futureSightAndDoomDesireEffect = 148, stompEffect = 150,
+ solarbeamEffect = 151, thunderEffect = 152, flyEffect = 155, defenseCurlEffect = 156,
+ fakeOutEffect = 158, flatterEffect = 166, noDamageBurnEffect = 167, chargeEffect = 174,
+ damageUserAtkAndDefMinusOneEffect = 182, damageRecoil33PercentEffect = 198, teeterDanceEffect = 199,
+ blazeKickEffect = 200, poisonFangEffect = 202, damageUserSpAtkMinusTwoEffect = 204,
+ noDamageAtkAndDefMinusOneEffect = 205, noDamageDefAndSpDefPlusOneEffect = 206,
+ noDamageAtkAndDefPlusOneEffect = 208, damagePoisonWithIncreasedCritEffect = 209,
+ noDamageSpAtkAndSpDefPlusOneEffect = 211, noDamageAtkAndSpePlusOneEffect = 212,
+ damageUserSpeMinusOneEffect = 218, damageUserDefAndSpDefMinusOneEffect = 229, flareBlitzEffect = 253,
+ diveEffect = 255, digEffect = 256, blizzardEffect = 260, voltTackleEffect = 262, bounceEffect = 263,
+ noDamageSpAtkMinusTwoEffect = 265, chatterEffect = 267, damageRecoil50PercentEffect = 269,
+ damageSpDefMinusTwoEffect = 271, shadowForceEffect = 272, fireFangEffect = 273, iceFangEffect = 274,
+ thunderFangEffect = 275, damageUserSpAtkPlusOneEffect = 276;
+
+ public static final List<Integer> soundMoves = Arrays.asList(Moves.growl, Moves.roar, Moves.sing, Moves.supersonic,
+ Moves.screech, Moves.snore, Moves.uproar, Moves.metalSound, Moves.grassWhistle, Moves.hyperVoice,
+ Moves.bugBuzz, Moves.chatter, Moves.perishSong, Moves.healBell);
+
+ public static final List<Integer> punchMoves = Arrays.asList(Moves.icePunch, Moves.firePunch, Moves.thunderPunch,
+ Moves.machPunch, Moves.focusPunch, Moves.dizzyPunch, Moves.dynamicPunch, Moves.hammerArm, Moves.megaPunch,
+ Moves.cometPunch, Moves.meteorMash, Moves.shadowPunch, Moves.drainPunch, Moves.bulletPunch, Moves.skyUppercut);
+
+ public static final List<Integer> dpRequiredFieldTMs = Arrays.asList(2, 3, 5, 9, 12, 19, 23, 28,
+ 34, 39, 41, 43, 46, 47, 49, 50, 62, 69, 79, 80, 82, 84, 85, 87);
+
+ public static final List<Integer> ptRequiredFieldTMs = Arrays.asList(2, 3, 5, 7, 9, 11, 12, 18, 19,
+ 23, 28, 34, 37, 39, 41, 43, 46, 47, 49, 50, 62, 69, 79, 80, 82, 84, 85, 87);
+
+ public static final List<Integer> dpptFieldMoves = Arrays.asList(
+ Moves.cut, Moves.fly, Moves.surf, Moves.strength, Moves.flash, Moves.dig, Moves.teleport,
+ Moves.waterfall, Moves.rockSmash, Moves.sweetScent, Moves.defog, Moves.rockClimb);
+
+ public static final List<Integer> hgssFieldMoves = Arrays.asList(
+ Moves.cut, Moves.fly, Moves.surf, Moves.strength, Moves.flash, Moves.dig, Moves.teleport,
+ Moves.whirlpool, Moves.waterfall, Moves.rockSmash, Moves.headbutt, Moves.sweetScent, Moves.rockClimb);
+
+ public static final List<Integer> dpptEarlyRequiredHMMoves = Arrays.asList(Moves.rockSmash, Moves.cut);
+
+ public static final List<Integer> hgssEarlyRequiredHMMoves = Collections.singletonList(Moves.cut);
+
+ public static ItemList allowedItems, nonBadItems;
+ public static List<Integer> regularShopItems, opShopItems;
+
+ public static final String shedinjaSpeciesLocator = "492080000090281C0521";
+
+ public static final int ilexForestScriptFile = 92, ilexForestStringsFile = 115;
+ public static final List<Integer> headbuttTutorScriptOffsets = Arrays.asList(0xF55, 0xFC5, 0x100A, 0x104C);
+
+ private static final String doubleBattleFixPrefixDP = "022912D90221214201", doubleBattleFixPrefixPt = "022919D90221214205",
+ doubleBattleFixPrefixHGSS = "2C2815D00221214201";
+
+ public static final String feebasLevelPrefixDPPt = "019813B0F0BD", honeyTreeLevelPrefixDPPt = "F0BDF0B589B0051C0C1C";
+
+ private static final String runningShoesCheckPrefixDPPt = "281C0C24", runningShoesCheckPrefixHGSS = "301C0C24";
+
+ public static final String distortionWorldGroundCheckPrefix = "23D849187944C988090409148F44";
+
+ public static final List<String> dpptIntroPrefixes = Arrays.asList("381CF8BDC046", "08B0F8BD");
+
+ public static final String hpBarSpeedPrefix = "0CD106200090", expBarSpeedPrefix = "011C00D101212E6C", bothBarsSpeedPrefix = "70BD90421DDA";
+
+ public static final String dpptEggMoveTablePrefix = "40016601";
+
+ public static final String typeEffectivenessTableLocator = "000505000805";
+
+ private static final int trophyGardenGrassEncounterIndexDP = 304, trophyGardenGrassEncounterIndexPt = 308;
+ private static final List<Integer> marshGrassEncounterIndicesDP = Arrays.asList(76, 82, 88, 94, 100, 102),
+ marshGrassEncounterIndicesPt = Arrays.asList(76, 82, 88, 94, 100, 106);
+
+ public static final String pickupTableLocator = "110012001A000300", rarePickupTableLocator = "19005C00DD00";
+ public static final int numberOfCommonPickupItems = 18, numberOfRarePickupItems = 11;
+
+ public static final String friendshipValueForEvoLocator = "DC286AD3";
+
+ public static final String perfectOddsBranchLocator = "FF2901D30425";
+
+ public static final int[] dpptOverworldDexMaps = new int[] {
+ 1, 2, 3, 4, 5, -1, -1, 6, -1, 7, // 0-9 (cities, pkmn league, wind/ironworks)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10-19 (all mt coronet)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20-29 (mt coronet, great marsh, solaceon ruins)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 30-39 (all solaceon ruins)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 40-49 (solaceon ruins/v.road)
+ -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, // 50-59 (v.road, stark mountain outer then inner, sendoff spring)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 60-69 (unknown, turnback cave)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 70-79 (all turnback cave)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 80-89 (all unknown)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 90-99 (all unknown)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 100-109 (unknown, snowpoint temple)
+ -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, // 110-119 (various dungeons, iron island outer/inner)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 120-129 (rest of iron island inner, old chateau)
+ -1, -1, -1, -1, -1, -1, -1, -1, 10, 11, // 130-139 (old chateau, inner lakes, lakefronts)
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, // 140-149 (first few routes)
+ 22, -1, -1, -1, -1, -1, 23, 24, 25, 26, // 150-159 (route 209 + lost tower, more routes)
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, // 160-169 (routes; 220 is skipped until later)
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, // 170-179 (last few land routes, towns, resort area, first sea route)
+ 47, 48, 49, // 180-182 (other sea routes)
+ };
+
+ public static final int[] dpptDungeonDexMaps = new int[] {
+ -1, -1, -1, -1, -1, 1, 1, -1, 2, -1, // 0-9 (cities, pkmn league, wind/ironworks, mine/forest)
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 10-19 (all mt coronet)
+ 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, // 20-29 (mt coronet, great marsh, solaceon ruins)
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, // 30-39 (all solaceon ruins)
+ 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, // 40-49 (solaceon ruins/v.road)
+ 6, 6, 6, 7, 8, 8, -1, 9, 9, 10, // 50-59 (v.road, stark mountain outer then inner, sendoff spring)
+ -1, -1, -1, 10, 10, 10, 10, 10, 10, 10, // 60-69 (unknown, turnback cave)
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, // 70-79 (all turnback cave)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 80-89 (all unknown)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 90-99 (all unknown)
+ -1, -1, -1, -1, -1, -1, 11, 11, 11, 11, // 100-109 (unknown, snowpoint temple)
+ 11, 11, 12, 12, 13, 13, 13, 14, -1, 15, // 110-119 (various dungeons, iron island outer/inner)
+ 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, // 120-129 (rest of iron island inner, old chateau)
+ 16, 16, 16, 16, 17, 17, 18, 19, -1, -1, // 130-139 (old chateau, inner lakes, lakefronts)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 140-149 (first few routes)
+ -1, 20, 20, 20, 20, 20, -1, -1, -1, -1, // 150-159 (route 209 + lost tower, more routes)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 160-169 (routes; 220 is skipped until later)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 170-179 (last few land routes, towns, resort area, first sea route)
+ -1, -1, -1, // 180-182 (other sea routes)
+ };
+
+ public static final int[] hgssOverworldDexMaps = new int[] {
+ 1, 2, 3, 4, 5, 6, -1, -1, 7, -1, // 0-9 (first few cities/routes, sprout tower + alph)
+ -1, -1, -1, -1, -1, -1, -1, 8, -1, -1, // 10-19 (more alph, union cave, r33, slowpoke)
+ -1, 9, 10, -1, -1, 11, 12, 13, -1, -1, // 20-29 (ilex, routes, natpark, routes, burned)
+ -1, -1, -1, -1, -1, -1, -1, -1, 14, 15, // 30-39 (bell tower, routes)
+ 16, 17, 18, -1, -1, -1, -1, -1, -1, -1, // 40-49 (olivine, routes, whirl islands, missing slots)
+ -1, 19, 20, -1, -1, -1, -1, 21, 22, 23, // 50-59 (missing, cianwood, routes, mortar)
+ -1, -1, -1, -1, -1, 24, -1, 25, 26, -1, // 60-69 (ice path, missing, blackthorn, dragons, routes, dark)
+ -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, // 70-79 (dark, route 47, moon, seafoam, silver cave)
+ -1, -1, -1, -1, -1, 28, -1, -1, -1, -1, // 80-89 (more silver cave, cliff stuff, random bell tower)
+ -1, -1, 29, 30, 31, 32, 33, 34, 35, 36, // 90-99 (missing, saf zone, kanto routes/cities)
+ 37, 38, 39, 40, 41, 42, -1, -1, -1, -1, // 100-109 (more cities, some routes, more moon, RT)
+ -1, 43, 44, 45, 46, 47, 48, 49, 50, 51, // 110-119 (vroad, routes 1-9)
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, // 120-129 (routes 10-21)
+ 62, 63, -1, -1, -1, -1, 64, -1, -1, -1, // 130-139 (last 2 routes, tohjo, DC, VR, route 2 north, VF, CC)
+ -1, -1, // 140-141 (cerulean cave)
+ };
+
+ public static final int[] hgssDungeonDexMaps = new int[] {
+ -1, -1, -1, -1, -1, -1, 1, 1, -1, 2, // 0-9 (first few cities/routes, sprout tower + alph)
+ 2, 2, 2, 2, 3, 3, 3, -1, 4, 4, // 10-19 (more alph, union cave, r33, slowpoke)
+ 5, -1, -1, 6, -1, -1, -1, -1, 7, 7, // 20-29 (ilex, routes, natpark, routes, burned)
+ 8, 8, 8, 8, 8, 8, 8, 8, -1, -1, // 30-39 (bell tower, routes)
+ -1, -1, -1, 9, 9, -1, 9, -1, 9, -1, // 40-49 (olivine, routes, whirl islands, missing slots)
+ -1, -1, -1, 10, 10, 10, 10, -1, -1, -1, // 50-59 (missing, cianwood, routes, mortar)
+ 11, 11, 11, 11, -1, -1, 12, -1, -1, 13, // 60-69 (ice path, missing, blackthorn, dragons, routes, dark)
+ 13, -1, 14, 14, 15, 15, 15, 15, 15, 16, // 70-79 (dark, route 47, moon, seafoam, silver cave)
+ 16, 16, 17, 18, 8, -1, 16, 16, 16, 16, // 80-89 (more silver cave, cliff stuff, random bell tower)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 90-99 (missing, saf zone, kanto routes/cities)
+ -1, -1, -1, -1, -1, -1, 14, 14, 20, 20, // 100-109 (more cities, some routes, more moon, RT)
+ 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 110-119 (vroad, routes 1-9)
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 120-129 (routes 10-21)
+ -1, -1, 22, 23, 21, 21, -1, 24, -1, 25, // 130-139 (last 2 routes, tohjo, DC, VR, route 2 north, VF, CC)
+ 25, 25, // 140-141 (cerulean cave)
+ };
+
+ public static final int[] hgssHeadbuttOverworldDexMaps = new int[] {
+ 43, 44, 45, 46, 47, 48, 49, 50, 53, 29, // Routes 1-12, skipping 9 and 10
+ 54, 55, 56, 59, 61, 63, 40, 41, 42, 2, // Routes 13-15, Route 18, Route 22, Routes 25-29
+ 4, 5, 7, 8, 9, 10, 11, 12, 14, 15, // Routes 30-39
+ 20, 21, 23, 25, 26, 32, 33, 65, 34, 35, // Routes 42-46, first five Kanto cities
+ 36, 37, 1, 3, 6, 66, 13, 22, 28, 60, // Remaining Kanto cities, Johto cities, Lake of Rage, Mt Silver, Route 21
+ -1, -1, -1, 27, 39, 67, 64, 57, -1, // National Park, Ilex/Viridian Forest, Routes 47-48, Safari Zone Gate, Routes 2 (north) and 16, Mt Silver Cave
+ };
+
+ public static final int[] hgssHeadbuttDungeonDexMaps = new int[] {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Routes 1-12, skipping 9 and 10
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Routes 13-15, Route 18, Route 22, Routes 25-29
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Routes 30-39
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Routes 42-46, first five Kanto cities
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Remaining Kanto cities, Johto cities, Lake of Rage, Mt Silver, Route 21
+ 6, 5, 24, -1, -1, -1, -1, -1, 16, // National Park, Ilex/Viridian Forest, Routes 47-48, Safari Zone Gate, Routes 2 (north) and 16, Mt Silver Cave
+ };
+
+ public static final int pokedexAreaDataSize = 495;
+ public static final int dpptMtCoronetDexIndex = 3, dpptGreatMarshDexIndex = 4, dpptTrophyGardenDexIndex = 14, dpptFloaromaMeadowDexIndex = 21;
+ public static final List<Integer> dpptOverworldHoneyTreeDexIndicies = Arrays.asList(6, 7, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 34, 36, 37, 50);
+ public static final List<Integer> partnerTrainerIndices = Arrays.asList(608, 609, 610, 611, 612);
+
+ static {
+ setupAllowedItems();
+ }
+
+ private static void setupAllowedItems() {
+ allowedItems = new ItemList(Items.enigmaStone);
+ // Key items + version exclusives
+ allowedItems.banRange(Items.explorerKit, 109);
+ // Unknown blank items or version exclusives
+ allowedItems.banRange(Items.griseousOrb, 23);
+ // HMs
+ allowedItems.banRange(Items.hm01, 8);
+ // TMs
+ allowedItems.tmRange(Items.tm01, 92);
+
+ // non-bad items
+ // ban specific pokemon hold items, berries, apricorns, mail
+ nonBadItems = allowedItems.copy();
+
+ nonBadItems.banSingles(Items.oddKeystone, Items.griseousOrb, Items.soulDew, Items.lightBall,
+ Items.oranBerry, Items.quickPowder);
+ nonBadItems.banRange(Items.shoalSalt,2);
+ nonBadItems.banRange(Items.growthMulch, 4); // mulch
+ nonBadItems.banRange(Items.adamantOrb, 2); // orbs
+ nonBadItems.banRange(Items.mail1, 12); // mails
+ nonBadItems.banRange(Items.figyBerry, 25); // berries without useful battle effects
+ nonBadItems.banRange(Items.luckyPunch, 4); // pokemon specific
+ nonBadItems.banRange(Items.redScarf, 5); // contest scarves
+
+ regularShopItems = new ArrayList<>();
+
+ regularShopItems.addAll(IntStream.rangeClosed(Items.ultraBall, Items.pokeBall).boxed().collect(Collectors.toList()));
+ regularShopItems.addAll(IntStream.rangeClosed(Items.potion, Items.revive).boxed().collect(Collectors.toList()));
+ regularShopItems.addAll(IntStream.rangeClosed(Items.superRepel, Items.repel).boxed().collect(Collectors.toList()));
+
+ opShopItems = new ArrayList<>();
+
+ // "Money items" etc
+ opShopItems.add(Items.rareCandy);
+ opShopItems.addAll(IntStream.rangeClosed(Items.tinyMushroom, Items.nugget).boxed().collect(Collectors.toList()));
+ opShopItems.add(Items.rareBone);
+ opShopItems.add(Items.luckyEgg);
+ }
+
+ public static String getDoubleBattleFixPrefix(int romType) {
+ if (romType == Gen4Constants.Type_DP) {
+ return doubleBattleFixPrefixDP;
+ } else if (romType == Gen4Constants.Type_Plat) {
+ return doubleBattleFixPrefixPt;
+ } else {
+ return doubleBattleFixPrefixHGSS;
+ }
+ }
+
+ public static String getRunWithoutRunningShoesPrefix(int romType) {
+ if (romType == Gen4Constants.Type_DP || romType == Gen4Constants.Type_Plat) {
+ return runningShoesCheckPrefixDPPt;
+ } else {
+ return runningShoesCheckPrefixHGSS;
+ }
+ }
+
+ public static int getTrophyGardenGrassEncounterIndex(int romType) {
+ if (romType == Gen4Constants.Type_DP) {
+ return trophyGardenGrassEncounterIndexDP;
+ } else {
+ return trophyGardenGrassEncounterIndexPt;
+ }
+ }
+
+ public static List<Integer> getMarshGrassEncounterIndices(int romType) {
+ if (romType == Gen4Constants.Type_DP) {
+ return marshGrassEncounterIndicesDP;
+ } else {
+ return marshGrassEncounterIndicesPt;
+ }
+ }
+
+ public static int getTextCharsPerLine(int romType) {
+ if (romType == Gen4Constants.Type_HGSS) {
+ return hgssTextCharsPerLine;
+ } else {
+ return dpptTextCharsPerLine;
+ }
+ }
+
+ public static final Map<Integer,Integer> balancedItemPrices = Stream.of(new Integer[][] {
+ // Skip item index 0. All prices divided by 10
+ {Items.masterBall, 300},
+ {Items.ultraBall, 120},
+ {Items.greatBall, 60},
+ {Items.pokeBall, 20},
+ {Items.safariBall, 50},
+ {Items.netBall, 100},
+ {Items.diveBall, 100},
+ {Items.nestBall, 100},
+ {Items.repeatBall, 100},
+ {Items.timerBall, 100},
+ {Items.luxuryBall, 100},
+ {Items.premierBall, 20},
+ {Items.duskBall, 100},
+ {Items.healBall, 30},
+ {Items.quickBall, 100},
+ {Items.cherishBall, 20},
+ {Items.potion, 30},
+ {Items.antidote, 10},
+ {Items.burnHeal, 25},
+ {Items.iceHeal, 25},
+ {Items.awakening, 25},
+ {Items.paralyzeHeal, 20},
+ {Items.fullRestore, 300},
+ {Items.maxPotion, 250},
+ {Items.hyperPotion, 120},
+ {Items.superPotion, 70},
+ {Items.fullHeal, 60},
+ {Items.revive, 150},
+ {Items.maxRevive, 400},
+ {Items.freshWater, 40},
+ {Items.sodaPop, 60},
+ {Items.lemonade, 70},
+ {Items.moomooMilk, 80},
+ {Items.energyPowder, 40},
+ {Items.energyRoot, 110},
+ {Items.healPowder, 45},
+ {Items.revivalHerb, 280},
+ {Items.ether, 300},
+ {Items.maxEther, 450},
+ {Items.elixir, 1500},
+ {Items.maxElixir, 1800},
+ {Items.lavaCookie, 45},
+ {Items.berryJuice, 10},
+ {Items.sacredAsh, 1000},
+ {Items.hpUp, 980},
+ {Items.protein, 980},
+ {Items.iron, 980},
+ {Items.carbos, 980},
+ {Items.calcium, 980},
+ {Items.rareCandy, 1000},
+ {Items.ppUp, 980},
+ {Items.zinc, 980},
+ {Items.ppMax, 2490},
+ {Items.oldGateau, 45},
+ {Items.guardSpec, 70},
+ {Items.direHit, 65},
+ {Items.xAttack, 50},
+ {Items.xDefense, 55},
+ {Items.xSpeed, 35},
+ {Items.xAccuracy, 95},
+ {Items.xSpAtk, 35},
+ {Items.xSpDef, 35},
+ {Items.pokeDoll, 100},
+ {Items.fluffyTail, 100},
+ {Items.blueFlute, 2},
+ {Items.yellowFlute, 2},
+ {Items.redFlute, 2},
+ {Items.blackFlute, 2},
+ {Items.whiteFlute, 2},
+ {Items.shoalSalt, 2},
+ {Items.shoalShell, 2},
+ {Items.redShard, 40},
+ {Items.blueShard, 40},
+ {Items.yellowShard, 40},
+ {Items.greenShard, 40},
+ {Items.superRepel, 50},
+ {Items.maxRepel, 70},
+ {Items.escapeRope, 55},
+ {Items.repel, 35},
+ {Items.sunStone, 300},
+ {Items.moonStone, 300},
+ {Items.fireStone, 300},
+ {Items.thunderStone, 300},
+ {Items.waterStone, 300},
+ {Items.leafStone, 300},
+ {Items.tinyMushroom, 50},
+ {Items.bigMushroom, 500},
+ {Items.pearl, 140},
+ {Items.bigPearl, 750},
+ {Items.stardust, 200},
+ {Items.starPiece, 980},
+ {Items.nugget, 1000},
+ {Items.heartScale, 500},
+ {Items.honey, 50},
+ {Items.growthMulch, 20},
+ {Items.dampMulch, 20},
+ {Items.stableMulch, 20},
+ {Items.gooeyMulch, 20},
+ {Items.rootFossil, 500},
+ {Items.clawFossil, 500},
+ {Items.helixFossil, 500},
+ {Items.domeFossil, 500},
+ {Items.oldAmber, 800},
+ {Items.armorFossil, 500},
+ {Items.skullFossil, 500},
+ {Items.rareBone, 1000},
+ {Items.shinyStone, 300},
+ {Items.duskStone, 300},
+ {Items.dawnStone, 300},
+ {Items.ovalStone, 300},
+ {Items.oddKeystone, 210},
+ {Items.griseousOrb, 1000},
+ {Items.tea, 0}, // unused in Gen 4
+ {Items.unused114, 0},
+ {Items.autograph, 0}, // unused in Gen 4
+ {Items.douseDrive, 0}, // unused in Gen 4
+ {Items.shockDrive, 0}, // unused in Gen 4
+ {Items.burnDrive, 0}, // unused in Gen 4
+ {Items.chillDrive, 0}, // unused in Gen 4
+ {Items.unused120, 0}, // unused in Gen 4
+ {Items.pokemonBox, 0}, // unused in Gen 4
+ {Items.medicinePocket, 0}, // unused in Gen 4
+ {Items.tmCase, 0}, // unused in Gen 4
+ {Items.candyJar, 0}, // unused in Gen 4
+ {Items.powerUpPocket, 0}, // unused in Gen 4
+ {Items.clothingTrunk, 0}, // unused in Gen 4
+ {Items.catchingPocket, 0}, // unused in Gen 4
+ {Items.battlePocket, 0}, // unused in Gen 4
+ {Items.unused129, 0},
+ {Items.unused130, 0},
+ {Items.unused131, 0},
+ {Items.unused132, 0},
+ {Items.unused133, 0},
+ {Items.sweetHeart, 0}, // unused in Gen 4
+ {Items.adamantOrb, 1000},
+ {Items.lustrousOrb, 1000},
+ {Items.mail1, 5},
+ {Items.mail2, 5},
+ {Items.mail3, 5},
+ {Items.mail4, 5},
+ {Items.mail5, 5},
+ {Items.mail6, 5},
+ {Items.mail7, 5},
+ {Items.mail8, 5},
+ {Items.mail9, 5},
+ {Items.mail10, 5},
+ {Items.mail11, 5},
+ {Items.mail12, 5},
+ {Items.cheriBerry, 20},
+ {Items.chestoBerry, 25},
+ {Items.pechaBerry, 10},
+ {Items.rawstBerry, 25},
+ {Items.aspearBerry, 25},
+ {Items.leppaBerry, 300},
+ {Items.oranBerry, 5},
+ {Items.persimBerry, 20},
+ {Items.lumBerry, 50},
+ {Items.sitrusBerry, 50},
+ {Items.figyBerry, 10},
+ {Items.wikiBerry, 10},
+ {Items.magoBerry, 10},
+ {Items.aguavBerry, 10},
+ {Items.iapapaBerry, 10},
+ {Items.razzBerry, 50},
+ {Items.blukBerry, 50},
+ {Items.nanabBerry, 50},
+ {Items.wepearBerry, 50},
+ {Items.pinapBerry, 50},
+ {Items.pomegBerry, 50},
+ {Items.kelpsyBerry, 50},
+ {Items.qualotBerry, 50},
+ {Items.hondewBerry, 50},
+ {Items.grepaBerry, 50},
+ {Items.tamatoBerry, 50},
+ {Items.cornnBerry, 50},
+ {Items.magostBerry, 50},
+ {Items.rabutaBerry, 50},
+ {Items.nomelBerry, 50},
+ {Items.spelonBerry, 50},
+ {Items.pamtreBerry, 50},
+ {Items.watmelBerry, 50},
+ {Items.durinBerry, 50},
+ {Items.belueBerry, 50},
+ {Items.occaBerry, 100},
+ {Items.passhoBerry, 100},
+ {Items.wacanBerry, 100},
+ {Items.rindoBerry, 100},
+ {Items.yacheBerry, 100},
+ {Items.chopleBerry, 100},
+ {Items.kebiaBerry, 100},
+ {Items.shucaBerry, 100},
+ {Items.cobaBerry, 100},
+ {Items.payapaBerry, 100},
+ {Items.tangaBerry, 100},
+ {Items.chartiBerry, 100},
+ {Items.kasibBerry, 100},
+ {Items.habanBerry, 100},
+ {Items.colburBerry, 100},
+ {Items.babiriBerry, 100},
+ {Items.chilanBerry, 100},
+ {Items.liechiBerry, 100},
+ {Items.ganlonBerry, 100},
+ {Items.salacBerry, 100},
+ {Items.petayaBerry, 100},
+ {Items.apicotBerry, 100},
+ {Items.lansatBerry, 100},
+ {Items.starfBerry, 100},
+ {Items.enigmaBerry, 100},
+ {Items.micleBerry, 100},
+ {Items.custapBerry, 100},
+ {Items.jabocaBerry, 100},
+ {Items.rowapBerry, 100},
+ {Items.brightPowder, 300},
+ {Items.whiteHerb, 100},
+ {Items.machoBrace, 300},
+ {Items.expShare, 600},
+ {Items.quickClaw, 450},
+ {Items.sootheBell, 100},
+ {Items.mentalHerb, 100},
+ {Items.choiceBand, 1000},
+ {Items.kingsRock, 500},
+ {Items.silverPowder, 200},
+ {Items.amuletCoin, 1500},
+ {Items.cleanseTag, 100},
+ {Items.soulDew, 20},
+ {Items.deepSeaTooth, 300},
+ {Items.deepSeaScale, 300},
+ {Items.smokeBall, 20},
+ {Items.everstone, 20},
+ {Items.focusBand, 300},
+ {Items.luckyEgg, 1000},
+ {Items.scopeLens, 500},
+ {Items.metalCoat, 300},
+ {Items.leftovers, 1000},
+ {Items.dragonScale, 300},
+ {Items.lightBall, 10},
+ {Items.softSand, 200},
+ {Items.hardStone, 200},
+ {Items.miracleSeed, 200},
+ {Items.blackGlasses, 200},
+ {Items.blackBelt, 200},
+ {Items.magnet, 200},
+ {Items.mysticWater, 200},
+ {Items.sharpBeak, 200},
+ {Items.poisonBarb, 200},
+ {Items.neverMeltIce, 200},
+ {Items.spellTag, 200},
+ {Items.twistedSpoon, 200},
+ {Items.charcoal, 200},
+ {Items.dragonFang, 200},
+ {Items.silkScarf, 200},
+ {Items.upgrade, 300},
+ {Items.shellBell, 600},
+ {Items.seaIncense, 200},
+ {Items.laxIncense, 300},
+ {Items.luckyPunch, 1},
+ {Items.metalPowder, 1},
+ {Items.thickClub, 50},
+ {Items.leek, 20},
+ {Items.redScarf, 10},
+ {Items.blueScarf, 10},
+ {Items.pinkScarf, 10},
+ {Items.greenScarf, 10},
+ {Items.yellowScarf, 10},
+ {Items.wideLens, 150},
+ {Items.muscleBand, 200},
+ {Items.wiseGlasses, 200},
+ {Items.expertBelt, 600},
+ {Items.lightClay, 150},
+ {Items.lifeOrb, 1000},
+ {Items.powerHerb, 100},
+ {Items.toxicOrb, 150},
+ {Items.flameOrb, 150},
+ {Items.quickPowder, 1},
+ {Items.focusSash, 200},
+ {Items.zoomLens, 150},
+ {Items.metronome, 300},
+ {Items.ironBall, 100},
+ {Items.laggingTail, 100},
+ {Items.destinyKnot, 150},
+ {Items.blackSludge, 500},
+ {Items.icyRock, 20},
+ {Items.smoothRock, 20},
+ {Items.heatRock, 20},
+ {Items.dampRock, 20},
+ {Items.gripClaw, 150},
+ {Items.choiceScarf, 1000},
+ {Items.stickyBarb, 150},
+ {Items.powerBracer, 300},
+ {Items.powerBelt, 300},
+ {Items.powerLens, 300},
+ {Items.powerBand, 300},
+ {Items.powerAnklet, 300},
+ {Items.powerWeight, 300},
+ {Items.shedShell, 50},
+ {Items.bigRoot, 150},
+ {Items.choiceSpecs, 1000},
+ {Items.flamePlate, 200},
+ {Items.splashPlate, 200},
+ {Items.zapPlate, 200},
+ {Items.meadowPlate, 200},
+ {Items.iciclePlate, 200},
+ {Items.fistPlate, 200},
+ {Items.toxicPlate, 200},
+ {Items.earthPlate, 200},
+ {Items.skyPlate, 200},
+ {Items.mindPlate, 200},
+ {Items.insectPlate, 200},
+ {Items.stonePlate, 200},
+ {Items.spookyPlate, 200},
+ {Items.dracoPlate, 200},
+ {Items.dreadPlate, 200},
+ {Items.ironPlate, 200},
+ {Items.oddIncense, 200},
+ {Items.rockIncense, 200},
+ {Items.fullIncense, 100},
+ {Items.waveIncense, 200},
+ {Items.roseIncense, 200},
+ {Items.luckIncense, 1500},
+ {Items.pureIncense, 100},
+ {Items.protector, 300},
+ {Items.electirizer, 300},
+ {Items.magmarizer, 300},
+ {Items.dubiousDisc, 300},
+ {Items.reaperCloth, 300},
+ {Items.razorClaw, 500},
+ {Items.razorFang, 500},
+ {Items.tm01, 300},
+ {Items.tm02, 300},
+ {Items.tm03, 300},
+ {Items.tm04, 150},
+ {Items.tm05, 100},
+ {Items.tm06, 300},
+ {Items.tm07, 200},
+ {Items.tm08, 150},
+ {Items.tm09, 200},
+ {Items.tm10, 200},
+ {Items.tm11, 200},
+ {Items.tm12, 150},
+ {Items.tm13, 300},
+ {Items.tm14, 550},
+ {Items.tm15, 750},
+ {Items.tm16, 200},
+ {Items.tm17, 200},
+ {Items.tm18, 200},
+ {Items.tm19, 300},
+ {Items.tm20, 200},
+ {Items.tm21, 100},
+ {Items.tm22, 300},
+ {Items.tm23, 300},
+ {Items.tm24, 300},
+ {Items.tm25, 550},
+ {Items.tm26, 300},
+ {Items.tm27, 100},
+ {Items.tm28, 200},
+ {Items.tm29, 300},
+ {Items.tm30, 300},
+ {Items.tm31, 300},
+ {Items.tm32, 100},
+ {Items.tm33, 200},
+ {Items.tm34, 300},
+ {Items.tm35, 300},
+ {Items.tm36, 300},
+ {Items.tm37, 200},
+ {Items.tm38, 550},
+ {Items.tm39, 200},
+ {Items.tm40, 300},
+ {Items.tm41, 150},
+ {Items.tm42, 300},
+ {Items.tm43, 200},
+ {Items.tm44, 300},
+ {Items.tm45, 300},
+ {Items.tm46, 200},
+ {Items.tm47, 300},
+ {Items.tm48, 300},
+ {Items.tm49, 150},
+ {Items.tm50, 550},
+ {Items.tm51, 200},
+ {Items.tm52, 550},
+ {Items.tm53, 300},
+ {Items.tm54, 200},
+ {Items.tm55, 300},
+ {Items.tm56, 200},
+ {Items.tm57, 300},
+ {Items.tm58, 200},
+ {Items.tm59, 300},
+ {Items.tm60, 300},
+ {Items.tm61, 200},
+ {Items.tm62, 300},
+ {Items.tm63, 200},
+ {Items.tm64, 750},
+ {Items.tm65, 300},
+ {Items.tm66, 300},
+ {Items.tm67, 100},
+ {Items.tm68, 750},
+ {Items.tm69, 150},
+ {Items.tm70, 100},
+ {Items.tm71, 300},
+ {Items.tm72, 300},
+ {Items.tm73, 200},
+ {Items.tm74, 300},
+ {Items.tm75, 150},
+ {Items.tm76, 200},
+ {Items.tm77, 150},
+ {Items.tm78, 150},
+ {Items.tm79, 300},
+ {Items.tm80, 300},
+ {Items.tm81, 300},
+ {Items.tm82, 100},
+ {Items.tm83, 200},
+ {Items.tm84, 300},
+ {Items.tm85, 300},
+ {Items.tm86, 300},
+ {Items.tm87, 150},
+ {Items.tm88, 300},
+ {Items.tm89, 300},
+ {Items.tm90, 200},
+ {Items.tm91, 300},
+ {Items.tm92, 550},
+ {Items.hm01, 0},
+ {Items.hm02, 0},
+ {Items.hm03, 0},
+ {Items.hm04, 0},
+ {Items.hm05, 0},
+ {Items.hm06, 0},
+ {Items.hm07, 0},
+ {Items.hm08, 0},
+ {Items.explorerKit, 0},
+ {Items.lootSack, 0},
+ {Items.ruleBook, 0},
+ {Items.pokeRadar, 0},
+ {Items.pointCard, 0},
+ {Items.journal, 0},
+ {Items.sealCase, 0},
+ {Items.fashionCase, 0},
+ {Items.sealBag, 0},
+ {Items.palPad, 0},
+ {Items.worksKey, 0},
+ {Items.oldCharm, 0},
+ {Items.galacticKey, 0},
+ {Items.redChain, 0},
+ {Items.townMap, 0},
+ {Items.vsSeeker, 0},
+ {Items.coinCase, 0},
+ {Items.oldRod, 0},
+ {Items.goodRod, 0},
+ {Items.superRod, 0},
+ {Items.sprayduck, 0},
+ {Items.poffinCase, 0},
+ {Items.bike, 0},
+ {Items.suiteKey, 0},
+ {Items.oaksLetter, 0},
+ {Items.lunarWing, 0},
+ {Items.memberCard, 0},
+ {Items.azureFlute, 0},
+ {Items.ssTicketJohto, 0},
+ {Items.contestPass, 0},
+ {Items.magmaStone, 0},
+ {Items.parcelSinnoh, 0},
+ {Items.coupon1, 0},
+ {Items.coupon2, 0},
+ {Items.coupon3, 0},
+ {Items.storageKeySinnoh, 0},
+ {Items.secretPotion, 0},
+ {Items.vsRecorder, 0},
+ {Items.gracidea, 0},
+ {Items.secretKeySinnoh, 0},
+ {Items.apricornBox, 0},
+ {Items.unownReport, 0},
+ {Items.berryPots, 0},
+ {Items.dowsingMachine, 0},
+ {Items.blueCard, 0},
+ {Items.slowpokeTail, 0},
+ {Items.clearBell, 0},
+ {Items.cardKeyJohto, 0},
+ {Items.basementKeyJohto, 0},
+ {Items.squirtBottle, 0},
+ {Items.redScale, 0},
+ {Items.lostItem, 0},
+ {Items.pass, 0},
+ {Items.machinePart, 0},
+ {Items.silverWing, 0},
+ {Items.rainbowWing, 0},
+ {Items.mysteryEgg, 0},
+ {Items.redApricorn, 2},
+ {Items.blueApricorn, 2},
+ {Items.yellowApricorn, 2},
+ {Items.greenApricorn, 2},
+ {Items.pinkApricorn, 2},
+ {Items.whiteApricorn, 2},
+ {Items.blackApricorn, 2},
+ {Items.fastBall, 30},
+ {Items.levelBall, 30},
+ {Items.lureBall, 30},
+ {Items.heavyBall, 30},
+ {Items.loveBall, 30},
+ {Items.friendBall, 30},
+ {Items.moonBall, 30},
+ {Items.sportBall, 30},
+ {Items.parkBall, 0},
+ {Items.photoAlbum, 0},
+ {Items.gbSounds, 0},
+ {Items.tidalBell, 0},
+ {Items.rageCandyBar, 0},
+ {Items.dataCard01, 0},
+ {Items.dataCard02, 0},
+ {Items.dataCard03, 0},
+ {Items.dataCard04, 0},
+ {Items.dataCard05, 0},
+ {Items.dataCard06, 0},
+ {Items.dataCard07, 0},
+ {Items.dataCard08, 0},
+ {Items.dataCard09, 0},
+ {Items.dataCard10, 0},
+ {Items.dataCard11, 0},
+ {Items.dataCard12, 0},
+ {Items.dataCard13, 0},
+ {Items.dataCard14, 0},
+ {Items.dataCard15, 0},
+ {Items.dataCard16, 0},
+ {Items.dataCard17, 0},
+ {Items.dataCard18, 0},
+ {Items.dataCard19, 0},
+ {Items.dataCard20, 0},
+ {Items.dataCard21, 0},
+ {Items.dataCard22, 0},
+ {Items.dataCard23, 0},
+ {Items.dataCard24, 0},
+ {Items.dataCard25, 0},
+ {Items.dataCard26, 0},
+ {Items.dataCard27, 0},
+ {Items.jadeOrb, 0},
+ {Items.lockCapsule, 0},
+ {Items.redOrb, 0},
+ {Items.blueOrb, 0},
+ {Items.enigmaStone, 0},
+ }).collect(Collectors.toMap(kv -> kv[0], kv -> kv[1]));
+
+ public static final Type[] typeTable = constructTypeTable();
+
+ private static Type[] constructTypeTable() {
+ Type[] table = new Type[256];
+ table[0x00] = Type.NORMAL;
+ table[0x01] = Type.FIGHTING;
+ table[0x02] = Type.FLYING;
+ table[0x03] = Type.POISON;
+ table[0x04] = Type.GROUND;
+ table[0x05] = Type.ROCK;
+ table[0x06] = Type.BUG;
+ table[0x07] = Type.GHOST;
+ table[0x08] = Type.STEEL;
+ table[0x0A] = Type.FIRE;
+ table[0x0B] = Type.WATER;
+ table[0x0C] = Type.GRASS;
+ table[0x0D] = Type.ELECTRIC;
+ table[0x0E] = Type.PSYCHIC;
+ table[0x0F] = Type.ICE;
+ table[0x10] = Type.DRAGON;
+ table[0x11] = Type.DARK;
+ return table;
+ }
+
+ public static byte typeToByte(Type type) {
+ if (type == null) {
+ return 0x09; // ???-type
+ }
+ switch (type) {
+ case NORMAL:
+ return 0x00;
+ case FIGHTING:
+ return 0x01;
+ case FLYING:
+ return 0x02;
+ case POISON:
+ return 0x03;
+ case GROUND:
+ return 0x04;
+ case ROCK:
+ return 0x05;
+ case BUG:
+ return 0x06;
+ case GHOST:
+ return 0x07;
+ case FIRE:
+ return 0x0A;
+ case WATER:
+ return 0x0B;
+ case GRASS:
+ return 0x0C;
+ case ELECTRIC:
+ return 0x0D;
+ case PSYCHIC:
+ return 0x0E;
+ case ICE:
+ return 0x0F;
+ case DRAGON:
+ return 0x10;
+ case STEEL:
+ return 0x08;
+ case DARK:
+ return 0x11;
+ default:
+ return 0; // normal by default
+ }
+ }
+
+ public static int getFormeCount(int romType) {
+ if (romType == Type_DP) {
+ return dpFormeCount;
+ } else if (romType == Type_Plat || romType == Type_HGSS) {
+ return platHgSsFormeCount;
+ }
+ return 0;
+ }
+
+ private static Map<Integer,String> setupFormeSuffixes() {
+ Map<Integer,String> formeSuffixes = new HashMap<>();
+ formeSuffixes.put(Species.Gen4Formes.deoxysA + formeOffset,"-A");
+ formeSuffixes.put(Species.Gen4Formes.deoxysD + formeOffset,"-D");
+ formeSuffixes.put(Species.Gen4Formes.deoxysS + formeOffset,"-S");
+ formeSuffixes.put(Species.Gen4Formes.wormadamS + formeOffset,"-S");
+ formeSuffixes.put(Species.Gen4Formes.wormadamT + formeOffset,"-T");
+ formeSuffixes.put(Species.Gen4Formes.giratinaO + formeOffset,"-O");
+ formeSuffixes.put(Species.Gen4Formes.shayminS + formeOffset,"-S");
+ formeSuffixes.put(Species.Gen4Formes.rotomH + formeOffset,"-H");
+ formeSuffixes.put(Species.Gen4Formes.rotomW + formeOffset,"-W");
+ formeSuffixes.put(Species.Gen4Formes.rotomFr + formeOffset,"-Fr");
+ formeSuffixes.put(Species.Gen4Formes.rotomFa + formeOffset,"-Fa");
+ formeSuffixes.put(Species.Gen4Formes.rotomM + formeOffset,"-M");
+ return formeSuffixes;
+ }
+
+ private static Map<Integer,FormeInfo> setupFormeMappings() {
+ Map<Integer,FormeInfo> formeMappings = new TreeMap<>();
+
+ formeMappings.put(Species.Gen4Formes.deoxysA + formeOffset,new FormeInfo(Species.deoxys,1, 0));
+ formeMappings.put(Species.Gen4Formes.deoxysD + formeOffset,new FormeInfo(Species.deoxys,2, 0));
+ formeMappings.put(Species.Gen4Formes.deoxysS + formeOffset,new FormeInfo(Species.deoxys,3, 0));
+ formeMappings.put(Species.Gen4Formes.wormadamS + formeOffset,new FormeInfo(Species.wormadam,1, 0));
+ formeMappings.put(Species.Gen4Formes.wormadamT + formeOffset,new FormeInfo(Species.wormadam,2, 0));
+ formeMappings.put(Species.Gen4Formes.giratinaO + formeOffset,new FormeInfo(Species.giratina,1, 0));
+ formeMappings.put(Species.Gen4Formes.shayminS + formeOffset,new FormeInfo(Species.shaymin,1, 0));
+ formeMappings.put(Species.Gen4Formes.rotomH + formeOffset,new FormeInfo(Species.rotom,1, 0));
+ formeMappings.put(Species.Gen4Formes.rotomW + formeOffset,new FormeInfo(Species.rotom,2, 0));
+ formeMappings.put(Species.Gen4Formes.rotomFr + formeOffset,new FormeInfo(Species.rotom,3, 0));
+ formeMappings.put(Species.Gen4Formes.rotomFa + formeOffset,new FormeInfo(Species.rotom,4, 0));
+ formeMappings.put(Species.Gen4Formes.rotomM + formeOffset,new FormeInfo(Species.rotom,5, 0));
+
+ return formeMappings;
+ }
+
+ private static Map<Integer,Integer> setupCosmeticForms() {
+ Map<Integer,Integer> cosmeticForms = new TreeMap<>();
+
+ cosmeticForms.put(Species.unown, 28);
+ cosmeticForms.put(Species.burmy, 3);
+ cosmeticForms.put(Species.shellos, 2);
+ cosmeticForms.put(Species.gastrodon, 2);
+ return cosmeticForms;
+ }
+
+ private static Map<Integer,Map<Integer,String>> setupFormeSuffixesByBaseForme() {
+ Map<Integer,Map<Integer,String>> map = new HashMap<>();
+
+ Map<Integer,String> deoxysMap = new HashMap<>();
+ deoxysMap.put(1,"-A");
+ deoxysMap.put(2,"-D");
+ deoxysMap.put(3,"-S");
+ map.put(Species.deoxys,deoxysMap);
+
+ Map<Integer,String> wormadamMap = new HashMap<>();
+ wormadamMap.put(1,"-S");
+ wormadamMap.put(2,"-T");
+ map.put(Species.wormadam,wormadamMap);
+
+ Map<Integer,String> shayminMap = new HashMap<>();
+ shayminMap.put(1,"-S");
+ map.put(Species.shaymin,shayminMap);
+
+ Map<Integer,String> giratinaMap = new HashMap<>();
+ giratinaMap.put(1,"-O");
+ map.put(Species.giratina,giratinaMap);
+
+ Map<Integer,String> rotomMap = new HashMap<>();
+ rotomMap.put(1,"-H");
+ rotomMap.put(2,"-W");
+ rotomMap.put(3,"-Fr");
+ rotomMap.put(4,"-Fa");
+ rotomMap.put(5,"-M");
+ map.put(Species.rotom,rotomMap);
+
+ return map;
+ }
+
+ private static Map<Integer,String> setupDummyFormeSuffixes() {
+ Map<Integer,String> m = new HashMap<>();
+ m.put(0,"");
+ return m;
+ }
+
+ private static Map<Integer,Map<Integer,Integer>> setupAbsolutePokeNumsByBaseForme() {
+ Map<Integer,Map<Integer,Integer>> map = new HashMap<>();
+
+ Map<Integer,Integer> deoxysMap = new HashMap<>();
+ deoxysMap.put(1,Species.Gen4Formes.deoxysA);
+ deoxysMap.put(2,Species.Gen4Formes.deoxysD);
+ deoxysMap.put(3,Species.Gen4Formes.deoxysS);
+ map.put(Species.deoxys, deoxysMap);
+
+ Map<Integer,Integer> wormadamMap = new HashMap<>();
+ wormadamMap.put(1,Species.Gen4Formes.wormadamS);
+ wormadamMap.put(2,Species.Gen4Formes.wormadamT);
+ map.put(Species.wormadam, wormadamMap);
+
+ Map<Integer,Integer> giratinaMap = new HashMap<>();
+ giratinaMap.put(1,Species.Gen4Formes.giratinaO);
+ map.put(Species.giratina, giratinaMap);
+
+ Map<Integer,Integer> shayminMap = new HashMap<>();
+ shayminMap.put(1,Species.Gen4Formes.shayminS);
+ map.put(Species.shaymin, shayminMap);
+
+ Map<Integer,Integer> rotomMap = new HashMap<>();
+ rotomMap.put(1,Species.Gen4Formes.rotomH);
+ rotomMap.put(2,Species.Gen4Formes.rotomW);
+ rotomMap.put(3,Species.Gen4Formes.rotomFr);
+ rotomMap.put(4,Species.Gen4Formes.rotomFa);
+ rotomMap.put(5,Species.Gen4Formes.rotomM);
+ map.put(Species.rotom, rotomMap);
+
+ return map;
+ }
+
+ private static Map<Integer,Integer> setupDummyAbsolutePokeNums() {
+ Map<Integer,Integer> m = new HashMap<>();
+ m.put(255,0);
+ return m;
+ }
+
+ public static void tagTrainersDP(List<Trainer> trs) {
+ // Gym Trainers
+ tag(trs, "GYM1", 0xf4, 0xf5);
+ tag(trs, "GYM2", 0x144, 0x103, 0x104, 0x15C);
+ tag(trs, "GYM3", 0x135, 0x136, 0x137, 0x138);
+ tag(trs, "GYM4", 0x1f1, 0x1f2, 0x191, 0x153, 0x125, 0x1E3);
+ tag(trs, "GYM5", 0x165, 0x145, 0x10a, 0x14a, 0x154, 0x157, 0x118, 0x11c);
+ tag(trs, "GYM6", 0x13a, 0x100, 0x101, 0x117, 0x16f, 0xe8, 0x11b);
+ tag(trs, "GYM7", 0x10c, 0x10d, 0x10e, 0x10f, 0x33b, 0x33c);
+ tag(trs, "GYM8", 0x158, 0x155, 0x12d, 0x12e, 0x12f, 0x11d, 0x119);
+
+ // Gym Leaders
+ tag(trs, 0xf6, "GYM1-LEADER");
+ tag(trs, 0x13b, "GYM2-LEADER");
+ tag(trs, 0x13d, "GYM3-LEADER"); // Maylene
+ tag(trs, 0x13c, "GYM4-LEADER"); // Wake
+ tag(trs, 0x13e, "GYM5-LEADER"); // Fantina
+ tag(trs, 0xfa, "GYM6-LEADER"); // Byron
+ tag(trs, 0x13f, "GYM7-LEADER"); // Candice
+ tag(trs, 0x140, "GYM8-LEADER"); // Volkner
+
+ // Elite 4
+ tag(trs, 0x105, "ELITE1");
+ tag(trs, 0x106, "ELITE2");
+ tag(trs, 0x107, "ELITE3");
+ tag(trs, 0x108, "ELITE4");
+ tag(trs, 0x10b, "CHAMPION");
+
+ // Rival battles (8)
+ tagRivalConsecutive(trs, "RIVAL1", 0xf8);
+ tagRivalConsecutive(trs, "RIVAL2", 0x1d7);
+ tagRivalConsecutive(trs, "RIVAL3", 0x1da);
+ tagRivalConsecutive(trs, "RIVAL4", 0x1dd);
+ // Tag battle is not following ze usual format
+ tag(trs, 0x26b, "RIVAL5-0");
+ tag(trs, 0x26c, "RIVAL5-1");
+ tag(trs, 0x25f, "RIVAL5-2");
+ // Back to normal
+ tagRivalConsecutive(trs, "RIVAL6", 0x1e0);
+ tagRivalConsecutive(trs, "RIVAL7", 0x346);
+ tagRivalConsecutive(trs, "RIVAL8", 0x349);
+
+ // Themed
+ tag(trs, "THEMED:CYRUS-LEADER", 0x193, 0x194);
+ tag(trs, "THEMED:MARS-STRONG", 0x127, 0x195, 0x210);
+ tag(trs, "THEMED:JUPITER-STRONG", 0x196, 0x197);
+ tag(trs, "THEMED:SATURN-STRONG", 0x198, 0x199);
+
+ // Lucas & Dawn tag battles
+ tagFriendConsecutive(trs, "FRIEND1", 0x265);
+ tagFriendConsecutive(trs, "FRIEND1", 0x268);
+ tagFriendConsecutive2(trs, "FRIEND2", 0x26D);
+ tagFriendConsecutive2(trs, "FRIEND2", 0x270);
+
+ }
+
+ public static void tagTrainersPt(List<Trainer> trs) {
+ // Gym Trainers
+ tag(trs, "GYM1", 0xf4, 0xf5);
+ tag(trs, "GYM2", 0x144, 0x103, 0x104, 0x15C);
+ tag(trs, "GYM3", 0x165, 0x145, 0x154, 0x157, 0x118, 0x11c);
+ tag(trs, "GYM4", 0x135, 0x136, 0x137, 0x138);
+ tag(trs, "GYM5", 0x1f1, 0x1f2, 0x191, 0x153, 0x125, 0x1E3);
+ tag(trs, "GYM6", 0x13a, 0x100, 0x101, 0x117, 0x16f, 0xe8, 0x11b);
+ tag(trs, "GYM7", 0x10c, 0x10d, 0x10e, 0x10f, 0x33b, 0x33c);
+ tag(trs, "GYM8", 0x158, 0x155, 0x12d, 0x12e, 0x12f, 0x11d, 0x119, 0x14b);
+
+ // Gym Leaders
+ tag(trs, 0xf6, "GYM1-LEADER");
+ tag(trs, 0x13b, "GYM2-LEADER");
+ tag(trs, 0x13e, "GYM3-LEADER"); // Fantina
+ tag(trs, 0x13d, "GYM4-LEADER"); // Maylene
+ tag(trs, 0x13c, "GYM5-LEADER"); // Wake
+ tag(trs, 0xfa, "GYM6-LEADER"); // Byron
+ tag(trs, 0x13f, "GYM7-LEADER"); // Candice
+ tag(trs, 0x140, "GYM8-LEADER"); // Volkner
+
+ // Elite 4
+ tag(trs, 0x105, "ELITE1");
+ tag(trs, 0x106, "ELITE2");
+ tag(trs, 0x107, "ELITE3");
+ tag(trs, 0x108, "ELITE4");
+ tag(trs, 0x10b, "CHAMPION");
+
+ // Rival battles (10)
+ tagRivalConsecutive(trs, "RIVAL1", 0x353);
+ tagRivalConsecutive(trs, "RIVAL2", 0xf8);
+ tagRivalConsecutive(trs, "RIVAL3", 0x1d7);
+ tagRivalConsecutive(trs, "RIVAL4", 0x1da);
+ tagRivalConsecutive(trs, "RIVAL5", 0x1dd);
+ // Tag battle is not following ze usual format
+ tag(trs, 0x26b, "RIVAL6-0");
+ tag(trs, 0x26c, "RIVAL6-1");
+ tag(trs, 0x25f, "RIVAL6-2");
+ // Back to normal
+ tagRivalConsecutive(trs, "RIVAL7", 0x1e0);
+ tagRivalConsecutive(trs, "RIVAL8", 0x346);
+ tagRivalConsecutive(trs, "RIVAL9", 0x349);
+ tagRivalConsecutive(trs, "RIVAL10", 0x368);
+
+ // Battleground Gym Leaders
+ tag(trs, 0x35A, "GYM1");
+ tag(trs, 0x359, "GYM2");
+ tag(trs, 0x35C, "GYM3");
+ tag(trs, 0x356, "GYM4");
+ tag(trs, 0x35B, "GYM5");
+ tag(trs, 0x358, "GYM6");
+ tag(trs, 0x355, "GYM7");
+ tag(trs, 0x357, "GYM8");
+
+ // Match vs Volkner and Flint in Battle Frontier
+ tag(trs, 0x399, "GYM8");
+ tag(trs, 0x39A, "ELITE3");
+
+ // E4 rematch
+ tag(trs, 0x362, "ELITE1");
+ tag(trs, 0x363, "ELITE2");
+ tag(trs, 0x364, "ELITE3");
+ tag(trs, 0x365, "ELITE4");
+ tag(trs, 0x366, "CHAMPION");
+
+ // Themed
+ tag(trs, "THEMED:CYRUS-LEADER", 0x391, 0x193, 0x194);
+ tag(trs, "THEMED:MARS-STRONG", 0x127, 0x195, 0x210, 0x39e);
+ tag(trs, "THEMED:JUPITER-STRONG", 0x196, 0x197, 0x39f);
+ tag(trs, "THEMED:SATURN-STRONG", 0x198, 0x199);
+
+ // Lucas & Dawn tag battles
+ tagFriendConsecutive(trs, "FRIEND1", 0x265);
+ tagFriendConsecutive(trs, "FRIEND1", 0x268);
+ tagFriendConsecutive2(trs, "FRIEND2", 0x26D);
+ tagFriendConsecutive2(trs, "FRIEND2", 0x270);
+
+ }
+
+ public static void tagTrainersHGSS(List<Trainer> trs) {
+ // Gym Trainers
+ tag(trs, "GYM1", 0x32, 0x1D);
+ tag(trs, "GYM2", 0x43, 0x44, 0x45, 0x0a);
+ tag(trs, "GYM3", 0x05, 0x46, 0x47, 0x16);
+ tag(trs, "GYM4", 0x1ed, 0x1ee, 0x59, 0x2e);
+ tag(trs, "GYM5", 0x9c, 0x9d, 0x9f, 0xfb);
+ tag(trs, "GYM7", 0x1e0, 0x1e1, 0x1e2, 0x1e3, 0x1e4);
+ tag(trs, "GYM8", 0x6e, 0x6f, 0x70, 0x75, 0x77);
+
+ tag(trs, "GYM9", 0x134, 0x2ad);
+ tag(trs, "GYM10", 0x2a4, 0x2a5, 0x2a6, 0x129, 0x12a);
+ tag(trs, "GYM11", 0x18c, 0xe8, 0x151);
+ tag(trs, "GYM12", 0x150, 0x146, 0x164, 0x15a);
+ tag(trs, "GYM13", 0x53, 0x54, 0xb7, 0x88);
+ tag(trs, "GYM14", 0x170, 0x171, 0xe6, 0x19f);
+ tag(trs, "GYM15", 0x2b1, 0x2b2, 0x2b3, 0x2b4, 0x2b5, 0x2b6);
+ tag(trs, "GYM16", 0x2a9, 0x2aa, 0x2ab, 0x2ac);
+
+ // Gym Leaders
+ tag(trs, 0x14, "GYM1-LEADER");
+ tag(trs, 0x15, "GYM2-LEADER");
+ tag(trs, 0x1e, "GYM3-LEADER");
+ tag(trs, 0x1f, "GYM4-LEADER");
+ tag(trs, 0x22, "GYM5-LEADER");
+ tag(trs, 0x21, "GYM6-LEADER");
+ tag(trs, 0x20, "GYM7-LEADER");
+ tag(trs, 0x23, "GYM8-LEADER");
+
+ tag(trs, 0xFD, "GYM9-LEADER");
+ tag(trs, 0xFE, "GYM10-LEADER");
+ tag(trs, 0xFF, "GYM11-LEADER");
+ tag(trs, 0x100, "GYM12-LEADER");
+ tag(trs, 0x101, "GYM13-LEADER");
+ tag(trs, 0x102, "GYM14-LEADER");
+ tag(trs, 0x103, "GYM15-LEADER");
+ tag(trs, 0x105, "GYM16-LEADER");
+
+ // Elite 4
+ tag(trs, 0xf5, "ELITE1");
+ tag(trs, 0xf7, "ELITE2");
+ tag(trs, 0x1a2, "ELITE3");
+ tag(trs, 0xf6, "ELITE4");
+ tag(trs, 0xf4, "CHAMPION");
+
+ // Red
+ tag(trs, 0x104, "UBER");
+
+ // Gym Rematches
+ tag(trs, 0x2c8, "GYM1-LEADER");
+ tag(trs, 0x2c9, "GYM2-LEADER");
+ tag(trs, 0x2ca, "GYM3-LEADER");
+ tag(trs, 0x2cb, "GYM4-LEADER");
+ tag(trs, 0x2ce, "GYM5-LEADER");
+ tag(trs, 0x2cd, "GYM6-LEADER");
+ tag(trs, 0x2cc, "GYM7-LEADER");
+ tag(trs, 0x2cf, "GYM8-LEADER");
+
+ tag(trs, 0x2d0, "GYM9-LEADER");
+ tag(trs, 0x2d1, "GYM10-LEADER");
+ tag(trs, 0x2d2, "GYM11-LEADER");
+ tag(trs, 0x2d3, "GYM12-LEADER");
+ tag(trs, 0x2d4, "GYM13-LEADER");
+ tag(trs, 0x2d5, "GYM14-LEADER");
+ tag(trs, 0x2d6, "GYM15-LEADER");
+ tag(trs, 0x2d7, "GYM16-LEADER");
+
+ // Elite 4 Rematch
+ tag(trs, 0x2be, "ELITE1");
+ tag(trs, 0x2bf, "ELITE2");
+ tag(trs, 0x2c0, "ELITE3");
+ tag(trs, 0x2c1, "ELITE4");
+ tag(trs, 0x2bd, "CHAMPION");
+
+ // Rival Battles
+ tagRivalConsecutive(trs, "RIVAL1", 0x1F0);
+
+ tag(trs, 0x10a, "RIVAL2-0");
+ tag(trs, 0x10d, "RIVAL2-1");
+ tag(trs, 0x1, "RIVAL2-2");
+
+ tag(trs, 0x10B, "RIVAL3-0");
+ tag(trs, 0x10E, "RIVAL3-1");
+ tag(trs, 0x107, "RIVAL3-2");
+
+ tag(trs, 0x121, "RIVAL4-0");
+ tag(trs, 0x10f, "RIVAL4-1");
+ tag(trs, 0x120, "RIVAL4-2");
+
+ tag(trs, 0x10C, "RIVAL5-0");
+ tag(trs, 0x110, "RIVAL5-1");
+ tag(trs, 0x108, "RIVAL5-2");
+
+ tagRivalConsecutive(trs, "RIVAL6", 0x11e);
+ tagRivalConsecutive(trs, "RIVAL7", 0x2e0); // dragons den tag battle
+ tagRivalConsecutive(trs, "RIVAL8", 0x1EA);
+
+ // Clair & Lance match in Dragons Den
+ tag(trs, 0x2DE, "GYM8");
+ tag(trs, 0x2DD, "CHAMPION");
+
+ tag(trs, 0xa0, "KIMONO1-STRONG");
+ tag(trs, 0xa1, "KIMONO2-STRONG");
+ tag(trs, 0xa2, "KIMONO3-STRONG");
+ tag(trs, 0xa3, "KIMONO4-STRONG");
+ tag(trs, 0xa4, "KIMONO5-STRONG");
+
+ // Themed
+ tag(trs, "THEMED:ARIANA-STRONG", 0x1df, 0x1de);
+ tag(trs, "THEMED:PETREL-STRONG", 0x1e8, 0x1e7);
+ tag(trs, "THEMED:PROTON-STRONG", 0x1e6, 0x2c2);
+ tag(trs, "THEMED:SPROUTTOWER", 0x2b, 0x33, 0x34, 0x35, 0x36, 0x37, 0x122);
+
+ tag(trs,"LEADER",485); // Archer
+ }
+
+ private static void tag(List<Trainer> allTrainers, int number, String tag) {
+ allTrainers.get(number - 1).tag = tag;
+ }
+
+ private static void tag(List<Trainer> allTrainers, String tag, int... numbers) {
+ for (int num : numbers) {
+ allTrainers.get(num - 1).tag = tag;
+ }
+ }
+
+ private static void tagRivalConsecutive(List<Trainer> allTrainers, String tag, int offsetFire) {
+ allTrainers.get(offsetFire - 1).tag = tag + "-0";
+ allTrainers.get(offsetFire).tag = tag + "-1";
+ allTrainers.get(offsetFire - 2).tag = tag + "-2";
+
+ }
+
+ private static void tagFriendConsecutive(List<Trainer> allTrainers, String tag, int offsetGrass) {
+ allTrainers.get(offsetGrass - 1).tag = tag + "-1";
+ allTrainers.get(offsetGrass).tag = tag + "-2";
+ allTrainers.get(offsetGrass + 1).tag = tag + "-0";
+
+ }
+
+ private static void tagFriendConsecutive2(List<Trainer> allTrainers, String tag, int offsetWater) {
+ allTrainers.get(offsetWater - 1).tag = tag + "-0";
+ allTrainers.get(offsetWater).tag = tag + "-1";
+ allTrainers.get(offsetWater + 1).tag = tag + "-2";
+
+ }
+
+ public static void setMultiBattleStatusDP(List<Trainer> trs) {
+ // 407 + 528: Commander Mars and Commander Jupiter Multi Battle on Spear Pillar
+ // 414 + 415: Galactic Grunts in Jubilife City
+ // 419 + 426: Galactic Grunts in Lake Verity
+ // 420 + 427: Galactic Grunts in Lake Verity
+ // 521 + 527: Galactic Grunts on Spear Pillar
+ // 561 + 590: Double Battle with Dragon Tamer Drake and Black Belt Jarrett
+ // 835 + 836: Galactic Grunts in Iron Island
+ // 848 + 849: Galactic Grunts in Veilstone City
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.ALWAYS, 414, 415, 419, 420, 426, 427, 521, 527,
+ 528, 561, 590, 835, 836, 848, 849
+ );
+
+ // 34 + 35: Potential Double Battle with Camper Anthony and Picnicker Lauren
+ // 82 + 83: Potential Double Battle with Rich Boy Jason and Lady Melissa
+ // 84 + 85: Potential Double Battle with Gentleman Jeremy and Socialite Reina
+ // 95 + 96: Potential Double Battle with PKMN Ranger Jeffrey and PKMN Ranger Allison
+ // 104 + 106: Potential Double Battle with Swimmer Evan and Swimmer Mary
+ // 160 + 494: Potential Double Battle with Swimmer Erik and Swimmer Claire
+ // 186 + 191: Potential Double Battle with Swimmer Colton and Swimmer Paige
+ // 201 + 204: Potential Double Battle with Bug Catcher Jack and Lass Briana
+ // 202 + 203: Potential Double Battle with Bug Catcher Phillip and Bug Catcher Donald
+ // 205 + 206: Potential Double Battle with Psychic Elijah and Psychic Lindsey
+ // 278 + 287: Potential Double Battle with Ace Trainer Maya and Ace Trainer Dennis
+ // 337 + 359: Potential Double Battle with Sailor Marc and Tuber Conner
+ // 358 + 360: Potential Double Battle with Tuber Trenton and Tuber Mariel
+ // 372 + 445: Potential Double Battle with Battle Girl Tyler and Black Belt Kendal
+ // 373 + 386: Potential Double Battle with Bird Keeper Autumn and Dragon Tamer Joe
+ // 379 + 459: Potential Double Battle with Camper Diego and Picnicker Ana
+ // 383 + 443: Potential Double Battle with Collector Terry and Ruin Maniac Gerald
+ // 388 + 392: Potential Double Battle with Ace Trainer Jonah and Ace Trainer Brenda
+ // 389 + 393: Potential Double Battle with Ace Trainer Micah and Ace Trainer Brandi
+ // 390 + 394: Potential Double Battle with Ace Trainer Arthur and Ace Trainer Clarice
+ // 395 + 398: Potential Double Battle with Psychic Kody and Psychic Rachael
+ // 396 + 399: Potential Double Battle with Psychic Landon and Psychic Desiree
+ // 397 + 400: Potential Double Battle with Psychic Deandre and Psychic Kendra
+ // 446 + 499: Potential Double Battle with Black Belt Eddie and Veteran Terrell
+ // 447 + 500: Potential Double Battle with Black Belt Willie and Veteran Brenden
+ // 450 + 496: Potential Double Battle with Lass Cassidy and Youngster Wayne
+ // 452 + 453: Potential Double Battle with Hiker Damon and Hiker Maurice
+ // 454 + 455: Potential Double Battle with Hiker Reginald and Hiker Lorenzo
+ // 505 + 506: Potential Double Battle with Worker Brendon and Worker Quentin
+ // 555 + 560: Potential Double Battle with Bird Keeper Geneva and Dragon Tamer Stanley
+ // 556 + 589: Potential Double Battle with Bird Keeper Krystal and Black Belt Ray
+ // 562 + 606: Potential Double Battle with Dragon Tamer Kenny and Veteran Harlan
+ // 566 + 575: Potential Double Battle with Ace Trainer Felix and Ace Trainer Dana
+ // 569 + 579: Potential Double Battle with Ace Trainer Keenan and Ace Trainer Kassandra
+ // 570 + 580: Potential Double Battle with Ace Trainer Stefan and Ace Trainer Jasmin
+ // 571 + 581: Potential Double Battle with Ace Trainer Skylar and Ace Trainer Natasha
+ // 572 + 582: Potential Double Battle with Ace Trainer Abel and Ace Trainer Monique
+ // 584 + 586: Potential Double Battle with Psychic Sterling and Psychic Chelsey
+ // 591 + 596: Potential Double Battle with PKMN Ranger Kyler and PKMN Ranger Krista
+ // 594 + 554/585: Potential Double Battle with PKMN Ranger Ashlee and either Bird Keeper Audrey or Psychic Daisy
+ // 599 + 602: Potential Double Battle with Swimmer Sam and Swimmer Sophia
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.POTENTIAL, 34, 35, 82, 83, 84, 85, 95, 96, 104,
+ 106, 160, 186, 191, 201, 202, 203, 204, 205, 206, 278, 287, 337, 358, 359, 360, 372, 373, 379, 383, 386,
+ 388, 389, 390, 392, 393, 394, 395, 396, 397, 398, 399, 400, 443, 445, 446, 447, 450, 452, 453, 454, 455,
+ 459, 494, 496, 499, 500, 505, 506, 554, 555, 556, 560, 562, 566, 569, 570, 571, 572, 575, 579, 580, 581,
+ 582, 584, 585, 586, 589, 591, 594, 596, 599, 602, 606
+ );
+ }
+
+ public static void setMultiBattleStatusPt(List<Trainer> trs) {
+ // In addition to every single trainer listed in setCouldBeMultiBattleDP...
+ // 921 + 922: Elite Four Flint and Leader Volkner Multi Battle in the Fight Area
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.ALWAYS, 414, 415, 419, 420, 426, 427, 521, 527,
+ 528, 561, 590, 835, 836, 848, 849, 921, 922
+ );
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.POTENTIAL, 34, 35, 82, 83, 84, 85, 95, 96, 104,
+ 106, 160, 186, 191, 201, 202, 203, 204, 205, 206, 278, 287, 337, 358, 359, 360, 372, 373, 379, 383, 386,
+ 388, 389, 390, 392, 393, 394, 395, 396, 397, 398, 399, 400, 443, 445, 446, 447, 450, 452, 453, 454, 455,
+ 459, 494, 496, 499, 500, 505, 506, 554, 555, 556, 560, 562, 566, 569, 570, 571, 572, 575, 579, 580, 581,
+ 582, 584, 585, 586, 589, 591, 594, 596, 599, 602, 606
+ );
+ }
+
+ public static void setMultiBattleStatusHGSS(List<Trainer> trs) {
+ // 120 + 417: Double Battle with Ace Trainer Irene and Ace Trainer Jenn
+ // 354 + 355: Double Battle with Lass Laura and Lass Shannon
+ // 479 + 499: Multi Battle with Executive Ariana and Team Rocket Grunt in Team Rocket HQ
+ // 679 + 680: Double Battle with Beauty Callie and Beauty Kassandra
+ // 733 + 734: Multi Battle with Champion Lance and Leader Clair in the Dragon's Den
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.ALWAYS, 120, 354, 355, 417, 479, 499, 679, 680, 733, 734);
+
+ // 147 + 151: Potential Double Battle with Camper Ted and Picnicker Erin
+ // 423: Potential Double Battle with Pokéfan Jeremy. His potential teammate (Pokéfan Georgia) has more than
+ // three Pokemon in the vanilla game, so we leave her be.
+ // 564 + 567: Potential Double Battle with Teacher Clarice and School Kid Torin
+ // 575 + 576: Potential Double Battle with Biker Dan and Biker Theron
+ // 577 + 579: Potential Double Battle with Biker Markey and Biker Teddy
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.POTENTIAL, 147, 151, 423, 564, 567, 575, 576, 577, 579);
+ }
+
+ private static void setMultiBattleStatus(List<Trainer> allTrainers, Trainer.MultiBattleStatus status, int... numbers) {
+ for (int num : numbers) {
+ if (allTrainers.size() > (num - 1)) {
+ allTrainers.get(num - 1).multiBattleStatus = status;
+ }
+ }
+ }
+
+}
diff --git a/src/com/pkrandom/constants/Gen5Constants.java b/src/com/pkrandom/constants/Gen5Constants.java
new file mode 100644
index 0000000..e5e39ce
--- /dev/null
+++ b/src/com/pkrandom/constants/Gen5Constants.java
@@ -0,0 +1,1948 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Gen5Constants.java - Constants for Black/White/Black 2/White 2 --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+import java.util.*;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import java.util.stream.Stream;
+
+import com.pkrandom.pokemon.ItemList;
+import com.pkrandom.pokemon.MoveCategory;
+import com.pkrandom.pokemon.Trainer;
+import com.pkrandom.pokemon.Type;
+
+public class Gen5Constants {
+
+ public static final int Type_BW = 0;
+ public static final int Type_BW2 = 1;
+
+ public static final int arm9Offset = 0x02004000;
+
+ public static final int pokemonCount = 649, moveCount = 559;
+ private static final int bw1FormeCount = 18, bw2FormeCount = 24;
+ private static final int bw1formeOffset = 0, bw2formeOffset = 35;
+
+ private static final int bw1NonPokemonBattleSpriteCount = 3;
+ private static final int bw2NonPokemonBattleSpriteCount = 36;
+
+ 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,
+ bsDarkGrassHeldItemOffset = 16, bsGrowthCurveOffset = 21, bsAbility1Offset = 24, bsAbility2Offset = 25,
+ bsAbility3Offset = 26, bsFormeOffset = 28, bsFormeSpriteOffset = 30, bsFormeCountOffset = 32,
+ bsTMHMCompatOffset = 40, bsMTCompatOffset = 60;
+
+ public static final byte[] bw1NewStarterScript = { 0x24, 0x00, (byte) 0xA7, 0x02, (byte) 0xE7, 0x00, 0x00, 0x00,
+ (byte) 0xDE, 0x00, 0x00, 0x00, (byte) 0xF8, 0x01, 0x05, 0x00 };
+
+ public static final String bw1StarterScriptMagic = "2400A702";
+
+ public static final int bw1StarterTextOffset = 18, bw1CherenText1Offset = 26, bw1CherenText2Offset = 53;
+
+ public static final byte[] bw2NewStarterScript = { 0x28, 0x00, (byte) 0xA1, 0x40, 0x04, 0x00, (byte) 0xDE, 0x00,
+ 0x00, 0x00, (byte) 0xFD, 0x01, 0x05, 0x00 };
+
+ public static final String bw2StarterScriptMagic = "2800A1400400";
+
+ public static final int bw2StarterTextOffset = 37, bw2RivalTextOffset = 60;
+
+ public static final int perSeasonEncounterDataLength = 232;
+ private static final int bw1AreaDataEntryLength = 249, bw2AreaDataEntryLength = 345, bw1EncounterAreaCount = 61, bw2EncounterAreaCount = 85;
+
+ public static final int[] encountersOfEachType = { 12, 12, 12, 5, 5, 5, 5 };
+
+ public static final String[] encounterTypeNames = { "Grass/Cave", "Doubles Grass", "Shaking Spots", "Surfing",
+ "Surfing Spots", "Fishing", "Fishing Spots" };
+
+ public static final int[] habitatClassificationOfEachType = { 0, 0, 0, 1, 1, 2, 2 };
+
+ public static final int bw2Route4AreaIndex = 40, bw2VictoryRoadAreaIndex = 76, bw2ReversalMountainAreaIndex = 73;
+
+ public static final int b2Route4EncounterFile = 104, b2VRExclusiveRoom1 = 71, b2VRExclusiveRoom2 = 73,
+ b2ReversalMountainStart = 49, b2ReversalMountainEnd = 54;
+
+ public static final int w2Route4EncounterFile = 105, w2VRExclusiveRoom1 = 78, w2VRExclusiveRoom2 = 79,
+ w2ReversalMountainStart = 55, w2ReversalMountainEnd = 60;
+
+ public static final List<Integer> bw2HiddenHollowUnovaPokemon = Arrays.asList(Species.watchog, Species.herdier, Species.liepard,
+ Species.pansage, Species.pansear, Species.panpour, Species.pidove, Species.zebstrika, Species.boldore,
+ Species.woobat, Species.drilbur, Species.audino, Species.gurdurr, Species.tympole, Species.throh,
+ Species.sawk, Species.leavanny, Species.scolipede, Species.cottonee, Species.petilil, Species.basculin,
+ Species.krookodile, Species.maractus, Species.crustle, Species.scraggy, Species.sigilyph, Species.tirtouga,
+ Species.garbodor, Species.minccino, Species.gothorita, Species.duosion, Species.ducklett, Species.vanillish,
+ Species.emolga, Species.karrablast, Species.alomomola, Species.galvantula, Species.klinklang, Species.elgyem,
+ Species.litwick, Species.axew, Species.cubchoo, Species.shelmet, Species.stunfisk, Species.mienfoo,
+ Species.druddigon, Species.golett, Species.pawniard, Species.bouffalant, Species.braviary, Species.mandibuzz,
+ Species.heatmor, Species.durant);
+
+ public static final String tmDataPrefix = "87038803";
+
+ public static final int tmCount = 95, hmCount = 6, tmBlockOneCount = 92, tmBlockOneOffset = Items.tm01,
+ tmBlockTwoOffset = Items.tm93;
+
+ public static final String bw1ItemPalettesPrefix = "E903EA03020003000400050006000700",
+ bw2ItemPalettesPrefix = "FD03FE03020003000400050006000700";
+
+ public static final int bw2MoveTutorCount = 60, bw2MoveTutorBytesPerEntry = 12;
+
+ public static final int evolutionMethodCount = 27;
+
+ public static final int highestAbilityIndex = Abilities.teravolt;
+
+ public static final int fossilPokemonFile = 877;
+ public static final int fossilPokemonLevelOffset = 0x3F7;
+
+ public static final Map<Integer,List<Integer>> abilityVariations = setupAbilityVariations();
+
+ private static Map<Integer,List<Integer>> setupAbilityVariations() {
+ Map<Integer,List<Integer>> map = new HashMap<>();
+ map.put(Abilities.insomnia, Arrays.asList(Abilities.insomnia, Abilities.vitalSpirit));
+ map.put(Abilities.clearBody, Arrays.asList(Abilities.clearBody, Abilities.whiteSmoke));
+ map.put(Abilities.hugePower, Arrays.asList(Abilities.hugePower, Abilities.purePower));
+ map.put(Abilities.battleArmor, Arrays.asList(Abilities.battleArmor, Abilities.shellArmor));
+ map.put(Abilities.cloudNine, Arrays.asList(Abilities.cloudNine, Abilities.airLock));
+ map.put(Abilities.filter, Arrays.asList(Abilities.filter, Abilities.solidRock));
+ map.put(Abilities.roughSkin, Arrays.asList(Abilities.roughSkin, Abilities.ironBarbs));
+ map.put(Abilities.moldBreaker, Arrays.asList(Abilities.moldBreaker, Abilities.turboblaze, Abilities.teravolt));
+
+ return map;
+ }
+
+ public static final List<Integer> uselessAbilities = Arrays.asList(Abilities.forecast, Abilities.multitype,
+ Abilities.flowerGift, Abilities.zenMode);
+
+ public static final int normalItemSetVarCommand = 0x28, hiddenItemSetVarCommand = 0x2A, normalItemVarSet = 0x800C,
+ hiddenItemVarSet = 0x8000;
+
+ public static final int scriptListTerminator = 0xFD13;
+
+ public static final int[] mulchIndices = {Items.growthMulch, Items.dampMulch, Items.stableMulch, Items.gooeyMulch};
+
+ public static final MoveCategory[] moveCategoryIndices = { MoveCategory.STATUS, MoveCategory.PHYSICAL,
+ MoveCategory.SPECIAL };
+
+ public static byte moveCategoryToByte(MoveCategory cat) {
+ switch (cat) {
+ case PHYSICAL:
+ return 1;
+ case SPECIAL:
+ return 2;
+ case STATUS:
+ default:
+ return 0;
+ }
+ }
+
+ public static final int trappingEffect = 106;
+
+ public static final int noDamageStatusQuality = 1, noDamageStatChangeQuality = 2, damageStatusQuality = 4,
+ noDamageStatusAndStatChangeQuality = 5, damageTargetDebuffQuality = 6, damageUserBuffQuality = 7,
+ damageAbsorbQuality = 8;
+
+ public static final Type[] typeTable = constructTypeTable();
+
+ private static final Map<Integer,String> bw1FormeSuffixes = setupFormeSuffixes(Gen5Constants.Type_BW);
+
+ private static final Map<Integer,String> bw2FormeSuffixes = setupFormeSuffixes(Gen5Constants.Type_BW2);
+
+ private static final Map<Integer,Map<Integer,String>> formeSuffixesByBaseForme = setupFormeSuffixesByBaseForme();
+ private static final Map<Integer,String> dummyFormeSuffixes = setupDummyFormeSuffixes();
+
+ private static final Map<Integer,Map<Integer,Integer>> absolutePokeNumsByBaseForme = setupAbsolutePokeNumsByBaseForme();
+ private static final Map<Integer,Integer> dummyAbsolutePokeNums = setupDummyAbsolutePokeNums();
+
+ public static String getFormeSuffixByBaseForme(int baseForme, int formNum) {
+ return formeSuffixesByBaseForme.getOrDefault(baseForme,dummyFormeSuffixes).getOrDefault(formNum,"");
+ }
+
+ public static Integer getAbsolutePokeNumByBaseForme(int baseForme, int formNum) {
+ return absolutePokeNumsByBaseForme.getOrDefault(baseForme,dummyAbsolutePokeNums).getOrDefault(formNum,baseForme);
+ }
+
+ private static final List<Integer> bw1IrregularFormes = Arrays.asList(
+ Species.Gen5Formes.castformF, Species.Gen5Formes.castformW, Species.Gen5Formes.castformI,
+ Species.Gen5Formes.darmanitanZ,
+ Species.Gen5Formes.meloettaP
+ );
+
+ private static final List<Integer> bw2IrregularFormes = Arrays.asList(
+ Species.Gen5Formes.castformF, Species.Gen5Formes.castformW, Species.Gen5Formes.castformI,
+ Species.Gen5Formes.darmanitanZ,
+ Species.Gen5Formes.meloettaP,
+ Species.Gen5Formes.kyuremW,
+ Species.Gen5Formes.kyuremB
+ );
+
+ public static final List<Integer> emptyPlaythroughTrainers = Arrays.asList(new Integer[] { });
+
+ public static final List<Integer> bw1MainPlaythroughTrainers = Arrays.asList(
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 93, 94, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 138,
+ 139, 140, 141, 142, 143, 144, 145, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 186, 187, 188, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 212, 213, 214, 215, 216, 217, 218, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 315, 316, 401, 402, 408, 409, 412, 413, 438, 439, 441, 442, 443, 445, 447, 450,
+ 460, 461, 462, 465, 466, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 484, 485, 488, 489, 490, 501, 502, 503, 504, 505, 506,
+ 513, 514, 515, 516, 517, 518, 519, 520, 526, 531, 532, 533, 534, 535, 536, 537,
+ 538, 544, 545, 546, 549, 550, 552, 553, 554, 555, 556, 557, 582, 583, 584, 585, 586,
+ 587, 600, 601, 602, 603, 604, 605, 606, 607, 610, 611, 612, 613);
+
+ public static final List<Integer> bw2MainPlaythroughTrainers = Arrays.asList(
+ 4, 5, 6, 133, 134, 135, 136, 137, 138, 139, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 164, 165, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 237, 238, 239, 240,
+ 242, 243, 244, 245, 247, 248, 249, 250, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 372, 373, 374, 375, 376, 377, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 497, 498, 499, 500, 501,
+ 502, 503, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 580, 581, 583, 584, 585,
+ 586, 587, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 679, 680, 681, 682, 683, 690, 691, 692, 703, 704,
+ 705, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 745, 746, 747, 748, 749, 750, 751, 752, 754, 755, 756, 763, 764, 765,
+ 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 786, 787, 788,
+ 789, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806,
+ 807, 808, 809, 810, 811, 812);
+
+ public static final List<Integer> bw2DriftveilTrainerOffsets = Arrays.asList(56, 57, 0, 1, 2, 3, 4, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77);
+
+ public static final int normalTrainerNameLength = 813, normalTrainerClassLength = 236;
+
+// public static final Map<Integer, String> bw1ShopIndex = new HashMap<Integer, String>() {1:"Check"};
+
+ public static final List<Integer> bw1MainGameShops = Arrays.asList(
+ 3, 5, 6, 8, 9, 12, 14, 17, 18, 19, 21, 22
+ );
+
+ public static final List<String> bw1ShopNames = Arrays.asList(
+ "Primary 0 Badges",
+ "Shopping Mall 9 TMs",
+ "Icirrus Secondary (TMs)",
+ "Driftveil Herb Salesman",
+ "Mistralton Secondary (TMs)",
+ "Shopping Mall 9 F3 Left",
+ "Accumula Secondary",
+ "Nimbasa Secondary (TMs)",
+ "Striaton Secondary",
+ "League Secondary",
+ "Lacunosa Secondary",
+ "Black City/White Forest Secondary",
+ "Nacrene/Shopping Mall 9 X Items",
+ "Driftveil Incense Salesman",
+ "Nacrene Secondary",
+ "Undella Secondary",
+ "Primary 2 Badges",
+ "Castelia Secondary",
+ "Driftveil Secondary",
+ "Opelucid Secondary",
+ "Primary 3 Badges",
+ "Shopping Mall 9 F1",
+ "Shopping Mall 9 F2",
+ "Primary 5 Badges",
+ "Primary 7 Badges",
+ "Primary 8 Badges");
+
+ public static final List<Integer> bw2MainGameShops = Arrays.asList(
+ 9, 11, 14, 15, 16, 18, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31
+ );
+
+ public static final List<String> bw2ShopNames = Arrays.asList(
+ "Primary 0 Badges",
+ "Primary 1 Badges",
+ "Primary 3 Badges",
+ "Primary 5 Badges",
+ "Primary 7 Badges",
+ "Primary 8 Badges",
+ "Accumula Secondary",
+ "Striaton Secondary (TMs)",
+ "Nacrene Secondary",
+ "Castelia Secondary",
+ "Nimbasa Secondary (TMs)",
+ "Driftveil Secondary",
+ "Mistralton Secondary (TMs)",
+ "Icirrus Secondary",
+ "Opelucid Secondary",
+ "Victory Road Secondary",
+ "Pokemon League Secondary",
+ "Lacunosa Secondary (TMs)",
+ "Undella Secondary",
+ "Black City/White Forest Secondary",
+ "Nacrene/Shopping Mall 9 X Items",
+ "Driftveil Herb Salesman",
+ "Driftveil Incense Salesman",
+ "Shopping Mall 9 F1",
+ "Shopping Mall 9 TMs",
+ "Shopping Mall 9 F2",
+ "Shopping Mall 9 F3 Left",
+ "Aspertia Secondary",
+ "Virbank Secondary",
+ "Humilau Secondary",
+ "Floccesy Secondary",
+ "Lentimas Secondary");
+
+
+ public static final List<Integer> evolutionItems = Arrays.asList(Items.sunStone, Items.moonStone, Items.fireStone,
+ Items.thunderStone, Items.waterStone, Items.leafStone, Items.shinyStone, Items.duskStone, Items.dawnStone,
+ Items.ovalStone, Items.kingsRock, Items.deepSeaTooth, Items.deepSeaScale, Items.metalCoat, Items.dragonScale,
+ Items.upgrade, Items.protector, Items.electirizer, Items.magmarizer, Items.dubiousDisc, Items.reaperCloth,
+ Items.razorClaw, Items.razorFang, Items.prismScale);
+
+ public static final List<Integer> bw1RequiredFieldTMs = Arrays.asList(2, 3, 5, 6, 9, 12, 13, 19,
+ 22, 24, 26, 29, 30, 35, 36, 39, 41, 46, 47, 50, 52, 53, 55, 58, 61, 63, 65, 66, 71, 80, 81, 84, 85, 86, 90,
+ 91, 92, 93);
+
+ public static final List<Integer> bw2RequiredFieldTMs = Arrays.asList(1, 2, 3, 5, 6, 12, 13, 19,
+ 22, 26, 28, 29, 30, 36, 39, 41, 46, 47, 50, 52, 53, 56, 58, 61, 63, 65, 66, 67, 69, 71, 80, 81, 84, 85, 86,
+ 90, 91, 92, 93);
+
+ public static final List<Integer> bw1EarlyRequiredHMMoves = Collections.singletonList(Moves.cut);
+
+ public static final List<Integer> bw2EarlyRequiredHMMoves = Collections.emptyList();
+
+ public static final List<Integer> fieldMoves = Arrays.asList(
+ Moves.cut, Moves.fly, Moves.surf, Moves.strength, Moves.flash, Moves.dig, Moves.teleport,
+ Moves.waterfall, Moves.sweetScent, Moves.dive);
+
+ public static final String shedinjaSpeciesLocator = "24010000";
+
+ public static final String runningShoesPrefix = "01D0012008BD002008BD63";
+
+ public static final String introGraphicPrefix = "5A0000010000001700000001000000", bw1IntroCryPrefix = "0021009101910291", bw2IntroCryLocator = "3D020000F8B51C1C";
+
+ public static final String typeEffectivenessTableLocator = "0404040404020400";
+
+ public static final String forceChallengeModeLocator = "816A406B0B1C07490022434090000858834201D1";
+
+ public static final String pickupTableLocator = "19005C00DD00";
+ public static final int numberOfPickupItems = 29;
+
+ public static final String friendshipValueForEvoLocator = "DC282FD3";
+
+ public static final String perfectOddsBranchLocator = "08DB002801D0012000E0";
+
+ public static final String lowHealthMusicLocator = "00D10127";
+
+ public static final List<Integer> consumableHeldItems = setupAllConsumableItems();
+
+ private static List<Integer> setupAllConsumableItems() {
+ List<Integer> list = new ArrayList<>(Gen4Constants.consumableHeldItems);
+ list.addAll(Arrays.asList(Items.airBalloon, Items.redCard, Items.absorbBulb, Items.cellBattery,
+ Items.ejectButton, Items.fireGem, Items.waterGem, Items.electricGem, Items.grassGem, Items.iceGem,
+ Items.fightingGem, Items.poisonGem, Items.groundGem, Items.flyingGem, Items.psychicGem, Items.bugGem,
+ Items.rockGem, Items.ghostGem, Items.dragonGem, Items.darkGem, Items.steelGem, Items.normalGem));
+ return Collections.unmodifiableList(list);
+ }
+
+ public static final List<Integer> allHeldItems = setupAllHeldItems();
+
+ private static List<Integer> setupAllHeldItems() {
+ List<Integer> list = new ArrayList<>(Gen4Constants.allHeldItems);
+ list.addAll(Arrays.asList(Items.airBalloon, Items.redCard, Items.absorbBulb, Items.cellBattery,
+ Items.ejectButton, Items.fireGem, Items.waterGem, Items.electricGem, Items.grassGem, Items.iceGem,
+ Items.fightingGem, Items.poisonGem, Items.groundGem, Items.flyingGem, Items.psychicGem, Items.bugGem,
+ Items.rockGem, Items.ghostGem, Items.dragonGem, Items.darkGem, Items.steelGem, Items.normalGem));
+ list.addAll(Arrays.asList(Items.eviolite, Items.floatStone, Items.rockyHelmet, Items.ringTarget, Items.bindingBand));
+ return Collections.unmodifiableList(list);
+ }
+
+ public static final List<Integer> generalPurposeConsumableItems = initializeGeneralPurposeConsumableItems();
+
+ private static List<Integer> initializeGeneralPurposeConsumableItems() {
+ List<Integer> list = new ArrayList<>(Gen4Constants.generalPurposeConsumableItems);
+ list.addAll(Arrays.asList(Items.redCard, Items.absorbBulb, Items.cellBattery, Items.ejectButton));
+ return Collections.unmodifiableList(list);
+ }
+
+ public static final List<Integer> generalPurposeItems = initializeGeneralPurposeItems();
+
+ private static List<Integer> initializeGeneralPurposeItems() {
+ List<Integer> list = new ArrayList<>(Gen4Constants.generalPurposeItems);
+ list.addAll(Arrays.asList(Items.floatStone, Items.rockyHelmet));
+ return Collections.unmodifiableList(list);
+ }
+
+ public static final Map<Type, Integer> consumableTypeBoostingItems = initializeConsumableTypeBoostingItems();
+
+ private static Map<Type, Integer> initializeConsumableTypeBoostingItems() {
+ Map<Type, Integer> map = new HashMap<>();
+ map.put(Type.FIRE, Items.fireGem);
+ map.put(Type.WATER, Items.waterGem);
+ map.put(Type.ELECTRIC, Items.electricGem);
+ map.put(Type.GRASS, Items.grassGem);
+ map.put(Type.ICE, Items.iceGem);
+ map.put(Type.FIGHTING, Items.fightingGem);
+ map.put(Type.POISON, Items.poisonGem);
+ map.put(Type.GROUND, Items.groundGem);
+ map.put(Type.FLYING, Items.flyingGem);
+ map.put(Type.PSYCHIC, Items.psychicGem);
+ map.put(Type.BUG, Items.bugGem);
+ map.put(Type.ROCK, Items.rockGem);
+ map.put(Type.GHOST, Items.ghostGem);
+ map.put(Type.DRAGON, Items.dragonGem);
+ map.put(Type.DARK, Items.darkGem);
+ map.put(Type.STEEL, Items.steelGem);
+ map.put(Type.NORMAL, Items.normalGem);
+ return Collections.unmodifiableMap(map);
+ }
+
+ public static final Map<Integer, List<Integer>> moveBoostingItems = initializeMoveBoostingItems();
+
+ private static Map<Integer, List<Integer>> initializeMoveBoostingItems() {
+ Map<Integer, List<Integer>> map = new HashMap<>(Gen4Constants.moveBoostingItems);
+ map.put(Moves.trick, Arrays.asList(Items.toxicOrb, Items.flameOrb, Items.ringTarget));
+ map.put(Moves.switcheroo, Arrays.asList(Items.toxicOrb, Items.flameOrb, Items.ringTarget));
+
+ map.put(Moves.bind, Arrays.asList(Items.gripClaw, Items.bindingBand));
+ map.put(Moves.clamp, Arrays.asList(Items.gripClaw, Items.bindingBand));
+ map.put(Moves.fireSpin, Arrays.asList(Items.gripClaw, Items.bindingBand));
+ map.put(Moves.magmaStorm, Arrays.asList(Items.gripClaw, Items.bindingBand));
+ map.put(Moves.sandTomb, Arrays.asList(Items.gripClaw, Items.bindingBand));
+ map.put(Moves.whirlpool, Arrays.asList(Items.gripClaw, Items.bindingBand));
+ map.put(Moves.wrap, Arrays.asList(Items.gripClaw, Items.bindingBand));
+
+ map.put(Moves.hornLeech, Arrays.asList(Items.bigRoot));
+ return Collections.unmodifiableMap(map);
+ }
+
+ // None of these have new entries in Gen V.
+ public static final Map<Integer, List<Integer>> abilityBoostingItems = Gen4Constants.abilityBoostingItems;
+ public static final Map<Integer, List<Integer>> speciesBoostingItems = Gen4Constants.speciesBoostingItems;
+ public static final Map<Type, List<Integer>> typeBoostingItems = Gen4Constants.typeBoostingItems;
+ public static final Map<Type, Integer> weaknessReducingBerries = Gen4Constants.weaknessReducingBerries;
+
+ private static Type[] constructTypeTable() {
+ Type[] table = new Type[256];
+ table[0x00] = Type.NORMAL;
+ table[0x01] = Type.FIGHTING;
+ table[0x02] = Type.FLYING;
+ table[0x03] = Type.POISON;
+ table[0x04] = Type.GROUND;
+ table[0x05] = Type.ROCK;
+ table[0x06] = Type.BUG;
+ table[0x07] = Type.GHOST;
+ table[0x08] = Type.STEEL;
+ table[0x09] = Type.FIRE;
+ table[0x0A] = Type.WATER;
+ table[0x0B] = Type.GRASS;
+ table[0x0C] = Type.ELECTRIC;
+ table[0x0D] = Type.PSYCHIC;
+ table[0x0E] = Type.ICE;
+ table[0x0F] = Type.DRAGON;
+ table[0x10] = Type.DARK;
+ return table;
+ }
+
+ public static byte typeToByte(Type type) {
+ if (type == null) {
+ return 0x00; // normal?
+ }
+ switch (type) {
+ case NORMAL:
+ return 0x00;
+ case FIGHTING:
+ return 0x01;
+ case FLYING:
+ return 0x02;
+ case POISON:
+ return 0x03;
+ case GROUND:
+ return 0x04;
+ case ROCK:
+ return 0x05;
+ case BUG:
+ return 0x06;
+ case GHOST:
+ return 0x07;
+ case FIRE:
+ return 0x09;
+ case WATER:
+ return 0x0A;
+ case GRASS:
+ return 0x0B;
+ case ELECTRIC:
+ return 0x0C;
+ case PSYCHIC:
+ return 0x0D;
+ case ICE:
+ return 0x0E;
+ case DRAGON:
+ return 0x0F;
+ case STEEL:
+ return 0x08;
+ case DARK:
+ return 0x10;
+ default:
+ return 0; // normal by default
+ }
+ }
+
+ public static int getAreaDataEntryLength(int romType) {
+ if (romType == Type_BW) {
+ return bw1AreaDataEntryLength;
+ } else if (romType == Type_BW2) {
+ return bw2AreaDataEntryLength;
+ }
+ return 0;
+ }
+
+ public static int getEncounterAreaCount(int romType) {
+ if (romType == Type_BW) {
+ return bw1EncounterAreaCount;
+ } else if (romType == Type_BW2) {
+ return bw2EncounterAreaCount;
+ }
+ return 0;
+ }
+
+ public static int[] getWildFileToAreaMap(int romType) {
+ if (romType == Type_BW) {
+ return bw1WildFileToAreaMap;
+ } else if (romType == Type_BW2) {
+ return bw2WildFileToAreaMap;
+ }
+ return new int[0];
+ }
+
+ public static List<Integer> getMainGameShops(int romType) {
+ if (romType == Type_BW) {
+ return bw1MainGameShops;
+ } else if (romType == Type_BW2) {
+ return bw2MainGameShops;
+ }
+ return new ArrayList<>();
+ }
+
+ public static List<Integer> getIrregularFormes(int romType) {
+ if (romType == Type_BW) {
+ return bw1IrregularFormes;
+ } else if (romType == Type_BW2) {
+ return bw2IrregularFormes;
+ }
+ return new ArrayList<>();
+ }
+
+ public static int getFormeCount(int romType) {
+ if (romType == Type_BW) {
+ return bw1FormeCount;
+ } else if (romType == Type_BW2) {
+ return bw2FormeCount;
+ }
+ return 0;
+ }
+
+ public static int getFormeOffset(int romType) {
+ if (romType == Type_BW) {
+ return bw1formeOffset;
+ } else if (romType == Type_BW2) {
+ return bw2formeOffset;
+ }
+ return 0;
+ }
+
+ public static int getNonPokemonBattleSpriteCount(int romType) {
+ if (romType == Type_BW) {
+ return bw1NonPokemonBattleSpriteCount;
+ } else if (romType == Type_BW2) {
+ return bw2NonPokemonBattleSpriteCount;
+ }
+ return 0;
+ }
+
+ public static String getFormeSuffix(int internalIndex, int romType) {
+ if (romType == Type_BW) {
+ return bw1FormeSuffixes.getOrDefault(internalIndex,"");
+ } else if (romType == Type_BW2) {
+ return bw2FormeSuffixes.getOrDefault(internalIndex,"");
+ } else {
+ return "";
+ }
+ }
+
+ private static Map<Integer,String> setupFormeSuffixes(int gameVersion) {
+ Map<Integer,String> formeSuffixes = new HashMap<>();
+ if (gameVersion == Gen5Constants.Type_BW) {
+ formeSuffixes.put(Species.Gen5Formes.deoxysA,"-A");
+ formeSuffixes.put(Species.Gen5Formes.deoxysD,"-D");
+ formeSuffixes.put(Species.Gen5Formes.deoxysS,"-S");
+ formeSuffixes.put(Species.Gen5Formes.wormadamS,"-S");
+ formeSuffixes.put(Species.Gen5Formes.wormadamT,"-T");
+ formeSuffixes.put(Species.Gen5Formes.shayminS,"-S");
+ formeSuffixes.put(Species.Gen5Formes.giratinaO,"-O");
+ formeSuffixes.put(Species.Gen5Formes.rotomH,"-H");
+ formeSuffixes.put(Species.Gen5Formes.rotomW,"-W");
+ formeSuffixes.put(Species.Gen5Formes.rotomFr,"-Fr");
+ formeSuffixes.put(Species.Gen5Formes.rotomFa,"-Fa");
+ formeSuffixes.put(Species.Gen5Formes.rotomM,"-M");
+ formeSuffixes.put(Species.Gen5Formes.castformF,"-F");
+ formeSuffixes.put(Species.Gen5Formes.castformW,"-W");
+ formeSuffixes.put(Species.Gen5Formes.castformI,"-I");
+ formeSuffixes.put(Species.Gen5Formes.basculinB,"-B");
+ formeSuffixes.put(Species.Gen5Formes.darmanitanZ,"-Z");
+ formeSuffixes.put(Species.Gen5Formes.meloettaP,"-P");
+ } else if (gameVersion == Gen5Constants.Type_BW2) {
+ formeSuffixes.put(Species.Gen5Formes.deoxysA + bw2formeOffset,"-A");
+ formeSuffixes.put(Species.Gen5Formes.deoxysD + bw2formeOffset,"-D");
+ formeSuffixes.put(Species.Gen5Formes.deoxysS + bw2formeOffset,"-S");
+ formeSuffixes.put(Species.Gen5Formes.wormadamS + bw2formeOffset,"-S");
+ formeSuffixes.put(Species.Gen5Formes.wormadamT + bw2formeOffset,"-T");
+ formeSuffixes.put(Species.Gen5Formes.shayminS + bw2formeOffset,"-S");
+ formeSuffixes.put(Species.Gen5Formes.giratinaO + bw2formeOffset,"-O");
+ formeSuffixes.put(Species.Gen5Formes.rotomH + bw2formeOffset,"-H");
+ formeSuffixes.put(Species.Gen5Formes.rotomW + bw2formeOffset,"-W");
+ formeSuffixes.put(Species.Gen5Formes.rotomFr + bw2formeOffset,"-Fr");
+ formeSuffixes.put(Species.Gen5Formes.rotomFa + bw2formeOffset,"-Fa");
+ formeSuffixes.put(Species.Gen5Formes.rotomM + bw2formeOffset,"-M");
+ formeSuffixes.put(Species.Gen5Formes.castformF + bw2formeOffset,"-F");
+ formeSuffixes.put(Species.Gen5Formes.castformW + bw2formeOffset,"-W");
+ formeSuffixes.put(Species.Gen5Formes.castformI + bw2formeOffset,"-I");
+ formeSuffixes.put(Species.Gen5Formes.basculinB + bw2formeOffset,"-B");
+ formeSuffixes.put(Species.Gen5Formes.darmanitanZ + bw2formeOffset,"-Z");
+ formeSuffixes.put(Species.Gen5Formes.meloettaP + bw2formeOffset,"-P");
+ formeSuffixes.put(Species.Gen5Formes.kyuremW + bw2formeOffset,"-W");
+ formeSuffixes.put(Species.Gen5Formes.kyuremB + bw2formeOffset,"-B");
+ formeSuffixes.put(Species.Gen5Formes.tornadusT + bw2formeOffset,"-T");
+ formeSuffixes.put(Species.Gen5Formes.thundurusT + bw2formeOffset,"-T");
+ formeSuffixes.put(Species.Gen5Formes.landorusT + bw2formeOffset,"-T");
+ }
+
+ return formeSuffixes;
+ }
+
+ private static Map<Integer,Map<Integer,String>> setupFormeSuffixesByBaseForme() {
+ Map<Integer,Map<Integer,String>> map = new HashMap<>();
+
+ Map<Integer,String> deoxysMap = new HashMap<>();
+ deoxysMap.put(1,"-A");
+ deoxysMap.put(2,"-D");
+ deoxysMap.put(3,"-S");
+ map.put(Species.deoxys, deoxysMap);
+
+ Map<Integer,String> wormadamMap = new HashMap<>();
+ wormadamMap.put(1,"-S");
+ wormadamMap.put(2,"-T");
+ map.put(Species.wormadam, wormadamMap);
+
+ Map<Integer,String> shayminMap = new HashMap<>();
+ shayminMap.put(1,"-S");
+ map.put(Species.shaymin, shayminMap);
+
+ Map<Integer,String> giratinaMap = new HashMap<>();
+ giratinaMap.put(1,"-O");
+ map.put(Species.giratina, giratinaMap);
+
+ Map<Integer,String> rotomMap = new HashMap<>();
+ rotomMap.put(1,"-H");
+ rotomMap.put(2,"-W");
+ rotomMap.put(3,"-Fr");
+ rotomMap.put(4,"-Fa");
+ rotomMap.put(5,"-M");
+ map.put(Species.rotom, rotomMap);
+
+ Map<Integer,String> castformMap = new HashMap<>();
+ castformMap.put(1,"-F");
+ castformMap.put(2,"-W");
+ castformMap.put(3,"-I");
+ map.put(Species.castform, castformMap);
+
+ Map<Integer,String> basculinMap = new HashMap<>();
+ basculinMap.put(1,"-B");
+ map.put(Species.basculin, basculinMap);
+
+ Map<Integer,String> darmanitanMap = new HashMap<>();
+ darmanitanMap.put(1,"-Z");
+ map.put(Species.darmanitan, darmanitanMap);
+
+ Map<Integer,String> meloettaMap = new HashMap<>();
+ meloettaMap.put(1,"-P");
+ map.put(Species.meloetta, meloettaMap);
+
+ Map<Integer,String> kyuremMap = new HashMap<>();
+ kyuremMap.put(1,"-W");
+ kyuremMap.put(2,"-B");
+ map.put(Species.kyurem, kyuremMap);
+
+ Map<Integer,String> keldeoMap = new HashMap();
+ keldeoMap.put(1,"-R");
+ map.put(Species.keldeo, keldeoMap);
+
+ Map<Integer,String> tornadusMap = new HashMap<>();
+ tornadusMap.put(1,"-T");
+ map.put(Species.tornadus, tornadusMap);
+
+ Map<Integer,String> thundurusMap = new HashMap<>();
+ thundurusMap.put(1,"-T");
+ map.put(Species.thundurus, thundurusMap);
+
+ Map<Integer,String> landorusMap = new HashMap<>();
+ landorusMap.put(1,"-T");
+ map.put(Species.landorus, landorusMap);
+
+ return map;
+ }
+
+ private static Map<Integer,String> setupDummyFormeSuffixes() {
+ Map<Integer,String> m = new HashMap<>();
+ m.put(0,"");
+ return m;
+ }
+
+ private static Map<Integer,Map<Integer,Integer>> setupAbsolutePokeNumsByBaseForme() {
+
+ Map<Integer,Map<Integer,Integer>> map = new HashMap<>();
+
+ Map<Integer,Integer> deoxysMap = new HashMap<>();
+ deoxysMap.put(1,Species.Gen5Formes.deoxysA);
+ deoxysMap.put(2,Species.Gen5Formes.deoxysD);
+ deoxysMap.put(3,Species.Gen5Formes.deoxysS);
+ map.put(Species.deoxys, deoxysMap);
+
+ Map<Integer,Integer> wormadamMap = new HashMap<>();
+ wormadamMap.put(1,Species.Gen5Formes.wormadamS);
+ wormadamMap.put(2,Species.Gen5Formes.wormadamT);
+ map.put(Species.wormadam, wormadamMap);
+
+ Map<Integer,Integer> shayminMap = new HashMap<>();
+ shayminMap.put(1,Species.Gen5Formes.shayminS);
+ map.put(Species.shaymin, shayminMap);
+
+ Map<Integer,Integer> giratinaMap = new HashMap<>();
+ giratinaMap.put(1,Species.Gen5Formes.giratinaO);
+ map.put(Species.giratina, giratinaMap);
+
+ Map<Integer,Integer> rotomMap = new HashMap<>();
+ rotomMap.put(1,Species.Gen5Formes.rotomH);
+ rotomMap.put(2,Species.Gen5Formes.rotomW);
+ rotomMap.put(3,Species.Gen5Formes.rotomFr);
+ rotomMap.put(4,Species.Gen5Formes.rotomFa);
+ rotomMap.put(5,Species.Gen5Formes.rotomM);
+ map.put(Species.rotom, rotomMap);
+
+ Map<Integer,Integer> castformMap = new HashMap<>();
+ castformMap.put(1,Species.Gen5Formes.castformF);
+ castformMap.put(2,Species.Gen5Formes.castformW);
+ castformMap.put(3,Species.Gen5Formes.castformI);
+ map.put(Species.castform, castformMap);
+
+ Map<Integer,Integer> basculinMap = new HashMap<>();
+ basculinMap.put(1,Species.Gen5Formes.basculinB);
+ map.put(Species.basculin, basculinMap);
+
+ Map<Integer,Integer> darmanitanMap = new HashMap<>();
+ darmanitanMap.put(1,Species.Gen5Formes.darmanitanZ);
+ map.put(Species.darmanitan, darmanitanMap);
+
+ Map<Integer,Integer> meloettaMap = new HashMap<>();
+ meloettaMap.put(1,Species.Gen5Formes.meloettaP);
+ map.put(Species.meloetta, meloettaMap);
+
+ Map<Integer,Integer> kyuremMap = new HashMap<>();
+ kyuremMap.put(1,Species.Gen5Formes.kyuremW);
+ kyuremMap.put(2,Species.Gen5Formes.kyuremB);
+ map.put(Species.kyurem, kyuremMap);
+
+ Map<Integer,Integer> keldeoMap = new HashMap<>();
+ keldeoMap.put(1,Species.Gen5Formes.keldeoCosmetic1);
+ map.put(Species.keldeo, keldeoMap);
+
+ Map<Integer,Integer> tornadusMap = new HashMap<>();
+ tornadusMap.put(1,Species.Gen5Formes.tornadusT);
+ map.put(Species.tornadus, tornadusMap);
+
+ Map<Integer,Integer> thundurusMap = new HashMap<>();
+ thundurusMap.put(1,Species.Gen5Formes.thundurusT);
+ map.put(Species.thundurus, thundurusMap);
+
+ Map<Integer,Integer> landorusMap = new HashMap<>();
+ landorusMap.put(1,Species.Gen5Formes.landorusT);
+ map.put(Species.landorus, landorusMap);
+
+ return map;
+ }
+
+ private static Map<Integer,Integer> setupDummyAbsolutePokeNums() {
+ Map<Integer,Integer> m = new HashMap<>();
+ m.put(255,0);
+ return m;
+ }
+
+ public static ItemList allowedItems, nonBadItemsBW1, nonBadItemsBW2;
+ public static List<Integer> regularShopItems, opShopItems;
+
+ public static String blackBoxLegendaryCheckPrefix1 = "79F6BAEF07B0F0BDC046", blackBoxLegendaryCheckPrefix2 = "DEDB0020C04302B0F8BDC046",
+ whiteBoxLegendaryCheckPrefix1 = "00F0FEF8002070BD", whiteBoxLegendaryCheckPrefix2 = "64F62EF970BD0000";
+
+ static {
+ setupAllowedItems();
+ }
+
+ private static void setupAllowedItems() {
+ allowedItems = new ItemList(Items.revealGlass);
+ // Key items + version exclusives
+ allowedItems.banRange(Items.explorerKit, 76);
+ allowedItems.banRange(Items.dataCard01, 32);
+ allowedItems.banRange(Items.xtransceiverMale, 18);
+ allowedItems.banSingles(Items.libertyPass, Items.propCase, Items.dragonSkull, Items.lightStone, Items.darkStone);
+ // Unknown blank items or version exclusives
+ allowedItems.banRange(Items.tea, 3);
+ allowedItems.banRange(Items.unused120, 14);
+ // TMs & HMs - tms cant be held in gen5
+ allowedItems.tmRange(Items.tm01, 92);
+ allowedItems.tmRange(Items.tm93, 3);
+ allowedItems.banRange(Items.tm01, 100);
+ allowedItems.banRange(Items.tm93, 3);
+ // Battle Launcher exclusives
+ allowedItems.banRange(Items.direHit2, 24);
+
+ // non-bad items
+ // ban specific pokemon hold items, berries, apricorns, mail
+ nonBadItemsBW2 = allowedItems.copy();
+
+ nonBadItemsBW2.banSingles(Items.oddKeystone, Items.griseousOrb, Items.soulDew, Items.lightBall,
+ Items.oranBerry, Items.quickPowder, Items.passOrb);
+ nonBadItemsBW2.banRange(Items.growthMulch, 4); // mulch
+ nonBadItemsBW2.banRange(Items.adamantOrb, 2); // orbs
+ nonBadItemsBW2.banRange(Items.mail1, 12); // mails
+ nonBadItemsBW2.banRange(Items.figyBerry, 25); // berries without useful battle effects
+ nonBadItemsBW2.banRange(Items.luckyPunch, 4); // pokemon specific
+ nonBadItemsBW2.banRange(Items.redScarf, 5); // contest scarves
+
+ // Ban the shards in BW1; even the maniac only gives you $200 for them, and they serve no other purpose.
+ nonBadItemsBW1 = nonBadItemsBW2.copy();
+ nonBadItemsBW1.banRange(Items.redShard, 4);
+
+ regularShopItems = new ArrayList<>();
+
+ regularShopItems.addAll(IntStream.rangeClosed(Items.ultraBall, Items.pokeBall).boxed().collect(Collectors.toList()));
+ regularShopItems.addAll(IntStream.rangeClosed(Items.potion, Items.revive).boxed().collect(Collectors.toList()));
+ regularShopItems.addAll(IntStream.rangeClosed(Items.superRepel, Items.repel).boxed().collect(Collectors.toList()));
+
+ opShopItems = new ArrayList<>();
+
+ // "Money items" etc
+ opShopItems.add(Items.lavaCookie);
+ opShopItems.add(Items.berryJuice);
+ opShopItems.add(Items.rareCandy);
+ opShopItems.add(Items.oldGateau);
+ opShopItems.addAll(IntStream.rangeClosed(Items.blueFlute, Items.shoalShell).boxed().collect(Collectors.toList()));
+ opShopItems.addAll(IntStream.rangeClosed(Items.tinyMushroom, Items.nugget).boxed().collect(Collectors.toList()));
+ opShopItems.add(Items.rareBone);
+ opShopItems.addAll(IntStream.rangeClosed(Items.lansatBerry, Items.rowapBerry).boxed().collect(Collectors.toList()));
+ opShopItems.add(Items.luckyEgg);
+ opShopItems.add(Items.prettyFeather);
+ opShopItems.addAll(IntStream.rangeClosed(Items.balmMushroom, Items.casteliacone).boxed().collect(Collectors.toList()));
+ }
+
+ public static ItemList getNonBadItems(int romType) {
+ if (romType == Gen5Constants.Type_BW2) {
+ return nonBadItemsBW2;
+ } else {
+ return nonBadItemsBW1;
+ }
+ }
+
+ public static final Map<Integer,Integer> balancedItemPrices = Stream.of(new Integer[][] {
+ // Skip item index 0. All prices divided by 10
+ {Items.masterBall, 300},
+ {Items.ultraBall, 120},
+ {Items.greatBall, 60},
+ {Items.pokeBall, 20},
+ {Items.safariBall, 50},
+ {Items.netBall, 100},
+ {Items.diveBall, 100},
+ {Items.nestBall, 100},
+ {Items.repeatBall, 100},
+ {Items.timerBall, 100},
+ {Items.luxuryBall, 100},
+ {Items.premierBall, 20},
+ {Items.duskBall, 100},
+ {Items.healBall, 30},
+ {Items.quickBall, 100},
+ {Items.cherishBall, 20},
+ {Items.potion, 30},
+ {Items.antidote, 10},
+ {Items.burnHeal, 25},
+ {Items.iceHeal, 25},
+ {Items.awakening, 25},
+ {Items.paralyzeHeal, 20},
+ {Items.fullRestore, 300},
+ {Items.maxPotion, 250},
+ {Items.hyperPotion, 120},
+ {Items.superPotion, 70},
+ {Items.fullHeal, 60},
+ {Items.revive, 150},
+ {Items.maxRevive, 400},
+ {Items.freshWater, 40},
+ {Items.sodaPop, 60},
+ {Items.lemonade, 70},
+ {Items.moomooMilk, 80},
+ {Items.energyPowder, 40},
+ {Items.energyRoot, 110},
+ {Items.healPowder, 45},
+ {Items.revivalHerb, 280},
+ {Items.ether, 300},
+ {Items.maxEther, 450},
+ {Items.elixir, 1500},
+ {Items.maxElixir, 1800},
+ {Items.lavaCookie, 45},
+ {Items.berryJuice, 10},
+ {Items.sacredAsh, 1000},
+ {Items.hpUp, 980},
+ {Items.protein, 980},
+ {Items.iron, 980},
+ {Items.carbos, 980},
+ {Items.calcium, 980},
+ {Items.rareCandy, 1000},
+ {Items.ppUp, 980},
+ {Items.zinc, 980},
+ {Items.ppMax, 2490},
+ {Items.oldGateau, 45},
+ {Items.guardSpec, 70},
+ {Items.direHit, 65},
+ {Items.xAttack, 50},
+ {Items.xDefense, 55},
+ {Items.xSpeed, 35},
+ {Items.xAccuracy, 95},
+ {Items.xSpAtk, 35},
+ {Items.xSpDef, 35},
+ {Items.pokeDoll, 100},
+ {Items.fluffyTail, 100},
+ {Items.blueFlute, 2},
+ {Items.yellowFlute, 2},
+ {Items.redFlute, 2},
+ {Items.blackFlute, 2},
+ {Items.whiteFlute, 2},
+ {Items.shoalSalt, 2},
+ {Items.shoalShell, 2},
+ {Items.redShard, 40},
+ {Items.blueShard, 40},
+ {Items.yellowShard, 40},
+ {Items.greenShard, 40},
+ {Items.superRepel, 50},
+ {Items.maxRepel, 70},
+ {Items.escapeRope, 55},
+ {Items.repel, 35},
+ {Items.sunStone, 300},
+ {Items.moonStone, 300},
+ {Items.fireStone, 300},
+ {Items.thunderStone, 300},
+ {Items.waterStone, 300},
+ {Items.leafStone, 300},
+ {Items.tinyMushroom, 50},
+ {Items.bigMushroom, 500},
+ {Items.pearl, 140},
+ {Items.bigPearl, 750},
+ {Items.stardust, 200},
+ {Items.starPiece, 980},
+ {Items.nugget, 1000},
+ {Items.heartScale, 500},
+ {Items.honey, 50},
+ {Items.growthMulch, 20},
+ {Items.dampMulch, 20},
+ {Items.stableMulch, 20},
+ {Items.gooeyMulch, 20},
+ {Items.rootFossil, 500},
+ {Items.clawFossil, 500},
+ {Items.helixFossil, 500},
+ {Items.domeFossil, 500},
+ {Items.oldAmber, 800},
+ {Items.armorFossil, 500},
+ {Items.skullFossil, 500},
+ {Items.rareBone, 1000},
+ {Items.shinyStone, 300},
+ {Items.duskStone, 300},
+ {Items.dawnStone, 300},
+ {Items.ovalStone, 300},
+ {Items.oddKeystone, 210},
+ {Items.griseousOrb, 1000},
+ {Items.tea, 0}, // unused in Gen 5
+ {Items.unused114, 0},
+ {Items.autograph, 0}, // unused in Gen 5
+ {Items.douseDrive, 100},
+ {Items.shockDrive, 100},
+ {Items.burnDrive, 100},
+ {Items.chillDrive, 100},
+ {Items.unused120, 0},
+ {Items.pokemonBox, 0}, // unused in Gen 5
+ {Items.medicinePocket, 0}, // unused in Gen 5
+ {Items.tmCase, 0}, // unused in Gen 5
+ {Items.candyJar, 0}, // unused in Gen 5
+ {Items.powerUpPocket, 0}, // unused in Gen 5
+ {Items.clothingTrunk, 0}, // unused in Gen 5
+ {Items.catchingPocket, 0}, // unused in Gen 5
+ {Items.battlePocket, 0}, // unused in Gen 5
+ {Items.unused129, 0},
+ {Items.unused130, 0},
+ {Items.unused131, 0},
+ {Items.unused132, 0},
+ {Items.unused133, 0},
+ {Items.sweetHeart, 15},
+ {Items.adamantOrb, 1000},
+ {Items.lustrousOrb, 1000},
+ {Items.mail1, 5},
+ {Items.mail2, 5},
+ {Items.mail3, 5},
+ {Items.mail4, 5},
+ {Items.mail5, 5},
+ {Items.mail6, 5},
+ {Items.mail7, 5},
+ {Items.mail8, 5},
+ {Items.mail9, 5},
+ {Items.mail10, 5},
+ {Items.mail11, 5},
+ {Items.mail12, 5},
+ {Items.cheriBerry, 20},
+ {Items.chestoBerry, 25},
+ {Items.pechaBerry, 10},
+ {Items.rawstBerry, 25},
+ {Items.aspearBerry, 25},
+ {Items.leppaBerry, 300},
+ {Items.oranBerry, 5},
+ {Items.persimBerry, 20},
+ {Items.lumBerry, 50},
+ {Items.sitrusBerry, 50},
+ {Items.figyBerry, 10},
+ {Items.wikiBerry, 10},
+ {Items.magoBerry, 10},
+ {Items.aguavBerry, 10},
+ {Items.iapapaBerry, 10},
+ {Items.razzBerry, 50},
+ {Items.blukBerry, 50},
+ {Items.nanabBerry, 50},
+ {Items.wepearBerry, 50},
+ {Items.pinapBerry, 50},
+ {Items.pomegBerry, 50},
+ {Items.kelpsyBerry, 50},
+ {Items.qualotBerry, 50},
+ {Items.hondewBerry, 50},
+ {Items.grepaBerry, 50},
+ {Items.tamatoBerry, 50},
+ {Items.cornnBerry, 50},
+ {Items.magostBerry, 50},
+ {Items.rabutaBerry, 50},
+ {Items.nomelBerry, 50},
+ {Items.spelonBerry, 50},
+ {Items.pamtreBerry, 50},
+ {Items.watmelBerry, 50},
+ {Items.durinBerry, 50},
+ {Items.belueBerry, 50},
+ {Items.occaBerry, 100},
+ {Items.passhoBerry, 100},
+ {Items.wacanBerry, 100},
+ {Items.rindoBerry, 100},
+ {Items.yacheBerry, 100},
+ {Items.chopleBerry, 100},
+ {Items.kebiaBerry, 100},
+ {Items.shucaBerry, 100},
+ {Items.cobaBerry, 100},
+ {Items.payapaBerry, 100},
+ {Items.tangaBerry, 100},
+ {Items.chartiBerry, 100},
+ {Items.kasibBerry, 100},
+ {Items.habanBerry, 100},
+ {Items.colburBerry, 100},
+ {Items.babiriBerry, 100},
+ {Items.chilanBerry, 100},
+ {Items.liechiBerry, 100},
+ {Items.ganlonBerry, 100},
+ {Items.salacBerry, 100},
+ {Items.petayaBerry, 100},
+ {Items.apicotBerry, 100},
+ {Items.lansatBerry, 100},
+ {Items.starfBerry, 100},
+ {Items.enigmaBerry, 100},
+ {Items.micleBerry, 100},
+ {Items.custapBerry, 100},
+ {Items.jabocaBerry, 100},
+ {Items.rowapBerry, 100},
+ {Items.brightPowder, 300},
+ {Items.whiteHerb, 100},
+ {Items.machoBrace, 300},
+ {Items.expShare, 600},
+ {Items.quickClaw, 450},
+ {Items.sootheBell, 100},
+ {Items.mentalHerb, 100},
+ {Items.choiceBand, 1000},
+ {Items.kingsRock, 500},
+ {Items.silverPowder, 200},
+ {Items.amuletCoin, 1500},
+ {Items.cleanseTag, 100},
+ {Items.soulDew, 20},
+ {Items.deepSeaTooth, 300},
+ {Items.deepSeaScale, 300},
+ {Items.smokeBall, 20},
+ {Items.everstone, 20},
+ {Items.focusBand, 300},
+ {Items.luckyEgg, 1000},
+ {Items.scopeLens, 500},
+ {Items.metalCoat, 300},
+ {Items.leftovers, 1000},
+ {Items.dragonScale, 300},
+ {Items.lightBall, 10},
+ {Items.softSand, 200},
+ {Items.hardStone, 200},
+ {Items.miracleSeed, 200},
+ {Items.blackGlasses, 200},
+ {Items.blackBelt, 200},
+ {Items.magnet, 200},
+ {Items.mysticWater, 200},
+ {Items.sharpBeak, 200},
+ {Items.poisonBarb, 200},
+ {Items.neverMeltIce, 200},
+ {Items.spellTag, 200},
+ {Items.twistedSpoon, 200},
+ {Items.charcoal, 200},
+ {Items.dragonFang, 200},
+ {Items.silkScarf, 200},
+ {Items.upgrade, 300},
+ {Items.shellBell, 600},
+ {Items.seaIncense, 200},
+ {Items.laxIncense, 300},
+ {Items.luckyPunch, 1},
+ {Items.metalPowder, 1},
+ {Items.thickClub, 50},
+ {Items.leek, 20},
+ {Items.redScarf, 10},
+ {Items.blueScarf, 10},
+ {Items.pinkScarf, 10},
+ {Items.greenScarf, 10},
+ {Items.yellowScarf, 10},
+ {Items.wideLens, 150},
+ {Items.muscleBand, 200},
+ {Items.wiseGlasses, 200},
+ {Items.expertBelt, 600},
+ {Items.lightClay, 150},
+ {Items.lifeOrb, 1000},
+ {Items.powerHerb, 100},
+ {Items.toxicOrb, 150},
+ {Items.flameOrb, 150},
+ {Items.quickPowder, 1},
+ {Items.focusSash, 200},
+ {Items.zoomLens, 150},
+ {Items.metronome, 300},
+ {Items.ironBall, 100},
+ {Items.laggingTail, 100},
+ {Items.destinyKnot, 150},
+ {Items.blackSludge, 500},
+ {Items.icyRock, 20},
+ {Items.smoothRock, 20},
+ {Items.heatRock, 20},
+ {Items.dampRock, 20},
+ {Items.gripClaw, 150},
+ {Items.choiceScarf, 1000},
+ {Items.stickyBarb, 150},
+ {Items.powerBracer, 300},
+ {Items.powerBelt, 300},
+ {Items.powerLens, 300},
+ {Items.powerBand, 300},
+ {Items.powerAnklet, 300},
+ {Items.powerWeight, 300},
+ {Items.shedShell, 50},
+ {Items.bigRoot, 150},
+ {Items.choiceSpecs, 1000},
+ {Items.flamePlate, 200},
+ {Items.splashPlate, 200},
+ {Items.zapPlate, 200},
+ {Items.meadowPlate, 200},
+ {Items.iciclePlate, 200},
+ {Items.fistPlate, 200},
+ {Items.toxicPlate, 200},
+ {Items.earthPlate, 200},
+ {Items.skyPlate, 200},
+ {Items.mindPlate, 200},
+ {Items.insectPlate, 200},
+ {Items.stonePlate, 200},
+ {Items.spookyPlate, 200},
+ {Items.dracoPlate, 200},
+ {Items.dreadPlate, 200},
+ {Items.ironPlate, 200},
+ {Items.oddIncense, 200},
+ {Items.rockIncense, 200},
+ {Items.fullIncense, 100},
+ {Items.waveIncense, 200},
+ {Items.roseIncense, 200},
+ {Items.luckIncense, 1500},
+ {Items.pureIncense, 100},
+ {Items.protector, 300},
+ {Items.electirizer, 300},
+ {Items.magmarizer, 300},
+ {Items.dubiousDisc, 300},
+ {Items.reaperCloth, 300},
+ {Items.razorClaw, 500},
+ {Items.razorFang, 500},
+ {Items.tm01, 1000},
+ {Items.tm02, 1000},
+ {Items.tm03, 1000},
+ {Items.tm04, 1000},
+ {Items.tm05, 1000},
+ {Items.tm06, 1000},
+ {Items.tm07, 2000},
+ {Items.tm08, 1000},
+ {Items.tm09, 1000},
+ {Items.tm10, 1000},
+ {Items.tm11, 2000},
+ {Items.tm12, 1000},
+ {Items.tm13, 1000},
+ {Items.tm14, 2000},
+ {Items.tm15, 2000},
+ {Items.tm16, 2000},
+ {Items.tm17, 1000},
+ {Items.tm18, 2000},
+ {Items.tm19, 1000},
+ {Items.tm20, 2000},
+ {Items.tm21, 1000},
+ {Items.tm22, 1000},
+ {Items.tm23, 1000},
+ {Items.tm24, 1000},
+ {Items.tm25, 2000},
+ {Items.tm26, 1000},
+ {Items.tm27, 1000},
+ {Items.tm28, 1000},
+ {Items.tm29, 1000},
+ {Items.tm30, 1000},
+ {Items.tm31, 1000},
+ {Items.tm32, 1000},
+ {Items.tm33, 2000},
+ {Items.tm34, 1000},
+ {Items.tm35, 1000},
+ {Items.tm36, 1000},
+ {Items.tm37, 2000},
+ {Items.tm38, 2000},
+ {Items.tm39, 1000},
+ {Items.tm40, 1000},
+ {Items.tm41, 1000},
+ {Items.tm42, 1000},
+ {Items.tm43, 1000},
+ {Items.tm44, 1000},
+ {Items.tm45, 1000},
+ {Items.tm46, 1000},
+ {Items.tm47, 1000},
+ {Items.tm48, 1000},
+ {Items.tm49, 1000},
+ {Items.tm50, 1000},
+ {Items.tm51, 1000},
+ {Items.tm52, 1000},
+ {Items.tm53, 1000},
+ {Items.tm54, 1000},
+ {Items.tm55, 1000},
+ {Items.tm56, 1000},
+ {Items.tm57, 1000},
+ {Items.tm58, 1000},
+ {Items.tm59, 1000},
+ {Items.tm60, 1000},
+ {Items.tm61, 1000},
+ {Items.tm62, 1000},
+ {Items.tm63, 1000},
+ {Items.tm64, 1000},
+ {Items.tm65, 1000},
+ {Items.tm66, 1000},
+ {Items.tm67, 1000},
+ {Items.tm68, 2000},
+ {Items.tm69, 1000},
+ {Items.tm70, 1000},
+ {Items.tm71, 1000},
+ {Items.tm72, 1000},
+ {Items.tm73, 1000},
+ {Items.tm74, 1000},
+ {Items.tm75, 1000},
+ {Items.tm76, 1000},
+ {Items.tm77, 1000},
+ {Items.tm78, 1000},
+ {Items.tm79, 1000},
+ {Items.tm80, 1000},
+ {Items.tm81, 1000},
+ {Items.tm82, 1000},
+ {Items.tm83, 1000},
+ {Items.tm84, 1000},
+ {Items.tm85, 1000},
+ {Items.tm86, 1000},
+ {Items.tm87, 1000},
+ {Items.tm88, 1000},
+ {Items.tm89, 1000},
+ {Items.tm90, 1000},
+ {Items.tm91, 1000},
+ {Items.tm92, 1000},
+ {Items.hm01, 0},
+ {Items.hm02, 0},
+ {Items.hm03, 0},
+ {Items.hm04, 0},
+ {Items.hm05, 0},
+ {Items.hm06, 0},
+ {Items.hm07, 0}, // unused in Gen 5
+ {Items.hm08, 0}, // unused in Gen 5
+ {Items.explorerKit, 0},
+ {Items.lootSack, 0},
+ {Items.ruleBook, 0},
+ {Items.pokeRadar, 0},
+ {Items.pointCard, 0},
+ {Items.journal, 0},
+ {Items.sealCase, 0},
+ {Items.fashionCase, 0},
+ {Items.sealBag, 0},
+ {Items.palPad, 0},
+ {Items.worksKey, 0},
+ {Items.oldCharm, 0},
+ {Items.galacticKey, 0},
+ {Items.redChain, 0},
+ {Items.townMap, 0},
+ {Items.vsSeeker, 0},
+ {Items.coinCase, 0},
+ {Items.oldRod, 0},
+ {Items.goodRod, 0},
+ {Items.superRod, 0},
+ {Items.sprayduck, 0},
+ {Items.poffinCase, 0},
+ {Items.bike, 0},
+ {Items.suiteKey, 0},
+ {Items.oaksLetter, 0},
+ {Items.lunarWing, 0},
+ {Items.memberCard, 0},
+ {Items.azureFlute, 0},
+ {Items.ssTicketJohto, 0},
+ {Items.contestPass, 0},
+ {Items.magmaStone, 0},
+ {Items.parcelSinnoh, 0},
+ {Items.coupon1, 0},
+ {Items.coupon2, 0},
+ {Items.coupon3, 0},
+ {Items.storageKeySinnoh, 0},
+ {Items.secretPotion, 0},
+ {Items.vsRecorder, 0},
+ {Items.gracidea, 0},
+ {Items.secretKeySinnoh, 0},
+ {Items.apricornBox, 0},
+ {Items.unownReport, 0},
+ {Items.berryPots, 0},
+ {Items.dowsingMachine, 0},
+ {Items.blueCard, 0},
+ {Items.slowpokeTail, 0},
+ {Items.clearBell, 0},
+ {Items.cardKeyJohto, 0},
+ {Items.basementKeyJohto, 0},
+ {Items.squirtBottle, 0},
+ {Items.redScale, 0},
+ {Items.lostItem, 0},
+ {Items.pass, 0},
+ {Items.machinePart, 0},
+ {Items.silverWing, 0},
+ {Items.rainbowWing, 0},
+ {Items.mysteryEgg, 0},
+ {Items.redApricorn, 2},
+ {Items.blueApricorn, 2},
+ {Items.yellowApricorn, 2},
+ {Items.greenApricorn, 2},
+ {Items.pinkApricorn, 2},
+ {Items.whiteApricorn, 2},
+ {Items.blackApricorn, 2},
+ {Items.fastBall, 30},
+ {Items.levelBall, 30},
+ {Items.lureBall, 30},
+ {Items.heavyBall, 30},
+ {Items.loveBall, 30},
+ {Items.friendBall, 30},
+ {Items.moonBall, 30},
+ {Items.sportBall, 30},
+ {Items.parkBall, 0},
+ {Items.photoAlbum, 0},
+ {Items.gbSounds, 0},
+ {Items.tidalBell, 0},
+ {Items.rageCandyBar, 1500},
+ {Items.dataCard01, 0},
+ {Items.dataCard02, 0},
+ {Items.dataCard03, 0},
+ {Items.dataCard04, 0},
+ {Items.dataCard05, 0},
+ {Items.dataCard06, 0},
+ {Items.dataCard07, 0},
+ {Items.dataCard08, 0},
+ {Items.dataCard09, 0},
+ {Items.dataCard10, 0},
+ {Items.dataCard11, 0},
+ {Items.dataCard12, 0},
+ {Items.dataCard13, 0},
+ {Items.dataCard14, 0},
+ {Items.dataCard15, 0},
+ {Items.dataCard16, 0},
+ {Items.dataCard17, 0},
+ {Items.dataCard18, 0},
+ {Items.dataCard19, 0},
+ {Items.dataCard20, 0},
+ {Items.dataCard21, 0},
+ {Items.dataCard22, 0},
+ {Items.dataCard23, 0},
+ {Items.dataCard24, 0},
+ {Items.dataCard25, 0},
+ {Items.dataCard26, 0},
+ {Items.dataCard27, 0},
+ {Items.jadeOrb, 0},
+ {Items.lockCapsule, 0},
+ {Items.redOrb, 0},
+ {Items.blueOrb, 0},
+ {Items.enigmaStone, 0},
+ {Items.prismScale, 300},
+ {Items.eviolite, 1000},
+ {Items.floatStone, 100},
+ {Items.rockyHelmet, 600},
+ {Items.airBalloon, 100},
+ {Items.redCard, 100},
+ {Items.ringTarget, 100},
+ {Items.bindingBand, 200},
+ {Items.absorbBulb, 100},
+ {Items.cellBattery, 100},
+ {Items.ejectButton, 100},
+ {Items.fireGem, 100},
+ {Items.waterGem, 100},
+ {Items.electricGem, 100},
+ {Items.grassGem, 100},
+ {Items.iceGem, 100},
+ {Items.fightingGem, 100},
+ {Items.poisonGem, 100},
+ {Items.groundGem, 100},
+ {Items.flyingGem, 100},
+ {Items.psychicGem, 100},
+ {Items.bugGem, 100},
+ {Items.rockGem, 100},
+ {Items.ghostGem, 100},
+ {Items.dragonGem, 100},
+ {Items.darkGem, 100},
+ {Items.steelGem, 100},
+ {Items.normalGem, 100},
+ {Items.healthFeather, 300},
+ {Items.muscleFeather, 300},
+ {Items.resistFeather, 300},
+ {Items.geniusFeather, 300},
+ {Items.cleverFeather, 300},
+ {Items.swiftFeather, 300},
+ {Items.prettyFeather, 20},
+ {Items.coverFossil, 500},
+ {Items.plumeFossil, 500},
+ {Items.libertyPass, 0},
+ {Items.passOrb, 20},
+ {Items.dreamBall, 100},
+ {Items.pokeToy, 100},
+ {Items.propCase, 0},
+ {Items.dragonSkull, 0},
+ {Items.balmMushroom, 0},
+ {Items.bigNugget, 0},
+ {Items.pearlString, 0},
+ {Items.cometShard, 0},
+ {Items.relicCopper, 0},
+ {Items.relicSilver, 0},
+ {Items.relicGold, 0},
+ {Items.relicVase, 0},
+ {Items.relicBand, 0},
+ {Items.relicStatue, 0},
+ {Items.relicCrown, 0},
+ {Items.casteliacone, 45},
+ {Items.direHit2, 0},
+ {Items.xSpeed2, 0},
+ {Items.xSpAtk2, 0},
+ {Items.xSpDef2, 0},
+ {Items.xDefense2, 0},
+ {Items.xAttack2, 0},
+ {Items.xAccuracy2, 0},
+ {Items.xSpeed3, 0},
+ {Items.xSpAtk3, 0},
+ {Items.xSpDef3, 0},
+ {Items.xDefense3, 0},
+ {Items.xAttack3, 0},
+ {Items.xAccuracy3, 0},
+ {Items.xSpeed6, 0},
+ {Items.xSpAtk6, 0},
+ {Items.xSpDef6, 0},
+ {Items.xDefense6, 0},
+ {Items.xAttack6, 0},
+ {Items.xAccuracy6, 0},
+ {Items.abilityUrge, 0},
+ {Items.itemDrop, 0},
+ {Items.itemUrge, 0},
+ {Items.resetUrge, 0},
+ {Items.direHit3, 0},
+ {Items.lightStone, 0},
+ {Items.darkStone, 0},
+ {Items.tm93, 1000},
+ {Items.tm94, 1000},
+ {Items.tm95, 1000},
+ {Items.xtransceiverMale, 0},
+ {Items.unused622, 0},
+ {Items.gram1, 0},
+ {Items.gram2, 0},
+ {Items.gram3, 0},
+ {Items.xtransceiverFemale, 0},
+ {Items.medalBox, 0},
+ {Items.dNASplicersFuse, 0},
+ {Items.dNASplicersSeparate, 0},
+ {Items.permit, 0},
+ {Items.ovalCharm, 0},
+ {Items.shinyCharm, 0},
+ {Items.plasmaCard, 0},
+ {Items.grubbyHanky, 0},
+ {Items.colressMachine, 0},
+ {Items.droppedItemCurtis, 0},
+ {Items.droppedItemYancy, 0},
+ {Items.revealGlass, 0}
+ }).collect(Collectors.toMap(kv -> kv[0], kv -> kv[1]));
+
+ /* @formatter:off */
+ @SuppressWarnings("unused")
+ private static final int[][] habitatListEntries = {
+ { 104, 105 }, // Route 4
+ { 124 }, // Route 15
+ { 134 }, // Route 21
+ { 84, 85, 86 }, // Clay Tunnel
+ { 23, 24, 25, 26 }, // Twist Mountain
+ { 97 }, // Village Bridge
+ { 27, 28, 29, 30 }, // Dragonspiral Tower
+ { 81, 82, 83 }, // Relic Passage
+ { 106 }, // Route 5*
+ { 125 }, // Route 16*
+ { 98 }, // Marvelous Bridge
+ { 123 }, // Abundant Shrine
+ { 132 }, // Undella Town
+ { 107 }, // Route 6
+ { 43 }, // Undella Bay
+ { 102, 103 }, // Wellspring Cave
+ { 95 }, // Nature Preserve
+ { 127 }, // Route 18
+ { 32, 33, 34, 35, 36 }, // Giant Chasm
+ { 111 }, // Route 7
+ { 31, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80 }, // Victory Road
+ { 12, 13, 14, 15, 16, 17, 18, 19 }, // Relic Castle
+ { 0 }, // Striation City
+ { 128 }, // Route 19
+ { 3 }, // Aspertia City
+ { 116 }, // Route 8*
+ { 44, 45 }, // Floccesy Ranch
+ { 61, 62, 63, 64, 65, 66, 67, 68, 69, 70 }, // Strange House
+ { 129 }, // Route 20
+ { 4 }, // Virbank City
+ { 37, 38, 39, 40, 41 }, // Castelia Sewers
+ { 118 }, // Route 9
+ { 46, 47 }, // Virbank Complex
+ { 42 }, // P2 Laboratory
+ { 1 }, // Castelia City
+ { 8, 9 }, // Pinwheel Forest
+ { 5 }, // Humilau City
+ { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60 }, // Reversal Mountain
+ { 6, 7 }, // Dreamyard
+ { 112, 113, 114, 115 }, // Celestial Tower
+ { 130 }, // Route 22
+ { 10, 11 }, // Desert Resort
+ { 119 }, // Route 11
+ { 133 }, // Route 17
+ { 99 }, // Route 1
+ { 131 }, // Route 23
+ { 2 }, // Icirrus City*
+ { 120 }, // Route 12
+ { 100 }, // Route 2
+ { 108, 109 }, // Mistralton Cave
+ { 121 }, // Route 13
+ { 101 }, // Route 3
+ { 117 }, // Moor of Icirrus*
+ { 96 }, // Driftveil Drawbridge
+ { 93, 94 }, // Seaside Cave
+ { 126 }, // Lostlorn Forest
+ { 122 }, // Route 14
+ { 20, 21, 22 }, // Chargestone Cave
+ };
+
+ private static final int[] bw1WildFileToAreaMap = {
+ 2,
+ 6,
+ 8,
+ 18, 18,
+ 19, 19,
+ 20, 20,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, // lol
+ 22,
+ 23, 23, 23,
+ 24, 24, 24, 24,
+ 25, 25, 25, 25,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 27, 27, 27, 27,
+ 29,
+ 36,
+ 57,
+ 59,
+ 60,
+ 38,
+ 39,
+ 40,
+ 30, 30,
+ 41,
+ 42,
+ 43,
+ 31, 31, 31,
+ 44,
+ 33, 33, 33, 33,
+ 45,
+ 34,
+ 46,
+ 32, 32, 32,
+ 47, 47,
+ 48,
+ 49,
+ 50,
+ 51,
+ 35,
+ 52,
+ 53,
+ 37,
+ 55,
+ 12,
+ 54,
+ };
+
+ private static final int[] bw2WildFileToAreaMap = {
+ 2,
+ 4,
+ 8,
+ 59,
+ 61,
+ 63,
+ 19, 19,
+ 20, 20,
+ 21, 21,
+ 22, 22, 22, 22, 22, 22, 22, 22,
+ 24, 24, 24,
+ 25, 25, 25, 25,
+ 26, 26, 26, 26,
+ 76,
+ 27, 27, 27, 27, 27,
+ 70, 70, 70, 70, 70,
+ 29,
+ 35,
+ 71, 71,
+ 72, 72,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 77, 77, 77,
+ 79, 79, 79, 79, 79, 79, 79, 79, 79,
+ 78, 78,
+ -1, // Nature Preserve (not on map)
+ 55,
+ 57,
+ 58,
+ 37,
+ 38,
+ 39,
+ 30, 30,
+ 40, 40,
+ 41,
+ 42,
+ 31, 31, 31,
+ 43,
+ 32, 32, 32, 32,
+ 44,
+ 33,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 34,
+ 50,
+ 51,
+ 36,
+ 53,
+ 66,
+ 67,
+ 69,
+ 75,
+ 12,
+ 52,
+ 68,
+ };
+
+ public static void tagTrainersBW(List<Trainer> trs) {
+ // We use different Gym IDs to cheat the system for the 3 n00bs
+ // Chili, Cress, and Cilan
+ // Cilan can be GYM1, then Chili is GYM9 and Cress GYM10
+ // Also their *trainers* are GYM11 lol
+
+ // Gym Trainers
+ tag(trs, "GYM11", 0x09, 0x0A);
+ tag(trs, "GYM2", 0x56, 0x57, 0x58);
+ tag(trs, "GYM3", 0xC4, 0xC6, 0xC7, 0xC8);
+ tag(trs, "GYM4", 0x42, 0x43, 0x44, 0x45);
+ tag(trs, "GYM5", 0xC9, 0xCA, 0xCB, 0x5F, 0xA8);
+ tag(trs, "GYM6", 0x7D, 0x7F, 0x80, 0x46, 0x47);
+ tag(trs, "GYM7", 0xD7, 0xD8, 0xD9, 0xD4, 0xD5, 0xD6);
+ tag(trs, "GYM8", 0x109, 0x10A, 0x10F, 0x10E, 0x110, 0x10B, 0x113, 0x112);
+
+ // Gym Leaders
+ tag(trs, 0x0C, "GYM1-LEADER"); // Cilan
+ tag(trs, 0x0B, "GYM9-LEADER"); // Chili
+ tag(trs, 0x0D, "GYM10-LEADER"); // Cress
+ tag(trs, 0x15, "GYM2-LEADER"); // Lenora
+ tag(trs, 0x16, "GYM3-LEADER"); // Burgh
+ tag(trs, 0x17, "GYM4-LEADER"); // Elesa
+ tag(trs, 0x18, "GYM5-LEADER"); // Clay
+ tag(trs, 0x19, "GYM6-LEADER"); // Skyla
+ tag(trs, 0x83, "GYM7-LEADER"); // Brycen
+ tag(trs, 0x84, "GYM8-LEADER"); // Iris or Drayden
+ tag(trs, 0x85, "GYM8-LEADER"); // Iris or Drayden
+
+ // Elite 4
+ tag(trs, 0xE4, "ELITE1"); // Shauntal
+ tag(trs, 0xE6, "ELITE2"); // Grimsley
+ tag(trs, 0xE7, "ELITE3"); // Caitlin
+ tag(trs, 0xE5, "ELITE4"); // Marshal
+
+ // Elite 4 R2
+ tag(trs, 0x233, "ELITE1"); // Shauntal
+ tag(trs, 0x235, "ELITE2"); // Grimsley
+ tag(trs, 0x236, "ELITE3"); // Caitlin
+ tag(trs, 0x234, "ELITE4"); // Marshal
+ tag(trs, 0x197, "CHAMPION"); // Alder
+
+ // Ubers?
+ tag(trs, 0x21E, "UBER"); // Game Freak Guy
+ tag(trs, 0x237, "UBER"); // Cynthia
+ tag(trs, 0xE8, "UBER"); // Ghetsis
+ tag(trs, 0x24A, "UBER"); // N-White
+ tag(trs, 0x24B, "UBER"); // N-Black
+
+ // Rival - Cheren
+ tagRivalBW(trs, "RIVAL1", 0x35);
+ tagRivalBW(trs, "RIVAL2", 0x11F);
+ tagRivalBW(trs, "RIVAL3", 0x38); // used for 3rd battle AND tag battle
+ tagRivalBW(trs, "RIVAL4", 0x193);
+ tagRivalBW(trs, "RIVAL5", 0x5A); // 5th battle & 2nd tag battle
+ tagRivalBW(trs, "RIVAL6", 0x21B);
+ tagRivalBW(trs, "RIVAL7", 0x24C);
+ tagRivalBW(trs, "RIVAL8", 0x24F);
+
+ // Rival - Bianca
+ tagRivalBW(trs, "FRIEND1", 0x3B);
+ tagRivalBW(trs, "FRIEND2", 0x1F2);
+ tagRivalBW(trs, "FRIEND3", 0x1FB);
+ tagRivalBW(trs, "FRIEND4", 0x1EB);
+ tagRivalBW(trs, "FRIEND5", 0x1EE);
+ tagRivalBW(trs, "FRIEND6", 0x252);
+
+ // N
+ tag(trs, "NOTSTRONG", 64);
+ tag(trs, "STRONG", 65, 89, 218);
+ }
+
+ public static void tagTrainersBW2(List<Trainer> trs) {
+ // Use GYM9/10/11 for the retired Chili/Cress/Cilan.
+ // Lenora doesn't have a team, or she'd be 12.
+ // Likewise for Brycen
+
+ // Some trainers have TWO teams because of Challenge Mode
+ // I believe this is limited to Gym Leaders, E4, Champ...
+ // The "Challenge Mode" teams have levels at similar to regular,
+ // but have the normal boost applied too.
+
+ // Gym Trainers
+ tag(trs, "GYM1", 0xab, 0xac);
+ tag(trs, "GYM2", 0xb2, 0xb3);
+ tag(trs, "GYM3", 0x2de, 0x2df, 0x2e0, 0x2e1);
+ // GYM4: old gym site included to give the city a theme
+ tag(trs, "GYM4", 0x26d, 0x94, 0xcf, 0xd0, 0xd1); // 0x94 might be 0x324
+ tag(trs, "GYM5", 0x13f, 0x140, 0x141, 0x142, 0x143, 0x144, 0x145);
+ tag(trs, "GYM6", 0x95, 0x96, 0x97, 0x98, 0x14c);
+ tag(trs, "GYM7", 0x17d, 0x17e, 0x17f, 0x180, 0x181);
+ tag(trs, "GYM8", 0x15e, 0x15f, 0x160, 0x161, 0x162, 0x163);
+
+ // Gym Leaders
+ // Order: Normal, Challenge Mode
+ // All the challenge mode teams are near the end of the ROM
+ // which makes things a bit easier.
+ tag(trs, "GYM1-LEADER", 0x9c, 0x2fc); // Cheren
+ tag(trs, "GYM2-LEADER", 0x9d, 0x2fd); // Roxie
+ tag(trs, "GYM3-LEADER", 0x9a, 0x2fe); // Burgh
+ tag(trs, "GYM4-LEADER", 0x99, 0x2ff); // Elesa
+ tag(trs, "GYM5-LEADER", 0x9e, 0x300); // Clay
+ tag(trs, "GYM6-LEADER", 0x9b, 0x301); // Skyla
+ tag(trs, "GYM7-LEADER", 0x9f, 0x302); // Drayden
+ tag(trs, "GYM8-LEADER", 0xa0, 0x303); // Marlon
+
+ // Elite 4 / Champion
+ // Order: Normal, Challenge Mode, Rematch, Rematch Challenge Mode
+ tag(trs, "ELITE1", 0x26, 0x304, 0x8f, 0x309);
+ tag(trs, "ELITE2", 0x28, 0x305, 0x91, 0x30a);
+ tag(trs, "ELITE3", 0x29, 0x307, 0x92, 0x30c);
+ tag(trs, "ELITE4", 0x27, 0x306, 0x90, 0x30b);
+ tag(trs, "CHAMPION", 0x155, 0x308, 0x218, 0x30d);
+
+ // Rival - Hugh
+ tagRivalBW(trs, "RIVAL1", 0xa1); // Start
+ tagRivalBW(trs, "RIVAL2", 0xa6); // Floccessy Ranch
+ tagRivalBW(trs, "RIVAL3", 0x24c); // Tag Battles in the sewers
+ tagRivalBW(trs, "RIVAL4", 0x170); // Tag Battle on the Plasma Frigate
+ tagRivalBW(trs, "RIVAL5", 0x17a); // Undella Town 1st visit
+ tagRivalBW(trs, "RIVAL6", 0x2bd); // Lacunosa Town Tag Battle
+ tagRivalBW(trs, "RIVAL7", 0x31a); // 2nd Plasma Frigate Tag Battle
+ tagRivalBW(trs, "RIVAL8", 0x2ac); // Victory Road
+ tagRivalBW(trs, "RIVAL9", 0x2b5); // Undella Town Post-E4
+ tagRivalBW(trs, "RIVAL10", 0x2b8); // Driftveil Post-Undella-Battle
+
+ // Tag Battle with Opposite Gender Hero
+ tagRivalBW(trs, "FRIEND1", 0x168);
+ tagRivalBW(trs, "FRIEND1", 0x16b);
+
+ // Tag/PWT Battles with Cheren
+ tag(trs, "GYM1", 0x173, 0x278, 0x32E);
+
+ // The Restaurant Brothers
+ tag(trs, "GYM9-LEADER", 0x1f0); // Cilan
+ tag(trs, "GYM10-LEADER", 0x1ee); // Chili
+ tag(trs, "GYM11-LEADER", 0x1ef); // Cress
+
+ // Themed Trainers
+ tag(trs, "THEMED:ZINZOLIN-STRONG", 0x2c0, 0x248, 0x15b, 0x1f1);
+ tag(trs, "THEMED:COLRESS-STRONG", 0x166, 0x158, 0x32d, 0x32f);
+ tag(trs, "THEMED:SHADOW1", 0x247, 0x15c, 0x2af);
+ tag(trs, "THEMED:SHADOW2", 0x1f2, 0x2b0);
+ tag(trs, "THEMED:SHADOW3", 0x1f3, 0x2b1);
+
+ // Uber-Trainers
+ // There are *fourteen* ubers of 17 allowed (incl. the champion)
+ // It's a rather stacked game...
+ tag(trs, 0x246, "UBER"); // Alder
+ tag(trs, 0x1c8, "UBER"); // Cynthia
+ tag(trs, 0xca, "UBER"); // Benga/BlackTower
+ tag(trs, 0xc9, "UBER"); // Benga/WhiteTreehollow
+ tag(trs, 0x5, "UBER"); // N/Zekrom
+ tag(trs, 0x6, "UBER"); // N/Reshiram
+ tag(trs, 0x30e, "UBER"); // N/Spring
+ tag(trs, 0x30f, "UBER"); // N/Summer
+ tag(trs, 0x310, "UBER"); // N/Autumn
+ tag(trs, 0x311, "UBER"); // N/Winter
+ tag(trs, 0x159, "UBER"); // Ghetsis
+ tag(trs, 0x8c, "UBER"); // Game Freak Guy
+ tag(trs, 0x24f, "UBER"); // Game Freak Leftovers Guy
+
+ }
+
+ private static void tagRivalBW(List<Trainer> allTrainers, String tag, int offset) {
+ allTrainers.get(offset - 1).tag = tag + "-0";
+ allTrainers.get(offset).tag = tag + "-1";
+ allTrainers.get(offset + 1).tag = tag + "-2";
+
+ }
+
+ private static void tag(List<Trainer> allTrainers, int number, String tag) {
+ if (allTrainers.size() > (number - 1)) {
+ allTrainers.get(number - 1).tag = tag;
+ }
+ }
+
+ private static void tag(List<Trainer> allTrainers, String tag, int... numbers) {
+ for (int num : numbers) {
+ if (allTrainers.size() > (num - 1)) {
+ allTrainers.get(num - 1).tag = tag;
+ }
+ }
+ }
+
+ public static void setMultiBattleStatusBW(List<Trainer> trs) {
+ // 62 + 63: Multi Battle with Team Plasma Grunts in Wellspring Cave w/ Cheren
+ // 401 + 402: Double Battle with Preschooler Sarah and Preschooler Billy
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.ALWAYS, 62, 63, 401, 402);
+ }
+
+ public static void setMultiBattleStatusBW2(List<Trainer> trs, boolean isBlack2) {
+ // 342 + 356: Multi Battle with Team Plasma Grunts in Castelia Sewers w/ Hugh
+ // 347 + 797: Multi Battle with Team Plasma Zinzolin and Team Plasma Grunt on Plasma Frigate w/ Hugh
+ // 374 + 375: Multi Battle with Team Plasma Grunts on Plasma Frigate w/ Cheren
+ // 376 + 377: Multi Battle with Team Plasma Grunts on Plasma Frigate w/ Hugh
+ // 494 + 495 + 496: Cilan, Chili, and Cress all participate in a Multi Battle
+ // 614 + 615: Double Battle with Veteran Claude and Veteran Cecile
+ // 643 + 644: Double Battle with Veteran Sinan and Veteran Rosaline
+ // 704 + 705: Multi Battle with Team Plasma Zinzolin and Team Plasma Grunt in Lacunosa Town w/ Hugh
+ // 798 + 799: Multi Battle with Team Plasma Grunts on Plasma Frigate w/ Hugh
+ // 807 + 809: Double Battle with Team Plasma Grunts on Plasma Frigate
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.ALWAYS, 342, 347, 356, 374, 375, 376, 377, 494,
+ 495, 496, 614, 615, 643, 644, 704, 705, 797, 798, 799, 807, 809
+ );
+
+ // 513/788 + 522: Potential Double Battle with Backpacker Kiyo (513 in B2, 788 in W2) and Hiker Markus
+ // 519/786 + 520/787: Potential Double Battle with Ace Trainer Ray (519 in W2, 786 in B2) and Ace Trainer Cora (520 in B2, 787 in W2)
+ // 602 + 603: Potential Double Battle with Ace Trainer Webster and Ace Trainer Shanta
+ // 790 + 791: Potential Double Battle with Nursery Aide Rosalyn and Preschooler Ike
+ // 792 + 793: Potential Double Battle with Youngster Henley and Lass Helia
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.POTENTIAL, 513, 522, 602, 603, 788, 790, 791, 792, 793);
+
+ if (isBlack2) {
+ // 789 + 521: Double Battle with Backpacker Kumiko and Hiker Jared
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.ALWAYS, 521, 789);
+
+ // 786 + 520: Potential Double Batlte with Ace Trainer Ray and Ace Trainer Cora
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.POTENTIAL, 520, 786);
+ } else {
+ // 514 + 521: Potential Double Battle with Backpacker Kumiko and Hiker Jared
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.POTENTIAL, 514, 521);
+
+ // 519 + 787: Double Battle with Ace Trainer Ray and Ace Trainer Cora
+ setMultiBattleStatus(trs, Trainer.MultiBattleStatus.ALWAYS, 519, 787);
+ }
+ }
+
+ private static void setMultiBattleStatus(List<Trainer> allTrainers, Trainer.MultiBattleStatus status, int... numbers) {
+ for (int num : numbers) {
+ if (allTrainers.size() > (num - 1)) {
+ allTrainers.get(num - 1).multiBattleStatus = status;
+ }
+ }
+ }
+
+}
diff --git a/src/com/pkrandom/constants/Gen6Constants.java b/src/com/pkrandom/constants/Gen6Constants.java
new file mode 100644
index 0000000..8a4be9d
--- /dev/null
+++ b/src/com/pkrandom/constants/Gen6Constants.java
@@ -0,0 +1,2171 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Gen6Constants.java - Constants for X/Y/Omega Ruby/Alpha Sapphire --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+import com.pkrandom.pokemon.*;
+
+import java.util.*;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import java.util.stream.Stream;
+
+public class Gen6Constants {
+
+ public static final int Type_XY = N3DSConstants.Type_XY;
+ public static final int Type_ORAS = N3DSConstants.Type_ORAS;
+
+ public static final int pokemonCount = 721;
+ private static final int xyFormeCount = 77, orasFormeCount = 104;
+ private static final int orasformeMovesetOffset = 35;
+
+ public static final List<Integer> actuallyCosmeticForms = Arrays.asList(
+ Species.Gen6Formes.cherrimCosmetic1,
+ Species.Gen6Formes.keldeoCosmetic1,
+ Species.Gen6Formes.furfrouCosmetic1, Species.Gen6Formes.furfrouCosmetic2,
+ Species.Gen6Formes.furfrouCosmetic3, Species.Gen6Formes.furfrouCosmetic4,
+ Species.Gen6Formes.furfrouCosmetic5, Species.Gen6Formes.furfrouCosmetic6,
+ Species.Gen6Formes.furfrouCosmetic7, Species.Gen6Formes.furfrouCosmetic8,
+ Species.Gen6Formes.furfrouCosmetic9,
+ Species.Gen6Formes.pumpkabooCosmetic1, Species.Gen6Formes.pumpkabooCosmetic2,
+ Species.Gen6Formes.pumpkabooCosmetic3,
+ Species.Gen6Formes.gourgeistCosmetic1, Species.Gen6Formes.gourgeistCosmetic2,
+ Species.Gen6Formes.gourgeistCosmetic3,
+ Species.Gen6Formes.floetteCosmetic1, Species.Gen6Formes.floetteCosmetic2,
+ Species.Gen6Formes.floetteCosmetic3, Species.Gen6Formes.floetteCosmetic4,
+ Species.Gen6Formes.pikachuCosmetic1, Species.Gen6Formes.pikachuCosmetic2,
+ Species.Gen6Formes.pikachuCosmetic3, Species.Gen6Formes.pikachuCosmetic4,
+ Species.Gen6Formes.pikachuCosmetic5, Species.Gen6Formes.pikachuCosmetic6 // Cosplay Pikachu
+ );
+
+ public static final String criesTablePrefixXY = "60000A006B000A0082000A003D010A00";
+
+ public static final String introPokemonModelOffsetXY = "01000400020002000200000003000000";
+ public static final String introInitialCryOffset1XY = "3AFEFFEB000055E31400D40507005001";
+ public static final String introInitialCryOffset2XY = "0800A0E110FEFFEB000057E31550C405";
+ public static final String introInitialCryOffset3XY = "0020E0E30310A0E1E4FDFFEB0000A0E3";
+ public static final String introRepeatedCryOffsetXY = "1080BDE800002041000000008D001000";
+
+ public static final Map<Integer,List<Integer>> speciesToMegaStoneXY = setupSpeciesToMegaStone(Type_XY);
+ public static final Map<Integer,List<Integer>> speciesToMegaStoneORAS = setupSpeciesToMegaStone(Type_ORAS);
+
+ public static final Map<Integer,String> formeSuffixes = setupFormeSuffixes();
+ public static final Map<Integer,String> dummyFormeSuffixes = setupDummyFormeSuffixes();
+ public static final Map<Integer,Map<Integer,String>> formeSuffixesByBaseForme = setupFormeSuffixesByBaseForme();
+
+ public static String getFormeSuffixByBaseForme(int baseForme, int formNum) {
+ return formeSuffixesByBaseForme.getOrDefault(baseForme,dummyFormeSuffixes).getOrDefault(formNum,"");
+ }
+
+ private static final List<Integer> xyIrregularFormes = Arrays.asList(
+ Species.Gen6Formes.castformF, Species.Gen6Formes.castformW, Species.Gen6Formes.castformI,
+ Species.Gen6Formes.darmanitanZ,
+ Species.Gen6Formes.meloettaP,
+ Species.Gen6Formes.kyuremW,
+ Species.Gen6Formes.kyuremB,
+ Species.Gen6Formes.gengarMega,
+ Species.Gen6Formes.gardevoirMega,
+ Species.Gen6Formes.ampharosMega,
+ Species.Gen6Formes.venusaurMega,
+ Species.Gen6Formes.charizardMegaX, Species.Gen6Formes.charizardMegaY,
+ Species.Gen6Formes.mewtwoMegaX, Species.Gen6Formes.mewtwoMegaY,
+ Species.Gen6Formes.blazikenMega,
+ Species.Gen6Formes.medichamMega,
+ Species.Gen6Formes.houndoomMega,
+ Species.Gen6Formes.aggronMega,
+ Species.Gen6Formes.banetteMega,
+ Species.Gen6Formes.tyranitarMega,
+ Species.Gen6Formes.scizorMega,
+ Species.Gen6Formes.pinsirMega,
+ Species.Gen6Formes.aerodactylMega,
+ Species.Gen6Formes.lucarioMega,
+ Species.Gen6Formes.abomasnowMega,
+ Species.Gen6Formes.aegislashB,
+ Species.Gen6Formes.blastoiseMega,
+ Species.Gen6Formes.kangaskhanMega,
+ Species.Gen6Formes.gyaradosMega,
+ Species.Gen6Formes.absolMega,
+ Species.Gen6Formes.alakazamMega,
+ Species.Gen6Formes.heracrossMega,
+ Species.Gen6Formes.mawileMega,
+ Species.Gen6Formes.manectricMega,
+ Species.Gen6Formes.garchompMega,
+ Species.Gen6Formes.latiosMega,
+ Species.Gen6Formes.latiasMega
+ );
+
+ private static final List<Integer> orasIrregularFormes = Arrays.asList(
+ Species.Gen6Formes.castformF, Species.Gen6Formes.castformW, Species.Gen6Formes.castformI,
+ Species.Gen6Formes.darmanitanZ,
+ Species.Gen6Formes.meloettaP,
+ Species.Gen6Formes.kyuremW,
+ Species.Gen6Formes.kyuremB,
+ Species.Gen6Formes.gengarMega,
+ Species.Gen6Formes.gardevoirMega,
+ Species.Gen6Formes.ampharosMega,
+ Species.Gen6Formes.venusaurMega,
+ Species.Gen6Formes.charizardMegaX, Species.Gen6Formes.charizardMegaY,
+ Species.Gen6Formes.mewtwoMegaX, Species.Gen6Formes.mewtwoMegaY,
+ Species.Gen6Formes.blazikenMega,
+ Species.Gen6Formes.medichamMega,
+ Species.Gen6Formes.houndoomMega,
+ Species.Gen6Formes.aggronMega,
+ Species.Gen6Formes.banetteMega,
+ Species.Gen6Formes.tyranitarMega,
+ Species.Gen6Formes.scizorMega,
+ Species.Gen6Formes.pinsirMega,
+ Species.Gen6Formes.aerodactylMega,
+ Species.Gen6Formes.lucarioMega,
+ Species.Gen6Formes.abomasnowMega,
+ Species.Gen6Formes.aegislashB,
+ Species.Gen6Formes.blastoiseMega,
+ Species.Gen6Formes.kangaskhanMega,
+ Species.Gen6Formes.gyaradosMega,
+ Species.Gen6Formes.absolMega,
+ Species.Gen6Formes.alakazamMega,
+ Species.Gen6Formes.heracrossMega,
+ Species.Gen6Formes.mawileMega,
+ Species.Gen6Formes.manectricMega,
+ Species.Gen6Formes.garchompMega,
+ Species.Gen6Formes.latiosMega,
+ Species.Gen6Formes.latiasMega,
+ Species.Gen6Formes.swampertMega,
+ Species.Gen6Formes.sceptileMega,
+ Species.Gen6Formes.sableyeMega,
+ Species.Gen6Formes.altariaMega,
+ Species.Gen6Formes.galladeMega,
+ Species.Gen6Formes.audinoMega,
+ Species.Gen6Formes.sharpedoMega,
+ Species.Gen6Formes.slowbroMega,
+ Species.Gen6Formes.steelixMega,
+ Species.Gen6Formes.pidgeotMega,
+ Species.Gen6Formes.glalieMega,
+ Species.Gen6Formes.diancieMega,
+ Species.Gen6Formes.metagrossMega,
+ Species.Gen6Formes.kyogreP,
+ Species.Gen6Formes.groudonP,
+ Species.Gen6Formes.rayquazaMega,
+ Species.Gen6Formes.cameruptMega,
+ Species.Gen6Formes.lopunnyMega,
+ Species.Gen6Formes.salamenceMega,
+ Species.Gen6Formes.beedrillMega
+ );
+
+ private static final int moveCountXY = 617, moveCountORAS = 621;
+ private static final int highestAbilityIndexXY = Abilities.auraBreak, highestAbilityIndexORAS = Abilities.deltaStream;
+
+ public static final List<Integer> uselessAbilities = Arrays.asList(Abilities.forecast, Abilities.multitype,
+ Abilities.flowerGift, Abilities.zenMode, Abilities.stanceChange);
+
+ public static final MoveCategory[] moveCategoryIndices = { MoveCategory.STATUS, MoveCategory.PHYSICAL,
+ MoveCategory.SPECIAL };
+
+ public static byte moveCategoryToByte(MoveCategory cat) {
+ switch (cat) {
+ case PHYSICAL:
+ return 1;
+ case SPECIAL:
+ return 2;
+ case STATUS:
+ default:
+ return 0;
+ }
+ }
+
+ public static final int noDamageTargetTrappingEffect = 106, noDamageFieldTrappingEffect = 354,
+ damageAdjacentFoesTrappingEffect = 373;
+
+ public static final int noDamageStatusQuality = 1, noDamageStatChangeQuality = 2, damageStatusQuality = 4,
+ noDamageStatusAndStatChangeQuality = 5, damageTargetDebuffQuality = 6, damageUserBuffQuality = 7,
+ damageAbsorbQuality = 8;
+
+ public static List<Integer> bannedMoves = Collections.singletonList(Moves.hyperspaceFury);
+
+ public static final Type[] typeTable = constructTypeTable();
+
+ // Copied from pk3DS. "Dark Grass Held Item" should probably be renamed
+ 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, bsDarkGrassHeldItemOffset = 16,
+ bsGenderOffset = 18, bsGrowthCurveOffset = 21, bsAbility1Offset = 24, bsAbility2Offset = 25,
+ bsAbility3Offset = 26, bsFormeOffset = 28, bsFormeSpriteOffset = 30, bsFormeCountOffset = 32,
+ bsTMHMCompatOffset = 40, bsSpecialMTCompatOffset = 56, bsMTCompatOffset = 64;
+
+ private static final int bsSizeXY = 0x40;
+ private static final int bsSizeORAS = 0x50;
+
+ public static final int evolutionMethodCount = 34;
+
+ public static final int staticPokemonSize = 0xC;
+ private static final int staticPokemonCountXY = 0xD;
+ private static final int staticPokemonCountORAS = 0x3B;
+
+ private static final int giftPokemonSizeXY = 0x18;
+ private static final int giftPokemonSizeORAS = 0x24;
+ private static final int giftPokemonCountXY = 0x13;
+ private static final int giftPokemonCountORAS = 0x25;
+
+ public static final String tmDataPrefix = "D400AE02AF02B002";
+ public static final int tmCount = 100, tmBlockOneCount = 92, tmBlockTwoCount = 3, tmBlockThreeCount = 5,
+ tmBlockOneOffset = Items.tm01, tmBlockTwoOffset = Items.tm93, tmBlockThreeOffset = Items.tm96, hmBlockOneCount = 5,
+ rockSmashOffsetORAS = 10, diveOffsetORAS = 28;
+ private static final int tmBlockTwoStartingOffsetXY = 97, tmBlockTwoStartingOffsetORAS = 98,
+ hmCountXY = 5, hmCountORAS = 7;
+ public static final int hiddenItemCountORAS = 170;
+ public static final String hiddenItemsPrefixORAS = "A100A200A300A400A5001400010053004A0084000900";
+ public static final String itemPalettesPrefix = "6F7461746500FF920A063F";
+ private static final String shopItemsLocatorXY = "0400110004000300", shopItemsLocatorORAS = "04001100120004000300";
+
+ public static final int tutorMoveCount = 60;
+ public static final String tutorsLocator = "C2015701A20012024401BA01";
+ public static final String tutorsShopPrefix = "8A02000030000000";
+
+ public static final int[] tutorSize = new int[]{15, 17, 16, 15};
+
+ private static final String ingameTradesPrefixXY = "BA0A02015E000100BC0A150069000100";
+ private static final String ingameTradesPrefixORAS = "810B7A0097000A00000047006B000A00";
+
+ public static final int ingameTradeSize = 0x24;
+
+ public static final String friendshipValueForEvoLocator = "DC0050E3BC00002A";
+
+ public static final String perfectOddsBranchLocator = "050000BA000050E3";
+
+ public static final String[] fastestTextPrefixes = new String[]{"1080BDE80000A0E31080BDE8F0412DE9", "485080E59C4040E24C50C0E5EC009FE5"};
+
+ private static final List<Integer> mainGameShopsXY = Arrays.asList(
+ 10,11,12,13,16,17,20,21,24,25
+ );
+
+ private static final List<Integer> mainGameShopsORAS = Arrays.asList(
+ 10, 11, 13, 14, 16, 17, 18, 19, 20, 21
+ );
+
+ private static final List<String> shopNamesXY = Arrays.asList(
+ "Primary 0 Badges",
+ "Primary 1 Badges",
+ "Primary 2 Badges",
+ "Primary 3 Badges",
+ "Primary 4 Badges",
+ "Primary 5 Badges",
+ "Primary 6 Badges",
+ "Primary 7 Badges",
+ "Primary 8 Badges",
+ "Unused",
+ "Lumiose Herboriste",
+ "Lumiose Poké Ball Boutique",
+ "Lumiose Stone Emporium",
+ "Coumarine Incenses",
+ "Aquacorde Poké Ball",
+ "Aquacorde Potion",
+ "Lumiose North Secondary",
+ "Cyllage Secondary",
+ "Shalour Secondary (TMs)",
+ "Lumiose South Secondary (TMs)",
+ "Laverre Secondary",
+ "Snowbelle Secondary",
+ "Kiloude Secondary (TMs)",
+ "Anistar Secondary (TMs)",
+ "Santalune Secondary",
+ "Coumarine Secondary");
+
+ private static final List<String> shopNamesORAS = Arrays.asList(
+ "Primary 0 Badges (After Pokédex)",
+ "Primary 1 Badges",
+ "Primary 2 Badges",
+ "Primary 3 Badges",
+ "Primary 4 Badges",
+ "Primary 5 Badges",
+ "Primary 6 Badges",
+ "Primary 7 Badges",
+ "Primary 8 Badges",
+ "Primary 0 Badges (Before Pokédex)",
+ "Slateport Incenses",
+ "Slateport Vitamins",
+ "Slateport TMs",
+ "Rustboro Secondary",
+ "Slateport Secondary",
+ "Mauville Secondary (TMs)",
+ "Verdanturf Secondary",
+ "Fallarbor Secondary",
+ "Lavaridge Herbs",
+ "Lilycove Dept. Store 2F Left",
+ "Lilycove Dept. Store 3F Left",
+ "Lilycove Dept. Store 3F Right",
+ "Lilycove Dept. Store 4F Left (TMs)",
+ "Lilycove Dept. Store 4F Right (TMs)");
+
+
+ public static final List<Integer> evolutionItems = Arrays.asList(Items.sunStone, Items.moonStone, Items.fireStone,
+ Items.thunderStone, Items.waterStone, Items.leafStone, Items.shinyStone, Items.duskStone, Items.dawnStone,
+ Items.ovalStone, Items.kingsRock, Items.deepSeaTooth, Items.deepSeaScale, Items.metalCoat, Items.dragonScale,
+ Items.upgrade, Items.protector, Items.electirizer, Items.magmarizer, Items.dubiousDisc, Items.reaperCloth,
+ Items.razorClaw, Items.razorFang, Items.prismScale, Items.whippedDream, Items.sachet);
+
+ private static final List<Integer> requiredFieldTMsXY = Arrays.asList(
+ 1, 9, 40, 19, 65, 73, 69, 74, 81, 57, 61, 97, 95, 71, 79, 30, 31, 36, 53, 29, 22, 3, 2, 80, 26);
+
+ private static final List<Integer> requiredFieldTMsORAS = Arrays.asList(
+ 37, 32, 62, 11, 86, 29, 59, 43, 53, 69, 6, 2, 13, 18, 22, 61, 30, 97, 7, 90, 26, 55, 34, 35, 64, 65, 66,
+ 74, 79, 80, 81, 84, 89, 91, 93, 95);
+
+ public static final List<Integer> fieldMovesXY = Arrays.asList(
+ Moves.cut, Moves.fly, Moves.surf, Moves.strength, Moves.flash, Moves.dig, Moves.teleport,
+ Moves.waterfall, Moves.sweetScent, Moves.rockSmash);
+ public static final List<Integer> fieldMovesORAS = Arrays.asList(
+ Moves.cut, Moves.fly, Moves.surf, Moves.strength, Moves.flash, Moves.dig, Moves.teleport,
+ Moves.waterfall, Moves.sweetScent, Moves.rockSmash, Moves.secretPower, Moves.dive);
+
+ public static final int fallingEncounterOffset = 0xF4270, fallingEncounterCount = 55, fieldEncounterSize = 0x3C,
+ rustlingBushEncounterOffset = 0xF40CC, rustlingBushEncounterCount = 7;
+ public static final Map<Integer, String> fallingEncounterNameMap = constructFallingEncounterNameMap();
+ public static final Map<Integer, String> rustlingBushEncounterNameMap = constructRustlingBushEncounterNameMap();
+ public static final int perPokemonAreaDataLengthXY = 0xE8, perPokemonAreaDataLengthORAS = 0x2A0;
+
+ private static final String saveLoadFormeReversionPrefixXY = "09EB000094E5141094E54A0B80E2", saveLoadFormeReversionPrefixORAS = "09EB000094E5141094E5120A80E2";
+ public static final String afterBattleFormeReversionPrefix = "E4FFFFEA0000000000000000";
+ public static final String ninjaskSpeciesPrefix = "241094E5B810D1E1", shedinjaSpeciesPrefix = "C2FFFFEB0040A0E10020A0E3";
+ public static final String boxLegendaryFunctionPrefixXY = "14D08DE20900A0E1";
+ public static final int boxLegendaryEncounterFileXY = 341, boxLegendaryLocalScriptOffsetXY = 0x6E0;
+ public static final int[] boxLegendaryCodeOffsetsXY = new int[]{ 144, 300, 584 };
+ public static final int seaSpiritsDenEncounterFileXY = 351, seaSpiritsDenLocalScriptOffsetXY = 0x1C0;
+ public static final int[] seaSpiritsDenScriptOffsetsXY = new int[]{ 0x500, 0x508, 0x510 };
+ public static final String rayquazaFunctionPrefixORAS = "0900A0E1F08FBDE8";
+ public static final int[] rayquazaScriptOffsetsORAS = new int[]{ 3334, 14734 }, rayquazaCodeOffsetsORAS = new int[]{ 136, 292, 576 };
+ public static final String nationalDexFunctionLocator = "080094E5010000E21080BDE8170F122F", xyGetDexFlagFunctionLocator = "000055E30100A0030A00000A",
+ orasGetHoennDexCaughtFunctionPrefix = "170F122F1CC15800";
+ public static final int megastoneTableStartingOffsetORAS = 0xABA, megastoneTableEntrySizeORAS = 0x20, megastoneTableLengthORAS = 27;
+
+ public static final String pickupTableLocator = "110012001A00";
+ public static final int numberOfPickupItems = 29;
+
+ public static final String xyRoamerFreeSpacePostfix = "540095E50220A0E30810A0E1", xyRoamerSpeciesLocator = "9040A0030400000A",
+ xyRoamerLevelPrefix = "B020DDE13F3BC1E3";
+
+ public static final String xyTrashEncountersTablePrefix = "4028100000";
+ public static final int xyTrashEncounterDataLength = 16, xyTrashCanEncounterCount = 24,
+ pokemonVillageGarbadorOffset = 0, pokemonVillageGarbadorCount = 6, pokemonVillageBanetteOffset = 6,
+ pokemonVillageBanetteCount = 6, lostHotelGarbadorOffset = 12, lostHotelGarbadorCount = 3,
+ lostHotelTrubbishOffset = 15, lostHotelTrubbishCount = 3, lostHotelRotomOffset = 18, lostHotelRotomCount = 6;
+
+
+ public static List<Integer> xyHardcodedTradeOffsets = Arrays.asList(1, 8);
+ public static List<Integer> xyHardcodedTradeTexts = Arrays.asList(129, 349);
+
+ public static final List<Integer> consumableHeldItems = setupAllConsumableItems();
+
+ private static List<Integer> setupAllConsumableItems() {
+ List<Integer> list = new ArrayList<>(Gen5Constants.consumableHeldItems);
+ list.addAll(Arrays.asList(Items.weaknessPolicy, Items.luminousMoss, Items.snowball, Items.roseliBerry,
+ Items.keeBerry, Items.marangaBerry, Items.fairyGem));
+ return list;
+ }
+
+ public static final List<Integer> allHeldItems = setupAllHeldItems();
+
+ private static List<Integer> setupAllHeldItems() {
+ List<Integer> list = new ArrayList<>(Gen5Constants.allHeldItems);
+ list.addAll(Arrays.asList(Items.weaknessPolicy, Items.snowball, Items.roseliBerry, Items.keeBerry,
+ Items.marangaBerry, Items.fairyGem));
+ list.addAll(Arrays.asList(Items.assaultVest, Items.pixiePlate, Items.safetyGoggles));
+ return list;
+ }
+
+ public static final List<Integer> generalPurposeConsumableItems = initializeGeneralPurposeConsumableItems();
+
+ private static List<Integer> initializeGeneralPurposeConsumableItems() {
+ List<Integer> list = new ArrayList<>(Gen5Constants.generalPurposeConsumableItems);
+ list.addAll(Arrays.asList(Items.weaknessPolicy, Items.luminousMoss, Items.snowball, Items.keeBerry, Items.marangaBerry));
+ return Collections.unmodifiableList(list);
+ }
+
+ public static final List<Integer> generalPurposeItems = initializeGeneralPurposeItems();
+
+ private static List<Integer> initializeGeneralPurposeItems() {
+ List<Integer> list = new ArrayList<>(Gen5Constants.generalPurposeItems);
+ list.addAll(Arrays.asList(Items.safetyGoggles));
+ return Collections.unmodifiableList(list);
+ }
+
+ public static final Map<Type, Integer> weaknessReducingBerries = initializeWeaknessReducingBerries();
+
+ private static Map<Type, Integer> initializeWeaknessReducingBerries() {
+ Map<Type, Integer> map = new HashMap<>(Gen5Constants.weaknessReducingBerries);
+ map.put(Type.FAIRY, Items.roseliBerry);
+ return Collections.unmodifiableMap(map);
+ }
+
+ public static final Map<Type, Integer> consumableTypeBoostingItems = initializeConsumableTypeBoostingItems();
+
+ private static Map<Type, Integer> initializeConsumableTypeBoostingItems() {
+ Map<Type, Integer> map = new HashMap<>(Gen5Constants.consumableTypeBoostingItems);
+ map.put(Type.FAIRY, Items.fairyGem);
+ return Collections.unmodifiableMap(map);
+ }
+
+ public static final Map<Type, List<Integer>> typeBoostingItems = initializeTypeBoostingItems();
+
+ private static Map<Type, List<Integer>> initializeTypeBoostingItems() {
+ Map<Type, List<Integer>> map = new HashMap<>(Gen5Constants.typeBoostingItems);
+ map.put(Type.FAIRY, Arrays.asList(Items.pixiePlate));
+ return Collections.unmodifiableMap(map);
+ }
+
+ public static final Map<Integer, List<Integer>> moveBoostingItems = initializeMoveBoostingItems();
+
+ private static Map<Integer, List<Integer>> initializeMoveBoostingItems() {
+ Map<Integer, List<Integer>> map = new HashMap<>(Gen5Constants.moveBoostingItems);
+ map.put(Moves.drainingKiss, Arrays.asList(Items.bigRoot));
+ map.put(Moves.infestation, Arrays.asList(Items.gripClaw, Items.bindingBand));
+ map.put(Moves.oblivionWing, Arrays.asList(Items.bigRoot));
+ map.put(Moves.parabolicCharge, Arrays.asList(Items.bigRoot));
+ return Collections.unmodifiableMap(map);
+ }
+
+ public static final Map<Integer, List<Integer>> abilityBoostingItems = initializeAbilityBoostingItems();
+
+ private static Map<Integer, List<Integer>> initializeAbilityBoostingItems() {
+ Map<Integer, List<Integer>> map = new HashMap<>(Gen5Constants.abilityBoostingItems);
+ // Weather from abilities changed in Gen VI, so these items become relevant.
+ map.put(Abilities.drizzle, Arrays.asList(Items.dampRock));
+ map.put(Abilities.drought, Arrays.asList(Items.heatRock));
+ map.put(Abilities.sandStream, Arrays.asList(Items.smoothRock));
+ map.put(Abilities.snowWarning, Arrays.asList(Items.icyRock));
+ return Collections.unmodifiableMap(map);
+ }
+
+ // No new species boosting items in Gen VI
+ public static final Map<Integer, List<Integer>> speciesBoostingItems = Gen5Constants.speciesBoostingItems;
+
+ public static String getIngameTradesPrefix(int romType) {
+ if (romType == Type_XY) {
+ return ingameTradesPrefixXY;
+ } else {
+ return ingameTradesPrefixORAS;
+ }
+ }
+
+ public static List<Integer> getRequiredFieldTMs(int romType) {
+ if (romType == Type_XY) {
+ return requiredFieldTMsXY;
+ } else {
+ return requiredFieldTMsORAS;
+ }
+ }
+
+ public static List<Integer> getMainGameShops(int romType) {
+ if (romType == Type_XY) {
+ return mainGameShopsXY;
+ } else {
+ return mainGameShopsORAS;
+ }
+ }
+
+ public static List<String> getShopNames(int romType) {
+ if (romType == Type_XY) {
+ return shopNamesXY;
+ } else {
+ return shopNamesORAS;
+ }
+ }
+
+ public static int getBsSize(int romType) {
+ if (romType == Type_XY) {
+ return bsSizeXY;
+ } else {
+ return bsSizeORAS;
+ }
+ }
+
+ public static List<Integer> getIrregularFormes(int romType) {
+ if (romType == Type_XY) {
+ return xyIrregularFormes;
+ } else if (romType == Type_ORAS) {
+ return orasIrregularFormes;
+ }
+ return new ArrayList<>();
+ }
+
+ public static int getFormeCount(int romType) {
+ if (romType == Type_XY) {
+ return xyFormeCount;
+ } else if (romType == Type_ORAS) {
+ return orasFormeCount;
+ }
+ return 0;
+ }
+
+ public static int getFormeMovesetOffset(int romType) {
+ if (romType == Type_XY) {
+ return orasformeMovesetOffset;
+ } else if (romType == Type_ORAS) {
+ return orasformeMovesetOffset;
+ }
+ return 0;
+ }
+
+ public static int getMoveCount(int romType) {
+ if (romType == Type_XY) {
+ return moveCountXY;
+ } else if (romType == Type_ORAS) {
+ return moveCountORAS;
+ }
+ return moveCountXY;
+ }
+
+ public static int getTMBlockTwoStartingOffset(int romType) {
+ if (romType == Type_XY) {
+ return tmBlockTwoStartingOffsetXY;
+ } else if (romType == Type_ORAS) {
+ return tmBlockTwoStartingOffsetORAS;
+ }
+ return tmBlockTwoStartingOffsetXY;
+ }
+
+ public static int getHMCount(int romType) {
+ if (romType == Type_XY) {
+ return hmCountXY;
+ } else if (romType == Type_ORAS) {
+ return hmCountORAS;
+ }
+ return hmCountXY;
+ }
+
+ public static int getHighestAbilityIndex(int romType) {
+ if (romType == Type_XY) {
+ return highestAbilityIndexXY;
+ } else if (romType == Type_ORAS) {
+ return highestAbilityIndexORAS;
+ }
+ return highestAbilityIndexXY;
+ }
+
+ public static int getStaticPokemonCount(int romType) {
+ if (romType == Type_XY) {
+ return staticPokemonCountXY;
+ } else if (romType == Type_ORAS) {
+ return staticPokemonCountORAS;
+ }
+ return staticPokemonCountXY;
+ }
+
+ public static int getGiftPokemonCount(int romType) {
+ if (romType == Type_XY) {
+ return giftPokemonCountXY;
+ } else if (romType == Type_ORAS) {
+ return giftPokemonCountORAS;
+ }
+ return giftPokemonCountXY;
+ }
+
+ public static int getGiftPokemonSize(int romType) {
+ if (romType == Type_XY) {
+ return giftPokemonSizeXY;
+ } else if (romType == Type_ORAS) {
+ return giftPokemonSizeORAS;
+ }
+ return giftPokemonSizeXY;
+ }
+
+ public static String getShopItemsLocator(int romType) {
+ if (romType == Type_XY) {
+ return shopItemsLocatorXY;
+ } else if (romType == Type_ORAS) {
+ return shopItemsLocatorORAS;
+ }
+ return shopItemsLocatorXY;
+ }
+
+ public static boolean isMegaStone(int itemIndex) {
+ // These values come from https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Generation_VI)
+ return (itemIndex >= Items.gengarite && itemIndex <= Items.latiosite) ||
+ (itemIndex >= Items.swampertite && itemIndex <= Items.diancite) ||
+ (itemIndex >= Items.cameruptite && itemIndex <= Items.beedrillite);
+ }
+
+ private static Type[] constructTypeTable() {
+ Type[] table = new Type[256];
+ table[0x00] = Type.NORMAL;
+ table[0x01] = Type.FIGHTING;
+ table[0x02] = Type.FLYING;
+ table[0x03] = Type.POISON;
+ table[0x04] = Type.GROUND;
+ table[0x05] = Type.ROCK;
+ table[0x06] = Type.BUG;
+ table[0x07] = Type.GHOST;
+ table[0x08] = Type.STEEL;
+ table[0x09] = Type.FIRE;
+ table[0x0A] = Type.WATER;
+ table[0x0B] = Type.GRASS;
+ table[0x0C] = Type.ELECTRIC;
+ table[0x0D] = Type.PSYCHIC;
+ table[0x0E] = Type.ICE;
+ table[0x0F] = Type.DRAGON;
+ table[0x10] = Type.DARK;
+ table[0x11] = Type.FAIRY;
+ return table;
+ }
+
+ public static byte typeToByte(Type type) {
+ if (type == null) {
+ return 0x00; // normal?
+ }
+ switch (type) {
+ case NORMAL:
+ return 0x00;
+ case FIGHTING:
+ return 0x01;
+ case FLYING:
+ return 0x02;
+ case POISON:
+ return 0x03;
+ case GROUND:
+ return 0x04;
+ case ROCK:
+ return 0x05;
+ case BUG:
+ return 0x06;
+ case GHOST:
+ return 0x07;
+ case FIRE:
+ return 0x09;
+ case WATER:
+ return 0x0A;
+ case GRASS:
+ return 0x0B;
+ case ELECTRIC:
+ return 0x0C;
+ case PSYCHIC:
+ return 0x0D;
+ case ICE:
+ return 0x0E;
+ case DRAGON:
+ return 0x0F;
+ case STEEL:
+ return 0x08;
+ case DARK:
+ return 0x10;
+ case FAIRY:
+ return 0x11;
+ default:
+ return 0; // normal by default
+ }
+ }
+
+ public static String getSaveLoadFormeReversionPrefix(int romType) {
+ if (romType == Type_XY) {
+ return saveLoadFormeReversionPrefixXY;
+ } else {
+ return saveLoadFormeReversionPrefixORAS;
+ }
+ }
+
+ private static Map<Integer,String> setupFormeSuffixes() {
+ Map<Integer,String> formeSuffixes = new HashMap<>();
+ formeSuffixes.put(Species.Gen6Formes.deoxysA,"-A");
+ formeSuffixes.put(Species.Gen6Formes.deoxysD,"-D");
+ formeSuffixes.put(Species.Gen6Formes.deoxysS,"-S");
+ formeSuffixes.put(Species.Gen6Formes.wormadamS,"-S");
+ formeSuffixes.put(Species.Gen6Formes.wormadamT,"-T");
+ formeSuffixes.put(Species.Gen6Formes.shayminS,"-S");
+ formeSuffixes.put(Species.Gen6Formes.giratinaO,"-O");
+ formeSuffixes.put(Species.Gen6Formes.rotomH,"-H");
+ formeSuffixes.put(Species.Gen6Formes.rotomW,"-W");
+ formeSuffixes.put(Species.Gen6Formes.rotomFr,"-Fr");
+ formeSuffixes.put(Species.Gen6Formes.rotomFa,"-Fa");
+ formeSuffixes.put(Species.Gen6Formes.rotomM,"-M");
+ formeSuffixes.put(Species.Gen6Formes.castformF,"-F");
+ formeSuffixes.put(Species.Gen6Formes.castformW,"-W");
+ formeSuffixes.put(Species.Gen6Formes.castformI,"-I");
+ formeSuffixes.put(Species.Gen6Formes.basculinB,"-B");
+ formeSuffixes.put(Species.Gen6Formes.darmanitanZ,"-Z");
+ formeSuffixes.put(Species.Gen6Formes.meloettaP,"-P");
+ formeSuffixes.put(Species.Gen6Formes.kyuremW,"-W");
+ formeSuffixes.put(Species.Gen6Formes.kyuremB,"-B");
+ formeSuffixes.put(Species.Gen6Formes.keldeoCosmetic1,"-R");
+ formeSuffixes.put(Species.Gen6Formes.tornadusT,"-T");
+ formeSuffixes.put(Species.Gen6Formes.thundurusT,"-T");
+ formeSuffixes.put(Species.Gen6Formes.landorusT,"-T");
+ formeSuffixes.put(Species.Gen6Formes.gengarMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.meowsticF,"-F");
+ // 749 - 757 Furfrou
+ formeSuffixes.put(Species.Gen6Formes.gardevoirMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.ampharosMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.venusaurMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.charizardMegaX,"-Mega-X");
+ formeSuffixes.put(Species.Gen6Formes.charizardMegaY,"-Mega-Y");
+ formeSuffixes.put(Species.Gen6Formes.mewtwoMegaX,"-Mega-X");
+ formeSuffixes.put(Species.Gen6Formes.mewtwoMegaY,"-Mega-Y");
+ formeSuffixes.put(Species.Gen6Formes.blazikenMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.medichamMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.houndoomMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.aggronMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.banetteMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.tyranitarMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.scizorMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.pinsirMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.aerodactylMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.lucarioMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.abomasnowMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.aegislashB,"-B");
+ formeSuffixes.put(Species.Gen6Formes.blastoiseMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.kangaskhanMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.gyaradosMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.absolMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.alakazamMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.heracrossMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.mawileMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.manectricMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.garchompMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.latiosMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.latiasMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.pumpkabooCosmetic1,"-M");
+ formeSuffixes.put(Species.Gen6Formes.pumpkabooCosmetic2,"-L");
+ formeSuffixes.put(Species.Gen6Formes.pumpkabooCosmetic3,"-XL");
+ formeSuffixes.put(Species.Gen6Formes.gourgeistCosmetic1,"-M");
+ formeSuffixes.put(Species.Gen6Formes.gourgeistCosmetic2,"-L");
+ formeSuffixes.put(Species.Gen6Formes.gourgeistCosmetic3,"-XL");
+ // 794 - 797 Floette
+ formeSuffixes.put(Species.Gen6Formes.floetteE,"-E");
+ formeSuffixes.put(Species.Gen6Formes.swampertMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.sceptileMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.sableyeMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.altariaMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.galladeMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.audinoMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.sharpedoMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.slowbroMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.steelixMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.pidgeotMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.glalieMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.diancieMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.metagrossMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.kyogreP,"-P");
+ formeSuffixes.put(Species.Gen6Formes.groudonP,"-P");
+ formeSuffixes.put(Species.Gen6Formes.rayquazaMega,"-Mega");
+ // 815 - 820 contest Pikachu
+ formeSuffixes.put(Species.Gen6Formes.hoopaU,"-U");
+ formeSuffixes.put(Species.Gen6Formes.cameruptMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.lopunnyMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.salamenceMega,"-Mega");
+ formeSuffixes.put(Species.Gen6Formes.beedrillMega,"-Mega");
+
+ return formeSuffixes;
+ }
+
+ private static Map<Integer,Map<Integer,String>> setupFormeSuffixesByBaseForme() {
+ Map<Integer,Map<Integer,String>> map = new HashMap<>();
+
+ Map<Integer,String> deoxysMap = new HashMap<>();
+ deoxysMap.put(1,"-A");
+ deoxysMap.put(2,"-D");
+ deoxysMap.put(3,"-S");
+ map.put(Species.deoxys, deoxysMap);
+
+ Map<Integer,String> wormadamMap = new HashMap<>();
+ wormadamMap.put(1,"-S");
+ wormadamMap.put(2,"-T");
+ map.put(Species.wormadam, wormadamMap);
+
+ Map<Integer,String> shayminMap = new HashMap<>();
+ shayminMap.put(1,"-S");
+ map.put(Species.shaymin, shayminMap);
+
+ Map<Integer,String> giratinaMap = new HashMap<>();
+ giratinaMap.put(1,"-O");
+ map.put(Species.giratina, giratinaMap);
+
+ Map<Integer,String> rotomMap = new HashMap<>();
+ rotomMap.put(1,"-H");
+ rotomMap.put(2,"-W");
+ rotomMap.put(3,"-Fr");
+ rotomMap.put(4,"-Fa");
+ rotomMap.put(5,"-M");
+ map.put(Species.rotom, rotomMap);
+
+ Map<Integer,String> castformMap = new HashMap<>();
+ castformMap.put(1,"-F");
+ castformMap.put(2,"-W");
+ castformMap.put(3,"-I");
+ map.put(Species.castform, castformMap);
+
+ Map<Integer,String> basculinMap = new HashMap<>();
+ basculinMap.put(1,"-B");
+ map.put(Species.basculin, basculinMap);
+
+ Map<Integer,String> darmanitanMap = new HashMap<>();
+ darmanitanMap.put(1,"-Z");
+ map.put(Species.darmanitan, darmanitanMap);
+
+ Map<Integer,String> meloettaMap = new HashMap<>();
+ meloettaMap.put(1,"-P");
+ map.put(Species.meloetta, meloettaMap);
+
+ Map<Integer,String> kyuremMap = new HashMap<>();
+ kyuremMap.put(1,"-W");
+ kyuremMap.put(2,"-B");
+ map.put(Species.kyurem, kyuremMap);
+
+ Map<Integer,String> tornadusMap = new HashMap<>();
+ tornadusMap.put(1,"-T");
+ map.put(Species.tornadus, tornadusMap);
+
+ Map<Integer,String> thundurusMap = new HashMap<>();
+ thundurusMap.put(1,"-T");
+ map.put(Species.thundurus, thundurusMap);
+
+ Map<Integer,String> landorusMap = new HashMap<>();
+ landorusMap.put(1,"-T");
+ map.put(Species.landorus, landorusMap);
+
+ Map<Integer,String> meowsticMap = new HashMap<>();
+ meowsticMap.put(1,"-F");
+ map.put(Species.meowstic, meowsticMap);
+
+ Map<Integer,String> aegislashMap = new HashMap<>();
+ aegislashMap.put(1,"-B");
+ map.put(Species.aegislash, aegislashMap);
+
+ Map<Integer,String> pumpkabooMap = new HashMap<>();
+ pumpkabooMap.put(1,"-M");
+ pumpkabooMap.put(2,"-L");
+ pumpkabooMap.put(3,"-XL");
+ map.put(Species.pumpkaboo, pumpkabooMap);
+
+ Map<Integer,String> gourgeistMap = new HashMap<>();
+ gourgeistMap.put(1,"-M");
+ gourgeistMap.put(2,"-L");
+ gourgeistMap.put(3,"-XL");
+ map.put(Species.gourgeist, gourgeistMap);
+
+ Map<Integer,String> floetteMap = new HashMap<>();
+ floetteMap.put(5,"-E");
+ map.put(Species.floette, floetteMap);
+
+ Map<Integer,String> kyogreMap = new HashMap<>();
+ kyogreMap.put(1,"-P");
+ map.put(Species.kyogre, kyogreMap);
+
+ Map<Integer,String> groudonMap = new HashMap<>();
+ groudonMap.put(1,"-P");
+ map.put(Species.groudon, groudonMap);
+
+ Map<Integer,String> rayquazaMap = new HashMap<>();
+ rayquazaMap.put(1,"-Mega");
+ map.put(Species.rayquaza, rayquazaMap);
+
+ Map<Integer,String> hoopaMap = new HashMap<>();
+ hoopaMap.put(1,"-U");
+ map.put(Species.hoopa, hoopaMap);
+
+ for (Integer species: speciesToMegaStoneORAS.keySet()) {
+ Map<Integer,String> megaMap = new HashMap<>();
+ if (species == Species.charizard || species == Species.mewtwo) {
+ megaMap.put(1,"-Mega-X");
+ megaMap.put(2,"-Mega-Y");
+ } else {
+ megaMap.put(1,"-Mega");
+ }
+ map.put(species,megaMap);
+ }
+
+ return map;
+ }
+
+ private static Map<Integer,String> setupDummyFormeSuffixes() {
+ Map<Integer,String> m = new HashMap<>();
+ m.put(0,"");
+ return m;
+ }
+
+ public static ItemList allowedItemsXY, allowedItemsORAS, nonBadItemsXY, nonBadItemsORAS;
+ public static List<Integer> regularShopItems, opShopItems;
+
+ static {
+ setupAllowedItems();
+ }
+
+ private static void setupAllowedItems() {
+ allowedItemsXY = new ItemList(Items.megaGlove);
+ // Key items + version exclusives
+ allowedItemsXY.banRange(Items.explorerKit, 76);
+ allowedItemsXY.banRange(Items.dataCard01, 32);
+ allowedItemsXY.banRange(Items.xtransceiverMale, 18);
+ allowedItemsXY.banSingles(Items.expShare, Items.libertyPass, Items.propCase, Items.dragonSkull,
+ Items.lightStone, Items.darkStone);
+ // Unknown blank items or version exclusives
+ allowedItemsXY.banRange(Items.tea, 3);
+ allowedItemsXY.banRange(Items.unused120, 14);
+ // TMs & HMs - tms cant be held in gen6
+ allowedItemsXY.tmRange(Items.tm01, 92);
+ allowedItemsXY.tmRange(Items.tm93, 3);
+ allowedItemsXY.banRange(Items.tm01, 100);
+ allowedItemsXY.banRange(Items.tm93, 3);
+ // Battle Launcher exclusives
+ allowedItemsXY.banRange(Items.direHit2, 24);
+
+ // Key items (Gen 6)
+ allowedItemsXY.banRange(Items.holoCasterMale,3);
+ allowedItemsXY.banSingles(Items.pokeFlute, Items.sprinklotad);
+ allowedItemsXY.banRange(Items.powerPlantPass,4);
+ allowedItemsXY.banRange(Items.elevatorKey,4);
+ allowedItemsXY.banRange(Items.lensCase,3);
+ allowedItemsXY.banRange(Items.lookerTicket,3);
+ allowedItemsXY.banRange(Items.megaCharm,2);
+
+ // TMs (Gen 6)
+ allowedItemsXY.tmRange(Items.tm96,5);
+ allowedItemsXY.banRange(Items.tm96,5);
+
+ allowedItemsORAS = allowedItemsXY.copy(Items.eonFlute);
+ // Key items and an HM
+ allowedItemsORAS.banRange(Items.machBike,34);
+ allowedItemsORAS.banRange(Items.prisonBottle,2);
+ allowedItemsORAS.banRange(Items.meteoriteThirdForm,5);
+
+ // non-bad items
+ // ban specific pokemon hold items, berries, apricorns, mail
+ nonBadItemsXY = allowedItemsXY.copy();
+
+ nonBadItemsXY.banSingles(Items.oddKeystone, Items.griseousOrb, Items.soulDew, Items.lightBall,
+ Items.oranBerry, Items.quickPowder, Items.passOrb, Items.discountCoupon, Items.strangeSouvenir);
+ nonBadItemsXY.banRange(Items.growthMulch, 4); // mulch
+ nonBadItemsXY.banRange(Items.adamantOrb, 2); // orbs
+ nonBadItemsXY.banRange(Items.mail1, 12); // mails
+ nonBadItemsXY.banRange(Items.figyBerry, 25); // berries without useful battle effects
+ nonBadItemsXY.banRange(Items.luckyPunch, 4); // pokemon specific
+ nonBadItemsXY.banRange(Items.redScarf, 5); // contest scarves
+ nonBadItemsXY.banRange(Items.relicCopper,7); // relic items
+ nonBadItemsXY.banRange(Items.richMulch,4); // more mulch
+ nonBadItemsXY.banRange(Items.shoalSalt, 6); // Shoal items and Shards; they serve no purpose in XY
+
+ nonBadItemsORAS = allowedItemsORAS.copy();
+
+ nonBadItemsORAS.banSingles(Items.oddKeystone, Items.griseousOrb, Items.soulDew, Items.lightBall,
+ Items.oranBerry, Items.quickPowder, Items.passOrb, Items.discountCoupon, Items.strangeSouvenir);
+ nonBadItemsORAS.banRange(Items.growthMulch, 4); // mulch
+ nonBadItemsORAS.banRange(Items.adamantOrb, 2); // orbs
+ nonBadItemsORAS.banRange(Items.mail1, 12); // mails
+ nonBadItemsORAS.banRange(Items.figyBerry, 25); // berries without useful battle effects
+ nonBadItemsORAS.banRange(Items.luckyPunch, 4); // pokemon specific
+ nonBadItemsORAS.banRange(Items.redScarf, 5); // contest scarves
+ nonBadItemsORAS.banRange(Items.relicCopper,7); // relic items
+ nonBadItemsORAS.banRange(Items.richMulch,4); // more mulch
+
+ regularShopItems = new ArrayList<>();
+
+ regularShopItems.addAll(IntStream.rangeClosed(Items.ultraBall, Items.pokeBall).boxed().collect(Collectors.toList()));
+ regularShopItems.addAll(IntStream.rangeClosed(Items.potion, Items.revive).boxed().collect(Collectors.toList()));
+ regularShopItems.addAll(IntStream.rangeClosed(Items.superRepel, Items.repel).boxed().collect(Collectors.toList()));
+
+ opShopItems = new ArrayList<>();
+
+ // "Money items" etc
+ opShopItems.add(Items.lavaCookie);
+ opShopItems.add(Items.berryJuice);
+ opShopItems.add(Items.rareCandy);
+ opShopItems.add(Items.oldGateau);
+ opShopItems.addAll(IntStream.rangeClosed(Items.blueFlute, Items.shoalShell).boxed().collect(Collectors.toList()));
+ opShopItems.addAll(IntStream.rangeClosed(Items.tinyMushroom, Items.nugget).boxed().collect(Collectors.toList()));
+ opShopItems.add(Items.rareBone);
+ opShopItems.addAll(IntStream.rangeClosed(Items.lansatBerry, Items.rowapBerry).boxed().collect(Collectors.toList()));
+ opShopItems.add(Items.luckyEgg);
+ opShopItems.add(Items.prettyFeather);
+ opShopItems.addAll(IntStream.rangeClosed(Items.balmMushroom, Items.casteliacone).boxed().collect(Collectors.toList()));
+ }
+
+ public static ItemList getAllowedItems(int romType) {
+ if (romType == Type_XY) {
+ return allowedItemsXY;
+ } else {
+ return allowedItemsORAS;
+ }
+ }
+
+ public static ItemList getNonBadItems(int romType) {
+ if (romType == Type_XY) {
+ return nonBadItemsXY;
+ } else {
+ return nonBadItemsORAS;
+ }
+ }
+
+ public static final List<Integer> uniqueNoSellItems = Arrays.asList(Items.gengarite, Items.gardevoirite,
+ Items.ampharosite, Items.venusaurite, Items.charizarditeX, Items.blastoisinite, Items.mewtwoniteX,
+ Items.mewtwoniteY, Items.blazikenite, Items.medichamite, Items.houndoominite, Items.aggronite,
+ Items.banettite, Items.tyranitarite, Items.scizorite, Items.pinsirite, Items.aerodactylite,
+ Items.lucarionite, Items.abomasite, Items.kangaskhanite, Items.gyaradosite, Items.absolite,
+ Items.charizarditeY, Items.alakazite, Items.heracronite, Items.mawilite, Items.manectite, Items.garchompite,
+ Items.latiasite, Items.latiosite, Items.swampertite, Items.sceptilite, Items.sablenite, Items.altarianite,
+ Items.galladite, Items.audinite, Items.metagrossite, Items.sharpedonite, Items.slowbronite,
+ Items.steelixite, Items.pidgeotite, Items.glalitite, Items.diancite, Items.cameruptite, Items.lopunnite,
+ Items.salamencite, Items.beedrillite);
+
+ private static Map<Integer,List<Integer>> setupSpeciesToMegaStone(int romType) {
+ Map<Integer,List<Integer>> map = new TreeMap<>();
+
+ map.put(Species.venusaur, Collections.singletonList(Items.venusaurite));
+ map.put(Species.charizard, Arrays.asList(Items.charizarditeX, Items.charizarditeY));
+ map.put(Species.blastoise, Collections.singletonList(Items.blastoisinite));
+ map.put(Species.alakazam, Collections.singletonList(Items.alakazite));
+ map.put(Species.gengar, Collections.singletonList(Items.gengarite));
+ map.put(Species.kangaskhan, Collections.singletonList(Items.kangaskhanite));
+ map.put(Species.pinsir, Collections.singletonList(Items.pinsirite));
+ map.put(Species.gyarados, Collections.singletonList(Items.gyaradosite));
+ map.put(Species.aerodactyl, Collections.singletonList(Items.aerodactylite));
+ map.put(Species.mewtwo, Arrays.asList(Items.mewtwoniteX, Items.mewtwoniteY));
+ map.put(Species.ampharos, Collections.singletonList(Items.ampharosite));
+ map.put(Species.scizor, Collections.singletonList(Items.scizorite));
+ map.put(Species.heracross, Collections.singletonList(Items.heracronite));
+ map.put(Species.houndoom, Collections.singletonList(Items.houndoominite));
+ map.put(Species.tyranitar, Collections.singletonList(Items.tyranitarite));
+ map.put(Species.blaziken, Collections.singletonList(Items.blazikenite));
+ map.put(Species.gardevoir, Collections.singletonList(Items.gardevoirite));
+ map.put(Species.mawile, Collections.singletonList(Items.mawilite));
+ map.put(Species.aggron, Collections.singletonList(Items.aggronite));
+ map.put(Species.medicham, Collections.singletonList(Items.medichamite));
+ map.put(Species.manectric, Collections.singletonList(Items.manectite));
+ map.put(Species.banette, Collections.singletonList(Items.banettite));
+ map.put(Species.absol, Collections.singletonList(Items.absolite));
+ map.put(Species.latias, Collections.singletonList(Items.latiasite));
+ map.put(Species.latios, Collections.singletonList(Items.latiosite));
+ map.put(Species.garchomp, Collections.singletonList(Items.garchompite));
+ map.put(Species.lucario, Collections.singletonList(Items.lucarionite));
+ map.put(Species.abomasnow, Collections.singletonList(Items.abomasite));
+
+ if (romType == Type_ORAS) {
+ map.put(Species.beedrill, Collections.singletonList(Items.beedrillite));
+ map.put(Species.pidgeot, Collections.singletonList(Items.pidgeotite));
+ map.put(Species.slowbro, Collections.singletonList(Items.slowbronite));
+ map.put(Species.steelix, Collections.singletonList(Items.steelixite));
+ map.put(Species.sceptile, Collections.singletonList(Items.sceptilite));
+ map.put(Species.swampert, Collections.singletonList(Items.swampertite));
+ map.put(Species.sableye, Collections.singletonList(Items.sablenite));
+ map.put(Species.sharpedo, Collections.singletonList(Items.sharpedonite));
+ map.put(Species.camerupt, Collections.singletonList(Items.cameruptite));
+ map.put(Species.altaria, Collections.singletonList(Items.altarianite));
+ map.put(Species.glalie, Collections.singletonList(Items.glalitite));
+ map.put(Species.salamence, Collections.singletonList(Items.salamencite));
+ map.put(Species.metagross, Collections.singletonList(Items.metagrossite));
+ map.put(Species.lopunny, Collections.singletonList(Items.lopunnite));
+ map.put(Species.gallade, Collections.singletonList(Items.galladite));
+ map.put(Species.audino, Collections.singletonList(Items.audinite));
+ map.put(Species.diancie, Collections.singletonList(Items.diancite));
+ }
+
+ return map;
+ }
+
+ public static void tagTrainersXY(List<Trainer> trs) {
+
+ // Gym Trainers
+ tag(trs,"GYM1", 39, 40, 48);
+ tag(trs,"GYM2",64, 63, 106, 105);
+ tag(trs,"GYM3",83, 84, 146, 147);
+ tag(trs,"GYM4", 121, 122, 123, 124);
+ tag(trs,"GYM5", 461, 462, 463, 464, 465, 466, 467, 468, 469, 28, 29, 30);
+ tag(trs,"GYM6", 245, 250, 248, 243);
+ tag(trs,"GYM7", 170, 171, 172, 365, 366);
+ tag(trs,"GYM8", 168, 169, 31, 32);
+
+ // Gym Leaders
+ tag(trs,"GYM1-LEADER", 6);
+ tag(trs,"GYM2-LEADER",76);
+ tag(trs,"GYM3-LEADER",21);
+ tag(trs,"GYM4-LEADER", 22);
+ tag(trs,"GYM5-LEADER", 23);
+ tag(trs,"GYM6-LEADER", 24);
+ tag(trs,"GYM7-LEADER", 25);
+ tag(trs,"GYM8-LEADER", 26);
+
+ tag(trs, 188, "NOTSTRONG"); // Successor Korrina
+
+ // Elite 4
+ tag(trs, 269, "ELITE1"); // Malva
+ tag(trs, 271, "ELITE2"); // Siebold
+ tag(trs, 187, "ELITE3"); // Wikstrom
+ tag(trs, 270, "ELITE4"); // Drasna
+ tag(trs, 276, "CHAMPION"); // Diantha
+
+ tag(trs,"THEMED:LYSANDRE-LEADER", 303, 525, 526);
+ tag(trs,"STRONG", 174, 175, 304, 344, 345, 346, 347, 348, 349, 350, 351, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479); // Team Flare Admins lol
+ tag(trs,"STRONG", 324, 325, 438, 439, 573); // Tierno and Trevor
+ tag(trs,"STRONG", 327, 328); // Sycamore
+
+ // Rival - Serena
+ tagRival(trs, "RIVAL1", 596);
+ tagRival(trs, "RIVAL2", 575);
+ tagRival(trs, "RIVAL3", 581);
+ tagRival(trs, "RIVAL4", 578);
+ tagRival(trs, "RIVAL5", 584);
+ tagRival(trs, "RIVAL6", 607);
+ tagRival(trs, "RIVAL7", 587);
+ tagRival(trs, "RIVAL8", 590);
+ tagRival(trs, "RIVAL9", 593);
+ tagRival(trs, "RIVAL10", 599);
+
+ // Rival - Calem
+ tagRival(trs, "RIVAL1", 435);
+ tagRival(trs, "RIVAL2", 130);
+ tagRival(trs, "RIVAL3", 329);
+ tagRival(trs, "RIVAL4", 184);
+ tagRival(trs, "RIVAL5", 332);
+ tagRival(trs, "RIVAL6", 604);
+ tagRival(trs, "RIVAL7", 335);
+ tagRival(trs, "RIVAL8", 338);
+ tagRival(trs, "RIVAL9", 341);
+ tagRival(trs, "RIVAL10", 519);
+
+ // Rival - Shauna
+ tagRival(trs, "FRIEND1", 137);
+ tagRival(trs, "FRIEND2", 321);
+ }
+
+ public static void tagTrainersORAS(List<Trainer> trs) {
+
+ // Gym Trainers & Leaders
+ tag(trs,"GYM1",562, 22, 667);
+ tag(trs,"GYM2",60, 56, 59);
+ tag(trs,"GYM3",34, 568, 614, 35);
+ tag(trs,"GYM4",81, 824, 83, 615, 823, 613, 85);
+ tag(trs,"GYM5",63, 64, 65, 66, 67, 68, 69);
+ tag(trs,"GYM6",115, 517, 516, 118, 730);
+ tag(trs,"GYM7",157, 158, 159, 226, 320, 225);
+ tag(trs,"GYM8",647, 342, 594, 646, 338, 339, 340, 341); // Includes Wallace in Delta Episode
+
+ // Gym Leaders
+ tag(trs,"GYM1-LEADER", 561);
+ tag(trs,"GYM2-LEADER",563);
+ tag(trs,"GYM3-LEADER",567);
+ tag(trs,"GYM4-LEADER", 569);
+ tag(trs,"GYM5-LEADER", 570);
+ tag(trs,"GYM6-LEADER", 571);
+ tag(trs,"GYM7-LEADER", 552);
+ tag(trs,"GYM8-LEADER", 572, 943);
+
+ // Elite 4
+ tag(trs, "ELITE1", 553, 909); // Sidney
+ tag(trs, "ELITE2", 554, 910); // Phoebe
+ tag(trs, "ELITE3", 555, 911); // Glacia
+ tag(trs, "ELITE4", 556, 912); // Drake
+ tag(trs, "CHAMPION", 557, 913, 680, 942); // Steven (includes other appearances)
+
+ tag(trs,"THEMED:MAXIE-LEADER", 235, 236, 271);
+ tag(trs,"THEMED:ARCHIE-LEADER",178, 231, 266);
+ tag(trs,"THEMED:MATT-STRONG",683, 684, 685, 686, 687);
+ tag(trs,"THEMED:SHELLY-STRONG",688,689,690);
+ tag(trs,"THEMED:TABITHA-STRONG",691,692,693);
+ tag(trs,"THEMED:COURTNEY-STRONG",694,695,696,697,698);
+ tag(trs, "THEMED:WALLY-STRONG", 518, 583, 944, 946);
+
+ // Rival - Brendan
+ tagRival(trs, "RIVAL1", 1);
+ tagRival(trs, "RIVAL2", 289);
+ tagRival(trs, "RIVAL3", 674);
+ tagRival(trs, "RIVAL4", 292);
+ tagRival(trs, "RIVAL5", 527);
+ tagRival(trs, "RIVAL6", 699);
+
+ // Rival - May
+ tagRival(trs, "RIVAL1", 4);
+ tagRival(trs, "RIVAL2", 295);
+ tagRival(trs, "RIVAL3", 677);
+ tagRival(trs, "RIVAL4", 298);
+ tagRival(trs, "RIVAL5", 530);
+ tagRival(trs, "RIVAL6", 906);
+ }
+
+ private static void tagRival(List<Trainer> allTrainers, String tag, int offset) {
+ allTrainers.get(offset - 1).tag = tag + "-0";
+ allTrainers.get(offset).tag = tag + "-1";
+ allTrainers.get(offset + 1).tag = tag + "-2";
+
+ }
+
+ private static void tag(List<Trainer> allTrainers, int number, String tag) {
+ if (allTrainers.size() > (number - 1)) {
+ allTrainers.get(number - 1).tag = tag;
+ }
+ }
+
+ private static void tag(List<Trainer> allTrainers, String tag, int... numbers) {
+ for (int num : numbers) {
+ if (allTrainers.size() > (num - 1)) {
+ allTrainers.get(num - 1).tag = tag;
+ }
+ }
+ }
+
+ public static void setMultiBattleStatusXY(List<Trainer> trs) {
+ // 108 + 111: Team Flare Grunts in Glittering Cave
+ // 348 + 350: Team Flare Celosia and Bryony fight in Poké Ball Factory
+ // 438 + 439: Tierno and Trevor fight on Route 7
+ // 470 + 611, 472 + 610, 476 + 612: Team Flare Admin and Grunt fights in Team Flare Secret HQ
+ setMultiBattleStatus(trs, 108, 111, 348, 350, 438, 439, 470, 472, 476, 610, 611, 612);
+ }
+
+ public static void setMultiBattleStatusORAS(List<Trainer> trs) {
+ // 683 + 904: Aqua Admin Matt and Team Aqua Grunt fight on the Southern Island
+ // 687 + 905: Aqua Admin Matt and Team Aqua Grunt fight at the Mossdeep Space Center
+ // 688 + 903: Aqua Admin Shelly and Team Aqua Grunt fight in Meteor Falls
+ // 691 + 902: Magma Admin Tabitha and Team Magma Grunt fight in Meteor Falls
+ // 694 + 900: Magma Admin Courtney and Team Magma Grunt fight on the Southern Island
+ // 698 + 901: Magma Admin Courtney and Team Magma Grunt fight at the Mossdeep Space Center
+ setMultiBattleStatus(trs, 683, 687, 688, 691, 694, 698, 900, 901, 902, 903, 904, 905);
+ }
+
+ private static void setMultiBattleStatus(List<Trainer> allTrainers, int... numbers) {
+ for (int num : numbers) {
+ if (allTrainers.size() > (num - 1)) {
+ allTrainers.get(num - 1).multiBattleStatus = Trainer.MultiBattleStatus.ALWAYS;
+ }
+ }
+ }
+
+ private static Map<Integer, String> constructFallingEncounterNameMap() {
+ Map<Integer, String> map = new TreeMap<>();
+ map.put(0, "Glittering Cave Ceiling Encounter");
+ map.put(4, "Reflection Cave Ceiling Encounter");
+ map.put(20, "Victory Road Outside 2 Sky Encounter");
+ map.put(24, "Victory Road Inside 2 Encounter");
+ map.put(28, "Victory Road Outside 3 Sky Encounter");
+ map.put(32, "Victory Road Inside 3 Ceiling Encounter");
+ map.put(36, "Victory Road Outside 4 Sky Encounter");
+ map.put(46, "Terminus Cave Ceiling Encounter");
+ return map;
+ }
+
+ private static Map<Integer, String> constructRustlingBushEncounterNameMap() {
+ Map<Integer, String> map = new TreeMap<>();
+ map.put(0, "Route 6 Rustling Bush Encounter");
+ map.put(3, "Route 18 Rustling Bush Encounter");
+ return map;
+ }
+
+ public static final Map<Integer,Integer> balancedItemPrices = Stream.of(new Integer[][] {
+ // Skip item index 0. All prices divided by 10
+ {Items.masterBall, 300},
+ {Items.ultraBall, 120},
+ {Items.greatBall, 60},
+ {Items.pokeBall, 20},
+ {Items.safariBall, 50},
+ {Items.netBall, 100},
+ {Items.diveBall, 100},
+ {Items.nestBall, 100},
+ {Items.repeatBall, 100},
+ {Items.timerBall, 100},
+ {Items.luxuryBall, 100},
+ {Items.premierBall, 20},
+ {Items.duskBall, 100},
+ {Items.healBall, 30},
+ {Items.quickBall, 100},
+ {Items.cherishBall, 20},
+ {Items.potion, 30},
+ {Items.antidote, 10},
+ {Items.burnHeal, 25},
+ {Items.iceHeal, 25},
+ {Items.awakening, 25},
+ {Items.paralyzeHeal, 20},
+ {Items.fullRestore, 300},
+ {Items.maxPotion, 250},
+ {Items.hyperPotion, 120},
+ {Items.superPotion, 70},
+ {Items.fullHeal, 60},
+ {Items.revive, 150},
+ {Items.maxRevive, 400},
+ {Items.freshWater, 40},
+ {Items.sodaPop, 60},
+ {Items.lemonade, 70},
+ {Items.moomooMilk, 80},
+ {Items.energyPowder, 40},
+ {Items.energyRoot, 110},
+ {Items.healPowder, 45},
+ {Items.revivalHerb, 280},
+ {Items.ether, 300},
+ {Items.maxEther, 450},
+ {Items.elixir, 1500},
+ {Items.maxElixir, 1800},
+ {Items.lavaCookie, 45},
+ {Items.berryJuice, 10},
+ {Items.sacredAsh, 1000},
+ {Items.hpUp, 980},
+ {Items.protein, 980},
+ {Items.iron, 980},
+ {Items.carbos, 980},
+ {Items.calcium, 980},
+ {Items.rareCandy, 1000},
+ {Items.ppUp, 980},
+ {Items.zinc, 980},
+ {Items.ppMax, 2490},
+ {Items.oldGateau, 45},
+ {Items.guardSpec, 70},
+ {Items.direHit, 65},
+ {Items.xAttack, 50},
+ {Items.xDefense, 55},
+ {Items.xSpeed, 35},
+ {Items.xAccuracy, 95},
+ {Items.xSpAtk, 35},
+ {Items.xSpDef, 35},
+ {Items.pokeDoll, 100},
+ {Items.fluffyTail, 100},
+ {Items.blueFlute, 2},
+ {Items.yellowFlute, 2},
+ {Items.redFlute, 2},
+ {Items.blackFlute, 2},
+ {Items.whiteFlute, 2},
+ {Items.shoalSalt, 2},
+ {Items.shoalShell, 2},
+ {Items.redShard, 40},
+ {Items.blueShard, 40},
+ {Items.yellowShard, 40},
+ {Items.greenShard, 40},
+ {Items.superRepel, 50},
+ {Items.maxRepel, 70},
+ {Items.escapeRope, 55},
+ {Items.repel, 35},
+ {Items.sunStone, 300},
+ {Items.moonStone, 300},
+ {Items.fireStone, 300},
+ {Items.thunderStone, 300},
+ {Items.waterStone, 300},
+ {Items.leafStone, 300},
+ {Items.tinyMushroom, 50},
+ {Items.bigMushroom, 500},
+ {Items.pearl, 140},
+ {Items.bigPearl, 750},
+ {Items.stardust, 200},
+ {Items.starPiece, 980},
+ {Items.nugget, 1000},
+ {Items.heartScale, 500},
+ {Items.honey, 50},
+ {Items.growthMulch, 20},
+ {Items.dampMulch, 20},
+ {Items.stableMulch, 20},
+ {Items.gooeyMulch, 20},
+ {Items.rootFossil, 500},
+ {Items.clawFossil, 500},
+ {Items.helixFossil, 500},
+ {Items.domeFossil, 500},
+ {Items.oldAmber, 800},
+ {Items.armorFossil, 500},
+ {Items.skullFossil, 500},
+ {Items.rareBone, 1000},
+ {Items.shinyStone, 300},
+ {Items.duskStone, 300},
+ {Items.dawnStone, 300},
+ {Items.ovalStone, 300},
+ {Items.oddKeystone, 210},
+ {Items.griseousOrb, 1000},
+ {Items.tea, 0}, // unused in Gen 6
+ {Items.unused114, 0},
+ {Items.autograph, 0},
+ {Items.douseDrive, 100},
+ {Items.shockDrive, 100},
+ {Items.burnDrive, 100},
+ {Items.chillDrive, 100},
+ {Items.unused120, 0},
+ {Items.pokemonBox, 0}, // unused in Gen 6
+ {Items.medicinePocket, 0}, // unused in Gen 6
+ {Items.tmCase, 0}, // unused in Gen 6
+ {Items.candyJar, 0}, // unused in Gen 6
+ {Items.powerUpPocket, 0}, // unused in Gen 6
+ {Items.clothingTrunk, 0}, // unused in Gen 6
+ {Items.catchingPocket, 0}, // unused in Gen 6
+ {Items.battlePocket, 0}, // unused in Gen 6
+ {Items.unused129, 0},
+ {Items.unused130, 0},
+ {Items.unused131, 0},
+ {Items.unused132, 0},
+ {Items.unused133, 0},
+ {Items.sweetHeart, 15},
+ {Items.adamantOrb, 1000},
+ {Items.lustrousOrb, 1000},
+ {Items.mail1, 5},
+ {Items.mail2, 5},
+ {Items.mail3, 5},
+ {Items.mail4, 5},
+ {Items.mail5, 5},
+ {Items.mail6, 5},
+ {Items.mail7, 5},
+ {Items.mail8, 5},
+ {Items.mail9, 5},
+ {Items.mail10, 5},
+ {Items.mail11, 5},
+ {Items.mail12, 5},
+ {Items.cheriBerry, 20},
+ {Items.chestoBerry, 25},
+ {Items.pechaBerry, 10},
+ {Items.rawstBerry, 25},
+ {Items.aspearBerry, 25},
+ {Items.leppaBerry, 300},
+ {Items.oranBerry, 5},
+ {Items.persimBerry, 20},
+ {Items.lumBerry, 50},
+ {Items.sitrusBerry, 50},
+ {Items.figyBerry, 10},
+ {Items.wikiBerry, 10},
+ {Items.magoBerry, 10},
+ {Items.aguavBerry, 10},
+ {Items.iapapaBerry, 10},
+ {Items.razzBerry, 50},
+ {Items.blukBerry, 50},
+ {Items.nanabBerry, 50},
+ {Items.wepearBerry, 50},
+ {Items.pinapBerry, 50},
+ {Items.pomegBerry, 50},
+ {Items.kelpsyBerry, 50},
+ {Items.qualotBerry, 50},
+ {Items.hondewBerry, 50},
+ {Items.grepaBerry, 50},
+ {Items.tamatoBerry, 50},
+ {Items.cornnBerry, 50},
+ {Items.magostBerry, 50},
+ {Items.rabutaBerry, 50},
+ {Items.nomelBerry, 50},
+ {Items.spelonBerry, 50},
+ {Items.pamtreBerry, 50},
+ {Items.watmelBerry, 50},
+ {Items.durinBerry, 50},
+ {Items.belueBerry, 50},
+ {Items.occaBerry, 100},
+ {Items.passhoBerry, 100},
+ {Items.wacanBerry, 100},
+ {Items.rindoBerry, 100},
+ {Items.yacheBerry, 100},
+ {Items.chopleBerry, 100},
+ {Items.kebiaBerry, 100},
+ {Items.shucaBerry, 100},
+ {Items.cobaBerry, 100},
+ {Items.payapaBerry, 100},
+ {Items.tangaBerry, 100},
+ {Items.chartiBerry, 100},
+ {Items.kasibBerry, 100},
+ {Items.habanBerry, 100},
+ {Items.colburBerry, 100},
+ {Items.babiriBerry, 100},
+ {Items.chilanBerry, 100},
+ {Items.liechiBerry, 100},
+ {Items.ganlonBerry, 100},
+ {Items.salacBerry, 100},
+ {Items.petayaBerry, 100},
+ {Items.apicotBerry, 100},
+ {Items.lansatBerry, 100},
+ {Items.starfBerry, 100},
+ {Items.enigmaBerry, 100},
+ {Items.micleBerry, 100},
+ {Items.custapBerry, 100},
+ {Items.jabocaBerry, 100},
+ {Items.rowapBerry, 100},
+ {Items.brightPowder, 300},
+ {Items.whiteHerb, 100},
+ {Items.machoBrace, 300},
+ {Items.expShare, 0},
+ {Items.quickClaw, 450},
+ {Items.sootheBell, 100},
+ {Items.mentalHerb, 100},
+ {Items.choiceBand, 1000},
+ {Items.kingsRock, 500},
+ {Items.silverPowder, 200},
+ {Items.amuletCoin, 1500},
+ {Items.cleanseTag, 100},
+ {Items.soulDew, 20},
+ {Items.deepSeaTooth, 300},
+ {Items.deepSeaScale, 300},
+ {Items.smokeBall, 20},
+ {Items.everstone, 20},
+ {Items.focusBand, 300},
+ {Items.luckyEgg, 1000},
+ {Items.scopeLens, 500},
+ {Items.metalCoat, 300},
+ {Items.leftovers, 1000},
+ {Items.dragonScale, 300},
+ {Items.lightBall, 10},
+ {Items.softSand, 200},
+ {Items.hardStone, 200},
+ {Items.miracleSeed, 200},
+ {Items.blackGlasses, 200},
+ {Items.blackBelt, 200},
+ {Items.magnet, 200},
+ {Items.mysticWater, 200},
+ {Items.sharpBeak, 200},
+ {Items.poisonBarb, 200},
+ {Items.neverMeltIce, 200},
+ {Items.spellTag, 200},
+ {Items.twistedSpoon, 200},
+ {Items.charcoal, 200},
+ {Items.dragonFang, 200},
+ {Items.silkScarf, 200},
+ {Items.upgrade, 300},
+ {Items.shellBell, 600},
+ {Items.seaIncense, 200},
+ {Items.laxIncense, 300},
+ {Items.luckyPunch, 1},
+ {Items.metalPowder, 1},
+ {Items.thickClub, 50},
+ {Items.leek, 20},
+ {Items.redScarf, 10},
+ {Items.blueScarf, 10},
+ {Items.pinkScarf, 10},
+ {Items.greenScarf, 10},
+ {Items.yellowScarf, 10},
+ {Items.wideLens, 150},
+ {Items.muscleBand, 200},
+ {Items.wiseGlasses, 200},
+ {Items.expertBelt, 600},
+ {Items.lightClay, 150},
+ {Items.lifeOrb, 1000},
+ {Items.powerHerb, 100},
+ {Items.toxicOrb, 150},
+ {Items.flameOrb, 150},
+ {Items.quickPowder, 1},
+ {Items.focusSash, 200},
+ {Items.zoomLens, 150},
+ {Items.metronome, 300},
+ {Items.ironBall, 100},
+ {Items.laggingTail, 100},
+ {Items.destinyKnot, 150},
+ {Items.blackSludge, 500},
+ {Items.icyRock, 20},
+ {Items.smoothRock, 20},
+ {Items.heatRock, 20},
+ {Items.dampRock, 20},
+ {Items.gripClaw, 150},
+ {Items.choiceScarf, 1000},
+ {Items.stickyBarb, 150},
+ {Items.powerBracer, 300},
+ {Items.powerBelt, 300},
+ {Items.powerLens, 300},
+ {Items.powerBand, 300},
+ {Items.powerAnklet, 300},
+ {Items.powerWeight, 300},
+ {Items.shedShell, 50},
+ {Items.bigRoot, 150},
+ {Items.choiceSpecs, 1000},
+ {Items.flamePlate, 200},
+ {Items.splashPlate, 200},
+ {Items.zapPlate, 200},
+ {Items.meadowPlate, 200},
+ {Items.iciclePlate, 200},
+ {Items.fistPlate, 200},
+ {Items.toxicPlate, 200},
+ {Items.earthPlate, 200},
+ {Items.skyPlate, 200},
+ {Items.mindPlate, 200},
+ {Items.insectPlate, 200},
+ {Items.stonePlate, 200},
+ {Items.spookyPlate, 200},
+ {Items.dracoPlate, 200},
+ {Items.dreadPlate, 200},
+ {Items.ironPlate, 200},
+ {Items.oddIncense, 200},
+ {Items.rockIncense, 200},
+ {Items.fullIncense, 100},
+ {Items.waveIncense, 200},
+ {Items.roseIncense, 200},
+ {Items.luckIncense, 1500},
+ {Items.pureIncense, 100},
+ {Items.protector, 300},
+ {Items.electirizer, 300},
+ {Items.magmarizer, 300},
+ {Items.dubiousDisc, 300},
+ {Items.reaperCloth, 300},
+ {Items.razorClaw, 500},
+ {Items.razorFang, 500},
+ {Items.tm01, 1000},
+ {Items.tm02, 1000},
+ {Items.tm03, 1000},
+ {Items.tm04, 1000},
+ {Items.tm05, 1000},
+ {Items.tm06, 1000},
+ {Items.tm07, 2000},
+ {Items.tm08, 1000},
+ {Items.tm09, 1000},
+ {Items.tm10, 1000},
+ {Items.tm11, 2000},
+ {Items.tm12, 1000},
+ {Items.tm13, 1000},
+ {Items.tm14, 2000},
+ {Items.tm15, 2000},
+ {Items.tm16, 2000},
+ {Items.tm17, 1000},
+ {Items.tm18, 2000},
+ {Items.tm19, 1000},
+ {Items.tm20, 2000},
+ {Items.tm21, 1000},
+ {Items.tm22, 1000},
+ {Items.tm23, 1000},
+ {Items.tm24, 1000},
+ {Items.tm25, 2000},
+ {Items.tm26, 1000},
+ {Items.tm27, 1000},
+ {Items.tm28, 1000},
+ {Items.tm29, 1000},
+ {Items.tm30, 1000},
+ {Items.tm31, 1000},
+ {Items.tm32, 1000},
+ {Items.tm33, 2000},
+ {Items.tm34, 1000},
+ {Items.tm35, 1000},
+ {Items.tm36, 1000},
+ {Items.tm37, 2000},
+ {Items.tm38, 2000},
+ {Items.tm39, 1000},
+ {Items.tm40, 1000},
+ {Items.tm41, 1000},
+ {Items.tm42, 1000},
+ {Items.tm43, 1000},
+ {Items.tm44, 1000},
+ {Items.tm45, 1000},
+ {Items.tm46, 1000},
+ {Items.tm47, 1000},
+ {Items.tm48, 1000},
+ {Items.tm49, 1000},
+ {Items.tm50, 1000},
+ {Items.tm51, 1000},
+ {Items.tm52, 1000},
+ {Items.tm53, 1000},
+ {Items.tm54, 1000},
+ {Items.tm55, 1000},
+ {Items.tm56, 1000},
+ {Items.tm57, 1000},
+ {Items.tm58, 1000},
+ {Items.tm59, 1000},
+ {Items.tm60, 1000},
+ {Items.tm61, 1000},
+ {Items.tm62, 1000},
+ {Items.tm63, 1000},
+ {Items.tm64, 1000},
+ {Items.tm65, 1000},
+ {Items.tm66, 1000},
+ {Items.tm67, 1000},
+ {Items.tm68, 2000},
+ {Items.tm69, 1000},
+ {Items.tm70, 1000},
+ {Items.tm71, 1000},
+ {Items.tm72, 1000},
+ {Items.tm73, 1000},
+ {Items.tm74, 1000},
+ {Items.tm75, 1000},
+ {Items.tm76, 1000},
+ {Items.tm77, 1000},
+ {Items.tm78, 1000},
+ {Items.tm79, 1000},
+ {Items.tm80, 1000},
+ {Items.tm81, 1000},
+ {Items.tm82, 1000},
+ {Items.tm83, 1000},
+ {Items.tm84, 1000},
+ {Items.tm85, 1000},
+ {Items.tm86, 1000},
+ {Items.tm87, 1000},
+ {Items.tm88, 1000},
+ {Items.tm89, 1000},
+ {Items.tm90, 1000},
+ {Items.tm91, 1000},
+ {Items.tm92, 1000},
+ {Items.hm01, 0},
+ {Items.hm02, 0},
+ {Items.hm03, 0},
+ {Items.hm04, 0},
+ {Items.hm05, 0},
+ {Items.hm06, 0},
+ {Items.hm07, 0}, // unused in Gen 6
+ {Items.hm08, 0}, // unused in Gen 6
+ {Items.explorerKit, 0},
+ {Items.lootSack, 0},
+ {Items.ruleBook, 0},
+ {Items.pokeRadar, 0},
+ {Items.pointCard, 0},
+ {Items.journal, 0},
+ {Items.sealCase, 0},
+ {Items.fashionCase, 0},
+ {Items.sealBag, 0},
+ {Items.palPad, 0},
+ {Items.worksKey, 0},
+ {Items.oldCharm, 0},
+ {Items.galacticKey, 0},
+ {Items.redChain, 0},
+ {Items.townMap, 0},
+ {Items.vsSeeker, 0},
+ {Items.coinCase, 0},
+ {Items.oldRod, 0},
+ {Items.goodRod, 0},
+ {Items.superRod, 0},
+ {Items.sprayduck, 0},
+ {Items.poffinCase, 0},
+ {Items.bike, 0},
+ {Items.suiteKey, 0},
+ {Items.oaksLetter, 0},
+ {Items.lunarWing, 0},
+ {Items.memberCard, 0},
+ {Items.azureFlute, 0},
+ {Items.ssTicketJohto, 0},
+ {Items.contestPass, 0},
+ {Items.magmaStone, 0},
+ {Items.parcelSinnoh, 0},
+ {Items.coupon1, 0},
+ {Items.coupon2, 0},
+ {Items.coupon3, 0},
+ {Items.storageKeySinnoh, 0},
+ {Items.secretPotion, 0},
+ {Items.vsRecorder, 0},
+ {Items.gracidea, 0},
+ {Items.secretKeySinnoh, 0},
+ {Items.apricornBox, 0},
+ {Items.unownReport, 0},
+ {Items.berryPots, 0},
+ {Items.dowsingMachine, 0},
+ {Items.blueCard, 0},
+ {Items.slowpokeTail, 0},
+ {Items.clearBell, 0},
+ {Items.cardKeyJohto, 0},
+ {Items.basementKeyJohto, 0},
+ {Items.squirtBottle, 0},
+ {Items.redScale, 0},
+ {Items.lostItem, 0},
+ {Items.pass, 0},
+ {Items.machinePart, 0},
+ {Items.silverWing, 0},
+ {Items.rainbowWing, 0},
+ {Items.mysteryEgg, 0},
+ {Items.redApricorn, 2},
+ {Items.blueApricorn, 2},
+ {Items.yellowApricorn, 2},
+ {Items.greenApricorn, 2},
+ {Items.pinkApricorn, 2},
+ {Items.whiteApricorn, 2},
+ {Items.blackApricorn, 2},
+ {Items.fastBall, 30},
+ {Items.levelBall, 30},
+ {Items.lureBall, 30},
+ {Items.heavyBall, 30},
+ {Items.loveBall, 30},
+ {Items.friendBall, 30},
+ {Items.moonBall, 30},
+ {Items.sportBall, 30},
+ {Items.parkBall, 0},
+ {Items.photoAlbum, 0},
+ {Items.gbSounds, 0},
+ {Items.tidalBell, 0},
+ {Items.rageCandyBar, 15},
+ {Items.dataCard01, 0},
+ {Items.dataCard02, 0},
+ {Items.dataCard03, 0},
+ {Items.dataCard04, 0},
+ {Items.dataCard05, 0},
+ {Items.dataCard06, 0},
+ {Items.dataCard07, 0},
+ {Items.dataCard08, 0},
+ {Items.dataCard09, 0},
+ {Items.dataCard10, 0},
+ {Items.dataCard11, 0},
+ {Items.dataCard12, 0},
+ {Items.dataCard13, 0},
+ {Items.dataCard14, 0},
+ {Items.dataCard15, 0},
+ {Items.dataCard16, 0},
+ {Items.dataCard17, 0},
+ {Items.dataCard18, 0},
+ {Items.dataCard19, 0},
+ {Items.dataCard20, 0},
+ {Items.dataCard21, 0},
+ {Items.dataCard22, 0},
+ {Items.dataCard23, 0},
+ {Items.dataCard24, 0},
+ {Items.dataCard25, 0},
+ {Items.dataCard26, 0},
+ {Items.dataCard27, 0},
+ {Items.jadeOrb, 0},
+ {Items.lockCapsule, 0},
+ {Items.redOrb, 0},
+ {Items.blueOrb, 0},
+ {Items.enigmaStone, 0},
+ {Items.prismScale, 300},
+ {Items.eviolite, 1000},
+ {Items.floatStone, 100},
+ {Items.rockyHelmet, 600},
+ {Items.airBalloon, 100},
+ {Items.redCard, 100},
+ {Items.ringTarget, 100},
+ {Items.bindingBand, 200},
+ {Items.absorbBulb, 100},
+ {Items.cellBattery, 100},
+ {Items.ejectButton, 100},
+ {Items.fireGem, 100},
+ {Items.waterGem, 100},
+ {Items.electricGem, 100},
+ {Items.grassGem, 100},
+ {Items.iceGem, 100},
+ {Items.fightingGem, 100},
+ {Items.poisonGem, 100},
+ {Items.groundGem, 100},
+ {Items.flyingGem, 100},
+ {Items.psychicGem, 100},
+ {Items.bugGem, 100},
+ {Items.rockGem, 100},
+ {Items.ghostGem, 100},
+ {Items.dragonGem, 100},
+ {Items.darkGem, 100},
+ {Items.steelGem, 100},
+ {Items.normalGem, 100},
+ {Items.healthFeather, 300},
+ {Items.muscleFeather, 300},
+ {Items.resistFeather, 300},
+ {Items.geniusFeather, 300},
+ {Items.cleverFeather, 300},
+ {Items.swiftFeather, 300},
+ {Items.prettyFeather, 20},
+ {Items.coverFossil, 500},
+ {Items.plumeFossil, 500},
+ {Items.libertyPass, 0},
+ {Items.passOrb, 20},
+ {Items.dreamBall, 100},
+ {Items.pokeToy, 100},
+ {Items.propCase, 0},
+ {Items.dragonSkull, 0},
+ {Items.balmMushroom, 1250},
+ {Items.bigNugget, 2000},
+ {Items.pearlString, 1500},
+ {Items.cometShard, 3000},
+ {Items.relicCopper, 0},
+ {Items.relicSilver, 0},
+ {Items.relicGold, 0},
+ {Items.relicVase, 0},
+ {Items.relicBand, 0},
+ {Items.relicStatue, 0},
+ {Items.relicCrown, 0},
+ {Items.casteliacone, 45},
+ {Items.direHit2, 0},
+ {Items.xSpeed2, 0},
+ {Items.xSpAtk2, 0},
+ {Items.xSpDef2, 0},
+ {Items.xDefense2, 0},
+ {Items.xAttack2, 0},
+ {Items.xAccuracy2, 0},
+ {Items.xSpeed3, 0},
+ {Items.xSpAtk3, 0},
+ {Items.xSpDef3, 0},
+ {Items.xDefense3, 0},
+ {Items.xAttack3, 0},
+ {Items.xAccuracy3, 0},
+ {Items.xSpeed6, 0},
+ {Items.xSpAtk6, 0},
+ {Items.xSpDef6, 0},
+ {Items.xDefense6, 0},
+ {Items.xAttack6, 0},
+ {Items.xAccuracy6, 0},
+ {Items.abilityUrge, 0},
+ {Items.itemDrop, 0},
+ {Items.itemUrge, 0},
+ {Items.resetUrge, 0},
+ {Items.direHit3, 0},
+ {Items.lightStone, 0},
+ {Items.darkStone, 0},
+ {Items.tm93, 1000},
+ {Items.tm94, 1000},
+ {Items.tm95, 1000},
+ {Items.xtransceiverMale, 0},
+ {Items.unused622, 0},
+ {Items.gram1, 0},
+ {Items.gram2, 0},
+ {Items.gram3, 0},
+ {Items.xtransceiverFemale, 0},
+ {Items.medalBox, 0},
+ {Items.dNASplicersFuse, 0},
+ {Items.dNASplicersSeparate, 0},
+ {Items.permit, 0},
+ {Items.ovalCharm, 0},
+ {Items.shinyCharm, 0},
+ {Items.plasmaCard, 0},
+ {Items.grubbyHanky, 0},
+ {Items.colressMachine, 0},
+ {Items.droppedItemCurtis, 0},
+ {Items.droppedItemYancy, 0},
+ {Items.revealGlass, 0},
+ {Items.weaknessPolicy, 200},
+ {Items.assaultVest, 600},
+ {Items.holoCasterMale, 0},
+ {Items.profsLetter, 0},
+ {Items.rollerSkates, 0},
+ {Items.pixiePlate, 200},
+ {Items.abilityCapsule, 500},
+ {Items.whippedDream, 300},
+ {Items.sachet, 300},
+ {Items.luminousMoss, 20},
+ {Items.snowball, 20},
+ {Items.safetyGoggles, 300},
+ {Items.pokeFlute, 0},
+ {Items.richMulch, 20},
+ {Items.surpriseMulch, 20},
+ {Items.boostMulch, 20},
+ {Items.amazeMulch, 20},
+ {Items.gengarite, 1000},
+ {Items.gardevoirite, 1000},
+ {Items.ampharosite, 1000},
+ {Items.venusaurite, 1000},
+ {Items.charizarditeX, 1000},
+ {Items.blastoisinite, 1000},
+ {Items.mewtwoniteX, 2000},
+ {Items.mewtwoniteY, 2000},
+ {Items.blazikenite, 1000},
+ {Items.medichamite, 500},
+ {Items.houndoominite, 1000},
+ {Items.aggronite, 1000},
+ {Items.banettite, 500},
+ {Items.tyranitarite, 2000},
+ {Items.scizorite, 1000},
+ {Items.pinsirite, 1000},
+ {Items.aerodactylite, 1000},
+ {Items.lucarionite, 1000},
+ {Items.abomasite, 500},
+ {Items.kangaskhanite, 500},
+ {Items.gyaradosite, 1000},
+ {Items.absolite, 500},
+ {Items.charizarditeY, 1000},
+ {Items.alakazite, 1000},
+ {Items.heracronite, 1000},
+ {Items.mawilite, 300},
+ {Items.manectite, 500},
+ {Items.garchompite, 2000},
+ {Items.latiasite, 2000},
+ {Items.latiosite, 2000},
+ {Items.roseliBerry, 100},
+ {Items.keeBerry, 100},
+ {Items.marangaBerry, 100},
+ {Items.sprinklotad, 0},
+ {Items.tm96, 1000},
+ {Items.tm97, 1000},
+ {Items.tm98, 1000},
+ {Items.tm99, 1000},
+ {Items.tm100, 500},
+ {Items.powerPlantPass, 0},
+ {Items.megaRing, 0},
+ {Items.intriguingStone, 0},
+ {Items.commonStone, 0},
+ {Items.discountCoupon, 2},
+ {Items.elevatorKey, 0},
+ {Items.tmvPass, 0},
+ {Items.honorofKalos, 0},
+ {Items.adventureGuide, 0},
+ {Items.strangeSouvenir, 1},
+ {Items.lensCase, 0},
+ {Items.makeupBag, 0},
+ {Items.travelTrunk, 0},
+ {Items.lumioseGalette, 45},
+ {Items.shalourSable, 45},
+ {Items.jawFossil, 500},
+ {Items.sailFossil, 500},
+ {Items.lookerTicket, 0},
+ {Items.bikeYellow, 0},
+ {Items.holoCasterFemale, 0},
+ {Items.fairyGem, 100},
+ {Items.megaCharm, 0},
+ {Items.megaGlove, 0},
+ {Items.machBike, 0},
+ {Items.acroBike, 0},
+ {Items.wailmerPail, 0},
+ {Items.devonParts, 0},
+ {Items.sootSack, 0},
+ {Items.basementKeyHoenn, 0},
+ {Items.pokeblockKit, 0},
+ {Items.letter, 0},
+ {Items.eonTicket, 0},
+ {Items.scanner, 0},
+ {Items.goGoggles, 0},
+ {Items.meteoriteFirstForm, 0},
+ {Items.keytoRoom1, 0},
+ {Items.keytoRoom2, 0},
+ {Items.keytoRoom4, 0},
+ {Items.keytoRoom6, 0},
+ {Items.storageKeyHoenn, 0},
+ {Items.devonScope, 0},
+ {Items.ssTicketHoenn, 0},
+ {Items.hm07ORAS, 0},
+ {Items.devonScubaGear, 0},
+ {Items.contestCostumeMale, 0},
+ {Items.contestCostumeFemale, 0},
+ {Items.magmaSuit, 0},
+ {Items.aquaSuit, 0},
+ {Items.pairOfTickets, 0},
+ {Items.megaBracelet, 0},
+ {Items.megaPendant, 0},
+ {Items.megaGlasses, 0},
+ {Items.megaAnchor, 0},
+ {Items.megaStickpin, 0},
+ {Items.megaTiara, 0},
+ {Items.megaAnklet, 0},
+ {Items.meteoriteSecondForm, 0},
+ {Items.swampertite, 1000},
+ {Items.sceptilite, 1000},
+ {Items.sablenite, 300},
+ {Items.altarianite, 500},
+ {Items.galladite, 1000},
+ {Items.audinite, 500},
+ {Items.metagrossite, 2000},
+ {Items.sharpedonite, 500},
+ {Items.slowbronite, 500},
+ {Items.steelixite, 1000},
+ {Items.pidgeotite, 500},
+ {Items.glalitite, 500},
+ {Items.diancite, 2000},
+ {Items.prisonBottle, 0},
+ {Items.megaCuff, 0},
+ {Items.cameruptite, 500},
+ {Items.lopunnite, 500},
+ {Items.salamencite, 2000},
+ {Items.beedrillite, 300},
+ {Items.meteoriteThirdForm, 0},
+ {Items.meteoriteFinalForm, 0},
+ {Items.keyStone, 0},
+ {Items.meteoriteShard, 0},
+ {Items.eonFlute, 0},
+ }).collect(Collectors.toMap(kv -> kv[0], kv -> kv[1]));
+
+ public static final int[] xyMapNumToPokedexIndex = {
+ 7, // Couriway Town
+ 8, // Ambrette Town
+ 13, // Cyllage City
+ 14, // Shalour City
+ 16, // Laverre City
+ 22, // Route 2
+ 23, // Route 3
+ 24, // Route 4
+ 25, // Route 5
+ 26, // Route 6
+ 27, // Route 7
+ 28, // Route 8
+ 29, // Route 9
+ 30, // Route 10
+ 31, // Route 11
+ 32, // Route 12
+ 33, // Route 13
+ 34, // Route 14
+ 35, // Route 15
+ 36, // Route 16
+ 37, // Route 17
+ 38, // Route 18
+ 39, // Route 19
+ 40, // Route 20
+ 41, // Route 21
+ 42, // Route 22
+ 44, // Santalune Forest
+ 45, // Parfum Palace
+ 46, 46, // Glittering Cave
+ 47, 47, 47, 47, // Reflection Cave
+ 49, 49, 49, 49, 49, // Frost Cavern
+ 50, // Pokemon Village
+ 51, 51, 51, 51, 51, // Victory Road
+ 52, // Connecting Cave
+ 54, 54, 54, 54, 54, // Terminus Cave
+ 55, // Lost Hotel
+ 43, // Azure Bay
+ 46, 46, 46, 46, // Glittering Cave (ceiling)
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, // Reflection Cave (ceiling)
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, // Victory Road (ceiling and sky)
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, // Terminus Cave (ceiling)
+ 26, 26, 26, // Route 6 (rustling bush)
+ 38, 38, 38, 38 // Route 18 (rustling bush)
+ };
+
+ public static final int[] orasMapNumToPokedexIndex = {
+ 2, // Dewford Town
+ 6, // Pacifidlog Town
+ 7, // Petalburg City
+ 8, // Slateport City
+ 12, // Lilycove City
+ 13, // Mossdeep City
+ 14, // Sootopolis City
+ 15, // Ever Grande City
+ 17, // Route 101
+ 18, // Route 102
+ 19, // Route 103
+ 20, // Route 104 (North Section)
+ 21, // Route 104 (South Section)
+ 22, // Route 105
+ 23, // Route 106
+ 24, // Route 107
+ 26, // Route 108
+ 27, // Route 109
+ 28, // Route 110
+ 30, // Route 111 (Desert)
+ 32, // Route 111 (South Section)
+ 33, // Route 112 (North Section)
+ 34, // Route 112 (South Section)
+ 35, // Route 113
+ 36, // Route 114
+ 37, // Route 115
+ 38, // Route 116
+ 39, // Route 117
+ 40, // Route 118
+ 41, 41, // Route 119
+ 43, 43, // Route 120
+ 45, // Route 121
+ 46, // Route 122
+ 47, // Route 123
+ 48, // Route 124
+ 50, // Route 125
+ 51, // Route 126
+ 53, // Route 127
+ 55, // Route 128
+ 57, // Route 129
+ 59, // Route 130
+ 61, // Route 131
+ 62, // Route 132
+ 63, // Route 133
+ 64, // Route 134
+ 25, // Route 107 (Underwater)
+ 49, // Route 124 (Underwater)
+ 52, // Route 126 (Underwater)
+ 56, // Route 128 (Underwater)
+ 58, // Route 129 (Underwater)
+ 60, // Route 130 (Underwater)
+ 69, 69, 69, 69, // Meteor Falls
+ 73, // Rusturf Tunnel
+ 74, 74, 74, // Granite Cave
+ 78, // Petalburg Woods
+ 80, // Jagged Pass
+ 81, // Fiery Path
+ 82, 82, 82, 82, 82, 82, // Mt. Pyre
+ -1, // Team Aqua Hideout
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, // Seafloor Cavern
+ 102, 102, 102, 102, 102, // Cave of Origin
+ 114, 114, 114, 114, // Victory Road
+ 119, 119, 119, 119, 119, 119, 119, // Shoal Cave
+ 130, // New Mauville
+ 136, 136, 136, 136, // Sea Mauville
+ -1, // Sealed Chamber
+ -1, -1, -1, -1, // Scorched Slab
+ -1, // Team Magma Hideout
+ 150, // Sky Pillar
+ -1, -1, -1, -1, -1, -1, -1, -1, // Mirage Forest
+ -1, -1, -1, -1, -1, -1, -1, -1, // Mirage Island
+ -1, // Mirage Mountain
+ 159, // Battle Resort
+ 65, 65, 65, 65, // Safari Zone
+ 102, // Cave of Origin
+ -1, -1, -1, -1, -1, -1, -1, // Mirage Mountain
+ -1, -1, -1, -1, -1, -1, -1, -1, // Mirage Cave
+ -1, // Mt. Pyre (unused)
+ -1 // Sootopolis City (unused)
+ };
+}
diff --git a/src/com/pkrandom/constants/Gen7Constants.java b/src/com/pkrandom/constants/Gen7Constants.java
new file mode 100644
index 0000000..2c1d9a1
--- /dev/null
+++ b/src/com/pkrandom/constants/Gen7Constants.java
@@ -0,0 +1,2243 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Gen7Constants.java - Constants for Sun/Moon/Ultra Sun/Ultra Moon --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+import com.pkrandom.pokemon.ItemList;
+import com.pkrandom.pokemon.MoveCategory;
+import com.pkrandom.pokemon.Trainer;
+import com.pkrandom.pokemon.Type;
+
+import java.util.*;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import java.util.stream.Stream;
+
+public class Gen7Constants {
+
+ public static final int Type_SM = N3DSConstants.Type_SM;
+ public static final int Type_USUM = N3DSConstants.Type_USUM;
+
+ private static final int pokemonCountSM = 802, pokemonCountUSUM = 807;
+ private static final int formeCountSM = 158, formeCountUSUM = 168;
+ private static final int moveCountSM = 719, moveCountUSUM = 728;
+ private static final int highestAbilityIndexSM = Abilities.prismArmor, highestAbilityIndexUSUM = Abilities.neuroforce;
+
+ 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, bsDarkGrassHeldItemOffset = 16,
+ bsGenderOffset = 18, bsGrowthCurveOffset = 21, bsAbility1Offset = 24, bsAbility2Offset = 25,
+ bsAbility3Offset = 26, bsCallRateOffset = 27, bsFormeOffset = 28, bsFormeSpriteOffset = 30,
+ bsFormeCountOffset = 32, bsTMHMCompatOffset = 40, bsSpecialMTCompatOffset = 56, bsMTCompatOffset = 60;
+
+ public static final int bsSize = 0x54;
+
+ public static final int evolutionMethodCount = 42;
+
+ private static List<Integer> speciesWithAlolanForms = Arrays.asList(
+ Species.rattata, Species.raticate, Species.raichu, Species.sandshrew, Species.sandslash, Species.vulpix,
+ Species.ninetales, Species.diglett, Species.dugtrio, Species.meowth, Species.persian, Species.geodude,
+ Species.graveler, Species.golem, Species.grimer, Species.muk, Species.exeggutor, Species.marowak
+ );
+
+ private static final Map<Integer,String> dummyFormeSuffixes = setupDummyFormeSuffixes();
+ private static final Map<Integer,Map<Integer,String>> formeSuffixesByBaseForme = setupFormeSuffixesByBaseForme();
+
+ public static String getFormeSuffixByBaseForme(int baseForme, int formNum) {
+ return formeSuffixesByBaseForme.getOrDefault(baseForme,dummyFormeSuffixes).getOrDefault(formNum,"");
+ }
+
+ public static List<Integer> getIrregularFormes(int romType) {
+ if (romType == Type_SM) {
+ return irregularFormesSM;
+ } else if (romType == Type_USUM) {
+ return irregularFormesUSUM;
+ }
+ return irregularFormesSM;
+ }
+
+ public static final List<Integer> irregularFormesSM = Arrays.asList(
+ Species.SMFormes.castformF, Species.SMFormes.castformW, Species.SMFormes.castformI,
+ Species.SMFormes.darmanitanZ,
+ Species.SMFormes.meloettaP,
+ Species.SMFormes.kyuremW,
+ Species.SMFormes.kyuremB,
+ Species.SMFormes.gengarMega,
+ Species.SMFormes.gardevoirMega,
+ Species.SMFormes.ampharosMega,
+ Species.SMFormes.venusaurMega,
+ Species.SMFormes.charizardMegaX, Species.SMFormes.charizardMegaY,
+ Species.SMFormes.mewtwoMegaX, Species.SMFormes.mewtwoMegaY,
+ Species.SMFormes.blazikenMega,
+ Species.SMFormes.medichamMega,
+ Species.SMFormes.houndoomMega,
+ Species.SMFormes.aggronMega,
+ Species.SMFormes.banetteMega,
+ Species.SMFormes.tyranitarMega,
+ Species.SMFormes.scizorMega,
+ Species.SMFormes.pinsirMega,
+ Species.SMFormes.aerodactylMega,
+ Species.SMFormes.lucarioMega,
+ Species.SMFormes.abomasnowMega,
+ Species.SMFormes.aegislashB,
+ Species.SMFormes.blastoiseMega,
+ Species.SMFormes.kangaskhanMega,
+ Species.SMFormes.gyaradosMega,
+ Species.SMFormes.absolMega,
+ Species.SMFormes.alakazamMega,
+ Species.SMFormes.heracrossMega,
+ Species.SMFormes.mawileMega,
+ Species.SMFormes.manectricMega,
+ Species.SMFormes.garchompMega,
+ Species.SMFormes.latiosMega,
+ Species.SMFormes.latiasMega,
+ Species.SMFormes.swampertMega,
+ Species.SMFormes.sceptileMega,
+ Species.SMFormes.sableyeMega,
+ Species.SMFormes.altariaMega,
+ Species.SMFormes.galladeMega,
+ Species.SMFormes.audinoMega,
+ Species.SMFormes.sharpedoMega,
+ Species.SMFormes.slowbroMega,
+ Species.SMFormes.steelixMega,
+ Species.SMFormes.pidgeotMega,
+ Species.SMFormes.glalieMega,
+ Species.SMFormes.diancieMega,
+ Species.SMFormes.metagrossMega,
+ Species.SMFormes.kyogreP,
+ Species.SMFormes.groudonP,
+ Species.SMFormes.rayquazaMega,
+ Species.SMFormes.cameruptMega,
+ Species.SMFormes.lopunnyMega,
+ Species.SMFormes.salamenceMega,
+ Species.SMFormes.beedrillMega,
+ Species.SMFormes.wishiwashiS,
+ Species.SMFormes.greninjaA,
+ Species.SMFormes.zygardeC,
+ Species.SMFormes.miniorC
+ );
+
+ public static final List<Integer> irregularFormesUSUM = Arrays.asList(
+ Species.USUMFormes.castformF, Species.USUMFormes.castformW, Species.USUMFormes.castformI,
+ Species.USUMFormes.darmanitanZ,
+ Species.USUMFormes.meloettaP,
+ Species.USUMFormes.kyuremW,
+ Species.USUMFormes.kyuremB,
+ Species.USUMFormes.gengarMega,
+ Species.USUMFormes.gardevoirMega,
+ Species.USUMFormes.ampharosMega,
+ Species.USUMFormes.venusaurMega,
+ Species.USUMFormes.charizardMegaX, Species.USUMFormes.charizardMegaY,
+ Species.USUMFormes.mewtwoMegaX, Species.USUMFormes.mewtwoMegaY,
+ Species.USUMFormes.blazikenMega,
+ Species.USUMFormes.medichamMega,
+ Species.USUMFormes.houndoomMega,
+ Species.USUMFormes.aggronMega,
+ Species.USUMFormes.banetteMega,
+ Species.USUMFormes.tyranitarMega,
+ Species.USUMFormes.scizorMega,
+ Species.USUMFormes.pinsirMega,
+ Species.USUMFormes.aerodactylMega,
+ Species.USUMFormes.lucarioMega,
+ Species.USUMFormes.abomasnowMega,
+ Species.USUMFormes.aegislashB,
+ Species.USUMFormes.blastoiseMega,
+ Species.USUMFormes.kangaskhanMega,
+ Species.USUMFormes.gyaradosMega,
+ Species.USUMFormes.absolMega,
+ Species.USUMFormes.alakazamMega,
+ Species.USUMFormes.heracrossMega,
+ Species.USUMFormes.mawileMega,
+ Species.USUMFormes.manectricMega,
+ Species.USUMFormes.garchompMega,
+ Species.USUMFormes.latiosMega,
+ Species.USUMFormes.latiasMega,
+ Species.USUMFormes.swampertMega,
+ Species.USUMFormes.sceptileMega,
+ Species.USUMFormes.sableyeMega,
+ Species.USUMFormes.altariaMega,
+ Species.USUMFormes.galladeMega,
+ Species.USUMFormes.audinoMega,
+ Species.USUMFormes.sharpedoMega,
+ Species.USUMFormes.slowbroMega,
+ Species.USUMFormes.steelixMega,
+ Species.USUMFormes.pidgeotMega,
+ Species.USUMFormes.glalieMega,
+ Species.USUMFormes.diancieMega,
+ Species.USUMFormes.metagrossMega,
+ Species.USUMFormes.kyogreP,
+ Species.USUMFormes.groudonP,
+ Species.USUMFormes.rayquazaMega,
+ Species.USUMFormes.cameruptMega,
+ Species.USUMFormes.lopunnyMega,
+ Species.USUMFormes.salamenceMega,
+ Species.USUMFormes.beedrillMega,
+ Species.USUMFormes.wishiwashiS,
+ Species.USUMFormes.greninjaA,
+ Species.USUMFormes.zygardeC,
+ Species.USUMFormes.miniorC,
+ Species.USUMFormes.necrozmaDM,
+ Species.USUMFormes.necrozmaDW,
+ Species.USUMFormes.necrozmaU
+ );
+
+ public static final MoveCategory[] moveCategoryIndices = { MoveCategory.STATUS, MoveCategory.PHYSICAL,
+ MoveCategory.SPECIAL };
+
+ public static byte moveCategoryToByte(MoveCategory cat) {
+ switch (cat) {
+ case PHYSICAL:
+ return 1;
+ case SPECIAL:
+ return 2;
+ case STATUS:
+ default:
+ return 0;
+ }
+ }
+
+ public static final int noDamageTargetTrappingEffect = 106, noDamageFieldTrappingEffect = 354,
+ damageAdjacentFoesTrappingEffect = 373, damageTargetTrappingEffect = 384;
+
+ public static final int noDamageStatusQuality = 1, noDamageStatChangeQuality = 2, damageStatusQuality = 4,
+ noDamageStatusAndStatChangeQuality = 5, damageTargetDebuffQuality = 6, damageUserBuffQuality = 7,
+ damageAbsorbQuality = 8;
+
+ public static List<Integer> bannedMoves = Arrays.asList(Moves.darkVoid, Moves.hyperspaceFury);
+
+ public static final Type[] typeTable = constructTypeTable();
+
+ private static final String tmDataPrefixSM = "034003410342034303", tmDataPrefixUSUM = "03BC03BD03BE03BF03";
+ public static final int tmCount = 100, tmBlockOneCount = 92, tmBlockTwoCount = 3, tmBlockThreeCount = 5,
+ tmBlockOneOffset = Items.tm01, tmBlockTwoOffset = Items.tm93, tmBlockThreeOffset = Items.tm96;
+ public static final String itemPalettesPrefix = "070000000000000000010100";
+
+ public static final int shopItemsOffsetSM = 0x50A8;
+ public static final int shopItemsOffsetUSUM = 0x50BC;
+
+ public static final int tutorsOffset = 0x54DE;
+ public static final String tutorsPrefix = "5F6F6E5F6F6666FF";
+ public static final int tutorMoveCount = 67;
+
+ public static final String[] fastestTextPrefixes = new String[]{"1080BDE80E000500F0412DE9", "34019FE50060A0E3"};
+
+ private static final List<Integer> mainGameShopsSM = Arrays.asList(
+ 8, 9, 10, 11, 14, 15, 17, 20, 21, 22, 23
+ );
+
+ private static final List<Integer> mainGameShopsUSUM = Arrays.asList(
+ 8, 9, 10, 11, 14, 15, 17, 20, 21, 22, 23, 24, 25, 26, 27
+ );
+
+ public static final List<Integer> evolutionItems = Arrays.asList(Items.sunStone, Items.moonStone, Items.fireStone,
+ Items.thunderStone, Items.waterStone, Items.leafStone, Items.shinyStone, Items.duskStone, Items.dawnStone,
+ Items.ovalStone, Items.kingsRock, Items.deepSeaTooth, Items.deepSeaScale, Items.metalCoat, Items.dragonScale,
+ Items.upgrade, Items.protector, Items.electirizer, Items.magmarizer, Items.dubiousDisc, Items.reaperCloth,
+ Items.razorClaw, Items.razorFang, Items.prismScale, Items.whippedDream, Items.sachet, Items.iceStone);
+
+ private static final List<Boolean> relevantEncounterFilesSM = setupRelevantEncounterFiles(Type_SM);
+ private static final List<Boolean> relevantEncounterFilesUSUM = setupRelevantEncounterFiles(Type_USUM);
+
+ public static final List<Integer> heldZCrystals = Arrays.asList(
+ Items.normaliumZHeld, // Normal
+ Items.fightiniumZHeld, // Fighting
+ Items.flyiniumZHeld, // Flying
+ Items.poisoniumZHeld, // Poison
+ Items.groundiumZHeld, // Ground
+ Items.rockiumZHeld, // Rock
+ Items.buginiumZHeld, // Bug
+ Items.ghostiumZHeld, // Ghost
+ Items.steeliumZHeld, // Steel
+ Items.firiumZHeld, // Fire
+ Items.wateriumZHeld, // Water
+ Items.grassiumZHeld, // Grass
+ Items.electriumZHeld, // Electric
+ Items.psychiumZHeld, // Psychic
+ Items.iciumZHeld, // Ice
+ Items.dragoniumZHeld, // Dragon
+ Items.darkiniumZHeld, // Dark
+ Items.fairiumZHeld // Fairy
+ );
+
+ public static final Map<Integer,List<Integer>> abilityVariations = setupAbilityVariations();
+
+ private static Map<Integer,List<Integer>> setupAbilityVariations() {
+ Map<Integer,List<Integer>> map = new HashMap<>();
+ map.put(Abilities.insomnia, Arrays.asList(Abilities.insomnia, Abilities.vitalSpirit));
+ map.put(Abilities.clearBody, Arrays.asList(Abilities.clearBody, Abilities.whiteSmoke, Abilities.fullMetalBody));
+ map.put(Abilities.hugePower, Arrays.asList(Abilities.hugePower, Abilities.purePower));
+ map.put(Abilities.battleArmor, Arrays.asList(Abilities.battleArmor, Abilities.shellArmor));
+ map.put(Abilities.cloudNine, Arrays.asList(Abilities.cloudNine, Abilities.airLock));
+ map.put(Abilities.filter, Arrays.asList(Abilities.filter, Abilities.solidRock, Abilities.prismArmor));
+ map.put(Abilities.roughSkin, Arrays.asList(Abilities.roughSkin, Abilities.ironBarbs));
+ map.put(Abilities.moldBreaker, Arrays.asList(Abilities.moldBreaker, Abilities.turboblaze, Abilities.teravolt));
+ map.put(Abilities.wimpOut, Arrays.asList(Abilities.wimpOut, Abilities.emergencyExit));
+ map.put(Abilities.queenlyMajesty, Arrays.asList(Abilities.queenlyMajesty, Abilities.dazzling));
+ map.put(Abilities.gooey, Arrays.asList(Abilities.gooey, Abilities.tanglingHair));
+ map.put(Abilities.receiver, Arrays.asList(Abilities.receiver, Abilities.powerOfAlchemy));
+ map.put(Abilities.multiscale, Arrays.asList(Abilities.multiscale, Abilities.shadowShield));
+
+ return map;
+ }
+
+ public static final List<Integer> uselessAbilities = Arrays.asList(Abilities.forecast, Abilities.multitype,
+ Abilities.flowerGift, Abilities.zenMode, Abilities.stanceChange, Abilities.shieldsDown, Abilities.schooling,
+ Abilities.disguise, Abilities.battleBond, Abilities.powerConstruct, Abilities.rksSystem);
+
+ private static final String saveLoadFormeReversionPrefixSM = "00EB040094E50C1094E5F70E80E2", saveLoadFormeReversionPrefixUSUM = "00EB040094E50C1094E5030B80E2EE0F80E2";
+ public static final String afterBattleFormeReversionPrefix = "0055E10B00001A0010A0E30700A0E1";
+
+ public static final String ninjaskSpeciesPrefix = "11FF2FE11CD08DE2F080BDE8", shedinjaPrefix = "A0E194FDFFEB0040A0E1";
+
+ public static final String beastLusaminePokemonBoostsPrefix = "1D14FFFF";
+ public static final int beastLusamineTrainerIndex = 157;
+
+ public static final String miniorWildEncounterPatchPrefix = "032C42E2062052E2";
+
+ public static final int zygardeAssemblyScriptFile = 45;
+ public static final String zygardeAssemblyFormePrefix = "BC21CDE1B801CDE1", zygardeAssemblySpeciesPrefix = "FBEB4CD08DE20400A0E1F08FBDE8";
+
+ public static final String friendshipValueForEvoLocator = "DC0050E3F700002A";
+
+ public static final String perfectOddsBranchLocator = "050000BA000050E3";
+
+ public static int getPokemonCount(int romType) {
+ if (romType == Type_SM) {
+ return pokemonCountSM;
+ } else if (romType == Type_USUM) {
+ return pokemonCountUSUM;
+ }
+ return pokemonCountSM;
+ }
+
+ public static List<Integer> getRegularShopItems(int romType) {
+ if (romType == Type_SM) {
+ return regularShopItemsSM;
+ } else {
+ return regularShopItemsUSUM;
+ }
+ }
+
+ public static final List<Integer> consumableHeldItems = setupAllConsumableItems();
+
+ private static List<Integer> setupAllConsumableItems() {
+ List<Integer> list = new ArrayList<>(Gen6Constants.consumableHeldItems);
+ list.addAll(Arrays.asList(Items.adrenalineOrb, Items.electricSeed, Items.psychicSeed, Items.mistySeed, Items.grassySeed));
+ return list;
+ }
+
+ public static final List<Integer> allHeldItems = setupAllHeldItems();
+
+ private static List<Integer> setupAllHeldItems() {
+ // We intentionally do not include Z Crystals in this list. Adding Z-Crystals to random trainers should
+ // probably require its own setting if desired.
+ List<Integer> list = new ArrayList<>(Gen6Constants.allHeldItems);
+ list.addAll(Arrays.asList(Items.adrenalineOrb, Items.electricSeed, Items.psychicSeed, Items.mistySeed, Items.grassySeed));
+ list.addAll(Arrays.asList(Items.terrainExtender, Items.protectivePads));
+ return list;
+ }
+
+ public static final List<Integer> generalPurposeConsumableItems = initializeGeneralPurposeConsumableItems();
+
+ private static List<Integer> initializeGeneralPurposeConsumableItems() {
+ List<Integer> list = new ArrayList<>(Gen6Constants.generalPurposeConsumableItems);
+ // These berries are worth the risk of causing confusion because they heal for half max HP.
+ list.addAll(Arrays.asList(Items.figyBerry, Items.wikiBerry, Items.magoBerry,
+ Items.aguavBerry, Items.iapapaBerry, Items.adrenalineOrb));
+ return Collections.unmodifiableList(list);
+ }
+
+ public static final List<Integer> generalPurposeItems = initializeGeneralPurposeItems();
+
+ private static List<Integer> initializeGeneralPurposeItems() {
+ List<Integer> list = new ArrayList<>(Gen6Constants.generalPurposeItems);
+ list.addAll(Arrays.asList(Items.protectivePads));
+ return Collections.unmodifiableList(list);
+ }
+
+ public static final Map<Integer, List<Integer>> moveBoostingItems = initializeMoveBoostingItems();
+
+ private static Map<Integer, List<Integer>> initializeMoveBoostingItems() {
+ Map<Integer, List<Integer>> map = new HashMap<>(Gen6Constants.moveBoostingItems);
+ map.put(Moves.electricTerrain, Arrays.asList(Items.terrainExtender));
+ map.put(Moves.grassyTerrain, Arrays.asList(Items.terrainExtender));
+ map.put(Moves.mistyTerrain, Arrays.asList(Items.terrainExtender));
+ map.put(Moves.psychicTerrain, Arrays.asList(Items.terrainExtender));
+ map.put(Moves.strengthSap, Arrays.asList(Items.bigRoot));
+ return Collections.unmodifiableMap(map);
+ }
+ public static final Map<Integer, List<Integer>> abilityBoostingItems = initializeAbilityBoostingItems();
+
+ private static Map<Integer, List<Integer>> initializeAbilityBoostingItems() {
+ Map<Integer, List<Integer>> map = new HashMap<>(Gen6Constants.abilityBoostingItems);
+ map.put(Abilities.electricSurge, Arrays.asList(Items.terrainExtender));
+ map.put(Abilities.grassySurge, Arrays.asList(Items.terrainExtender));
+ map.put(Abilities.mistySurge, Arrays.asList(Items.terrainExtender));
+ map.put(Abilities.psychicSurge, Arrays.asList(Items.terrainExtender));
+ return Collections.unmodifiableMap(map);
+ }
+
+ public static final Map<Integer, Integer> consumableAbilityBoostingItems = initializeConsumableAbilityBoostingItems();
+
+ private static Map<Integer, Integer> initializeConsumableAbilityBoostingItems() {
+ Map<Integer, Integer> map = new HashMap<>();
+ map.put(Abilities.electricSurge, Items.electricSeed);
+ map.put(Abilities.grassySurge, Items.grassySeed);
+ map.put(Abilities.mistySurge, Items.mistySeed);
+ map.put(Abilities.psychicSurge, Items.psychicSeed);
+ return Collections.unmodifiableMap(map);
+ }
+
+ // None of these have new entries in Gen VII.
+ public static final Map<Type, Integer> consumableTypeBoostingItems = Gen6Constants.consumableTypeBoostingItems;
+ public static final Map<Integer, List<Integer>> speciesBoostingItems = Gen6Constants.speciesBoostingItems;
+ public static final Map<Type, List<Integer>> typeBoostingItems = Gen6Constants.typeBoostingItems;
+ public static final Map<Type, Integer> weaknessReducingBerries = Gen6Constants.weaknessReducingBerries;
+
+ public static boolean isZCrystal(int itemIndex) {
+ // From https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Generation_VII)
+ return (itemIndex >= Items.normaliumZHeld && itemIndex <= Items.pikaniumZHeld) ||
+ (itemIndex >= Items.decidiumZHeld && itemIndex <= Items.pikashuniumZBag) ||
+ (itemIndex >= Items.solganiumZBag && itemIndex <= Items.kommoniumZBag);
+
+ }
+
+ public static List<String> getShopNames(int romType) {
+ List<String> shopNames = new ArrayList<>();
+ shopNames.add("Primary 0 Trials");
+ shopNames.add("Primary 1 Trials");
+ shopNames.add("Primary 2 Trials");
+ shopNames.add("Primary 3 Trials");
+ shopNames.add("Primary 4 Trials");
+ shopNames.add("Primary 5 Trials");
+ shopNames.add("Primary 6 Trials");
+ shopNames.add("Primary 7 Trials");
+ shopNames.add("Konikoni City Incenses");
+ shopNames.add("Konikoni City Herbs");
+ shopNames.add("Hau'oli City Secondary");
+ shopNames.add("Route 2 Secondary");
+ shopNames.add("Heahea City Secondary (TMs)");
+ shopNames.add("Royal Avenue Secondary (TMs)");
+ shopNames.add("Route 8 Secondary");
+ shopNames.add("Paniola Town Secondary");
+ shopNames.add("Malie City Secondary (TMs)");
+ shopNames.add("Mount Hokulani Secondary");
+ shopNames.add("Seafolk Village Secondary (TMs)");
+ shopNames.add("Konikoni City TMs");
+ shopNames.add("Konikoni City Stones");
+ shopNames.add("Thrifty Megamart, Center-Left");
+ shopNames.add("Thrifty Megamart, Center-Right");
+ shopNames.add("Thrifty Megamart, Right");
+ if (romType == Type_USUM) {
+ shopNames.add("Route 5 Secondary");
+ shopNames.add("Konikoni City Secondary");
+ shopNames.add("Tapu Village Secondary");
+ shopNames.add("Mount Lanakila Secondary");
+ }
+ return shopNames;
+ }
+
+ public static List<Integer> getMainGameShops(int romType) {
+ if (romType == Type_SM) {
+ return mainGameShopsSM;
+ } else {
+ return mainGameShopsUSUM;
+ }
+ }
+
+ public static int getShopItemsOffset(int romType) {
+ if (romType == Type_SM) {
+ return shopItemsOffsetSM;
+ } else {
+ return shopItemsOffsetUSUM;
+ }
+ }
+
+ public static int getFormeCount(int romType) {
+ if (romType == Type_SM) {
+ return formeCountSM;
+ } else {
+ return formeCountUSUM;
+ }
+ }
+
+ public static int getMoveCount(int romType) {
+ if (romType == Type_SM) {
+ return moveCountSM;
+ } else if (romType == Type_USUM) {
+ return moveCountUSUM;
+ }
+ return moveCountSM;
+ }
+
+ public static String getTmDataPrefix(int romType) {
+ if (romType == Type_SM) {
+ return tmDataPrefixSM;
+ } else if (romType == Type_USUM) {
+ return tmDataPrefixUSUM;
+ }
+ return tmDataPrefixSM;
+ }
+
+ public static int getHighestAbilityIndex(int romType) {
+ if (romType == Type_SM) {
+ return highestAbilityIndexSM;
+ } else if (romType == Type_USUM) {
+ return highestAbilityIndexUSUM;
+ }
+ return highestAbilityIndexSM;
+ }
+
+ public static List<Boolean> getRelevantEncounterFiles(int romType) {
+ if (romType == Type_SM) {
+ return relevantEncounterFilesSM;
+ } else {
+ return relevantEncounterFilesUSUM;
+ }
+ }
+
+ public static String getSaveLoadFormeReversionPrefix(int romType) {
+ if (romType == Type_SM) {
+ return saveLoadFormeReversionPrefixSM;
+ } else {
+ return saveLoadFormeReversionPrefixUSUM;
+ }
+ }
+
+ private static Map<Integer,Map<Integer,String>> setupFormeSuffixesByBaseForme() {
+ Map<Integer,Map<Integer,String>> map = new HashMap<>();
+
+ Map<Integer,String> deoxysMap = new HashMap<>();
+ deoxysMap.put(1,"-A");
+ deoxysMap.put(2,"-D");
+ deoxysMap.put(3,"-S");
+ map.put(Species.deoxys, deoxysMap);
+
+ Map<Integer,String> wormadamMap = new HashMap<>();
+ wormadamMap.put(1,"-S");
+ wormadamMap.put(2,"-T");
+ map.put(Species.wormadam, wormadamMap);
+
+ Map<Integer,String> shayminMap = new HashMap<>();
+ shayminMap.put(1,"-S");
+ map.put(Species.shaymin, shayminMap);
+
+ Map<Integer,String> giratinaMap = new HashMap<>();
+ giratinaMap.put(1,"-O");
+ map.put(Species.giratina, giratinaMap);
+
+ Map<Integer,String> rotomMap = new HashMap<>();
+ rotomMap.put(1,"-H");
+ rotomMap.put(2,"-W");
+ rotomMap.put(3,"-Fr");
+ rotomMap.put(4,"-Fa");
+ rotomMap.put(5,"-M");
+ map.put(Species.rotom, rotomMap);
+
+ Map<Integer,String> castformMap = new HashMap<>();
+ castformMap.put(1,"-F");
+ castformMap.put(2,"-W");
+ castformMap.put(3,"-I");
+ map.put(Species.castform, castformMap);
+
+ Map<Integer,String> basculinMap = new HashMap<>();
+ basculinMap.put(1,"-B");
+ map.put(Species.basculin, basculinMap);
+
+ Map<Integer,String> darmanitanMap = new HashMap<>();
+ darmanitanMap.put(1,"-Z");
+ map.put(Species.darmanitan, darmanitanMap);
+
+ Map<Integer,String> meloettaMap = new HashMap<>();
+ meloettaMap.put(1,"-P");
+ map.put(Species.meloetta, meloettaMap);
+
+ Map<Integer,String> kyuremMap = new HashMap<>();
+ kyuremMap.put(1,"-W");
+ kyuremMap.put(2,"-B");
+ map.put(Species.kyurem, kyuremMap);
+
+ Map<Integer,String> tornadusMap = new HashMap<>();
+ tornadusMap.put(1,"-T");
+ map.put(Species.tornadus, tornadusMap);
+
+ Map<Integer,String> thundurusMap = new HashMap<>();
+ thundurusMap.put(1,"-T");
+ map.put(Species.thundurus, thundurusMap);
+
+ Map<Integer,String> landorusMap = new HashMap<>();
+ landorusMap.put(1,"-T");
+ map.put(Species.landorus, landorusMap);
+
+ Map<Integer,String> meowsticMap = new HashMap<>();
+ meowsticMap.put(1,"-F");
+ map.put(Species.meowstic, meowsticMap);
+
+ Map<Integer,String> aegislashMap = new HashMap<>();
+ aegislashMap.put(1,"-B");
+ map.put(Species.aegislash, aegislashMap);
+
+ Map<Integer,String> pumpkabooMap = new HashMap<>();
+ pumpkabooMap.put(1,"-M");
+ pumpkabooMap.put(2,"-L");
+ pumpkabooMap.put(3,"-XL");
+ map.put(Species.pumpkaboo, pumpkabooMap);
+
+ Map<Integer,String> gourgeistMap = new HashMap<>();
+ gourgeistMap.put(1,"-M");
+ gourgeistMap.put(2,"-L");
+ gourgeistMap.put(3,"-XL");
+ map.put(Species.gourgeist, gourgeistMap);
+
+ Map<Integer,String> floetteMap = new HashMap<>();
+ floetteMap.put(5,"-E");
+ map.put(Species.floette, floetteMap);
+
+ Map<Integer,String> kyogreMap = new HashMap<>();
+ kyogreMap.put(1,"-P");
+ map.put(Species.kyogre, kyogreMap);
+
+ Map<Integer,String> groudonMap = new HashMap<>();
+ groudonMap.put(1,"-P");
+ map.put(Species.groudon, groudonMap);
+
+ Map<Integer,String> rayquazaMap = new HashMap<>();
+ rayquazaMap.put(1,"-Mega");
+ map.put(Species.rayquaza, rayquazaMap);
+
+ Map<Integer,String> hoopaMap = new HashMap<>();
+ hoopaMap.put(1,"-U");
+ map.put(Species.hoopa, hoopaMap);
+
+ for (Integer species: Gen6Constants.speciesToMegaStoneORAS.keySet()) {
+ Map<Integer,String> megaMap = new HashMap<>();
+ if (species == Species.charizard || species == Species.mewtwo) {
+ megaMap.put(1,"-Mega-X");
+ megaMap.put(2,"-Mega-Y");
+ } else {
+ megaMap.put(1,"-Mega");
+ }
+ map.put(species,megaMap);
+ }
+
+ Map<Integer,String> wishiwashiMap = new HashMap<>();
+ wishiwashiMap.put(1,"-S");
+ map.put(Species.wishiwashi, wishiwashiMap);
+
+ Map<Integer,String> oricorioMap = new HashMap<>();
+ oricorioMap.put(1,"-E");
+ oricorioMap.put(2,"-P");
+ oricorioMap.put(3,"-G");
+ map.put(Species.oricorio, oricorioMap);
+
+ Map<Integer,String> lycanrocMap = new HashMap<>();
+ lycanrocMap.put(1,"-M");
+ lycanrocMap.put(2,"-D");
+ map.put(Species.lycanroc, lycanrocMap);
+
+ for (int species: speciesWithAlolanForms) {
+ Map<Integer,String> alolanMap = new HashMap<>();
+ alolanMap.put(1,"-A");
+ map.put(species, alolanMap);
+ }
+
+ Map<Integer,String> greninjaMap = new HashMap<>();
+ greninjaMap.put(2,"-A");
+ map.put(Species.greninja, greninjaMap);
+
+ Map<Integer,String> zygardeMap = new HashMap<>();
+ zygardeMap.put(1,"-10");
+ zygardeMap.put(4,"-C");
+ map.put(Species.zygarde, zygardeMap);
+
+ Map<Integer,String> miniorMap = new HashMap<>();
+ miniorMap.put(7,"-C");
+ map.put(Species.minior, miniorMap);
+
+ Map<Integer,String> necrozmaMap = new HashMap<>();
+ necrozmaMap.put(1,"-DM");
+ necrozmaMap.put(2,"-DW");
+ necrozmaMap.put(3,"-U");
+ map.put(Species.necrozma, necrozmaMap);
+
+ return map;
+ }
+
+ private static Map<Integer,String> setupDummyFormeSuffixes() {
+ Map<Integer,String> m = new HashMap<>();
+ m.put(0,"");
+ return m;
+ }
+
+ private static List<Integer> actuallyCosmeticFormsSM = Arrays.asList(
+ Species.SMFormes.cherrimCosmetic1,
+ Species.SMFormes.shellosCosmetic1,
+ Species.SMFormes.gastrodonCosmetic1,
+ Species.SMFormes.keldeoCosmetic1,
+ Species.SMFormes.furfrouCosmetic1, Species.SMFormes.furfrouCosmetic2,
+ Species.SMFormes.furfrouCosmetic3, Species.SMFormes.furfrouCosmetic4,
+ Species.SMFormes.furfrouCosmetic5, Species.SMFormes.furfrouCosmetic6,
+ Species.SMFormes.furfrouCosmetic7, Species.SMFormes.furfrouCosmetic8,
+ Species.SMFormes.furfrouCosmetic9,
+ Species.SMFormes.pumpkabooCosmetic1, Species.SMFormes.pumpkabooCosmetic2,
+ Species.SMFormes.pumpkabooCosmetic3,
+ Species.SMFormes.gourgeistCosmetic1, Species.SMFormes.gourgeistCosmetic2,
+ Species.SMFormes.gourgeistCosmetic3,
+ Species.SMFormes.floetteCosmetic1, Species.SMFormes.floetteCosmetic2,
+ Species.SMFormes.floetteCosmetic3, Species.SMFormes.floetteCosmetic4,
+ Species.SMFormes.raticateACosmetic1,
+ Species.SMFormes.mimikyuCosmetic1, Species.SMFormes.mimikyuCosmetic2, Species.SMFormes.mimikyuCosmetic3,
+ Species.SMFormes.gumshoosCosmetic1,
+ Species.SMFormes.vikavoltCosmetic1,
+ Species.SMFormes.lurantisCosmetic1,
+ Species.SMFormes.salazzleCosmetic1,
+ Species.SMFormes.kommoOCosmetic1,
+ Species.SMFormes.greninjaCosmetic1,
+ Species.SMFormes.zygarde10Cosmetic1, Species.SMFormes.zygardeCosmetic1,
+ Species.SMFormes.miniorCosmetic1, Species.SMFormes.miniorCosmetic2, Species.SMFormes.miniorCosmetic3,
+ Species.SMFormes.miniorCosmetic4, Species.SMFormes.miniorCosmetic5, Species.SMFormes.miniorCosmetic6,
+ Species.SMFormes.miniorCCosmetic1, Species.SMFormes.miniorCCosmetic2, Species.SMFormes.miniorCCosmetic3,
+ Species.SMFormes.miniorCCosmetic4, Species.SMFormes.miniorCCosmetic5, Species.SMFormes.miniorCCosmetic6,
+ Species.SMFormes.magearnaCosmetic1,
+ Species.SMFormes.pikachuCosmetic1, Species.SMFormes.pikachuCosmetic2, Species.SMFormes.pikachuCosmetic3,
+ Species.SMFormes.pikachuCosmetic4, Species.SMFormes.pikachuCosmetic5, Species.SMFormes.pikachuCosmetic6 // Pikachu With Funny Hats
+ );
+
+ private static List<Integer> actuallyCosmeticFormsUSUM = Arrays.asList(
+ Species.USUMFormes.cherrimCosmetic1,
+ Species.USUMFormes.shellosCosmetic1,
+ Species.USUMFormes.gastrodonCosmetic1,
+ Species.USUMFormes.keldeoCosmetic1,
+ Species.USUMFormes.furfrouCosmetic1, Species.USUMFormes.furfrouCosmetic2,
+ Species.USUMFormes.furfrouCosmetic3, Species.USUMFormes.furfrouCosmetic4,
+ Species.USUMFormes.furfrouCosmetic5, Species.USUMFormes.furfrouCosmetic6,
+ Species.USUMFormes.furfrouCosmetic7, Species.USUMFormes.furfrouCosmetic8,
+ Species.USUMFormes.furfrouCosmetic9,
+ Species.USUMFormes.pumpkabooCosmetic1, Species.USUMFormes.pumpkabooCosmetic2,
+ Species.USUMFormes.pumpkabooCosmetic3,
+ Species.USUMFormes.gourgeistCosmetic1, Species.USUMFormes.gourgeistCosmetic2,
+ Species.USUMFormes.gourgeistCosmetic3,
+ Species.USUMFormes.floetteCosmetic1, Species.USUMFormes.floetteCosmetic2,
+ Species.USUMFormes.floetteCosmetic3, Species.USUMFormes.floetteCosmetic4,
+ Species.USUMFormes.raticateACosmetic1,
+ Species.USUMFormes.marowakACosmetic1,
+ Species.USUMFormes.mimikyuCosmetic1, Species.USUMFormes.mimikyuCosmetic2, Species.USUMFormes.mimikyuCosmetic3,
+ Species.USUMFormes.gumshoosCosmetic1,
+ Species.USUMFormes.vikavoltCosmetic1,
+ Species.USUMFormes.lurantisCosmetic1,
+ Species.USUMFormes.salazzleCosmetic1,
+ Species.USUMFormes.kommoOCosmetic1,
+ Species.USUMFormes.araquanidCosmetic1,
+ Species.USUMFormes.togedemaruCosmetic1,
+ Species.USUMFormes.ribombeeCosmetic1,
+ Species.USUMFormes.greninjaCosmetic1,
+ Species.USUMFormes.zygarde10Cosmetic1, Species.USUMFormes.zygardeCosmetic1,
+ Species.USUMFormes.miniorCosmetic1, Species.USUMFormes.miniorCosmetic2, Species.USUMFormes.miniorCosmetic3,
+ Species.USUMFormes.miniorCosmetic4, Species.USUMFormes.miniorCosmetic5, Species.USUMFormes.miniorCosmetic6,
+ Species.USUMFormes.miniorCCosmetic1, Species.USUMFormes.miniorCCosmetic2, Species.USUMFormes.miniorCCosmetic3,
+ Species.USUMFormes.miniorCCosmetic4, Species.USUMFormes.miniorCCosmetic5, Species.USUMFormes.miniorCCosmetic6,
+ Species.USUMFormes.magearnaCosmetic1,
+ Species.USUMFormes.pikachuCosmetic1, Species.USUMFormes.pikachuCosmetic2, Species.USUMFormes.pikachuCosmetic3,
+ Species.USUMFormes.pikachuCosmetic4, Species.USUMFormes.pikachuCosmetic5, Species.USUMFormes.pikachuCosmetic6,
+ Species.USUMFormes.pikachuCosmetic7, // Pikachu With Funny Hats
+ Species.USUMFormes.rockruffCosmetic1
+ );
+
+ public static List<Integer> getActuallyCosmeticForms(int romType) {
+ if (romType == Type_SM) {
+ return actuallyCosmeticFormsSM;
+ } else {
+ return actuallyCosmeticFormsUSUM;
+ }
+ }
+
+ private static List<Integer> ignoreFormsSM = Arrays.asList(
+ Species.SMFormes.cherrimCosmetic1,
+ Species.SMFormes.greninjaCosmetic1,
+ Species.SMFormes.zygarde10Cosmetic1,
+ Species.SMFormes.zygardeCosmetic1,
+ Species.SMFormes.miniorCosmetic1,
+ Species.SMFormes.miniorCosmetic2,
+ Species.SMFormes.miniorCosmetic3,
+ Species.SMFormes.miniorCosmetic4,
+ Species.SMFormes.miniorCosmetic5,
+ Species.SMFormes.miniorCosmetic6,
+ Species.SMFormes.mimikyuCosmetic1,
+ Species.SMFormes.mimikyuCosmetic3
+ );
+
+ private static List<Integer> ignoreFormsUSUM = Arrays.asList(
+ Species.USUMFormes.cherrimCosmetic1,
+ Species.USUMFormes.greninjaCosmetic1,
+ Species.USUMFormes.zygarde10Cosmetic1,
+ Species.USUMFormes.zygardeCosmetic1,
+ Species.USUMFormes.miniorCosmetic1,
+ Species.USUMFormes.miniorCosmetic2,
+ Species.USUMFormes.miniorCosmetic3,
+ Species.USUMFormes.miniorCosmetic4,
+ Species.USUMFormes.miniorCosmetic5,
+ Species.USUMFormes.miniorCosmetic6,
+ Species.USUMFormes.mimikyuCosmetic1,
+ Species.USUMFormes.mimikyuCosmetic3,
+ Species.USUMFormes.rockruffCosmetic1
+ );
+
+ public static List<Integer> getIgnoreForms(int romType) {
+ if (romType == Type_SM) {
+ return ignoreFormsSM;
+ } else {
+ return ignoreFormsUSUM;
+ }
+ }
+
+ private static Map<Integer,Integer> altFormesWithCosmeticFormsSM = setupAltFormesWithCosmeticForms(Type_SM);
+ private static Map<Integer,Integer> altFormesWithCosmeticFormsUSUM = setupAltFormesWithCosmeticForms(Type_USUM);
+
+ public static Map<Integer,Integer> getAltFormesWithCosmeticForms(int romType) {
+ if (romType == Type_SM) {
+ return altFormesWithCosmeticFormsSM;
+ } else {
+ return altFormesWithCosmeticFormsUSUM;
+ }
+ }
+
+ private static Map<Integer,Integer> setupAltFormesWithCosmeticForms(int romType) {
+ Map<Integer,Integer> map = new HashMap<>();
+ if (romType == Type_SM) {
+ map.put(Species.SMFormes.raticateA,1); // 1 form (Totem)
+ map.put(Species.SMFormes.zygarde10,1); // 1 form (Power Construct)
+ map.put(Species.SMFormes.miniorC,6); // 6 forms (colors)
+ } else {
+ map.put(Species.USUMFormes.raticateA,1); // 1 form (Totem)
+ map.put(Species.USUMFormes.marowakA,1); // 1 form (Totem)
+ map.put(Species.USUMFormes.zygarde10,1); // 1 form (Power Construct)
+ map.put(Species.USUMFormes.miniorC,6); // 6 forms (colors)
+ }
+
+ return map;
+ }
+
+ private static Type[] constructTypeTable() {
+ Type[] table = new Type[256];
+ table[0x00] = Type.NORMAL;
+ table[0x01] = Type.FIGHTING;
+ table[0x02] = Type.FLYING;
+ table[0x03] = Type.POISON;
+ table[0x04] = Type.GROUND;
+ table[0x05] = Type.ROCK;
+ table[0x06] = Type.BUG;
+ table[0x07] = Type.GHOST;
+ table[0x08] = Type.STEEL;
+ table[0x09] = Type.FIRE;
+ table[0x0A] = Type.WATER;
+ table[0x0B] = Type.GRASS;
+ table[0x0C] = Type.ELECTRIC;
+ table[0x0D] = Type.PSYCHIC;
+ table[0x0E] = Type.ICE;
+ table[0x0F] = Type.DRAGON;
+ table[0x10] = Type.DARK;
+ table[0x11] = Type.FAIRY;
+ return table;
+ }
+
+ public static byte typeToByte(Type type) {
+ if (type == null) {
+ return 0x00; // normal?
+ }
+ switch (type) {
+ case NORMAL:
+ return 0x00;
+ case FIGHTING:
+ return 0x01;
+ case FLYING:
+ return 0x02;
+ case POISON:
+ return 0x03;
+ case GROUND:
+ return 0x04;
+ case ROCK:
+ return 0x05;
+ case BUG:
+ return 0x06;
+ case GHOST:
+ return 0x07;
+ case FIRE:
+ return 0x09;
+ case WATER:
+ return 0x0A;
+ case GRASS:
+ return 0x0B;
+ case ELECTRIC:
+ return 0x0C;
+ case PSYCHIC:
+ return 0x0D;
+ case ICE:
+ return 0x0E;
+ case DRAGON:
+ return 0x0F;
+ case STEEL:
+ return 0x08;
+ case DARK:
+ return 0x10;
+ case FAIRY:
+ return 0x11;
+ default:
+ return 0; // normal by default
+ }
+ }
+
+ private static List<Boolean> setupRelevantEncounterFiles(int romType) {
+ int fileCount = romType == Type_SM ? 2761 : 3696;
+ List<Boolean> list = new ArrayList<>();
+
+ for (int i = 0; i < fileCount; i++) {
+ if (((i - 9) % 11 == 0) || (i % 11 == 0)) {
+ list.add(true);
+ } else {
+ list.add(false);
+ }
+ }
+
+ return list;
+ }
+
+
+ public static Map<Integer, List<Integer>> getHardcodedTradeTextOffsets(int romType) {
+ Map<Integer, List<Integer>> hardcodedTradeTextOffsets = new HashMap<>();
+ if (romType == Gen7Constants.Type_USUM) {
+ // For some reason, the Route 2 trade is hardcoded in USUM but not in SM
+ hardcodedTradeTextOffsets.put(0, Arrays.asList(20, 21, 22));
+ }
+ hardcodedTradeTextOffsets.put(1, Arrays.asList(26, 28, 30));
+ hardcodedTradeTextOffsets.put(2, Arrays.asList(32, 33, 34, 36));
+ hardcodedTradeTextOffsets.put(3, Arrays.asList(38, 39, 40, 42));
+ hardcodedTradeTextOffsets.put(4, Arrays.asList(44, 45, 46, 48));
+ hardcodedTradeTextOffsets.put(5, Arrays.asList(50, 51, 52, 54));
+ hardcodedTradeTextOffsets.put(6, Arrays.asList(56, 57, 58, 60));
+ return hardcodedTradeTextOffsets;
+ }
+
+ public static ItemList allowedItemsSM, allowedItemsUSUM, nonBadItems;
+ public static List<Integer> regularShopItemsSM, regularShopItemsUSUM, opShopItems;
+
+ static {
+ setupAllowedItems();
+ }
+
+ private static void setupAllowedItems() {
+ allowedItemsSM = new ItemList(Items.fairyMemory);
+ // Key items + version exclusives
+ allowedItemsSM.banRange(Items.explorerKit, 76);
+ allowedItemsSM.banRange(Items.dataCard01, 32);
+ allowedItemsSM.banRange(Items.xtransceiverMale, 18);
+ allowedItemsSM.banSingles(Items.expShare, Items.libertyPass, Items.propCase, Items.dragonSkull,
+ Items.lightStone, Items.darkStone);
+ // Unknown blank items or version exclusives
+ allowedItemsSM.banRange(Items.tea, 3);
+ allowedItemsSM.banRange(Items.unused120, 14);
+ // TMs & HMs - tms cant be held in gen7
+ allowedItemsSM.tmRange(Items.tm01, 92);
+ allowedItemsSM.tmRange(Items.tm93, 3);
+ allowedItemsSM.banRange(Items.tm01, 100);
+ allowedItemsSM.banRange(Items.tm93, 3);
+ // Battle Launcher exclusives
+ allowedItemsSM.banRange(Items.direHit2, 24);
+
+ // Key items (Gen 6)
+ allowedItemsSM.banRange(Items.holoCasterMale,3);
+ allowedItemsSM.banSingles(Items.pokeFlute, Items.sprinklotad);
+ allowedItemsSM.banRange(Items.powerPlantPass,4);
+ allowedItemsSM.banRange(Items.elevatorKey,4);
+ allowedItemsSM.banRange(Items.lensCase,3);
+ allowedItemsSM.banRange(Items.lookerTicket,3);
+ allowedItemsSM.banRange(Items.megaCharm,2);
+
+ // TMs (Gen 6)
+ allowedItemsSM.tmRange(Items.tm96,5);
+ allowedItemsSM.banRange(Items.tm96,5);
+
+ // Key items and an HM
+ allowedItemsSM.banRange(Items.machBike,34);
+ allowedItemsSM.banRange(Items.prisonBottle,2);
+ allowedItemsSM.banRange(Items.meteoriteThirdForm,5);
+
+ // Z-Crystals
+ allowedItemsSM.banRange(Items.normaliumZHeld,19);
+ allowedItemsSM.banRange(Items.decidiumZHeld,39);
+
+ // Key Items (Gen 7)
+ allowedItemsSM.banSingles(Items.zRing, Items.sparklingStone, Items.zygardeCube, Items.ridePager,
+ Items.sunFlute, Items.moonFlute, Items.enigmaticCard);
+ allowedItemsSM.banRange(Items.forageBag,3);
+
+ // Unused
+ allowedItemsSM.banSingles(Items.unused848, Items.unused859);
+ allowedItemsSM.banRange(Items.unused837,4);
+ allowedItemsSM.banRange(Items.silverRazzBerry,18);
+ allowedItemsSM.banRange(Items.stretchySpring,19);
+
+ allowedItemsUSUM = allowedItemsSM.copy(Items.rotoCatch);
+
+ // Z-Crystals
+ allowedItemsUSUM.banRange(Items.solganiumZBag,12);
+
+ // Key Items
+ allowedItemsUSUM.banRange(Items.zPowerRing,16);
+
+ // ROTO LOTO
+ allowedItemsUSUM.banRange(Items.rotoHatch,11);
+
+ // non-bad items
+ // ban specific pokemon hold items, berries, apricorns, mail
+ nonBadItems = allowedItemsSM.copy();
+
+ nonBadItems.banSingles(Items.oddKeystone, Items.griseousOrb, Items.soulDew, Items.lightBall,
+ Items.oranBerry, Items.quickPowder, Items.passOrb, Items.discountCoupon, Items.strangeSouvenir,
+ Items.festivalTicket);
+ nonBadItems.banRange(Items.growthMulch, 4); // mulch
+ nonBadItems.banRange(Items.adamantOrb, 2); // orbs
+ nonBadItems.banRange(Items.mail1, 12); // mails
+ nonBadItems.banRange(Items.figyBerry, 25); // berries without useful battle effects
+ nonBadItems.banRange(Items.luckyPunch, 4); // pokemon specific
+ nonBadItems.banRange(Items.redScarf, 5); // contest scarves
+ nonBadItems.banRange(Items.richMulch,4); // more mulch
+ nonBadItems.banRange(Items.gengarite, 30); // Mega Stones, part 1
+ nonBadItems.banRange(Items.swampertite, 13); // Mega Stones, part 2
+ nonBadItems.banRange(Items.cameruptite, 4); // Mega Stones, part 3
+ nonBadItems.banRange(Items.fightingMemory,17); // Memories
+ nonBadItems.banRange(Items.relicCopper,7); // relic items
+ nonBadItems.banSingles(Items.shoalSalt, Items.shoalShell); // Shoal items; have no purpose and sell for $10.
+ nonBadItems.banRange(Items.blueFlute, 5); // Flutes; have no purpose and sell for $10.
+
+ regularShopItemsSM = new ArrayList<>();
+
+ regularShopItemsSM.addAll(IntStream.rangeClosed(Items.ultraBall, Items.pokeBall).boxed().collect(Collectors.toList()));
+ regularShopItemsSM.addAll(IntStream.rangeClosed(Items.potion, Items.revive).boxed().collect(Collectors.toList()));
+ regularShopItemsSM.addAll(IntStream.rangeClosed(Items.superRepel, Items.repel).boxed().collect(Collectors.toList()));
+ regularShopItemsSM.add(Items.honey);
+ regularShopItemsSM.add(Items.adrenalineOrb);
+
+ regularShopItemsUSUM = new ArrayList<>(regularShopItemsSM);
+ regularShopItemsUSUM.add(Items.pokeToy);
+
+ opShopItems = new ArrayList<>();
+
+ // "Money items" etc
+ opShopItems.add(Items.lavaCookie);
+ opShopItems.add(Items.berryJuice);
+ opShopItems.add(Items.rareCandy);
+ opShopItems.add(Items.oldGateau);
+ opShopItems.addAll(IntStream.rangeClosed(Items.tinyMushroom, Items.nugget).boxed().collect(Collectors.toList()));
+ opShopItems.add(Items.rareBone);
+ opShopItems.addAll(IntStream.rangeClosed(Items.lansatBerry, Items.rowapBerry).boxed().collect(Collectors.toList()));
+ opShopItems.add(Items.luckyEgg);
+ opShopItems.add(Items.prettyFeather);
+ opShopItems.addAll(IntStream.rangeClosed(Items.balmMushroom, Items.casteliacone).boxed().collect(Collectors.toList()));
+ }
+
+ public static ItemList getAllowedItems(int romType) {
+ if (romType == Type_SM) {
+ return allowedItemsSM;
+ } else {
+ return allowedItemsUSUM;
+ }
+ }
+
+ private static final List<Integer> requiredFieldTMsSM = Arrays.asList(
+ 80, 49, 5, 83, 64, 62, 100, 31, 46, 88, 57, 41, 59, 73, 53, 61, 28, 39, 55, 86, 30, 93, 81, 84, 74, 85, 72,
+ 3, 3, 13, 36, 91, 79, 24, 97, 50, 99, 35, 2, 26, 6, 6
+ );
+
+ private static final List<Integer> requiredFieldTMsUSUM = Arrays.asList(
+ 49, 5, 83, 64, 23, 100, 79, 24, 31, 46, 88, 41, 59, 32, 53, 61, 28, 39, 57, 86, 30, 62, 81, 80, 74, 85, 73,
+ 72, 3, 3, 84, 13, 36, 91, 55, 97, 50, 93, 93, 99, 35, 2, 26, 6, 6
+ );
+
+ public static List<Integer> getRequiredFieldTMs(int romType) {
+ if (romType == Type_SM) {
+ return requiredFieldTMsSM.stream().distinct().collect(Collectors.toList());
+ } else {
+ return requiredFieldTMsUSUM.stream().distinct().collect(Collectors.toList());
+ }
+ }
+
+ public static void tagTrainersSM(List<Trainer> trs) {
+
+ tag(trs,"ELITE1", 23, 152, 349); // Hala
+ tag(trs,"ELITE2",90, 153, 351); // Olivia
+ tag(trs,"ELITE3", 154, 403); // Nanu
+ tag(trs,"ELITE4", 155, 359); // Hapu
+ tag(trs,"ELITE5", 149, 350); // Acerola
+ tag(trs,"ELITE6", 156, 352); // Kahili
+
+ tag(trs,"RIVAL2-0", 129);
+ tag(trs,"RIVAL2-1", 413);
+ tag(trs,"RIVAL2-2", 414);
+ tagRival(trs,"RIVAL3",477);
+
+ tagRival(trs,"FRIEND1", 6);
+ tagRival(trs,"FRIEND2", 9);
+ tagRival(trs,"FRIEND3", 12);
+ tagRival(trs,"FRIEND4", 76);
+ tagRival(trs,"FRIEND5", 82);
+ tagRival(trs,"FRIEND6", 438);
+ tagRival(trs,"FRIEND7", 217);
+ tagRival(trs,"FRIEND8", 220);
+ tagRival(trs,"FRIEND9", 447);
+ tagRival(trs,"FRIEND10", 450);
+ tagRival(trs,"FRIEND11", 482);
+ tagRival(trs,"FRIEND12", 356);
+
+ tag(trs,"THEMED:GLADION-STRONG", 79, 185, 239, 240, 415, 416, 417, 418, 419, 441);
+ tag(trs,"THEMED:ILIMA-STRONG", 52, 215, 216, 396);
+ tag(trs,"THEMED:LANA-STRONG", 144);
+ tag(trs,"THEMED:KIAWE-STRONG", 398);
+ tag(trs,"THEMED:MALLOW-STRONG", 146);
+ tag(trs,"THEMED:SOPHOCLES-STRONG", 405);
+ tag(trs,"THEMED:MOLAYNE-STRONG", 167, 481);
+ tag(trs,"THEMED:MINA-STRONG", 435, 467);
+ tag(trs,"THEMED:PLUMERIA-STRONG", 89, 238, 401);
+ tag(trs,"THEMED:SINA-STRONG", 75);
+ tag(trs,"THEMED:DEXIO-STRONG", 74, 412);
+ tag(trs,"THEMED:FABA-STRONG",132, 241, 360, 410);
+ tag(trs,"THEMED:GUZMA-LEADER", 138, 235, 236, 400);
+ tag(trs,"THEMED:LUSAMINE-LEADER", 131, 158);
+ }
+
+ public static void tagTrainersUSUM(List<Trainer> trs) {
+
+ tag(trs,"ELITE1", 23, 650); // Hala
+ tag(trs,"ELITE2", 90, 153, 351); // Olivia
+ tag(trs,"ELITE3", 154, 508); // Nanu
+ tag(trs,"ELITE4", 359, 497); // Hapu
+ tag(trs,"ELITE5", 489, 490); // Big Mo
+ tag(trs,"ELITE6", 149, 350); // Acerola
+ tag(trs,"ELITE7", 156, 352); // Kahili
+
+ tagRival(trs,"RIVAL2", 477); // Kukui
+
+ // Hau
+ tagRival(trs,"FRIEND1", 491);
+ tagRival(trs,"FRIEND2", 9);
+ tagRival(trs,"FRIEND3", 12);
+ tagRival(trs,"FRIEND4", 76);
+ tagRival(trs,"FRIEND5", 82);
+ tagRival(trs,"FRIEND6", 438);
+ tagRival(trs,"FRIEND7", 217);
+ tagRival(trs,"FRIEND8", 220);
+ tagRival(trs,"FRIEND9", 447);
+ tagRival(trs,"FRIEND10", 450);
+ tagRival(trs,"FRIEND11", 494);
+ tagRival(trs,"FRIEND12", 356);
+
+ tag(trs,"THEMED:GLADION-STRONG", 79, 185, 239, 240, 415, 416, 417, 418, 419, 441);
+ tag(trs,"THEMED:ILIMA-STRONG", 52, 215, 216, 396, 502);
+ tag(trs,"THEMED:LANA-STRONG", 144, 503);
+ tag(trs,"THEMED:KIAWE-STRONG", 398, 504);
+ tag(trs,"THEMED:MALLOW-STRONG", 146, 505);
+ tag(trs,"THEMED:SOPHOCLES-STRONG", 405, 506);
+ tag(trs,"THEMED:MINA-STRONG", 507);
+ tag(trs,"THEMED:PLUMERIA-STRONG", 89, 238, 401);
+ tag(trs,"THEMED:SINA-STRONG", 75);
+ tag(trs,"THEMED:DEXIO-STRONG", 74, 412, 623);
+ tag(trs,"THEMED:FABA-STRONG", 132, 241, 410, 561);
+ tag(trs,"THEMED:SOLIERA-STRONG", 498, 499, 648, 651);
+ tag(trs,"THEMED:DULSE-STRONG", 500, 501, 649, 652);
+ tag(trs,"THEMED:GUZMA-LEADER", 138, 235, 236, 558, 647);
+ tag(trs,"THEMED:LUSAMINE-LEADER", 131, 644);
+
+ tag(trs,"UBER", 541, 542, 543, 580, 572, 573, 559, 560, 562, 645); // RR Episode
+ }
+
+ private static void tagRival(List<Trainer> allTrainers, String tag, int offset) {
+ allTrainers.get(offset - 1).tag = tag + "-0";
+ allTrainers.get(offset).tag = tag + "-1";
+ allTrainers.get(offset + 1).tag = tag + "-2";
+
+ }
+
+ private static void tag(List<Trainer> allTrainers, int number, String tag) {
+ if (allTrainers.size() > (number - 1)) {
+ allTrainers.get(number - 1).tag = tag;
+ }
+ }
+
+ private static void tag(List<Trainer> allTrainers, String tag, int... numbers) {
+ for (int num : numbers) {
+ if (allTrainers.size() > (num - 1)) {
+ allTrainers.get(num - 1).tag = tag;
+ }
+ }
+ }
+
+ public static void setMultiBattleStatusSM(List<Trainer> trs) {
+ // All Double Battles in Gen 7 are internally treated as a Multi Battle
+ // 92 + 93: Rising Star Duo Justin and Lauren
+ // 97 + 98: Twins Isa and Nico
+ // 134 + 136: Aether Foundation Employees in Secret Lab B w/ Hau
+ // 141 + 227: Team Skull Grunts on Route 17
+ // 241 + 442: Faba and Aether Foundation Employee w/ Hau
+ // 262 + 265: Ace Duo Aimee and Kent
+ // 270 + 299: Swimmers Jake and Yumi
+ // 278 + 280: Honeymooners Noriko and Devin
+ // 303 + 307: Veteran Duo Tsunekazu and Nobuko
+ // 315 + 316: Team Skull Grunts in Po Town
+ // 331 + 332: Karate Family Guy and Samuel
+ // 371 + 372: Twins Harper and Sarah
+ // 373 + 374: Swimmer Girls Ashlyn and Kylie
+ // 375 + 376: Golf Buddies Tara and Tina
+ // 421 + 422: Athletic Siblings Alyssa and Sho
+ // 425 + 426: Punk Pair Lane and Yoko
+ // 429 + 430: Punk Pair Troy and Marie
+ // 443 + 444: Team Skull Grunts in Diglett's Tunnel w/ Hau
+ // 453 + 454: Aether Foundation Employees w/ Hau
+ // 455 + 456: Aether Foundation Employees w/ Gladion
+ setMultiBattleStatus(trs, 92, 93, 97, 98, 134, 136, 141, 227, 241, 262, 265, 270, 278, 280, 299, 303,
+ 307, 315, 316, 331, 332, 371, 372, 373, 374, 375, 376, 421, 422, 425, 426, 429, 430, 442, 443, 444, 453,
+ 454, 455, 456
+ );
+ }
+
+ public static void setMultiBattleStatusUSUM(List<Trainer> trs) {
+ // All Double Battles in Gen 7 are internally treated as a Multi Battle
+ // 92 + 93: Rising Star Duo Justin and Lauren
+ // 97 + 98: Twins Isa and Nico
+ // 134 + 136: Aether Foundation Employees in Secret Lab B w/ Hau
+ // 141 + 227: Team Skull Grunts on Route 17
+ // 178 + 511: Capoeira Couple Cara and Douglas
+ // 241 + 442: Faba and Aether Foundation Employee w/ Hau
+ // 262 + 265: Ace Duo Aimee and Kent
+ // 270 + 299: Swimmers Jake and Yumi
+ // 278 + 280: Honeymooners Noriko and Devin
+ // 303 + 307: Veteran Duo Tsunekazu and Nobuko
+ // 315 + 316: Team Skull Grunts in Po Town
+ // 331 + 332: Karate Family Guy and Samuel
+ // 371 + 372: Twins Harper and Sarah
+ // 373 + 374: Swimmer Girls Ashlyn and Kylie
+ // 375 + 376: Golf Buddies Tara and Tina
+ // 421 + 422: Athletic Siblings Alyssa and Sho
+ // 425 + 426: Punk Pair Lane and Yoko
+ // 429 + 430: Punk Pair Troy and Marie
+ // 443 + 444: Team Skull Grunts in Diglett's Tunnel w/ Hau
+ // 453 + 454: Aether Foundation Employees w/ Hau
+ // 455 + 456: Aether Foundation Employees w/ Gladion
+ // 514 + 521: Tourist Couple Yuriko and Landon
+ // 515 + 534: Tourist Couple Steve and Reika
+ // 529 + 530: Dancing Family Jen and Fumiko
+ // 554 + 561: Aether Foundation Employee and Faba w/ Lillie
+ // 557 + 578: GAME FREAK Iwao and Morimoto
+ // 586 + 595: Team Rainbow Rocket Grunts w/ Guzma
+ // 613 + 626: Master & Apprentice Kaimana and Breon
+ // 617 + 618: Sparring Partners Allon and Eimar
+ // 619 + 620: Sparring Partners Craig and Jason
+ setMultiBattleStatus(trs, 92, 93, 97, 98, 134, 136, 141, 178, 227, 241, 262, 265, 270, 278, 280, 299,
+ 303, 307, 315, 316, 331, 332, 371, 372, 373, 374, 375, 376, 421, 422, 425, 426, 429, 430, 442, 443, 444,
+ 453, 454, 455, 456, 511, 514, 515, 521, 529, 530, 534, 544, 557, 561, 578, 586, 595, 613, 617, 618, 619,
+ 620, 626
+ );
+ }
+
+ private static void setMultiBattleStatus(List<Trainer> allTrainers, int... numbers) {
+ for (int num : numbers) {
+ if (allTrainers.size() > (num - 1)) {
+ allTrainers.get(num - 1).multiBattleStatus = Trainer.MultiBattleStatus.ALWAYS;
+ }
+ }
+ }
+
+ public static void setForcedRivalStarterPositionsUSUM(List<Trainer> allTrainers) {
+
+ // Hau 3
+ allTrainers.get(12 - 1).forceStarterPosition = 0;
+ allTrainers.get(13 - 1).forceStarterPosition = 0;
+ allTrainers.get(14 - 1).forceStarterPosition = 0;
+
+ // Hau 6
+ allTrainers.get(217 - 1).forceStarterPosition = 0;
+ allTrainers.get(218 - 1).forceStarterPosition = 0;
+ allTrainers.get(219 - 1).forceStarterPosition = 0;
+ }
+
+ public static final Map<Integer,Integer> balancedItemPrices = Stream.of(new Integer[][] {
+ // Skip item index 0. All prices divided by 10
+ {Items.masterBall, 300},
+ {Items.ultraBall, 80},
+ {Items.greatBall, 60},
+ {Items.pokeBall, 20},
+ {Items.safariBall, 50},
+ {Items.netBall, 100},
+ {Items.diveBall, 100},
+ {Items.nestBall, 100},
+ {Items.repeatBall, 100},
+ {Items.timerBall, 100},
+ {Items.luxuryBall, 100},
+ {Items.premierBall, 20},
+ {Items.duskBall, 100},
+ {Items.healBall, 30},
+ {Items.quickBall, 100},
+ {Items.cherishBall, 20},
+ {Items.potion, 20},
+ {Items.antidote, 20},
+ {Items.burnHeal, 30},
+ {Items.iceHeal, 10},
+ {Items.awakening, 10},
+ {Items.paralyzeHeal, 30},
+ {Items.fullRestore, 300},
+ {Items.maxPotion, 250},
+ {Items.hyperPotion, 150},
+ {Items.superPotion, 70},
+ {Items.fullHeal, 40},
+ {Items.revive, 200},
+ {Items.maxRevive, 400},
+ {Items.freshWater, 20},
+ {Items.sodaPop, 30},
+ {Items.lemonade, 40},
+ {Items.moomooMilk, 60},
+ {Items.energyPowder, 50},
+ {Items.energyRoot, 120},
+ {Items.healPowder, 30},
+ {Items.revivalHerb, 280},
+ {Items.ether, 300},
+ {Items.maxEther, 450},
+ {Items.elixir, 1500},
+ {Items.maxElixir, 1800},
+ {Items.lavaCookie, 35},
+ {Items.berryJuice, 20},
+ {Items.sacredAsh, 500},
+ {Items.hpUp, 1000},
+ {Items.protein, 1000},
+ {Items.iron, 1000},
+ {Items.carbos, 1000},
+ {Items.calcium, 1000},
+ {Items.rareCandy, 1000},
+ {Items.ppUp, 1000},
+ {Items.zinc, 1000},
+ {Items.ppMax, 2500},
+ {Items.oldGateau, 35},
+ {Items.guardSpec, 150},
+ {Items.direHit, 100},
+ {Items.xAttack, 100},
+ {Items.xDefense, 200},
+ {Items.xSpeed, 100},
+ {Items.xAccuracy, 100},
+ {Items.xSpAtk, 100},
+ {Items.xSpDef, 200},
+ {Items.pokeDoll, 10},
+ {Items.fluffyTail, 10},
+ {Items.blueFlute, 2},
+ {Items.yellowFlute, 2},
+ {Items.redFlute, 2},
+ {Items.blackFlute, 2},
+ {Items.whiteFlute, 2},
+ {Items.shoalSalt, 2},
+ {Items.shoalShell, 2},
+ {Items.redShard, 100},
+ {Items.blueShard, 100},
+ {Items.yellowShard, 100},
+ {Items.greenShard, 100},
+ {Items.superRepel, 70},
+ {Items.maxRepel, 90},
+ {Items.escapeRope, 100},
+ {Items.repel, 40},
+ {Items.sunStone, 300},
+ {Items.moonStone, 300},
+ {Items.fireStone, 300},
+ {Items.thunderStone, 300},
+ {Items.waterStone, 300},
+ {Items.leafStone, 300},
+ {Items.tinyMushroom, 50},
+ {Items.bigMushroom, 500},
+ {Items.pearl, 200},
+ {Items.bigPearl, 800},
+ {Items.stardust, 300},
+ {Items.starPiece, 1200},
+ {Items.nugget, 1000},
+ {Items.heartScale, 500},
+ {Items.honey, 30},
+ {Items.growthMulch, 20},
+ {Items.dampMulch, 20},
+ {Items.stableMulch, 20},
+ {Items.gooeyMulch, 20},
+ {Items.rootFossil, 700},
+ {Items.clawFossil, 700},
+ {Items.helixFossil, 700},
+ {Items.domeFossil, 700},
+ {Items.oldAmber, 1000},
+ {Items.armorFossil, 700},
+ {Items.skullFossil, 700},
+ {Items.rareBone, 500},
+ {Items.shinyStone, 300},
+ {Items.duskStone, 300},
+ {Items.dawnStone, 300},
+ {Items.ovalStone, 200},
+ {Items.oddKeystone, 210},
+ {Items.griseousOrb, 1000},
+ {Items.tea, 0}, // unused in Gen 7
+ {Items.unused114, 0},
+ {Items.autograph, 0},
+ {Items.douseDrive, 100},
+ {Items.shockDrive, 100},
+ {Items.burnDrive, 100},
+ {Items.chillDrive, 100},
+ {Items.unused120, 0},
+ {Items.pokemonBox, 0}, // unused in Gen 7
+ {Items.medicinePocket, 0}, // unused in Gen 7
+ {Items.tmCase, 0}, // unused in Gen 7
+ {Items.candyJar, 0}, // unused in Gen 7
+ {Items.powerUpPocket, 0}, // unused in Gen 7
+ {Items.clothingTrunk, 0}, // unused in Gen 7
+ {Items.catchingPocket, 0}, // unused in Gen 7
+ {Items.battlePocket, 0}, // unused in Gen 7
+ {Items.unused129, 0},
+ {Items.unused130, 0},
+ {Items.unused131, 0},
+ {Items.unused132, 0},
+ {Items.unused133, 0},
+ {Items.sweetHeart, 15},
+ {Items.adamantOrb, 1000},
+ {Items.lustrousOrb, 1000},
+ {Items.mail1, 5},
+ {Items.mail2, 5},
+ {Items.mail3, 5},
+ {Items.mail4, 5},
+ {Items.mail5, 5},
+ {Items.mail6, 5},
+ {Items.mail7, 5},
+ {Items.mail8, 5},
+ {Items.mail9, 5},
+ {Items.mail10, 5},
+ {Items.mail11, 5},
+ {Items.mail12, 5},
+ {Items.cheriBerry, 20},
+ {Items.chestoBerry, 25},
+ {Items.pechaBerry, 10},
+ {Items.rawstBerry, 25},
+ {Items.aspearBerry, 25},
+ {Items.leppaBerry, 300},
+ {Items.oranBerry, 5},
+ {Items.persimBerry, 20},
+ {Items.lumBerry, 50},
+ {Items.sitrusBerry, 50},
+ {Items.figyBerry, 10},
+ {Items.wikiBerry, 10},
+ {Items.magoBerry, 10},
+ {Items.aguavBerry, 10},
+ {Items.iapapaBerry, 10},
+ {Items.razzBerry, 50},
+ {Items.blukBerry, 50},
+ {Items.nanabBerry, 50},
+ {Items.wepearBerry, 50},
+ {Items.pinapBerry, 50},
+ {Items.pomegBerry, 50},
+ {Items.kelpsyBerry, 50},
+ {Items.qualotBerry, 50},
+ {Items.hondewBerry, 50},
+ {Items.grepaBerry, 50},
+ {Items.tamatoBerry, 50},
+ {Items.cornnBerry, 50},
+ {Items.magostBerry, 50},
+ {Items.rabutaBerry, 50},
+ {Items.nomelBerry, 50},
+ {Items.spelonBerry, 50},
+ {Items.pamtreBerry, 50},
+ {Items.watmelBerry, 50},
+ {Items.durinBerry, 50},
+ {Items.belueBerry, 50},
+ {Items.occaBerry, 100},
+ {Items.passhoBerry, 100},
+ {Items.wacanBerry, 100},
+ {Items.rindoBerry, 100},
+ {Items.yacheBerry, 100},
+ {Items.chopleBerry, 100},
+ {Items.kebiaBerry, 100},
+ {Items.shucaBerry, 100},
+ {Items.cobaBerry, 100},
+ {Items.payapaBerry, 100},
+ {Items.tangaBerry, 100},
+ {Items.chartiBerry, 100},
+ {Items.kasibBerry, 100},
+ {Items.habanBerry, 100},
+ {Items.colburBerry, 100},
+ {Items.babiriBerry, 100},
+ {Items.chilanBerry, 100},
+ {Items.liechiBerry, 100},
+ {Items.ganlonBerry, 100},
+ {Items.salacBerry, 100},
+ {Items.petayaBerry, 100},
+ {Items.apicotBerry, 100},
+ {Items.lansatBerry, 100},
+ {Items.starfBerry, 100},
+ {Items.enigmaBerry, 100},
+ {Items.micleBerry, 100},
+ {Items.custapBerry, 100},
+ {Items.jabocaBerry, 100},
+ {Items.rowapBerry, 100},
+ {Items.brightPowder, 400},
+ {Items.whiteHerb, 400},
+ {Items.machoBrace, 300},
+ {Items.expShare, 0},
+ {Items.quickClaw, 450},
+ {Items.sootheBell, 100},
+ {Items.mentalHerb, 100},
+ {Items.choiceBand, 1000},
+ {Items.kingsRock, 500},
+ {Items.silverPowder, 200},
+ {Items.amuletCoin, 1500},
+ {Items.cleanseTag, 100},
+ {Items.soulDew, 20},
+ {Items.deepSeaTooth, 300},
+ {Items.deepSeaScale, 300},
+ {Items.smokeBall, 400},
+ {Items.everstone, 300},
+ {Items.focusBand, 300},
+ {Items.luckyEgg, 1000},
+ {Items.scopeLens, 500},
+ {Items.metalCoat, 300},
+ {Items.leftovers, 1000},
+ {Items.dragonScale, 300},
+ {Items.lightBall, 100},
+ {Items.softSand, 200},
+ {Items.hardStone, 200},
+ {Items.miracleSeed, 200},
+ {Items.blackGlasses, 200},
+ {Items.blackBelt, 200},
+ {Items.magnet, 200},
+ {Items.mysticWater, 200},
+ {Items.sharpBeak, 200},
+ {Items.poisonBarb, 200},
+ {Items.neverMeltIce, 200},
+ {Items.spellTag, 200},
+ {Items.twistedSpoon, 200},
+ {Items.charcoal, 200},
+ {Items.dragonFang, 200},
+ {Items.silkScarf, 200},
+ {Items.upgrade, 300},
+ {Items.shellBell, 600},
+ {Items.seaIncense, 200},
+ {Items.laxIncense, 300},
+ {Items.luckyPunch, 100},
+ {Items.metalPowder, 100},
+ {Items.thickClub, 100},
+ {Items.leek, 100},
+ {Items.redScarf, 10},
+ {Items.blueScarf, 10},
+ {Items.pinkScarf, 10},
+ {Items.greenScarf, 10},
+ {Items.yellowScarf, 10},
+ {Items.wideLens, 150},
+ {Items.muscleBand, 200},
+ {Items.wiseGlasses, 200},
+ {Items.expertBelt, 600},
+ {Items.lightClay, 150},
+ {Items.lifeOrb, 1000},
+ {Items.powerHerb, 100},
+ {Items.toxicOrb, 150},
+ {Items.flameOrb, 150},
+ {Items.quickPowder, 100},
+ {Items.focusSash, 200},
+ {Items.zoomLens, 150},
+ {Items.metronome, 300},
+ {Items.ironBall, 100},
+ {Items.laggingTail, 100},
+ {Items.destinyKnot, 150},
+ {Items.blackSludge, 500},
+ {Items.icyRock, 20},
+ {Items.smoothRock, 20},
+ {Items.heatRock, 20},
+ {Items.dampRock, 20},
+ {Items.gripClaw, 150},
+ {Items.choiceScarf, 1000},
+ {Items.stickyBarb, 150},
+ {Items.powerBracer, 300},
+ {Items.powerBelt, 300},
+ {Items.powerLens, 300},
+ {Items.powerBand, 300},
+ {Items.powerAnklet, 300},
+ {Items.powerWeight, 300},
+ {Items.shedShell, 50},
+ {Items.bigRoot, 150},
+ {Items.choiceSpecs, 1000},
+ {Items.flamePlate, 200},
+ {Items.splashPlate, 200},
+ {Items.zapPlate, 200},
+ {Items.meadowPlate, 200},
+ {Items.iciclePlate, 200},
+ {Items.fistPlate, 200},
+ {Items.toxicPlate, 200},
+ {Items.earthPlate, 200},
+ {Items.skyPlate, 200},
+ {Items.mindPlate, 200},
+ {Items.insectPlate, 200},
+ {Items.stonePlate, 200},
+ {Items.spookyPlate, 200},
+ {Items.dracoPlate, 200},
+ {Items.dreadPlate, 200},
+ {Items.ironPlate, 200},
+ {Items.oddIncense, 200},
+ {Items.rockIncense, 200},
+ {Items.fullIncense, 100},
+ {Items.waveIncense, 200},
+ {Items.roseIncense, 200},
+ {Items.luckIncense, 1500},
+ {Items.pureIncense, 100},
+ {Items.protector, 300},
+ {Items.electirizer, 300},
+ {Items.magmarizer, 300},
+ {Items.dubiousDisc, 300},
+ {Items.reaperCloth, 300},
+ {Items.razorClaw, 500},
+ {Items.razorFang, 500},
+ {Items.tm01, 1000},
+ {Items.tm02, 1000},
+ {Items.tm03, 1000},
+ {Items.tm04, 1000},
+ {Items.tm05, 1000},
+ {Items.tm06, 1000},
+ {Items.tm07, 2000},
+ {Items.tm08, 1000},
+ {Items.tm09, 1000},
+ {Items.tm10, 1000},
+ {Items.tm11, 2000},
+ {Items.tm12, 1000},
+ {Items.tm13, 1000},
+ {Items.tm14, 2000},
+ {Items.tm15, 2000},
+ {Items.tm16, 1000},
+ {Items.tm17, 1000},
+ {Items.tm18, 2000},
+ {Items.tm19, 1000},
+ {Items.tm20, 1000},
+ {Items.tm21, 1000},
+ {Items.tm22, 1000},
+ {Items.tm23, 1000},
+ {Items.tm24, 1000},
+ {Items.tm25, 2000},
+ {Items.tm26, 1000},
+ {Items.tm27, 1000},
+ {Items.tm28, 2000},
+ {Items.tm29, 1000},
+ {Items.tm30, 1000},
+ {Items.tm31, 1000},
+ {Items.tm32, 1000},
+ {Items.tm33, 1000},
+ {Items.tm34, 1000},
+ {Items.tm35, 1000},
+ {Items.tm36, 1000},
+ {Items.tm37, 2000},
+ {Items.tm38, 2000},
+ {Items.tm39, 1000},
+ {Items.tm40, 1000},
+ {Items.tm41, 1000},
+ {Items.tm42, 1000},
+ {Items.tm43, 1000},
+ {Items.tm44, 1000},
+ {Items.tm45, 1000},
+ {Items.tm46, 1000},
+ {Items.tm47, 1000},
+ {Items.tm48, 1000},
+ {Items.tm49, 1000},
+ {Items.tm50, 2000},
+ {Items.tm51, 1000},
+ {Items.tm52, 2000},
+ {Items.tm53, 1000},
+ {Items.tm54, 1000},
+ {Items.tm55, 1000},
+ {Items.tm56, 1000},
+ {Items.tm57, 1000},
+ {Items.tm58, 1000},
+ {Items.tm59, 2000},
+ {Items.tm60, 1000},
+ {Items.tm61, 1000},
+ {Items.tm62, 1000},
+ {Items.tm63, 1000},
+ {Items.tm64, 1000},
+ {Items.tm65, 1000},
+ {Items.tm66, 1000},
+ {Items.tm67, 1000},
+ {Items.tm68, 2000},
+ {Items.tm69, 1000},
+ {Items.tm70, 2000},
+ {Items.tm71, 2000},
+ {Items.tm72, 1000},
+ {Items.tm73, 500},
+ {Items.tm74, 1000},
+ {Items.tm75, 1000},
+ {Items.tm76, 1000},
+ {Items.tm77, 1000},
+ {Items.tm78, 1000},
+ {Items.tm79, 1000},
+ {Items.tm80, 1000},
+ {Items.tm81, 1000},
+ {Items.tm82, 1000},
+ {Items.tm83, 1000},
+ {Items.tm84, 1000},
+ {Items.tm85, 1000},
+ {Items.tm86, 1000},
+ {Items.tm87, 1000},
+ {Items.tm88, 1000},
+ {Items.tm89, 1000},
+ {Items.tm90, 1000},
+ {Items.tm91, 1000},
+ {Items.tm92, 1000},
+ {Items.hm01, 0},
+ {Items.hm02, 0},
+ {Items.hm03, 0},
+ {Items.hm04, 0},
+ {Items.hm05, 0},
+ {Items.hm06, 0},
+ {Items.hm07, 0}, // unused in Gen 7
+ {Items.hm08, 0}, // unused in Gen 7
+ {Items.explorerKit, 0},
+ {Items.lootSack, 0},
+ {Items.ruleBook, 0},
+ {Items.pokeRadar, 0},
+ {Items.pointCard, 0},
+ {Items.journal, 0},
+ {Items.sealCase, 0},
+ {Items.fashionCase, 0},
+ {Items.sealBag, 0},
+ {Items.palPad, 0},
+ {Items.worksKey, 0},
+ {Items.oldCharm, 0},
+ {Items.galacticKey, 0},
+ {Items.redChain, 0},
+ {Items.townMap, 0},
+ {Items.vsSeeker, 0},
+ {Items.coinCase, 0},
+ {Items.oldRod, 0},
+ {Items.goodRod, 0},
+ {Items.superRod, 0},
+ {Items.sprayduck, 0},
+ {Items.poffinCase, 0},
+ {Items.bike, 0},
+ {Items.suiteKey, 0},
+ {Items.oaksLetter, 0},
+ {Items.lunarWing, 0},
+ {Items.memberCard, 0},
+ {Items.azureFlute, 0},
+ {Items.ssTicketJohto, 0},
+ {Items.contestPass, 0},
+ {Items.magmaStone, 0},
+ {Items.parcelSinnoh, 0},
+ {Items.coupon1, 0},
+ {Items.coupon2, 0},
+ {Items.coupon3, 0},
+ {Items.storageKeySinnoh, 0},
+ {Items.secretPotion, 0},
+ {Items.vsRecorder, 0},
+ {Items.gracidea, 0},
+ {Items.secretKeySinnoh, 0},
+ {Items.apricornBox, 0},
+ {Items.unownReport, 0},
+ {Items.berryPots, 0},
+ {Items.dowsingMachine, 0},
+ {Items.blueCard, 0},
+ {Items.slowpokeTail, 0},
+ {Items.clearBell, 0},
+ {Items.cardKeyJohto, 0},
+ {Items.basementKeyJohto, 0},
+ {Items.squirtBottle, 0},
+ {Items.redScale, 0},
+ {Items.lostItem, 0},
+ {Items.pass, 0},
+ {Items.machinePart, 0},
+ {Items.silverWing, 0},
+ {Items.rainbowWing, 0},
+ {Items.mysteryEgg, 0},
+ {Items.redApricorn, 2},
+ {Items.blueApricorn, 2},
+ {Items.yellowApricorn, 2},
+ {Items.greenApricorn, 2},
+ {Items.pinkApricorn, 2},
+ {Items.whiteApricorn, 2},
+ {Items.blackApricorn, 2},
+ {Items.fastBall, 30},
+ {Items.levelBall, 30},
+ {Items.lureBall, 30},
+ {Items.heavyBall, 30},
+ {Items.loveBall, 30},
+ {Items.friendBall, 30},
+ {Items.moonBall, 30},
+ {Items.sportBall, 30},
+ {Items.parkBall, 0},
+ {Items.photoAlbum, 0},
+ {Items.gbSounds, 0},
+ {Items.tidalBell, 0},
+ {Items.rageCandyBar, 35},
+ {Items.dataCard01, 0},
+ {Items.dataCard02, 0},
+ {Items.dataCard03, 0},
+ {Items.dataCard04, 0},
+ {Items.dataCard05, 0},
+ {Items.dataCard06, 0},
+ {Items.dataCard07, 0},
+ {Items.dataCard08, 0},
+ {Items.dataCard09, 0},
+ {Items.dataCard10, 0},
+ {Items.dataCard11, 0},
+ {Items.dataCard12, 0},
+ {Items.dataCard13, 0},
+ {Items.dataCard14, 0},
+ {Items.dataCard15, 0},
+ {Items.dataCard16, 0},
+ {Items.dataCard17, 0},
+ {Items.dataCard18, 0},
+ {Items.dataCard19, 0},
+ {Items.dataCard20, 0},
+ {Items.dataCard21, 0},
+ {Items.dataCard22, 0},
+ {Items.dataCard23, 0},
+ {Items.dataCard24, 0},
+ {Items.dataCard25, 0},
+ {Items.dataCard26, 0},
+ {Items.dataCard27, 0},
+ {Items.jadeOrb, 0},
+ {Items.lockCapsule, 0},
+ {Items.redOrb, 0},
+ {Items.blueOrb, 0},
+ {Items.enigmaStone, 0},
+ {Items.prismScale, 300},
+ {Items.eviolite, 1000},
+ {Items.floatStone, 100},
+ {Items.rockyHelmet, 600},
+ {Items.airBalloon, 100},
+ {Items.redCard, 100},
+ {Items.ringTarget, 100},
+ {Items.bindingBand, 200},
+ {Items.absorbBulb, 100},
+ {Items.cellBattery, 100},
+ {Items.ejectButton, 100},
+ {Items.fireGem, 100},
+ {Items.waterGem, 100},
+ {Items.electricGem, 100},
+ {Items.grassGem, 100},
+ {Items.iceGem, 100},
+ {Items.fightingGem, 100},
+ {Items.poisonGem, 100},
+ {Items.groundGem, 100},
+ {Items.flyingGem, 100},
+ {Items.psychicGem, 100},
+ {Items.bugGem, 100},
+ {Items.rockGem, 100},
+ {Items.ghostGem, 100},
+ {Items.dragonGem, 100},
+ {Items.darkGem, 100},
+ {Items.steelGem, 100},
+ {Items.normalGem, 100},
+ {Items.healthFeather, 30},
+ {Items.muscleFeather, 30},
+ {Items.resistFeather, 30},
+ {Items.geniusFeather, 30},
+ {Items.cleverFeather, 30},
+ {Items.swiftFeather, 30},
+ {Items.prettyFeather, 100},
+ {Items.coverFossil, 700},
+ {Items.plumeFossil, 700},
+ {Items.libertyPass, 0},
+ {Items.passOrb, 20},
+ {Items.dreamBall, 100},
+ {Items.pokeToy, 10},
+ {Items.propCase, 0},
+ {Items.dragonSkull, 0},
+ {Items.balmMushroom, 1500},
+ {Items.bigNugget, 4000},
+ {Items.pearlString, 3000},
+ {Items.cometShard, 6000},
+ {Items.relicCopper, 0},
+ {Items.relicSilver, 0},
+ {Items.relicGold, 0},
+ {Items.relicVase, 0},
+ {Items.relicBand, 0},
+ {Items.relicStatue, 0},
+ {Items.relicCrown, 0},
+ {Items.casteliacone, 35},
+ {Items.direHit2, 0},
+ {Items.xSpeed2, 0},
+ {Items.xSpAtk2, 0},
+ {Items.xSpDef2, 0},
+ {Items.xDefense2, 0},
+ {Items.xAttack2, 0},
+ {Items.xAccuracy2, 0},
+ {Items.xSpeed3, 0},
+ {Items.xSpAtk3, 0},
+ {Items.xSpDef3, 0},
+ {Items.xDefense3, 0},
+ {Items.xAttack3, 0},
+ {Items.xAccuracy3, 0},
+ {Items.xSpeed6, 0},
+ {Items.xSpAtk6, 0},
+ {Items.xSpDef6, 0},
+ {Items.xDefense6, 0},
+ {Items.xAttack6, 0},
+ {Items.xAccuracy6, 0},
+ {Items.abilityUrge, 0},
+ {Items.itemDrop, 0},
+ {Items.itemUrge, 0},
+ {Items.resetUrge, 0},
+ {Items.direHit3, 0},
+ {Items.lightStone, 0},
+ {Items.darkStone, 0},
+ {Items.tm93, 2000},
+ {Items.tm94, 2000},
+ {Items.tm95, 1000},
+ {Items.xtransceiverMale, 0},
+ {Items.unused622, 0},
+ {Items.gram1, 0},
+ {Items.gram2, 0},
+ {Items.gram3, 0},
+ {Items.xtransceiverFemale, 0},
+ {Items.medalBox, 0},
+ {Items.dNASplicersFuse, 0},
+ {Items.dNASplicersSeparate, 0},
+ {Items.permit, 0},
+ {Items.ovalCharm, 0},
+ {Items.shinyCharm, 0},
+ {Items.plasmaCard, 0},
+ {Items.grubbyHanky, 0},
+ {Items.colressMachine, 0},
+ {Items.droppedItemCurtis, 0},
+ {Items.droppedItemYancy, 0},
+ {Items.revealGlass, 0},
+ {Items.weaknessPolicy, 200},
+ {Items.assaultVest, 600},
+ {Items.holoCasterMale, 0},
+ {Items.profsLetter, 0},
+ {Items.rollerSkates, 0},
+ {Items.pixiePlate, 200},
+ {Items.abilityCapsule, 500},
+ {Items.whippedDream, 300},
+ {Items.sachet, 300},
+ {Items.luminousMoss, 20},
+ {Items.snowball, 20},
+ {Items.safetyGoggles, 300},
+ {Items.pokeFlute, 0},
+ {Items.richMulch, 20},
+ {Items.surpriseMulch, 20},
+ {Items.boostMulch, 20},
+ {Items.amazeMulch, 20},
+ {Items.gengarite, 1000},
+ {Items.gardevoirite, 1000},
+ {Items.ampharosite, 1000},
+ {Items.venusaurite, 1000},
+ {Items.charizarditeX, 1000},
+ {Items.blastoisinite, 1000},
+ {Items.mewtwoniteX, 2000},
+ {Items.mewtwoniteY, 2000},
+ {Items.blazikenite, 1000},
+ {Items.medichamite, 500},
+ {Items.houndoominite, 1000},
+ {Items.aggronite, 1000},
+ {Items.banettite, 500},
+ {Items.tyranitarite, 2000},
+ {Items.scizorite, 1000},
+ {Items.pinsirite, 1000},
+ {Items.aerodactylite, 1000},
+ {Items.lucarionite, 1000},
+ {Items.abomasite, 500},
+ {Items.kangaskhanite, 500},
+ {Items.gyaradosite, 1000},
+ {Items.absolite, 500},
+ {Items.charizarditeY, 1000},
+ {Items.alakazite, 1000},
+ {Items.heracronite, 1000},
+ {Items.mawilite, 300},
+ {Items.manectite, 500},
+ {Items.garchompite, 2000},
+ {Items.latiasite, 2000},
+ {Items.latiosite, 2000},
+ {Items.roseliBerry, 100},
+ {Items.keeBerry, 100},
+ {Items.marangaBerry, 100},
+ {Items.sprinklotad, 0},
+ {Items.tm96, 1000},
+ {Items.tm97, 1000},
+ {Items.tm98, 2000},
+ {Items.tm99, 1000},
+ {Items.tm100, 500},
+ {Items.powerPlantPass, 0},
+ {Items.megaRing, 0},
+ {Items.intriguingStone, 0},
+ {Items.commonStone, 0},
+ {Items.discountCoupon, 2},
+ {Items.elevatorKey, 0},
+ {Items.tmvPass, 0},
+ {Items.honorofKalos, 0},
+ {Items.adventureGuide, 0},
+ {Items.strangeSouvenir, 300},
+ {Items.lensCase, 0},
+ {Items.makeupBag, 0},
+ {Items.travelTrunk, 0},
+ {Items.lumioseGalette, 35},
+ {Items.shalourSable, 35},
+ {Items.jawFossil, 700},
+ {Items.sailFossil, 700},
+ {Items.lookerTicket, 0},
+ {Items.bikeYellow, 0},
+ {Items.holoCasterFemale, 0},
+ {Items.fairyGem, 100},
+ {Items.megaCharm, 0},
+ {Items.megaGlove, 0},
+ {Items.machBike, 0},
+ {Items.acroBike, 0},
+ {Items.wailmerPail, 0},
+ {Items.devonParts, 0},
+ {Items.sootSack, 0},
+ {Items.basementKeyHoenn, 0},
+ {Items.pokeblockKit, 0},
+ {Items.letter, 0},
+ {Items.eonTicket, 0},
+ {Items.scanner, 0},
+ {Items.goGoggles, 0},
+ {Items.meteoriteFirstForm, 0},
+ {Items.keytoRoom1, 0},
+ {Items.keytoRoom2, 0},
+ {Items.keytoRoom4, 0},
+ {Items.keytoRoom6, 0},
+ {Items.storageKeyHoenn, 0},
+ {Items.devonScope, 0},
+ {Items.ssTicketHoenn, 0},
+ {Items.hm07ORAS, 0},
+ {Items.devonScubaGear, 0},
+ {Items.contestCostumeMale, 0},
+ {Items.contestCostumeFemale, 0},
+ {Items.magmaSuit, 0},
+ {Items.aquaSuit, 0},
+ {Items.pairOfTickets, 0},
+ {Items.megaBracelet, 0},
+ {Items.megaPendant, 0},
+ {Items.megaGlasses, 0},
+ {Items.megaAnchor, 0},
+ {Items.megaStickpin, 0},
+ {Items.megaTiara, 0},
+ {Items.megaAnklet, 0},
+ {Items.meteoriteSecondForm, 0},
+ {Items.swampertite, 1000},
+ {Items.sceptilite, 1000},
+ {Items.sablenite, 300},
+ {Items.altarianite, 500},
+ {Items.galladite, 1000},
+ {Items.audinite, 500},
+ {Items.metagrossite, 2000},
+ {Items.sharpedonite, 500},
+ {Items.slowbronite, 500},
+ {Items.steelixite, 1000},
+ {Items.pidgeotite, 500},
+ {Items.glalitite, 500},
+ {Items.diancite, 2000},
+ {Items.prisonBottle, 0},
+ {Items.megaCuff, 0},
+ {Items.cameruptite, 500},
+ {Items.lopunnite, 500},
+ {Items.salamencite, 2000},
+ {Items.beedrillite, 300},
+ {Items.meteoriteThirdForm, 0},
+ {Items.meteoriteFinalForm, 0},
+ {Items.keyStone, 0},
+ {Items.meteoriteShard, 0},
+ {Items.eonFlute, 0},
+ {Items.normaliumZHeld, 0},
+ {Items.firiumZHeld, 0},
+ {Items.wateriumZHeld, 0},
+ {Items.electriumZHeld, 0},
+ {Items.grassiumZHeld, 0},
+ {Items.iciumZHeld, 0},
+ {Items.fightiniumZHeld, 0},
+ {Items.poisoniumZHeld, 0},
+ {Items.groundiumZHeld, 0},
+ {Items.flyiniumZHeld, 0},
+ {Items.psychiumZHeld, 0},
+ {Items.buginiumZHeld, 0},
+ {Items.rockiumZHeld, 0},
+ {Items.ghostiumZHeld, 0},
+ {Items.dragoniumZHeld, 0},
+ {Items.darkiniumZHeld, 0},
+ {Items.steeliumZHeld, 0},
+ {Items.fairiumZHeld, 0},
+ {Items.pikaniumZHeld, 0},
+ {Items.bottleCap, 500},
+ {Items.goldBottleCap, 1000},
+ {Items.zRing, 0},
+ {Items.decidiumZHeld, 0},
+ {Items.inciniumZHeld, 0},
+ {Items.primariumZHeld, 0},
+ {Items.tapuniumZHeld, 0},
+ {Items.marshadiumZHeld, 0},
+ {Items.aloraichiumZHeld, 0},
+ {Items.snorliumZHeld, 0},
+ {Items.eeviumZHeld, 0},
+ {Items.mewniumZHeld, 0},
+ {Items.normaliumZBag, 0},
+ {Items.firiumZBag, 0},
+ {Items.wateriumZBag, 0},
+ {Items.electriumZBag, 0},
+ {Items.grassiumZBag, 0},
+ {Items.iciumZBag, 0},
+ {Items.fightiniumZBag, 0},
+ {Items.poisoniumZBag, 0},
+ {Items.groundiumZBag, 0},
+ {Items.flyiniumZBag, 0},
+ {Items.psychiumZBag, 0},
+ {Items.buginiumZBag, 0},
+ {Items.rockiumZBag, 0},
+ {Items.ghostiumZBag, 0},
+ {Items.dragoniumZBag, 0},
+ {Items.darkiniumZBag, 0},
+ {Items.steeliumZBag, 0},
+ {Items.fairiumZBag, 0},
+ {Items.pikaniumZBag, 0},
+ {Items.decidiumZBag, 0},
+ {Items.inciniumZBag, 0},
+ {Items.primariumZBag, 0},
+ {Items.tapuniumZBag, 0},
+ {Items.marshadiumZBag, 0},
+ {Items.aloraichiumZBag, 0},
+ {Items.snorliumZBag, 0},
+ {Items.eeviumZBag, 0},
+ {Items.mewniumZBag, 0},
+ {Items.pikashuniumZHeld, 0},
+ {Items.pikashuniumZBag, 0},
+ {Items.unused837, 0},
+ {Items.unused838, 0},
+ {Items.unused839, 0},
+ {Items.unused840, 0},
+ {Items.forageBag, 0},
+ {Items.fishingRod, 0},
+ {Items.professorsMask, 0},
+ {Items.festivalTicket, 1},
+ {Items.sparklingStone, 0},
+ {Items.adrenalineOrb, 30},
+ {Items.zygardeCube, 0},
+ {Items.unused848, 0},
+ {Items.iceStone, 300},
+ {Items.ridePager, 0},
+ {Items.beastBall, 30},
+ {Items.bigMalasada, 35},
+ {Items.redNectar, 30},
+ {Items.yellowNectar, 30},
+ {Items.pinkNectar, 30},
+ {Items.purpleNectar, 30},
+ {Items.sunFlute, 0},
+ {Items.moonFlute, 0},
+ {Items.unused859, 0},
+ {Items.enigmaticCard, 0},
+ {Items.silverRazzBerry, 0}, // unused in Gen 7
+ {Items.goldenRazzBerry, 0}, // unused in Gen 7
+ {Items.silverNanabBerry, 0}, // unused in Gen 7
+ {Items.goldenNanabBerry, 0}, // unused in Gen 7
+ {Items.silverPinapBerry, 0}, // unused in Gen 7
+ {Items.goldenPinapBerry, 0}, // unused in Gen 7
+ {Items.unused867, 0},
+ {Items.unused868, 0},
+ {Items.unused869, 0},
+ {Items.unused870, 0},
+ {Items.unused871, 0},
+ {Items.secretKeyKanto, 0}, // unused in Gen 7
+ {Items.ssTicketKanto, 0}, // unused in Gen 7
+ {Items.silphScope, 0}, // unused in Gen 7
+ {Items.parcelKanto, 0}, // unused in Gen 7
+ {Items.cardKeyKanto, 0}, // unused in Gen 7
+ {Items.goldTeeth, 0}, // unused in Gen 7
+ {Items.liftKey, 0}, // unused in Gen 7
+ {Items.terrainExtender, 400},
+ {Items.protectivePads, 300},
+ {Items.electricSeed, 100},
+ {Items.psychicSeed, 100},
+ {Items.mistySeed, 100},
+ {Items.grassySeed, 100},
+ {Items.stretchySpring, 0}, // unused in Gen 7
+ {Items.chalkyStone, 0}, // unused in Gen 7
+ {Items.marble, 0}, // unused in Gen 7
+ {Items.loneEarring, 0}, // unused in Gen 7
+ {Items.beachGlass, 0}, // unused in Gen 7
+ {Items.goldLeaf, 0}, // unused in Gen 7
+ {Items.silverLeaf, 0}, // unused in Gen 7
+ {Items.polishedMudBall, 0}, // unused in Gen 7
+ {Items.tropicalShell, 0}, // unused in Gen 7
+ {Items.leafLetterPikachu, 0}, // unused in Gen 7
+ {Items.leafLetterEevee, 0}, // unused in Gen 7
+ {Items.smallBouquet, 0}, // unused in Gen 7
+ {Items.unused897, 0},
+ {Items.unused898, 0},
+ {Items.unused899, 0},
+ {Items.lure, 0}, // unused in Gen 7
+ {Items.superLure, 0}, // unused in Gen 7
+ {Items.maxLure, 0}, // unused in Gen 7
+ {Items.pewterCrunchies, 0}, // unused in Gen 7
+ {Items.fightingMemory, 100},
+ {Items.flyingMemory, 100},
+ {Items.poisonMemory, 100},
+ {Items.groundMemory, 100},
+ {Items.rockMemory, 100},
+ {Items.bugMemory, 100},
+ {Items.ghostMemory, 100},
+ {Items.steelMemory, 100},
+ {Items.fireMemory, 100},
+ {Items.waterMemory, 100},
+ {Items.grassMemory, 100},
+ {Items.electricMemory, 100},
+ {Items.psychicMemory, 100},
+ {Items.iceMemory, 100},
+ {Items.dragonMemory, 100},
+ {Items.darkMemory, 100},
+ {Items.fairyMemory, 100},
+ {Items.solganiumZBag, 0},
+ {Items.lunaliumZBag, 0},
+ {Items.ultranecroziumZBag, 0},
+ {Items.mimikiumZHeld, 0},
+ {Items.lycaniumZHeld, 0},
+ {Items.kommoniumZHeld, 0},
+ {Items.solganiumZHeld, 0},
+ {Items.lunaliumZHeld, 0},
+ {Items.ultranecroziumZHeld, 0},
+ {Items.mimikiumZBag, 0},
+ {Items.lycaniumZBag, 0},
+ {Items.kommoniumZBag, 0},
+ {Items.zPowerRing, 0},
+ {Items.pinkPetal, 0},
+ {Items.orangePetal, 0},
+ {Items.bluePetal, 0},
+ {Items.redPetal, 0},
+ {Items.greenPetal, 0},
+ {Items.yellowPetal, 0},
+ {Items.purplePetal, 0},
+ {Items.rainbowFlower, 0},
+ {Items.surgeBadge, 0},
+ {Items.nSolarizerFuse, 0},
+ {Items.nLunarizerFuse, 0},
+ {Items.nSolarizerSeparate, 0},
+ {Items.nLunarizerSeparate, 0},
+ {Items.ilimaNormaliumZ, 0},
+ {Items.leftPokeBall, 0},
+ {Items.rotoHatch, 0},
+ {Items.rotoBargain, 0},
+ {Items.rotoPrizeMoney, 0},
+ {Items.rotoExpPoints, 0},
+ {Items.rotoFriendship, 0},
+ {Items.rotoEncounter, 0},
+ {Items.rotoStealth, 0},
+ {Items.rotoHPRestore, 0},
+ {Items.rotoPPRestore, 0},
+ {Items.rotoBoost, 0},
+ {Items.rotoCatch, 0},
+ }).collect(Collectors.toMap(kv -> kv[0], kv -> kv[1]));
+}
diff --git a/src/com/pkrandom/constants/GlobalConstants.java b/src/com/pkrandom/constants/GlobalConstants.java
new file mode 100644
index 0000000..c4d1352
--- /dev/null
+++ b/src/com/pkrandom/constants/GlobalConstants.java
@@ -0,0 +1,252 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- GlobalConstants.java - constants that are relevant for multiple games --*/
+/*-- in the Pokemon series --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+import com.pkrandom.pokemon.*;
+
+import java.util.*;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+public class GlobalConstants {
+
+ public static final boolean[] bannedRandomMoves = new boolean[827], bannedForDamagingMove = new boolean[827];
+ static {
+ bannedRandomMoves[Moves.struggle] = true; // self explanatory
+
+ bannedForDamagingMove[Moves.selfDestruct] = true;
+ bannedForDamagingMove[Moves.dreamEater] = true;
+ bannedForDamagingMove[Moves.explosion] = true;
+ bannedForDamagingMove[Moves.snore] = true;
+ bannedForDamagingMove[Moves.falseSwipe] = true;
+ bannedForDamagingMove[Moves.futureSight] = true;
+ bannedForDamagingMove[Moves.fakeOut] = true;
+ bannedForDamagingMove[Moves.focusPunch] = true;
+ bannedForDamagingMove[Moves.doomDesire] = true;
+ bannedForDamagingMove[Moves.feint] = true;
+ bannedForDamagingMove[Moves.lastResort] = true;
+ bannedForDamagingMove[Moves.suckerPunch] = true;
+ bannedForDamagingMove[Moves.constrict] = true; // overly weak
+ bannedForDamagingMove[Moves.rage] = true; // lock-in in gen1
+ bannedForDamagingMove[Moves.rollout] = true; // lock-in
+ bannedForDamagingMove[Moves.iceBall] = true; // Rollout clone
+ bannedForDamagingMove[Moves.synchronoise] = true; // hard to use
+ bannedForDamagingMove[Moves.shellTrap] = true; // hard to use
+ bannedForDamagingMove[Moves.foulPlay] = true; // doesn't depend on your own attacking stat
+ bannedForDamagingMove[Moves.spitUp] = true; // hard to use
+
+ // make sure these cant roll
+ bannedForDamagingMove[Moves.sonicBoom] = true;
+ bannedForDamagingMove[Moves.dragonRage] = true;
+ bannedForDamagingMove[Moves.hornDrill] = true;
+ bannedForDamagingMove[Moves.guillotine] = true;
+ bannedForDamagingMove[Moves.fissure] = true;
+ bannedForDamagingMove[Moves.sheerCold] = true;
+
+ }
+
+ /* @formatter:off */
+ public static final List<Integer> normalMultihitMoves = Arrays.asList(
+ Moves.armThrust, Moves.barrage, Moves.boneRush, Moves.bulletSeed, Moves.cometPunch, Moves.doubleSlap,
+ Moves.furyAttack, Moves.furySwipes, Moves.icicleSpear, Moves.pinMissile, Moves.rockBlast, Moves.spikeCannon,
+ Moves.tailSlap, Moves.waterShuriken);
+
+ public static final List<Integer> doubleHitMoves = Arrays.asList(
+ Moves.bonemerang, Moves.doubleHit, Moves.doubleIronBash, Moves.doubleKick, Moves.dragonDarts,
+ Moves.dualChop, Moves.gearGrind, Moves.twineedle);
+
+ public static final List<Integer> varyingPowerZMoves = Arrays.asList(
+ Moves.breakneckBlitzPhysical, Moves.breakneckBlitzSpecial,
+ Moves.allOutPummelingPhysical, Moves.allOutPummelingSpecial,
+ Moves.supersonicSkystrikePhysical, Moves.supersonicSkystrikeSpecial,
+ Moves.acidDownpourPhysical, Moves.acidDownpourSpecial,
+ Moves.tectonicRagePhysical, Moves.tectonicRageSpecial,
+ Moves.continentalCrushPhysical, Moves.continentalCrushSpecial,
+ Moves.savageSpinOutPhysical, Moves.savageSpinOutSpecial,
+ Moves.neverEndingNightmarePhysical, Moves.neverEndingNightmareSpecial,
+ Moves.corkscrewCrashPhysical, Moves.corkscrewCrashSpecial,
+ Moves.infernoOverdrivePhysical, Moves.infernoOverdriveSpecial,
+ Moves.hydroVortexPhysical, Moves.hydroVortexSpecial,
+ Moves.bloomDoomPhysical, Moves.bloomDoomSpecial,
+ Moves.gigavoltHavocPhysical, Moves.gigavoltHavocSpecial,
+ Moves.shatteredPsychePhysical, Moves.shatteredPsycheSpecial,
+ Moves.subzeroSlammerPhysical, Moves.subzeroSlammerSpecial,
+ Moves.devastatingDrakePhysical, Moves.devastatingDrakeSpecial,
+ Moves.blackHoleEclipsePhysical, Moves.blackHoleEclipseSpecial,
+ Moves.twinkleTacklePhysical, Moves.twinkleTackleSpecial);
+
+ public static final List<Integer> fixedPowerZMoves = Arrays.asList(
+ Moves.catastropika, Moves.sinisterArrowRaid, Moves.maliciousMoonsault, Moves.oceanicOperetta,
+ Moves.guardianOfAlola, Moves.soulStealing7StarStrike, Moves.stokedSparksurfer, Moves.pulverizingPancake,
+ Moves.extremeEvoboost, Moves.genesisSupernova, Moves.tenMillionVoltThunderbolt, Moves.lightThatBurnsTheSky,
+ Moves.searingSunrazeSmash, Moves.menacingMoonrazeMaelstrom, Moves.letsSnuggleForever,
+ Moves.splinteredStormshards, Moves.clangorousSoulblaze);
+
+ public static final List<Integer> zMoves = Stream.concat(fixedPowerZMoves.stream(),
+ varyingPowerZMoves.stream()).collect(Collectors.toList());
+
+ public static Map<Integer,StatChange> getStatChanges(int generation) {
+ Map<Integer,StatChange> map = new TreeMap<>();
+
+ switch(generation) {
+ case 6:
+ map.put(Species.butterfree,new StatChange(Stat.SPATK.val,90));
+ map.put(Species.beedrill,new StatChange(Stat.ATK.val,90));
+ map.put(Species.pidgeot,new StatChange(Stat.SPEED.val,101));
+ map.put(Species.pikachu,new StatChange(Stat.DEF.val | Stat.SPDEF.val,40, 50));
+ map.put(Species.raichu,new StatChange(Stat.SPEED.val,110));
+ map.put(Species.nidoqueen,new StatChange(Stat.ATK.val,92));
+ map.put(Species.nidoking,new StatChange(Stat.ATK.val,102));
+ map.put(Species.clefable,new StatChange(Stat.SPATK.val,95));
+ map.put(Species.wigglytuff,new StatChange(Stat.SPATK.val,85));
+ map.put(Species.vileplume,new StatChange(Stat.SPATK.val,110));
+ map.put(Species.poliwrath,new StatChange(Stat.ATK.val,95));
+ map.put(Species.alakazam,new StatChange(Stat.SPDEF.val,95));
+ map.put(Species.victreebel,new StatChange(Stat.SPDEF.val,70));
+ map.put(Species.golem,new StatChange(Stat.ATK.val,120));
+ map.put(Species.ampharos,new StatChange(Stat.DEF.val,85));
+ map.put(Species.bellossom,new StatChange(Stat.DEF.val,95));
+ map.put(Species.azumarill,new StatChange(Stat.SPATK.val,60));
+ map.put(Species.jumpluff,new StatChange(Stat.SPDEF.val,95));
+ map.put(Species.beautifly,new StatChange(Stat.SPATK.val,100));
+ map.put(Species.exploud,new StatChange(Stat.SPDEF.val,73));
+ map.put(Species.staraptor,new StatChange(Stat.SPDEF.val,60));
+ map.put(Species.roserade,new StatChange(Stat.DEF.val,65));
+ map.put(Species.stoutland,new StatChange(Stat.ATK.val,110));
+ map.put(Species.unfezant,new StatChange(Stat.ATK.val,115));
+ map.put(Species.gigalith,new StatChange(Stat.SPDEF.val,80));
+ map.put(Species.seismitoad,new StatChange(Stat.ATK.val,95));
+ map.put(Species.leavanny,new StatChange(Stat.SPDEF.val,80));
+ map.put(Species.scolipede,new StatChange(Stat.ATK.val,100));
+ map.put(Species.krookodile,new StatChange(Stat.DEF.val,80));
+ break;
+ case 7:
+ map.put(Species.arbok,new StatChange(Stat.ATK.val,95));
+ map.put(Species.dugtrio,new StatChange(Stat.ATK.val,100));
+ map.put(Species.farfetchd,new StatChange(Stat.ATK.val,90));
+ map.put(Species.dodrio,new StatChange(Stat.SPEED.val,110));
+ map.put(Species.electrode,new StatChange(Stat.SPEED.val,150));
+ map.put(Species.exeggutor,new StatChange(Stat.SPDEF.val,75));
+ map.put(Species.noctowl,new StatChange(Stat.SPATK.val,86));
+ map.put(Species.ariados,new StatChange(Stat.SPDEF.val,70));
+ map.put(Species.qwilfish,new StatChange(Stat.DEF.val,85));
+ map.put(Species.magcargo,new StatChange(Stat.HP.val | Stat.SPATK.val,60,90));
+ map.put(Species.corsola,new StatChange(Stat.HP.val | Stat.DEF.val | Stat.SPDEF.val,65,95,95));
+ map.put(Species.mantine,new StatChange(Stat.HP.val,85));
+ map.put(Species.swellow,new StatChange(Stat.SPATK.val,75));
+ map.put(Species.pelipper,new StatChange(Stat.SPATK.val,95));
+ map.put(Species.masquerain,new StatChange(Stat.SPATK.val | Stat.SPEED.val,100,80));
+ map.put(Species.delcatty,new StatChange(Stat.SPEED.val,90));
+ map.put(Species.volbeat,new StatChange(Stat.DEF.val | Stat.SPDEF.val,75,85));
+ map.put(Species.illumise,new StatChange(Stat.DEF.val | Stat.SPDEF.val,75,85));
+ map.put(Species.lunatone,new StatChange(Stat.HP.val,90));
+ map.put(Species.solrock,new StatChange(Stat.HP.val,90));
+ map.put(Species.chimecho,new StatChange(Stat.HP.val | Stat.DEF.val | Stat.SPDEF.val,75,80,90));
+ map.put(Species.woobat,new StatChange(Stat.HP.val,65));
+ map.put(Species.crustle,new StatChange(Stat.ATK.val,105));
+ map.put(Species.beartic,new StatChange(Stat.ATK.val,130));
+ map.put(Species.cryogonal,new StatChange(Stat.HP.val | Stat.DEF.val,80,50));
+ break;
+ case 8:
+ map.put(Species.aegislash,new StatChange(Stat.DEF.val | Stat.SPDEF.val,140,140));
+ break;
+ case 9:
+ map.put(Species.cresselia,new StatChange(Stat.DEF.val | Stat.SPDEF.val, 110,120));
+ map.put(Species.zacian,new StatChange(Stat.ATK.val, 120));
+ map.put(Species.zamazenta,new StatChange(Stat.ATK.val, 120));
+ break;
+ }
+ return map;
+ }
+
+ /* @formatter:on */
+
+ public static final List<Integer> xItems = Arrays.asList(Items.guardSpec, Items.direHit, Items.xAttack,
+ Items.xDefense, Items.xSpeed, Items.xAccuracy, Items.xSpAtk, Items.xSpDef);
+
+ public static final List<Integer> battleTrappingAbilities = Arrays.asList(Abilities.shadowTag, Abilities.magnetPull,
+ Abilities.arenaTrap);
+
+ public static final List<Integer> negativeAbilities = Arrays.asList(
+ Abilities.defeatist, Abilities.slowStart, Abilities.truant, Abilities.klutz, Abilities.stall
+ );
+
+ public static final List<Integer> badAbilities = Arrays.asList(
+ Abilities.minus, Abilities.plus, Abilities.anticipation, Abilities.forewarn, Abilities.frisk,
+ Abilities.honeyGather, Abilities.auraBreak, Abilities.receiver, Abilities.powerOfAlchemy
+ );
+
+ public static final List<Integer> doubleBattleAbilities = Arrays.asList(
+ Abilities.friendGuard, Abilities.healer, Abilities.telepathy, Abilities.symbiosis,
+ Abilities.battery
+ );
+
+ public static final List<Integer> duplicateAbilities = Arrays.asList(
+ Abilities.vitalSpirit, Abilities.whiteSmoke, Abilities.purePower, Abilities.shellArmor, Abilities.airLock,
+ Abilities.solidRock, Abilities.ironBarbs, Abilities.turboblaze, Abilities.teravolt, Abilities.emergencyExit,
+ Abilities.dazzling, Abilities.tanglingHair, Abilities.powerOfAlchemy, Abilities.fullMetalBody,
+ Abilities.shadowShield, Abilities.prismArmor, Abilities.libero, Abilities.stalwart
+ );
+
+ public static final List<Integer> noPowerNonStatusMoves = Arrays.asList(
+ Moves.guillotine, Moves.hornDrill, Moves.sonicBoom, Moves.lowKick, Moves.counter, Moves.seismicToss,
+ Moves.dragonRage, Moves.fissure, Moves.nightShade, Moves.bide, Moves.psywave, Moves.superFang,
+ Moves.flail, Moves.revenge, Moves.returnTheMoveNotTheKeyword, Moves.present, Moves.frustration,
+ Moves.magnitude, Moves.mirrorCoat, Moves.beatUp, Moves.spitUp, Moves.sheerCold
+ );
+
+ public static final List<Integer> cannotBeObsoletedMoves = Arrays.asList(
+ Moves.returnTheMoveNotTheKeyword, Moves.frustration, Moves.endeavor, Moves.flail, Moves.reversal,
+ Moves.hiddenPower, Moves.storedPower, Moves.smellingSalts, Moves.fling, Moves.powerTrip, Moves.counter,
+ Moves.mirrorCoat, Moves.superFang
+ );
+
+ public static final List<Integer> cannotObsoleteMoves = Arrays.asList(
+ Moves.gearUp, Moves.magneticFlux, Moves.focusPunch, Moves.explosion, Moves.selfDestruct, Moves.geomancy,
+ Moves.venomDrench
+ );
+
+ public static final List<Integer> doubleBattleMoves = Arrays.asList(
+ Moves.followMe, Moves.helpingHand, Moves.ragePowder, Moves.afterYou, Moves.allySwitch, Moves.healPulse,
+ Moves.quash, Moves.ionDeluge, Moves.matBlock, Moves.aromaticMist, Moves.electrify, Moves.instruct,
+ Moves.spotlight, Moves.decorate, Moves.lifeDew, Moves.coaching
+ );
+
+ public static final List<Integer> uselessMoves = Arrays.asList(
+ Moves.splash, Moves.celebrate, Moves.holdHands, Moves.teleport,
+ Moves.reflectType // the AI does not know how to use this move properly
+ );
+
+ public static final List<Integer> requiresOtherMove = Arrays.asList(
+ Moves.spitUp, Moves.swallow, Moves.dreamEater, Moves.nightmare
+ );
+
+ public static final int MIN_DAMAGING_MOVE_POWER = 50;
+
+ public static final int HIGHEST_POKEMON_GEN = 9;
+
+ // Eevee has 8 potential evolutions
+ public static final int LARGEST_NUMBER_OF_SPLIT_EVOS = 8;
+}
diff --git a/src/com/pkrandom/constants/Items.java b/src/com/pkrandom/constants/Items.java
new file mode 100644
index 0000000..aecf237
--- /dev/null
+++ b/src/com/pkrandom/constants/Items.java
@@ -0,0 +1,1670 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Items.java - defines an index number constant for every item in the --*/
+/*-- game from Diamond/Pearl to Sword/Shield. --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+public class Items {
+ // https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Generation_IV)
+ // https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Generation_V)
+ // https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Generation_VI)
+ // https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Generation_VII)
+ // https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Let%27s_Go,_Pikachu!_and_Let%27s_Go,_Eevee!)
+ // https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Generation_VIII)
+ // Unlike in previous generations, GameFreak was *mostly* consistent with this item list starting with Diamond and
+ // Pearl. Places where they were not consistent are specifically called out in comments.
+
+ // These items are generally available in Diamond/Pearl and onwards.
+ public static final int none = 0;
+ public static final int masterBall = 1;
+ public static final int ultraBall = 2;
+ public static final int greatBall = 3;
+ public static final int pokeBall = 4;
+ public static final int safariBall = 5;
+ public static final int netBall = 6;
+ public static final int diveBall = 7;
+ public static final int nestBall = 8;
+ public static final int repeatBall = 9;
+ public static final int timerBall = 10;
+ public static final int luxuryBall = 11;
+ public static final int premierBall = 12;
+ public static final int duskBall = 13;
+ public static final int healBall = 14;
+ public static final int quickBall = 15;
+ public static final int cherishBall = 16;
+ public static final int potion = 17;
+ public static final int antidote = 18;
+ public static final int burnHeal = 19;
+ public static final int iceHeal = 20;
+ public static final int awakening = 21;
+ public static final int paralyzeHeal = 22;
+ public static final int fullRestore = 23;
+ public static final int maxPotion = 24;
+ public static final int hyperPotion = 25;
+ public static final int superPotion = 26;
+ public static final int fullHeal = 27;
+ public static final int revive = 28;
+ public static final int maxRevive = 29;
+ public static final int freshWater = 30;
+ public static final int sodaPop = 31;
+ public static final int lemonade = 32;
+ public static final int moomooMilk = 33;
+ public static final int energyPowder = 34;
+ public static final int energyRoot = 35;
+ public static final int healPowder = 36;
+ public static final int revivalHerb = 37;
+ public static final int ether = 38;
+ public static final int maxEther = 39;
+ public static final int elixir = 40;
+ public static final int maxElixir = 41;
+ public static final int lavaCookie = 42;
+ public static final int berryJuice = 43;
+ public static final int sacredAsh = 44;
+ public static final int hpUp = 45;
+ public static final int protein = 46;
+ public static final int iron = 47;
+ public static final int carbos = 48;
+ public static final int calcium = 49;
+ public static final int rareCandy = 50;
+ public static final int ppUp = 51;
+ public static final int zinc = 52;
+ public static final int ppMax = 53;
+ public static final int oldGateau = 54;
+ public static final int guardSpec = 55;
+ public static final int direHit = 56;
+ public static final int xAttack = 57;
+ public static final int xDefense = 58;
+ public static final int xSpeed = 59;
+ public static final int xAccuracy = 60;
+ public static final int xSpAtk = 61;
+ public static final int xSpDef = 62;
+ public static final int pokeDoll = 63;
+ public static final int fluffyTail = 64;
+ public static final int blueFlute = 65;
+ public static final int yellowFlute = 66;
+ public static final int redFlute = 67;
+ public static final int blackFlute = 68;
+ public static final int whiteFlute = 69;
+ public static final int shoalSalt = 70;
+ public static final int shoalShell = 71;
+ public static final int redShard = 72;
+ public static final int blueShard = 73;
+ public static final int yellowShard = 74;
+ public static final int greenShard = 75;
+ public static final int superRepel = 76;
+ public static final int maxRepel = 77;
+ public static final int escapeRope = 78;
+ public static final int repel = 79;
+ public static final int sunStone = 80;
+ public static final int moonStone = 81;
+ public static final int fireStone = 82;
+ public static final int thunderStone = 83;
+ public static final int waterStone = 84;
+ public static final int leafStone = 85;
+ public static final int tinyMushroom = 86;
+ public static final int bigMushroom = 87;
+ public static final int pearl = 88;
+ public static final int bigPearl = 89;
+ public static final int stardust = 90;
+ public static final int starPiece = 91;
+ public static final int nugget = 92;
+ public static final int heartScale = 93;
+ public static final int honey = 94;
+ public static final int growthMulch = 95;
+ public static final int dampMulch = 96;
+ public static final int stableMulch = 97;
+ public static final int gooeyMulch = 98;
+ public static final int rootFossil = 99;
+ public static final int clawFossil = 100;
+ public static final int helixFossil = 101;
+ public static final int domeFossil = 102;
+ public static final int oldAmber = 103;
+ public static final int armorFossil = 104;
+ public static final int skullFossil = 105;
+ public static final int rareBone = 106;
+ public static final int shinyStone = 107;
+ public static final int duskStone = 108;
+ public static final int dawnStone = 109;
+ public static final int ovalStone = 110;
+ public static final int oddKeystone = 111;
+ public static final int griseousOrb = 112; // unused until Platinum
+ public static final int tea = 113; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int unused114 = 114;
+ public static final int autograph = 115; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int douseDrive = 116; // unused until Black and White
+ public static final int shockDrive = 117; // unused until Black and White
+ public static final int burnDrive = 118; // unused until Black and White
+ public static final int chillDrive = 119; // unused until Black and White
+ public static final int unused120 = 120;
+ public static final int pokemonBox = 121; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int medicinePocket = 122; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int tmCase = 123; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int candyJar = 124; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int powerUpPocket = 125; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int clothingTrunk = 126; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int catchingPocket = 127; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int battlePocket = 128; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int unused129 = 129;
+ public static final int unused130 = 130;
+ public static final int unused131 = 131;
+ public static final int unused132 = 132;
+ public static final int unused133 = 133;
+ public static final int sweetHeart = 134; // unused until Black and White
+ public static final int adamantOrb = 135;
+ public static final int lustrousOrb = 136;
+ public static final int mail1 = 137; // Grass Mail in Gen 4, Greet Mail in Gen 5+
+ public static final int mail2 = 138; // Flame Mail in Gen 4, Favored Mail in Gen 5+
+ public static final int mail3 = 139; // Bubble Mail in Gen 4, RSVP Mail in Gen 5+
+ public static final int mail4 = 140; // Bloom Mail in Gen 4, Thanks Mail in Gen 5+
+ public static final int mail5 = 141; // Tunnel Mail in Gen 4, Inquiry Mail in Gen 5+
+ public static final int mail6 = 142; // Steel Mail in Gen 4, Like Mail in Gen 5+
+ public static final int mail7 = 143; // Heart Mail in Gen 4, Reply Mail in Gen 5+
+ public static final int mail8 = 144; // Snow Mail in Gen 4, Bridge Mail S in Gen 5+
+ public static final int mail9 = 145; // Space Mail in Gen 4, Bridge Mail D in Gen 5+
+ public static final int mail10 = 146; // Air Mail in Gen 4, Bridge Mail T in Gen 5+
+ public static final int mail11 = 147; // Mosaic Mail in Gen 4, Bridge Mail V in Gen 5+
+ public static final int mail12 = 148; // Brick Mail in Gen 4, Bridge Mail W in Gen 5+
+ public static final int cheriBerry = 149;
+ public static final int chestoBerry = 150;
+ public static final int pechaBerry = 151;
+ public static final int rawstBerry = 152;
+ public static final int aspearBerry = 153;
+ public static final int leppaBerry = 154;
+ public static final int oranBerry = 155;
+ public static final int persimBerry = 156;
+ public static final int lumBerry = 157;
+ public static final int sitrusBerry = 158;
+ public static final int figyBerry = 159;
+ public static final int wikiBerry = 160;
+ public static final int magoBerry = 161;
+ public static final int aguavBerry = 162;
+ public static final int iapapaBerry = 163;
+ public static final int razzBerry = 164;
+ public static final int blukBerry = 165;
+ public static final int nanabBerry = 166;
+ public static final int wepearBerry = 167;
+ public static final int pinapBerry = 168;
+ public static final int pomegBerry = 169;
+ public static final int kelpsyBerry = 170;
+ public static final int qualotBerry = 171;
+ public static final int hondewBerry = 172;
+ public static final int grepaBerry = 173;
+ public static final int tamatoBerry = 174;
+ public static final int cornnBerry = 175;
+ public static final int magostBerry = 176;
+ public static final int rabutaBerry = 177;
+ public static final int nomelBerry = 178;
+ public static final int spelonBerry = 179;
+ public static final int pamtreBerry = 180;
+ public static final int watmelBerry = 181;
+ public static final int durinBerry = 182;
+ public static final int belueBerry = 183;
+ public static final int occaBerry = 184;
+ public static final int passhoBerry = 185;
+ public static final int wacanBerry = 186;
+ public static final int rindoBerry = 187;
+ public static final int yacheBerry = 188;
+ public static final int chopleBerry = 189;
+ public static final int kebiaBerry = 190;
+ public static final int shucaBerry = 191;
+ public static final int cobaBerry = 192;
+ public static final int payapaBerry = 193;
+ public static final int tangaBerry = 194;
+ public static final int chartiBerry = 195;
+ public static final int kasibBerry = 196;
+ public static final int habanBerry = 197;
+ public static final int colburBerry = 198;
+ public static final int babiriBerry = 199;
+ public static final int chilanBerry = 200;
+ public static final int liechiBerry = 201;
+ public static final int ganlonBerry = 202;
+ public static final int salacBerry = 203;
+ public static final int petayaBerry = 204;
+ public static final int apicotBerry = 205;
+ public static final int lansatBerry = 206;
+ public static final int starfBerry = 207;
+ public static final int enigmaBerry = 208;
+ public static final int micleBerry = 209;
+ public static final int custapBerry = 210;
+ public static final int jabocaBerry = 211;
+ public static final int rowapBerry = 212;
+ public static final int brightPowder = 213;
+ public static final int whiteHerb = 214;
+ public static final int machoBrace = 215;
+ public static final int expShare = 216; // Changed into a key item in X/Y
+ public static final int quickClaw = 217;
+ public static final int sootheBell = 218;
+ public static final int mentalHerb = 219;
+ public static final int choiceBand = 220;
+ public static final int kingsRock = 221;
+ public static final int silverPowder = 222;
+ public static final int amuletCoin = 223;
+ public static final int cleanseTag = 224;
+ public static final int soulDew = 225;
+ public static final int deepSeaTooth = 226;
+ public static final int deepSeaScale = 227;
+ public static final int smokeBall = 228;
+ public static final int everstone = 229;
+ public static final int focusBand = 230;
+ public static final int luckyEgg = 231;
+ public static final int scopeLens = 232;
+ public static final int metalCoat = 233;
+ public static final int leftovers = 234;
+ public static final int dragonScale = 235;
+ public static final int lightBall = 236;
+ public static final int softSand = 237;
+ public static final int hardStone = 238;
+ public static final int miracleSeed = 239;
+ public static final int blackGlasses = 240;
+ public static final int blackBelt = 241;
+ public static final int magnet = 242;
+ public static final int mysticWater = 243;
+ public static final int sharpBeak = 244;
+ public static final int poisonBarb = 245;
+ public static final int neverMeltIce = 246;
+ public static final int spellTag = 247;
+ public static final int twistedSpoon = 248;
+ public static final int charcoal = 249;
+ public static final int dragonFang = 250;
+ public static final int silkScarf = 251;
+ public static final int upgrade = 252;
+ public static final int shellBell = 253;
+ public static final int seaIncense = 254;
+ public static final int laxIncense = 255;
+ public static final int luckyPunch = 256;
+ public static final int metalPowder = 257;
+ public static final int thickClub = 258;
+ public static final int leek = 259; // called "Stick" prior to SwSh
+ public static final int redScarf = 260;
+ public static final int blueScarf = 261;
+ public static final int pinkScarf = 262;
+ public static final int greenScarf = 263;
+ public static final int yellowScarf = 264;
+ public static final int wideLens = 265;
+ public static final int muscleBand = 266;
+ public static final int wiseGlasses = 267;
+ public static final int expertBelt = 268;
+ public static final int lightClay = 269;
+ public static final int lifeOrb = 270;
+ public static final int powerHerb = 271;
+ public static final int toxicOrb = 272;
+ public static final int flameOrb = 273;
+ public static final int quickPowder = 274;
+ public static final int focusSash = 275;
+ public static final int zoomLens = 276;
+ public static final int metronome = 277;
+ public static final int ironBall = 278;
+ public static final int laggingTail = 279;
+ public static final int destinyKnot = 280;
+ public static final int blackSludge = 281;
+ public static final int icyRock = 282;
+ public static final int smoothRock = 283;
+ public static final int heatRock = 284;
+ public static final int dampRock = 285;
+ public static final int gripClaw = 286;
+ public static final int choiceScarf = 287;
+ public static final int stickyBarb = 288;
+ public static final int powerBracer = 289;
+ public static final int powerBelt = 290;
+ public static final int powerLens = 291;
+ public static final int powerBand = 292;
+ public static final int powerAnklet = 293;
+ public static final int powerWeight = 294;
+ public static final int shedShell = 295;
+ public static final int bigRoot = 296;
+ public static final int choiceSpecs = 297;
+ public static final int flamePlate = 298;
+ public static final int splashPlate = 299;
+ public static final int zapPlate = 300;
+ public static final int meadowPlate = 301;
+ public static final int iciclePlate = 302;
+ public static final int fistPlate = 303;
+ public static final int toxicPlate = 304;
+ public static final int earthPlate = 305;
+ public static final int skyPlate = 306;
+ public static final int mindPlate = 307;
+ public static final int insectPlate = 308;
+ public static final int stonePlate = 309;
+ public static final int spookyPlate = 310;
+ public static final int dracoPlate = 311;
+ public static final int dreadPlate = 312;
+ public static final int ironPlate = 313;
+ public static final int oddIncense = 314;
+ public static final int rockIncense = 315;
+ public static final int fullIncense = 316;
+ public static final int waveIncense = 317;
+ public static final int roseIncense = 318;
+ public static final int luckIncense = 319;
+ public static final int pureIncense = 320;
+ public static final int protector = 321;
+ public static final int electirizer = 322;
+ public static final int magmarizer = 323;
+ public static final int dubiousDisc = 324;
+ public static final int reaperCloth = 325;
+ public static final int razorClaw = 326;
+ public static final int razorFang = 327;
+ public static final int tm01 = 328;
+ public static final int tm02 = 329;
+ public static final int tm03 = 330;
+ public static final int tm04 = 331;
+ public static final int tm05 = 332;
+ public static final int tm06 = 333;
+ public static final int tm07 = 334;
+ public static final int tm08 = 335;
+ public static final int tm09 = 336;
+ public static final int tm10 = 337;
+ public static final int tm11 = 338;
+ public static final int tm12 = 339;
+ public static final int tm13 = 340;
+ public static final int tm14 = 341;
+ public static final int tm15 = 342;
+ public static final int tm16 = 343;
+ public static final int tm17 = 344;
+ public static final int tm18 = 345;
+ public static final int tm19 = 346;
+ public static final int tm20 = 347;
+ public static final int tm21 = 348;
+ public static final int tm22 = 349;
+ public static final int tm23 = 350;
+ public static final int tm24 = 351;
+ public static final int tm25 = 352;
+ public static final int tm26 = 353;
+ public static final int tm27 = 354;
+ public static final int tm28 = 355;
+ public static final int tm29 = 356;
+ public static final int tm30 = 357;
+ public static final int tm31 = 358;
+ public static final int tm32 = 359;
+ public static final int tm33 = 360;
+ public static final int tm34 = 361;
+ public static final int tm35 = 362;
+ public static final int tm36 = 363;
+ public static final int tm37 = 364;
+ public static final int tm38 = 365;
+ public static final int tm39 = 366;
+ public static final int tm40 = 367;
+ public static final int tm41 = 368;
+ public static final int tm42 = 369;
+ public static final int tm43 = 370;
+ public static final int tm44 = 371;
+ public static final int tm45 = 372;
+ public static final int tm46 = 373;
+ public static final int tm47 = 374;
+ public static final int tm48 = 375;
+ public static final int tm49 = 376;
+ public static final int tm50 = 377;
+ public static final int tm51 = 378;
+ public static final int tm52 = 379;
+ public static final int tm53 = 380;
+ public static final int tm54 = 381;
+ public static final int tm55 = 382;
+ public static final int tm56 = 383;
+ public static final int tm57 = 384;
+ public static final int tm58 = 385;
+ public static final int tm59 = 386;
+ public static final int tm60 = 387;
+ public static final int tm61 = 388;
+ public static final int tm62 = 389;
+ public static final int tm63 = 390;
+ public static final int tm64 = 391;
+ public static final int tm65 = 392;
+ public static final int tm66 = 393;
+ public static final int tm67 = 394;
+ public static final int tm68 = 395;
+ public static final int tm69 = 396;
+ public static final int tm70 = 397;
+ public static final int tm71 = 398;
+ public static final int tm72 = 399;
+ public static final int tm73 = 400;
+ public static final int tm74 = 401;
+ public static final int tm75 = 402;
+ public static final int tm76 = 403;
+ public static final int tm77 = 404;
+ public static final int tm78 = 405;
+ public static final int tm79 = 406;
+ public static final int tm80 = 407;
+ public static final int tm81 = 408;
+ public static final int tm82 = 409;
+ public static final int tm83 = 410;
+ public static final int tm84 = 411;
+ public static final int tm85 = 412;
+ public static final int tm86 = 413;
+ public static final int tm87 = 414;
+ public static final int tm88 = 415;
+ public static final int tm89 = 416;
+ public static final int tm90 = 417;
+ public static final int tm91 = 418;
+ public static final int tm92 = 419;
+ public static final int hm01 = 420;
+ public static final int hm02 = 421;
+ public static final int hm03 = 422;
+ public static final int hm04 = 423;
+ public static final int hm05 = 424;
+ public static final int hm06 = 425;
+ public static final int hm07 = 426; // unused after Gen 4
+ public static final int hm08 = 427; // unused after Gen 4
+ public static final int explorerKit = 428; // unused in HeartGold and SoulSilver
+ public static final int lootSack = 429;
+ public static final int ruleBook = 430;
+ public static final int pokeRadar = 431;
+ public static final int pointCard = 432;
+ public static final int journal = 433;
+ public static final int sealCase = 434;
+ public static final int fashionCase = 435;
+ public static final int sealBag = 436;
+ public static final int palPad = 437;
+ public static final int worksKey = 438;
+ public static final int oldCharm = 439;
+ public static final int galacticKey = 440;
+ public static final int redChain = 441;
+ public static final int townMap = 442;
+ public static final int vsSeeker = 443;
+ public static final int coinCase = 444;
+ public static final int oldRod = 445;
+ public static final int goodRod = 446;
+ public static final int superRod = 447;
+ public static final int sprayduck = 448;
+ public static final int poffinCase = 449;
+ public static final int bike = 450; // Green Bicycle in X/Y
+ public static final int suiteKey = 451;
+ public static final int oaksLetter = 452;
+ public static final int lunarWing = 453;
+ public static final int memberCard = 454;
+ public static final int azureFlute = 455;
+ public static final int ssTicketJohto = 456;
+ public static final int contestPass = 457;
+ public static final int magmaStone = 458;
+ public static final int parcelSinnoh = 459;
+ public static final int coupon1 = 460;
+ public static final int coupon2 = 461;
+ public static final int coupon3 = 462;
+ public static final int storageKeySinnoh = 463;
+ public static final int secretPotion = 464;
+
+ // These items are generally available in Platinum and onwards.
+ public static final int vsRecorder = 465;
+ public static final int gracidea = 466;
+ public static final int secretKeySinnoh = 467;
+
+ // These items are generally available in HeartGold/SoulSilver and onwards.
+ public static final int apricornBox = 468;
+ public static final int unownReport = 469;
+ public static final int berryPots = 470;
+ public static final int dowsingMachine = 471;
+ public static final int blueCard = 472;
+ public static final int slowpokeTail = 473;
+ public static final int clearBell = 474;
+ public static final int cardKeyJohto = 475;
+ public static final int basementKeyJohto = 476;
+ public static final int squirtBottle = 477;
+ public static final int redScale = 478;
+ public static final int lostItem = 479;
+ public static final int pass = 480;
+ public static final int machinePart = 481;
+ public static final int silverWing = 482;
+ public static final int rainbowWing = 483;
+ public static final int mysteryEgg = 484;
+ public static final int redApricorn = 485;
+ public static final int blueApricorn = 486;
+ public static final int yellowApricorn = 487;
+ public static final int greenApricorn = 488;
+ public static final int pinkApricorn = 489;
+ public static final int whiteApricorn = 490;
+ public static final int blackApricorn = 491;
+ public static final int fastBall = 492;
+ public static final int levelBall = 493;
+ public static final int lureBall = 494;
+ public static final int heavyBall = 495;
+ public static final int loveBall = 496;
+ public static final int friendBall = 497;
+ public static final int moonBall = 498;
+ public static final int sportBall = 499;
+ public static final int parkBall = 500;
+ public static final int photoAlbum = 501;
+ public static final int gbSounds = 502;
+ public static final int tidalBell = 503;
+ public static final int rageCandyBar = 504;
+ public static final int dataCard01 = 505;
+ public static final int dataCard02 = 506;
+ public static final int dataCard03 = 507;
+ public static final int dataCard04 = 508;
+ public static final int dataCard05 = 509;
+ public static final int dataCard06 = 510;
+ public static final int dataCard07 = 511;
+ public static final int dataCard08 = 512;
+ public static final int dataCard09 = 513;
+ public static final int dataCard10 = 514;
+ public static final int dataCard11 = 515;
+ public static final int dataCard12 = 516;
+ public static final int dataCard13 = 517;
+ public static final int dataCard14 = 518;
+ public static final int dataCard15 = 519;
+ public static final int dataCard16 = 520;
+ public static final int dataCard17 = 521;
+ public static final int dataCard18 = 522;
+ public static final int dataCard19 = 523;
+ public static final int dataCard20 = 524;
+ public static final int dataCard21 = 525;
+ public static final int dataCard22 = 526;
+ public static final int dataCard23 = 527;
+ public static final int dataCard24 = 528;
+ public static final int dataCard25 = 529;
+ public static final int dataCard26 = 530;
+ public static final int dataCard27 = 531;
+ public static final int jadeOrb = 532;
+ public static final int lockCapsule = 533;
+ public static final int redOrb = 534; // Changed into a held item in Omega Ruby/Alpha Sapphire
+ public static final int blueOrb = 535; // Changed into a held item in Omega Ruby/Alpha Sapphire
+ public static final int enigmaStone = 536;
+
+ // These items are generally available in Black/White and onwards
+ public static final int prismScale = 537;
+ public static final int eviolite = 538;
+ public static final int floatStone = 539;
+ public static final int rockyHelmet = 540;
+ public static final int airBalloon = 541;
+ public static final int redCard = 542;
+ public static final int ringTarget = 543;
+ public static final int bindingBand = 544;
+ public static final int absorbBulb = 545;
+ public static final int cellBattery = 546;
+ public static final int ejectButton = 547;
+ public static final int fireGem = 548;
+ public static final int waterGem = 549;
+ public static final int electricGem = 550;
+ public static final int grassGem = 551;
+ public static final int iceGem = 552;
+ public static final int fightingGem = 553;
+ public static final int poisonGem = 554;
+ public static final int groundGem = 555;
+ public static final int flyingGem = 556;
+ public static final int psychicGem = 557;
+ public static final int bugGem = 558;
+ public static final int rockGem = 559;
+ public static final int ghostGem = 560;
+ public static final int dragonGem = 561;
+ public static final int darkGem = 562;
+ public static final int steelGem = 563;
+ public static final int normalGem = 564;
+ public static final int healthFeather = 565;
+ public static final int muscleFeather = 566;
+ public static final int resistFeather = 567;
+ public static final int geniusFeather = 568;
+ public static final int cleverFeather = 569;
+ public static final int swiftFeather = 570;
+ public static final int prettyFeather = 571;
+ public static final int coverFossil = 572;
+ public static final int plumeFossil = 573;
+ public static final int libertyPass = 574;
+ public static final int passOrb = 575;
+ public static final int dreamBall = 576;
+ public static final int pokeToy = 577;
+ public static final int propCase = 578;
+ public static final int dragonSkull = 579;
+ public static final int balmMushroom = 580;
+ public static final int bigNugget = 581;
+ public static final int pearlString = 582;
+ public static final int cometShard = 583;
+ public static final int relicCopper = 584;
+ public static final int relicSilver = 585;
+ public static final int relicGold = 586;
+ public static final int relicVase = 587;
+ public static final int relicBand = 588;
+ public static final int relicStatue = 589;
+ public static final int relicCrown = 590;
+ public static final int casteliacone = 591;
+ public static final int direHit2 = 592;
+ public static final int xSpeed2 = 593;
+ public static final int xSpAtk2 = 594;
+ public static final int xSpDef2 = 595;
+ public static final int xDefense2 = 596;
+ public static final int xAttack2 = 597;
+ public static final int xAccuracy2 = 598;
+ public static final int xSpeed3 = 599;
+ public static final int xSpAtk3 = 600;
+ public static final int xSpDef3 = 601;
+ public static final int xDefense3 = 602;
+ public static final int xAttack3 = 603;
+ public static final int xAccuracy3 = 604;
+ public static final int xSpeed6 = 605;
+ public static final int xSpAtk6 = 606;
+ public static final int xSpDef6 = 607;
+ public static final int xDefense6 = 608;
+ public static final int xAttack6 = 609;
+ public static final int xAccuracy6 = 610;
+ public static final int abilityUrge = 611;
+ public static final int itemDrop = 612;
+ public static final int itemUrge = 613;
+ public static final int resetUrge = 614;
+ public static final int direHit3 = 615;
+ public static final int lightStone = 616;
+ public static final int darkStone = 617;
+ public static final int tm93 = 618;
+ public static final int tm94 = 619;
+ public static final int tm95 = 620;
+ public static final int xtransceiverMale = 621;
+ public static final int unused622 = 622;
+ public static final int gram1 = 623;
+ public static final int gram2 = 624;
+ public static final int gram3 = 625;
+ public static final int xtransceiverFemale = 626;
+
+ // These items are generally available in Black 2/White 2 and onwards.
+ public static final int medalBox = 627;
+ public static final int dNASplicersFuse = 628;
+ public static final int dNASplicersSeparate = 629;
+ public static final int permit = 630;
+ public static final int ovalCharm = 631;
+ public static final int shinyCharm = 632;
+ public static final int plasmaCard = 633;
+ public static final int grubbyHanky = 634;
+ public static final int colressMachine = 635;
+ public static final int droppedItemCurtis = 636;
+ public static final int droppedItemYancy = 637;
+ public static final int revealGlass = 638;
+
+ // These items are generally available in X/Y and onwards.
+ public static final int weaknessPolicy = 639;
+ public static final int assaultVest = 640;
+ public static final int holoCasterMale = 641;
+ public static final int profsLetter = 642;
+ public static final int rollerSkates = 643;
+ public static final int pixiePlate = 644;
+ public static final int abilityCapsule = 645;
+ public static final int whippedDream = 646;
+ public static final int sachet = 647;
+ public static final int luminousMoss = 648;
+ public static final int snowball = 649;
+ public static final int safetyGoggles = 650;
+ public static final int pokeFlute = 651;
+ public static final int richMulch = 652;
+ public static final int surpriseMulch = 653;
+ public static final int boostMulch = 654;
+ public static final int amazeMulch = 655;
+ public static final int gengarite = 656;
+ public static final int gardevoirite = 657;
+ public static final int ampharosite = 658;
+ public static final int venusaurite = 659;
+ public static final int charizarditeX = 660;
+ public static final int blastoisinite = 661;
+ public static final int mewtwoniteX = 662;
+ public static final int mewtwoniteY = 663;
+ public static final int blazikenite = 664;
+ public static final int medichamite = 665;
+ public static final int houndoominite = 666;
+ public static final int aggronite = 667;
+ public static final int banettite = 668;
+ public static final int tyranitarite = 669;
+ public static final int scizorite = 670;
+ public static final int pinsirite = 671;
+ public static final int aerodactylite = 672;
+ public static final int lucarionite = 673;
+ public static final int abomasite = 674;
+ public static final int kangaskhanite = 675;
+ public static final int gyaradosite = 676;
+ public static final int absolite = 677;
+ public static final int charizarditeY = 678;
+ public static final int alakazite = 679;
+ public static final int heracronite = 680;
+ public static final int mawilite = 681;
+ public static final int manectite = 682;
+ public static final int garchompite = 683;
+ public static final int latiasite = 684;
+ public static final int latiosite = 685;
+ public static final int roseliBerry = 686;
+ public static final int keeBerry = 687;
+ public static final int marangaBerry = 688;
+ public static final int sprinklotad = 689;
+ public static final int tm96 = 690;
+ public static final int tm97 = 691;
+ public static final int tm98 = 692;
+ public static final int tm99 = 693;
+ public static final int tm100 = 694;
+ public static final int powerPlantPass = 695;
+ public static final int megaRing = 696;
+ public static final int intriguingStone = 697;
+ public static final int commonStone = 698;
+ public static final int discountCoupon = 699;
+ public static final int elevatorKey = 700;
+ public static final int tmvPass = 701;
+ public static final int honorofKalos = 702;
+ public static final int adventureGuide = 703;
+ public static final int strangeSouvenir = 704;
+ public static final int lensCase = 705;
+ public static final int makeupBag = 706;
+ public static final int travelTrunk = 707;
+ public static final int lumioseGalette = 708;
+ public static final int shalourSable = 709;
+ public static final int jawFossil = 710;
+ public static final int sailFossil = 711;
+ public static final int lookerTicket = 712;
+ public static final int bikeYellow = 713;
+ public static final int holoCasterFemale = 714;
+ public static final int fairyGem = 715;
+ public static final int megaCharm = 716;
+ public static final int megaGlove = 717;
+
+ // These items are generally available in Omega Ruby/Alpha Sapphire and onwards.
+ public static final int machBike = 718;
+ public static final int acroBike = 719;
+ public static final int wailmerPail = 720;
+ public static final int devonParts = 721;
+ public static final int sootSack = 722;
+ public static final int basementKeyHoenn = 723;
+ public static final int pokeblockKit = 724;
+ public static final int letter = 725;
+ public static final int eonTicket = 726;
+ public static final int scanner = 727;
+ public static final int goGoggles = 728;
+ public static final int meteoriteFirstForm = 729;
+ public static final int keytoRoom1 = 730;
+ public static final int keytoRoom2 = 731;
+ public static final int keytoRoom4 = 732;
+ public static final int keytoRoom6 = 733;
+ public static final int storageKeyHoenn = 734;
+ public static final int devonScope = 735;
+ public static final int ssTicketHoenn = 736;
+ public static final int hm07ORAS = 737;
+ public static final int devonScubaGear = 738;
+ public static final int contestCostumeMale = 739;
+ public static final int contestCostumeFemale = 740;
+ public static final int magmaSuit = 741;
+ public static final int aquaSuit = 742;
+ public static final int pairOfTickets = 743;
+ public static final int megaBracelet = 744;
+ public static final int megaPendant = 745;
+ public static final int megaGlasses = 746;
+ public static final int megaAnchor = 747;
+ public static final int megaStickpin = 748;
+ public static final int megaTiara = 749;
+ public static final int megaAnklet = 750;
+ public static final int meteoriteSecondForm = 751;
+ public static final int swampertite = 752;
+ public static final int sceptilite = 753;
+ public static final int sablenite = 754;
+ public static final int altarianite = 755;
+ public static final int galladite = 756;
+ public static final int audinite = 757;
+ public static final int metagrossite = 758;
+ public static final int sharpedonite = 759;
+ public static final int slowbronite = 760;
+ public static final int steelixite = 761;
+ public static final int pidgeotite = 762;
+ public static final int glalitite = 763;
+ public static final int diancite = 764;
+ public static final int prisonBottle = 765;
+ public static final int megaCuff = 766;
+ public static final int cameruptite = 767;
+ public static final int lopunnite = 768;
+ public static final int salamencite = 769;
+ public static final int beedrillite = 770;
+ public static final int meteoriteThirdForm = 771;
+ public static final int meteoriteFinalForm = 772;
+ public static final int keyStone = 773;
+ public static final int meteoriteShard = 774;
+ public static final int eonFlute = 775;
+
+ // These items are generally available in Sun/Moon and onwards.
+ public static final int normaliumZHeld = 776;
+ public static final int firiumZHeld = 777;
+ public static final int wateriumZHeld = 778;
+ public static final int electriumZHeld = 779;
+ public static final int grassiumZHeld = 780;
+ public static final int iciumZHeld = 781;
+ public static final int fightiniumZHeld = 782;
+ public static final int poisoniumZHeld = 783;
+ public static final int groundiumZHeld = 784;
+ public static final int flyiniumZHeld = 785;
+ public static final int psychiumZHeld = 786;
+ public static final int buginiumZHeld = 787;
+ public static final int rockiumZHeld = 788;
+ public static final int ghostiumZHeld = 789;
+ public static final int dragoniumZHeld = 790;
+ public static final int darkiniumZHeld = 791;
+ public static final int steeliumZHeld = 792;
+ public static final int fairiumZHeld = 793;
+ public static final int pikaniumZHeld = 794;
+ public static final int bottleCap = 795;
+ public static final int goldBottleCap = 796;
+ public static final int zRing = 797;
+ public static final int decidiumZHeld = 798;
+ public static final int inciniumZHeld = 799;
+ public static final int primariumZHeld = 800;
+ public static final int tapuniumZHeld = 801;
+ public static final int marshadiumZHeld = 802;
+ public static final int aloraichiumZHeld = 803;
+ public static final int snorliumZHeld = 804;
+ public static final int eeviumZHeld = 805;
+ public static final int mewniumZHeld = 806;
+ public static final int normaliumZBag = 807;
+ public static final int firiumZBag = 808;
+ public static final int wateriumZBag = 809;
+ public static final int electriumZBag = 810;
+ public static final int grassiumZBag = 811;
+ public static final int iciumZBag = 812;
+ public static final int fightiniumZBag = 813;
+ public static final int poisoniumZBag = 814;
+ public static final int groundiumZBag = 815;
+ public static final int flyiniumZBag = 816;
+ public static final int psychiumZBag = 817;
+ public static final int buginiumZBag = 818;
+ public static final int rockiumZBag = 819;
+ public static final int ghostiumZBag = 820;
+ public static final int dragoniumZBag = 821;
+ public static final int darkiniumZBag = 822;
+ public static final int steeliumZBag = 823;
+ public static final int fairiumZBag = 824;
+ public static final int pikaniumZBag = 825;
+ public static final int decidiumZBag = 826;
+ public static final int inciniumZBag = 827;
+ public static final int primariumZBag = 828;
+ public static final int tapuniumZBag = 829;
+ public static final int marshadiumZBag = 830;
+ public static final int aloraichiumZBag = 831;
+ public static final int snorliumZBag = 832;
+ public static final int eeviumZBag = 833;
+ public static final int mewniumZBag = 834;
+ public static final int pikashuniumZHeld = 835;
+ public static final int pikashuniumZBag = 836;
+ public static final int unused837 = 837;
+ public static final int unused838 = 838;
+ public static final int unused839 = 839;
+ public static final int unused840 = 840;
+ public static final int forageBag = 841;
+ public static final int fishingRod = 842;
+ public static final int professorsMask = 843;
+ public static final int festivalTicket = 844;
+ public static final int sparklingStone = 845;
+ public static final int adrenalineOrb = 846;
+ public static final int zygardeCube = 847;
+ public static final int unused848 = 848;
+ public static final int iceStone = 849;
+ public static final int ridePager = 850;
+ public static final int beastBall = 851;
+ public static final int bigMalasada = 852;
+ public static final int redNectar = 853;
+ public static final int yellowNectar = 854;
+ public static final int pinkNectar = 855;
+ public static final int purpleNectar = 856;
+ public static final int sunFlute = 857;
+ public static final int moonFlute = 858;
+ public static final int unused859 = 859;
+ public static final int enigmaticCard = 860;
+ public static final int silverRazzBerry = 861; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int goldenRazzBerry = 862; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int silverNanabBerry = 863; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int goldenNanabBerry = 864; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int silverPinapBerry = 865; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int goldenPinapBerry = 866; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int unused867 = 867;
+ public static final int unused868 = 868;
+ public static final int unused869 = 869;
+ public static final int unused870 = 870;
+ public static final int unused871 = 871;
+ public static final int secretKeyKanto = 872; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int ssTicketKanto = 873; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int silphScope = 874; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int parcelKanto = 875; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int cardKeyKanto = 876; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int goldTeeth = 877; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int liftKey = 878; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int terrainExtender = 879;
+ public static final int protectivePads = 880;
+ public static final int electricSeed = 881;
+ public static final int psychicSeed = 882;
+ public static final int mistySeed = 883;
+ public static final int grassySeed = 884;
+ public static final int stretchySpring = 885; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int chalkyStone = 886; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int marble = 887; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int loneEarring = 888; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int beachGlass = 889; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int goldLeaf = 890; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int silverLeaf = 891; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int polishedMudBall = 892; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int tropicalShell = 893; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int leafLetterPikachu = 894; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int leafLetterEevee = 895; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int smallBouquet = 896; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int unused897 = 897;
+ public static final int unused898 = 898;
+ public static final int unused899 = 899;
+ public static final int lure = 900; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int superLure = 901; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int maxLure = 902; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int pewterCrunchies = 903; // unused until Let's Go Pikachu/Let's Go Eevee
+ public static final int fightingMemory = 904;
+ public static final int flyingMemory = 905;
+ public static final int poisonMemory = 906;
+ public static final int groundMemory = 907;
+ public static final int rockMemory = 908;
+ public static final int bugMemory = 909;
+ public static final int ghostMemory = 910;
+ public static final int steelMemory = 911;
+ public static final int fireMemory = 912;
+ public static final int waterMemory = 913;
+ public static final int grassMemory = 914;
+ public static final int electricMemory = 915;
+ public static final int psychicMemory = 916;
+ public static final int iceMemory = 917;
+ public static final int dragonMemory = 918;
+ public static final int darkMemory = 919;
+ public static final int fairyMemory = 920;
+
+ // These items are generally available in Ultra Sun/Ultra Moon and onwards.
+ public static final int solganiumZBag = 921;
+ public static final int lunaliumZBag = 922;
+ public static final int ultranecroziumZBag = 923;
+ public static final int mimikiumZHeld = 924;
+ public static final int lycaniumZHeld = 925;
+ public static final int kommoniumZHeld = 926;
+ public static final int solganiumZHeld = 927;
+ public static final int lunaliumZHeld = 928;
+ public static final int ultranecroziumZHeld = 929;
+ public static final int mimikiumZBag = 930;
+ public static final int lycaniumZBag = 931;
+ public static final int kommoniumZBag = 932;
+ public static final int zPowerRing = 933;
+ public static final int pinkPetal = 934;
+ public static final int orangePetal = 935;
+ public static final int bluePetal = 936;
+ public static final int redPetal = 937;
+ public static final int greenPetal = 938;
+ public static final int yellowPetal = 939;
+ public static final int purplePetal = 940;
+ public static final int rainbowFlower = 941;
+ public static final int surgeBadge = 942;
+ public static final int nSolarizerFuse = 943;
+ public static final int nLunarizerFuse = 944;
+ public static final int nSolarizerSeparate = 945;
+ public static final int nLunarizerSeparate = 946;
+ public static final int ilimaNormaliumZ = 947;
+ public static final int leftPokeBall = 948;
+ public static final int rotoHatch = 949;
+ public static final int rotoBargain = 950;
+ public static final int rotoPrizeMoney = 951;
+ public static final int rotoExpPoints = 952;
+ public static final int rotoFriendship = 953;
+ public static final int rotoEncounter = 954;
+ public static final int rotoStealth = 955;
+ public static final int rotoHPRestore = 956;
+ public static final int rotoPPRestore = 957;
+ public static final int rotoBoost = 958;
+ public static final int rotoCatch = 959;
+
+ // These items are generally available in Let's Go Pikachu/Let's Go Eevee and onwards.
+ public static final int healthCandy = 960;
+ public static final int mightyCandy = 961;
+ public static final int toughCandy = 962;
+ public static final int smartCandy = 963;
+ public static final int courageCandy = 964;
+ public static final int quickCandy = 965;
+ public static final int healthCandyL = 966;
+ public static final int mightyCandyL = 967;
+ public static final int toughCandyL = 968;
+ public static final int smartCandyL = 969;
+ public static final int courageCandyL = 970;
+ public static final int quickCandyL = 971;
+ public static final int healthCandyXL = 972;
+ public static final int mightyCandyXL = 973;
+ public static final int toughCandyXL = 974;
+ public static final int smartCandyXL = 975;
+ public static final int courageCandyXL = 976;
+ public static final int quickCandyXL = 977;
+ public static final int bulbasaurCandy = 978;
+ public static final int charmanderCandy = 979;
+ public static final int squirtleCandy = 980;
+ public static final int caterpieCandy = 981;
+ public static final int weedleCandy = 982;
+ public static final int pidgeyCandy = 983;
+ public static final int rattataCandy = 984;
+ public static final int spearowCandy = 985;
+ public static final int ekansCandy = 986;
+ public static final int pikachuCandy = 987;
+ public static final int sandshrewCandy = 988;
+ public static final int nidoranFemaleCandy = 989;
+ public static final int nidoranMaleCandy = 990;
+ public static final int clefairyCandy = 991;
+ public static final int vulpixCandy = 992;
+ public static final int jigglypuffCandy = 993;
+ public static final int zubatCandy = 994;
+ public static final int oddishCandy = 995;
+ public static final int parasCandy = 996;
+ public static final int venonatCandy = 997;
+ public static final int diglettCandy = 998;
+ public static final int meowthCandy = 999;
+ public static final int psyduckCandy = 1000;
+ public static final int mankeyCandy = 1001;
+ public static final int growlitheCandy = 1002;
+ public static final int poliwagCandy = 1003;
+ public static final int abraCandy = 1004;
+ public static final int machopCandy = 1005;
+ public static final int bellsproutCandy = 1006;
+ public static final int tentacoolCandy = 1007;
+ public static final int geodudeCandy = 1008;
+ public static final int ponytaCandy = 1009;
+ public static final int slowpokeCandy = 1010;
+ public static final int magnemiteCandy = 1011;
+ public static final int farfetchdCandy = 1012;
+ public static final int doduoCandy = 1013;
+ public static final int seelCandy = 1014;
+ public static final int grimerCandy = 1015;
+ public static final int shellderCandy = 1016;
+ public static final int gastlyCandy = 1017;
+ public static final int onixCandy = 1018;
+ public static final int drowzeeCandy = 1019;
+ public static final int krabbyCandy = 1020;
+ public static final int voltorbCandy = 1021;
+ public static final int exeggcuteCandy = 1022;
+ public static final int cuboneCandy = 1023;
+ public static final int hitmonleeCandy = 1024;
+ public static final int hitmonchanCandy = 1025;
+ public static final int lickitungCandy = 1026;
+ public static final int koffingCandy = 1027;
+ public static final int rhyhornCandy = 1028;
+ public static final int chanseyCandy = 1029;
+ public static final int tangelaCandy = 1030;
+ public static final int kangaskhanCandy = 1031;
+ public static final int horseaCandy = 1032;
+ public static final int goldeenCandy = 1033;
+ public static final int staryuCandy = 1034;
+ public static final int mrMimeCandy = 1035;
+ public static final int scytherCandy = 1036;
+ public static final int jynxCandy = 1037;
+ public static final int electabuzzCandy = 1038;
+ public static final int magmarCandy = 1039; // Is item 1057 in Let's Go Pikachu/Let's Go Eevee, shifting all below items up.
+ public static final int pinsirCandy = 1040;
+ public static final int taurosCandy = 1041;
+ public static final int magikarpCandy = 1042;
+ public static final int laprasCandy = 1043;
+ public static final int dittoCandy = 1044;
+ public static final int eeveeCandy = 1045;
+ public static final int porygonCandy = 1046;
+ public static final int omanyteCandy = 1047;
+ public static final int kabutoCandy = 1048;
+ public static final int aerodactylCandy = 1049;
+ public static final int snorlaxCandy = 1050;
+ public static final int articunoCandy = 1051;
+ public static final int zapdosCandy = 1052;
+ public static final int moltresCandy = 1053;
+ public static final int dratiniCandy = 1054;
+ public static final int mewtwoCandy = 1055;
+ public static final int mewCandy = 1056;
+ public static final int meltanCandy = 1057;
+
+ // These items are generally available in Sword/Shield v1.0.0 and onwards.
+ public static final int unused1058 = 1058;
+ public static final int unused1059 = 1059;
+ public static final int unused1060 = 1060;
+ public static final int unused1061 = 1061;
+ public static final int unused1062 = 1062;
+ public static final int unused1063 = 1063;
+ public static final int unused1064 = 1064;
+ public static final int unused1065 = 1065;
+ public static final int unused1066 = 1066;
+ public static final int unused1067 = 1067;
+ public static final int unused1068 = 1068;
+ public static final int unused1069 = 1069;
+ public static final int unused1070 = 1070;
+ public static final int unused1071 = 1071;
+ public static final int unused1072 = 1072;
+ public static final int unused1073 = 1073;
+ public static final int endorsement = 1074;
+ public static final int pokemonBoxLink = 1075;
+ public static final int wishingStar = 1076;
+ public static final int dynamaxBand = 1077;
+ public static final int unused1078 = 1078;
+ public static final int unused1079 = 1079;
+ public static final int fishingRodGalar = 1080;
+ public static final int rotomBike = 1081;
+ public static final int unused1082 = 1082;
+ public static final int unused1083 = 1083;
+ public static final int sausages = 1084;
+ public static final int bobsFoodTin = 1085;
+ public static final int bachsFoodTin = 1086;
+ public static final int tinOfBeans = 1087;
+ public static final int bread = 1088;
+ public static final int pasta = 1089;
+ public static final int mixedMushrooms = 1090;
+ public static final int smokePokeTail = 1091;
+ public static final int largeLeek = 1092;
+ public static final int fancyApple = 1093;
+ public static final int brittleBones = 1094;
+ public static final int packOfPotatoes = 1095;
+ public static final int pungentRoot = 1096;
+ public static final int saladMix = 1097;
+ public static final int friedFood = 1098;
+ public static final int boiledEgg = 1099;
+ public static final int campingGear = 1100;
+ public static final int unused1101 = 1101;
+ public static final int unused1102 = 1102;
+ public static final int rustedSword = 1103;
+ public static final int rustedShield = 1104;
+ public static final int fossilizedBird = 1105;
+ public static final int fossilizedFish = 1106;
+ public static final int fossilizedDrake = 1107;
+ public static final int fossilizedDino = 1108;
+ public static final int strawberrySweet = 1109;
+ public static final int loveSweet = 1110;
+ public static final int berrySweet = 1111;
+ public static final int cloverSweet = 1112;
+ public static final int flowerSweet = 1113;
+ public static final int starSweet = 1114;
+ public static final int ribbonSweet = 1115;
+ public static final int sweetApple = 1116;
+ public static final int tartApple = 1117;
+ public static final int throatSpray = 1118;
+ public static final int ejectPack = 1119;
+ public static final int heavyDutyBoots = 1120;
+ public static final int blunderPolicy = 1121;
+ public static final int roomService = 1122;
+ public static final int utilityUmbrella = 1123;
+ public static final int expCandyXS = 1124;
+ public static final int expCandyS = 1125;
+ public static final int expCandyM = 1126;
+ public static final int expCandyL = 1127;
+ public static final int expCandyXL = 1128;
+ public static final int dynamaxCandy = 1129;
+ public static final int tr00 = 1130;
+ public static final int tr01 = 1131;
+ public static final int tr02 = 1132;
+ public static final int tr03 = 1133;
+ public static final int tr04 = 1134;
+ public static final int tr05 = 1135;
+ public static final int tr06 = 1136;
+ public static final int tr07 = 1137;
+ public static final int tr08 = 1138;
+ public static final int tr09 = 1139;
+ public static final int tr10 = 1140;
+ public static final int tr11 = 1141;
+ public static final int tr12 = 1142;
+ public static final int tr13 = 1143;
+ public static final int tr14 = 1144;
+ public static final int tr15 = 1145;
+ public static final int tr16 = 1146;
+ public static final int tr17 = 1147;
+ public static final int tr18 = 1148;
+ public static final int tr19 = 1149;
+ public static final int tr20 = 1150;
+ public static final int tr21 = 1151;
+ public static final int tr22 = 1152;
+ public static final int tr23 = 1153;
+ public static final int tr24 = 1154;
+ public static final int tr25 = 1155;
+ public static final int tr26 = 1156;
+ public static final int tr27 = 1157;
+ public static final int tr28 = 1158;
+ public static final int tr29 = 1159;
+ public static final int tr30 = 1160;
+ public static final int tr31 = 1161;
+ public static final int tr32 = 1162;
+ public static final int tr33 = 1163;
+ public static final int tr34 = 1164;
+ public static final int tr35 = 1165;
+ public static final int tr36 = 1166;
+ public static final int tr37 = 1167;
+ public static final int tr38 = 1168;
+ public static final int tr39 = 1169;
+ public static final int tr40 = 1170;
+ public static final int tr41 = 1171;
+ public static final int tr42 = 1172;
+ public static final int tr43 = 1173;
+ public static final int tr44 = 1174;
+ public static final int tr45 = 1175;
+ public static final int tr46 = 1176;
+ public static final int tr47 = 1177;
+ public static final int tr48 = 1178;
+ public static final int tr49 = 1179;
+ public static final int tr50 = 1180;
+ public static final int tr51 = 1181;
+ public static final int tr52 = 1182;
+ public static final int tr53 = 1183;
+ public static final int tr54 = 1184;
+ public static final int tr55 = 1185;
+ public static final int tr56 = 1186;
+ public static final int tr57 = 1187;
+ public static final int tr58 = 1188;
+ public static final int tr59 = 1189;
+ public static final int tr60 = 1190;
+ public static final int tr61 = 1191;
+ public static final int tr62 = 1192;
+ public static final int tr63 = 1193;
+ public static final int tr64 = 1194;
+ public static final int tr65 = 1195;
+ public static final int tr66 = 1196;
+ public static final int tr67 = 1197;
+ public static final int tr68 = 1198;
+ public static final int tr69 = 1199;
+ public static final int tr70 = 1200;
+ public static final int tr71 = 1201;
+ public static final int tr72 = 1202;
+ public static final int tr73 = 1203;
+ public static final int tr74 = 1204;
+ public static final int tr75 = 1205;
+ public static final int tr76 = 1206;
+ public static final int tr77 = 1207;
+ public static final int tr78 = 1208;
+ public static final int tr79 = 1209;
+ public static final int tr80 = 1210;
+ public static final int tr81 = 1211;
+ public static final int tr82 = 1212;
+ public static final int tr83 = 1213;
+ public static final int tr84 = 1214;
+ public static final int tr85 = 1215;
+ public static final int tr86 = 1216;
+ public static final int tr87 = 1217;
+ public static final int tr88 = 1218;
+ public static final int tr89 = 1219;
+ public static final int tr90 = 1220;
+ public static final int tr91 = 1221;
+ public static final int tr92 = 1222;
+ public static final int tr93 = 1223;
+ public static final int tr94 = 1224;
+ public static final int tr95 = 1225;
+ public static final int tr96 = 1226;
+ public static final int tr97 = 1227;
+ public static final int tr98 = 1228;
+ public static final int tr99 = 1229;
+ public static final int tm00 = 1230;
+ public static final int lonelyMint = 1231;
+ public static final int adamantMint = 1232;
+ public static final int naughtyMint = 1233;
+ public static final int braveMint = 1234;
+ public static final int boldMint = 1235;
+ public static final int impishMint = 1236;
+ public static final int laxMint = 1237;
+ public static final int relaxedMint = 1238;
+ public static final int modestMint = 1239;
+ public static final int mildMint = 1240;
+ public static final int rashMint = 1241;
+ public static final int quietMint = 1242;
+ public static final int calmMint = 1243;
+ public static final int gentleMint = 1244;
+ public static final int carefulMint = 1245;
+ public static final int sassyMint = 1246;
+ public static final int timidMint = 1247;
+ public static final int hastyMint = 1248;
+ public static final int jollyMint = 1249;
+ public static final int naiveMint = 1250;
+ public static final int seriousMint = 1251;
+ public static final int wishingPiece = 1252;
+ public static final int crackedPot = 1253;
+ public static final int chippedPot = 1254;
+ public static final int hiTechEarbuds = 1255;
+ public static final int fruitBunch = 1256;
+ public static final int moomooCheese = 1257;
+ public static final int spiceMix = 1258;
+ public static final int freshCream = 1259;
+ public static final int packagedCurry = 1260;
+ public static final int coconutMilk = 1261;
+ public static final int instantNoodles = 1262;
+ public static final int precookedBurger = 1263;
+ public static final int gigantamix = 1264;
+ public static final int wishingChip = 1265;
+ public static final int rotomBikeWaterMode = 1266;
+ public static final int catchingCharm = 1267;
+ public static final int unused1268 = 1268;
+ public static final int oldLetter = 1269;
+ public static final int bandAutograph = 1270;
+ public static final int soniasBook = 1271;
+ public static final int unused1272 = 1272;
+ public static final int unused1273 = 1273;
+ public static final int unused1274 = 1274;
+ public static final int unused1275 = 1275;
+ public static final int unused1276 = 1276;
+ public static final int unused1277 = 1277;
+ public static final int rotomCatalog = 1278;
+ public static final int starAnd458 = 1279;
+ public static final int starAnd15 = 1280;
+ public static final int starAnd337 = 1281;
+ public static final int starAnd603 = 1282;
+ public static final int starAnd390 = 1283;
+ public static final int starSgr6879 = 1284;
+ public static final int starSgr6859 = 1285;
+ public static final int starSgr6913 = 1286;
+ public static final int starSgr7348 = 1287;
+ public static final int starSgr7121 = 1288;
+ public static final int starSgr6746 = 1289;
+ public static final int starSgr7194 = 1290;
+ public static final int starSgr7337 = 1291;
+ public static final int starSgr7343 = 1292;
+ public static final int starSgr6812 = 1293;
+ public static final int starSgr7116 = 1294;
+ public static final int starSgr7264 = 1295;
+ public static final int starSgr7597 = 1296;
+ public static final int starDel7882 = 1297;
+ public static final int starDel7906 = 1298;
+ public static final int starDel7852 = 1299;
+ public static final int starPsc596 = 1300;
+ public static final int starPsc361 = 1301;
+ public static final int starPsc510 = 1302;
+ public static final int starPsc437 = 1303;
+ public static final int starPsc8773 = 1304;
+ public static final int starLep1865 = 1305;
+ public static final int starLep1829 = 1306;
+ public static final int starBoo5340 = 1307;
+ public static final int starBoo5506 = 1308;
+ public static final int starBoo5435 = 1309;
+ public static final int starBoo5602 = 1310;
+ public static final int starBoo5733 = 1311;
+ public static final int starBoo5235 = 1312;
+ public static final int starBoo5351 = 1313;
+ public static final int starHya3748 = 1314;
+ public static final int starHya3903 = 1315;
+ public static final int starHya3418 = 1316;
+ public static final int starHya3482 = 1317;
+ public static final int starHya3845 = 1318;
+ public static final int starEri1084 = 1319;
+ public static final int starEri472 = 1320;
+ public static final int starEri1666 = 1321;
+ public static final int starEri897 = 1322;
+ public static final int starEri1231 = 1323;
+ public static final int starEri874 = 1324;
+ public static final int starEri1298 = 1325;
+ public static final int starEri1325 = 1326;
+ public static final int starEri984 = 1327;
+ public static final int starEri1464 = 1328;
+ public static final int starEri1393 = 1329;
+ public static final int starEri850 = 1330;
+ public static final int starTau1409 = 1331;
+ public static final int starTau1457 = 1332;
+ public static final int starTau1165 = 1333;
+ public static final int starTau1791 = 1334;
+ public static final int starTau1910 = 1335;
+ public static final int starTau1346 = 1336;
+ public static final int starTau1373 = 1337;
+ public static final int starTau1412 = 1338;
+ public static final int starCMa2491 = 1339;
+ public static final int starCMa2693 = 1340;
+ public static final int starCMa2294 = 1341;
+ public static final int starCMa2827 = 1342;
+ public static final int starCMa2282 = 1343;
+ public static final int starCMa2618 = 1344;
+ public static final int starCMa2657 = 1345;
+ public static final int starCMa2646 = 1346;
+ public static final int starUMa4905 = 1347;
+ public static final int starUMa4301 = 1348;
+ public static final int starUMa5191 = 1349;
+ public static final int starUMa5054 = 1350;
+ public static final int starUMa4295 = 1351;
+ public static final int starUMa4660 = 1352;
+ public static final int starUMa4554 = 1353;
+ public static final int starUMa4069 = 1354;
+ public static final int starUMa3569 = 1355;
+ public static final int starUMa3323 = 1356;
+ public static final int starUMa4033 = 1357;
+ public static final int starUMa4377 = 1358;
+ public static final int starUMa4375 = 1359;
+ public static final int starUMa4518 = 1360;
+ public static final int starUMa3594 = 1361;
+ public static final int starVir5056 = 1362;
+ public static final int starVir4825 = 1363;
+ public static final int starVir4932 = 1364;
+ public static final int starVir4540 = 1365;
+ public static final int starVir4689 = 1366;
+ public static final int starVir5338 = 1367;
+ public static final int starVir4910 = 1368;
+ public static final int starVir5315 = 1369;
+ public static final int starVir5359 = 1370;
+ public static final int starVir5409 = 1371;
+ public static final int starVir5107 = 1372;
+ public static final int starAri617 = 1373;
+ public static final int starAri553 = 1374;
+ public static final int starAri546 = 1375;
+ public static final int starAri951 = 1376;
+ public static final int starOri1713 = 1377;
+ public static final int starOri2061 = 1378;
+ public static final int starOri1790 = 1379;
+ public static final int starOri1903 = 1380;
+ public static final int starOri1948 = 1381;
+ public static final int starOri2004 = 1382;
+ public static final int starOri1852 = 1383;
+ public static final int starOri1879 = 1384;
+ public static final int starOri1899 = 1385;
+ public static final int starOri1543 = 1386;
+ public static final int starCas21 = 1387;
+ public static final int starCas168 = 1388;
+ public static final int starCas403 = 1389;
+ public static final int starCas153 = 1390;
+ public static final int starCas542 = 1391;
+ public static final int starCas219 = 1392;
+ public static final int starCas265 = 1393;
+ public static final int starCnc3572 = 1394;
+ public static final int starCnc3208 = 1395;
+ public static final int starCnc3461 = 1396;
+ public static final int starCnc3449 = 1397;
+ public static final int starCnc3429 = 1398;
+ public static final int starCnc3627 = 1399;
+ public static final int starCnc3268 = 1400;
+ public static final int starCnc3249 = 1401;
+ public static final int starCom4968 = 1402;
+ public static final int starCrv4757 = 1403;
+ public static final int starCrv4623 = 1404;
+ public static final int starCrv4662 = 1405;
+ public static final int starCrv4786 = 1406;
+ public static final int starAur1708 = 1407;
+ public static final int starAur2088 = 1408;
+ public static final int starAur1605 = 1409;
+ public static final int starAur2095 = 1410;
+ public static final int starAur1577 = 1411;
+ public static final int starAur1641 = 1412;
+ public static final int starAur1612 = 1413;
+ public static final int starPav7790 = 1414;
+ public static final int starCet911 = 1415;
+ public static final int starCet681 = 1416;
+ public static final int starCet188 = 1417;
+ public static final int starCet539 = 1418;
+ public static final int starCet804 = 1419;
+ public static final int starCep8974 = 1420;
+ public static final int starCep8162 = 1421;
+ public static final int starCep8238 = 1422;
+ public static final int starCep8417 = 1423;
+ public static final int starCen5267 = 1424;
+ public static final int starCen5288 = 1425;
+ public static final int starCen551 = 1426;
+ public static final int starCen5459 = 1427;
+ public static final int starCen5460 = 1428;
+ public static final int starCMi2943 = 1429;
+ public static final int starCMi2845 = 1430;
+ public static final int starEqu8131 = 1431;
+ public static final int starVul7405 = 1432;
+ public static final int starUMi424 = 1433;
+ public static final int starUMi5563 = 1434;
+ public static final int starUMi5735 = 1435;
+ public static final int starUMi6789 = 1436;
+ public static final int starCrt4287 = 1437;
+ public static final int starLyr7001 = 1438;
+ public static final int starLyr7178 = 1439;
+ public static final int starLyr7106 = 1440;
+ public static final int starLyr7298 = 1441;
+ public static final int starAra6585 = 1442;
+ public static final int starSco6134 = 1443;
+ public static final int starSco6527 = 1444;
+ public static final int starSco6553 = 1445;
+ public static final int starSco5953 = 1446;
+ public static final int starSco5984 = 1447;
+ public static final int starSco6508 = 1448;
+ public static final int starSco6084 = 1449;
+ public static final int starSco5944 = 1450;
+ public static final int starSco6630 = 1451;
+ public static final int starSco6027 = 1452;
+ public static final int starSco6247 = 1453;
+ public static final int starSco6252 = 1454;
+ public static final int starSco5928 = 1455;
+ public static final int starSco6241 = 1456;
+ public static final int starSco6165 = 1457;
+ public static final int starTri544 = 1458;
+ public static final int starLeo3982 = 1459;
+ public static final int starLeo4534 = 1460;
+ public static final int starLeo4357 = 1461;
+ public static final int starLeo4057 = 1462;
+ public static final int starLeo4359 = 1463;
+ public static final int starLeo4031 = 1464;
+ public static final int starLeo3852 = 1465;
+ public static final int starLeo3905 = 1466;
+ public static final int starLeo3773 = 1467;
+ public static final int starGru8425 = 1468;
+ public static final int starGru8636 = 1469;
+ public static final int starGru8353 = 1470;
+ public static final int starLib5685 = 1471;
+ public static final int starLib5531 = 1472;
+ public static final int starLib5787 = 1473;
+ public static final int starLib5603 = 1474;
+ public static final int starPup3165 = 1475;
+ public static final int starPup3185 = 1476;
+ public static final int starPup3045 = 1477;
+ public static final int starCyg7924 = 1478;
+ public static final int starCyg7417 = 1479;
+ public static final int starCyg7796 = 1480;
+ public static final int starCyg8301 = 1481;
+ public static final int starCyg7949 = 1482;
+ public static final int starCyg7528 = 1483;
+ public static final int starOct7228 = 1484;
+ public static final int starCol1956 = 1485;
+ public static final int starCol2040 = 1486;
+ public static final int starCol2177 = 1487;
+ public static final int starGem2990 = 1488;
+ public static final int starGem2891 = 1489;
+ public static final int starGem2421 = 1490;
+ public static final int starGem2473 = 1491;
+ public static final int starGem2216 = 1492;
+ public static final int starGem2777 = 1493;
+ public static final int starGem2650 = 1494;
+ public static final int starGem2286 = 1495;
+ public static final int starGem2484 = 1496;
+ public static final int starGem2930 = 1497;
+ public static final int starPeg8775 = 1498;
+ public static final int starPeg8781 = 1499;
+ public static final int starPeg39 = 1500;
+ public static final int starPeg8308 = 1501;
+ public static final int starPeg8650 = 1502;
+ public static final int starPeg8634 = 1503;
+ public static final int starPeg8684 = 1504;
+ public static final int starPeg8450 = 1505;
+ public static final int starPeg8880 = 1506;
+ public static final int starPeg8905 = 1507;
+ public static final int starOph6556 = 1508;
+ public static final int starOph6378 = 1509;
+ public static final int starOph6603 = 1510;
+ public static final int starOph6149 = 1511;
+ public static final int starOph6056 = 1512;
+ public static final int starOph6075 = 1513;
+ public static final int starSer5854 = 1514;
+ public static final int starSer7141 = 1515;
+ public static final int starSer5879 = 1516;
+ public static final int starHer6406 = 1517;
+ public static final int starHer6148 = 1518;
+ public static final int starHer6410 = 1519;
+ public static final int starHer6526 = 1520;
+ public static final int starHer6117 = 1521;
+ public static final int starHer6008 = 1522;
+ public static final int starPer936 = 1523;
+ public static final int starPer1017 = 1524;
+ public static final int starPer1131 = 1525;
+ public static final int starPer1228 = 1526;
+ public static final int starPer834 = 1527;
+ public static final int starPer941 = 1528;
+ public static final int starPhe99 = 1529;
+ public static final int starPhe338 = 1530;
+ public static final int starVel3634 = 1531;
+ public static final int starVel3485 = 1532;
+ public static final int starVel3734 = 1533;
+ public static final int starAqr8232 = 1534;
+ public static final int starAqr8414 = 1535;
+ public static final int starAqr8709 = 1536;
+ public static final int starAqr8518 = 1537;
+ public static final int starAqr7950 = 1538;
+ public static final int starAqr8499 = 1539;
+ public static final int starAqr8610 = 1540;
+ public static final int starAqr8264 = 1541;
+ public static final int starCru4853 = 1542;
+ public static final int starCru4730 = 1543;
+ public static final int starCru4763 = 1544;
+ public static final int starCru4700 = 1545;
+ public static final int starCru4656 = 1546;
+ public static final int starPsA8728 = 1547;
+ public static final int starTrA6217 = 1548;
+ public static final int starCap7776 = 1549;
+ public static final int starCap7754 = 1550;
+ public static final int starCap8278 = 1551;
+ public static final int starCap8322 = 1552;
+ public static final int starCap7773 = 1553;
+ public static final int starSge7479 = 1554;
+ public static final int starCar2326 = 1555;
+ public static final int starCar3685 = 1556;
+ public static final int starCar3307 = 1557;
+ public static final int starCar3699 = 1558;
+ public static final int starDra5744 = 1559;
+ public static final int starDra5291 = 1560;
+ public static final int starDra6705 = 1561;
+ public static final int starDra6536 = 1562;
+ public static final int starDra7310 = 1563;
+ public static final int starDra6688 = 1564;
+ public static final int starDra4434 = 1565;
+ public static final int starDra6370 = 1566;
+ public static final int starDra7462 = 1567;
+ public static final int starDra6396 = 1568;
+ public static final int starDra6132 = 1569;
+ public static final int starDra6636 = 1570;
+ public static final int starCVn4915 = 1571;
+ public static final int starCVn4785 = 1572;
+ public static final int starCVn4846 = 1573;
+ public static final int starAql7595 = 1574;
+ public static final int starAql7557 = 1575;
+ public static final int starAql7525 = 1576;
+ public static final int starAql7602 = 1577;
+ public static final int starAql7235 = 1578;
+
+ // These items are generally available in Sword/Shield v1.2.0 and onwards.
+ public static final int maxHoney = 1579;
+ public static final int maxMushrooms = 1580;
+ public static final int galaricaTwig = 1581;
+ public static final int galaricaCuff = 1582;
+ public static final int styleCard = 1583;
+ public static final int armorPass = 1584;
+ public static final int rotomBikeSparkingWhite = 1585;
+ public static final int rotomBikeGlisteningBlack = 1586;
+ public static final int expCharm = 1587;
+ public static final int armoriteOre = 1588;
+ public static final int markCharm = 1589;
+
+ // These items are generally available in Sword/Shield v1.3.0 and onwards.
+ public static final int reinsofUnityFuse = 1590;
+ public static final int reinsofUnitySeparate = 1591;
+ public static final int galaricaWreath = 1592;
+ public static final int legendaryClue1 = 1593;
+ public static final int legendaryClue2 = 1594;
+ public static final int legendaryClue3 = 1595;
+ public static final int legendaryClueQuestionMark = 1596;
+ public static final int crownPass = 1597;
+ public static final int woodenCrown = 1598;
+ public static final int radiantPetal = 1599;
+ public static final int whiteManeHair = 1600;
+ public static final int blackManeHair = 1601;
+ public static final int icerootCarrot = 1602;
+ public static final int shaderootCarrot = 1603;
+ public static final int dyniteOre = 1604;
+ public static final int carrotSeeds = 1605;
+ public static final int abilityPatch = 1606;
+ public static final int reinsofUnity = 1607;
+}
diff --git a/src/com/pkrandom/constants/Moves.java b/src/com/pkrandom/constants/Moves.java
new file mode 100644
index 0000000..494e8f2
--- /dev/null
+++ b/src/com/pkrandom/constants/Moves.java
@@ -0,0 +1,854 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Moves.java - defines an index number constant for every Move. --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+public class Moves {
+ // https://bulbapedia.bulbagarden.net/wiki/List_of_moves
+ public static final int pound = 1;
+ public static final int karateChop = 2;
+ public static final int doubleSlap = 3;
+ public static final int cometPunch = 4;
+ public static final int megaPunch = 5;
+ public static final int payDay = 6;
+ public static final int firePunch = 7;
+ public static final int icePunch = 8;
+ public static final int thunderPunch = 9;
+ public static final int scratch = 10;
+ public static final int viseGrip = 11;
+ public static final int guillotine = 12;
+ public static final int razorWind = 13;
+ public static final int swordsDance = 14;
+ public static final int cut = 15;
+ public static final int gust = 16;
+ public static final int wingAttack = 17;
+ public static final int whirlwind = 18;
+ public static final int fly = 19;
+ public static final int bind = 20;
+ public static final int slam = 21;
+ public static final int vineWhip = 22;
+ public static final int stomp = 23;
+ public static final int doubleKick = 24;
+ public static final int megaKick = 25;
+ public static final int jumpKick = 26;
+ public static final int rollingKick = 27;
+ public static final int sandAttack = 28;
+ public static final int headbutt = 29;
+ public static final int hornAttack = 30;
+ public static final int furyAttack = 31;
+ public static final int hornDrill = 32;
+ public static final int tackle = 33;
+ public static final int bodySlam = 34;
+ public static final int wrap = 35;
+ public static final int takeDown = 36;
+ public static final int thrash = 37;
+ public static final int doubleEdge = 38;
+ public static final int tailWhip = 39;
+ public static final int poisonSting = 40;
+ public static final int twineedle = 41;
+ public static final int pinMissile = 42;
+ public static final int leer = 43;
+ public static final int bite = 44;
+ public static final int growl = 45;
+ public static final int roar = 46;
+ public static final int sing = 47;
+ public static final int supersonic = 48;
+ public static final int sonicBoom = 49;
+ public static final int disable = 50;
+ public static final int acid = 51;
+ public static final int ember = 52;
+ public static final int flamethrower = 53;
+ public static final int mist = 54;
+ public static final int waterGun = 55;
+ public static final int hydroPump = 56;
+ public static final int surf = 57;
+ public static final int iceBeam = 58;
+ public static final int blizzard = 59;
+ public static final int psybeam = 60;
+ public static final int bubbleBeam = 61;
+ public static final int auroraBeam = 62;
+ public static final int hyperBeam = 63;
+ public static final int peck = 64;
+ public static final int drillPeck = 65;
+ public static final int submission = 66;
+ public static final int lowKick = 67;
+ public static final int counter = 68;
+ public static final int seismicToss = 69;
+ public static final int strength = 70;
+ public static final int absorb = 71;
+ public static final int megaDrain = 72;
+ public static final int leechSeed = 73;
+ public static final int growth = 74;
+ public static final int razorLeaf = 75;
+ public static final int solarBeam = 76;
+ public static final int poisonPowder = 77;
+ public static final int stunSpore = 78;
+ public static final int sleepPowder = 79;
+ public static final int petalDance = 80;
+ public static final int stringShot = 81;
+ public static final int dragonRage = 82;
+ public static final int fireSpin = 83;
+ public static final int thunderShock = 84;
+ public static final int thunderbolt = 85;
+ public static final int thunderWave = 86;
+ public static final int thunder = 87;
+ public static final int rockThrow = 88;
+ public static final int earthquake = 89;
+ public static final int fissure = 90;
+ public static final int dig = 91;
+ public static final int toxic = 92;
+ public static final int confusion = 93;
+ public static final int psychic = 94;
+ public static final int hypnosis = 95;
+ public static final int meditate = 96;
+ public static final int agility = 97;
+ public static final int quickAttack = 98;
+ public static final int rage = 99;
+ public static final int teleport = 100;
+ public static final int nightShade = 101;
+ public static final int mimic = 102;
+ public static final int screech = 103;
+ public static final int doubleTeam = 104;
+ public static final int recover = 105;
+ public static final int harden = 106;
+ public static final int minimize = 107;
+ public static final int smokescreen = 108;
+ public static final int confuseRay = 109;
+ public static final int withdraw = 110;
+ public static final int defenseCurl = 111;
+ public static final int barrier = 112;
+ public static final int lightScreen = 113;
+ public static final int haze = 114;
+ public static final int reflect = 115;
+ public static final int focusEnergy = 116;
+ public static final int bide = 117;
+ public static final int metronome = 118;
+ public static final int mirrorMove = 119;
+ public static final int selfDestruct = 120;
+ public static final int eggBomb = 121;
+ public static final int lick = 122;
+ public static final int smog = 123;
+ public static final int sludge = 124;
+ public static final int boneClub = 125;
+ public static final int fireBlast = 126;
+ public static final int waterfall = 127;
+ public static final int clamp = 128;
+ public static final int swift = 129;
+ public static final int skullBash = 130;
+ public static final int spikeCannon = 131;
+ public static final int constrict = 132;
+ public static final int amnesia = 133;
+ public static final int kinesis = 134;
+ public static final int softBoiled = 135;
+ public static final int highJumpKick = 136;
+ public static final int glare = 137;
+ public static final int dreamEater = 138;
+ public static final int poisonGas = 139;
+ public static final int barrage = 140;
+ public static final int leechLife = 141;
+ public static final int lovelyKiss = 142;
+ public static final int skyAttack = 143;
+ public static final int transform = 144;
+ public static final int bubble = 145;
+ public static final int dizzyPunch = 146;
+ public static final int spore = 147;
+ public static final int flash = 148;
+ public static final int psywave = 149;
+ public static final int splash = 150;
+ public static final int acidArmor = 151;
+ public static final int crabhammer = 152;
+ public static final int explosion = 153;
+ public static final int furySwipes = 154;
+ public static final int bonemerang = 155;
+ public static final int rest = 156;
+ public static final int rockSlide = 157;
+ public static final int hyperFang = 158;
+ public static final int sharpen = 159;
+ public static final int conversion = 160;
+ public static final int triAttack = 161;
+ public static final int superFang = 162;
+ public static final int slash = 163;
+ public static final int substitute = 164;
+ public static final int struggle = 165;
+ public static final int sketch = 166;
+ public static final int tripleKick = 167;
+ public static final int thief = 168;
+ public static final int spiderWeb = 169;
+ public static final int mindReader = 170;
+ public static final int nightmare = 171;
+ public static final int flameWheel = 172;
+ public static final int snore = 173;
+ public static final int curse = 174;
+ public static final int flail = 175;
+ public static final int conversion2 = 176;
+ public static final int aeroblast = 177;
+ public static final int cottonSpore = 178;
+ public static final int reversal = 179;
+ public static final int spite = 180;
+ public static final int powderSnow = 181;
+ public static final int protect = 182;
+ public static final int machPunch = 183;
+ public static final int scaryFace = 184;
+ public static final int feintAttack = 185;
+ public static final int sweetKiss = 186;
+ public static final int bellyDrum = 187;
+ public static final int sludgeBomb = 188;
+ public static final int mudSlap = 189;
+ public static final int octazooka = 190;
+ public static final int spikes = 191;
+ public static final int zapCannon = 192;
+ public static final int foresight = 193;
+ public static final int destinyBond = 194;
+ public static final int perishSong = 195;
+ public static final int icyWind = 196;
+ public static final int detect = 197;
+ public static final int boneRush = 198;
+ public static final int lockOn = 199;
+ public static final int outrage = 200;
+ public static final int sandstorm = 201;
+ public static final int gigaDrain = 202;
+ public static final int endure = 203;
+ public static final int charm = 204;
+ public static final int rollout = 205;
+ public static final int falseSwipe = 206;
+ public static final int swagger = 207;
+ public static final int milkDrink = 208;
+ public static final int spark = 209;
+ public static final int furyCutter = 210;
+ public static final int steelWing = 211;
+ public static final int meanLook = 212;
+ public static final int attract = 213;
+ public static final int sleepTalk = 214;
+ public static final int healBell = 215;
+ public static final int returnTheMoveNotTheKeyword = 216;
+ public static final int present = 217;
+ public static final int frustration = 218;
+ public static final int safeguard = 219;
+ public static final int painSplit = 220;
+ public static final int sacredFire = 221;
+ public static final int magnitude = 222;
+ public static final int dynamicPunch = 223;
+ public static final int megahorn = 224;
+ public static final int dragonBreath = 225;
+ public static final int batonPass = 226;
+ public static final int encore = 227;
+ public static final int pursuit = 228;
+ public static final int rapidSpin = 229;
+ public static final int sweetScent = 230;
+ public static final int ironTail = 231;
+ public static final int metalClaw = 232;
+ public static final int vitalThrow = 233;
+ public static final int morningSun = 234;
+ public static final int synthesis = 235;
+ public static final int moonlight = 236;
+ public static final int hiddenPower = 237;
+ public static final int crossChop = 238;
+ public static final int twister = 239;
+ public static final int rainDance = 240;
+ public static final int sunnyDay = 241;
+ public static final int crunch = 242;
+ public static final int mirrorCoat = 243;
+ public static final int psychUp = 244;
+ public static final int extremeSpeed = 245;
+ public static final int ancientPower = 246;
+ public static final int shadowBall = 247;
+ public static final int futureSight = 248;
+ public static final int rockSmash = 249;
+ public static final int whirlpool = 250;
+ public static final int beatUp = 251;
+ public static final int fakeOut = 252;
+ public static final int uproar = 253;
+ public static final int stockpile = 254;
+ public static final int spitUp = 255;
+ public static final int swallow = 256;
+ public static final int heatWave = 257;
+ public static final int hail = 258;
+ public static final int torment = 259;
+ public static final int flatter = 260;
+ public static final int willOWisp = 261;
+ public static final int memento = 262;
+ public static final int facade = 263;
+ public static final int focusPunch = 264;
+ public static final int smellingSalts = 265;
+ public static final int followMe = 266;
+ public static final int naturePower = 267;
+ public static final int charge = 268;
+ public static final int taunt = 269;
+ public static final int helpingHand = 270;
+ public static final int trick = 271;
+ public static final int rolePlay = 272;
+ public static final int wish = 273;
+ public static final int assist = 274;
+ public static final int ingrain = 275;
+ public static final int superpower = 276;
+ public static final int magicCoat = 277;
+ public static final int recycle = 278;
+ public static final int revenge = 279;
+ public static final int brickBreak = 280;
+ public static final int yawn = 281;
+ public static final int knockOff = 282;
+ public static final int endeavor = 283;
+ public static final int eruption = 284;
+ public static final int skillSwap = 285;
+ public static final int imprison = 286;
+ public static final int refresh = 287;
+ public static final int grudge = 288;
+ public static final int snatch = 289;
+ public static final int secretPower = 290;
+ public static final int dive = 291;
+ public static final int armThrust = 292;
+ public static final int camouflage = 293;
+ public static final int tailGlow = 294;
+ public static final int lusterPurge = 295;
+ public static final int mistBall = 296;
+ public static final int featherDance = 297;
+ public static final int teeterDance = 298;
+ public static final int blazeKick = 299;
+ public static final int mudSport = 300;
+ public static final int iceBall = 301;
+ public static final int needleArm = 302;
+ public static final int slackOff = 303;
+ public static final int hyperVoice = 304;
+ public static final int poisonFang = 305;
+ public static final int crushClaw = 306;
+ public static final int blastBurn = 307;
+ public static final int hydroCannon = 308;
+ public static final int meteorMash = 309;
+ public static final int astonish = 310;
+ public static final int weatherBall = 311;
+ public static final int aromatherapy = 312;
+ public static final int fakeTears = 313;
+ public static final int airCutter = 314;
+ public static final int overheat = 315;
+ public static final int odorSleuth = 316;
+ public static final int rockTomb = 317;
+ public static final int silverWind = 318;
+ public static final int metalSound = 319;
+ public static final int grassWhistle = 320;
+ public static final int tickle = 321;
+ public static final int cosmicPower = 322;
+ public static final int waterSpout = 323;
+ public static final int signalBeam = 324;
+ public static final int shadowPunch = 325;
+ public static final int extrasensory = 326;
+ public static final int skyUppercut = 327;
+ public static final int sandTomb = 328;
+ public static final int sheerCold = 329;
+ public static final int muddyWater = 330;
+ public static final int bulletSeed = 331;
+ public static final int aerialAce = 332;
+ public static final int icicleSpear = 333;
+ public static final int ironDefense = 334;
+ public static final int block = 335;
+ public static final int howl = 336;
+ public static final int dragonClaw = 337;
+ public static final int frenzyPlant = 338;
+ public static final int bulkUp = 339;
+ public static final int bounce = 340;
+ public static final int mudShot = 341;
+ public static final int poisonTail = 342;
+ public static final int covet = 343;
+ public static final int voltTackle = 344;
+ public static final int magicalLeaf = 345;
+ public static final int waterSport = 346;
+ public static final int calmMind = 347;
+ public static final int leafBlade = 348;
+ public static final int dragonDance = 349;
+ public static final int rockBlast = 350;
+ public static final int shockWave = 351;
+ public static final int waterPulse = 352;
+ public static final int doomDesire = 353;
+ public static final int psychoBoost = 354;
+ public static final int roost = 355;
+ public static final int gravity = 356;
+ public static final int miracleEye = 357;
+ public static final int wakeUpSlap = 358;
+ public static final int hammerArm = 359;
+ public static final int gyroBall = 360;
+ public static final int healingWish = 361;
+ public static final int brine = 362;
+ public static final int naturalGift = 363;
+ public static final int feint = 364;
+ public static final int pluck = 365;
+ public static final int tailwind = 366;
+ public static final int acupressure = 367;
+ public static final int metalBurst = 368;
+ public static final int uTurn = 369;
+ public static final int closeCombat = 370;
+ public static final int payback = 371;
+ public static final int assurance = 372;
+ public static final int embargo = 373;
+ public static final int fling = 374;
+ public static final int psychoShift = 375;
+ public static final int trumpCard = 376;
+ public static final int healBlock = 377;
+ public static final int wringOut = 378;
+ public static final int powerTrick = 379;
+ public static final int gastroAcid = 380;
+ public static final int luckyChant = 381;
+ public static final int meFirst = 382;
+ public static final int copycat = 383;
+ public static final int powerSwap = 384;
+ public static final int guardSwap = 385;
+ public static final int punishment = 386;
+ public static final int lastResort = 387;
+ public static final int worrySeed = 388;
+ public static final int suckerPunch = 389;
+ public static final int toxicSpikes = 390;
+ public static final int heartSwap = 391;
+ public static final int aquaRing = 392;
+ public static final int magnetRise = 393;
+ public static final int flareBlitz = 394;
+ public static final int forcePalm = 395;
+ public static final int auraSphere = 396;
+ public static final int rockPolish = 397;
+ public static final int poisonJab = 398;
+ public static final int darkPulse = 399;
+ public static final int nightSlash = 400;
+ public static final int aquaTail = 401;
+ public static final int seedBomb = 402;
+ public static final int airSlash = 403;
+ public static final int xScissor = 404;
+ public static final int bugBuzz = 405;
+ public static final int dragonPulse = 406;
+ public static final int dragonRush = 407;
+ public static final int powerGem = 408;
+ public static final int drainPunch = 409;
+ public static final int vacuumWave = 410;
+ public static final int focusBlast = 411;
+ public static final int energyBall = 412;
+ public static final int braveBird = 413;
+ public static final int earthPower = 414;
+ public static final int switcheroo = 415;
+ public static final int gigaImpact = 416;
+ public static final int nastyPlot = 417;
+ public static final int bulletPunch = 418;
+ public static final int avalanche = 419;
+ public static final int iceShard = 420;
+ public static final int shadowClaw = 421;
+ public static final int thunderFang = 422;
+ public static final int iceFang = 423;
+ public static final int fireFang = 424;
+ public static final int shadowSneak = 425;
+ public static final int mudBomb = 426;
+ public static final int psychoCut = 427;
+ public static final int zenHeadbutt = 428;
+ public static final int mirrorShot = 429;
+ public static final int flashCannon = 430;
+ public static final int rockClimb = 431;
+ public static final int defog = 432;
+ public static final int trickRoom = 433;
+ public static final int dracoMeteor = 434;
+ public static final int discharge = 435;
+ public static final int lavaPlume = 436;
+ public static final int leafStorm = 437;
+ public static final int powerWhip = 438;
+ public static final int rockWrecker = 439;
+ public static final int crossPoison = 440;
+ public static final int gunkShot = 441;
+ public static final int ironHead = 442;
+ public static final int magnetBomb = 443;
+ public static final int stoneEdge = 444;
+ public static final int captivate = 445;
+ public static final int stealthRock = 446;
+ public static final int grassKnot = 447;
+ public static final int chatter = 448;
+ public static final int judgment = 449;
+ public static final int bugBite = 450;
+ public static final int chargeBeam = 451;
+ public static final int woodHammer = 452;
+ public static final int aquaJet = 453;
+ public static final int attackOrder = 454;
+ public static final int defendOrder = 455;
+ public static final int healOrder = 456;
+ public static final int headSmash = 457;
+ public static final int doubleHit = 458;
+ public static final int roarOfTime = 459;
+ public static final int spacialRend = 460;
+ public static final int lunarDance = 461;
+ public static final int crushGrip = 462;
+ public static final int magmaStorm = 463;
+ public static final int darkVoid = 464;
+ public static final int seedFlare = 465;
+ public static final int ominousWind = 466;
+ public static final int shadowForce = 467;
+ public static final int honeClaws = 468;
+ public static final int wideGuard = 469;
+ public static final int guardSplit = 470;
+ public static final int powerSplit = 471;
+ public static final int wonderRoom = 472;
+ public static final int psyshock = 473;
+ public static final int venoshock = 474;
+ public static final int autotomize = 475;
+ public static final int ragePowder = 476;
+ public static final int telekinesis = 477;
+ public static final int magicRoom = 478;
+ public static final int smackDown = 479;
+ public static final int stormThrow = 480;
+ public static final int flameBurst = 481;
+ public static final int sludgeWave = 482;
+ public static final int quiverDance = 483;
+ public static final int heavySlam = 484;
+ public static final int synchronoise = 485;
+ public static final int electroBall = 486;
+ public static final int soak = 487;
+ public static final int flameCharge = 488;
+ public static final int coil = 489;
+ public static final int lowSweep = 490;
+ public static final int acidSpray = 491;
+ public static final int foulPlay = 492;
+ public static final int simpleBeam = 493;
+ public static final int entrainment = 494;
+ public static final int afterYou = 495;
+ public static final int round = 496;
+ public static final int echoedVoice = 497;
+ public static final int chipAway = 498;
+ public static final int clearSmog = 499;
+ public static final int storedPower = 500;
+ public static final int quickGuard = 501;
+ public static final int allySwitch = 502;
+ public static final int scald = 503;
+ public static final int shellSmash = 504;
+ public static final int healPulse = 505;
+ public static final int hex = 506;
+ public static final int skyDrop = 507;
+ public static final int shiftGear = 508;
+ public static final int circleThrow = 509;
+ public static final int incinerate = 510;
+ public static final int quash = 511;
+ public static final int acrobatics = 512;
+ public static final int reflectType = 513;
+ public static final int retaliate = 514;
+ public static final int finalGambit = 515;
+ public static final int bestow = 516;
+ public static final int inferno = 517;
+ public static final int waterPledge = 518;
+ public static final int firePledge = 519;
+ public static final int grassPledge = 520;
+ public static final int voltSwitch = 521;
+ public static final int struggleBug = 522;
+ public static final int bulldoze = 523;
+ public static final int frostBreath = 524;
+ public static final int dragonTail = 525;
+ public static final int workUp = 526;
+ public static final int electroweb = 527;
+ public static final int wildCharge = 528;
+ public static final int drillRun = 529;
+ public static final int dualChop = 530;
+ public static final int heartStamp = 531;
+ public static final int hornLeech = 532;
+ public static final int sacredSword = 533;
+ public static final int razorShell = 534;
+ public static final int heatCrash = 535;
+ public static final int leafTornado = 536;
+ public static final int steamroller = 537;
+ public static final int cottonGuard = 538;
+ public static final int nightDaze = 539;
+ public static final int psystrike = 540;
+ public static final int tailSlap = 541;
+ public static final int hurricane = 542;
+ public static final int headCharge = 543;
+ public static final int gearGrind = 544;
+ public static final int searingShot = 545;
+ public static final int technoBlast = 546;
+ public static final int relicSong = 547;
+ public static final int secretSword = 548;
+ public static final int glaciate = 549;
+ public static final int boltStrike = 550;
+ public static final int blueFlare = 551;
+ public static final int fieryDance = 552;
+ public static final int freezeShock = 553;
+ public static final int iceBurn = 554;
+ public static final int snarl = 555;
+ public static final int icicleCrash = 556;
+ public static final int vCreate = 557;
+ public static final int fusionFlare = 558;
+ public static final int fusionBolt = 559;
+ public static final int flyingPress = 560;
+ public static final int matBlock = 561;
+ public static final int belch = 562;
+ public static final int rototiller = 563;
+ public static final int stickyWeb = 564;
+ public static final int fellStinger = 565;
+ public static final int phantomForce = 566;
+ public static final int trickOrTreat = 567;
+ public static final int nobleRoar = 568;
+ public static final int ionDeluge = 569;
+ public static final int parabolicCharge = 570;
+ public static final int forestsCurse = 571;
+ public static final int petalBlizzard = 572;
+ public static final int freezeDry = 573;
+ public static final int disarmingVoice = 574;
+ public static final int partingShot = 575;
+ public static final int topsyTurvy = 576;
+ public static final int drainingKiss = 577;
+ public static final int craftyShield = 578;
+ public static final int flowerShield = 579;
+ public static final int grassyTerrain = 580;
+ public static final int mistyTerrain = 581;
+ public static final int electrify = 582;
+ public static final int playRough = 583;
+ public static final int fairyWind = 584;
+ public static final int moonblast = 585;
+ public static final int boomburst = 586;
+ public static final int fairyLock = 587;
+ public static final int kingsShield = 588;
+ public static final int playNice = 589;
+ public static final int confide = 590;
+ public static final int diamondStorm = 591;
+ public static final int steamEruption = 592;
+ public static final int hyperspaceHole = 593;
+ public static final int waterShuriken = 594;
+ public static final int mysticalFire = 595;
+ public static final int spikyShield = 596;
+ public static final int aromaticMist = 597;
+ public static final int eerieImpulse = 598;
+ public static final int venomDrench = 599;
+ public static final int powder = 600;
+ public static final int geomancy = 601;
+ public static final int magneticFlux = 602;
+ public static final int happyHour = 603;
+ public static final int electricTerrain = 604;
+ public static final int dazzlingGleam = 605;
+ public static final int celebrate = 606;
+ public static final int holdHands = 607;
+ public static final int babyDollEyes = 608;
+ public static final int nuzzle = 609;
+ public static final int holdBack = 610;
+ public static final int infestation = 611;
+ public static final int powerUpPunch = 612;
+ public static final int oblivionWing = 613;
+ public static final int thousandArrows = 614;
+ public static final int thousandWaves = 615;
+ public static final int landsWrath = 616;
+ public static final int lightOfRuin = 617;
+ public static final int originPulse = 618;
+ public static final int precipiceBlades = 619;
+ public static final int dragonAscent = 620;
+ public static final int hyperspaceFury = 621;
+ public static final int breakneckBlitzPhysical = 622;
+ public static final int breakneckBlitzSpecial = 623;
+ public static final int allOutPummelingPhysical = 624;
+ public static final int allOutPummelingSpecial = 625;
+ public static final int supersonicSkystrikePhysical = 626;
+ public static final int supersonicSkystrikeSpecial = 627;
+ public static final int acidDownpourPhysical = 628;
+ public static final int acidDownpourSpecial = 629;
+ public static final int tectonicRagePhysical = 630;
+ public static final int tectonicRageSpecial = 631;
+ public static final int continentalCrushPhysical = 632;
+ public static final int continentalCrushSpecial = 633;
+ public static final int savageSpinOutPhysical = 634;
+ public static final int savageSpinOutSpecial = 635;
+ public static final int neverEndingNightmarePhysical = 636;
+ public static final int neverEndingNightmareSpecial = 637;
+ public static final int corkscrewCrashPhysical = 638;
+ public static final int corkscrewCrashSpecial = 639;
+ public static final int infernoOverdrivePhysical = 640;
+ public static final int infernoOverdriveSpecial = 641;
+ public static final int hydroVortexPhysical = 642;
+ public static final int hydroVortexSpecial = 643;
+ public static final int bloomDoomPhysical = 644;
+ public static final int bloomDoomSpecial = 645;
+ public static final int gigavoltHavocPhysical = 646;
+ public static final int gigavoltHavocSpecial = 647;
+ public static final int shatteredPsychePhysical = 648;
+ public static final int shatteredPsycheSpecial = 649;
+ public static final int subzeroSlammerPhysical = 650;
+ public static final int subzeroSlammerSpecial = 651;
+ public static final int devastatingDrakePhysical = 652;
+ public static final int devastatingDrakeSpecial = 653;
+ public static final int blackHoleEclipsePhysical = 654;
+ public static final int blackHoleEclipseSpecial = 655;
+ public static final int twinkleTacklePhysical = 656;
+ public static final int twinkleTackleSpecial = 657;
+ public static final int catastropika = 658;
+ public static final int shoreUp = 659;
+ public static final int firstImpression = 660;
+ public static final int banefulBunker = 661;
+ public static final int spiritShackle = 662;
+ public static final int darkestLariat = 663;
+ public static final int sparklingAria = 664;
+ public static final int iceHammer = 665;
+ public static final int floralHealing = 666;
+ public static final int highHorsepower = 667;
+ public static final int strengthSap = 668;
+ public static final int solarBlade = 669;
+ public static final int leafage = 670;
+ public static final int spotlight = 671;
+ public static final int toxicThread = 672;
+ public static final int laserFocus = 673;
+ public static final int gearUp = 674;
+ public static final int throatChop = 675;
+ public static final int pollenPuff = 676;
+ public static final int anchorShot = 677;
+ public static final int psychicTerrain = 678;
+ public static final int lunge = 679;
+ public static final int fireLash = 680;
+ public static final int powerTrip = 681;
+ public static final int burnUp = 682;
+ public static final int speedSwap = 683;
+ public static final int smartStrike = 684;
+ public static final int purify = 685;
+ public static final int revelationDance = 686;
+ public static final int coreEnforcer = 687;
+ public static final int tropKick = 688;
+ public static final int instruct = 689;
+ public static final int beakBlast = 690;
+ public static final int clangingScales = 691;
+ public static final int dragonHammer = 692;
+ public static final int brutalSwing = 693;
+ public static final int auroraVeil = 694;
+ public static final int sinisterArrowRaid = 695;
+ public static final int maliciousMoonsault = 696;
+ public static final int oceanicOperetta = 697;
+ public static final int guardianOfAlola = 698;
+ public static final int soulStealing7StarStrike = 699;
+ public static final int stokedSparksurfer = 700;
+ public static final int pulverizingPancake = 701;
+ public static final int extremeEvoboost = 702;
+ public static final int genesisSupernova = 703;
+ public static final int shellTrap = 704;
+ public static final int fleurCannon = 705;
+ public static final int psychicFangs = 706;
+ public static final int stompingTantrum = 707;
+ public static final int shadowBone = 708;
+ public static final int accelerock = 709;
+ public static final int liquidation = 710;
+ public static final int prismaticLaser = 711;
+ public static final int spectralThief = 712;
+ public static final int sunsteelStrike = 713;
+ public static final int moongeistBeam = 714;
+ public static final int tearfulLook = 715;
+ public static final int zingZap = 716;
+ public static final int naturesMadness = 717;
+ public static final int multiAttack = 718;
+ public static final int tenMillionVoltThunderbolt = 719;
+ public static final int mindBlown = 720;
+ public static final int plasmaFists = 721;
+ public static final int photonGeyser = 722;
+ public static final int lightThatBurnsTheSky = 723;
+ public static final int searingSunrazeSmash = 724;
+ public static final int menacingMoonrazeMaelstrom = 725;
+ public static final int letsSnuggleForever = 726;
+ public static final int splinteredStormshards = 727;
+ public static final int clangorousSoulblaze = 728;
+ public static final int zippyZap = 729;
+ public static final int splishySplash = 730;
+ public static final int floatyFall = 731;
+ public static final int pikaPapow = 732;
+ public static final int bouncyBubble = 733;
+ public static final int buzzyBuzz = 734;
+ public static final int sizzlySlide = 735;
+ public static final int glitzyGlow = 736;
+ public static final int baddyBad = 737;
+ public static final int sappySeed = 738;
+ public static final int freezyFrost = 739;
+ public static final int sparklySwirl = 740;
+ public static final int veeveeVolley = 741;
+ public static final int doubleIronBash = 742;
+ public static final int maxGuard = 743;
+ public static final int dynamaxCannon = 744;
+ public static final int snipeShot = 745;
+ public static final int jawLock = 746;
+ public static final int stuffCheeks = 747;
+ public static final int noRetreat = 748;
+ public static final int tarShot = 749;
+ public static final int magicPowder = 750;
+ public static final int dragonDarts = 751;
+ public static final int teatime = 752;
+ public static final int octolock = 753;
+ public static final int boltBeak = 754;
+ public static final int fishiousRend = 755;
+ public static final int courtChange = 756;
+ public static final int maxFlare = 757;
+ public static final int maxFlutterby = 758;
+ public static final int maxLightning = 759;
+ public static final int maxStrike = 760;
+ public static final int maxKnuckle = 761;
+ public static final int maxPhantasm = 762;
+ public static final int maxHailstorm = 763;
+ public static final int maxOoze = 764;
+ public static final int maxGeyser = 765;
+ public static final int maxAirstream = 766;
+ public static final int maxStarfall = 767;
+ public static final int maxWyrmwind = 768;
+ public static final int maxMindstorm = 769;
+ public static final int maxRockfall = 770;
+ public static final int maxQuake = 771;
+ public static final int maxDarkness = 772;
+ public static final int maxOvergrowth = 773;
+ public static final int maxSteelspike = 774;
+ public static final int clangorousSoul = 775;
+ public static final int bodyPress = 776;
+ public static final int decorate = 777;
+ public static final int drumBeating = 778;
+ public static final int snapTrap = 779;
+ public static final int pyroBall = 780;
+ public static final int behemothBlade = 781;
+ public static final int behemothBash = 782;
+ public static final int auraWheel = 783;
+ public static final int breakingSwipe = 784;
+ public static final int branchPoke = 785;
+ public static final int overdrive = 786;
+ public static final int appleAcid = 787;
+ public static final int gravApple = 788;
+ public static final int spiritBreak = 789;
+ public static final int strangeSteam = 790;
+ public static final int lifeDew = 791;
+ public static final int obstruct = 792;
+ public static final int falseSurrender = 793;
+ public static final int meteorAssault = 794;
+ public static final int eternabeam = 795;
+ public static final int steelBeam = 796;
+ public static final int expandingForce = 797;
+ public static final int steelRoller = 798;
+ public static final int scaleShot = 799;
+ public static final int meteorBeam = 800;
+ public static final int shellSideArm = 801;
+ public static final int mistyExplosion = 802;
+ public static final int grassyGlide = 803;
+ public static final int risingVoltage = 804;
+ public static final int terrainPulse = 805;
+ public static final int skitterSmack = 806;
+ public static final int burningJealousy = 807;
+ public static final int lashOut = 808;
+ public static final int poltergeist = 809;
+ public static final int corrosiveGas = 810;
+ public static final int coaching = 811;
+ public static final int flipTurn = 812;
+ public static final int tripleAxel = 813;
+ public static final int dualWingbeat = 814;
+ public static final int scorchingSands = 815;
+ public static final int jungleHealing = 816;
+ public static final int wickedBlow = 817;
+ public static final int surgingStrikes = 818;
+ public static final int thunderCage = 819;
+ public static final int dragonEnergy = 820;
+ public static final int freezingGlare = 821;
+ public static final int fieryWrath = 822;
+ public static final int thunderousKick = 823;
+ public static final int glacialLance = 824;
+ public static final int astralBarrage = 825;
+ public static final int eerieSpell = 826;
+} \ No newline at end of file
diff --git a/src/com/pkrandom/constants/N3DSConstants.java b/src/com/pkrandom/constants/N3DSConstants.java
new file mode 100644
index 0000000..f33fe23
--- /dev/null
+++ b/src/com/pkrandom/constants/N3DSConstants.java
@@ -0,0 +1,212 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- N3DSConstants.java - constants that are relevant for all of the 3DS --*/
+/*-- games --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class N3DSConstants {
+
+ public static final int Type_XY = 0, Type_ORAS = 1, Type_SM = 2, Type_USUM = 3;
+
+ private static final Map<Integer,String> textVariableCodesXY = setupTextVariableCodes(Type_XY);
+ private static final Map<Integer,String> textVariableCodesORAS = setupTextVariableCodes(Type_ORAS);
+ private static final Map<Integer,String> textVariableCodesSM = setupTextVariableCodes(Type_SM);
+
+ public static Map<Integer,String> getTextVariableCodes(int romType) {
+ if (romType == Type_XY) {
+ return textVariableCodesXY;
+ } else if (romType == Type_ORAS) {
+ return textVariableCodesORAS;
+ } else if (romType == Type_SM || romType == Type_USUM) {
+ return textVariableCodesSM;
+ }
+ return new HashMap<>();
+ }
+
+ private static Map<Integer,String> setupTextVariableCodes(int romType) {
+ Map<Integer,String> map = new HashMap<>();
+
+ if (romType == Type_XY) {
+ map.put(0xFF00, "COLOR");
+ map.put(0x0100, "TRNAME");
+ map.put(0x0101, "PKNAME");
+ map.put(0x0102, "PKNICK");
+ map.put(0x0103, "TYPE");
+ map.put(0x0105, "LOCATION");
+ map.put(0x0106, "ABILITY");
+ map.put(0x0107, "MOVE");
+ map.put(0x0108, "ITEM1");
+ map.put(0x0109, "ITEM2");
+ map.put(0x010A, "sTRBAG");
+ map.put(0x010B, "BOX");
+ map.put(0x010D, "EVSTAT");
+ map.put(0x0110, "OPOWER");
+ map.put(0x0127, "RIBBON");
+ map.put(0x0134, "MIINAME");
+ map.put(0x013E, "WEATHER");
+ map.put(0x0189, "TRNICK");
+ map.put(0x018A, "1stchrTR");
+ map.put(0x018B, "SHOUTOUT");
+ map.put(0x018E, "BERRY");
+ map.put(0x018F, "REMFEEL");
+ map.put(0x0190, "REMQUAL");
+ map.put(0x0191, "WEBSITE");
+ map.put(0x019C, "CHOICECOS");
+ map.put(0x01A1, "GSYNCID");
+ map.put(0x0192, "PRVIDSAY");
+ map.put(0x0193, "BTLTEST");
+ map.put(0x0195, "GENLOC");
+ map.put(0x0199, "CHOICEFOOD");
+ map.put(0x019A, "HOTELITEM");
+ map.put(0x019B, "TAXISTOP");
+ map.put(0x019F, "MAISTITLE");
+ map.put(0x1000, "ITEMPLUR0");
+ map.put(0x1001, "ITEMPLUR1");
+ map.put(0x1100, "GENDBR");
+ map.put(0x1101, "NUMBRNCH");
+ map.put(0x1302, "iCOLOR2");
+ map.put(0x1303, "iCOLOR3");
+ map.put(0x0200, "NUM1");
+ map.put(0x0201, "NUM2");
+ map.put(0x0202, "NUM3");
+ map.put(0x0203, "NUM4");
+ map.put(0x0204, "NUM5");
+ map.put(0x0205, "NUM6");
+ map.put(0x0206, "NUM7");
+ map.put(0x0207, "NUM8");
+ map.put(0x0208, "NUM9");
+ } else if (romType == Type_ORAS) {
+ map.put(0xFF00, "COLOR");
+ map.put(0x0100, "TRNAME");
+ map.put(0x0101, "PKNAME");
+ map.put(0x0102, "PKNICK");
+ map.put(0x0103, "TYPE");
+ map.put(0x0105, "LOCATION");
+ map.put(0x0106, "ABILITY");
+ map.put(0x0107, "MOVE");
+ map.put(0x0108, "ITEM1");
+ map.put(0x0109, "ITEM2");
+ map.put(0x010A, "sTRBAG");
+ map.put(0x010B, "BOX");
+ map.put(0x010D, "EVSTAT");
+ map.put(0x0110, "OPOWER");
+ map.put(0x0127, "RIBBON");
+ map.put(0x0134, "MIINAME");
+ map.put(0x013E, "WEATHER");
+ map.put(0x0189, "TRNICK");
+ map.put(0x018A, "1stchrTR");
+ map.put(0x018B, "SHOUTOUT");
+ map.put(0x018E, "BERRY");
+ map.put(0x018F, "REMFEEL");
+ map.put(0x0190, "REMQUAL");
+ map.put(0x0191, "WEBSITE");
+ map.put(0x019C, "CHOICECOS");
+ map.put(0x01A1, "GSYNCID");
+ map.put(0x0192, "PRVIDSAY");
+ map.put(0x0193, "BTLTEST");
+ map.put(0x0195, "GENLOC");
+ map.put(0x0199, "CHOICEFOOD");
+ map.put(0x019A, "HOTELITEM");
+ map.put(0x019B, "TAXISTOP");
+ map.put(0x019F, "MAISTITLE");
+ map.put(0x1000, "ITEMPLUR0");
+ map.put(0x1001, "ITEMPLUR1");
+ map.put(0x1100, "GENDBR");
+ map.put(0x1101, "NUMBRNCH");
+ map.put(0x1302, "iCOLOR2");
+ map.put(0x1303, "iCOLOR3");
+ map.put(0x0200, "NUM1");
+ map.put(0x0201, "NUM2");
+ map.put(0x0202, "NUM3");
+ map.put(0x0203, "NUM4");
+ map.put(0x0204, "NUM5");
+ map.put(0x0205, "NUM6");
+ map.put(0x0206, "NUM7");
+ map.put(0x0207, "NUM8");
+ map.put(0x0208, "NUM9");
+ } else if (romType == Type_SM) {
+ map.put(0xFF00, "COLOR");
+ map.put(0x0100, "TRNAME");
+ map.put(0x0101, "PKNAME");
+ map.put(0x0102, "PKNICK");
+ map.put(0x0103, "TYPE");
+ map.put(0x0105, "LOCATION");
+ map.put(0x0106, "ABILITY");
+ map.put(0x0107, "MOVE");
+ map.put(0x0108, "ITEM1");
+ map.put(0x0109, "ITEM2");
+ map.put(0x010A, "sTRBAG");
+ map.put(0x010B, "BOX");
+ map.put(0x010D, "EVSTAT");
+ map.put(0x0110, "OPOWER");
+ map.put(0x0127, "RIBBON");
+ map.put(0x0134, "MIINAME");
+ map.put(0x013E, "WEATHER");
+ map.put(0x0189, "TRNICK");
+ map.put(0x018A, "1stchrTR");
+ map.put(0x018B, "SHOUTOUT");
+ map.put(0x018E, "BERRY");
+ map.put(0x018F, "REMFEEL");
+ map.put(0x0190, "REMQUAL");
+ map.put(0x0191, "WEBSITE");
+ map.put(0x019C, "CHOICECOS");
+ map.put(0x01A1, "GSYNCID");
+ map.put(0x0192, "PRVIDSAY");
+ map.put(0x0193, "BTLTEST");
+ map.put(0x0195, "GENLOC");
+ map.put(0x0199, "CHOICEFOOD");
+ map.put(0x019A, "HOTELITEM");
+ map.put(0x019B, "TAXISTOP");
+ map.put(0x019F, "MAISTITLE");
+ map.put(0x1000, "ITEMPLUR0");
+ map.put(0x1001, "ITEMPLUR1");
+ map.put(0x1100, "GENDBR");
+ map.put(0x1101, "NUMBRNCH");
+ map.put(0x1302, "iCOLOR2");
+ map.put(0x1303, "iCOLOR3");
+ map.put(0x0200, "NUM1");
+ map.put(0x0201, "NUM2");
+ map.put(0x0202, "NUM3");
+ map.put(0x0203, "NUM4");
+ map.put(0x0204, "NUM5");
+ map.put(0x0205, "NUM6");
+ map.put(0x0206, "NUM7");
+ map.put(0x0207, "NUM8");
+ map.put(0x0208, "NUM9");
+ }
+ return map;
+ }
+
+ public static int getVariableCode(String name, int romType) {
+ Map<Integer,String> map = getTextVariableCodes(romType);
+ for (int k: map.keySet()) {
+ if (map.get(k).equals(name)) {
+ return k;
+ }
+ }
+ return 0;
+ }
+}
diff --git a/src/com/pkrandom/constants/Species.java b/src/com/pkrandom/constants/Species.java
new file mode 100644
index 0000000..74dba94
--- /dev/null
+++ b/src/com/pkrandom/constants/Species.java
@@ -0,0 +1,1407 @@
+package com.pkrandom.constants;
+
+/*----------------------------------------------------------------------------*/
+/*-- Species.java - defines a species number constant for every Pokemon. --*/
+/*-- --*/
+/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
+/*-- Pokemon and any associated names and the like are --*/
+/*-- trademark and (C) Nintendo 1996-2020. --*/
+/*-- --*/
+/*-- The custom code written here is licensed under the terms of the GPL: --*/
+/*-- --*/
+/*-- This program is free software: you can redistribute it and/or modify --*/
+/*-- it under the terms of the GNU General Public License as published by --*/
+/*-- the Free Software Foundation, either version 3 of the License, or --*/
+/*-- (at your option) any later version. --*/
+/*-- --*/
+/*-- This program is distributed in the hope that it will be useful, --*/
+/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
+/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
+/*-- GNU General Public License for more details. --*/
+/*-- --*/
+/*-- You should have received a copy of the GNU General Public License --*/
+/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
+/*----------------------------------------------------------------------------*/
+
+public class Species {
+ public static final int bulbasaur = 1;
+ public static final int ivysaur = 2;
+ public static final int venusaur = 3;
+ public static final int charmander = 4;
+ public static final int charmeleon = 5;
+ public static final int charizard = 6;
+ public static final int squirtle = 7;
+ public static final int wartortle = 8;
+ public static final int blastoise = 9;
+ public static final int caterpie = 10;
+ public static final int metapod = 11;
+ public static final int butterfree = 12;
+ public static final int weedle = 13;
+ public static final int kakuna = 14;
+ public static final int beedrill = 15;
+ public static final int pidgey = 16;
+ public static final int pidgeotto = 17;
+ public static final int pidgeot = 18;
+ public static final int rattata = 19;
+ public static final int raticate = 20;
+ public static final int spearow = 21;
+ public static final int fearow = 22;
+ public static final int ekans = 23;
+ public static final int arbok = 24;
+ public static final int pikachu = 25;
+ public static final int raichu = 26;
+ public static final int sandshrew = 27;
+ public static final int sandslash = 28;
+ public static final int nidoranFemale = 29;
+ public static final int nidorina = 30;
+ public static final int nidoqueen = 31;
+ public static final int nidoranMale = 32;
+ public static final int nidorino = 33;
+ public static final int nidoking = 34;
+ public static final int clefairy = 35;
+ public static final int clefable = 36;
+ public static final int vulpix = 37;
+ public static final int ninetales = 38;
+ public static final int jigglypuff = 39;
+ public static final int wigglytuff = 40;
+ public static final int zubat = 41;
+ public static final int golbat = 42;
+ public static final int oddish = 43;
+ public static final int gloom = 44;
+ public static final int vileplume = 45;
+ public static final int paras = 46;
+ public static final int parasect = 47;
+ public static final int venonat = 48;
+ public static final int venomoth = 49;
+ public static final int diglett = 50;
+ public static final int dugtrio = 51;
+ public static final int meowth = 52;
+ public static final int persian = 53;
+ public static final int psyduck = 54;
+ public static final int golduck = 55;
+ public static final int mankey = 56;
+ public static final int primeape = 57;
+ public static final int growlithe = 58;
+ public static final int arcanine = 59;
+ public static final int poliwag = 60;
+ public static final int poliwhirl = 61;
+ public static final int poliwrath = 62;
+ public static final int abra = 63;
+ public static final int kadabra = 64;
+ public static final int alakazam = 65;
+ public static final int machop = 66;
+ public static final int machoke = 67;
+ public static final int machamp = 68;
+ public static final int bellsprout = 69;
+ public static final int weepinbell = 70;
+ public static final int victreebel = 71;
+ public static final int tentacool = 72;
+ public static final int tentacruel = 73;
+ public static final int geodude = 74;
+ public static final int graveler = 75;
+ public static final int golem = 76;
+ public static final int ponyta = 77;
+ public static final int rapidash = 78;
+ public static final int slowpoke = 79;
+ public static final int slowbro = 80;
+ public static final int magnemite = 81;
+ public static final int magneton = 82;
+ public static final int farfetchd = 83;
+ public static final int doduo = 84;
+ public static final int dodrio = 85;
+ public static final int seel = 86;
+ public static final int dewgong = 87;
+ public static final int grimer = 88;
+ public static final int muk = 89;
+ public static final int shellder = 90;
+ public static final int cloyster = 91;
+ public static final int gastly = 92;
+ public static final int haunter = 93;
+ public static final int gengar = 94;
+ public static final int onix = 95;
+ public static final int drowzee = 96;
+ public static final int hypno = 97;
+ public static final int krabby = 98;
+ public static final int kingler = 99;
+ public static final int voltorb = 100;
+ public static final int electrode = 101;
+ public static final int exeggcute = 102;
+ public static final int exeggutor = 103;
+ public static final int cubone = 104;
+ public static final int marowak = 105;
+ public static final int hitmonlee = 106;
+ public static final int hitmonchan = 107;
+ public static final int lickitung = 108;
+ public static final int koffing = 109;
+ public static final int weezing = 110;
+ public static final int rhyhorn = 111;
+ public static final int rhydon = 112;
+ public static final int chansey = 113;
+ public static final int tangela = 114;
+ public static final int kangaskhan = 115;
+ public static final int horsea = 116;
+ public static final int seadra = 117;
+ public static final int goldeen = 118;
+ public static final int seaking = 119;
+ public static final int staryu = 120;
+ public static final int starmie = 121;
+ public static final int mrMime = 122;
+ public static final int scyther = 123;
+ public static final int jynx = 124;
+ public static final int electabuzz = 125;
+ public static final int magmar = 126;
+ public static final int pinsir = 127;
+ public static final int tauros = 128;
+ public static final int magikarp = 129;
+ public static final int gyarados = 130;
+ public static final int lapras = 131;
+ public static final int ditto = 132;
+ public static final int eevee = 133;
+ public static final int vaporeon = 134;
+ public static final int jolteon = 135;
+ public static final int flareon = 136;
+ public static final int porygon = 137;
+ public static final int omanyte = 138;
+ public static final int omastar = 139;
+ public static final int kabuto = 140;
+ public static final int kabutops = 141;
+ public static final int aerodactyl = 142;
+ public static final int snorlax = 143;
+ public static final int articuno = 144;
+ public static final int zapdos = 145;
+ public static final int moltres = 146;
+ public static final int dratini = 147;
+ public static final int dragonair = 148;
+ public static final int dragonite = 149;
+ public static final int mewtwo = 150;
+ public static final int mew = 151;
+ public static final int chikorita = 152;
+ public static final int bayleef = 153;
+ public static final int meganium = 154;
+ public static final int cyndaquil = 155;
+ public static final int quilava = 156;
+ public static final int typhlosion = 157;
+ public static final int totodile = 158;
+ public static final int croconaw = 159;
+ public static final int feraligatr = 160;
+ public static final int sentret = 161;
+ public static final int furret = 162;
+ public static final int hoothoot = 163;
+ public static final int noctowl = 164;
+ public static final int ledyba = 165;
+ public static final int ledian = 166;
+ public static final int spinarak = 167;
+ public static final int ariados = 168;
+ public static final int crobat = 169;
+ public static final int chinchou = 170;
+ public static final int lanturn = 171;
+ public static final int pichu = 172;
+ public static final int cleffa = 173;
+ public static final int igglybuff = 174;
+ public static final int togepi = 175;
+ public static final int togetic = 176;
+ public static final int natu = 177;
+ public static final int xatu = 178;
+ public static final int mareep = 179;
+ public static final int flaaffy = 180;
+ public static final int ampharos = 181;
+ public static final int bellossom = 182;
+ public static final int marill = 183;
+ public static final int azumarill = 184;
+ public static final int sudowoodo = 185;
+ public static final int politoed = 186;
+ public static final int hoppip = 187;
+ public static final int skiploom = 188;
+ public static final int jumpluff = 189;
+ public static final int aipom = 190;
+ public static final int sunkern = 191;
+ public static final int sunflora = 192;
+ public static final int yanma = 193;
+ public static final int wooper = 194;
+ public static final int quagsire = 195;
+ public static final int espeon = 196;
+ public static final int umbreon = 197;
+ public static final int murkrow = 198;
+ public static final int slowking = 199;
+ public static final int misdreavus = 200;
+ public static final int unown = 201;
+ public static final int wobbuffet = 202;
+ public static final int girafarig = 203;
+ public static final int pineco = 204;
+ public static final int forretress = 205;
+ public static final int dunsparce = 206;
+ public static final int gligar = 207;
+ public static final int steelix = 208;
+ public static final int snubbull = 209;
+ public static final int granbull = 210;
+ public static final int qwilfish = 211;
+ public static final int scizor = 212;
+ public static final int shuckle = 213;
+ public static final int heracross = 214;
+ public static final int sneasel = 215;
+ public static final int teddiursa = 216;
+ public static final int ursaring = 217;
+ public static final int slugma = 218;
+ public static final int magcargo = 219;
+ public static final int swinub = 220;
+ public static final int piloswine = 221;
+ public static final int corsola = 222;
+ public static final int remoraid = 223;
+ public static final int octillery = 224;
+ public static final int delibird = 225;
+ public static final int mantine = 226;
+ public static final int skarmory = 227;
+ public static final int houndour = 228;
+ public static final int houndoom = 229;
+ public static final int kingdra = 230;
+ public static final int phanpy = 231;
+ public static final int donphan = 232;
+ public static final int porygon2 = 233;
+ public static final int stantler = 234;
+ public static final int smeargle = 235;
+ public static final int tyrogue = 236;
+ public static final int hitmontop = 237;
+ public static final int smoochum = 238;
+ public static final int elekid = 239;
+ public static final int magby = 240;
+ public static final int miltank = 241;
+ public static final int blissey = 242;
+ public static final int raikou = 243;
+ public static final int entei = 244;
+ public static final int suicune = 245;
+ public static final int larvitar = 246;
+ public static final int pupitar = 247;
+ public static final int tyranitar = 248;
+ public static final int lugia = 249;
+ public static final int hoOh = 250;
+ public static final int celebi = 251;
+ public static final int treecko = 252;
+ public static final int grovyle = 253;
+ public static final int sceptile = 254;
+ public static final int torchic = 255;
+ public static final int combusken = 256;
+ public static final int blaziken = 257;
+ public static final int mudkip = 258;
+ public static final int marshtomp = 259;
+ public static final int swampert = 260;
+ public static final int poochyena = 261;
+ public static final int mightyena = 262;
+ public static final int zigzagoon = 263;
+ public static final int linoone = 264;
+ public static final int wurmple = 265;
+ public static final int silcoon = 266;
+ public static final int beautifly = 267;
+ public static final int cascoon = 268;
+ public static final int dustox = 269;
+ public static final int lotad = 270;
+ public static final int lombre = 271;
+ public static final int ludicolo = 272;
+ public static final int seedot = 273;
+ public static final int nuzleaf = 274;
+ public static final int shiftry = 275;
+ public static final int taillow = 276;
+ public static final int swellow = 277;
+ public static final int wingull = 278;
+ public static final int pelipper = 279;
+ public static final int ralts = 280;
+ public static final int kirlia = 281;
+ public static final int gardevoir = 282;
+ public static final int surskit = 283;
+ public static final int masquerain = 284;
+ public static final int shroomish = 285;
+ public static final int breloom = 286;
+ public static final int slakoth = 287;
+ public static final int vigoroth = 288;
+ public static final int slaking = 289;
+ public static final int nincada = 290;
+ public static final int ninjask = 291;
+ public static final int shedinja = 292;
+ public static final int whismur = 293;
+ public static final int loudred = 294;
+ public static final int exploud = 295;
+ public static final int makuhita = 296;
+ public static final int hariyama = 297;
+ public static final int azurill = 298;
+ public static final int nosepass = 299;
+ public static final int skitty = 300;
+ public static final int delcatty = 301;
+ public static final int sableye = 302;
+ public static final int mawile = 303;
+ public static final int aron = 304;
+ public static final int lairon = 305;
+ public static final int aggron = 306;
+ public static final int meditite = 307;
+ public static final int medicham = 308;
+ public static final int electrike = 309;
+ public static final int manectric = 310;
+ public static final int plusle = 311;
+ public static final int minun = 312;
+ public static final int volbeat = 313;
+ public static final int illumise = 314;
+ public static final int roselia = 315;
+ public static final int gulpin = 316;
+ public static final int swalot = 317;
+ public static final int carvanha = 318;
+ public static final int sharpedo = 319;
+ public static final int wailmer = 320;
+ public static final int wailord = 321;
+ public static final int numel = 322;
+ public static final int camerupt = 323;
+ public static final int torkoal = 324;
+ public static final int spoink = 325;
+ public static final int grumpig = 326;
+ public static final int spinda = 327;
+ public static final int trapinch = 328;
+ public static final int vibrava = 329;
+ public static final int flygon = 330;
+ public static final int cacnea = 331;
+ public static final int cacturne = 332;
+ public static final int swablu = 333;
+ public static final int altaria = 334;
+ public static final int zangoose = 335;
+ public static final int seviper = 336;
+ public static final int lunatone = 337;
+ public static final int solrock = 338;
+ public static final int barboach = 339;
+ public static final int whiscash = 340;
+ public static final int corphish = 341;
+ public static final int crawdaunt = 342;
+ public static final int baltoy = 343;
+ public static final int claydol = 344;
+ public static final int lileep = 345;
+ public static final int cradily = 346;
+ public static final int anorith = 347;
+ public static final int armaldo = 348;
+ public static final int feebas = 349;
+ public static final int milotic = 350;
+ public static final int castform = 351;
+ public static final int kecleon = 352;
+ public static final int shuppet = 353;
+ public static final int banette = 354;
+ public static final int duskull = 355;
+ public static final int dusclops = 356;
+ public static final int tropius = 357;
+ public static final int chimecho = 358;
+ public static final int absol = 359;
+ public static final int wynaut = 360;
+ public static final int snorunt = 361;
+ public static final int glalie = 362;
+ public static final int spheal = 363;
+ public static final int sealeo = 364;
+ public static final int walrein = 365;
+ public static final int clamperl = 366;
+ public static final int huntail = 367;
+ public static final int gorebyss = 368;
+ public static final int relicanth = 369;
+ public static final int luvdisc = 370;
+ public static final int bagon = 371;
+ public static final int shelgon = 372;
+ public static final int salamence = 373;
+ public static final int beldum = 374;
+ public static final int metang = 375;
+ public static final int metagross = 376;
+ public static final int regirock = 377;
+ public static final int regice = 378;
+ public static final int registeel = 379;
+ public static final int latias = 380;
+ public static final int latios = 381;
+ public static final int kyogre = 382;
+ public static final int groudon = 383;
+ public static final int rayquaza = 384;
+ public static final int jirachi = 385;
+ public static final int deoxys = 386;
+ public static final int turtwig = 387;
+ public static final int grotle = 388;
+ public static final int torterra = 389;
+ public static final int chimchar = 390;
+ public static final int monferno = 391;
+ public static final int infernape = 392;
+ public static final int piplup = 393;
+ public static final int prinplup = 394;
+ public static final int empoleon = 395;
+ public static final int starly = 396;
+ public static final int staravia = 397;
+ public static final int staraptor = 398;
+ public static final int bidoof = 399;
+ public static final int bibarel = 400;
+ public static final int kricketot = 401;
+ public static final int kricketune = 402;
+ public static final int shinx = 403;
+ public static final int luxio = 404;
+ public static final int luxray = 405;
+ public static final int budew = 406;
+ public static final int roserade = 407;
+ public static final int cranidos = 408;
+ public static final int rampardos = 409;
+ public static final int shieldon = 410;
+ public static final int bastiodon = 411;
+ public static final int burmy = 412;
+ public static final int wormadam = 413;
+ public static final int mothim = 414;
+ public static final int combee = 415;
+ public static final int vespiquen = 416;
+ public static final int pachirisu = 417;
+ public static final int buizel = 418;
+ public static final int floatzel = 419;
+ public static final int cherubi = 420;
+ public static final int cherrim = 421;
+ public static final int shellos = 422;
+ public static final int gastrodon = 423;
+ public static final int ambipom = 424;
+ public static final int drifloon = 425;
+ public static final int drifblim = 426;
+ public static final int buneary = 427;
+ public static final int lopunny = 428;
+ public static final int mismagius = 429;
+ public static final int honchkrow = 430;
+ public static final int glameow = 431;
+ public static final int purugly = 432;
+ public static final int chingling = 433;
+ public static final int stunky = 434;
+ public static final int skuntank = 435;
+ public static final int bronzor = 436;
+ public static final int bronzong = 437;
+ public static final int bonsly = 438;
+ public static final int mimeJr = 439;
+ public static final int happiny = 440;
+ public static final int chatot = 441;
+ public static final int spiritomb = 442;
+ public static final int gible = 443;
+ public static final int gabite = 444;
+ public static final int garchomp = 445;
+ public static final int munchlax = 446;
+ public static final int riolu = 447;
+ public static final int lucario = 448;
+ public static final int hippopotas = 449;
+ public static final int hippowdon = 450;
+ public static final int skorupi = 451;
+ public static final int drapion = 452;
+ public static final int croagunk = 453;
+ public static final int toxicroak = 454;
+ public static final int carnivine = 455;
+ public static final int finneon = 456;
+ public static final int lumineon = 457;
+ public static final int mantyke = 458;
+ public static final int snover = 459;
+ public static final int abomasnow = 460;
+ public static final int weavile = 461;
+ public static final int magnezone = 462;
+ public static final int lickilicky = 463;
+ public static final int rhyperior = 464;
+ public static final int tangrowth = 465;
+ public static final int electivire = 466;
+ public static final int magmortar = 467;
+ public static final int togekiss = 468;
+ public static final int yanmega = 469;
+ public static final int leafeon = 470;
+ public static final int glaceon = 471;
+ public static final int gliscor = 472;
+ public static final int mamoswine = 473;
+ public static final int porygonZ = 474;
+ public static final int gallade = 475;
+ public static final int probopass = 476;
+ public static final int dusknoir = 477;
+ public static final int froslass = 478;
+ public static final int rotom = 479;
+ public static final int uxie = 480;
+ public static final int mesprit = 481;
+ public static final int azelf = 482;
+ public static final int dialga = 483;
+ public static final int palkia = 484;
+ public static final int heatran = 485;
+ public static final int regigigas = 486;
+ public static final int giratina = 487;
+ public static final int cresselia = 488;
+ public static final int phione = 489;
+ public static final int manaphy = 490;
+ public static final int darkrai = 491;
+ public static final int shaymin = 492;
+ public static final int arceus = 493;
+ public static final int victini = 494;
+ public static final int snivy = 495;
+ public static final int servine = 496;
+ public static final int serperior = 497;
+ public static final int tepig = 498;
+ public static final int pignite = 499;
+ public static final int emboar = 500;
+ public static final int oshawott = 501;
+ public static final int dewott = 502;
+ public static final int samurott = 503;
+ public static final int patrat = 504;
+ public static final int watchog = 505;
+ public static final int lillipup = 506;
+ public static final int herdier = 507;
+ public static final int stoutland = 508;
+ public static final int purrloin = 509;
+ public static final int liepard = 510;
+ public static final int pansage = 511;
+ public static final int simisage = 512;
+ public static final int pansear = 513;
+ public static final int simisear = 514;
+ public static final int panpour = 515;
+ public static final int simipour = 516;
+ public static final int munna = 517;
+ public static final int musharna = 518;
+ public static final int pidove = 519;
+ public static final int tranquill = 520;
+ public static final int unfezant = 521;
+ public static final int blitzle = 522;
+ public static final int zebstrika = 523;
+ public static final int roggenrola = 524;
+ public static final int boldore = 525;
+ public static final int gigalith = 526;
+ public static final int woobat = 527;
+ public static final int swoobat = 528;
+ public static final int drilbur = 529;
+ public static final int excadrill = 530;
+ public static final int audino = 531;
+ public static final int timburr = 532;
+ public static final int gurdurr = 533;
+ public static final int conkeldurr = 534;
+ public static final int tympole = 535;
+ public static final int palpitoad = 536;
+ public static final int seismitoad = 537;
+ public static final int throh = 538;
+ public static final int sawk = 539;
+ public static final int sewaddle = 540;
+ public static final int swadloon = 541;
+ public static final int leavanny = 542;
+ public static final int venipede = 543;
+ public static final int whirlipede = 544;
+ public static final int scolipede = 545;
+ public static final int cottonee = 546;
+ public static final int whimsicott = 547;
+ public static final int petilil = 548;
+ public static final int lilligant = 549;
+ public static final int basculin = 550;
+ public static final int sandile = 551;
+ public static final int krokorok = 552;
+ public static final int krookodile = 553;
+ public static final int darumaka = 554;
+ public static final int darmanitan = 555;
+ public static final int maractus = 556;
+ public static final int dwebble = 557;
+ public static final int crustle = 558;
+ public static final int scraggy = 559;
+ public static final int scrafty = 560;
+ public static final int sigilyph = 561;
+ public static final int yamask = 562;
+ public static final int cofagrigus = 563;
+ public static final int tirtouga = 564;
+ public static final int carracosta = 565;
+ public static final int archen = 566;
+ public static final int archeops = 567;
+ public static final int trubbish = 568;
+ public static final int garbodor = 569;
+ public static final int zorua = 570;
+ public static final int zoroark = 571;
+ public static final int minccino = 572;
+ public static final int cinccino = 573;
+ public static final int gothita = 574;
+ public static final int gothorita = 575;
+ public static final int gothitelle = 576;
+ public static final int solosis = 577;
+ public static final int duosion = 578;
+ public static final int reuniclus = 579;
+ public static final int ducklett = 580;
+ public static final int swanna = 581;
+ public static final int vanillite = 582;
+ public static final int vanillish = 583;
+ public static final int vanilluxe = 584;
+ public static final int deerling = 585;
+ public static final int sawsbuck = 586;
+ public static final int emolga = 587;
+ public static final int karrablast = 588;
+ public static final int escavalier = 589;
+ public static final int foongus = 590;
+ public static final int amoonguss = 591;
+ public static final int frillish = 592;
+ public static final int jellicent = 593;
+ public static final int alomomola = 594;
+ public static final int joltik = 595;
+ public static final int galvantula = 596;
+ public static final int ferroseed = 597;
+ public static final int ferrothorn = 598;
+ public static final int klink = 599;
+ public static final int klang = 600;
+ public static final int klinklang = 601;
+ public static final int tynamo = 602;
+ public static final int eelektrik = 603;
+ public static final int eelektross = 604;
+ public static final int elgyem = 605;
+ public static final int beheeyem = 606;
+ public static final int litwick = 607;
+ public static final int lampent = 608;
+ public static final int chandelure = 609;
+ public static final int axew = 610;
+ public static final int fraxure = 611;
+ public static final int haxorus = 612;
+ public static final int cubchoo = 613;
+ public static final int beartic = 614;
+ public static final int cryogonal = 615;
+ public static final int shelmet = 616;
+ public static final int accelgor = 617;
+ public static final int stunfisk = 618;
+ public static final int mienfoo = 619;
+ public static final int mienshao = 620;
+ public static final int druddigon = 621;
+ public static final int golett = 622;
+ public static final int golurk = 623;
+ public static final int pawniard = 624;
+ public static final int bisharp = 625;
+ public static final int bouffalant = 626;
+ public static final int rufflet = 627;
+ public static final int braviary = 628;
+ public static final int vullaby = 629;
+ public static final int mandibuzz = 630;
+ public static final int heatmor = 631;
+ public static final int durant = 632;
+ public static final int deino = 633;
+ public static final int zweilous = 634;
+ public static final int hydreigon = 635;
+ public static final int larvesta = 636;
+ public static final int volcarona = 637;
+ public static final int cobalion = 638;
+ public static final int terrakion = 639;
+ public static final int virizion = 640;
+ public static final int tornadus = 641;
+ public static final int thundurus = 642;
+ public static final int reshiram = 643;
+ public static final int zekrom = 644;
+ public static final int landorus = 645;
+ public static final int kyurem = 646;
+ public static final int keldeo = 647;
+ public static final int meloetta = 648;
+ public static final int genesect = 649;
+ public static final int chespin = 650;
+ public static final int quilladin = 651;
+ public static final int chesnaught = 652;
+ public static final int fennekin = 653;
+ public static final int braixen = 654;
+ public static final int delphox = 655;
+ public static final int froakie = 656;
+ public static final int frogadier = 657;
+ public static final int greninja = 658;
+ public static final int bunnelby = 659;
+ public static final int diggersby = 660;
+ public static final int fletchling = 661;
+ public static final int fletchinder = 662;
+ public static final int talonflame = 663;
+ public static final int scatterbug = 664;
+ public static final int spewpa = 665;
+ public static final int vivillon = 666;
+ public static final int litleo = 667;
+ public static final int pyroar = 668;
+ public static final int flabébé = 669;
+ public static final int floette = 670;
+ public static final int florges = 671;
+ public static final int skiddo = 672;
+ public static final int gogoat = 673;
+ public static final int pancham = 674;
+ public static final int pangoro = 675;
+ public static final int furfrou = 676;
+ public static final int espurr = 677;
+ public static final int meowstic = 678;
+ public static final int honedge = 679;
+ public static final int doublade = 680;
+ public static final int aegislash = 681;
+ public static final int spritzee = 682;
+ public static final int aromatisse = 683;
+ public static final int swirlix = 684;
+ public static final int slurpuff = 685;
+ public static final int inkay = 686;
+ public static final int malamar = 687;
+ public static final int binacle = 688;
+ public static final int barbaracle = 689;
+ public static final int skrelp = 690;
+ public static final int dragalge = 691;
+ public static final int clauncher = 692;
+ public static final int clawitzer = 693;
+ public static final int helioptile = 694;
+ public static final int heliolisk = 695;
+ public static final int tyrunt = 696;
+ public static final int tyrantrum = 697;
+ public static final int amaura = 698;
+ public static final int aurorus = 699;
+ public static final int sylveon = 700;
+ public static final int hawlucha = 701;
+ public static final int dedenne = 702;
+ public static final int carbink = 703;
+ public static final int goomy = 704;
+ public static final int sliggoo = 705;
+ public static final int goodra = 706;
+ public static final int klefki = 707;
+ public static final int phantump = 708;
+ public static final int trevenant = 709;
+ public static final int pumpkaboo = 710;
+ public static final int gourgeist = 711;
+ public static final int bergmite = 712;
+ public static final int avalugg = 713;
+ public static final int noibat = 714;
+ public static final int noivern = 715;
+ public static final int xerneas = 716;
+ public static final int yveltal = 717;
+ public static final int zygarde = 718;
+ public static final int diancie = 719;
+ public static final int hoopa = 720;
+ public static final int volcanion = 721;
+ public static final int rowlet = 722;
+ public static final int dartrix = 723;
+ public static final int decidueye = 724;
+ public static final int litten = 725;
+ public static final int torracat = 726;
+ public static final int incineroar = 727;
+ public static final int popplio = 728;
+ public static final int brionne = 729;
+ public static final int primarina = 730;
+ public static final int pikipek = 731;
+ public static final int trumbeak = 732;
+ public static final int toucannon = 733;
+ public static final int yungoos = 734;
+ public static final int gumshoos = 735;
+ public static final int grubbin = 736;
+ public static final int charjabug = 737;
+ public static final int vikavolt = 738;
+ public static final int crabrawler = 739;
+ public static final int crabominable = 740;
+ public static final int oricorio = 741;
+ public static final int cutiefly = 742;
+ public static final int ribombee = 743;
+ public static final int rockruff = 744;
+ public static final int lycanroc = 745;
+ public static final int wishiwashi = 746;
+ public static final int mareanie = 747;
+ public static final int toxapex = 748;
+ public static final int mudbray = 749;
+ public static final int mudsdale = 750;
+ public static final int dewpider = 751;
+ public static final int araquanid = 752;
+ public static final int fomantis = 753;
+ public static final int lurantis = 754;
+ public static final int morelull = 755;
+ public static final int shiinotic = 756;
+ public static final int salandit = 757;
+ public static final int salazzle = 758;
+ public static final int stufful = 759;
+ public static final int bewear = 760;
+ public static final int bounsweet = 761;
+ public static final int steenee = 762;
+ public static final int tsareena = 763;
+ public static final int comfey = 764;
+ public static final int oranguru = 765;
+ public static final int passimian = 766;
+ public static final int wimpod = 767;
+ public static final int golisopod = 768;
+ public static final int sandygast = 769;
+ public static final int palossand = 770;
+ public static final int pyukumuku = 771;
+ public static final int typeNull = 772;
+ public static final int silvally = 773;
+ public static final int minior = 774;
+ public static final int komala = 775;
+ public static final int turtonator = 776;
+ public static final int togedemaru = 777;
+ public static final int mimikyu = 778;
+ public static final int bruxish = 779;
+ public static final int drampa = 780;
+ public static final int dhelmise = 781;
+ public static final int jangmoO = 782;
+ public static final int hakamoO = 783;
+ public static final int kommoO = 784;
+ public static final int tapuKoko = 785;
+ public static final int tapuLele = 786;
+ public static final int tapuBulu = 787;
+ public static final int tapuFini = 788;
+ public static final int cosmog = 789;
+ public static final int cosmoem = 790;
+ public static final int solgaleo = 791;
+ public static final int lunala = 792;
+ public static final int nihilego = 793;
+ public static final int buzzwole = 794;
+ public static final int pheromosa = 795;
+ public static final int xurkitree = 796;
+ public static final int celesteela = 797;
+ public static final int kartana = 798;
+ public static final int guzzlord = 799;
+ public static final int necrozma = 800;
+ public static final int magearna = 801;
+ public static final int marshadow = 802;
+ public static final int poipole = 803;
+ public static final int naganadel = 804;
+ public static final int stakataka = 805;
+ public static final int blacephalon = 806;
+ public static final int zeraora = 807;
+ public static final int meltan = 808;
+ public static final int melmetal = 809;
+ public static final int grookey = 810;
+ public static final int thwackey = 811;
+ public static final int rillaboom = 812;
+ public static final int scorbunny = 813;
+ public static final int raboot = 814;
+ public static final int cinderace = 815;
+ public static final int sobble = 816;
+ public static final int drizzile = 817;
+ public static final int inteleon = 818;
+ public static final int skwovet = 819;
+ public static final int greedent = 820;
+ public static final int rookidee = 821;
+ public static final int corvisquire = 822;
+ public static final int corviknight = 823;
+ public static final int blipbug = 824;
+ public static final int dottler = 825;
+ public static final int orbeetle = 826;
+ public static final int nickit = 827;
+ public static final int thievul = 828;
+ public static final int gossifleur = 829;
+ public static final int eldegoss = 830;
+ public static final int wooloo = 831;
+ public static final int dubwool = 832;
+ public static final int chewtle = 833;
+ public static final int drednaw = 834;
+ public static final int yamper = 835;
+ public static final int boltund = 836;
+ public static final int rolycoly = 837;
+ public static final int carkol = 838;
+ public static final int coalossal = 839;
+ public static final int applin = 840;
+ public static final int flapple = 841;
+ public static final int appletun = 842;
+ public static final int silicobra = 843;
+ public static final int sandaconda = 844;
+ public static final int cramorant = 845;
+ public static final int arrokuda = 846;
+ public static final int barraskewda = 847;
+ public static final int toxel = 848;
+ public static final int toxtricity = 849;
+ public static final int sizzlipede = 850;
+ public static final int centiskorch = 851;
+ public static final int clobbopus = 852;
+ public static final int grapploct = 853;
+ public static final int sinistea = 854;
+ public static final int polteageist = 855;
+ public static final int hatenna = 856;
+ public static final int hattrem = 857;
+ public static final int hatterene = 858;
+ public static final int impidimp = 859;
+ public static final int morgrem = 860;
+ public static final int grimmsnarl = 861;
+ public static final int obstagoon = 862;
+ public static final int perrserker = 863;
+ public static final int cursola = 864;
+ public static final int sirfetchd = 865;
+ public static final int mrRime = 866;
+ public static final int runerigus = 867;
+ public static final int milcery = 868;
+ public static final int alcremie = 869;
+ public static final int falinks = 870;
+ public static final int pincurchin = 871;
+ public static final int snom = 872;
+ public static final int frosmoth = 873;
+ public static final int stonjourner = 874;
+ public static final int eiscue = 875;
+ public static final int indeedee = 876;
+ public static final int morpeko = 877;
+ public static final int cufant = 878;
+ public static final int copperajah = 879;
+ public static final int dracozolt = 880;
+ public static final int arctozolt = 881;
+ public static final int dracovish = 882;
+ public static final int arctovish = 883;
+ public static final int duraludon = 884;
+ public static final int dreepy = 885;
+ public static final int drakloak = 886;
+ public static final int dragapult = 887;
+ public static final int zacian = 888;
+ public static final int zamazenta = 889;
+ public static final int eternatus = 890;
+ public static final int kubfu = 891;
+ public static final int urshifu = 892;
+ public static final int zarude = 893;
+ public static final int regieleki = 894;
+ public static final int regidrago = 895;
+ public static final int glastrier = 896;
+ public static final int spectrier = 897;
+ public static final int calyrex = 898;
+
+ public static final class Gen4Formes {
+ public static final int deoxysA = 494;
+ public static final int deoxysD = 495;
+ public static final int deoxysS = 496;
+ public static final int wormadamS = 497;
+ public static final int wormadamT = 498;
+ public static final int giratinaO = 499;
+ public static final int shayminS = 500;
+ public static final int rotomH = 501;
+ public static final int rotomW = 502;
+ public static final int rotomFr = 503;
+ public static final int rotomFa = 504;
+ public static final int rotomM = 505;
+ }
+
+ public static final class Gen5Formes {
+ public static final int deoxysA = 650;
+ public static final int deoxysD = 651;
+ public static final int deoxysS = 652;
+ public static final int wormadamS = 653;
+ public static final int wormadamT = 654;
+ public static final int shayminS = 655;
+ public static final int giratinaO = 656;
+ public static final int rotomH = 657;
+ public static final int rotomW = 658;
+ public static final int rotomFr = 659;
+ public static final int rotomFa = 660;
+ public static final int rotomM = 661;
+ public static final int castformF = 662;
+ public static final int castformW = 663;
+ public static final int castformI = 664;
+ public static final int basculinB = 665;
+ public static final int darmanitanZ = 666;
+ public static final int meloettaP = 667;
+ public static final int kyuremW = 668;
+ public static final int kyuremB = 669;
+ public static final int keldeoCosmetic1 = 670;
+ public static final int tornadusT = 671;
+ public static final int thundurusT = 672;
+ public static final int landorusT = 673;
+ }
+
+ public static final class Gen6Formes {
+ public static final int deoxysA = 722;
+ public static final int deoxysD = 723;
+ public static final int deoxysS = 724;
+ public static final int wormadamS = 725;
+ public static final int wormadamT = 726;
+ public static final int shayminS = 727;
+ public static final int giratinaO = 728;
+ public static final int rotomH = 729;
+ public static final int rotomW = 730;
+ public static final int rotomFr = 731;
+ public static final int rotomFa = 732;
+ public static final int rotomM = 733;
+ public static final int castformF = 734;
+ public static final int castformW = 735;
+ public static final int castformI = 736;
+ public static final int cherrimCosmetic1 = 737;
+ public static final int basculinB = 738;
+ public static final int darmanitanZ = 739;
+ public static final int meloettaP = 740;
+ public static final int kyuremW = 741;
+ public static final int kyuremB = 742;
+ public static final int keldeoCosmetic1= 743;
+ public static final int tornadusT = 744;
+ public static final int thundurusT = 745;
+ public static final int landorusT = 746;
+ public static final int gengarMega = 747;
+ public static final int meowsticF = 748;
+ public static final int furfrouCosmetic1 = 749;
+ public static final int furfrouCosmetic2 = 750;
+ public static final int furfrouCosmetic3 = 751;
+ public static final int furfrouCosmetic4 = 752;
+ public static final int furfrouCosmetic5 = 753;
+ public static final int furfrouCosmetic6 = 754;
+ public static final int furfrouCosmetic7 = 755;
+ public static final int furfrouCosmetic8 = 756;
+ public static final int furfrouCosmetic9 = 757;
+ public static final int gardevoirMega = 758;
+ public static final int ampharosMega = 759;
+ public static final int venusaurMega = 760;
+ public static final int charizardMegaX = 761;
+ public static final int charizardMegaY = 762;
+ public static final int mewtwoMegaX = 763;
+ public static final int mewtwoMegaY = 764;
+ public static final int blazikenMega = 765;
+ public static final int medichamMega = 766;
+ public static final int houndoomMega = 767;
+ public static final int aggronMega = 768;
+ public static final int banetteMega = 769;
+ public static final int tyranitarMega = 770;
+ public static final int scizorMega = 771;
+ public static final int pinsirMega = 772;
+ public static final int aerodactylMega = 773;
+ public static final int lucarioMega = 774;
+ public static final int abomasnowMega = 775;
+ public static final int aegislashB = 776;
+ public static final int blastoiseMega = 777;
+ public static final int kangaskhanMega = 778;
+ public static final int gyaradosMega = 779;
+ public static final int absolMega = 780;
+ public static final int alakazamMega = 781;
+ public static final int heracrossMega = 782;
+ public static final int mawileMega = 783;
+ public static final int manectricMega = 784;
+ public static final int garchompMega = 785;
+ public static final int latiosMega = 786;
+ public static final int latiasMega = 787;
+ public static final int pumpkabooCosmetic1 = 788;
+ public static final int pumpkabooCosmetic2 = 789;
+ public static final int pumpkabooCosmetic3 = 790;
+ public static final int gourgeistCosmetic1 = 791;
+ public static final int gourgeistCosmetic2 = 792;
+ public static final int gourgeistCosmetic3 = 793;
+ public static final int floetteCosmetic1 = 794;
+ public static final int floetteCosmetic2 = 795;
+ public static final int floetteCosmetic3 = 796;
+ public static final int floetteCosmetic4 = 797;
+ public static final int floetteE = 798;
+ public static final int swampertMega = 799;
+ public static final int sceptileMega = 800;
+ public static final int sableyeMega = 801;
+ public static final int altariaMega = 802;
+ public static final int galladeMega = 803;
+ public static final int audinoMega = 804;
+ public static final int sharpedoMega = 805;
+ public static final int slowbroMega = 806;
+ public static final int steelixMega = 807;
+ public static final int pidgeotMega = 808;
+ public static final int glalieMega = 809;
+ public static final int diancieMega = 810;
+ public static final int metagrossMega = 811;
+ public static final int kyogreP = 812;
+ public static final int groudonP = 813;
+ public static final int rayquazaMega = 814;
+ public static final int pikachuCosmetic1 = 815;
+ public static final int pikachuCosmetic2 = 816;
+ public static final int pikachuCosmetic3 = 817;
+ public static final int pikachuCosmetic4 = 818;
+ public static final int pikachuCosmetic5 = 819;
+ public static final int pikachuCosmetic6 = 820;
+ public static final int hoopaU = 821;
+ public static final int cameruptMega = 822;
+ public static final int lopunnyMega = 823;
+ public static final int salamenceMega = 824;
+ public static final int beedrillMega = 825;
+ }
+
+ public static final class SMFormes {
+ public static final int deoxysA = 803;
+ public static final int deoxysD = 804;
+ public static final int deoxysS = 805;
+ public static final int wormadamS = 806;
+ public static final int wormadamT = 807;
+ public static final int shayminS = 808;
+ public static final int giratinaO = 809;
+ public static final int rotomH = 810;
+ public static final int rotomW = 811;
+ public static final int rotomFr = 812;
+ public static final int rotomFa = 813;
+ public static final int rotomM = 814;
+ public static final int castformF = 815;
+ public static final int castformW = 816;
+ public static final int castformI = 817;
+ public static final int cherrimCosmetic1 = 818;
+ public static final int shellosCosmetic1 = 819;
+ public static final int gastrodonCosmetic1 = 820;
+ public static final int basculinB = 821;
+ public static final int darmanitanZ = 822;
+ public static final int meloettaP = 823;
+ public static final int kyuremW = 824;
+ public static final int kyuremB = 825;
+ public static final int keldeoCosmetic1 = 826;
+ public static final int tornadusT = 827;
+ public static final int thundurusT = 828;
+ public static final int landorusT = 829;
+ public static final int gengarMega = 830;
+ public static final int meowsticF = 831;
+ public static final int furfrouCosmetic1 = 832;
+ public static final int furfrouCosmetic2 = 833;
+ public static final int furfrouCosmetic3 = 834;
+ public static final int furfrouCosmetic4 = 835;
+ public static final int furfrouCosmetic5 = 836;
+ public static final int furfrouCosmetic6 = 837;
+ public static final int furfrouCosmetic7 = 838;
+ public static final int furfrouCosmetic8 = 839;
+ public static final int furfrouCosmetic9 = 840;
+ public static final int gardevoirMega = 841;
+ public static final int ampharosMega = 842;
+ public static final int venusaurMega = 843;
+ public static final int charizardMegaX = 844;
+ public static final int charizardMegaY = 845;
+ public static final int mewtwoMegaX = 846;
+ public static final int mewtwoMegaY = 847;
+ public static final int blazikenMega = 848;
+ public static final int medichamMega = 849;
+ public static final int houndoomMega = 850;
+ public static final int aggronMega = 851;
+ public static final int banetteMega = 852;
+ public static final int tyranitarMega = 853;
+ public static final int scizorMega = 854;
+ public static final int pinsirMega = 855;
+ public static final int aerodactylMega = 856;
+ public static final int lucarioMega = 857;
+ public static final int abomasnowMega = 858;
+ public static final int aegislashB = 859;
+ public static final int blastoiseMega = 860;
+ public static final int kangaskhanMega = 861;
+ public static final int gyaradosMega = 862;
+ public static final int absolMega = 863;
+ public static final int alakazamMega = 864;
+ public static final int heracrossMega = 865;
+ public static final int mawileMega = 866;
+ public static final int manectricMega = 867;
+ public static final int garchompMega = 868;
+ public static final int latiosMega = 869;
+ public static final int latiasMega = 870;
+ public static final int pumpkabooCosmetic1 = 871;
+ public static final int pumpkabooCosmetic2 = 872;
+ public static final int pumpkabooCosmetic3 = 873;
+ public static final int gourgeistCosmetic1 = 874;
+ public static final int gourgeistCosmetic2 = 875;
+ public static final int gourgeistCosmetic3 = 876;
+ public static final int floetteCosmetic1 = 877;
+ public static final int floetteCosmetic2 = 878;
+ public static final int floetteCosmetic3 = 879;
+ public static final int floetteCosmetic4 = 880;
+ public static final int floetteE = 881;
+ public static final int swampertMega = 882;
+ public static final int sceptileMega = 883;
+ public static final int sableyeMega = 884;
+ public static final int altariaMega = 885;
+ public static final int galladeMega = 886;
+ public static final int audinoMega = 887;
+ public static final int sharpedoMega = 888;
+ public static final int slowbroMega = 889;
+ public static final int steelixMega = 890;
+ public static final int pidgeotMega = 891;
+ public static final int glalieMega = 892;
+ public static final int diancieMega = 893;
+ public static final int metagrossMega = 894;
+ public static final int kyogreP = 895;
+ public static final int groudonP = 896;
+ public static final int rayquazaMega = 897;
+ public static final int hoopaU = 898;
+ public static final int cameruptMega = 899;
+ public static final int lopunnyMega = 900;
+ public static final int salamenceMega = 901;
+ public static final int beedrillMega = 902;
+ public static final int wishiwashiS = 903;
+ public static final int oricorioE = 904;
+ public static final int oricorioP = 905;
+ public static final int oricorioG = 906;
+ public static final int lycanrocM = 907;
+ public static final int rattataA = 908;
+ public static final int raticateA = 909;
+ public static final int raticateACosmetic1 = 910;
+ public static final int raichuA = 911;
+ public static final int sandshrewA = 912;
+ public static final int sandslashA = 913;
+ public static final int vulpixA = 914;
+ public static final int ninetalesA = 915;
+ public static final int meowthA = 916;
+ public static final int persianA = 917;
+ public static final int geodudeA = 918;
+ public static final int gravelerA = 919;
+ public static final int golemA = 920;
+ public static final int grimerA = 921;
+ public static final int mukA = 922;
+ public static final int exeggutorA = 923;
+ public static final int marowakA = 924;
+ public static final int greninjaCosmetic1 = 925;
+ public static final int greninjaA = 926;
+ public static final int zygarde10 = 927;
+ public static final int zygarde10Cosmetic1 = 928;
+ public static final int zygardeCosmetic1 = 929;
+ public static final int zygardeC = 930;
+ public static final int miniorCosmetic1 = 931;
+ public static final int miniorCosmetic2 = 932;
+ public static final int miniorCosmetic3 = 933;
+ public static final int miniorCosmetic4 = 934;
+ public static final int miniorCosmetic5 = 935;
+ public static final int miniorCosmetic6 = 936;
+ public static final int miniorC = 937;
+ public static final int miniorCCosmetic1 = 938;
+ public static final int miniorCCosmetic2 = 939;
+ public static final int miniorCCosmetic3 = 940;
+ public static final int miniorCCosmetic4 = 941;
+ public static final int miniorCCosmetic5 = 942;
+ public static final int miniorCCosmetic6 = 943;
+ public static final int diglettA = 944;
+ public static final int dugtrioA = 945;
+ public static final int mimikyuCosmetic1 = 946;
+ public static final int mimikyuCosmetic2 = 947;
+ public static final int mimikyuCosmetic3 = 948;
+ public static final int magearnaCosmetic1 = 949;
+ public static final int pikachuCosmetic1 = 950;
+ public static final int pikachuCosmetic2 = 951;
+ public static final int pikachuCosmetic3 = 952;
+ public static final int pikachuCosmetic4 = 953;
+ public static final int pikachuCosmetic5 = 954;
+ public static final int pikachuCosmetic6 = 955;
+ public static final int gumshoosCosmetic1 = 956;
+ public static final int vikavoltCosmetic1 = 957;
+ public static final int lurantisCosmetic1 = 958;
+ public static final int salazzleCosmetic1 = 959;
+ public static final int kommoOCosmetic1 = 960;
+ }
+
+ public static final class USUMFormes {
+ public static final int deoxysA = 808;
+ public static final int deoxysD = 809;
+ public static final int deoxysS = 810;
+ public static final int wormadamS = 811;
+ public static final int wormadamT = 812;
+ public static final int shayminS = 813;
+ public static final int giratinaO = 814;
+ public static final int rotomH = 815;
+ public static final int rotomW = 816;
+ public static final int rotomFr = 817;
+ public static final int rotomFa = 818;
+ public static final int rotomM = 819;
+ public static final int castformF = 820;
+ public static final int castformW = 821;
+ public static final int castformI = 822;
+ public static final int cherrimCosmetic1 = 823;
+ public static final int shellosCosmetic1 = 824;
+ public static final int gastrodonCosmetic1 = 825;
+ public static final int basculinB = 826;
+ public static final int darmanitanZ = 827;
+ public static final int meloettaP = 828;
+ public static final int kyuremW = 829;
+ public static final int kyuremB = 830;
+ public static final int keldeoCosmetic1 = 831;
+ public static final int tornadusT = 832;
+ public static final int thundurusT = 833;
+ public static final int landorusT = 834;
+ public static final int gengarMega = 835;
+ public static final int meowsticF = 836;
+ public static final int furfrouCosmetic1 = 837;
+ public static final int furfrouCosmetic2 = 838;
+ public static final int furfrouCosmetic3 = 839;
+ public static final int furfrouCosmetic4 = 840;
+ public static final int furfrouCosmetic5 = 841;
+ public static final int furfrouCosmetic6 = 842;
+ public static final int furfrouCosmetic7 = 843;
+ public static final int furfrouCosmetic8 = 844;
+ public static final int furfrouCosmetic9 = 845;
+ public static final int gardevoirMega = 846;
+ public static final int ampharosMega = 847;
+ public static final int venusaurMega = 848;
+ public static final int charizardMegaX = 849;
+ public static final int charizardMegaY = 850;
+ public static final int mewtwoMegaX = 851;
+ public static final int mewtwoMegaY = 852;
+ public static final int blazikenMega = 853;
+ public static final int medichamMega = 854;
+ public static final int houndoomMega = 855;
+ public static final int aggronMega = 856;
+ public static final int banetteMega = 857;
+ public static final int tyranitarMega = 858;
+ public static final int scizorMega = 859;
+ public static final int pinsirMega = 860;
+ public static final int aerodactylMega = 861;
+ public static final int lucarioMega = 862;
+ public static final int abomasnowMega = 863;
+ public static final int aegislashB = 864;
+ public static final int blastoiseMega = 865;
+ public static final int kangaskhanMega = 866;
+ public static final int gyaradosMega = 867;
+ public static final int absolMega = 868;
+ public static final int alakazamMega = 869;
+ public static final int heracrossMega = 870;
+ public static final int mawileMega = 871;
+ public static final int manectricMega = 872;
+ public static final int garchompMega = 873;
+ public static final int latiosMega = 874;
+ public static final int latiasMega = 875;
+ public static final int pumpkabooCosmetic1 = 876;
+ public static final int pumpkabooCosmetic2 = 877;
+ public static final int pumpkabooCosmetic3 = 878;
+ public static final int gourgeistCosmetic1 = 879;
+ public static final int gourgeistCosmetic2 = 880;
+ public static final int gourgeistCosmetic3 = 881;
+ public static final int floetteCosmetic1 = 882;
+ public static final int floetteCosmetic2 = 883;
+ public static final int floetteCosmetic3 = 884;
+ public static final int floetteCosmetic4 = 885;
+ public static final int floetteE = 886;
+ public static final int swampertMega = 887;
+ public static final int sceptileMega = 888;
+ public static final int sableyeMega = 889;
+ public static final int altariaMega = 890;
+ public static final int galladeMega = 891;
+ public static final int audinoMega = 892;
+ public static final int sharpedoMega = 893;
+ public static final int slowbroMega = 894;
+ public static final int steelixMega = 895;
+ public static final int pidgeotMega = 896;
+ public static final int glalieMega = 897;
+ public static final int diancieMega = 898;
+ public static final int metagrossMega = 899;
+ public static final int kyogreP = 900;
+ public static final int groudonP = 901;
+ public static final int rayquazaMega = 902;
+ public static final int hoopaU = 903;
+ public static final int cameruptMega = 904;
+ public static final int lopunnyMega = 905;
+ public static final int salamenceMega = 906;
+ public static final int beedrillMega = 907;
+ public static final int wishiwashiS = 908;
+ public static final int oricorioE = 909;
+ public static final int oricorioP = 910;
+ public static final int oricorioG = 911;
+ public static final int lycanrocM = 912;
+ public static final int lycanrocD = 913;
+ public static final int rattataA = 914;
+ public static final int raticateA = 915;
+ public static final int raticateACosmetic1 = 916;
+ public static final int raichuA = 917;
+ public static final int sandshrewA = 918;
+ public static final int sandslashA = 919;
+ public static final int vulpixA = 920;
+ public static final int ninetalesA = 921;
+ public static final int meowthA = 922;
+ public static final int persianA = 923;
+ public static final int geodudeA = 924;
+ public static final int gravelerA = 925;
+ public static final int golemA = 926;
+ public static final int grimerA = 927;
+ public static final int mukA = 928;
+ public static final int exeggutorA = 929;
+ public static final int marowakA = 930;
+ public static final int marowakACosmetic1 = 931;
+ public static final int greninjaCosmetic1 = 932;
+ public static final int greninjaA = 933;
+ public static final int zygarde10 = 934;
+ public static final int zygarde10Cosmetic1 = 935;
+ public static final int zygardeCosmetic1 = 936;
+ public static final int zygardeC = 937;
+ public static final int miniorCosmetic1 = 938;
+ public static final int miniorCosmetic2 = 939;
+ public static final int miniorCosmetic3 = 940;
+ public static final int miniorCosmetic4 = 941;
+ public static final int miniorCosmetic5 = 942;
+ public static final int miniorCosmetic6 = 943;
+ public static final int miniorC = 944;
+ public static final int miniorCCosmetic1 = 945;
+ public static final int miniorCCosmetic2 = 946;
+ public static final int miniorCCosmetic3 = 947;
+ public static final int miniorCCosmetic4 = 948;
+ public static final int miniorCCosmetic5 = 949;
+ public static final int miniorCCosmetic6 = 950;
+ public static final int diglettA = 951;
+ public static final int dugtrioA = 952;
+ public static final int mimikyuCosmetic1 = 953;
+ public static final int mimikyuCosmetic2 = 954;
+ public static final int mimikyuCosmetic3 = 955;
+ public static final int magearnaCosmetic1 = 956;
+ public static final int pikachuCosmetic1 = 957;
+ public static final int pikachuCosmetic2 = 958;
+ public static final int pikachuCosmetic3 = 959;
+ public static final int pikachuCosmetic4 = 960;
+ public static final int pikachuCosmetic5 = 961;
+ public static final int pikachuCosmetic6 = 962;
+ public static final int pikachuCosmetic7 = 963;
+ public static final int gumshoosCosmetic1 = 964;
+ public static final int vikavoltCosmetic1 = 965;
+ public static final int lurantisCosmetic1 = 966;
+ public static final int salazzleCosmetic1 = 967;
+ public static final int kommoOCosmetic1 = 968;
+ public static final int necrozmaDM = 969;
+ public static final int necrozmaDW = 970;
+ public static final int necrozmaU = 971;
+ public static final int araquanidCosmetic1 = 972;
+ public static final int togedemaruCosmetic1 = 973;
+ public static final int ribombeeCosmetic1 = 974;
+ public static final int rockruffCosmetic1 = 975;
+
+ }
+}