Merge branch 'master' into document-eventscripts

This commit is contained in:
GriffinR
2019-09-03 22:22:14 -04:00
committed by GitHub
173 changed files with 12838 additions and 2094 deletions

View File

@@ -1,6 +1,7 @@
#include "constants/global.h"
#include "constants/battle_frontier.h"
#include "constants/battle_setup.h"
#include "constants/contest.h"
#include "constants/easy_chat.h"
#include "constants/event_objects.h"
#include "constants/event_object_movement_constants.h"
@@ -19,6 +20,7 @@
#include "constants/vars.h"
#include "constants/weather.h"
#include "constants/trainer_hill.h"
#include "constants/lilycove_lady.h"
#include "constants/battle.h"
#include "constants/metatile_labels.h"
.include "asm/macros.inc"
@@ -4329,23 +4331,23 @@ GraniteCave_B1F_Movement_2A8369: @ 82A8369
step_end
LilycoveCity_PokemonCenter_1F_EventScript_2A836B:: @ 82A836B
special sub_818DAEC
special Script_GetLilycoveLadyId
switch VAR_RESULT
case 0, LilycoveCity_PokemonCenter_1F_EventScript_2A8554
case 1, LilycoveCity_PokemonCenter_1F_EventScript_2A8395
case 2, LilycoveCity_PokemonCenter_1F_EventScript_2A882A
case LILYCOVE_LADY_QUIZ, LilycoveCity_PokemonCenter_1F_EventScript_2A8554
case LILYCOVE_LADY_FAVOR, LilycoveCity_PokemonCenter_1F_EventScript_2A8395
case LILYCOVE_LADY_CONTEST, LilycoveCity_PokemonCenter_1F_EventScript_2A882A
end
LilycoveCity_PokemonCenter_1F_EventScript_2A8395:: @ 82A8395
lock
faceplayer
msgbox LilycoveCity_PokemonCenter_1F_Text_2A8A69, MSGBOX_DEFAULT
specialvar VAR_RESULT, sub_818DBE8
compare VAR_RESULT, 0
specialvar VAR_RESULT, GetFavorLadyState
compare VAR_RESULT, LILYCOVE_LADY_STATE_READY
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A83D0
compare VAR_RESULT, 1
compare VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A83C6
compare VAR_RESULT, 2
compare VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8510
end
@@ -4355,9 +4357,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A83C6:: @ 82A83C6
end
LilycoveCity_PokemonCenter_1F_EventScript_2A83D0:: @ 82A83D0
special sub_818DC2C
special BufferFavorLadyRequest
msgbox LilycoveCity_PokemonCenter_1F_Text_2A8A7D, MSGBOX_DEFAULT
specialvar VAR_RESULT, sub_818DC60
specialvar VAR_RESULT, HasAnotherPlayerGivenFavorLadyItem
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8435
compare VAR_RESULT, 1
@@ -4365,9 +4367,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A83D0:: @ 82A83D0
end
LilycoveCity_PokemonCenter_1F_EventScript_2A83F7:: @ 82A83F7
special sub_818DCC8
special sub_818DD14
specialvar VAR_RESULT, sub_818DD54
special BufferFavorLadyItemName
special BufferFavorLadyPlayerName
specialvar VAR_RESULT, DidFavorLadyLikeItem
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8419
compare VAR_RESULT, 1
@@ -4405,7 +4407,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A845E:: @ 82A845E
LilycoveCity_PokemonCenter_1F_EventScript_2A846C:: @ 82A846C
fadescreen 1
setvar VAR_RESULT, 0
special sub_818DD78
special Script_FavorLadyOpenBagMenu
waitstate
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A848E
@@ -4422,7 +4424,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A848E:: @ 82A848E
end
LilycoveCity_PokemonCenter_1F_EventScript_2A84AD:: @ 82A84AD
specialvar VAR_RESULT, sub_818DE44
specialvar VAR_RESULT, Script_DoesFavorLadyLikeItem
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A84C9
compare VAR_RESULT, 1
@@ -4430,13 +4432,13 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A84AD:: @ 82A84AD
end
LilycoveCity_PokemonCenter_1F_EventScript_2A84C9:: @ 82A84C9
special sub_818DC2C
special BufferFavorLadyRequest
msgbox LilycoveCity_PokemonCenter_1F_Text_2A8C0F, MSGBOX_DEFAULT
release
end
LilycoveCity_PokemonCenter_1F_EventScript_2A84D6:: @ 82A84D6
specialvar VAR_RESULT, sub_818DE5C
specialvar VAR_RESULT, IsFavorLadyThresholdMet
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A84F2
compare VAR_RESULT, 1
@@ -4444,20 +4446,20 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A84D6:: @ 82A84D6
end
LilycoveCity_PokemonCenter_1F_EventScript_2A84F2:: @ 82A84F2
special sub_818DC2C
special BufferFavorLadyRequest
msgbox LilycoveCity_PokemonCenter_1F_Text_2A8C6F, MSGBOX_DEFAULT
release
end
LilycoveCity_PokemonCenter_1F_EventScript_2A84FF:: @ 82A84FF
special sub_818DC2C
special BufferFavorLadyRequest
msgbox LilycoveCity_PokemonCenter_1F_Text_2A8CC8, MSGBOX_DEFAULT
goto LilycoveCity_PokemonCenter_1F_EventScript_2A8510
end
LilycoveCity_PokemonCenter_1F_EventScript_2A8510:: @ 82A8510
setvar VAR_0x8004, 0
specialvar VAR_0x8004, sub_818DEA0
specialvar VAR_0x8004, FavorLadyGetPrize
msgbox LilycoveCity_PokemonCenter_1F_Text_2A8D5D, MSGBOX_DEFAULT
giveitem_std VAR_0x8004
compare VAR_RESULT, 0
@@ -4472,7 +4474,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A8545:: @ 82A8545
end
LilycoveCity_PokemonCenter_1F_EventScript_2A854F:: @ 82A854F
special sub_818DEDC
special SetFavorLadyState_Complete
release
end
@@ -4480,27 +4482,27 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A8554:: @ 82A8554
lock
faceplayer
msgbox LilycoveCity_PokemonCenter_1F_Text_2A8E2B, MSGBOX_DEFAULT
specialvar VAR_RESULT, sub_818E038
compare VAR_RESULT, 0
specialvar VAR_RESULT, GetQuizLadyState
compare VAR_RESULT, LILYCOVE_LADY_STATE_READY
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8585
compare VAR_RESULT, 1
compare VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A85AC
compare VAR_RESULT, 2
compare VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A86EC
end
LilycoveCity_PokemonCenter_1F_EventScript_2A8585:: @ 82A8585
specialvar VAR_RESULT, sub_818E06C
compare VAR_RESULT, 0
specialvar VAR_RESULT, GetQuizAuthor
compare VAR_RESULT, QUIZ_AUTHOR_PLAYER
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A85C8
compare VAR_RESULT, 1
compare VAR_RESULT, QUIZ_AUTHOR_OTHER_PLAYER
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A85D2
compare VAR_RESULT, 2
compare VAR_RESULT, QUIZ_AUTHOR_LADY
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A85E0
end
LilycoveCity_PokemonCenter_1F_EventScript_2A85AC:: @ 82A85AC
specialvar VAR_RESULT, sub_818E2D8
specialvar VAR_RESULT, IsQuizLadyWaitingForChallenger
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8759
compare VAR_RESULT, 1
@@ -4537,7 +4539,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A8612:: @ 82A8612
end
LilycoveCity_PokemonCenter_1F_EventScript_2A861C:: @ 82A861C
special sub_818E3BC
special ClearQuizLadyPlayerAnswer
compare VAR_0x8004, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A864C
compare VAR_0x8004, EASY_CHAT_TYPE_QUIZ_ANSWER
@@ -4551,13 +4553,13 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A8635:: @ 82A8635
end
LilycoveCity_PokemonCenter_1F_EventScript_2A864C:: @ 82A864C
special sub_811A858
special QuizLadyShowQuizQuestion
waitstate
goto LilycoveCity_PokemonCenter_1F_EventScript_2A8635
end
LilycoveCity_PokemonCenter_1F_EventScript_2A8656:: @ 82A8656
special sub_818E2FC
special QuizLadyGetPlayerAnswer
waitstate
goto LilycoveCity_PokemonCenter_1F_EventScript_2A8635
end
@@ -4576,9 +4578,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A867F:: @ 82A867F
end
LilycoveCity_PokemonCenter_1F_EventScript_2A8689:: @ 82A8689
special sub_818E37C
special SetQuizLadyState_Complete
msgbox LilycoveCity_PokemonCenter_1F_Text_2A8F4D, MSGBOX_DEFAULT
specialvar VAR_RESULT, sub_818E308
specialvar VAR_RESULT, IsQuizAnswerCorrect
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A86C7
compare VAR_RESULT, 1
@@ -4594,8 +4596,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A86B0:: @ 82A86B0
end
LilycoveCity_PokemonCenter_1F_EventScript_2A86C7:: @ 82A86C7
special sub_818E538
special sub_818E274
special BufferQuizCorrectAnswer
special BufferQuizPrizeName
playse SE_HAZURE
delay 10
playse SE_HAZURE
@@ -4604,8 +4606,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A86C7:: @ 82A86C7
goto LilycoveCity_PokemonCenter_1F_EventScript_2A8759
end
@ VAR_RESULT is essentially ignored, both jumps are identical
LilycoveCity_PokemonCenter_1F_EventScript_2A86EC:: @ 82A86EC
specialvar VAR_RESULT, sub_818E298
specialvar VAR_RESULT, BufferQuizAuthorNameAndCheckIfLady
compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8708
compare VAR_RESULT, 0
@@ -4624,8 +4627,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A8716:: @ 82A8716
LilycoveCity_PokemonCenter_1F_EventScript_2A8724:: @ 82A8724
setvar VAR_0x8005, 0
special sub_818E358
special sub_818E37C
special BufferQuizPrizeItem
special SetQuizLadyState_Complete
giveitem_std VAR_0x8005
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A874C
@@ -4634,7 +4637,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A8724:: @ 82A8724
LilycoveCity_PokemonCenter_1F_EventScript_2A874C:: @ 82A874C
msgbox LilycoveCity_PokemonCenter_1F_Text_2A906A, MSGBOX_DEFAULT
special sub_818E39C
special SetQuizLadyState_GivePrize
release
end
@@ -4647,7 +4650,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A8759:: @ 82A8759
end
LilycoveCity_PokemonCenter_1F_EventScript_2A8778:: @ 82A8778
special sub_818E3EC
special QuizLadyPickNewQuestion
msgbox LilycoveCity_PokemonCenter_1F_Text_2A9131, MSGBOX_DEFAULT
release
end
@@ -4658,7 +4661,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A8785:: @ 82A8785
LilycoveCity_PokemonCenter_1F_EventScript_2A878D:: @ 82A878D
fadescreen 1
setvar VAR_RESULT, 0
special sub_818E3E0
special Script_QuizLadyOpenBagMenu
waitstate
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A87AF
@@ -4676,13 +4679,13 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A87AF:: @ 82A87AF
LilycoveCity_PokemonCenter_1F_EventScript_2A87CE:: @ 82A87CE
msgbox LilycoveCity_PokemonCenter_1F_Text_2A9270, MSGBOX_DEFAULT
special sub_818E430
special sub_818E3BC
setvar VAR_0x8004, 16
special ClearQuizLadyQuestionAndAnswer
special ClearQuizLadyPlayerAnswer
setvar VAR_0x8004, EASY_CHAT_TYPE_QUIZ_QUESTION
LilycoveCity_PokemonCenter_1F_EventScript_2A87E1:: @ 82A87E1
fadescreen 1
special sub_818E47C
special QuizLadySetCustomQuestion
waitstate
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A87F8
@@ -4698,9 +4701,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A87F8:: @ 82A87F8
end
LilycoveCity_PokemonCenter_1F_EventScript_2A8817:: @ 82A8817
special sub_818E490
special sub_818E4A4
special sub_818E510
special QuizLadyTakePrizeForCustomQuiz
special QuizLadyRecordCustomQuizData
special QuizLadySetWaitingForChallenger
msgbox LilycoveCity_PokemonCenter_1F_Text_2A9336, MSGBOX_DEFAULT
release
end
@@ -4709,15 +4712,16 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A882A:: @ 82A882A
lock
faceplayer
msgbox LilycoveCity_PokemonCenter_1F_Text_2A93A7, MSGBOX_DEFAULT
specialvar VAR_RESULT, sub_818E8B4
specialvar VAR_RESULT, HasPlayerGivenContestLadyPokeblock
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8850
compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A886C
end
@ Redundant with above script, VAR_RESULT will always be 0 here
LilycoveCity_PokemonCenter_1F_EventScript_2A8850:: @ 82A8850
specialvar VAR_RESULT, sub_818E8E0
specialvar VAR_RESULT, ShouldContestLadyShowGoOnAir
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8876
compare VAR_RESULT, 1
@@ -4730,7 +4734,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A886C:: @ 82A886C
end
LilycoveCity_PokemonCenter_1F_EventScript_2A8876:: @ 82A8876
special sub_818E914
special Script_BufferContestLadyCategoryAndMonName
msgbox LilycoveCity_PokemonCenter_1F_Text_2A93F4, MSGBOX_DEFAULT
checkitem ITEM_POKEBLOCK_CASE, 1
compare VAR_RESULT, 0
@@ -4749,7 +4753,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
@@ -4767,11 +4771,12 @@ 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 SetContestLadyGivenPokeblock
special GetContestLadyMonSpecies
goto LilycoveCity_PokemonCenter_1F_EventScript_2A890A
end
@ VAR_0x8004 here is the return value from GivePokeblockToContestLady
LilycoveCity_PokemonCenter_1F_EventScript_2A890A:: @ 82A890A
applymovement 4, LilycoveCity_PokemonCenter_1F_Movement_2A89B8
waitmovement 0
@@ -4793,6 +4798,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A893F:: @ 82A893F
waitmovement 0
delay 60
@ VAR_0x8004 here is the return value from GivePokeblockToContestLady
LilycoveCity_PokemonCenter_1F_EventScript_2A894C:: @ 82A894C
applymovement 4, LilycoveCity_PokemonCenter_1F_Movement_2A89C0
waitmovement 0
@@ -4809,13 +4815,13 @@ LilycoveCity_PokemonCenter_1F_EventScript_2A8970:: @ 82A8970
end
LilycoveCity_PokemonCenter_1F_EventScript_2A897E:: @ 82A897E
special sub_818E914
special Script_BufferContestLadyCategoryAndMonName
msgbox LilycoveCity_PokemonCenter_1F_Text_2A9605, MSGBOX_DEFAULT
goto LilycoveCity_PokemonCenter_1F_EventScript_2A898F
end
LilycoveCity_PokemonCenter_1F_EventScript_2A898F:: @ 82A898F
specialvar VAR_RESULT, sub_818E8E0
specialvar VAR_RESULT, ShouldContestLadyShowGoOnAir
compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A89A1
release
@@ -4858,18 +4864,18 @@ LilycoveCity_PokemonCenter_1F_Movement_2A89C2: @ 82A89C2
step_end
LilycoveCity_PokemonCenter_1F_EventScript_2A89C7:: @ 82A89C7
specialvar VAR_RESULT, sub_818E990
special sub_818E914
special sub_818E960
compare VAR_RESULT, 0
specialvar VAR_RESULT, GetContestLadyCategory
special Script_BufferContestLadyCategoryAndMonName
special GetContestLadyMonSpecies
compare VAR_RESULT, CONTEST_CATEGORY_COOL
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8A0A
compare VAR_RESULT, 1
compare VAR_RESULT, CONTEST_CATEGORY_BEAUTY
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8A1D
compare VAR_RESULT, 2
compare VAR_RESULT, CONTEST_CATEGORY_CUTE
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8A30
compare VAR_RESULT, 3
compare VAR_RESULT, CONTEST_CATEGORY_SMART
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8A43
compare VAR_RESULT, 4
compare VAR_RESULT, CONTEST_CATEGORY_TOUGH
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_2A8A56
end