From a7a1ab9aeb5b965c31046601a874a2e3cebab286 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 6 Sep 2022 18:37:16 -0300 Subject: [PATCH] Merged FORM_ITEM_HOLD_ABILITY into FORM_ITEM_HOLD There was never a reason not to. --- src/data/pokemon/form_change_tables.h | 6 +++--- src/pokemon.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index f24fe4d85..ddcb4d9cb 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -1,8 +1,8 @@ /* FORM_ITEM_HOLD: - Form change activates when the item is given to or taken from the selected Pokémon. - Alternatively, form change activates when the item is used on the selected Pokémon - that has a particular ability. + Form change activates when the specified item is given to or taken from the selected Pokémon. + Alternatively, form change activates when the specified item is is given to or taken from + the selected Pokémon that has a particular ability. param1 = item to hold param2 = ability to check for, optional diff --git a/src/pokemon.c b/src/pokemon.c index 4fbce67d1..63b3dae9d 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8285,6 +8285,8 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 if ((heldItem == formChanges[i].param1 || formChanges[i].param1 == ITEM_NONE) || ability == formChanges[i].param2) targetSpecies = formChanges[i].targetSpecies; + if ((heldItem == formChanges[i].param1 || formChanges[i].param1 == ITEM_NONE) && ability == formChanges[i].param2) + targetSpecies = formChanges[i].targetSpecies; break; case FORM_ITEM_USE: if (arg == formChanges[i].param1)