diff --git a/.gitignore b/.gitignore index dc782899d..4d8c4ba7b 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ Thumbs.db build/ .DS_Store *.ddump +*.bin +*.ipch diff --git a/include/graphics.h b/include/graphics.h index ed25ae8e3..5fc33a794 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -3940,6 +3940,8 @@ extern const u32 gItemIcon_DreadPlate[]; extern const u32 gItemIconPalette_DreadPlate[]; extern const u32 gItemIcon_IronPlate[]; extern const u32 gItemIconPalette_IronPlate[]; +extern const u32 gItemIcon_Honey[]; +extern const u32 gItemIconPalette_Honey[]; // Gen 5 Items extern const u32 gItemIcon_Eviolite[]; extern const u32 gItemIconPalette_Eviolite[]; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index b832d7e05..a3d724c0a 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -10504,6 +10504,7 @@ static void atkE5_pickup(void) u16 species, heldItem; u8 ability; u8 level; + u8 lvlDivBy10; if (InBattlePike()) { @@ -10539,7 +10540,7 @@ static void atkE5_pickup(void) species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL); - u8 lvlDivBy10 = (level - 1) / 10; + lvlDivBy10 = (level - 1) / 10; if (lvlDivBy10 > 9) lvlDivBy10 = 9; @@ -10576,7 +10577,11 @@ static void atkE5_pickup(void) && species != SPECIES_EGG && heldItem == ITEM_NONE && (Random()%100 <= lvlDivBy10*5+5)) - SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, ITEM_HONEY); + { + u16 honey = ITEM_HONEY; + SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &honey); + break; + } } } diff --git a/src/data/graphics/items.h b/src/data/graphics/items.h index 733bbf317..b00a5b854 100644 --- a/src/data/graphics/items.h +++ b/src/data/graphics/items.h @@ -877,8 +877,8 @@ const u32 gItemIconPalette_DreadPlate[] = INCBIN_U32("graphics/items/icon_palett const u32 gItemIcon_IronPlate[] = INCBIN_U32("graphics/items/icons/iron_plate.4bpp.lz"); const u32 gItemIconPalette_IronPlate[] = INCBIN_U32("graphics/items/icon_palettes/iron_plate.gbapal.lz"); -const u32 gItemIcon_IronPlate[] = INCBIN_U32("graphics/items/icons/honey.4bpp.lz"); -const u32 gItemIconPalette_IronPlate[] = INCBIN_U32("graphics/items/icon_palettes/honey.gbapal.lz"); +const u32 gItemIcon_Honey[] = INCBIN_U32("graphics/items/icons/honey.4bpp.lz"); +const u32 gItemIconPalette_Honey[] = INCBIN_U32("graphics/items/icon_palettes/honey.gbapal.lz"); // Gen 5 Items