mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-03-21 18:04:50 -05:00
Fixes Minior not appearing in Meteor form when encountered in the wild (#9282)
This commit is contained in:
parent
ae3369e87f
commit
cb5db2491f
|
|
@ -137,6 +137,8 @@ enum FormChanges
|
|||
FORM_CHANGE_OVERWORLD_WEATHER,
|
||||
// Form change that activates when the Pokémon is deposited into the PC or Daycare.
|
||||
FORM_CHANGE_DEPOSIT,
|
||||
// Form change for Minior, which appears unchanged when encountered in the wild
|
||||
FORM_CHANGE_BEGIN_WILD_ENCOUNTER,
|
||||
};
|
||||
|
||||
#endif // GUARD_CONSTANTS_FORM_CHANGE_TYPES_H
|
||||
|
|
|
|||
|
|
@ -582,7 +582,11 @@ static void CB2_InitBattleInternal(void)
|
|||
TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BEGIN_BATTLE);
|
||||
TryFormChange(i, B_SIDE_OPPONENT, FORM_CHANGE_BEGIN_BATTLE);
|
||||
}
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_TRAINER))
|
||||
{
|
||||
TryFormChange(0, B_SIDE_OPPONENT, FORM_CHANGE_BEGIN_WILD_ENCOUNTER);
|
||||
TryFormChange(1, B_SIDE_OPPONENT, FORM_CHANGE_BEGIN_WILD_ENCOUNTER);// Only tries to change the first two opposing slots, assuming these are the only ones occupied in a wild battle.
|
||||
}
|
||||
if (TESTING)
|
||||
{
|
||||
gPlayerPartyCount = CalculatePartyCount(gPlayerParty);
|
||||
|
|
|
|||
|
|
@ -1316,10 +1316,10 @@ static const struct FormChange sSilvallyFormChangeTable[] =
|
|||
{FORM_CHANGE_TERMINATOR},
|
||||
};
|
||||
#endif //P_FAMILY_TYPE_NULL
|
||||
|
||||
#if P_FAMILY_MINIOR
|
||||
static const struct FormChange sMiniorRedFormChangeTable[] =
|
||||
{
|
||||
{FORM_CHANGE_BEGIN_WILD_ENCOUNTER, SPECIES_MINIOR_METEOR_RED},
|
||||
{FORM_CHANGE_BEGIN_BATTLE, SPECIES_MINIOR_CORE_RED},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_RED, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_RED, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50},
|
||||
|
|
@ -1330,6 +1330,7 @@ static const struct FormChange sMiniorRedFormChangeTable[] =
|
|||
};
|
||||
static const struct FormChange sMiniorBlueFormChangeTable[] =
|
||||
{
|
||||
{FORM_CHANGE_BEGIN_WILD_ENCOUNTER, SPECIES_MINIOR_METEOR_BLUE},
|
||||
{FORM_CHANGE_BEGIN_BATTLE, SPECIES_MINIOR_CORE_BLUE},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_BLUE, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_BLUE, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50},
|
||||
|
|
@ -1340,6 +1341,7 @@ static const struct FormChange sMiniorBlueFormChangeTable[] =
|
|||
};
|
||||
static const struct FormChange sMiniorGreenFormChangeTable[] =
|
||||
{
|
||||
{FORM_CHANGE_BEGIN_WILD_ENCOUNTER, SPECIES_MINIOR_METEOR_GREEN},
|
||||
{FORM_CHANGE_BEGIN_BATTLE, SPECIES_MINIOR_CORE_GREEN},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_GREEN, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_GREEN, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50},
|
||||
|
|
@ -1350,6 +1352,7 @@ static const struct FormChange sMiniorGreenFormChangeTable[] =
|
|||
};
|
||||
static const struct FormChange sMiniorIndigoFormChangeTable[] =
|
||||
{
|
||||
{FORM_CHANGE_BEGIN_WILD_ENCOUNTER, SPECIES_MINIOR_METEOR_INDIGO},
|
||||
{FORM_CHANGE_BEGIN_BATTLE, SPECIES_MINIOR_CORE_INDIGO},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_INDIGO, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_INDIGO, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50},
|
||||
|
|
@ -1360,6 +1363,7 @@ static const struct FormChange sMiniorIndigoFormChangeTable[] =
|
|||
};
|
||||
static const struct FormChange sMiniorOrangeFormChangeTable[] =
|
||||
{
|
||||
{FORM_CHANGE_BEGIN_WILD_ENCOUNTER, SPECIES_MINIOR_METEOR_ORANGE},
|
||||
{FORM_CHANGE_BEGIN_BATTLE, SPECIES_MINIOR_CORE_ORANGE},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_ORANGE, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_ORANGE, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50},
|
||||
|
|
@ -1370,6 +1374,7 @@ static const struct FormChange sMiniorOrangeFormChangeTable[] =
|
|||
};
|
||||
static const struct FormChange sMiniorVioletFormChangeTable[] =
|
||||
{
|
||||
{FORM_CHANGE_BEGIN_WILD_ENCOUNTER, SPECIES_MINIOR_METEOR_VIOLET},
|
||||
{FORM_CHANGE_BEGIN_BATTLE, SPECIES_MINIOR_CORE_VIOLET},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_VIOLET, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_VIOLET, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50},
|
||||
|
|
@ -1379,6 +1384,7 @@ static const struct FormChange sMiniorVioletFormChangeTable[] =
|
|||
{FORM_CHANGE_TERMINATOR},
|
||||
};
|
||||
static const struct FormChange sMiniorYellowFormChangeTable[] = {
|
||||
{FORM_CHANGE_BEGIN_WILD_ENCOUNTER, SPECIES_MINIOR_METEOR_YELLOW},
|
||||
{FORM_CHANGE_BEGIN_BATTLE, SPECIES_MINIOR_CORE_YELLOW},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_YELLOW, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50},
|
||||
{FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_YELLOW, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50},
|
||||
|
|
|
|||
|
|
@ -6970,6 +6970,7 @@ u32 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, enum FormChanges
|
|||
case FORM_CHANGE_DEPOSIT:
|
||||
case FORM_CHANGE_FAINT:
|
||||
case FORM_CHANGE_DAYS_PASSED:
|
||||
case FORM_CHANGE_BEGIN_WILD_ENCOUNTER:
|
||||
targetSpecies = formChanges[i].targetSpecies;
|
||||
break;
|
||||
case FORM_CHANGE_STATUS:
|
||||
|
|
|
|||
|
|
@ -75,3 +75,39 @@ SINGLE_BATTLE_TEST("Shields Down protects Minior Meteor from status conditions")
|
|||
EXPECT(opponent->status1 & STATUS1_BURN);
|
||||
}
|
||||
}
|
||||
|
||||
WILD_BATTLE_TEST("Wild Minior appear in Meteor form without transforming")// To be replaced with WILD_DOUBLE_BATTLE_TEST when that is made possible.
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_MINIOR_CORE) { Ability(ABILITY_SHIELDS_DOWN); }
|
||||
OPPONENT(SPECIES_MINIOR_CORE) { Ability(ABILITY_SHIELDS_DOWN); }
|
||||
} WHEN {
|
||||
TURN {}
|
||||
} SCENE {
|
||||
ABILITY_POPUP(player, ABILITY_SHIELDS_DOWN);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player);
|
||||
NONE_OF {
|
||||
ABILITY_POPUP(opponent, ABILITY_SHIELDS_DOWN);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, opponent);
|
||||
}
|
||||
} THEN {
|
||||
EXPECT_EQ(opponent->species, SPECIES_MINIOR_METEOR);
|
||||
EXPECT_EQ(player->species, SPECIES_MINIOR_METEOR);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Trainers' Minior appear in Core form")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET)
|
||||
OPPONENT(SPECIES_MINIOR_METEOR) { Ability(ABILITY_SHIELDS_DOWN); }
|
||||
} WHEN {
|
||||
TURN {}
|
||||
} SCENE {
|
||||
ABILITY_POPUP(opponent, ABILITY_SHIELDS_DOWN);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, opponent);
|
||||
} THEN {
|
||||
EXPECT_EQ(opponent->species, SPECIES_MINIOR_METEOR);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user