From 88b732632538795a5194ce5b100c37f58f47ecb3 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 26 Jan 2022 21:46:35 -0300 Subject: [PATCH] Ported the IE's flingPower item field and ItemId_GetFlingPower --- include/item.h | 2 ++ src/item.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/item.h b/include/item.h index ceca83bd5f..a1d8324bbc 100644 --- a/include/item.h +++ b/include/item.h @@ -21,6 +21,7 @@ struct Item u8 battleUsage; ItemUseFunc battleUseFunc; u8 secondaryId; + u8 flingPower; }; struct BagPocket @@ -75,5 +76,6 @@ ItemUseFunc ItemId_GetFieldFunc(u16 itemId); u8 ItemId_GetBattleUsage(u16 itemId); ItemUseFunc ItemId_GetBattleFunc(u16 itemId); u8 ItemId_GetSecondaryId(u16 itemId); +u8 ItemId_GetFlingPower(u16 itemId); #endif // GUARD_ITEM_H diff --git a/src/item.c b/src/item.c index 1560342629..f1320a7acd 100644 --- a/src/item.c +++ b/src/item.c @@ -947,3 +947,8 @@ u8 ItemId_GetSecondaryId(u16 itemId) { return gItems[SanitizeItemId(itemId)].secondaryId; } + +u8 ItemId_GetFlingPower(u16 itemId) +{ + return gItems[SanitizeItemId(itemId)].flingPower; +}