mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-29 14:53:55 +01:00
Form change when switching out
This commit is contained in:
parent
b74f0777da
commit
d8cc7f7abe
@ -323,7 +323,8 @@
|
||||
#define FORM_CHANGE_MOVE 3
|
||||
#define FORM_CHANGE_WITHDRAW 4
|
||||
#define FORM_CHANGE_BATTLE_BEGIN 5
|
||||
#define FORM_CHANGE_BATTLE_END 6
|
||||
#define FORM_CHANGE_BATTLE_SWITCH 6
|
||||
#define FORM_CHANGE_BATTLE_END 7
|
||||
|
||||
#define MON_PIC_WIDTH 64
|
||||
#define MON_PIC_HEIGHT 64
|
||||
|
@ -518,7 +518,7 @@ void HandleAction_Switch(void)
|
||||
if (gBattleResults.playerSwitchesCounter < 255)
|
||||
gBattleResults.playerSwitchesCounter++;
|
||||
|
||||
UndoFormChange(gBattlerPartyIndexes[gBattlerAttacker], GetBattlerSide(gBattlerAttacker), TRUE);
|
||||
BattleFormChange(gBattlerPartyIndexes[gBattlerAttacker], GetBattlerSide(gBattlerAttacker), FORM_CHANGE_BATTLE_SWITCH);
|
||||
}
|
||||
|
||||
void HandleAction_UseItem(void)
|
||||
|
@ -22,6 +22,10 @@ FORM_CHANGE_WITHDRAW:
|
||||
Form change activates when the Pokémon is withdrawn from the PC or Daycare.
|
||||
no parameters
|
||||
|
||||
FORM_CHANGE_SWITCH:
|
||||
Form change activates when the Pokémon is switched out in battle.
|
||||
no parameters
|
||||
|
||||
FORM_CHANGE_BATTLE_BEGIN:
|
||||
Form change activates when the Pokémon is sent out at the beginning of a battle
|
||||
param1 = item to hold, optional
|
||||
@ -99,12 +103,14 @@ static const struct FormChange sArceusFormChangeTable[] = {
|
||||
#if P_GEN_5_POKEMON == TRUE
|
||||
|
||||
static const struct FormChange sDarmanitanFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_DARMANITAN},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
static const struct FormChange sDarmanitanGalarianFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN_GALARIAN},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_DARMANITAN_GALARIAN},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN_GALARIAN},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
@ -154,7 +160,8 @@ static const struct FormChange sGreninjaBattleBondFormChangeTable[] = {
|
||||
};
|
||||
|
||||
static const struct FormChange sAegislashFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_AEGISLASH},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_AEGISLASH},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_AEGISLASH},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
@ -180,7 +187,8 @@ static const struct FormChange sOricorioFormChangeTable[] = {
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
static const struct FormChange sWishiwashiFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_WISHIWASHI},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_WISHIWASHI},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_WISHIWASHI},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
@ -212,31 +220,38 @@ static const struct FormChange sMimikyuFormChangeTable[] = {
|
||||
};
|
||||
|
||||
static const struct FormChange sMiniorRedFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_RED},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_RED},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_RED},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
static const struct FormChange sMiniorBlueFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_BLUE},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_BLUE},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_BLUE},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
static const struct FormChange sMiniorGreenFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_GREEN},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_GREEN},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_GREEN},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
static const struct FormChange sMiniorIndigoFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_INDIGO},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_INDIGO},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_INDIGO},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
static const struct FormChange sMiniorOrangeFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_ORANGE},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_ORANGE},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_ORANGE},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
static const struct FormChange sMiniorVioletFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_VIOLET},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_VIOLET},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_VIOLET},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
static const struct FormChange sMiniorYellowFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_YELLOW},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_YELLOW},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_YELLOW},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
@ -244,12 +259,14 @@ static const struct FormChange sMiniorYellowFormChangeTable[] = {
|
||||
|
||||
#if P_GEN_8_POKEMON == TRUE
|
||||
static const struct FormChange sCramorantFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_CRAMORANT},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_CRAMORANT},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_CRAMORANT},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
static const struct FormChange sMorpekoFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MORPEKO},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MORPEKO},
|
||||
{FORM_CHANGE_BATTLE_END, SPECIES_MORPEKO},
|
||||
{FORM_CHANGE_END},
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user