Merge pull request #2595 from AsparagusEduardo/RHH/pr/data/Gen9Items

Added some Gen9 item data and fixed Punching Glove's effect
This commit is contained in:
ghoulslash 2023-01-27 16:13:50 -05:00 committed by GitHub
commit 2b58593e33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 122 additions and 7 deletions

View file

@ -928,7 +928,13 @@
#define ITEM_RUBY 756
#define ITEM_SAPPHIRE 757
#define ITEMS_COUNT 758
#define ITEM_ABILITY_SHIELD 758
#define ITEM_CLEAR_AMULET 759
#define ITEM_PUNCHING_GLOVE 760
#define ITEM_COVERT_CLOAK 761
#define ITEM_LOADED_DICE 762
#define ITEMS_COUNT 763
#define ITEM_FIELD_ARROW ITEMS_COUNT
// A special item id associated with "Cancel"/"Exit" etc. in a list of items or decorations

View file

@ -8201,7 +8201,7 @@ u32 GetBattlerHoldEffectParam(u8 battlerId)
bool32 IsMoveMakingContact(u16 move, u8 battlerAtk)
{
u16 atkHoldEffect = GetBattlerHoldEffect(battlerAtk, TRUE);
if (!(gBattleMoves[move].flags & FLAG_MAKES_CONTACT))
{
if (gBattleMoves[move].effect == EFFECT_SHELL_SIDE_ARM && gBattleStruct->swapDamageCategory)
@ -8209,11 +8209,9 @@ bool32 IsMoveMakingContact(u16 move, u8 battlerAtk)
else
return FALSE;
}
else if (GetBattlerAbility(battlerAtk) == ABILITY_LONG_REACH || atkHoldEffect == HOLD_EFFECT_PUNCHING_GLOVE)
{
return FALSE;
}
else if (atkHoldEffect == HOLD_EFFECT_PROTECTIVE_PADS)
else if ((atkHoldEffect == HOLD_EFFECT_PUNCHING_GLOVE && (gBattleMoves[move].flags & FLAG_IRON_FIST_BOOST))
|| atkHoldEffect == HOLD_EFFECT_PROTECTIVE_PADS
|| GetBattlerAbility(battlerAtk) == ABILITY_LONG_REACH)
{
return FALSE;
}

View file

@ -1930,3 +1930,18 @@ const u32 gItemIcon_Gem[] = INCBIN_U32("graphics/items/icons/gem.4bpp.lz");
const u32 gItemIconPalette_Ruby[] = INCBIN_U32("graphics/items/icon_palettes/ruby.gbapal.lz");
const u32 gItemIconPalette_Sapphire[] = INCBIN_U32("graphics/items/icon_palettes/sapphire.gbapal.lz");
//const u32 gItemIcon_AbilityShield[] = INCBIN_U32("graphics/items/icons/ability_shield.4bpp.lz");
//const u32 gItemIconPalette_AbilityShield[] = INCBIN_U32("graphics/items/icon_palettes/ability_shield.gbapal.lz");
//const u32 gItemIcon_ClearAmulet[] = INCBIN_U32("graphics/items/icons/clear_amulet.4bpp.lz");
//const u32 gItemIconPalette_ClearAmulet[] = INCBIN_U32("graphics/items/icon_palettes/clear_amulet.gbapal.lz");
//const u32 gItemIcon_PunchingGlove[] = INCBIN_U32("graphics/items/icons/punching_glove.4bpp.lz");
//const u32 gItemIconPalette_PunchingGlove[] = INCBIN_U32("graphics/items/icon_palettes/punching_glove.gbapal.lz");
//const u32 gItemIcon_CovertCloak[] = INCBIN_U32("graphics/items/icons/covert_cloak.4bpp.lz");
//const u32 gItemIconPalette_CovertCloak[] = INCBIN_U32("graphics/items/icon_palettes/covert_cloak.gbapal.lz");
//const u32 gItemIcon_LoadedDice[] = INCBIN_U32("graphics/items/icons/loaded_dice.4bpp.lz");
//const u32 gItemIconPalette_LoadedDice[] = INCBIN_U32("graphics/items/icon_palettes/loaded_dice.gbapal.lz");

View file

@ -803,6 +803,11 @@ const u32 *const gItemIconTable[ITEMS_COUNT + 1][2] =
[ITEM_TEA] = {gItemIcon_Tea, gItemIconPalette_Tea},
[ITEM_RUBY] = {gItemIcon_Gem, gItemIconPalette_Ruby},
[ITEM_SAPPHIRE] = {gItemIcon_Gem, gItemIconPalette_Sapphire},
[ITEM_ABILITY_SHIELD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_AbilityShield, gItemIconPalette_AbilityShield},
[ITEM_CLEAR_AMULET] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_ClearAmulet, gItemIconPalette_ClearAmulet},
[ITEM_PUNCHING_GLOVE] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_PunchingGlove, gItemIconPalette_PunchingGlove},
[ITEM_COVERT_CLOAK] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_CovertCloak, gItemIconPalette_CovertCloak},
[ITEM_LOADED_DICE] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_LoadedDice, gItemIconPalette_LoadedDice},
// Return to field arrow
[ITEMS_COUNT] = {gItemIcon_ReturnToFieldArrow, gItemIconPalette_ReturnToFieldArrow},
};

