diff options
author | tom-overton <tom.overton@outlook.com> | 2022-05-17 22:24:37 -0700 |
---|---|---|
committer | rafa_99 <raroma09@gmail.com> | 2022-05-18 23:16:20 +0100 |
commit | bfe122305683e28fbd70d117996e084661b3c402 (patch) | |
tree | 598393627078a768d5ef06ae51897abe009b7b73 /src/com/sneed/pkrandom | |
parent | c5e32a2e30bdae5df663ef47b42dad7a9b1eab42 (diff) |
Read punch move info from moves
Diffstat (limited to 'src/com/sneed/pkrandom')
6 files changed, 9 insertions, 0 deletions
diff --git a/src/com/sneed/pkrandom/constants/Gen4Constants.java b/src/com/sneed/pkrandom/constants/Gen4Constants.java index 4f44d6f..14af49b 100644 --- a/src/com/sneed/pkrandom/constants/Gen4Constants.java +++ b/src/com/sneed/pkrandom/constants/Gen4Constants.java @@ -710,6 +710,10 @@ public class Gen4Constants { 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); diff --git a/src/com/sneed/pkrandom/pokemon/Move.java b/src/com/sneed/pkrandom/pokemon/Move.java index e1c4860..712e7ef 100755 --- a/src/com/sneed/pkrandom/pokemon/Move.java +++ b/src/com/sneed/pkrandom/pokemon/Move.java @@ -50,6 +50,7 @@ public class Move { public int absorbPercent; public int priority; public boolean makesContact; + public boolean isPunchMove; public boolean isSoundMove; public int effectIndex; public int target; diff --git a/src/com/sneed/pkrandom/romhandlers/Gen4RomHandler.java b/src/com/sneed/pkrandom/romhandlers/Gen4RomHandler.java index aea807e..28d9e69 100755 --- a/src/com/sneed/pkrandom/romhandlers/Gen4RomHandler.java +++ b/src/com/sneed/pkrandom/romhandlers/Gen4RomHandler.java @@ -577,6 +577,7 @@ public class Gen4RomHandler extends AbstractDSRomHandler { moves[i].priority = moveData[10];
int flags = moveData[11] & 0xFF;
moves[i].makesContact = (flags & 1) != 0;
+ moves[i].isPunchMove = Gen4Constants.punchMoves.contains(moves[i].number);
moves[i].isSoundMove = Gen4Constants.soundMoves.contains(moves[i].number);
if (i == Moves.swift) {
diff --git a/src/com/sneed/pkrandom/romhandlers/Gen5RomHandler.java b/src/com/sneed/pkrandom/romhandlers/Gen5RomHandler.java index 287ed76..8048fb7 100755 --- a/src/com/sneed/pkrandom/romhandlers/Gen5RomHandler.java +++ b/src/com/sneed/pkrandom/romhandlers/Gen5RomHandler.java @@ -569,6 +569,7 @@ public class Gen5RomHandler extends AbstractDSRomHandler { int flags = FileFunctions.readFullInt(moveData, 32);
moves[i].makesContact = (flags & 0x001) != 0;
+ moves[i].isPunchMove = (flags & 0x080) != 0;
moves[i].isSoundMove = (flags & 0x100) != 0;
int qualities = moveData[1];
int recoilOrAbsorbPercent = moveData[18];
diff --git a/src/com/sneed/pkrandom/romhandlers/Gen6RomHandler.java b/src/com/sneed/pkrandom/romhandlers/Gen6RomHandler.java index ecbbcf9..f11dfd3 100644 --- a/src/com/sneed/pkrandom/romhandlers/Gen6RomHandler.java +++ b/src/com/sneed/pkrandom/romhandlers/Gen6RomHandler.java @@ -620,6 +620,7 @@ public class Gen6RomHandler extends Abstract3DSRomHandler { int flags = FileFunctions.readFullInt(moveData, 32); moves[i].makesContact = (flags & 0x001) != 0; + moves[i].isPunchMove = (flags & 0x080) != 0; moves[i].isSoundMove = (flags & 0x100) != 0; int qualities = moveData[1]; int recoilOrAbsorbPercent = moveData[18]; diff --git a/src/com/sneed/pkrandom/romhandlers/Gen7RomHandler.java b/src/com/sneed/pkrandom/romhandlers/Gen7RomHandler.java index 161d62e..440af77 100644 --- a/src/com/sneed/pkrandom/romhandlers/Gen7RomHandler.java +++ b/src/com/sneed/pkrandom/romhandlers/Gen7RomHandler.java @@ -692,6 +692,7 @@ public class Gen7RomHandler extends Abstract3DSRomHandler { int flags = FileFunctions.readFullInt(moveData, 36); moves[i].makesContact = (flags & 0x001) != 0; + moves[i].isPunchMove = (flags & 0x080) != 0; moves[i].isSoundMove = (flags & 0x100) != 0; int qualities = moveData[1]; int recoilOrAbsorbPercent = moveData[18]; |