mirror of
https://github.com/pret/pokeemerald.git
synced 2026-09-30 22:07:24 -05:00
Fix Relic Song transforming species other than Meloetta (#4799)
This commit is contained in:
@@ -16468,7 +16468,8 @@ void BS_TryRelicSong(void)
|
||||
{
|
||||
NATIVE_ARGS();
|
||||
|
||||
if (GetBattlerAbility(gBattlerAttacker) != ABILITY_SHEER_FORCE && !(gBattleMons[gBattlerAttacker].status2 & STATUS2_TRANSFORMED))
|
||||
if (GetBattlerAbility(gBattlerAttacker) != ABILITY_SHEER_FORCE && !(gBattleMons[gBattlerAttacker].status2 & STATUS2_TRANSFORMED)
|
||||
&& (gBattleMons[gBattlerAttacker].species == SPECIES_MELOETTA_ARIA || gBattleMons[gBattlerAttacker].species == SPECIES_MELOETTA_PIROUETTE))
|
||||
{
|
||||
if (gBattleMons[gBattlerAttacker].species == SPECIES_MELOETTA_ARIA)
|
||||
gBattleMons[gBattlerAttacker].species = SPECIES_MELOETTA_PIROUETTE;
|
||||
@@ -16479,7 +16480,9 @@ void BS_TryRelicSong(void)
|
||||
gBattlescriptCurrInstr = BattleScript_AttackerFormChangeMoveEffect;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
}
|
||||
}
|
||||
|
||||
void BS_SetPledge(void)
|
||||
|
||||
@@ -85,6 +85,25 @@ SINGLE_BATTLE_TEST("Relic Song transforms Meloetta if used successfully")
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Relic Song does not transform Pokemon other than Meloetta")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_RELIC_SONG); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_RELIC_SONG, player);
|
||||
HP_BAR(opponent);
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player);
|
||||
MESSAGE("Wobbuffet transformed!");
|
||||
}
|
||||
} THEN {
|
||||
EXPECT_EQ(player->species, SPECIES_WOBBUFFET);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Relic Song transforms Meloetta twice if used successfully")
|
||||
{
|
||||
GIVEN {
|
||||
|
||||
Reference in New Issue
Block a user