mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-03-21 18:04:50 -05:00
Fix Minior start of battle form (#7972)
Co-authored-by: Hedara <hedara90@gmail.com> Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
This commit is contained in:
parent
41fa1ad2b9
commit
3bb6cddffb
|
|
@ -925,6 +925,7 @@ static const struct FormChange sSilvallyFormChangeTable[] = {
|
|||
|
||||
#if P_FAMILY_MINIOR
|
||||
static const struct FormChange sMiniorRedFormChangeTable[] = {
|
||||
{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},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_RED},
|
||||
|
|
@ -933,6 +934,7 @@ static const struct FormChange sMiniorRedFormChangeTable[] = {
|
|||
{FORM_CHANGE_TERMINATOR},
|
||||
};
|
||||
static const struct FormChange sMiniorBlueFormChangeTable[] = {
|
||||
{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},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_BLUE},
|
||||
|
|
@ -941,6 +943,7 @@ static const struct FormChange sMiniorBlueFormChangeTable[] = {
|
|||
{FORM_CHANGE_TERMINATOR},
|
||||
};
|
||||
static const struct FormChange sMiniorGreenFormChangeTable[] = {
|
||||
{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},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_GREEN},
|
||||
|
|
@ -949,6 +952,7 @@ static const struct FormChange sMiniorGreenFormChangeTable[] = {
|
|||
{FORM_CHANGE_TERMINATOR},
|
||||
};
|
||||
static const struct FormChange sMiniorIndigoFormChangeTable[] = {
|
||||
{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},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_INDIGO},
|
||||
|
|
@ -957,6 +961,7 @@ static const struct FormChange sMiniorIndigoFormChangeTable[] = {
|
|||
{FORM_CHANGE_TERMINATOR},
|
||||
};
|
||||
static const struct FormChange sMiniorOrangeFormChangeTable[] = {
|
||||
{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},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_ORANGE},
|
||||
|
|
@ -965,6 +970,7 @@ static const struct FormChange sMiniorOrangeFormChangeTable[] = {
|
|||
{FORM_CHANGE_TERMINATOR},
|
||||
};
|
||||
static const struct FormChange sMiniorVioletFormChangeTable[] = {
|
||||
{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},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_VIOLET},
|
||||
|
|
@ -973,6 +979,7 @@ static const struct FormChange sMiniorVioletFormChangeTable[] = {
|
|||
{FORM_CHANGE_TERMINATOR},
|
||||
};
|
||||
static const struct FormChange sMiniorYellowFormChangeTable[] = {
|
||||
{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},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_YELLOW},
|
||||
|
|
|
|||
|
|
@ -1,30 +1,47 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
SINGLE_BATTLE_TEST("Minior Meteor transforms into Minior Core on switch-in if it has 1/2 or less health")
|
||||
SINGLE_BATTLE_TEST("Minior Core doesn't transform into Minior Meteor on switch-in if it has 1/2 or less health")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WYNAUT);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
|
||||
OPPONENT(SPECIES_MINIOR_METEOR) { Ability(ABILITY_SHIELDS_DOWN); HP(1); }
|
||||
OPPONENT(SPECIES_MINIOR_CORE) { Ability(ABILITY_SHIELDS_DOWN); HP(50); MaxHP(100); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_SCRATCH); SEND_OUT(opponent, 1); }
|
||||
} SCENE {
|
||||
NONE_OF {
|
||||
ABILITY_POPUP(opponent, ABILITY_SHIELDS_DOWN);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, opponent);
|
||||
}
|
||||
} THEN {
|
||||
EXPECT_EQ(opponent->species, SPECIES_MINIOR_CORE);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Minior Core transforms into Minior Meteor on switch-in if it has more than 1/2 health")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WYNAUT);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
|
||||
OPPONENT(SPECIES_MINIOR_CORE) { Ability(ABILITY_SHIELDS_DOWN); HP(51); MaxHP(101); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_SCRATCH); SEND_OUT(opponent, 1); }
|
||||
} SCENE {
|
||||
ABILITY_POPUP(opponent, ABILITY_SHIELDS_DOWN);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, opponent);
|
||||
} THEN {
|
||||
EXPECT_EQ(opponent->species, SPECIES_MINIOR_CORE);
|
||||
EXPECT_EQ(opponent->species, SPECIES_MINIOR_METEOR);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Minior Core transforms into Minior Meteor on switch-in if it more then 1/2 health")
|
||||
SINGLE_BATTLE_TEST("Minior Core transforms into Minior Meteor on battle start if it has more than 1/2 health")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WYNAUT);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
|
||||
OPPONENT(SPECIES_MINIOR_CORE) { Ability(ABILITY_SHIELDS_DOWN); }
|
||||
OPPONENT(SPECIES_MINIOR_CORE) { Ability(ABILITY_SHIELDS_DOWN); HP(51); MaxHP(101); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_SCRATCH); SEND_OUT(opponent, 1); }
|
||||
TURN { }
|
||||
} SCENE {
|
||||
ABILITY_POPUP(opponent, ABILITY_SHIELDS_DOWN);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, opponent);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user