View file

@ -9852,4 +9852,70 @@ const struct Item gItems[] =
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
},
[ITEM_ABILITY_SHIELD] =
{
.name = _("AbilityShield"),
.itemId = ITEM_ABILITY_SHIELD,
.price = 20000,
.holdEffect = HOLD_EFFECT_ABILITY_SHIELD,
.description = sAbilityShieldDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.flingPower = 30,
},
[ITEM_CLEAR_AMULET] =
{
.name = _("Clear Amulet"),
.itemId = ITEM_CLEAR_AMULET,
.price = 30000,
.holdEffect = HOLD_EFFECT_CLEAR_AMULET,
.description = sClearAmuletDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.flingPower = 30,
},
[ITEM_PUNCHING_GLOVE] =
{
.name = _("PunchingGlove"),
.itemId = ITEM_PUNCHING_GLOVE,
.price = 15000,
.holdEffect = HOLD_EFFECT_PUNCHING_GLOVE,
.description = sPunchingGloveDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.flingPower = 30,
},
[ITEM_COVERT_CLOAK] =
{
.name = _("Covert Cloak"),
.itemId = ITEM_COVERT_CLOAK,
.price = 20000,
.holdEffect = HOLD_EFFECT_COVERT_CLOAK,
.description = sCovertCloakDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.flingPower = 30,
},
[ITEM_LOADED_DICE] =
{
//YellwApricorn
.name = _("Loaded Dice"),
.itemId = ITEM_LOADED_DICE,
.price = 20000,
.holdEffect = HOLD_EFFECT_LOADED_DICE,
.description = sLoadedDiceDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.flingPower = 30,
},
};

View file

@ -3792,3 +3792,28 @@ static const u8 sSapphireDesc[] = _(
"A brilliant blue gem\n"
"that symbolizes\n"
"honesty.");
static const u8 sAbilityShieldDesc[] = _(
"Ability changes are\n"
"prevented for this\n"
"items's holder.");
static const u8 sClearAmuletDesc[] = _(
"Stat lowering is\n"
"prevented for this\n"
"items's holder.");
static const u8 sPunchingGloveDesc[] = _(
"Powers up punching\n"
"moves and removes\n"
"their contact.");
static const u8 sCovertCloakDesc[] = _(
"Protects the holder\n"
"from secondary\n"
"move effects.");
static const u8 sLoadedDiceDesc[] = _(
"Rolls high numbers.\n"
"Multihit strikes\n"
"hit more times.");