some contest lady funcs

This commit is contained in:
GriffinR 2019-08-04 12:00:42 -04:00 committed by huderlem
parent 5d96a0cc97
commit 009caa21c8
4 changed files with 21 additions and 20 deletions

View File

@ -4701,7 +4701,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A88B0:: @ 82A88B0
LilycoveCity_PokemonCenter_1F_EventScript_2A88BA:: @ 82A88BA
fadescreen 1
special sub_818E92C
special OpenPokeblockCaseForContestLady
waitstate
compare VAR_RESULT, 65535
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A88D7
@ -4719,8 +4719,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A88D7:: @ 82A88D7
LilycoveCity_PokemonCenter_1F_EventScript_2A88F6:: @ 82A88F6
msgbox LilycoveCity_PokemonCenter_1F_Text_2A9571, MSGBOX_DEFAULT
special sub_818E940
special sub_818E960
special ContestLadyGivenPokeblock
special GetContestLadyMonSpecies
goto LilycoveCity_PokemonCenter_1F_EventScript_2A890A
end
@ -4810,9 +4810,9 @@ LilycoveCity_PokemonCenter_1F_Movement_2A89C2: @ 82A89C2
step_end
LilycoveCity_PokemonCenter_1F_EventScript_2A89C7:: @ 82A89C7
specialvar VAR_RESULT, sub_818E990
specialvar VAR_RESULT, GetContestLadyCategory
special sub_818E914
special sub_818E960
special GetContestLadyMonSpecies
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8A0A
compare VAR_RESULT, 1

View File

@ -409,10 +409,10 @@ gSpecials:: @ 81DBA64
def_special sub_818E8E0
def_special sub_818E8B4
def_special sub_818E914
def_special sub_818E92C
def_special sub_818E940
def_special sub_818E960
def_special sub_818E990
def_special OpenPokeblockCaseForContestLady
def_special ContestLadyGivenPokeblock
def_special GetContestLadyMonSpecies
def_special GetContestLadyCategory
def_special PutLilycoveContestLadyShowOnTheAir
def_special sub_813B880
def_special CallApprenticeFunction

View File

@ -776,7 +776,7 @@ struct LilycoveLadyFavor
struct LilycoveLadyContest
{
/*0x000*/ u8 id;
/*0x001*/ u8 phase;
/*0x001*/ bool8 givenPokeblock;
/*0x002*/ u8 fave_pkblk;
/*0x003*/ u8 other_pkblk;
/*0x004*/ u8 playerName[PLAYER_NAME_LENGTH + 1];

View File

@ -335,8 +335,8 @@ static const u16 sQuizLadyPrizes[] =
ITEM_PREMIER_BALL
};
#define QUIZ_QUESTION_LEN ARRAY_COUNT(sQuizLadyQuestion1) //
#define QUIZ_QUESTION_NUM ARRAY_COUNT(sQuizLadyQuizQuestions)
#define QUIZ_QUESTION_LEN 9
#define QUIZ_QUESTION_NUM 16
// Favor Lady data
static const u8 *const sFavorLadyDescriptions[] =
@ -1136,7 +1136,7 @@ static void InitLilycoveContestLady(void)
{
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
sContestLadyPtr->id = LILYCOVE_LADY_CONTEST;
sContestLadyPtr->phase = 0;
sContestLadyPtr->givenPokeblock = FALSE;
ResetContestLadyContestData();
sContestLadyPtr->language = gGameLanguage;
}
@ -1145,7 +1145,7 @@ static void sub_818E674(void)
{
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
sContestLadyPtr->id = LILYCOVE_LADY_CONTEST;
sContestLadyPtr->phase = 0;
sContestLadyPtr->givenPokeblock = FALSE;
if (sContestLadyPtr->fave_pkblk == FLAVOR_COUNT
|| sContestLadyPtr->other_pkblk == FLAVOR_COUNT)
{
@ -1274,7 +1274,7 @@ u8 sub_818E880(void)
bool8 sub_818E8B4(void)
{
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
if (sContestLadyPtr->phase == 1)
if (sContestLadyPtr->givenPokeblock == TRUE)
{
return TRUE;
}
@ -1295,29 +1295,30 @@ bool8 sub_818E8E0(void)
return response;
}
// called when mon enjoys pokeblock
void sub_818E914(void)
{
sub_818E794(gStringVar2, gStringVar1);
}
void sub_818E92C(void)
void OpenPokeblockCaseForContestLady(void)
{
OpenPokeblockCase(3, CB2_ReturnToField);
}
void sub_818E940(void)
void ContestLadyGivenPokeblock(void)
{
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
sContestLadyPtr->phase = 1;
sContestLadyPtr->givenPokeblock = TRUE;
}
void sub_818E960(void)
void GetContestLadyMonSpecies(void)
{
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
gSpecialVar_0x8005 = sContestLadyMonSpecies[sContestLadyPtr->category];
}
u8 sub_818E990(void)
u8 GetContestLadyCategory(void)
{
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
return sContestLadyPtr->category;