From 90e94f50d973c37d866d74629ee662872e3b0dad Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 30 Apr 2019 22:07:43 -0300 Subject: [PATCH] Defined a hold effect for every battle-related item, and added all the missing items' data. --- include/constants/hold_effects.h | 26 +- src/data/items.h | 401 +++++++++++++++++++++++++++--- src/data/text/item_descriptions.h | 120 +++++++++ 3 files changed, 510 insertions(+), 37 deletions(-) diff --git a/include/constants/hold_effects.h b/include/constants/hold_effects.h index 494c4f506..759931cd1 100644 --- a/include/constants/hold_effects.h +++ b/include/constants/hold_effects.h @@ -100,7 +100,14 @@ #define HOLD_EFFECT_ADAMANT_ORB 94 #define HOLD_EFFECT_LUSTROUS_ORB 95 #define HOLD_EFFECT_GRISEOUS_ORB 96 -#define HOLD_EFFECT_RESIST_BERRY 97 +#define HOLD_EFFECT_GRACIDEA 97 +#define HOLD_EFFECT_RESIST_BERRY 98 +#define HOLD_EFFECT_POWER_BRACER 99 +#define HOLD_EFFECT_POWER_BELT 100 +#define HOLD_EFFECT_POWER_LENS 101 +#define HOLD_EFFECT_POWER_BAND 102 +#define HOLD_EFFECT_POWER_ANKLET 103 +#define HOLD_EFFECT_POWER_WEIGHT 104 // Gen5 hold effects #define HOLD_EFFECT_FLOAT_STONE 115 @@ -130,6 +137,23 @@ #define HOLD_EFFECT_TERRAIN_EXTENDER 150 #define HOLD_EFFECT_SEEDS 151 #define HOLD_EFFECT_ADRENALINE_ORB 152 +#define HOLD_EFFECT_BUG_MEMORY 153 +#define HOLD_EFFECT_DARK_MEMORY 154 +#define HOLD_EFFECT_DRAGON_MEMORY 155 +#define HOLD_EFFECT_ELECTRIC_MEMORY 156 +#define HOLD_EFFECT_FAIRY_MEMORY 157 +#define HOLD_EFFECT_FIGHTING_MEMORY 158 +#define HOLD_EFFECT_FIRE_MEMORY 159 +#define HOLD_EFFECT_FLYING_MEMORY 160 +#define HOLD_EFFECT_GHOST_MEMORY 161 +#define HOLD_EFFECT_GRASS_MEMORY 162 +#define HOLD_EFFECT_GROUND_MEMORY 163 +#define HOLD_EFFECT_ICE_MEMORY 164 +#define HOLD_EFFECT_POISON_MEMORY 165 +#define HOLD_EFFECT_PSYCHIC_MEMORY 166 +#define HOLD_EFFECT_ROCK_MEMORY 167 +#define HOLD_EFFECT_STEEL_MEMORY 168 +#define HOLD_EFFECT_WATER_MEMORY 169 #define HOLD_EFFECT_CHOICE(holdEffect)((holdEffect == HOLD_EFFECT_CHOICE_BAND || holdEffect == HOLD_EFFECT_CHOICE_SCARF || holdEffect == HOLD_EFFECT_CHOICE_SPECS)) diff --git a/src/data/items.h b/src/data/items.h index 1b2ad0c77..6de0fc741 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -3288,7 +3288,7 @@ const struct Item gItems[] = .name = _("Power Bracer"), .itemId = ITEM_POWER_BRACER, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, // Placeholder? + .holdEffect = HOLD_EFFECT_POWER_BRACER, .description = sPowerBracerDesc, .pocket = POCKET_ITEMS, .type = 4, @@ -3301,7 +3301,7 @@ const struct Item gItems[] = .name = _("Power Belt"), .itemId = ITEM_POWER_BELT, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, // Placeholder? + .holdEffect = HOLD_EFFECT_POWER_BELT, .description = sPowerBeltDesc, .pocket = POCKET_ITEMS, .type = 4, @@ -3314,7 +3314,7 @@ const struct Item gItems[] = .name = _("Power Lens"), .itemId = ITEM_POWER_LENS, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, // Placeholder? + .holdEffect = HOLD_EFFECT_POWER_LENS, .description = sPowerLensDesc, .pocket = POCKET_ITEMS, .type = 4, @@ -3327,7 +3327,7 @@ const struct Item gItems[] = .name = _("Power Band"), .itemId = ITEM_POWER_BAND, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, // Placeholder? + .holdEffect = HOLD_EFFECT_POWER_BAND, .description = sPowerBandDesc, .pocket = POCKET_ITEMS, .type = 4, @@ -3340,7 +3340,7 @@ const struct Item gItems[] = .name = _("Power Anklet"), .itemId = ITEM_POWER_ANKLET, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, // Placeholder? + .holdEffect = HOLD_EFFECT_POWER_ANKLET, .description = sPowerAnkletDesc, .pocket = POCKET_ITEMS, .type = 4, @@ -3353,7 +3353,7 @@ const struct Item gItems[] = .name = _("Power Weight"), .itemId = ITEM_POWER_WEIGHT, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, // Placeholder? + .holdEffect = HOLD_EFFECT_POWER_WEIGHT, .description = sPowerWeightDesc, .pocket = POCKET_ITEMS, .type = 4, @@ -3945,32 +3945,6 @@ const struct Item gItems[] = .secondaryId = 0, }, - [ITEM_ROOT_FOSSIL] = - { - .name = _("Root Fossil"), - .itemId = ITEM_ROOT_FOSSIL, - .price = 0, - .description = sRootFossilDesc, - .importance = 1, - .pocket = POCKET_KEY_ITEMS, - .type = 4, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .secondaryId = 0, - }, - - [ITEM_CLAW_FOSSIL] = - { - .name = _("Claw Fossil"), - .itemId = ITEM_CLAW_FOSSIL, - .price = 0, - .description = sClawFossilDesc, - .importance = 1, - .pocket = POCKET_KEY_ITEMS, - .type = 4, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .secondaryId = 0, - }, - [ITEM_DEVON_SCOPE] = { .name = _("Devon Scope"), @@ -4796,14 +4770,40 @@ const struct Item gItems[] = .secondaryId = 0, }, + [ITEM_ARMOR_FOSSIL] = + { + .name = _("Armor Fossil"), + .itemId = ITEM_ARMOR_FOSSIL, + .price = 0, + .description = sArmorFossilDesc, + .importance = 0, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_SKULL_FOSSIL] = + { + .name = _("Skull Fossil"), + .itemId = ITEM_SKULL_FOSSIL, + .price = 0, + .description = sSkullFossilDesc, + .importance = 0, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + [ITEM_HELIX_FOSSIL] = { .name = _("Helix Fossil"), .itemId = ITEM_HELIX_FOSSIL, .price = 0, .description = sHelixFossilDesc, - .importance = 1, - .pocket = POCKET_KEY_ITEMS, + .importance = 0, + .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, .secondaryId = 0, @@ -4815,8 +4815,86 @@ const struct Item gItems[] = .itemId = ITEM_DOME_FOSSIL, .price = 0, .description = sDomeFossilDesc, - .importance = 1, - .pocket = POCKET_KEY_ITEMS, + .importance = 0, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_ROOT_FOSSIL] = + { + .name = _("Root Fossil"), + .itemId = ITEM_ROOT_FOSSIL, + .price = 0, + .description = sRootFossilDesc, + .importance = 0, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_CLAW_FOSSIL] = + { + .name = _("Claw Fossil"), + .itemId = ITEM_CLAW_FOSSIL, + .price = 0, + .description = sClawFossilDesc, + .importance = 0, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_COVER_FOSSIL] = + { + .name = _("Covet Fossil"), + .itemId = ITEM_COVER_FOSSIL, + .price = 0, + .description = sCoverFossilDesc, + .importance = 0, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_PLUME_FOSSIL] = + { + .name = _("Plume Fossil"), + .itemId = ITEM_PLUME_FOSSIL, + .price = 0, + .description = sPlumeFossilDesc, + .importance = 0, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_JAW_FOSSIL] = + { + .name = _("Jaw Fossil"), + .itemId = ITEM_JAW_FOSSIL, + .price = 0, + .description = sJawFossilDesc, + .importance = 0, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_SAIL_FOSSIL] = + { + .name = _("Sail Fossil"), + .itemId = ITEM_SAIL_FOSSIL, + .price = 0, + .description = sSailFossilDesc, + .importance = 0, + .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, .secondaryId = 0, @@ -5474,6 +5552,257 @@ const struct Item gItems[] = .secondaryId = 0, }, + [ITEM_GRACIDEA] = + { + .name = _("Gracidea"), + .itemId = ITEM_GRACIDEA, + .price = 200, + .holdEffect = HOLD_EFFECT_GRACIDEA, + .description = sGracideaDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_BUG_MEMORY] = + { + .name = _("Bug Memory"), + .itemId = ITEM_BUG_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_BUG_MEMORY, + .holdEffectParam = 0, + .description = sBugMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_DARK_MEMORY] = + { + .name = _("Dark Memory"), + .itemId = ITEM_DARK_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_DARK_MEMORY, + .holdEffectParam = 0, + .description = sDarkMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_DRAGON_MEMORY] = + { + .name = _("Dragon Memory"), + .itemId = ITEM_DRAGON_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_DRAGON_MEMORY, + .holdEffectParam = 0, + .description = sDragonMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_ELECTRIC_MEMORY] = + { + .name = _("Elec. Memory"), + .itemId = ITEM_ELECTRIC_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_ELECTRIC_MEMORY, + .holdEffectParam = 0, + .description = sElectricMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_FAIRY_MEMORY] = + { + .name = _("Fairy Memory"), + .itemId = ITEM_FAIRY_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_FAIRY_MEMORY, + .holdEffectParam = 0, + .description = sFairyMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_FIGHTING_MEMORY] = + { + .name = _("Fight Memory"), + .itemId = ITEM_FIGHTING_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_FIGHTING_MEMORY, + .holdEffectParam = 0, + .description = sFightingMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_FIRE_MEMORY] = + { + .name = _("Fire Memory"), + .itemId = ITEM_FIRE_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_FIRE_MEMORY, + .holdEffectParam = 0, + .description = sFireMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_FLYING_MEMORY] = + { + .name = _("Flying Memory"), + .itemId = ITEM_FLYING_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_FLYING_MEMORY, + .holdEffectParam = 0, + .description = sFlyingMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_GHOST_MEMORY] = + { + .name = _("Ghost Memory"), + .itemId = ITEM_GHOST_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_GHOST_MEMORY, + .holdEffectParam = 0, + .description = sGhostMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_GRASS_MEMORY] = + { + .name = _("Grass Memory"), + .itemId = ITEM_GRASS_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_GRASS_MEMORY, + .holdEffectParam = 0, + .description = sGrassMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_GROUND_MEMORY] = + { + .name = _("Ground Memory"), + .itemId = ITEM_GROUND_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_GROUND_MEMORY, + .holdEffectParam = 0, + .description = sGroundMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_ICE_MEMORY] = + { + .name = _("Ice Memory"), + .itemId = ITEM_ICE_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_ICE_MEMORY, + .holdEffectParam = 0, + .description = sIceMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_POISON_MEMORY] = + { + .name = _("Poison Memory"), + .itemId = ITEM_POISON_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_POISON_MEMORY, + .holdEffectParam = 0, + .description = sPoisonMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_PSYCHIC_MEMORY] = + { + .name = _("PsychicMemory"), + .itemId = ITEM_PSYCHIC_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_PSYCHIC_MEMORY, + .holdEffectParam = 0, + .description = sPsychicMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_ROCK_MEMORY] = + { + .name = _("Rock Memory"), + .itemId = ITEM_ROCK_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_ROCK_MEMORY, + .holdEffectParam = 0, + .description = sRockMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_STEEL_MEMORY] = + { + .name = _("Steel Memory"), + .itemId = ITEM_STEEL_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_STEEL_MEMORY, + .holdEffectParam = 0, + .description = sSteelMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + + [ITEM_WATER_MEMORY] = + { + .name = _("Water Memory"), + .itemId = ITEM_WATER_MEMORY, + .price = 1000, + .holdEffect = HOLD_EFFECT_WATER_MEMORY, + .holdEffectParam = 0, + .description = sWaterMemoryDesc, + .pocket = POCKET_ITEMS, + .type = 4, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .secondaryId = 0, + }, + [ITEM_FLAME_PLATE] = { .name = _("Flame Plate"), diff --git a/src/data/text/item_descriptions.h b/src/data/text/item_descriptions.h index 6afa07198..40a0c2f0b 100644 --- a/src/data/text/item_descriptions.h +++ b/src/data/text/item_descriptions.h @@ -1819,6 +1819,16 @@ static const u8 sLiftKeyDesc[] = _( "used in TEAM\n" "ROCKET's HIDEOUT."); +static const u8 sArmorFossilDesc[] = _( + "A piece of a\n" + "prehistoric POKé-\n" + "MON's head."); + +static const u8 sSkullFossilDesc[] = _( + "A piece of a\n" + "prehistoric POKé-\n" + "MON's head."); + static const u8 sHelixFossilDesc[] = _( "A piece of an\n" "ancient marine\n" @@ -1829,6 +1839,26 @@ static const u8 sDomeFossilDesc[] = _( "ancient marine\n" "POKéMON's shell."); +static const u8 sCoverFossilDesc[] = _( + "A piece of a\n" + "prehistoric POKé-\n" + "MON's back."); + +static const u8 sPlumeFossilDesc[] = _( + "A piece of a\n" + "prehistoric POKé-\n" + "MON's wing."); + +static const u8 sJawFossilDesc[] = _( + "A piece of a prehis-\n" + "toric POKéMON's\n" + "large jaw."); + +static const u8 sSailFossilDesc[] = _( + "A piece of a prehis-\n" + "toric POKéMON's\n" + "skin sail."); + static const u8 sSilphScopeDesc[] = _( "SILPH CO's scope\n" "makes unseeable\n" @@ -2071,6 +2101,96 @@ static const u8 sGriseousOrbDesc[] = _( "Giratina's Dragon\n" "and Ghost-type moves."); +static const u8 sGracideaDesc[] = _( + "Bouquets made with\n" + "it are offered as a\n" + "token of gratitude."); + +static const u8 sBugMemoryDesc[] = _( + "A disc with Bug\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sDarkMemoryDesc[] = _( + "A disc with Dark\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sDragonMemoryDesc[] = _( + "A disc with Dragon\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sElectricMemoryDesc[] = _( + "A disc with Electric\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sFairyMemoryDesc[] = _( + "A disc with Fairy\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sFightingMemoryDesc[] = _( + "A disc with Fighting\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sFireMemoryDesc[] = _( + "A disc with Fire\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sFlyingMemoryDesc[] = _( + "A disc with Flying\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sGhostMemoryDesc[] = _( + "A disc with Ghost\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sGrassMemoryDesc[] = _( + "A disc with Grass\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sGroundMemoryDesc[] = _( + "A disc with Ground\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sIceMemoryDesc[] = _( + "A disc with Ice\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sPoisonMemoryDesc[] = _( + "A disc with Poison\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sPsychicMemoryDesc[] = _( + "A disc with Psychic\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sRockMemoryDesc[] = _( + "A disc with Rock\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sSteelMemoryDesc[] = _( + "A disc with Steel\n" + "type data. It swaps\n" + "Silvally's type."); + +static const u8 sWaterMemoryDesc[] = _( + "A disc with Water\n" + "type data. It swaps\n" + "Silvally's type."); + static const u8 sFlamePlateDesc[] = _( "A stone tablet that\n" "boosts the power of\n"