summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/com/dabomstew/pkrandom/config/gen3_offsets.ini15
-rw-r--r--src/com/dabomstew/pkrandom/newgui/Bundle.properties2
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java9
3 files changed, 25 insertions, 1 deletions
diff --git a/src/com/dabomstew/pkrandom/config/gen3_offsets.ini b/src/com/dabomstew/pkrandom/config/gen3_offsets.ini
index b6a3182..1a70f01 100755
--- a/src/com/dabomstew/pkrandom/config/gen3_offsets.ini
+++ b/src/com/dabomstew/pkrandom/config/gen3_offsets.ini
@@ -415,6 +415,7 @@ StaticPokemon{}={Species=[0x16CC28, 0x16CC9F], Level=[0x16CCEC]} // Clefairy
StaticPokemon{}={Species=[0x16CC48, 0x16CCB5], Level=[0x16CD16]} // Scyther
StaticPokemon{}={Species=[0x16CC38, 0x16CCAA], Level=[0x16CD01]} // Dratini
StaticPokemon{}={Species=[0x16CC58, 0x16CCC0], Level=[0x16CD2B]} // Porygon
+FossilLevelOffsets=[0x16E7F6, 0x16E76C, 0x16E7B1]
TMText[]=[3,7,5,3,0x2A,TM03 teaches [move].\pUse it on a worthy POKéMON!]
TMText[]=[4,14,3,7,0x2A,TM04 is [move].]
TMText[]=[6,11,3,7,0x91,Sealed within that TM06 lies [move]!\pIt is a secret technique dating back some four hundred years.]
@@ -520,6 +521,7 @@ StaticPokemon{}={Species=[0x16CC04, 0x16CC7B], Level=[0x16CCC8]} // Clefairy
StaticPokemon{}={Species=[0x16CC14, 0x16CCA7], Level=[0x16CD1C]} // Pinsir
StaticPokemon{}={Species=[0x16CC24, 0x16CC86], Level=[0x16CCDD]} // Dratini
StaticPokemon{}={Species=[0x16CC34, 0x16CC9C], Level=[0x16CD07]} // Porygon
+FossilLevelOffsets=[0x16E7D2, 0x16E748, 0x16E78D]
[Fire Red (U) 1.1]
Game=BPRE
@@ -572,6 +574,7 @@ StaticPokemon{}={Species=[0x16CCA0, 0x16CD17], Level=[0x16CD64]} // Clefairy
StaticPokemon{}={Species=[0x16CCC0, 0x16CD2D], Level=[0x16CD8E]} // Scyther
StaticPokemon{}={Species=[0x16CCB0, 0x16CD22], Level=[0x16CD79]} // Dratini
StaticPokemon{}={Species=[0x16CCD0, 0x16CD38], Level=[0x16CDA3]} // Porygon
+FossilLevelOffsets=[0x16E86E, 0x16E7E4, 0x16E829]
[Leaf Green (U) 1.1]
Game=BPGE
@@ -624,6 +627,7 @@ StaticPokemon{}={Species=[0x16CC7C, 0x16CCF3], Level=[0x16CD40]} // Clefairy
StaticPokemon{}={Species=[0x16CC8C, 0x16CD1F], Level=[0x16CD94]} // Pinsir
StaticPokemon{}={Species=[0x16CC9C, 0x16CCFE], Level=[0x16CD55]} // Dratini
StaticPokemon{}={Species=[0x16CCAC, 0x16CD14], Level=[0x16CD7F]} // Porygon
+FossilLevelOffsets=[0x16E84A, 0x16E7C0, 0x16E805]
[Ruby (F)]
Game=AXVF
@@ -1316,6 +1320,7 @@ StaticPokemon{}={Species=[0x16CC50, 0x16CCC7], Level=[0x16CD14]} // Clefairy
StaticPokemon{}={Species=[0x16CC70, 0x16CCDD], Level=[0x16CD3E]} // Scyther
StaticPokemon{}={Species=[0x16CC60, 0x16CCD2], Level=[0x16CD29]} // Dratini
StaticPokemon{}={Species=[0x16CC80, 0x16CCE8], Level=[0x16CD53]} // Porygon
+FossilLevelOffsets=[0x16E81E, 0x16E794, 0x16E7D9]
[Leaf Green (F)]
Game=BPGF
@@ -1368,6 +1373,7 @@ StaticPokemon{}={Species=[0x16CC2C, 0x16CCA3], Level=[0x16CCF0]} // Clefairy
StaticPokemon{}={Species=[0x16CC3C, 0x16CCCF], Level=[0x16CD44]} // Pinsir
StaticPokemon{}={Species=[0x16CC4C, 0x16CCAE], Level=[0x16CD05]} // Dratini
StaticPokemon{}={Species=[0x16CC5C, 0x16CCC4], Level=[0x16CD2F]} // Porygon
+FossilLevelOffsets=[0x16E7FA, 0x16E770, 0x16E7B5]
[Fire Red (G)]
Game=BPRD
@@ -1420,6 +1426,7 @@ StaticPokemon{}={Species=[0x16CB94, 0x16CC0B], Level=[0x16CC58]} // Clefairy
StaticPokemon{}={Species=[0x16CBB4, 0x16CC21], Level=[0x16CC82]} // Scyther
StaticPokemon{}={Species=[0x16CBA4, 0x16CC16], Level=[0x16CC6D]} // Dratini
StaticPokemon{}={Species=[0x16CBC4, 0x16CC2C], Level=[0x16CC97]} // Porygon
+FossilLevelOffsets=[0x16E762, 0x16E6D8, 0x16E71D]
[Leaf Green (G)]
Game=BPGD
@@ -1472,6 +1479,7 @@ StaticPokemon{}={Species=[0x16CB70, 0x16CBE7], Level=[0x16CC34]} // Clefairy
StaticPokemon{}={Species=[0x16CB80, 0x16CC13], Level=[0x16CC88]} // Pinsir
StaticPokemon{}={Species=[0x16CB90, 0x16CBF2], Level=[0x16CC49]} // Dratini
StaticPokemon{}={Species=[0x16CBA0, 0x16CC08], Level=[0x16CC73]} // Porygon
+FossilLevelOffsets=[0x16E73E, 0x16E6B4, 0x16E6B4]
[Fire Red (S)]
Game=BPRS
@@ -1524,6 +1532,7 @@ StaticPokemon{}={Species=[0x16CCC0, 0x16CD37], Level=[0x16CD84]} // Clefairy
StaticPokemon{}={Species=[0x16CCE0, 0x16CD4D], Level=[0x16CDAE]} // Scyther
StaticPokemon{}={Species=[0x16CCD0, 0x16CD42], Level=[0x16CD99]} // Dratini
StaticPokemon{}={Species=[0x16CCF0, 0x16CD58], Level=[0x16CDC3]} // Porygon
+FossilLevelOffsets=[0x16E88E, 0x16E804, 0x16E849]
[Leaf Green (S)]
Game=BPGS
@@ -1576,6 +1585,7 @@ StaticPokemon{}={Species=[0x16CC9C, 0x16CD13], Level=[0x16CD60]} // Clefairy
StaticPokemon{}={Species=[0x16CCAC, 0x16CD3F], Level=[0x16CDB4]} // Pinsir
StaticPokemon{}={Species=[0x16CCBC, 0x16CD1E], Level=[0x16CD75]} // Dratini
StaticPokemon{}={Species=[0x16CCCC, 0x16CD34], Level=[0x16CD9F]} // Porygon
+FossilLevelOffsets=[0x16E86A, 0x16E7E0, 0x16E825]
[Fire Red (I)]
Game=BPRI
@@ -1628,6 +1638,7 @@ StaticPokemon{}={Species=[0x16CBD4, 0x16CC4B], Level=[0x16CC98]} // Clefairy
StaticPokemon{}={Species=[0x16CBF4, 0x16CC61], Level=[0x16CCC2]} // Scyther
StaticPokemon{}={Species=[0x16CBE4, 0x16CC56], Level=[0x16CCAD]} // Dratini
StaticPokemon{}={Species=[0x16CC04, 0x16CC6C], Level=[0x16CCD7]} // Porygon
+FossilLevelOffsets=[0x16E7A2, 0x16E718, 0x16E75D]
[Leaf Green (I)]
Game=BPGI
@@ -1680,6 +1691,7 @@ StaticPokemon{}={Species=[0x16CBB0, 0x16CC27], Level=[0x16CC74]} // Clefairy
StaticPokemon{}={Species=[0x16CBC0, 0x16CC53], Level=[0x16CCC8]} // Pinsir
StaticPokemon{}={Species=[0x16CBD0, 0x16CC32], Level=[0x16CC89]} // Dratini
StaticPokemon{}={Species=[0x16CBE0, 0x16CC48], Level=[0x16CCB3]} // Porygon
+FossilLevelOffsets=[0x16E77E, 0x16E6F4, 0x16E739]
[Ruby (J)]
Game=AXVJ
@@ -1937,6 +1949,7 @@ StaticPokemon{}={Species=[0x185A9A, 0x185B11], Level=[0x185B5E]} // Clefairy
StaticPokemon{}={Species=[0x185ABA, 0x185B27], Level=[0x185B88]} // Scyther
StaticPokemon{}={Species=[0x185AAA, 0x185B1C], Level=[0x185B73]} // Dratini
StaticPokemon{}={Species=[0x185ACA, 0x185B32], Level=[0x185B9D]} // Porygon
+FossilLevelOffsets=[0x1895AD, 0x189523, 0x189568]
[Fire Red (J) 1.1]
Game=BPRJ
@@ -1987,6 +2000,7 @@ StaticPokemon{}={Species=[0x185656, 0x1856CD], Level=[0x18571A]} // Clefairy
StaticPokemon{}={Species=[0x185676, 0x1856E3], Level=[0x185744]} // Scyther
StaticPokemon{}={Species=[0x185666, 0x1856D8], Level=[0x18572F]} // Dratini
StaticPokemon{}={Species=[0x185686, 0x1856EE], Level=[0x185759]} // Porygon
+FossilLevelOffsets=[0x189169, 0x1890DF, 0x189124]
[Leaf Green (J)]
Game=BPGJ
@@ -2038,3 +2052,4 @@ StaticPokemon{}={Species=[0x185A76, 0x185AED], Level=[0x185B3A]} // Clefairy
StaticPokemon{}={Species=[0x185A86, 0x185B19], Level=[0x185B8E]} // Pinsir
StaticPokemon{}={Species=[0x185A96, 0x185AF8], Level=[0x185B4F]} // Dratini
StaticPokemon{}={Species=[0x185AA6, 0x185B0E], Level=[0x185B79]} // Porygon
+FossilLevelOffsets=[0x189589, 0x1894FF, 0x189544]
diff --git a/src/com/dabomstew/pkrandom/newgui/Bundle.properties b/src/com/dabomstew/pkrandom/newgui/Bundle.properties
index b463395..34747a4 100644
--- a/src/com/dabomstew/pkrandom/newgui/Bundle.properties
+++ b/src/com/dabomstew/pkrandom/newgui/Bundle.properties
@@ -484,7 +484,7 @@ CodeTweaks.maniacItems.toolTipText=<html>Bans maniac items worth more than $10,0
CodeTweaks.maniacItems.name=Ban Big Money Maniac Items
CodeTweaks.sosBattles.toolTipText=<html>Makes it possible for every Pokemon to call allies during wild Pokemon battles.<br />Without this setting, only Pokemon that could call allies in the base game will be able to call allies.
CodeTweaks.sosBattles.name=All Wild Pokemon Can Call Allies
-CodeTweaks.balanceStaticLevels.toolTipText=<html>Changes levels of Static Pokemon to be more balanced. Currently applies only to fossil Pokemon.
+CodeTweaks.balanceStaticLevels.toolTipText=<html>Changes levels of Static Pokemon to be more balanced. Currently applies only to fossil Pokemon in FRLG and BW1.
CodeTweaks.balanceStaticLevels.name=Balance Static Pokemon Levels
CodeTweaks.retainAltFormes.toolTipText=<html>Lets all party Pokemon that are in an alternate forme retain their alternate forme when the game is reset.<br />Without this setting, Mega Evolutions, Primal Reversions, Ash-Greninja, Zygarde Complete Forme, and Ultra Necrozma will revert to their base forme upon reset.<br />In ORAS and Gen 7, this setting also prevents certain alternate formes from being reverted after a battle if these formes are <i>not</i> the result of an in-battle transformation.<br />This includes Primal Groudon, Primal Kyogre, Wishiwashi School Form, and Minior.
CodeTweaks.retainAltFormes.name=Don't Revert Temporary Alt Formes
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java
index ec25bec..17ce34a 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java
@@ -37,6 +37,7 @@ import com.dabomstew.pkrandom.GFXFunctions;
import com.dabomstew.pkrandom.MiscTweak;
import com.dabomstew.pkrandom.RomFunctions;
import com.dabomstew.pkrandom.constants.Gen3Constants;
+import com.dabomstew.pkrandom.constants.Gen5Constants;
import com.dabomstew.pkrandom.constants.GlobalConstants;
import com.dabomstew.pkrandom.exceptions.RandomizationException;
import com.dabomstew.pkrandom.exceptions.RandomizerIOException;
@@ -3150,6 +3151,9 @@ public class Gen3RomHandler extends AbstractGBRomHandler {
}
available |= MiscTweak.BAN_LUCKY_EGG.getValue();
available |= MiscTweak.RUN_WITHOUT_RUNNING_SHOES.getValue();
+ if (romEntry.romType == Gen3Constants.RomType_FRLG) {
+ available |= MiscTweak.BALANCE_STATIC_LEVELS.getValue();
+ }
return available;
}
@@ -3172,6 +3176,11 @@ public class Gen3RomHandler extends AbstractGBRomHandler {
randomizePCPotion();
} else if (tweak == MiscTweak.RUN_WITHOUT_RUNNING_SHOES) {
applyRunWithoutRunningShoesPatch();
+ } else if (tweak == MiscTweak.BALANCE_STATIC_LEVELS) {
+ int[] fossilLevelOffsets = romEntry.arrayEntries.get("FossilLevelOffsets");
+ for (int fossilLevelOffset : fossilLevelOffsets) {
+ writeWord(rom, fossilLevelOffset, 30);
+ }
}
}