From 91cfb6a564f73f02eb57792f8a0f4aa82e1867d1 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Tue, 16 Jan 2018 22:25:35 -0600 Subject: add debug ifdefs --- src/field/wild_encounter.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/field/wild_encounter.c') diff --git a/src/field/wild_encounter.c b/src/field/wild_encounter.c index 4bf83cad8..08913f40d 100644 --- a/src/field/wild_encounter.c +++ b/src/field/wild_encounter.c @@ -3802,6 +3802,19 @@ static void FeebasSeedRng(u16 seed) sFeebasRngValue = seed; } +#if DEBUG +u16 debug_sub_8092344(u8 arg0) +{ + if (arg0 == 0) + return 131; + if (arg0 == 1) + return 167; + if (arg0 == 2) + return 149; + return 0; +} +#endif + static u8 ChooseWildMonIndex_Land(void) { u8 rand = Random() % 100; @@ -4042,6 +4055,24 @@ static bool8 DoWildEncounterRateDiceRoll(u16 encounterRate) return FALSE; } +#if DEBUG +u16 debug_sub_809283C(u16 attempts) +{ + u16 retval = 0; + u16 i = 0; + + while (i < attempts) + { + if (DoWildEncounterRateDiceRoll(320) == TRUE) + retval++; + + i++; + } + + return retval; +} +#endif + static bool8 DoWildEncounterTest(u32 encounterRate, bool8 ignoreAbility) { encounterRate *= 16; -- cgit v1.2.3