summaryrefslogtreecommitdiff
path: root/src/pokeblock.c
diff options
context:
space:
mode:
authorPokeCodec <67983839+PokeCodec@users.noreply.github.com>2020-07-20 17:09:02 -0400
committerGitHub <noreply@github.com>2020-07-20 17:09:02 -0400
commit27ac0109220dcae4bc7d72640429d86a1775263f (patch)
treeebe59d8dc7a12fea83ef65b52fd767c8878e3358 /src/pokeblock.c
parent1cf2470aac038fce48a5777e36b00554af90d910 (diff)
parent28759f85693f5ad57f5bd2f391d05b43948409b7 (diff)
Merge pull request #1 from pret/master
Upstream
Diffstat (limited to 'src/pokeblock.c')
-rw-r--r--src/pokeblock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pokeblock.c b/src/pokeblock.c
index 523c4ad91..506c5e4c4 100644
--- a/src/pokeblock.c
+++ b/src/pokeblock.c
@@ -117,7 +117,7 @@ EWRAM_DATA static struct PokeblockSavedData sSavedPokeblockData = {0};
EWRAM_DATA static struct PokeblockMenuStruct *sPokeblockMenu = NULL;
// const rom data
-const s8 gPokeblockFlavorCompatibilityTable[] =
+const s8 gPokeblockFlavorCompatibilityTable[NUM_NATURES * FLAVOR_COUNT] =
{
// Cool, Beauty, Cute, Smart, Tough
0, 0, 0, 0, 0, // Hardy
@@ -1386,7 +1386,7 @@ s16 PokeblockGetGain(u8 nature, const struct Pokeblock *pokeblock)
{
curGain = GetPokeblockData(pokeblock, flavor + PBLOCK_SPICY);
if (curGain > 0)
- totalGain += curGain * gPokeblockFlavorCompatibilityTable[5 * nature + flavor];
+ totalGain += curGain * gPokeblockFlavorCompatibilityTable[FLAVOR_COUNT * nature + flavor];
}
return totalGain;