mirror of
https://github.com/pret/pokeemerald.git
synced 2026-09-27 12:26:51 -05:00
Untangled TMs and HMs from item ids (#7173)
This commit is contained in:
@@ -353,14 +353,12 @@ static u16 GetRandomAlternateMove(u8 monId)
|
||||
// NOTE: Below is an infinite loop if a species which cannot learn TMs is assigned to an Apprentice
|
||||
do
|
||||
{
|
||||
id = Random() % (NUM_TECHNICAL_MACHINES + NUM_HIDDEN_MACHINES);
|
||||
shouldUseMove = CanLearnTeachableMove(species, ItemIdToBattleMoveId(ITEM_TM01 + id));
|
||||
id = (Random() % NUM_ALL_MACHINES) + 1;
|
||||
move = GetTMHMMoveId(id);
|
||||
shouldUseMove = CanLearnTeachableMove(species, move);
|
||||
}
|
||||
while (!shouldUseMove);
|
||||
|
||||
move = ItemIdToBattleMoveId(ITEM_TM01 + id);
|
||||
shouldUseMove = TRUE;
|
||||
|
||||
if (numLearnsetMoves <= MAX_MON_MOVES)
|
||||
j = 0;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user