mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-22 19:30:17 +01:00
Reverted to separate form change tables for Forces of Nature.
It was causing form changes with holding items to break
This commit is contained in:
parent
e2daf2c258
commit
b1227af13b
@ -23,13 +23,13 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] =
|
||||
[SPECIES_ARCEUS_DARK] = sArceusFormChangeTable,
|
||||
[SPECIES_ARCEUS_FAIRY] = sArceusFormChangeTable,
|
||||
[SPECIES_TORNADUS] = sTornadusFormChangeTable,
|
||||
[SPECIES_TORNADUS_THERIAN] = sTornadusFormChangeTable,
|
||||
[SPECIES_TORNADUS_THERIAN] = sTornadusTherianFormChangeTable,
|
||||
[SPECIES_THUNDURUS] = sThundurusFormChangeTable,
|
||||
[SPECIES_THUNDURUS_THERIAN] = sThundurusFormChangeTable,
|
||||
[SPECIES_THUNDURUS_THERIAN] = sThundurusTherianFormChangeTable,
|
||||
[SPECIES_LANDORUS] = sLandorusFormChangeTable,
|
||||
[SPECIES_LANDORUS_THERIAN] = sLandorusFormChangeTable,
|
||||
[SPECIES_LANDORUS_THERIAN] = sLandorusTherianFormChangeTable,
|
||||
[SPECIES_KELDEO] = sKeldeoFormChangeTable,
|
||||
[SPECIES_KELDEO_RESOLUTE] = sKeldeoFormChangeTable,
|
||||
[SPECIES_KELDEO_RESOLUTE] = sKeldeoResoluteFormChangeTable,
|
||||
[SPECIES_GENESECT] = sGenesectFormChangeTable,
|
||||
[SPECIES_GENESECT_DOUSE_DRIVE] = sGenesectFormChangeTable,
|
||||
[SPECIES_GENESECT_SHOCK_DRIVE] = sGenesectFormChangeTable,
|
||||
|
@ -1,4 +1,8 @@
|
||||
/*
|
||||
For cycling between forms with the same method and parameters but different target species (eg. Tornadus using the
|
||||
Reveal Glass to change between its two forms), a separate form change table is required for each form.
|
||||
Otherwise, only the last form change on the table will trigger.
|
||||
|
||||
FORM_ITEM_HOLD:
|
||||
Form change activates when the item is given to or taken from the selected Pokémon.
|
||||
param1 = item to hold
|
||||
@ -92,24 +96,40 @@ static const struct FormChange sArceusFormChangeTable[] = {
|
||||
|
||||
static const struct FormChange sTornadusFormChangeTable[] = {
|
||||
{FORM_ITEM_USE, SPECIES_TORNADUS_THERIAN, ITEM_REVEAL_GLASS},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
static const struct FormChange sTornadusTherianFormChangeTable[] = {
|
||||
{FORM_ITEM_USE, SPECIES_TORNADUS, ITEM_REVEAL_GLASS},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
static const struct FormChange sThundurusFormChangeTable[] = {
|
||||
{FORM_ITEM_USE, SPECIES_THUNDURUS_THERIAN, ITEM_REVEAL_GLASS},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
static const struct FormChange sThundurusTherianFormChangeTable[] = {
|
||||
{FORM_ITEM_USE, SPECIES_THUNDURUS, ITEM_REVEAL_GLASS},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
static const struct FormChange sLandorusFormChangeTable[] = {
|
||||
{FORM_ITEM_USE, SPECIES_LANDORUS_THERIAN, ITEM_REVEAL_GLASS},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
static const struct FormChange sLandorusTherianFormChangeTable[] = {
|
||||
{FORM_ITEM_USE, SPECIES_LANDORUS, ITEM_REVEAL_GLASS},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
static const struct FormChange sKeldeoFormChangeTable[] = {
|
||||
{FORM_MOVE, SPECIES_KELDEO_RESOLUTE, MOVE_SECRET_SWORD, WHEN_LEARNED},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
static const struct FormChange sKeldeoResoluteFormChangeTable[] = {
|
||||
{FORM_MOVE, SPECIES_KELDEO, MOVE_SECRET_SWORD, WHEN_FORGOTTEN},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
@ -124,8 +144,7 @@ static const struct FormChange sGenesectFormChangeTable[] = {
|
||||
};
|
||||
|
||||
static const struct FormChange sHoopaFormChangeTable[] = {
|
||||
{FORM_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA},
|
||||
{FORM_WITHDRAW, SPECIES_HOOPA},
|
||||
// {FORM_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
|
@ -8267,8 +8267,6 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (species != targetSpecies)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user