From 143d6fb2892bc845b065708dbc880cacef409f12 Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Thu, 25 Apr 2024 09:11:01 +0100 Subject: [PATCH] Minor cleanup of Frisk test (#4441) --- test/battle/ability/frisk.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/battle/ability/frisk.c b/test/battle/ability/frisk.c index dd6d0f691f..385ab7e1f9 100644 --- a/test/battle/ability/frisk.c +++ b/test/battle/ability/frisk.c @@ -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!"); } }