Fixes Dynamax reversion animation when fainting (#6597)

This commit is contained in:
PhallenTree 2025-04-13 16:41:00 +01:00 committed by GitHub
parent d173e42372
commit 353e4ae619
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 0 deletions

View File

@ -9994,9 +9994,12 @@ BattleScript_DynamaxEnds::
BattleScript_DynamaxEnds_Ret::
flushtextbox
spriteignore0hp TRUE
updatedynamax
playanimation BS_SCRIPTING, B_ANIM_FORM_CHANGE
waitanimation
spriteignore0hp FALSE
pause B_WAIT_TIME_SHORT
return
BattleScript_MoveBlockedByDynamax::

View File

@ -68,6 +68,29 @@ SINGLE_BATTLE_TEST("Dynamax: Dynamax Level increases HP and max HP multipliers b
}
}
SINGLE_BATTLE_TEST("Dynamax: Dynamax expires when fainted")
{
u32 dynamax;
PARAMETRIZE { dynamax = GIMMICK_NONE; }
PARAMETRIZE { dynamax = GIMMICK_DYNAMAX; }
GIVEN {
PLAYER(SPECIES_WOBBUFFET) { HP(1); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_TACKLE, gimmick: dynamax); MOVE(opponent, MOVE_TACKLE); }
} SCENE {
if (dynamax)
MESSAGE("Wobbuffet used Max Strike!");
else
MESSAGE("Wobbuffet used Tackle!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
HP_BAR(player);
if (dynamax) // Expect to have visual reversion when fainting.
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player);
MESSAGE("Wobbuffet fainted!");
}
}
SINGLE_BATTLE_TEST("Dynamax: Dynamax expires after three turns", u16 hp)
{
u32 dynamax;