diff --git a/data/battle_ai_scripts.s b/data/battle_ai_scripts.s index 6ba2c8748..1f072b734 100644 --- a/data/battle_ai_scripts.s +++ b/data/battle_ai_scripts.s @@ -3628,7 +3628,6 @@ AI_HPAware_DiscouragedEffectsWhenTargetLowHP: @ 82DE2B1 .byte EFFECT_LIGHT_SCREEN .byte EFFECT_OHKO .byte EFFECT_SUPER_FANG - .byte EFFECT_SUPER_FANG .byte EFFECT_MIST .byte EFFECT_FOCUS_ENERGY .byte EFFECT_CONFUSE diff --git a/graphics/items/icon_palettes/honey.pal b/graphics/items/icon_palettes/honey.pal new file mode 100644 index 000000000..c5219f932 --- /dev/null +++ b/graphics/items/icon_palettes/honey.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +48 48 48 +120 80 32 +200 112 0 +80 152 152 +232 144 0 +96 184 192 +248 184 72 +248 240 184 +216 248 248 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icons/honey.png b/graphics/items/icons/honey.png new file mode 100644 index 000000000..837243e77 Binary files /dev/null and b/graphics/items/icons/honey.png differ diff --git a/include/constants/items.h b/include/constants/items.h index 176750a16..f0a6bedd1 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -509,98 +509,99 @@ #define ITEM_DRACO_PLATE 420 #define ITEM_DREAD_PLATE 421 #define ITEM_IRON_PLATE 422 +#define ITEM_HONEY 423 // Gen 5 Items -#define ITEM_EVIOLITE 423 -#define ITEM_FLOAT_STONE 424 -#define ITEM_BINDING_BAND 425 -#define ITEM_DOUSE_DRIVE 426 -#define ITEM_SHOCK_DRIVE 427 -#define ITEM_BURN_DRIVE 428 -#define ITEM_CHILL_DRIVE 429 -#define ITEM_FIRE_GEM 430 -#define ITEM_WATER_GEM 431 -#define ITEM_ELECTRIC_GEM 432 -#define ITEM_GRASS_GEM 433 -#define ITEM_ICE_GEM 434 -#define ITEM_FIGHTING_GEM 435 -#define ITEM_POISON_GEM 436 -#define ITEM_GROUND_GEM 437 -#define ITEM_FLYING_GEM 438 -#define ITEM_PSYCHIC_GEM 439 -#define ITEM_BUG_GEM 440 -#define ITEM_ROCK_GEM 441 -#define ITEM_GHOST_GEM 442 -#define ITEM_DRAGON_GEM 443 -#define ITEM_DARK_GEM 444 -#define ITEM_STEEL_GEM 445 -#define ITEM_NORMAL_GEM 446 -#define ITEM_FAIRY_GEM 447 +#define ITEM_EVIOLITE 424 +#define ITEM_FLOAT_STONE 425 +#define ITEM_BINDING_BAND 426 +#define ITEM_DOUSE_DRIVE 427 +#define ITEM_SHOCK_DRIVE 428 +#define ITEM_BURN_DRIVE 429 +#define ITEM_CHILL_DRIVE 430 +#define ITEM_FIRE_GEM 431 +#define ITEM_WATER_GEM 432 +#define ITEM_ELECTRIC_GEM 433 +#define ITEM_GRASS_GEM 434 +#define ITEM_ICE_GEM 435 +#define ITEM_FIGHTING_GEM 436 +#define ITEM_POISON_GEM 437 +#define ITEM_GROUND_GEM 438 +#define ITEM_FLYING_GEM 439 +#define ITEM_PSYCHIC_GEM 440 +#define ITEM_BUG_GEM 441 +#define ITEM_ROCK_GEM 442 +#define ITEM_GHOST_GEM 443 +#define ITEM_DRAGON_GEM 444 +#define ITEM_DARK_GEM 445 +#define ITEM_STEEL_GEM 446 +#define ITEM_NORMAL_GEM 447 +#define ITEM_FAIRY_GEM 448 // Gen6 Items -#define ITEM_ASSAULT_VEST 448 -#define ITEM_PIXIE_PLATE 449 -#define ITEM_SAFETY_GOGGLES 450 -#define ITEM_GENGARITE 451 -#define ITEM_GARDEVOIRITE 452 -#define ITEM_AMPHAROSITE 453 -#define ITEM_VENUSAURITE 454 -#define ITEM_CHARIZARDITE_X 455 -#define ITEM_BLASTOISINITE 456 -#define ITEM_MEWTWONITE_X 457 -#define ITEM_MEWTWONITE_Y 458 -#define ITEM_BLAZIKENITE 459 -#define ITEM_MEDICHAMITE 460 -#define ITEM_HOUNDOOMINITE 461 -#define ITEM_AGGRONITE 462 -#define ITEM_BANETTITE 463 -#define ITEM_TYRANITARITE 464 -#define ITEM_SCIZORITE 465 -#define ITEM_PINSIRITE 466 -#define ITEM_AERODACTYLITE 467 -#define ITEM_LUCARIONITE 468 -#define ITEM_ABOMASITE 469 -#define ITEM_KANGASKHANITE 470 -#define ITEM_GYARADOSITE 471 -#define ITEM_ABSOLITE 472 -#define ITEM_CHARIZARDITE_Y 473 -#define ITEM_ALAKAZITE 474 -#define ITEM_HERACRONITE 475 -#define ITEM_MAWILITE 476 -#define ITEM_MANECTITE 477 -#define ITEM_GARCHOMPITE 478 -#define ITEM_LATIASITE 479 -#define ITEM_LATIOSITE 480 -#define ITEM_SWAMPERTITE 481 -#define ITEM_SCEPTILITE 482 -#define ITEM_SABLENITE 483 -#define ITEM_ALTARIANITE 484 -#define ITEM_GALLADITE 485 -#define ITEM_AUDINITE 486 -#define ITEM_METAGROSSITE 487 -#define ITEM_SHARPEDONITE 488 -#define ITEM_SLOWBRONITE 489 -#define ITEM_STEELIXITE 490 -#define ITEM_PIDGEOTITE 491 -#define ITEM_GLALITITE 492 -#define ITEM_DIANCITE 493 -#define ITEM_CAMERUPTITE 494 -#define ITEM_LOPUNNITE 495 -#define ITEM_SALAMENCITE 496 -#define ITEM_BEEDRILLITE 497 -#define ITEM_MEGA_BRACELET 498 +#define ITEM_ASSAULT_VEST 449 +#define ITEM_PIXIE_PLATE 450 +#define ITEM_SAFETY_GOGGLES 451 +#define ITEM_GENGARITE 452 +#define ITEM_GARDEVOIRITE 453 +#define ITEM_AMPHAROSITE 454 +#define ITEM_VENUSAURITE 455 +#define ITEM_CHARIZARDITE_X 456 +#define ITEM_BLASTOISINITE 457 +#define ITEM_MEWTWONITE_X 458 +#define ITEM_MEWTWONITE_Y 459 +#define ITEM_BLAZIKENITE 460 +#define ITEM_MEDICHAMITE 461 +#define ITEM_HOUNDOOMINITE 462 +#define ITEM_AGGRONITE 463 +#define ITEM_BANETTITE 464 +#define ITEM_TYRANITARITE 465 +#define ITEM_SCIZORITE 466 +#define ITEM_PINSIRITE 467 +#define ITEM_AERODACTYLITE 468 +#define ITEM_LUCARIONITE 469 +#define ITEM_ABOMASITE 470 +#define ITEM_KANGASKHANITE 471 +#define ITEM_GYARADOSITE 472 +#define ITEM_ABSOLITE 473 +#define ITEM_CHARIZARDITE_Y 474 +#define ITEM_ALAKAZITE 475 +#define ITEM_HERACRONITE 476 +#define ITEM_MAWILITE 477 +#define ITEM_MANECTITE 478 +#define ITEM_GARCHOMPITE 479 +#define ITEM_LATIASITE 480 +#define ITEM_LATIOSITE 481 +#define ITEM_SWAMPERTITE 482 +#define ITEM_SCEPTILITE 483 +#define ITEM_SABLENITE 484 +#define ITEM_ALTARIANITE 485 +#define ITEM_GALLADITE 486 +#define ITEM_AUDINITE 487 +#define ITEM_METAGROSSITE 488 +#define ITEM_SHARPEDONITE 489 +#define ITEM_SLOWBRONITE 490 +#define ITEM_STEELIXITE 491 +#define ITEM_PIDGEOTITE 492 +#define ITEM_GLALITITE 493 +#define ITEM_DIANCITE 494 +#define ITEM_CAMERUPTITE 495 +#define ITEM_LOPUNNITE 496 +#define ITEM_SALAMENCITE 497 +#define ITEM_BEEDRILLITE 498 +#define ITEM_MEGA_BRACELET 499 // Gen7 hold effects -#define ITEM_PROTECTIVE_PADS 499 -#define ITEM_TERRAIN_EXTENDER 500 -#define ITEM_ELECTRIC_SEED 501 -#define ITEM_GRASSY_SEED 502 -#define ITEM_MISTY_SEED 503 -#define ITEM_PSYCHIC_SEED 504 -#define ITEM_ADRENALINE_ORB 505 +#define ITEM_PROTECTIVE_PADS 500 +#define ITEM_TERRAIN_EXTENDER 501 +#define ITEM_ELECTRIC_SEED 502 +#define ITEM_GRASSY_SEED 503 +#define ITEM_MISTY_SEED 504 +#define ITEM_PSYCHIC_SEED 505 +#define ITEM_ADRENALINE_ORB 506 -#define ITEMS_COUNT 506 +#define ITEMS_COUNT 507 #define ITEM_FIELD_ARROW ITEMS_COUNT #define FIRST_BERRY_INDEX ITEM_CHERI_BERRY diff --git a/include/graphics.h b/include/graphics.h index 401907e7d..23e3b9c66 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 867486c3c..9335e9f7c 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -10546,6 +10546,7 @@ static void atkE5_pickup(void) s32 i; u16 species, heldItem; u8 ability; + u8 lvlDivBy10; if (InBattlePike()) { @@ -10580,6 +10581,9 @@ static void atkE5_pickup(void) { species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); + lvlDivBy10 = (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL)-1) / 10; //Moving this here makes it easier to add in abilities like Honey Gather + if (lvlDivBy10 > 9) + lvlDivBy10 = 9; if (GetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY)) ability = gBaseStats[species].ability2; @@ -10594,9 +10598,6 @@ static void atkE5_pickup(void) { s32 j; s32 rand = Random() % 100; - u8 lvlDivBy10 = (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) - 1) / 10; - if (lvlDivBy10 > 9) - lvlDivBy10 = 9; for (j = 0; j < 9; j++) { diff --git a/src/battle_util.c b/src/battle_util.c index d5088b9f9..0efaf2539 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5886,6 +5886,8 @@ bool32 CanBattlerGetOrLoseItem(u8 battlerId, u16 itemId) return FALSE; else if (ItemId_GetHoldEffect(itemId) == HOLD_EFFECT_MEGA_STONE && GetMegaEvolutionSpecies(species, itemId) != SPECIES_NONE) return FALSE; + else if (species == SPECIES_GIRATINA && itemId == ITEM_GRISEOUS_ORB) + return FALSE; else return TRUE; } diff --git a/src/data/graphics/items.h b/src/data/graphics/items.h index e20edbd64..b00a5b854 100644 --- a/src/data/graphics/items.h +++ b/src/data/graphics/items.h @@ -877,6 +877,9 @@ 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_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 const u32 gItemIcon_Eviolite[] = INCBIN_U32("graphics/items/icons/eviolite.4bpp.lz"); diff --git a/src/data/item_icon_table.h b/src/data/item_icon_table.h index 2b160ae20..e2c9d673b 100644 --- a/src/data/item_icon_table.h +++ b/src/data/item_icon_table.h @@ -449,6 +449,7 @@ const u32 *const gItemIconTable[][2] = [ITEM_DRACO_PLATE] = {gItemIcon_DracoPlate, gItemIconPalette_DracoPlate}, [ITEM_DREAD_PLATE] = {gItemIcon_DreadPlate, gItemIconPalette_DreadPlate}, [ITEM_IRON_PLATE] = {gItemIcon_IronPlate, gItemIconPalette_IronPlate}, + [ITEM_HONEY] = {gItemIcon_Honey, gItemIconPalette_Honey}, // Gen 5 Items [ITEM_EVIOLITE] = {gItemIcon_Eviolite, gItemIconPalette_Eviolite}, [ITEM_FLOAT_STONE] = {gItemIcon_FloatStone, gItemIconPalette_FloatStone}, diff --git a/src/data/items.h b/src/data/items.h index 6751b018e..5738f7fba 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -9136,4 +9136,21 @@ const struct Item gItems[] = .battleUseFunc = NULL, .secondaryId = 0, }, + [ITEM_HONEY] = + { + .name = _("Honey"), + .itemId = ITEM_HONEY, + .price = 100, + .holdEffect = HOLD_EFFECT_NONE, + .holdEffectParam = 0, + .description = gHoneyItemDescription, + .importance = 0, + .unk19 = 0, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .battleUsage = 0, + .battleUseFunc = NULL, + .secondaryId = 0, + }, }; diff --git a/src/data/text/item_descriptions.h b/src/data/text/item_descriptions.h index 57671d1e7..48584179d 100644 --- a/src/data/text/item_descriptions.h +++ b/src/data/text/item_descriptions.h @@ -452,3 +452,4 @@ const u8 gGrassySeedItemDescription[] = _("Boosts Defense on\nGrassy Terrain,\nb const u8 gMistySeedItemDescription[] = _("Boosts Sp. Def. on\nMisty Terrain,\nbut only one time."); const u8 gPsychicSeedItemDescription[] = _("Boosts Sp. Def. on\nPsychic Terrain,\nbut only one time."); const u8 gAdrenalineOrbItemDescription[] = _("Boosts Speed if the\nuser is intimidated,\nbut only one time."); +const u8 gHoneyItemDescription[] = _("A sweet honey that\nattracts wild Pokémon\nin grass or on trees."); diff --git a/src/item_use.c b/src/item_use.c index c4c23cdbe..76e247cb0 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -1119,3 +1119,4 @@ void ItemUseOutOfBattle_CannotUse(u8 taskId) { DisplayDadsAdviceCannotUseItemMessage(taskId, gTasks[taskId].data[3]); } +