Consolidated the values of Rotom's moves and added Gen9 base form effect (#5186)

* Consolidated Rotom move values

* Updated changing Rotom into its base form to its Gen9 effect

* Fixed order of if statement
This commit is contained in:
Frank DeBlasio 2024-08-16 17:31:19 -04:00 committed by GitHub
parent bced2c97a1
commit 15348eae84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 13 deletions

View file

@ -19,6 +19,7 @@
#define I_BERRY_PRICE GEN_7 // Since Berries have become unplantable (Gen8+), their price has gone up.
#define I_POWER_ITEM_BOOST GEN_LATEST // In Gen7+, Power Items grant 8 EVs instead of 4 EVs.
#define I_PREMIER_BALL_BONUS GEN_LATEST // In LGPE onwards (Gen8+ here), you are given a Premier Ball for every 10 Poké Balls of any type and in the same purchase. Previously, it only applied to regular Poké Balls and only 1 could be obtained per purchase.
#define I_ROTOM_CATALOG_THUNDER_SHOCK GEN_LATEST // In Gen9+, reverting Rotom to its base form will teach it Thunder Shock even if it knows another move.
// TM config
#define I_REUSABLE_TMS FALSE // In Gen5-8, TMs are reusable. Setting this to TRUE will make all vanilla TMs reusable, though they can also be cherry-picked by setting their importance to 1.

View file

@ -1140,11 +1140,18 @@ static const u8 *const sUnused_StatStrings[] =
gText_Speed2
};
#define ROTOM_BASE_MOVE MOVE_THUNDER_SHOCK
#define ROTOM_HEAT_MOVE MOVE_OVERHEAT
#define ROTOM_WASH_MOVE MOVE_HYDRO_PUMP
#define ROTOM_FROST_MOVE MOVE_BLIZZARD
#define ROTOM_FAN_MOVE MOVE_AIR_SLASH
#define ROTOM_MOW_MOVE MOVE_LEAF_STORM
static const u16 sRotomFormChangeMoves[5] =
{
MOVE_HYDRO_PUMP,
MOVE_BLIZZARD,
MOVE_OVERHEAT,
MOVE_AIR_SLASH,
MOVE_LEAF_STORM,
ROTOM_HEAT_MOVE,
ROTOM_WASH_MOVE,
ROTOM_FROST_MOVE,
ROTOM_FAN_MOVE,
ROTOM_MOW_MOVE,
};

View file

@ -6413,13 +6413,13 @@ static void Task_TryItemUseFormChange(u8 taskId)
case 6:
if (!IsPartyMenuTextPrinterActive())
{
if (gSpecialVar_ItemId == ITEM_ROTOM_CATALOG) //only for rotom currently
if (gSpecialVar_ItemId == ITEM_ROTOM_CATALOG) //only for Rotom currently
{
u32 i;
for (i = 0; i < ARRAY_COUNT(sRotomFormChangeMoves); i++)
DeleteMove(mon, sRotomFormChangeMoves[i]);
if (gSpecialVar_0x8000 == MOVE_THUNDER_SHOCK)
if (I_ROTOM_CATALOG_THUNDER_SHOCK < GEN_9 && gSpecialVar_0x8000 == ROTOM_BASE_MOVE)
{
if (!DoesMonHaveAnyMoves(mon))
FormChangeTeachMove(taskId, gSpecialVar_0x8000, gPartyMenu.slotId);
@ -6517,42 +6517,42 @@ bool32 TryMultichoiceFormChange(u8 taskId)
static void CursorCb_CatalogBulb(u8 taskId)
{
gSpecialVar_Result = 0;
gSpecialVar_0x8000 = MOVE_THUNDER_SHOCK;
gSpecialVar_0x8000 = ROTOM_BASE_MOVE;
TryMultichoiceFormChange(taskId);
}
static void CursorCb_CatalogOven(u8 taskId)
{
gSpecialVar_Result = 1;
gSpecialVar_0x8000 = MOVE_OVERHEAT;
gSpecialVar_0x8000 = ROTOM_HEAT_MOVE;
TryMultichoiceFormChange(taskId);
}
static void CursorCb_CatalogWashing(u8 taskId)
{
gSpecialVar_Result = 2;
gSpecialVar_0x8000 = MOVE_HYDRO_PUMP;
gSpecialVar_0x8000 = ROTOM_WASH_MOVE;
TryMultichoiceFormChange(taskId);
}
static void CursorCb_CatalogFridge(u8 taskId)
{
gSpecialVar_Result = 3;
gSpecialVar_0x8000 = MOVE_BLIZZARD;
gSpecialVar_0x8000 = ROTOM_FROST_MOVE;
TryMultichoiceFormChange(taskId);
}
static void CursorCb_CatalogFan(u8 taskId)
{
gSpecialVar_Result = 4;
gSpecialVar_0x8000 = MOVE_AIR_SLASH;
gSpecialVar_0x8000 = ROTOM_FAN_MOVE;
TryMultichoiceFormChange(taskId);
}
static void CursorCb_CatalogMower(u8 taskId)
{
gSpecialVar_Result = 5;
gSpecialVar_0x8000 = MOVE_LEAF_STORM;
gSpecialVar_0x8000 = ROTOM_MOW_MOVE;
TryMultichoiceFormChange(taskId);
}