summaryrefslogtreecommitdiff
path: root/src/com/dabomstew/pkrandom/romhandlers
diff options
context:
space:
mode:
authortom-overton <tom.overton@outlook.com>2022-05-09 00:35:59 -0700
committertom-overton <tom.overton@outlook.com>2022-05-11 12:34:21 -0700
commit328ec752c7065b994590d237b2d05330b207174d (patch)
treeaebff63f9ed63c62d1e0f8590a72d5c7646aa452 /src/com/dabomstew/pkrandom/romhandlers
parentb81279fb4a46d62c5f2320b613925f0fbe29ca52 (diff)
Read stat change information for every move
Diffstat (limited to 'src/com/dabomstew/pkrandom/romhandlers')
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/Gen1RomHandler.java105
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/Gen2RomHandler.java147
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java210
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java229
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java32
-rw-r--r--src/com/dabomstew/pkrandom/romhandlers/Gen6RomHandler.java33
-rw-r--r--src/com/dabomstew/pkrandom/romhandlers/Gen7RomHandler.java33
7 files changed, 785 insertions, 4 deletions
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen1RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen1RomHandler.java
index 5669de8..257ddfc 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen1RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen1RomHandler.java
@@ -460,9 +460,114 @@ public class Gen1RomHandler extends AbstractGBCRomHandler {
} else if (GlobalConstants.doubleHitMoves.contains(i)) {
moves[trueMoveIndex].hitCount = 2;
}
+
+ loadStatChangesFromEffect(moves[trueMoveIndex]);
}
}
+ }
+ private void loadStatChangesFromEffect(Move move) {
+ switch (move.effectIndex) {
+ case Gen1Constants.noDamageAtkPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen1Constants.noDamageDefPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen1Constants.noDamageSpecialPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen1Constants.noDamageEvasionPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.EVASION;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen1Constants.noDamageAtkMinusOneEffect:
+ case Gen1Constants.damageAtkMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen1Constants.noDamageDefMinusOneEffect:
+ case Gen1Constants.damageDefMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen1Constants.noDamageSpeMinusOneEffect:
+ case Gen1Constants.damageSpeMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPEED;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen1Constants.noDamageAccuracyMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.ACCURACY;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen1Constants.noDamageAtkPlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen1Constants.noDamageDefPlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen1Constants.noDamageSpePlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPEED;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen1Constants.noDamageSpecialPlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen1Constants.noDamageDefMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen1Constants.damageSpecialMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL;
+ move.statChanges[0].stages = -1;
+ break;
+ default:
+ // Move does not have a stat-changing effect
+ return;
+ }
+
+ switch (move.effectIndex) {
+ case Gen1Constants.noDamageAtkPlusOneEffect:
+ case Gen1Constants.noDamageDefPlusOneEffect:
+ case Gen1Constants.noDamageSpecialPlusOneEffect:
+ case Gen1Constants.noDamageEvasionPlusOneEffect:
+ case Gen1Constants.noDamageAtkMinusOneEffect:
+ case Gen1Constants.noDamageDefMinusOneEffect:
+ case Gen1Constants.noDamageSpeMinusOneEffect:
+ case Gen1Constants.noDamageAccuracyMinusOneEffect:
+ case Gen1Constants.noDamageAtkPlusTwoEffect:
+ case Gen1Constants.noDamageDefPlusTwoEffect:
+ case Gen1Constants.noDamageSpePlusTwoEffect:
+ case Gen1Constants.noDamageSpecialPlusTwoEffect:
+ case Gen1Constants.noDamageDefMinusTwoEffect:
+ if (move.statChanges[0].stages < 0) {
+ move.statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_TARGET;
+ } else {
+ move.statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_USER;
+ }
+ break;
+
+ case Gen1Constants.damageAtkMinusOneEffect:
+ case Gen1Constants.damageDefMinusOneEffect:
+ case Gen1Constants.damageSpeMinusOneEffect:
+ case Gen1Constants.damageSpecialMinusOneEffect:
+ move.statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_TARGET;
+ break;
+ }
+
+ if (move.statChangeType == StatChangeType.DAMAGE_STAT_CHANGE_TARGET) {
+ for (int i = 0; i < move.statChanges.length; i++) {
+ if (move.statChanges[i].type != StatBuffType.NONE) {
+ move.statChanges[i].percentChance = 85 / 256.0;
+ }
+ }
+ }
}
private void saveMoves() {
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen2RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen2RomHandler.java
index 5c48e20..3abb31d 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen2RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen2RomHandler.java
@@ -412,6 +412,7 @@ public class Gen2RomHandler extends AbstractGBCRomHandler {
moves[i].pp = rom[offs + (i - 1) * 7 + 5] & 0xFF;
moves[i].type = Gen2Constants.typeTable[rom[offs + (i - 1) * 7 + 3]];
moves[i].category = GBConstants.physicalTypes.contains(moves[i].type) ? MoveCategory.PHYSICAL : MoveCategory.SPECIAL;
+ moves[i].secondaryEffectChance = ((rom[offs + (i - 1) * 7 + 6] & 0xFF)) / 255.0 * 100;
if (i == Moves.swift) {
perfectAccuracy = (int)moves[i].hitratio;
@@ -438,8 +439,154 @@ public class Gen2RomHandler extends AbstractGBCRomHandler {
} else {
moves[i].priority = 1;
}
+
+ loadStatChangesFromEffect(moves[i]);
+ }
+ }
+
+ private void loadStatChangesFromEffect(Move move) {
+ switch (move.effectIndex) {
+ case Gen2Constants.noDamageAtkPlusOneEffect:
+ case Gen2Constants.damageUserAtkPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen2Constants.noDamageDefPlusOneEffect:
+ case Gen2Constants.damageUserDefPlusOneEffect:
+ case Gen2Constants.defenseCurlEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen2Constants.noDamageSpAtkPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_ATTACK;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen2Constants.noDamageEvasionPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.EVASION;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen2Constants.noDamageAtkMinusOneEffect:
+ case Gen2Constants.damageAtkMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen2Constants.noDamageDefMinusOneEffect:
+ case Gen2Constants.damageDefMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen2Constants.noDamageSpeMinusOneEffect:
+ case Gen2Constants.damageSpeMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPEED;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen2Constants.noDamageAccuracyMinusOneEffect:
+ case Gen2Constants.damageAccuracyMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.ACCURACY;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen2Constants.noDamageEvasionMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.EVASION;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen2Constants.noDamageAtkPlusTwoEffect:
+ case Gen2Constants.swaggerEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen2Constants.noDamageDefPlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen2Constants.noDamageSpePlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPEED;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen2Constants.noDamageSpDefPlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen2Constants.noDamageAtkMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen2Constants.noDamageDefMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen2Constants.noDamageSpeMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPEED;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen2Constants.noDamageSpDefMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen2Constants.damageSpDefMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen2Constants.damageUserAllPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.ALL;
+ move.statChanges[0].stages = 1;
+ break;
+ default:
+ // Move does not have a stat-changing effect
+ return;
+ }
+
+ switch (move.effectIndex) {
+ case Gen2Constants.noDamageAtkPlusOneEffect:
+ case Gen2Constants.noDamageDefPlusOneEffect:
+ case Gen2Constants.noDamageSpAtkPlusOneEffect:
+ case Gen2Constants.noDamageEvasionPlusOneEffect:
+ case Gen2Constants.noDamageAtkMinusOneEffect:
+ case Gen2Constants.noDamageDefMinusOneEffect:
+ case Gen2Constants.noDamageSpeMinusOneEffect:
+ case Gen2Constants.noDamageAccuracyMinusOneEffect:
+ case Gen2Constants.noDamageEvasionMinusOneEffect:
+ case Gen2Constants.noDamageAtkPlusTwoEffect:
+ case Gen2Constants.noDamageDefPlusTwoEffect:
+ case Gen2Constants.noDamageSpePlusTwoEffect:
+ case Gen2Constants.noDamageSpDefPlusTwoEffect:
+ case Gen2Constants.noDamageAtkMinusTwoEffect:
+ case Gen2Constants.noDamageDefMinusTwoEffect:
+ case Gen2Constants.noDamageSpeMinusTwoEffect:
+ case Gen2Constants.noDamageSpDefMinusTwoEffect:
+ case Gen2Constants.swaggerEffect:
+ case Gen2Constants.defenseCurlEffect:
+ if (move.statChanges[0].stages < 0 || move.effectIndex == Gen2Constants.swaggerEffect) {
+ move.statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_TARGET;
+ } else {
+ move.statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_USER;
+ }
+ break;
+
+ case Gen2Constants.damageAtkMinusOneEffect:
+ case Gen2Constants.damageDefMinusOneEffect:
+ case Gen2Constants.damageSpeMinusOneEffect:
+ case Gen2Constants.damageSpDefMinusOneEffect:
+ case Gen2Constants.damageAccuracyMinusOneEffect:
+ move.statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_TARGET;
+ break;
+
+ case Gen2Constants.damageUserDefPlusOneEffect:
+ case Gen2Constants.damageUserAtkPlusOneEffect:
+ case Gen2Constants.damageUserAllPlusOneEffect:
+ move.statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_USER;
+ break;
}
+ if (move.statChangeType == StatChangeType.DAMAGE_STAT_CHANGE_TARGET || move.statChangeType == StatChangeType.DAMAGE_STAT_CHANGE_USER) {
+ for (int i = 0; i < move.statChanges.length; i++) {
+ if (move.statChanges[i].type != StatBuffType.NONE) {
+ move.statChanges[i].percentChance = move.secondaryEffectChance;
+ if (move.statChanges[i].percentChance == 0.0) {
+ move.statChanges[i].percentChance = 100.0;
+ }
+ }
+ }
+ }
}
private void saveMoves() {
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java
index 2c4abed..ef25346 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java
@@ -824,8 +824,10 @@ public class Gen3RomHandler extends AbstractGBRomHandler {
moves[i].power = rom[offs + i * 0xC + 1] & 0xFF;
moves[i].pp = rom[offs + i * 0xC + 4] & 0xFF;
moves[i].type = Gen3Constants.typeTable[rom[offs + i * 0xC + 2]];
+ moves[i].target = rom[offs + i * 0xC + 6] & 0xFF;
moves[i].category = GBConstants.physicalTypes.contains(moves[i].type) ? MoveCategory.PHYSICAL : MoveCategory.SPECIAL;
moves[i].priority = rom[offs + i * 0xC + 7];
+ moves[i].secondaryEffectChance = rom[offs + i * 0xC + 5] & 0xFF;
if (i == Moves.swift) {
perfectAccuracy = (int)moves[i].hitratio;
@@ -838,8 +840,216 @@ public class Gen3RomHandler extends AbstractGBRomHandler {
} else if (i == Moves.tripleKick) {
moves[i].hitCount = 2.71; // this assumes the first hit lands
}
+
+ loadStatChangesFromEffect(moves[i]);
+ }
+ }
+
+ private void loadStatChangesFromEffect(Move move) {
+ switch (move.effectIndex) {
+ case Gen3Constants.noDamageAtkPlusOneEffect:
+ case Gen3Constants.noDamageDefPlusOneEffect:
+ case Gen3Constants.noDamageSpAtkPlusOneEffect:
+ case Gen3Constants.noDamageEvasionPlusOneEffect:
+ case Gen3Constants.noDamageAtkMinusOneEffect:
+ case Gen3Constants.noDamageDefMinusOneEffect:
+ case Gen3Constants.noDamageSpeMinusOneEffect:
+ case Gen3Constants.noDamageAccuracyMinusOneEffect:
+ case Gen3Constants.noDamageEvasionMinusOneEffect:
+ case Gen3Constants.noDamageAtkPlusTwoEffect:
+ case Gen3Constants.noDamageDefPlusTwoEffect:
+ case Gen3Constants.noDamageSpePlusTwoEffect:
+ case Gen3Constants.noDamageSpAtkPlusTwoEffect:
+ case Gen3Constants.noDamageSpDefPlusTwoEffect:
+ case Gen3Constants.noDamageAtkMinusTwoEffect:
+ case Gen3Constants.noDamageDefMinusTwoEffect:
+ case Gen3Constants.noDamageSpeMinusTwoEffect:
+ case Gen3Constants.noDamageSpDefMinusTwoEffect:
+ case Gen3Constants.minimizeEffect:
+ case Gen3Constants.swaggerEffect:
+ case Gen3Constants.defenseCurlEffect:
+ case Gen3Constants.flatterEffect:
+ case Gen3Constants.chargeEffect:
+ case Gen3Constants.noDamageAtkAndDefMinusOneEffect:
+ case Gen3Constants.noDamageDefAndSpDefPlusOneEffect:
+ case Gen3Constants.noDamageAtkAndDefPlusOneEffect:
+ case Gen3Constants.noDamageSpAtkAndSpDefPlusOneEffect:
+ case Gen3Constants.noDamageAtkAndSpePlusOneEffect:
+ if (move.target == 16) {
+ move.statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_USER;
+ } else {
+ move.statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_TARGET;
+ }
+ break;
+
+ case Gen3Constants.damageAtkMinusOneEffect:
+ case Gen3Constants.damageDefMinusOneEffect:
+ case Gen3Constants.damageSpeMinusOneEffect:
+ case Gen3Constants.damageSpAtkMinusOneEffect:
+ case Gen3Constants.damageSpDefMinusOneEffect:
+ case Gen3Constants.damageAccuracyMinusOneEffect:
+ move.statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_TARGET;
+ break;
+
+ case Gen3Constants.damageUserDefPlusOneEffect:
+ case Gen3Constants.damageUserAtkPlusOneEffect:
+ case Gen3Constants.damageUserAllPlusOneEffect:
+ case Gen3Constants.damageUserAtkAndDefMinusOneEffect:
+ case Gen3Constants.damageUserSpAtkMinusTwoEffect:
+ move.statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_USER;
+ break;
+
+ default:
+ // Move does not have a stat-changing effect
+ return;
+ }
+
+ switch (move.effectIndex) {
+ case Gen3Constants.noDamageAtkPlusOneEffect:
+ case Gen3Constants.damageUserAtkPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen3Constants.noDamageDefPlusOneEffect:
+ case Gen3Constants.damageUserDefPlusOneEffect:
+ case Gen3Constants.defenseCurlEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen3Constants.noDamageSpAtkPlusOneEffect:
+ case Gen3Constants.flatterEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_ATTACK;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen3Constants.noDamageEvasionPlusOneEffect:
+ case Gen3Constants.minimizeEffect:
+ move.statChanges[0].type = StatBuffType.EVASION;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen3Constants.noDamageAtkMinusOneEffect:
+ case Gen3Constants.damageAtkMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen3Constants.noDamageDefMinusOneEffect:
+ case Gen3Constants.damageDefMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen3Constants.noDamageSpeMinusOneEffect:
+ case Gen3Constants.damageSpeMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPEED;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen3Constants.noDamageAccuracyMinusOneEffect:
+ case Gen3Constants.damageAccuracyMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.ACCURACY;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen3Constants.noDamageEvasionMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.EVASION;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen3Constants.noDamageAtkPlusTwoEffect:
+ case Gen3Constants.swaggerEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen3Constants.noDamageDefPlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen3Constants.noDamageSpePlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPEED;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen3Constants.noDamageSpAtkPlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_ATTACK;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen3Constants.noDamageSpDefPlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen3Constants.noDamageAtkMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen3Constants.noDamageDefMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen3Constants.noDamageSpeMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPEED;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen3Constants.noDamageSpDefMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen3Constants.damageSpAtkMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_ATTACK;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen3Constants.damageSpDefMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen3Constants.damageUserAllPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.ALL;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen3Constants.chargeEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen3Constants.damageUserAtkAndDefMinusOneEffect:
+ case Gen3Constants.noDamageAtkAndDefMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = -1;
+ move.statChanges[1].type = StatBuffType.DEFENSE;
+ move.statChanges[1].stages = -1;
+ break;
+ case Gen3Constants.damageUserSpAtkMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_ATTACK;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen3Constants.noDamageDefAndSpDefPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = 1;
+ move.statChanges[1].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[1].stages = 1;
+ break;
+ case Gen3Constants.noDamageAtkAndDefPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = 1;
+ move.statChanges[1].type = StatBuffType.DEFENSE;
+ move.statChanges[1].stages = 1;
+ break;
+ case Gen3Constants.noDamageSpAtkAndSpDefPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_ATTACK;
+ move.statChanges[0].stages = 1;
+ move.statChanges[1].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[1].stages = 1;
+ break;
+ case Gen3Constants.noDamageAtkAndSpePlusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = 1;
+ move.statChanges[1].type = StatBuffType.SPEED;
+ move.statChanges[1].stages = 1;
+ break;
}
+ if (move.statChangeType == StatChangeType.DAMAGE_STAT_CHANGE_TARGET || move.statChangeType == StatChangeType.DAMAGE_STAT_CHANGE_USER) {
+ for (int i = 0; i < move.statChanges.length; i++) {
+ if (move.statChanges[i].type != StatBuffType.NONE) {
+ move.statChanges[i].percentChance = move.secondaryEffectChance;
+ if (move.statChanges[i].percentChance == 0.0) {
+ move.statChanges[i].percentChance = 100.0;
+ }
+ }
+ }
+ }
}
private void saveMoves() {
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java
index 1e74e45..5b53330 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java
@@ -37,6 +37,7 @@ import com.dabomstew.pkrandom.*;
import com.dabomstew.pkrandom.constants.*;
import com.dabomstew.pkrandom.exceptions.RandomizationException;
import com.dabomstew.pkrandom.pokemon.*;
+import sun.reflect.generics.tree.Tree;
import thenewpoketext.PokeTextData;
import thenewpoketext.TextToPoke;
@@ -572,7 +573,9 @@ public class Gen4RomHandler extends AbstractDSRomHandler {
moves[i].power = moveData[3] & 0xFF;
moves[i].pp = moveData[6] & 0xFF;
moves[i].type = Gen4Constants.typeTable[moveData[4] & 0xFF];
+ moves[i].target = readWord(moveData, 8);
moves[i].category = Gen4Constants.moveCategoryIndices[moveData[2] & 0xFF];
+ moves[i].secondaryEffectChance = moveData[7] & 0xFF;
moves[i].priority = moveData[10];
if (i == Moves.swift) {
@@ -584,14 +587,236 @@ public class Gen4RomHandler extends AbstractDSRomHandler {
} else if (GlobalConstants.doubleHitMoves.contains(i)) {
moves[i].hitCount = 2;
} else if (i == Moves.tripleKick) {
- moves[i].hitCount = 2.71; // this assumes the first hit
- // lands
+ moves[i].hitCount = 2.71; // this assumes the first hit lands
}
+
+ loadStatChangesFromEffect(moves[i]);
}
} catch (IOException e) {
throw new RandomizerIOException(e);
}
+ }
+
+ private void loadStatChangesFromEffect(Move move) {
+ switch (move.effectIndex) {
+ case Gen4Constants.noDamageAtkPlusOneEffect:
+ case Gen4Constants.noDamageDefPlusOneEffect:
+ case Gen4Constants.noDamageSpAtkPlusOneEffect:
+ case Gen4Constants.noDamageEvasionPlusOneEffect:
+ case Gen4Constants.noDamageAtkMinusOneEffect:
+ case Gen4Constants.noDamageDefMinusOneEffect:
+ case Gen4Constants.noDamageSpeMinusOneEffect:
+ case Gen4Constants.noDamageAccuracyMinusOneEffect:
+ case Gen4Constants.noDamageEvasionMinusOneEffect:
+ case Gen4Constants.noDamageAtkPlusTwoEffect:
+ case Gen4Constants.noDamageDefPlusTwoEffect:
+ case Gen4Constants.noDamageSpePlusTwoEffect:
+ case Gen4Constants.noDamageSpAtkPlusTwoEffect:
+ case Gen4Constants.noDamageSpDefPlusTwoEffect:
+ case Gen4Constants.noDamageAtkMinusTwoEffect:
+ case Gen4Constants.noDamageDefMinusTwoEffect:
+ case Gen4Constants.noDamageSpeMinusTwoEffect:
+ case Gen4Constants.noDamageSpDefMinusTwoEffect:
+ case Gen4Constants.minimizeEffect:
+ case Gen4Constants.swaggerEffect:
+ case Gen4Constants.defenseCurlEffect:
+ case Gen4Constants.flatterEffect:
+ case Gen4Constants.chargeEffect:
+ case Gen4Constants.noDamageAtkAndDefMinusOneEffect:
+ case Gen4Constants.noDamageDefAndSpDefPlusOneEffect:
+ case Gen4Constants.noDamageAtkAndDefPlusOneEffect:
+ case Gen4Constants.noDamageSpAtkAndSpDefPlusOneEffect:
+ case Gen4Constants.noDamageAtkAndSpePlusOneEffect:
+ case Gen4Constants.noDamageSpAtkMinusTwoEffect:
+ if (move.target == 16) {
+ move.statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_USER;
+ } else {
+ move.statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_TARGET;
+ }
+ break;
+
+ case Gen4Constants.damageAtkMinusOneEffect:
+ case Gen4Constants.damageDefMinusOneEffect:
+ case Gen4Constants.damageSpeMinusOneEffect:
+ case Gen4Constants.damageSpAtkMinusOneEffect:
+ case Gen4Constants.damageSpDefMinusOneEffect:
+ case Gen4Constants.damageAccuracyMinusOneEffect:
+ case Gen4Constants.damageSpDefMinusTwoEffect:
+ move.statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_TARGET;
+ break;
+
+ case Gen4Constants.damageUserDefPlusOneEffect:
+ case Gen4Constants.damageUserAtkPlusOneEffect:
+ case Gen4Constants.damageUserAllPlusOneEffect:
+ case Gen4Constants.damageUserAtkAndDefMinusOneEffect:
+ case Gen4Constants.damageUserSpAtkMinusTwoEffect:
+ case Gen4Constants.damageUserSpeMinusOneEffect:
+ case Gen4Constants.damageUserDefAndSpDefMinusOneEffect:
+ case Gen4Constants.damageUserSpAtkPlusOneEffect:
+ move.statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_USER;
+ break;
+
+ default:
+ // Move does not have a stat-changing effect
+ return;
+ }
+ switch (move.effectIndex) {
+ case Gen4Constants.noDamageAtkPlusOneEffect:
+ case Gen4Constants.damageUserAtkPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen4Constants.noDamageDefPlusOneEffect:
+ case Gen4Constants.damageUserDefPlusOneEffect:
+ case Gen4Constants.defenseCurlEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen4Constants.noDamageSpAtkPlusOneEffect:
+ case Gen4Constants.flatterEffect:
+ case Gen4Constants.damageUserSpAtkPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_ATTACK;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen4Constants.noDamageEvasionPlusOneEffect:
+ case Gen4Constants.minimizeEffect:
+ move.statChanges[0].type = StatBuffType.EVASION;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen4Constants.noDamageAtkMinusOneEffect:
+ case Gen4Constants.damageAtkMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen4Constants.noDamageDefMinusOneEffect:
+ case Gen4Constants.damageDefMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen4Constants.noDamageSpeMinusOneEffect:
+ case Gen4Constants.damageSpeMinusOneEffect:
+ case Gen4Constants.damageUserSpeMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPEED;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen4Constants.noDamageAccuracyMinusOneEffect:
+ case Gen4Constants.damageAccuracyMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.ACCURACY;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen4Constants.noDamageEvasionMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.EVASION;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen4Constants.noDamageAtkPlusTwoEffect:
+ case Gen4Constants.swaggerEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen4Constants.noDamageDefPlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen4Constants.noDamageSpePlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPEED;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen4Constants.noDamageSpAtkPlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_ATTACK;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen4Constants.noDamageSpDefPlusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[0].stages = 2;
+ break;
+ case Gen4Constants.noDamageAtkMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen4Constants.noDamageDefMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen4Constants.noDamageSpeMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPEED;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen4Constants.noDamageSpDefMinusTwoEffect:
+ case Gen4Constants.damageSpDefMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen4Constants.damageSpAtkMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_ATTACK;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen4Constants.damageSpDefMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[0].stages = -1;
+ break;
+ case Gen4Constants.damageUserAllPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.ALL;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen4Constants.chargeEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[0].stages = 1;
+ break;
+ case Gen4Constants.damageUserAtkAndDefMinusOneEffect:
+ case Gen4Constants.noDamageAtkAndDefMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = -1;
+ move.statChanges[1].type = StatBuffType.DEFENSE;
+ move.statChanges[1].stages = -1;
+ break;
+ case Gen4Constants.damageUserSpAtkMinusTwoEffect:
+ case Gen4Constants.noDamageSpAtkMinusTwoEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_ATTACK;
+ move.statChanges[0].stages = -2;
+ break;
+ case Gen4Constants.noDamageDefAndSpDefPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = 1;
+ move.statChanges[1].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[1].stages = 1;
+ break;
+ case Gen4Constants.noDamageAtkAndDefPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = 1;
+ move.statChanges[1].type = StatBuffType.DEFENSE;
+ move.statChanges[1].stages = 1;
+ break;
+ case Gen4Constants.noDamageSpAtkAndSpDefPlusOneEffect:
+ move.statChanges[0].type = StatBuffType.SPECIAL_ATTACK;
+ move.statChanges[0].stages = 1;
+ move.statChanges[1].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[1].stages = 1;
+ break;
+ case Gen4Constants.noDamageAtkAndSpePlusOneEffect:
+ move.statChanges[0].type = StatBuffType.ATTACK;
+ move.statChanges[0].stages = 1;
+ move.statChanges[1].type = StatBuffType.SPEED;
+ move.statChanges[1].stages = 1;
+ break;
+ case Gen4Constants.damageUserDefAndSpDefMinusOneEffect:
+ move.statChanges[0].type = StatBuffType.DEFENSE;
+ move.statChanges[0].stages = -1;
+ move.statChanges[1].type = StatBuffType.SPECIAL_DEFENSE;
+ move.statChanges[1].stages = -1;
+ break;
+ }
+
+ if (move.statChangeType == StatChangeType.DAMAGE_STAT_CHANGE_TARGET || move.statChangeType == StatChangeType.DAMAGE_STAT_CHANGE_USER) {
+ for (int i = 0; i < move.statChanges.length; i++) {
+ if (move.statChanges[i].type != StatBuffType.NONE) {
+ move.statChanges[i].percentChance = move.secondaryEffectChance;
+ if (move.statChanges[i].percentChance == 0.0) {
+ move.statChanges[i].percentChance = 100.0;
+ }
+ }
+ }
+ }
}
private void loadPokemonStats() {
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen5RomHandler.java
index 2fa91cb..20d65c9 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].target = moveData[20] & 0xFF;
moves[i].category = Gen5Constants.moveCategoryIndices[moveData[2] & 0xFF];
moves[i].priority = moveData[6];
@@ -567,8 +568,35 @@ public class Gen5RomHandler extends AbstractDSRomHandler {
} else if (GlobalConstants.doubleHitMoves.contains(i)) {
moves[i].hitCount = 2;
} else if (i == Moves.tripleKick) {
- moves[i].hitCount = 2.71; // this assumes the first hit
- // lands
+ moves[i].hitCount = 2.71; // this assumes the first hit lands
+ }
+
+ int qualities = moveData[1];
+ switch (qualities) {
+ case Gen5Constants.noDamageStatChangeQuality:
+ case Gen5Constants.noDamageStatusAndStatChangeQuality:
+ // All Allies or Self
+ if (moves[i].target == 6 || moves[i].target == 7) {
+ moves[i].statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_USER;
+ } else {
+ moves[i].statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_TARGET;
+ }
+ break;
+ case Gen5Constants.damageTargetDebuffQuality:
+ moves[i].statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_TARGET;
+ break;
+ case Gen5Constants.damageUserBuffQuality:
+ moves[i].statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_USER;
+ break;
+ default:
+ moves[i].statChangeType = StatChangeType.NONE_OR_UNKNOWN;
+ break;
+ }
+
+ for (int statChange = 0; statChange < 3; statChange++) {
+ moves[i].statChanges[statChange].type = StatBuffType.values()[moveData[21 + statChange]];
+ moves[i].statChanges[statChange].stages = moveData[24 + statChange];
+ moves[i].statChanges[statChange].percentChance = moveData[27 + statChange];
}
}
} catch (IOException e) {
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen6RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen6RomHandler.java
index e0c607e..aace612 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].target = moveData[20] & 0xFF;
moves[i].category = Gen6Constants.moveCategoryIndices[moveData[2] & 0xFF];
moves[i].priority = moveData[6];
@@ -620,6 +621,38 @@ public class Gen6RomHandler extends Abstract3DSRomHandler {
} else if (i == Moves.tripleKick) {
moves[i].hitCount = 2.71; // this assumes the first hit lands
}
+
+ int qualities = moveData[1];
+ switch (qualities) {
+ case Gen6Constants.noDamageStatChangeQuality:
+ case Gen6Constants.noDamageStatusAndStatChangeQuality:
+ // All Allies or Self
+ if (moves[i].target == 6 || moves[i].target == 7) {
+ moves[i].statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_USER;
+ } else if (moves[i].target == 2) {
+ moves[i].statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_ALLY;
+ } else if (moves[i].target == 8) {
+ moves[i].statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_ALL;
+ } else {
+ moves[i].statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_TARGET;
+ }
+ break;
+ case Gen6Constants.damageTargetDebuffQuality:
+ moves[i].statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_TARGET;
+ break;
+ case Gen6Constants.damageUserBuffQuality:
+ moves[i].statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_USER;
+ break;
+ default:
+ moves[i].statChangeType = StatChangeType.NONE_OR_UNKNOWN;
+ break;
+ }
+
+ for (int statChange = 0; statChange < 3; statChange++) {
+ moves[i].statChanges[statChange].type = StatBuffType.values()[moveData[21 + statChange]];
+ moves[i].statChanges[statChange].stages = moveData[24 + statChange];
+ moves[i].statChanges[statChange].percentChance = moveData[27 + statChange];
+ }
}
} catch (IOException e) {
throw new RandomizerIOException(e);
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen7RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen7RomHandler.java
index 0300036..28f6453 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].target = moveData[20] & 0xFF;
moves[i].category = Gen7Constants.moveCategoryIndices[moveData[2] & 0xFF];
moves[i].priority = moveData[6];
@@ -692,6 +693,38 @@ public class Gen7RomHandler extends Abstract3DSRomHandler {
} else if (i == Moves.tripleKick) {
moves[i].hitCount = 2.71; // this assumes the first hit lands
}
+
+ int qualities = moveData[1];
+ switch (qualities) {
+ case Gen7Constants.noDamageStatChangeQuality:
+ case Gen7Constants.noDamageStatusAndStatChangeQuality:
+ // All Allies or Self
+ if (moves[i].target == 6 || moves[i].target == 7) {
+ moves[i].statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_USER;
+ } else if (moves[i].target == 2) {
+ moves[i].statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_ALLY;
+ } else if (moves[i].target == 8) {
+ moves[i].statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_ALL;
+ } else {
+ moves[i].statChangeType = StatChangeType.NO_DAMAGE_STAT_CHANGE_TARGET;
+ }
+ break;
+ case Gen7Constants.damageTargetDebuffQuality:
+ moves[i].statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_TARGET;
+ break;
+ case Gen7Constants.damageUserBuffQuality:
+ moves[i].statChangeType = StatChangeType.DAMAGE_STAT_CHANGE_USER;
+ break;
+ default:
+ moves[i].statChangeType = StatChangeType.NONE_OR_UNKNOWN;
+ break;
+ }
+
+ for (int statChange = 0; statChange < 3; statChange++) {
+ moves[i].statChanges[statChange].type = StatBuffType.values()[moveData[21 + statChange]];
+ moves[i].statChanges[statChange].stages = moveData[24 + statChange];
+ moves[i].statChanges[statChange].percentChance = moveData[27 + statChange];
+ }
}
} catch (IOException e) {
throw new RandomizerIOException(e);