summaryrefslogtreecommitdiff
path: root/include/constants/move.h
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2022-02-27 08:43:59 -0800
committerGitHub <noreply@github.com>2022-02-27 08:43:59 -0800
commitea1aa9c0c5c3a4167912d1078fffdd5e69cbbe98 (patch)
tree1d3f29615f1683fae77ade7d8713e7bfe5a11c26 /include/constants/move.h
parent0dd38993f6a4383d6d5743fd0ae0abc01210ae25 (diff)
parenta5296a2f994a0f8e4421c4afd6bac1cedcfb72be (diff)
Merge pull request #97 from AnonymousRandomPerson/master
More attack AI decomp
Diffstat (limited to 'include/constants/move.h')
-rw-r--r--include/constants/move.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/constants/move.h b/include/constants/move.h
index 15ae1b9..0601969 100644
--- a/include/constants/move.h
+++ b/include/constants/move.h
@@ -11,6 +11,18 @@ enum MoveFlags
MOVE_FLAG_DISABLED = 1 << 5 // Disabled by an effect like Taunt.
};
+enum AccuracyType
+{
+ // Accuracy used for all moves.
+ ACCURACY_TYPE_GLOBAL,
+ // Multiplied with the global accuracy for offensive moves (i.e., not status moves).
+ ACCURACY_TYPE_OFFENSIVE,
+ // Used by the AI to determine how often to use Spikes.
+ // Values exist for all other moves, though they seem to be unused.
+ ACCURACY_TYPE_USE_CHANCE,
+ NUM_ACCURACY_TYPES
+};
+
struct MoveData
{
u8 *namePointer;
@@ -22,10 +34,8 @@ struct MoveData
// The AI consider certain moves to have different range than they actually do.
/* 0xC */ u8 maxPP;
/* 0xD */ u8 weight;
- /* 0xE */ u8 accuracy[2];
- // Used by the AI to determine how often to use Spikes.
- // Values exist for all other moves, though they seem to be unused.
- /* 0x10 */ u8 useChance;
+ // There are multiple accuracy values. These are define with the AccuracyType enum.
+ /* 0xE */ u8 accuracy[NUM_ACCURACY_TYPES];
/* 0x11 */ u8 hitCount; // Maximum number of times the move will hit. Used for multi-hit moves like Fury Attack.
u8 unk12;
/* 0x13 */ u8 criticalHitChance;