summaryrefslogtreecommitdiff
path: root/src/com/dabomstew
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/dabomstew')
-rw-r--r--src/com/dabomstew/pkrandom/constants/Gen1Constants.java14
-rw-r--r--src/com/dabomstew/pkrandom/constants/Gen2Constants.java17
-rw-r--r--src/com/dabomstew/pkrandom/constants/Gen3Constants.java19
-rw-r--r--src/com/dabomstew/pkrandom/constants/Gen4Constants.java19
-rwxr-xr-xsrc/com/dabomstew/pkrandom/pokemon/Move.java1
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/Gen1RomHandler.java6
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/Gen2RomHandler.java9
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java11
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java14
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java1
-rw-r--r--src/com/dabomstew/pkrandom/romhandlers/Gen6RomHandler.java1
-rw-r--r--src/com/dabomstew/pkrandom/romhandlers/Gen7RomHandler.java1
12 files changed, 80 insertions, 33 deletions
diff --git a/src/com/dabomstew/pkrandom/constants/Gen1Constants.java b/src/com/dabomstew/pkrandom/constants/Gen1Constants.java
index c6c0c07..4ea728e 100644
--- a/src/com/dabomstew/pkrandom/constants/Gen1Constants.java
+++ b/src/com/dabomstew/pkrandom/constants/Gen1Constants.java
@@ -71,13 +71,13 @@ public class Gen1Constants {
damageParalyze10PercentEffect = 6, noDamageAtkPlusOneEffect = 10, noDamageDefPlusOneEffect = 11,
noDamageSpecialPlusOneEffect = 13, noDamageEvasionPlusOneEffect = 15, noDamageAtkMinusOneEffect = 18,
noDamageDefMinusOneEffect = 19, noDamageSpeMinusOneEffect = 20, noDamageAccuracyMinusOneEffect = 22,
- noDamageSleepEffect = 32, damagePoison40PercentEffect = 33, damageBurn30PercentEffect = 34,
- damageFreeze30PercentEffect = 35, damageParalyze30PercentEffect = 36, 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;
+ flinch10PercentEffect = 31, noDamageSleepEffect = 32, damagePoison40PercentEffect = 33,
+ damageBurn30PercentEffect = 34, damageFreeze30PercentEffect = 35, damageParalyze30PercentEffect = 36,
+ flinch30PercentEffect = 37, 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;
public static final List<Integer> earlyRequiredHMs = Collections.singletonList(Moves.cut);
diff --git a/src/com/dabomstew/pkrandom/constants/Gen2Constants.java b/src/com/dabomstew/pkrandom/constants/Gen2Constants.java
index 9c7e52d..bfaa443 100644
--- a/src/com/dabomstew/pkrandom/constants/Gen2Constants.java
+++ b/src/com/dabomstew/pkrandom/constants/Gen2Constants.java
@@ -75,14 +75,15 @@ public class Gen2Constants {
public static final int noDamageSleepEffect = 1, damagePoisonEffect = 2, damageBurnEffect = 4, damageFreezeEffect = 5,
damageParalyzeEffect = 6, noDamageAtkPlusOneEffect = 10, noDamageDefPlusOneEffect = 11, noDamageSpAtkPlusOneEffect = 13,
noDamageEvasionPlusOneEffect = 16, noDamageAtkMinusOneEffect = 18, noDamageDefMinusOneEffect = 19,
- noDamageSpeMinusOneEffect = 20, noDamageAccuracyMinusOneEffect = 23, noDamageEvasionMinusOneEffect = 24, toxicEffect = 33,
- 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,
- damageConfusionEffect = 76, twineedleEffect = 77, swaggerEffect = 118, damageBurnAndThawUserEffect = 125,
- damageUserDefPlusOneEffect = 138, damageUserAtkPlusOneEffect = 139, damageUserAllPlusOneEffect = 140, thunderEffect = 152,
- defenseCurlEffect = 156;
+ noDamageSpeMinusOneEffect = 20, noDamageAccuracyMinusOneEffect = 23, noDamageEvasionMinusOneEffect = 24, flinchEffect = 31,
+ toxicEffect = 33, 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, damageConfusionEffect = 76, twineedleEffect = 77,
+ snoreEffect = 92, swaggerEffect = 118, damageBurnAndThawUserEffect = 125, damageUserDefPlusOneEffect = 138,
+ damageUserAtkPlusOneEffect = 139, damageUserAllPlusOneEffect = 140, twisterEffect = 146, stompEffect = 150,
+ thunderEffect = 152, defenseCurlEffect = 156;
public static final List<Integer> requiredFieldTMs = Arrays.asList(4, 20, 22, 26, 28, 34, 35, 39,
40, 43, 44, 46);
diff --git a/src/com/dabomstew/pkrandom/constants/Gen3Constants.java b/src/com/dabomstew/pkrandom/constants/Gen3Constants.java
index bb78097..141700f 100644
--- a/src/com/dabomstew/pkrandom/constants/Gen3Constants.java
+++ b/src/com/dabomstew/pkrandom/constants/Gen3Constants.java
@@ -188,17 +188,18 @@ public class Gen3Constants {
public static final int noDamageSleepEffect = 1, damagePoisonEffect = 2, damageBurnEffect = 4, damageFreezeEffect = 5,
damageParalyzeEffect = 6, noDamageAtkPlusOneEffect = 10, noDamageDefPlusOneEffect = 11, noDamageSpAtkPlusOneEffect = 13,
noDamageEvasionPlusOneEffect = 16, noDamageAtkMinusOneEffect = 18, noDamageDefMinusOneEffect = 19,
- noDamageSpeMinusOneEffect = 20, noDamageAccuracyMinusOneEffect = 23, noDamageEvasionMinusOneEffect = 24, toxicEffect = 33,
- noDamageConfusionEffect = 49, noDamageAtkPlusTwoEffect = 50, noDamageDefPlusTwoEffect = 51, noDamageSpePlusTwoEffect = 52,
- noDamageSpAtkPlusTwoEffect = 53, noDamageSpDefPlusTwoEffect = 54, noDamageAtkMinusTwoEffect = 58,
- noDamageDefMinusTwoEffect = 59, noDamageSpeMinusTwoEffect = 60, noDamageSpDefMinusTwoEffect = 62,
+ noDamageSpeMinusOneEffect = 20, noDamageAccuracyMinusOneEffect = 23, noDamageEvasionMinusOneEffect = 24,
+ flinchEffect = 31, toxicEffect = 33, 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, damageConfusionEffect = 76, twineedleEffect = 77, minimizeEffect = 108,
- swaggerEffect = 118, damageBurnAndThawUserEffect = 125, damageUserDefPlusOneEffect = 138, damageUserAtkPlusOneEffect = 139,
- damageUserAllPlusOneEffect = 140, thunderEffect = 152, defenseCurlEffect = 156, flatterEffect = 166,
- noDamageBurnEffect = 167, chargeEffect = 174, damageUserAtkAndDefMinusOneEffect = 182, teeterDanceEffect = 199,
- blazeKickEffect = 200, poisonFangEffect = 202, damageUserSpAtkMinusTwoEffect = 204, noDamageAtkAndDefMinusOneEffect = 205,
+ damageAccuracyMinusOneEffect = 73, skyAttackEffect = 75, damageConfusionEffect = 76, twineedleEffect = 77, snoreEffect = 92,
+ minimizeEffect = 108, swaggerEffect = 118, damageBurnAndThawUserEffect = 125, damageUserDefPlusOneEffect = 138,
+ damageUserAtkPlusOneEffect = 139, damageUserAllPlusOneEffect = 140, twisterEffect = 146, flinchWithMinimizeBonusEffect = 150,
+ thunderEffect = 152, defenseCurlEffect = 156, fakeOutEffect = 158, flatterEffect = 166, noDamageBurnEffect = 167,
+ chargeEffect = 174, damageUserAtkAndDefMinusOneEffect = 182, teeterDanceEffect = 199, blazeKickEffect = 200,
+ poisonFangEffect = 202, damageUserSpAtkMinusTwoEffect = 204, noDamageAtkAndDefMinusOneEffect = 205,
noDamageDefAndSpDefPlusOneEffect = 206, noDamageAtkAndDefPlusOneEffect = 208, damagePoisonWithIncreasedCritEffect = 209,
noDamageSpAtkAndSpDefPlusOneEffect = 211, noDamageAtkAndSpePlusOneEffect = 212;
diff --git a/src/com/dabomstew/pkrandom/constants/Gen4Constants.java b/src/com/dabomstew/pkrandom/constants/Gen4Constants.java
index 2cf43ea..90f923d 100644
--- a/src/com/dabomstew/pkrandom/constants/Gen4Constants.java
+++ b/src/com/dabomstew/pkrandom/constants/Gen4Constants.java
@@ -684,17 +684,18 @@ public class Gen4Constants {
public static final int noDamageSleepEffect = 1, damagePoisonEffect = 2, damageBurnEffect = 4, damageFreezeEffect = 5,
damageParalyzeEffect = 6, noDamageAtkPlusOneEffect = 10, noDamageDefPlusOneEffect = 11, noDamageSpAtkPlusOneEffect = 13,
noDamageEvasionPlusOneEffect = 16, noDamageAtkMinusOneEffect = 18, noDamageDefMinusOneEffect = 19,
- noDamageSpeMinusOneEffect = 20, noDamageAccuracyMinusOneEffect = 23, noDamageEvasionMinusOneEffect = 24, toxicEffect = 33,
- noDamageConfusionEffect = 49, noDamageAtkPlusTwoEffect = 50, noDamageDefPlusTwoEffect = 51, noDamageSpePlusTwoEffect = 52,
- noDamageSpAtkPlusTwoEffect = 53, noDamageSpDefPlusTwoEffect = 54, noDamageAtkMinusTwoEffect = 58,
- noDamageDefMinusTwoEffect = 59, noDamageSpeMinusTwoEffect = 60, noDamageSpDefMinusTwoEffect = 62,
+ noDamageSpeMinusOneEffect = 20, noDamageAccuracyMinusOneEffect = 23, noDamageEvasionMinusOneEffect = 24,
+ flinchEffect = 31, toxicEffect = 33, 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, damageConfusionEffect = 76, twineedleEffect = 77, minimizeEffect = 108,
- swaggerEffect = 118, damageBurnAndThawUserEffect = 125, damageUserDefPlusOneEffect = 138, damageUserAtkPlusOneEffect = 139,
- damageUserAllPlusOneEffect = 140, thunderEffect = 152, defenseCurlEffect = 156, flatterEffect = 166,
- noDamageBurnEffect = 167, chargeEffect = 174, damageUserAtkAndDefMinusOneEffect = 182, teeterDanceEffect = 199,
- blazeKickEffect = 200, poisonFangEffect = 202, damageUserSpAtkMinusTwoEffect = 204, noDamageAtkAndDefMinusOneEffect = 205,
+ damageAccuracyMinusOneEffect = 73, skyAttackEffect = 75, damageConfusionEffect = 76, twineedleEffect = 77, snoreEffect = 92,
+ minimizeEffect = 108, swaggerEffect = 118, damageBurnAndThawUserEffect = 125, damageUserDefPlusOneEffect = 138,
+ damageUserAtkPlusOneEffect = 139, damageUserAllPlusOneEffect = 140, twisterEffect = 146, stompEffect = 150,
+ thunderEffect = 152, defenseCurlEffect = 156, fakeOutEffect = 158, flatterEffect = 166, noDamageBurnEffect = 167,
+ chargeEffect = 174, damageUserAtkAndDefMinusOneEffect = 182, 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, blizzardEffect = 260, voltTackleEffect = 262,
diff --git a/src/com/dabomstew/pkrandom/pokemon/Move.java b/src/com/dabomstew/pkrandom/pokemon/Move.java
index e3f9f21..81d6b14 100755
--- a/src/com/dabomstew/pkrandom/pokemon/Move.java
+++ b/src/com/dabomstew/pkrandom/pokemon/Move.java
@@ -43,6 +43,7 @@ public class Move {
public StatusMoveType statusMoveType = StatusMoveType.NONE_OR_UNKNOWN;
public StatusType statusType = StatusType.NONE;
public double statusPercentChance;
+ public double flinchPercentChance;
public int effectIndex;
public int target;
public MoveCategory category;
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen1RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen1RomHandler.java
index 85c6005..9f71d88 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen1RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen1RomHandler.java
@@ -463,6 +463,12 @@ public class Gen1RomHandler extends AbstractGBCRomHandler {
loadStatChangesFromEffect(moves[trueMoveIndex]);
loadStatusFromEffect(moves[trueMoveIndex]);
+
+ if (moves[i].effectIndex == Gen1Constants.flinch10PercentEffect) {
+ moves[i].flinchPercentChance = 10.0;
+ } else if (moves[i].effectIndex == Gen1Constants.flinch30PercentEffect) {
+ moves[i].flinchPercentChance = 30.0;
+ }
}
}
}
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen2RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen2RomHandler.java
index 1362c04..9edb45b 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen2RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen2RomHandler.java
@@ -442,6 +442,15 @@ public class Gen2RomHandler extends AbstractGBCRomHandler {
loadStatChangesFromEffect(moves[i]);
loadStatusFromEffect(moves[i]);
+
+ switch (moves[i].effectIndex) {
+ case Gen2Constants.flinchEffect:
+ case Gen2Constants.snoreEffect:
+ case Gen2Constants.twisterEffect:
+ case Gen2Constants.stompEffect:
+ moves[i].flinchPercentChance = moves[i].secondaryEffectChance;
+ break;
+ }
}
}
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java
index c53c872..e3e7a63 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java
@@ -835,6 +835,17 @@ public class Gen3RomHandler extends AbstractGBRomHandler {
perfectAccuracy = (int)moves[i].hitratio;
}
+ switch (moves[i].effectIndex) {
+ case Gen3Constants.flinchEffect:
+ case Gen3Constants.skyAttackEffect:
+ case Gen3Constants.snoreEffect:
+ case Gen3Constants.twisterEffect:
+ case Gen3Constants.flinchWithMinimizeBonusEffect:
+ case Gen3Constants.fakeOutEffect:
+ moves[i].flinchPercentChance = moves[i].secondaryEffectChance;
+ break;
+ }
+
if (GlobalConstants.normalMultihitMoves.contains(i)) {
moves[i].hitCount = 3;
} else if (GlobalConstants.doubleHitMoves.contains(i)) {
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java
index 7577c24..6d351e5 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java
@@ -593,6 +593,20 @@ public class Gen4RomHandler extends AbstractDSRomHandler {
loadStatChangesFromEffect(moves[i]);
loadStatusFromEffect(moves[i]);
+
+ switch (moves[i].effectIndex) {
+ case Gen4Constants.flinchEffect:
+ case Gen4Constants.skyAttackEffect:
+ case Gen4Constants.snoreEffect:
+ case Gen4Constants.twisterEffect:
+ case Gen4Constants.stompEffect:
+ case Gen4Constants.fakeOutEffect:
+ case Gen4Constants.fireFangEffect:
+ case Gen4Constants.iceFangEffect:
+ case Gen4Constants.thunderFangEffect:
+ moves[i].flinchPercentChance = moves[i].secondaryEffectChance;
+ break;
+ }
}
} catch (IOException e) {
throw new RandomizerIOException(e);
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java
index b09e31c..a3efa49 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java
@@ -555,6 +555,7 @@ public class Gen5RomHandler extends AbstractDSRomHandler {
moves[i].power = moveData[3] & 0xFF;
moves[i].pp = moveData[5] & 0xFF;
moves[i].type = Gen5Constants.typeTable[moveData[0] & 0xFF];
+ moves[i].flinchPercentChance = moveData[15] & 0xFF;
moves[i].target = moveData[20] & 0xFF;
moves[i].category = Gen5Constants.moveCategoryIndices[moveData[2] & 0xFF];
moves[i].priority = moveData[6];
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen6RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen6RomHandler.java
index 68acec6..a09f67c 100644
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen6RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen6RomHandler.java
@@ -606,6 +606,7 @@ public class Gen6RomHandler extends Abstract3DSRomHandler {
moves[i].power = moveData[3] & 0xFF;
moves[i].pp = moveData[5] & 0xFF;
moves[i].type = Gen6Constants.typeTable[moveData[0] & 0xFF];
+ moves[i].flinchPercentChance = moveData[15] & 0xFF;
moves[i].target = moveData[20] & 0xFF;
moves[i].category = Gen6Constants.moveCategoryIndices[moveData[2] & 0xFF];
moves[i].priority = moveData[6];
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen7RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen7RomHandler.java
index be19ece..557bb97 100644
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen7RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen7RomHandler.java
@@ -678,6 +678,7 @@ public class Gen7RomHandler extends Abstract3DSRomHandler {
moves[i].power = moveData[3] & 0xFF;
moves[i].pp = moveData[5] & 0xFF;
moves[i].type = Gen7Constants.typeTable[moveData[0] & 0xFF];
+ moves[i].flinchPercentChance = moveData[15] & 0xFF;
moves[i].target = moveData[20] & 0xFF;
moves[i].category = Gen7Constants.moveCategoryIndices[moveData[2] & 0xFF];
moves[i].priority = moveData[6];