summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortom-overton <tom.overton@outlook.com>2022-02-16 13:03:26 -0800
committertom-overton <tom.overton@outlook.com>2022-02-16 13:03:26 -0800
commit7d003eb1180e12aaf5f3b23215f3b906fa366187 (patch)
tree90baf1209d984641089f7ddac9083135601fb553
parent6042e50c7c4902ea2e6555d1926323af24a53a5a (diff)
Bump version number
-rw-r--r--src/com/dabomstew/pkrandom/Settings.java8
-rw-r--r--src/com/dabomstew/pkrandom/Version.java47
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java7
3 files changed, 33 insertions, 29 deletions
diff --git a/src/com/dabomstew/pkrandom/Settings.java b/src/com/dabomstew/pkrandom/Settings.java
index f996798..e0df7f2 100644
--- a/src/com/dabomstew/pkrandom/Settings.java
+++ b/src/com/dabomstew/pkrandom/Settings.java
@@ -373,7 +373,7 @@ public class Settings {
// 2: pokemon types & more general options
out.write(makeByteSelected(typesMod == TypesMod.RANDOM_FOLLOW_EVOLUTIONS,
typesMod == TypesMod.COMPLETELY_RANDOM, typesMod == TypesMod.UNCHANGED, raceMode, blockBrokenMoves,
- limitPokemon, typesFollowMegaEvolutions,dualTypeOnly));
+ limitPokemon, typesFollowMegaEvolutions, dualTypeOnly));
// 3: v171: changed to the abilities byte
out.write(makeByteSelected(abilitiesMod == AbilitiesMod.UNCHANGED, abilitiesMod == AbilitiesMod.RANDOMIZE,
@@ -629,7 +629,7 @@ public class Settings {
settings.setBlockBrokenMoves(restoreState(data[2], 4));
settings.setLimitPokemon(restoreState(data[2], 5));
settings.setTypesFollowMegaEvolutions(restoreState(data[2],6));
- settings.setDualTypeOnly(restoreState(data[2],7));
+ settings.setDualTypeOnly(restoreState(data[2], 7));
settings.setAbilitiesMod(restoreEnum(AbilitiesMod.class, data[3], 0, // UNCHANGED
1 // RANDOMIZE
));
@@ -1066,11 +1066,13 @@ public class Settings {
public boolean isChangeImpossibleEvolutions() {
return changeImpossibleEvolutions;
}
+
public boolean isDualTypeOnly(){
return dualTypeOnly;
}
+
public void setDualTypeOnly(boolean dualTypeOnly){
- this.dualTypeOnly=dualTypeOnly;
+ this.dualTypeOnly = dualTypeOnly;
}
public void setChangeImpossibleEvolutions(boolean changeImpossibleEvolutions) {
diff --git a/src/com/dabomstew/pkrandom/Version.java b/src/com/dabomstew/pkrandom/Version.java
index 194b2d6..a2973e8 100644
--- a/src/com/dabomstew/pkrandom/Version.java
+++ b/src/com/dabomstew/pkrandom/Version.java
@@ -28,35 +28,36 @@ import java.util.HashMap;
import java.util.Map;
public class Version {
- public static final int VERSION = 317; // Increment by 1 for new version. Updated for 4.3.0
- public static final String VERSION_STRING = "4.3.0";
+ public static final int VERSION = 318; // Increment by 1 for new version. Updated for 4.4.0
+ public static final String VERSION_STRING = "4.4.0-dev";
public static final Map<Integer,String> oldVersions = setupVersionsMap();
private static Map<Integer,String> setupVersionsMap() {
Map<Integer,String> map = new HashMap<>();
- map.put(100,"1.0.1a");
- map.put(102,"1.0.2a");
- map.put(110,"1.1.0");
- map.put(111,"1.1.1");
- map.put(112,"1.1.2");
- map.put(120,"1.2.0a");
- map.put(150,"1.5.0");
- map.put(160,"1.6.0a");
- map.put(161,"1.6.1");
- map.put(162,"1.6.2");
- map.put(163,"1.6.3b");
- map.put(170,"1.7.0b");
- map.put(171,"1.7.1");
- map.put(172,"1.7.2");
- map.put(310,"3.1.0");
- map.put(311,"4.0.0");
- map.put(312,"4.0.1");
- map.put(313,"4.0.2");
- map.put(314,"4.1.0");
- map.put(315,"4.2.0");
- map.put(316,"4.2.1");
+ map.put(100, "1.0.1a");
+ map.put(102, "1.0.2a");
+ map.put(110, "1.1.0");
+ map.put(111, "1.1.1");
+ map.put(112, "1.1.2");
+ map.put(120, "1.2.0a");
+ map.put(150, "1.5.0");
+ map.put(160, "1.6.0a");
+ map.put(161, "1.6.1");
+ map.put(162, "1.6.2");
+ map.put(163, "1.6.3b");
+ map.put(170, "1.7.0b");
+ map.put(171, "1.7.1");
+ map.put(172, "1.7.2");
+ map.put(310, "3.1.0");
+ map.put(311, "4.0.0");
+ map.put(312, "4.0.1");
+ map.put(313, "4.0.2");
+ map.put(314, "4.1.0");
+ map.put(315, "4.2.0");
+ map.put(316, "4.2.1");
+ map.put(317, "4.3.0");
// Latest version - when version is updated, add the old version as an explicit put
map.put(VERSION, VERSION_STRING);
diff --git a/src/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java
index e5262a9..160a838 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java
@@ -416,6 +416,7 @@ public abstract class AbstractRomHandler implements RomHandler {
public void randomizePokemonTypes(Settings settings) {
boolean evolutionSanity = settings.getTypesMod() == Settings.TypesMod.RANDOM_FOLLOW_EVOLUTIONS;
boolean megaEvolutionSanity = settings.isTypesFollowMegaEvolutions();
+ boolean dualTypeOnly = settings.isDualTypeOnly();
List<Pokemon> allPokes = this.getPokemonInclFormes();
if (evolutionSanity) {
@@ -428,14 +429,14 @@ public abstract class AbstractRomHandler implements RomHandler {
pk.primaryType = randomType();
pk.secondaryType = null;
if (pk.evolutionsFrom.size() == 1 && pk.evolutionsFrom.get(0).carryStats) {
- if (AbstractRomHandler.this.random.nextDouble() < 0.35||settings.isDualTypeOnly()) {
+ if (AbstractRomHandler.this.random.nextDouble() < 0.35 || dualTypeOnly) {
pk.secondaryType = randomType();
while (pk.secondaryType == pk.primaryType) {
pk.secondaryType = randomType();
}
}
} else {
- if (AbstractRomHandler.this.random.nextDouble() < 0.5||settings.isDualTypeOnly()) {
+ if (AbstractRomHandler.this.random.nextDouble() < 0.5 || dualTypeOnly) {
pk.secondaryType = randomType();
while (pk.secondaryType == pk.primaryType) {
pk.secondaryType = randomType();
@@ -448,7 +449,7 @@ public abstract class AbstractRomHandler implements RomHandler {
if (evTo.secondaryType == null) {
double chance = toMonIsFinalEvo ? 0.25 : 0.15;
- if (AbstractRomHandler.this.random.nextDouble() < chance||settings.isDualTypeOnly()) {
+ if (AbstractRomHandler.this.random.nextDouble() < chance || dualTypeOnly) {
evTo.secondaryType = randomType();
while (evTo.secondaryType == evTo.primaryType) {
evTo.secondaryType = randomType();