Clean up mystery event msg

This commit is contained in:
GriffinR
2019-11-05 15:08:07 -05:00
committed by huderlem
parent 481c09fcad
commit 58dcd6d99d
6 changed files with 215 additions and 103 deletions

View File

@@ -55,6 +55,7 @@
#include "constants/heal_locations.h"
#include "constants/map_types.h"
#include "constants/maps.h"
#include "constants/mevent.h"
#include "constants/tv.h"
#include "constants/script_menu.h"
#include "constants/songs.h"
@@ -1655,19 +1656,19 @@ void BufferLottoTicketNumber(void)
}
}
u16 sub_813986C(void)
u16 GetMysteryEventCardVal(void)
{
switch (gSpecialVar_Result)
{
case 0:
return mevent_081445C0(3);
case 1:
return mevent_081445C0(4);
case 2:
return mevent_081445C0(0);
case 3:
case GET_NUM_STAMPS:
return mevent_081445C0(GET_NUM_STAMPS_INTERNAL);
case GET_MAX_STAMPS:
return mevent_081445C0(GET_MAX_STAMPS_INTERNAL);
case GET_CARD_BATTLES_WON:
return mevent_081445C0(GET_CARD_BATTLES_WON_INTERNAL);
case 3: // Never occurs
return mevent_081445C0(1);
case 4:
case 4: // Never occurs
return mevent_081445C0(2);
default:
return 0;

View File

@@ -9,6 +9,7 @@
#include "string_util.h"
#include "new_game.h"
#include "mevent.h"
#include "constants/mevent.h"
#include "constants/species.h"
static EWRAM_DATA bool32 gUnknown_02022C70 = FALSE;
@@ -493,7 +494,7 @@ u16 mevent_081445C0(u32 command)
{
switch (command)
{
case 0:
case GET_CARD_BATTLES_WON_INTERNAL:
{
struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data;
if (data->unk_08_0 == 2)
@@ -503,7 +504,7 @@ u16 mevent_081445C0(u32 command)
}
break;
}
case 1:
case 1: // Never occurs
{
struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data;
if (data->unk_08_0 == 2)
@@ -513,7 +514,7 @@ u16 mevent_081445C0(u32 command)
}
break;
}
case 2:
case 2: // Never occurs
{
struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data;
if (data->unk_08_0 == 2)
@@ -523,14 +524,14 @@ u16 mevent_081445C0(u32 command)
}
break;
}
case 3:
case GET_NUM_STAMPS_INTERNAL:
{
struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data;
if (data->unk_08_0 == 1)
return sub_801B4CC();
break;
}
case 4:
case GET_MAX_STAMPS_INTERNAL:
{
struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data;
if (data->unk_08_0 == 1)