From f952144922b23d258c6b98ce3da79276d5c1e643 Mon Sep 17 00:00:00 2001 From: Kaz Date: Sun, 13 Sep 2020 03:02:41 -0400 Subject: [PATCH] party_menu fakematch fix --- src/party_menu.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/party_menu.c b/src/party_menu.c index e509ef6e09..39f74e58d3 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -1964,19 +1964,17 @@ static u8 CanMonLearnTMTutor(struct Pokemon *mon, u16 item, u8 tutor) if (item >= ITEM_TM01_FOCUS_PUNCH) { - if (CanMonLearnTMHM(mon, item - ITEM_TM01_FOCUS_PUNCH)) - move = ItemIdToBattleMoveId(item); - else + if (!CanMonLearnTMHM(mon, item - ITEM_TM01_FOCUS_PUNCH)) return CANNOT_LEARN_MOVE; - do {} while (0); // :morphon: - } - else if (CanLearnTutorMove(GetMonData(mon, MON_DATA_SPECIES), tutor) == FALSE) - { - return CANNOT_LEARN_MOVE; + else + move = ItemIdToBattleMoveId(item); } else { - move = GetTutorMove(tutor); + if (!CanLearnTutorMove(GetMonData(mon, MON_DATA_SPECIES), tutor)) + return CANNOT_LEARN_MOVE; + else + move = GetTutorMove(tutor); } if (MonKnowsMove(mon, move) == TRUE)