Skip to content

Commit

Permalink
Fix an issue with the HM System
Browse files Browse the repository at this point in the history
  • Loading branch information
Pseurae committed Oct 19, 2024
1 parent 57a00c9 commit ecb9a27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/data/trainers.c
Original file line number Diff line number Diff line change
Expand Up @@ -4562,12 +4562,12 @@ const struct TrainerMonNoItemDefaultMoves gTrainerParty_Tommy[1] = {
const struct TrainerMonNoItemDefaultMoves gTrainerParty_Asmodeus[2] = {
{
.iv = 40,
.level = 16,
.level = 15,
.species = SPECIES_ANORITH,
},
{
.iv = 40,
.level = 17,
.level = 16,
.species = SPECIES_ANORITH,
},
};
Expand All @@ -4584,12 +4584,12 @@ const struct TrainerMonNoItemCustomMoves gTrainerParty_Ben[1] = {
const struct TrainerMonNoItemDefaultMoves gTrainerParty_Belial1[2] = {
{
.iv = 40,
.level = 16,
.level = 14,
.species = SPECIES_ANORITH,
},
{
.iv = 40,
.level = 17,
.level = 15,
.species = SPECIES_ANORITH,
},
};
Expand Down Expand Up @@ -9493,7 +9493,7 @@ const struct TrainerMonNoItemDefaultMoves gTrainerParty_Leozar[1] = {
const struct TrainerMonNoItemDefaultMoves gTrainerParty_Gleis4[1] = {
{
.iv = 30,
.level = 17,
.level = 14,
.species = SPECIES_FACELEECH,
},
};
Expand Down
6 changes: 4 additions & 2 deletions src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "battle.h"
#include "item.h"
#include "script_menu.h"
#include "debug.h"
#include "constants/items.h"
#include "constants/pokemon.h"
#include "constants/species.h"
Expand Down Expand Up @@ -36,8 +37,9 @@ bool8 CheckIfPartyCanUseHM(void)
for (i = 0; i < PARTY_SIZE; i++)
{
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
if (!species || species == SPECIES_EGG)
return FALSE;

if (species == SPECIES_NONE || species == SPECIES_EGG)
continue;

if ((CanMonLearnTMHM(&gPlayerParty[i], tm - ITEM_TM01_FOCUS_PUNCH))
|| (MonKnowsMove(&gPlayerParty[i], ItemIdToBattleMoveId(tm)) == TRUE))
Expand Down

0 comments on commit ecb9a27

Please sign in to comment.