Minor cleanup of Frisk test (#4441)

This commit is contained in:
Martin Griffin 2024-04-25 09:11:01 +01:00 committed by GitHub
parent baaefb4d72
commit 143d6fb289
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,9 +37,9 @@ SINGLE_BATTLE_TEST("Frisk triggers in a Single Battle")
DOUBLE_BATTLE_TEST("Frisk triggers for player in a Double Battle after switching-in after fainting")
{
bool32 targetLeft;
PARAMETRIZE { targetLeft = TRUE; }
PARAMETRIZE { targetLeft = FALSE; }
struct BattlePokemon *target = NULL;
PARAMETRIZE { target = playerLeft; }
PARAMETRIZE { target = playerRight; }
GIVEN {
ASSUME(gMovesInfo[MOVE_POUND].power != 0);
@ -49,20 +49,20 @@ DOUBLE_BATTLE_TEST("Frisk triggers for player in a Double Battle after switching
OPPONENT(SPECIES_WYNAUT) { Item(ITEM_POTION); }
OPPONENT(SPECIES_WYNAUT);
} WHEN {
TURN { MOVE(opponentLeft, MOVE_POUND, target: targetLeft ? playerLeft : playerRight); SEND_OUT(targetLeft ? playerLeft : playerRight, 2); }
TURN { MOVE(opponentLeft, MOVE_POUND, target: target); SEND_OUT(target, 2); }
} SCENE {
MESSAGE("Foe Wynaut used Pound!");
MESSAGE("Wobbuffet fainted!");
ABILITY_POPUP(targetLeft ? playerLeft : playerRight, ABILITY_FRISK);
ABILITY_POPUP(target, ABILITY_FRISK);
MESSAGE("Furret frisked Foe Wynaut and found its Potion!");
}
}
DOUBLE_BATTLE_TEST("Frisk triggers for opponent in a Double Battle after switching-in after fainting")
{
bool32 targetLeft;
PARAMETRIZE { targetLeft = TRUE; }
PARAMETRIZE { targetLeft = FALSE; }
struct BattlePokemon *target = NULL;
PARAMETRIZE { target = opponentLeft; }
PARAMETRIZE { target = opponentRight; }
GIVEN {
ASSUME(gMovesInfo[MOVE_POUND].power != 0);
@ -72,11 +72,11 @@ DOUBLE_BATTLE_TEST("Frisk triggers for opponent in a Double Battle after switchi
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
OPPONENT(SPECIES_FURRET) { Ability(ABILITY_FRISK); };
} WHEN {
TURN { MOVE(playerLeft, MOVE_POUND, target: targetLeft ? opponentLeft : opponentRight); SEND_OUT(targetLeft ? opponentLeft : opponentRight, 2); }
TURN { MOVE(playerLeft, MOVE_POUND, target: target); SEND_OUT(target, 2); }
} SCENE {
MESSAGE("Wynaut used Pound!");
MESSAGE("Foe Wobbuffet fainted!");
ABILITY_POPUP(targetLeft ? opponentLeft : opponentRight, ABILITY_FRISK);
ABILITY_POPUP(target, ABILITY_FRISK);
MESSAGE("Foe Furret frisked Wynaut and found its Potion!");
}
}