Merge pull request #2062 from Jaizu/patch-23

Use TM constant in CanMonLearnTMTutor
This commit is contained in:
Eduardo Quezada D'Ottone 2022-02-18 16:32:57 -03:00 committed by GitHub
commit 66b4df0362
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1962,7 +1962,7 @@ static u8 CanMonLearnTMTutor(struct Pokemon *mon, u16 item, u8 tutor)
if (item >= ITEM_TM01)
{
if (!CanMonLearnTMHM(mon, item - ITEM_TM01 - ((item > ITEM_TM100) ? 50 : 0)))
if (!CanMonLearnTMHM(mon, item - ITEM_TM01 - ((item > ITEM_TM100) ? NUM_TECHNICAL_MACHINES : 0)))
return CANNOT_LEARN_MOVE;
else
move = ItemIdToBattleMoveId(item);