Skip to content

Commit

Permalink
Fix HGSS Pokédex teachable moves list. (#3624)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex <[email protected]>
  • Loading branch information
GraionDilach and AlexOn1ine committed Dec 6, 2023
1 parent f7ca839 commit 7f0b1da
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/pokedex_plus_hgss.c
Original file line number Diff line number Diff line change
Expand Up @@ -5276,14 +5276,30 @@ static bool8 CalculateMoves(void)
{
sStatsMovesTMHM_ID[numTMHMMoves] = (ITEM_TM01 + j);
numTMHMMoves++;

sStatsMoves[movesTotal] = move;
movesTotal++;
break;
}
}
}

for (i = 0; gTeachableLearnsets[species][i] != MOVE_UNAVAILABLE; i++)
{
move = gTeachableLearnsets[species][i];
for (j = 0; j < NUM_TECHNICAL_MACHINES + NUM_HIDDEN_MACHINES; j++)
{
if (ItemIdToBattleMoveId(ITEM_TM01 + j) == move)
break;
}

if (j >= NUM_TECHNICAL_MACHINES + NUM_HIDDEN_MACHINES)
{
numTutorMoves++;

sStatsMoves[movesTotal] = move;
movesTotal++;

sStatsMoves[movesTotal] = move;
movesTotal++;
}
}

sPokedexView->numEggMoves = numEggMoves;
Expand Down

0 comments on commit 7f0b1da

Please sign in to comment.