From 8ab2fbd9a2b2ae7b3ca5f319567577ede7a0bf2b Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Sun, 22 Oct 2023 11:20:27 +0200 Subject: [PATCH 1/4] Fixes tests rng (#3433) * Seed RNG before setUp Co-authored-by: Martin Griffin --- test/random.c | 2 +- test/test_runner.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/random.c b/test/random.c index 5ca4b814df..80b86745f2 100644 --- a/test/random.c +++ b/test/random.c @@ -6,7 +6,7 @@ // Therefore the maximum error is 8*3584, or 28672. #define SHUFFLE_TEST_IMPL \ u32 i, j, error; \ - u16 indexSum[7]; \ + u16 indexSum[8]; \ memset(indexSum, 0, sizeof(indexSum)); \ for (i = 0; i < 1024; i++) \ { \ diff --git a/test/test_runner.c b/test/test_runner.c index 7ca66ec081..0ae4f0a185 100644 --- a/test/test_runner.c +++ b/test/test_runner.c @@ -201,6 +201,8 @@ void CB2_TestRunner(void) case STATE_RUN_TEST: gTestRunnerState.state = STATE_REPORT_RESULT; sCurrentTest.state = CURRENT_TEST_STATE_RUN; + SeedRng(0); + SeedRng2(0); if (gTestRunnerState.test->runner->setUp) gTestRunnerState.test->runner->setUp(gTestRunnerState.test->data); // NOTE: Assumes that the compiler interns __FILE__. From 8a6284c408b81ce6bb4516ed5f1cf772b5557b22 Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Sun, 22 Oct 2023 14:03:46 +0100 Subject: [PATCH 2/4] Fix battle test estimateCost bug (#3448) --- test/test_runner_battle.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index d8369850d7..54c8baae24 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -125,6 +125,7 @@ static u32 BattleTest_EstimateCost(void *data) { u32 cost; const struct BattleTest *test = data; + memset(STATE, 0, sizeof(*STATE)); STATE->runRandomly = TRUE; InvokeTestFunction(test); cost = 1; From 7fdc4aacda2fddf7280ac5d18611b93f5d6b6874 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sun, 22 Oct 2023 16:03:54 -0300 Subject: [PATCH 3/4] Fixed Cheat Start not initiating time-based events (#3446) --- include/clock.h | 1 + src/clock.c | 2 +- src/debug.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/clock.h b/include/clock.h index aa179bf6fb..0cfd3db9ed 100644 --- a/include/clock.h +++ b/include/clock.h @@ -3,6 +3,7 @@ // TODO: time of day and seconds in a day defines +void InitTimeBasedEvents(void); void DoTimeBasedEvents(void); #endif // GUARD_CLOCK_H diff --git a/src/clock.c b/src/clock.c index 125d403bb3..76297b4f4c 100644 --- a/src/clock.c +++ b/src/clock.c @@ -15,7 +15,7 @@ static void UpdatePerDay(struct Time *localTime); static void UpdatePerMinute(struct Time *localTime); -static void InitTimeBasedEvents(void) +void InitTimeBasedEvents(void) { FlagSet(FLAG_SYS_CLOCK_SET); RtcCalcLocalTime(); diff --git a/src/debug.c b/src/debug.c index f915235d8b..be1085edd7 100644 --- a/src/debug.c +++ b/src/debug.c @@ -9,6 +9,7 @@ #include "global.h" #include "battle.h" #include "battle_setup.h" +#include "clock.h" #include "coins.h" #include "credits.h" #include "data.h" @@ -1983,6 +1984,7 @@ static void DebugAction_Util_Clear_Boxes(u8 taskId) } static void DebugAction_Util_CheatStart(u8 taskId) { + InitTimeBasedEvents(); Debug_DestroyMenu_Full_Script(taskId, Debug_CheatStart); } static void DebugAction_Util_HatchAnEgg(u8 taskId) From 77e2b0dd2c104bcaeff078cd056a01dd20a7c512 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sun, 22 Oct 2023 16:22:59 -0300 Subject: [PATCH 4/4] Test cleanup and improvements (#3449) * Fixed duplicated test names * Test improvements for Jaboca, Kee and Rowap Berries Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com> * Lansat Berry test improvements Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com> * Jaboca Berry/Bug Bite interaction test Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com> --------- Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com> --- test/battle/ability/prankster.c | 1 - test/battle/hold_effect/critical_hit_up.c | 9 ++-- test/battle/hold_effect/jaboca_berry.c | 60 ++++++++++++++--------- test/battle/hold_effect/kee_berry.c | 27 +++++++--- test/battle/hold_effect/maranga_berry.c | 39 +++++++-------- test/battle/hold_effect/rowap_berry.c | 25 +++++++--- test/battle/move_effect/bug_bite.c | 9 ++-- test/battle/move_effect/multi_hit.c | 12 +++-- 8 files changed, 110 insertions(+), 72 deletions(-) diff --git a/test/battle/ability/prankster.c b/test/battle/ability/prankster.c index 29fd11786e..3f402e0fc6 100644 --- a/test/battle/ability/prankster.c +++ b/test/battle/ability/prankster.c @@ -22,7 +22,6 @@ TO_DO_BATTLE_TEST("Prankster-affected moves called via After you affect Dark-typ TO_DO_BATTLE_TEST("Prankster-affected moves that are bounced back by Magic Bounce/Coat can affect Dark-type Pokémon"); TO_DO_BATTLE_TEST("Prankster-affected moves that are bounced back by Magic Coat from a Pokémon with Prankster can't affect Dark-type Pokémon"); TO_DO_BATTLE_TEST("Prankster-affected moves that target all Pokémon are successful regardless of the presence of Dark-type Pokémon"); -TO_DO_BATTLE_TEST("Prankster-affected moves that target all Pokémon are successful regardless of the presence of Dark-type Pokémon"); TO_DO_BATTLE_TEST("Prankster-affected move effects don't affect Dark-type Pokémon"); TO_DO_BATTLE_TEST("Prankster increases the priority of moves by 1"); TO_DO_BATTLE_TEST("Prankster increases the priority of status Z-Moves by 1"); diff --git a/test/battle/hold_effect/critical_hit_up.c b/test/battle/hold_effect/critical_hit_up.c index 799a1e423f..fc8e5acec5 100644 --- a/test/battle/hold_effect/critical_hit_up.c +++ b/test/battle/hold_effect/critical_hit_up.c @@ -21,13 +21,11 @@ SINGLE_BATTLE_TEST("Lansat Berry raises the holder's critical-hit-ratio by two s TURN { MOVE(opponent, move); } } SCENE { ANIMATION(ANIM_TYPE_MOVE, move, opponent); - if (move == MOVE_TACKLE) - { + if (move == MOVE_TACKLE) { NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); NOT MESSAGE("Wobbuffet used Lansat Berry to get pumped!"); } - else - { + else { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); MESSAGE("Wobbuffet used Lansat Berry to get pumped!"); } @@ -48,11 +46,12 @@ SINGLE_BATTLE_TEST("Lansat Berry raises the holder's critical-hit-ratio by two s } } -SINGLE_BATTLE_TEST("Lansat Berry raises the holder's critical-hit-ratio by two stages when HP drops to 1/4 or below") +SINGLE_BATTLE_TEST("Lansat Berry raises the holder's critical-hit-ratio by two stages") { PASSES_RANDOMLY(1, 2, RNG_CRITICAL_HIT); GIVEN { ASSUME(gBattleMoves[MOVE_TACKLE].highCritRatio == FALSE); + ASSUME(B_CRIT_CHANCE >= GEN_6); PLAYER(SPECIES_WOBBUFFET) { MaxHP(160); HP(80); Item(ITEM_LANSAT_BERRY); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { diff --git a/test/battle/hold_effect/jaboca_berry.c b/test/battle/hold_effect/jaboca_berry.c index ce102ff83a..d009ae03a6 100644 --- a/test/battle/hold_effect/jaboca_berry.c +++ b/test/battle/hold_effect/jaboca_berry.c @@ -4,41 +4,57 @@ ASSUMPTIONS { ASSUME(gItems[ITEM_JABOCA_BERRY].holdEffect == HOLD_EFFECT_JABOCA_BERRY); + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); } SINGLE_BATTLE_TEST("Jaboca Berry causes the attacker to lose 1/8 of its max HP if a physical move was used") { s16 damage; + u16 move; - GIVEN { - ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); - PLAYER(SPECIES_WOBBUFFET); - OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_JABOCA_BERRY); } - } WHEN { - TURN { MOVE(player, MOVE_TACKLE); } - } SCENE { - ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); - HP_BAR(opponent); - ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); - HP_BAR(player, captureDamage: &damage); - MESSAGE("Wobbuffet was hurt by Foe Wobbuffet's Jaboca Berry!"); - } THEN { - EXPECT_EQ(player->maxHP / 8, damage); - } -} + PARAMETRIZE { move = MOVE_SWIFT; } + PARAMETRIZE { move = MOVE_TACKLE; } -SINGLE_BATTLE_TEST("Jaboca Berry is not triggered by a special move") -{ GIVEN { ASSUME(gBattleMoves[MOVE_SWIFT].split == SPLIT_SPECIAL); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_JABOCA_BERRY); } } WHEN { - TURN { MOVE(player, MOVE_SWIFT); } + TURN { MOVE(player, move); } } SCENE { - ANIMATION(ANIM_TYPE_MOVE, MOVE_SWIFT, player); + ANIMATION(ANIM_TYPE_MOVE, move, player); HP_BAR(opponent); - NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); - NOT MESSAGE("Wobbuffet was hurt by Foe Wobbuffet's Jaboca Berry!"); + if (move == MOVE_TACKLE) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + HP_BAR(player, captureDamage: &damage); + MESSAGE("Wobbuffet was hurt by Foe Wobbuffet's Jaboca Berry!"); + } else { + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Wobbuffet was hurt by Foe Wobbuffet's Jaboca Berry!"); + } + } + } THEN { + if (move == MOVE_TACKLE) + EXPECT_EQ(player->maxHP / 8, damage); + } +} + +SINGLE_BATTLE_TEST("Jaboca Berry tirggers before Bug Bite can steal it") +{ + KNOWN_FAILING; + GIVEN { + ASSUME(gBattleMoves[MOVE_BUG_BITE].split == SPLIT_PHYSICAL); + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_JABOCA_BERRY); } + } WHEN { + TURN { MOVE(player, MOVE_BUG_BITE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_BUG_BITE, player); + HP_BAR(opponent); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + HP_BAR(player); + MESSAGE("Wyanut was hurt by Foe Wobbuffet's Jaboca Berry!"); + NOT MESSAGE("Wynaut stole and ate Foe Wobbuffet's Jaboca Berry!"); } } diff --git a/test/battle/hold_effect/kee_berry.c b/test/battle/hold_effect/kee_berry.c index a809381226..cfb6b14e5c 100644 --- a/test/battle/hold_effect/kee_berry.c +++ b/test/battle/hold_effect/kee_berry.c @@ -4,23 +4,37 @@ ASSUMPTIONS { ASSUME(gItems[ITEM_KEE_BERRY].holdEffect == HOLD_EFFECT_KEE_BERRY); + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); } SINGLE_BATTLE_TEST("Kee Berry raises the holder's Defense by one stage when hit by a physical move") { + u16 move; + + PARAMETRIZE { move = MOVE_SWIFT; } + PARAMETRIZE { move = MOVE_TACKLE; } + GIVEN { - ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); + ASSUME(gBattleMoves[MOVE_SWIFT].split == SPLIT_SPECIAL); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_KEE_BERRY); } } WHEN { - TURN { MOVE(player, MOVE_TACKLE); } + TURN { MOVE(player, move); } } SCENE { - ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); + ANIMATION(ANIM_TYPE_MOVE, move, player); HP_BAR(opponent); - ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); - MESSAGE("Using Kee Berry, the Defense of Foe Wobbuffet rose!"); + if (move == MOVE_TACKLE) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Using Kee Berry, the Defense of Foe Wobbuffet rose!"); + } else { + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Using Kee Berry, the Defense of Foe Wobbuffet rose!"); + } + } } THEN { - EXPECT_EQ(opponent->statStages[STAT_DEF], DEFAULT_STAT_STAGE + 1); + if (move == MOVE_TACKLE) + EXPECT_EQ(opponent->statStages[STAT_DEF], DEFAULT_STAT_STAGE + 1); } } @@ -28,7 +42,6 @@ SINGLE_BATTLE_TEST("Kee Berry raises the holder's Defense by two stages with Rip { GIVEN { ASSUME(P_GEN_8_POKEMON == TRUE); - ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_APPLIN) { Item(ITEM_KEE_BERRY); Ability(ABILITY_RIPEN); } } WHEN { diff --git a/test/battle/hold_effect/maranga_berry.c b/test/battle/hold_effect/maranga_berry.c index 08f827c30c..0a3edffbf5 100644 --- a/test/battle/hold_effect/maranga_berry.c +++ b/test/battle/hold_effect/maranga_berry.c @@ -8,19 +8,32 @@ ASSUMPTIONS SINGLE_BATTLE_TEST("Maranga Berry raises the holder's Sp. Def by one stage when hit by a special move") { + u16 move = MOVE_NONE; + PARAMETRIZE { move = MOVE_TACKLE; } + PARAMETRIZE { move = MOVE_SWIFT; } GIVEN { + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); ASSUME(gBattleMoves[MOVE_SWIFT].split == SPLIT_SPECIAL); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_MARANGA_BERRY); } } WHEN { - TURN { MOVE(player, MOVE_SWIFT); } + TURN { MOVE(player, move); } } SCENE { - ANIMATION(ANIM_TYPE_MOVE, MOVE_SWIFT, player); + ANIMATION(ANIM_TYPE_MOVE, move, player); HP_BAR(opponent); - ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); - MESSAGE("Using Maranga Berry, the Sp. Def of Foe Wobbuffet rose!"); + if (move == MOVE_SWIFT) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Using Maranga Berry, the Sp. Def of Foe Wobbuffet rose!"); + } + else { + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Using Maranga Berry, the Sp. Def of Foe Wobbuffet rose!"); + } + } } THEN { - EXPECT_EQ(opponent->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE + 1); + if (move == MOVE_SWIFT) + EXPECT_EQ(opponent->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE + 1); } } @@ -42,19 +55,3 @@ SINGLE_BATTLE_TEST("Maranga Berry raises the holder's Sp. Def by two stages with EXPECT_EQ(opponent->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE + 2); } } - -SINGLE_BATTLE_TEST("Maranga Berry raises the holder's Sp. Def by one stage when hit by a special move") -{ - GIVEN { - ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); - PLAYER(SPECIES_WOBBUFFET); - OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_MARANGA_BERRY); } - } WHEN { - TURN { MOVE(player, MOVE_TACKLE); } - } SCENE { - ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); - HP_BAR(opponent); - NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); - NOT MESSAGE("Using Maranga Berry, the Sp. Def of Foe Wobbuffet rose!"); - } -} diff --git a/test/battle/hold_effect/rowap_berry.c b/test/battle/hold_effect/rowap_berry.c index 4145948791..3df8d004f4 100644 --- a/test/battle/hold_effect/rowap_berry.c +++ b/test/battle/hold_effect/rowap_berry.c @@ -9,21 +9,34 @@ ASSUMPTIONS SINGLE_BATTLE_TEST("Rowap Berry causes the attacker to lose 1/8 of its max HP if a special move was used") { s16 damage; + u16 move; + + PARAMETRIZE { move = MOVE_SWIFT; } + PARAMETRIZE { move = MOVE_TACKLE; } GIVEN { ASSUME(gBattleMoves[MOVE_SWIFT].split == SPLIT_SPECIAL); + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_ROWAP_BERRY); } } WHEN { - TURN { MOVE(player, MOVE_SWIFT); } + TURN { MOVE(player, move); } } SCENE { - ANIMATION(ANIM_TYPE_MOVE, MOVE_SWIFT, player); + ANIMATION(ANIM_TYPE_MOVE, move, player); HP_BAR(opponent); - ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); - HP_BAR(player, captureDamage: &damage); - MESSAGE("Wobbuffet was hurt by Foe Wobbuffet's Rowap Berry!"); + if (move == MOVE_SWIFT) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + HP_BAR(player, captureDamage: &damage); + MESSAGE("Wobbuffet was hurt by Foe Wobbuffet's Rowap Berry!"); + } else { + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Wobbuffet was hurt by Foe Wobbuffet's Rowap Berry!"); + } + } } THEN { - EXPECT_EQ(player->maxHP / 8, damage); + if (move == MOVE_SWIFT) + EXPECT_EQ(player->maxHP / 8, damage); } } diff --git a/test/battle/move_effect/bug_bite.c b/test/battle/move_effect/bug_bite.c index 385b8a400f..8f59e6f003 100644 --- a/test/battle/move_effect/bug_bite.c +++ b/test/battle/move_effect/bug_bite.c @@ -114,18 +114,15 @@ SINGLE_BATTLE_TEST("Bug Bite eats the target's berry and immediately gains its e } } -// To verify in the actual games. -// Bulbapedia - The effect of a Jaboca Berry will activate before the Berry can be stolen. -// Showdown - Jaboca Berry is stolen and eaten and nothing happens. This is how it currently works on expansion. -TO_DO_BATTLE_TEST("Bug Bite interaction with Jaboca Berry."); - SINGLE_BATTLE_TEST("Tanga Berry activates before Bug Bite") { GIVEN { + ASSUME(gItems[ITEM_TANGA_BERRY].holdEffect == HOLD_EFFECT_RESIST_BERRY); + ASSUME(gItems[ITEM_TANGA_BERRY].holdEffectParam == TYPE_BUG); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET) {Item(ITEM_TANGA_BERRY); } } WHEN { - TURN { MOVE(player, MOVE_BUG_BITE); } + TURN { MOVE(player, MOVE_BUG_BITE); } } SCENE { MESSAGE("Wobbuffet used Bug Bite!"); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); diff --git a/test/battle/move_effect/multi_hit.c b/test/battle/move_effect/multi_hit.c index 6a034c830f..99e506ad68 100644 --- a/test/battle/move_effect/multi_hit.c +++ b/test/battle/move_effect/multi_hit.c @@ -25,11 +25,12 @@ SINGLE_BATTLE_TEST("Multi hit Moves hit the maximum amount with Skill Link") } } -SINGLE_BATTLE_TEST("Multi hit Moves hit twice 35 Percent of the time") +SINGLE_BATTLE_TEST("Multi hit Moves hit twice 35% of the time") { PASSES_RANDOMLY(35, 100, RNG_HITS); GIVEN { + ASSUME(B_MULTI_HIT_CHANCE >= GEN_5); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { @@ -41,11 +42,12 @@ SINGLE_BATTLE_TEST("Multi hit Moves hit twice 35 Percent of the time") } } -SINGLE_BATTLE_TEST("Multi hit Moves hit thrice 35 Percent of the time") +SINGLE_BATTLE_TEST("Multi hit Moves hit thrice 35% of the time") { PASSES_RANDOMLY(35, 100, RNG_HITS); GIVEN { + ASSUME(B_MULTI_HIT_CHANCE >= GEN_5); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { @@ -58,11 +60,12 @@ SINGLE_BATTLE_TEST("Multi hit Moves hit thrice 35 Percent of the time") } } -SINGLE_BATTLE_TEST("Multi hit Moves hit four times 35 Percent of the time") +SINGLE_BATTLE_TEST("Multi hit Moves hit four times 15% of the time") { PASSES_RANDOMLY(15, 100, RNG_HITS); GIVEN { + ASSUME(B_MULTI_HIT_CHANCE >= GEN_5); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { @@ -76,11 +79,12 @@ SINGLE_BATTLE_TEST("Multi hit Moves hit four times 35 Percent of the time") } } -SINGLE_BATTLE_TEST("Multi hit Moves hit four times 35 Percent of the time") +SINGLE_BATTLE_TEST("Multi hit Moves hit five times 15% of the time") { PASSES_RANDOMLY(15, 100, RNG_HITS); GIVEN { + ASSUME(B_MULTI_HIT_CHANCE >= GEN_5); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN {