Fixes Tidy Up (#5819)
This commit is contained in:
parent
12f199c641
commit
99ba36b446
3 changed files with 29 additions and 2 deletions
|
@ -134,7 +134,11 @@ BattleScript_EffectTidyUp::
|
|||
pause B_WAIT_TIME_MED
|
||||
ppreduce
|
||||
waitstate
|
||||
saveattacker
|
||||
savetarget
|
||||
trytidyup FALSE, BattleScript_EffectTidyUpDoMoveAnimation
|
||||
restoreattacker
|
||||
restoretarget
|
||||
goto BattleScript_EffectDragonDanceFromStatUp
|
||||
|
||||
BattleScript_EffectTidyUpDoMoveAnimation::
|
||||
|
@ -143,6 +147,8 @@ BattleScript_EffectTidyUpDoMoveAnimation::
|
|||
trytidyup TRUE, NULL
|
||||
printstring STRINGID_TIDYINGUPCOMPLETE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
restoreattacker
|
||||
restoretarget
|
||||
goto BattleScript_EffectDragonDanceFromStatUp
|
||||
|
||||
BattleScript_EffectUpperHand::
|
||||
|
|
|
@ -8839,8 +8839,8 @@ static bool32 TryDefogClear(u32 battlerAtk, bool32 clear)
|
|||
|
||||
static bool32 TryTidyUpClear(u32 battlerAtk, bool32 clear)
|
||||
{
|
||||
s32 i;
|
||||
u8 saveBattler = gBattlerAttacker;
|
||||
u32 i;
|
||||
u32 saveBattler = gBattlerAttacker;
|
||||
|
||||
for (i = 0; i < NUM_BATTLE_SIDES; i++)
|
||||
{
|
||||
|
|
|
@ -99,3 +99,24 @@ AI_SINGLE_BATTLE_TEST("AI will try to remove hazards if slower then target even
|
|||
TURN { EXPECT_MOVE(opponent, MOVE_TIDY_UP); }
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Tidy Up raises Attack and Speed by one after clearing hazards on opposing field")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_STEALTH_ROCK); }
|
||||
TURN { MOVE(player, MOVE_TIDY_UP); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_STEALTH_ROCK, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TIDY_UP, player);
|
||||
MESSAGE("Tidying up complete!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Wobbuffet's Attack rose!");
|
||||
MESSAGE("Wobbuffet's Speed rose!");
|
||||
} THEN {
|
||||
EXPECT_EQ(player->statStages[STAT_ATK], DEFAULT_STAT_STAGE + 1);
|
||||
EXPECT_EQ(player->statStages[STAT_SPEED], DEFAULT_STAT_STAGE + 1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue