summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/macros/battle_frontier.inc117
-rw-r--r--data/maps/BattleFrontier_BattleTowerLobby/scripts.inc42
-rw-r--r--data/scripts/apprentice.inc334
-rw-r--r--data/text/apprentice.inc96
-rw-r--r--include/apprentice.h2
-rw-r--r--include/constants/apprentice.h64
-rw-r--r--include/global.h8
-rw-r--r--include/item_menu.h2
-rw-r--r--src/apprentice.c475
-rw-r--r--src/easy_chat.c2
-rw-r--r--src/frontier_util.c6
-rwxr-xr-xsrc/item_menu.c8
-rw-r--r--src/recorded_battle.c16
13 files changed, 627 insertions, 545 deletions
diff --git a/asm/macros/battle_frontier.inc b/asm/macros/battle_frontier.inc
index 8a5f369a3..cbb91f680 100644
--- a/asm/macros/battle_frontier.inc
+++ b/asm/macros/battle_frontier.inc
@@ -32,4 +32,121 @@ special CallBattleTowerFunc
@ Battle Tent
+@ Trainer Hill
+
@ Apprentice
+
+.macro apprentice_gavelvlmode
+setvar VAR_0x8004, APPRENTICE_FUNC_GAVE_LVLMODE
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_setlvlmode lvlmode:req
+setvar VAR_0x8004, APPRENTICE_FUNC_SET_LVLMODE
+setorcopyvar VAR_0x8005, \lvlmode
+addvar VAR_0x8005, 1
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_answeredquestion
+setvar VAR_0x8004, APPRENTICE_FUNC_ANSWERED_QUESTION
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_menu which:req
+setvar VAR_0x8004, APPRENTICE_FUNC_MENU
+setvar VAR_0x8005, \which
+special CallApprenticeFunction
+waitstate
+.endm
+
+.macro apprentice_3
+setvar VAR_0x8004, APPRENTICE_FUNC_3
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_msg waitbuttonpress:req, which:req
+setvar VAR_0x8004, APPRENTICE_FUNC_PRINT_MSG
+setvar VAR_0x8005, \waitbuttonpress
+setvar VAR_0x8006, \which
+special CallApprenticeFunction
+waitstate
+.endm
+
+.macro apprentice_reset
+setvar VAR_0x8004, APPRENTICE_FUNC_RESET
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_shouldcheckgone
+setvar VAR_0x8004, APPRENTICE_FUNC_CHECK_GONE
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_getquestion
+setvar VAR_0x8004, APPRENTICE_FUNC_GET_QUESTION
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_getnumpartymons
+setvar VAR_0x8004, APPRENTICE_FUNC_GET_NUM_PARTY_MONS
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_setpartymon slot:req
+copyvar VAR_0x8006, \slot
+setvar VAR_0x8004, APPRENTICE_FUNC_SET_PARTY_MON
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_initquestion which:req
+setvar VAR_0x8004, APPRENTICE_FUNC_INIT_QUESTION_DATA
+setvar VAR_0x8005, \which
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_freequestion
+setvar VAR_0x8004, APPRENTICE_FUNC_FREE_QUESTION_DATA
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_buff whichstringvar:req, tobuff:req
+setvar VAR_0x8004, APPRENTICE_FUNC_BUFFER_STRING
+setvar VAR_0x8005, \whichstringvar
+setvar VAR_0x8006, \tobuff
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_buffv whichstringvar:req tobuff:req
+setvar VAR_0x8004, APPRENTICE_FUNC_BUFFER_STRING
+setvar VAR_0x8005, \whichstringvar
+copyvar VAR_0x8006, \tobuff
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_setmove
+setvar VAR_0x8004, APPRENTICE_FUNC_SET_MOVE
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_setfirstmon monId:req
+copyvar VAR_0x8005, \monId
+setvar VAR_0x8004, APPRENTICE_FUNC_SET_FIRST_MON
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_openbag
+setvar VAR_0x8004, APPRENTICE_FUNC_OPEN_BAG
+special CallApprenticeFunction
+waitstate
+.endm
+
+.macro apprentice_setgfx
+setvar VAR_0x8004, APPRENTICE_FUNC_SET_GFX
+special CallApprenticeFunction
+.endm
+
+.macro apprentice_shouldleave
+setvar VAR_0x8004, APPRENTICE_FUNC_SHOULD_LEAVE
+special CallApprenticeFunction
+.endm
diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
index 791901b1f..3767db315 100644
--- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
@@ -1,44 +1,40 @@
BattleFrontier_BattleTowerLobby_MapScripts:: @ 823E67B
- map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleTowerLobby_MapScript1_23E690
- map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleTowerLobby_MapScript1_23E694
- map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerLobby_MapScript2_23E6DD
- map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleTowerLobby_MapScript2_23E6C9
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleTowerLobby_OnResume
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleTowerLobby_OnTransition
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerLobby_OnFrame
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleTowerLobby_OnWarp
.byte 0
-BattleFrontier_BattleTowerLobby_MapScript1_23E690: @ 823E690
+BattleFrontier_BattleTowerLobby_OnResume: @ 823E690
special sub_81653CC
end
-BattleFrontier_BattleTowerLobby_MapScript1_23E694: @ 823E694
+BattleFrontier_BattleTowerLobby_OnTransition: @ 823E694
call BattleFrontier_BattleTowerLobby_EventScript_ShowOrHideReporter
- setvar VAR_0x8004, APPRENTICE_FUNC_10
- special CallApprenticeFunction
- compare VAR_0x8004, 0
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23E6B5
- goto_if_set FLAG_DAILY_APPRENTICE_LEAVES, BattleFrontier_BattleTowerLobby_EventScript_23E6C1
-
-BattleFrontier_BattleTowerLobby_EventScript_23E6B5:: @ 823E6B5
+ apprentice_shouldcheckgone
+ compare VAR_0x8004, FALSE @ Always TRUE here
+ goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ShowApprentice
+ goto_if_set FLAG_DAILY_APPRENTICE_LEAVES, BattleFrontier_BattleTowerLobby_EventScript_HideApprentice
+BattleFrontier_BattleTowerLobby_EventScript_ShowApprentice:: @ 823E6B5
clearflag FLAG_HIDE_APPRENTICE
- setvar VAR_0x8004, APPRENTICE_FUNC_23
- special CallApprenticeFunction
-
-BattleFrontier_BattleTowerLobby_EventScript_23E6C0:: @ 823E6C0
+ apprentice_setgfx
+BattleFrontier_BattleTowerLobby_EventScript_EndShowOrHideApprentice:: @ 823E6C0
end
-BattleFrontier_BattleTowerLobby_EventScript_23E6C1:: @ 823E6C1
+BattleFrontier_BattleTowerLobby_EventScript_HideApprentice:: @ 823E6C1
setflag FLAG_HIDE_APPRENTICE
- goto BattleFrontier_BattleTowerLobby_EventScript_23E6C0
+ goto BattleFrontier_BattleTowerLobby_EventScript_EndShowOrHideApprentice
-BattleFrontier_BattleTowerLobby_MapScript2_23E6C9: @ 823E6C9
- map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattleTowerLobby_EventScript_23E6D3
+BattleFrontier_BattleTowerLobby_OnWarp: @ 823E6C9
+ map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattleTowerLobby_EventScript_PlayerFaceNorth
.2byte 0
-BattleFrontier_BattleTowerLobby_EventScript_23E6D3:: @ 823E6D3
+BattleFrontier_BattleTowerLobby_EventScript_PlayerFaceNorth:: @ 823E6D3
setvar VAR_TEMP_1, 1
turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
-BattleFrontier_BattleTowerLobby_MapScript2_23E6DD: @ 823E6DD
+BattleFrontier_BattleTowerLobby_OnFrame: @ 823E6DD
map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleTowerLobby_EventScript_23E707
map_script_2 VAR_TEMP_0, 1, BattleFrontier_BattleTowerLobby_EventScript_23E710
map_script_2 VAR_TEMP_0, 2, BattleFrontier_BattleTowerLobby_EventScript_23E8EE
diff --git a/data/scripts/apprentice.inc b/data/scripts/apprentice.inc
index 337899496..dfb9f5727 100644
--- a/data/scripts/apprentice.inc
+++ b/data/scripts/apprentice.inc
@@ -1,269 +1,204 @@
-.macro apprentice_msg waitbuttonpress:req, which:req
-setvar VAR_0x8004, APPRENTICE_FUNC_PRINT_MSG
-setvar VAR_0x8005, \waitbuttonpress
-setvar VAR_0x8006, \which
-special CallApprenticeFunction
-waitstate
-.endm
-
-.macro apprentice_buff whichstringvar:req, tobuff:req
-setvar VAR_0x8004, APPRENTICE_FUNC_16
-setvar VAR_0x8005, \whichstringvar
-setvar VAR_0x8006, \tobuff
-special CallApprenticeFunction
-.endm
-
-.macro apprentice_menu which:req
-setvar VAR_0x8004, APPRENTICE_FUNC_MENU
-setvar VAR_0x8005, \which
-special CallApprenticeFunction
-waitstate
-.endm
-
BattleFrontier_BattleTowerLobby_EventScript_Apprentice:: @ 82B688D
lock
faceplayer
- setvar VAR_0x8004, APPRENTICE_FUNC_0
- special CallApprenticeFunction
- compare VAR_RESULT, 0
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6900
- setvar VAR_0x8004, APPRENTICE_FUNC_SET_TRUE_1
- special CallApprenticeFunction
+ apprentice_gavelvlmode
+ compare VAR_RESULT, FALSE
+ goto_if_eq Apprentice_EventScript_FirstMeeting
+ apprentice_shouldcheckgone
compare VAR_0x8004, FALSE @ Always TRUE here
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B68BE
- goto_if_set FLAG_DAILY_APPRENTICE_LEAVES, BattleFrontier_BattleTowerLobby_EventScript_2B6E90
-
-BattleFrontier_BattleTowerLobby_EventScript_2B68BE: @ 82B68BE
- setvar VAR_0x8004, APPRENTICE_FUNC_11
- special CallApprenticeFunction
- compare VAR_RESULT, 2
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B69D3
- compare VAR_RESULT, 4
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6ACF
- compare VAR_RESULT, 3
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6C77
- compare VAR_RESULT, 1
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6D5C
- compare VAR_RESULT, 5
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6DD4
+ goto_if_eq Apprentice_EventScript_AskQuestion
+ goto_if_set FLAG_DAILY_APPRENTICE_LEAVES, Apprentice_EventScript_Gone
+Apprentice_EventScript_AskQuestion: @ 82B68BE
+ apprentice_getquestion
+ compare VAR_RESULT, APPRENTICE_QUESTION_WHICH_MON
+ goto_if_eq Apprentice_EventScript_UseWhichMon
+ compare VAR_RESULT, APPRENTICE_QUESTION_WHAT_ITEM
+ goto_if_eq Apprentice_EventScript_UseWhatHeldItem
+ compare VAR_RESULT, APPRENTICE_QUESTION_WHICH_MOVE
+ goto_if_eq Apprentice_EventScript_UseWhichMove
+ compare VAR_RESULT, APPRENTICE_QUESTION_WHICH_FIRST
+ goto_if_eq Apprentice_EventScript_PutWhichMonFirst
+ compare VAR_RESULT, APPRENTICE_QUESTION_WIN_SPEECH
+ goto_if_eq Apprentice_EventScript_PickWinSpeech
release
releaseall
end
-BattleFrontier_BattleTowerLobby_EventScript_2B6900: @ 82B6900
+Apprentice_EventScript_FirstMeeting: @ 82B6900
apprentice_buff 0, APPRENTICE_BUFF_NAME
- apprentice_msg FALSE, 0
-BattleFrontier_BattleTowerLobby_EventScript_2B6925: @ 82B6925
+ apprentice_msg FALSE, APPRENTICE_MSG_PLEASE_TEACH
+Apprentice_EventScript_WhichLvlMode: @ 82B6925
apprentice_menu APPRENTICE_ASK_YES_NO
compare VAR_RESULT, 1
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B69BB
- apprentice_msg FALSE, 2
+ goto_if_eq Apprentice_EventScript_RejectTeach
+ apprentice_msg FALSE, APPRENTICE_MSG_WHICH_LVL_MODE
apprentice_menu APPRENTICE_ASK_WHICH_LEVEL
- setvar VAR_0x8004, APPRENTICE_FUNC_1
- setorcopyvar VAR_0x8005, VAR_RESULT
- addvar VAR_0x8005, 1
- special CallApprenticeFunction
- setvar VAR_0x8004, APPRENTICE_FUNC_3
- special CallApprenticeFunction
+ apprentice_setlvlmode VAR_RESULT
+ apprentice_3
apprentice_buff 0, APPRENTICE_BUFF_LEVEL
- apprentice_msg TRUE, 3
- call BattleFrontier_BattleTowerLobby_EventScript_2B6E4D
+ apprentice_msg TRUE, APPRENTICE_MSG_THANKS_LVL_MODE
+ call Apprentice_EventScript_Hide
release
releaseall
switch VAR_FACING
- case DIR_NORTH, BattleFrontier_BattleTowerLobby_EventScript_2B6E54
- goto BattleFrontier_BattleTowerLobby_EventScript_2B6E72
+ case DIR_NORTH, Apprentice_EventScript_LeaveNorth
+ goto Apprentice_EventScript_Leave
end
-BattleFrontier_BattleTowerLobby_EventScript_2B69BB: @ 82B69BB
- apprentice_msg FALSE, 1
- goto BattleFrontier_BattleTowerLobby_EventScript_2B6925
+@ Its impossible to fully reject an Apprentice, they just keep asking for you to teach them
+Apprentice_EventScript_RejectTeach: @ 82B69BB
+ apprentice_msg FALSE, APPRENTICE_MSG_REJECT
+ goto Apprentice_EventScript_WhichLvlMode
-BattleFrontier_BattleTowerLobby_EventScript_2B69D3: @ 82B69D3
- setvar VAR_0x8004, APPRENTICE_FUNC_14
- setvar VAR_0x8005, 2
- special CallApprenticeFunction
+Apprentice_EventScript_UseWhichMon: @ 82B69D3
+ apprentice_initquestion APPRENTICE_QUESTION_WHICH_MON
apprentice_buff 0, APPRENTICE_BUFF_SPECIES1
apprentice_buff 1, APPRENTICE_BUFF_SPECIES2
- apprentice_msg FALSE, 6
+ apprentice_msg FALSE, APPRENTICE_MSG_WHICH_MON
apprentice_menu APPRENTICE_ASK_2SPECIES
copyvar VAR_0x8005, VAR_RESULT
compare VAR_0x8005, 0
- call_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6ABA
+ call_if_eq Apprentice_EventScript_ChoseFirstMon
compare VAR_0x8005, 1
- call_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6AC0
- setvar VAR_0x8004, APPRENTICE_FUNC_12
- special CallApprenticeFunction
- copyvar VAR_0x8006, VAR_RESULT
- setvar VAR_0x8004, APPRENTICE_FUNC_13
- special CallApprenticeFunction
- setvar VAR_0x8004, APPRENTICE_FUNC_5
- special CallApprenticeFunction
- setvar VAR_0x8004, APPRENTICE_FUNC_12
- special CallApprenticeFunction
- compare VAR_RESULT, 3
- call_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6AC6
- setvar VAR_0x8004, APPRENTICE_FUNC_16
- setvar VAR_0x8005, 0
- copyvar VAR_0x8006, VAR_0x8007
- special CallApprenticeFunction
- setvar VAR_0x8004, APPRENTICE_FUNC_15
- special CallApprenticeFunction
- apprentice_msg TRUE, 7
- call BattleFrontier_BattleTowerLobby_EventScript_2B6E4D
+ call_if_eq Apprentice_EventScript_ChoseSecondMon
+ apprentice_getnumpartymons
+ apprentice_setpartymon VAR_RESULT
+ apprentice_answeredquestion
+ apprentice_getnumpartymons
+ compare VAR_RESULT, MULTI_PARTY_SIZE
+ call_if_eq Apprentice_EventScript_LastMonSelected
+ apprentice_buffv 0, VAR_0x8007
+ apprentice_freequestion
+ apprentice_msg TRUE, APPRENTICE_MSG_THANKS_MON
+ call Apprentice_EventScript_Hide
release
releaseall
switch VAR_FACING
- case DIR_NORTH, BattleFrontier_BattleTowerLobby_EventScript_2B6E54
- goto BattleFrontier_BattleTowerLobby_EventScript_2B6E72
+ case DIR_NORTH, Apprentice_EventScript_LeaveNorth
+ goto Apprentice_EventScript_Leave
end
-BattleFrontier_BattleTowerLobby_EventScript_2B6ABA: @ 82B6ABA
- setvar VAR_0x8007, 0
+Apprentice_EventScript_ChoseFirstMon: @ 82B6ABA
+ setvar VAR_0x8007, APPRENTICE_BUFF_SPECIES1
return
-BattleFrontier_BattleTowerLobby_EventScript_2B6AC0: @ 82B6AC0
- setvar VAR_0x8007, 1
+Apprentice_EventScript_ChoseSecondMon: @ 82B6AC0
+ setvar VAR_0x8007, APPRENTICE_BUFF_SPECIES2
return
-BattleFrontier_BattleTowerLobby_EventScript_2B6AC6: @ 82B6AC6
+Apprentice_EventScript_LastMonSelected: @ 82B6AC6
setvar VAR_0x8004, APPRENTICE_FUNC_4
special CallApprenticeFunction
return
-BattleFrontier_BattleTowerLobby_EventScript_2B6ACF: @ 82B6ACF
- setvar VAR_0x8004, APPRENTICE_FUNC_14
- setvar VAR_0x8005, 4
- special CallApprenticeFunction
+Apprentice_EventScript_UseWhatHeldItem: @ 82B6ACF
+ apprentice_initquestion APPRENTICE_QUESTION_WHAT_ITEM
apprentice_buff 0, APPRENTICE_BUFF_SPECIES3
- apprentice_msg TRUE, 10
- setvar VAR_0x8004, APPRENTICE_FUNC_15
- special CallApprenticeFunction
-
-BattleFrontier_BattleTowerLobby_EventScript_2B6B09: @ 82B6B09
+ apprentice_msg TRUE, APPRENTICE_MSG_WHAT_HELD_ITEM
+ apprentice_freequestion
+Apprentice_EventScript_ChooseHoldItem: @ 82B6B09
fadescreen 1
setvar VAR_RESULT, 0
- setvar VAR_0x8004, APPRENTICE_FUNC_19
- special CallApprenticeFunction
- waitstate
+ apprentice_openbag
compare VAR_RESULT, 0
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6B81
+ goto_if_eq Apprentice_EventScript_ConfirmHoldNothing
setvar VAR_0x8004, APPRENTICE_FUNC_20
special CallApprenticeFunction
compare VAR_RESULT, FALSE
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6C0C
+ goto_if_eq Apprentice_EventScript_AlreadySuggestedItem
apprentice_buff 0, APPRENTICE_BUFF_ITEM
- apprentice_msg TRUE, 12
- setvar VAR_0x8004, APPRENTICE_FUNC_5
- special CallApprenticeFunction
- call BattleFrontier_BattleTowerLobby_EventScript_2B6E4D
+ apprentice_msg TRUE, APPRENTICE_MSG_THANKS_HELD_ITEM
+ apprentice_answeredquestion
+ call Apprentice_EventScript_Hide
release
releaseall
switch VAR_FACING
- case DIR_NORTH, BattleFrontier_BattleTowerLobby_EventScript_2B6E54
- goto BattleFrontier_BattleTowerLobby_EventScript_2B6E72
+ case DIR_NORTH, Apprentice_EventScript_LeaveNorth
+ goto Apprentice_EventScript_Leave
end
-BattleFrontier_BattleTowerLobby_EventScript_2B6B81: @ 82B6B81
- setvar VAR_0x8004, APPRENTICE_FUNC_14
- setvar VAR_0x8005, 4
- special CallApprenticeFunction
+Apprentice_EventScript_ConfirmHoldNothing: @ 82B6B81
+ apprentice_initquestion APPRENTICE_QUESTION_WHAT_ITEM
apprentice_buff 0, APPRENTICE_BUFF_SPECIES3
- apprentice_msg FALSE, 13
+ apprentice_msg FALSE, APPRENTICE_MSG_HOLD_NOTHING
apprentice_menu APPRENTICE_ASK_GIVE
- setvar VAR_0x8004, 15
- special CallApprenticeFunction
+ apprentice_freequestion
compare VAR_RESULT, 0
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6B09
-
-BattleFrontier_BattleTowerLobby_EventScript_2B6BD4: @ 82B6BD4
- apprentice_msg TRUE, 14
- setvar VAR_0x8004, APPRENTICE_FUNC_5
- special CallApprenticeFunction
- call BattleFrontier_BattleTowerLobby_EventScript_2B6E4D
+ goto_if_eq Apprentice_EventScript_ChooseHoldItem
+Apprentice_EventScript_HoldNothing: @ 82B6BD4
+ apprentice_msg TRUE, APPRENTICE_MSG_THANKS_NO_HELD_ITEM
+ apprentice_answeredquestion
+ call Apprentice_EventScript_Hide
release
releaseall
switch VAR_FACING
- case DIR_NORTH, BattleFrontier_BattleTowerLobby_EventScript_2B6E54
- goto BattleFrontier_BattleTowerLobby_EventScript_2B6E72
+ case DIR_NORTH, Apprentice_EventScript_LeaveNorth
+ goto Apprentice_EventScript_Leave
end
-BattleFrontier_BattleTowerLobby_EventScript_2B6C0C: @ 82B6C0C
- setvar VAR_0x8004, APPRENTICE_FUNC_14
- setvar VAR_0x8005, 4
- special CallApprenticeFunction
+Apprentice_EventScript_AlreadySuggestedItem: @ 82B6C0C
+ apprentice_initquestion APPRENTICE_QUESTION_WHAT_ITEM
apprentice_buff 0, APPRENTICE_BUFF_ITEM
apprentice_buff 1, APPRENTICE_BUFF_SPECIES3
- apprentice_msg FALSE, 16
+ apprentice_msg FALSE, APPRENTICE_MSG_ITEM_ALREADY_SUGGESTED
apprentice_menu APPRENTICE_ASK_GIVE
- setvar VAR_0x8004, 15
- special CallApprenticeFunction
+ apprentice_freequestion
compare VAR_RESULT, 0
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6B09
- goto BattleFrontier_BattleTowerLobby_EventScript_2B6BD4
+ goto_if_eq Apprentice_EventScript_ChooseHoldItem
+ goto Apprentice_EventScript_HoldNothing
end
-BattleFrontier_BattleTowerLobby_EventScript_2B6C77: @ 82B6C77
- setvar VAR_0x8004, APPRENTICE_FUNC_14
- setvar VAR_0x8005, 3
- special CallApprenticeFunction
+Apprentice_EventScript_UseWhichMove: @ 82B6C77
+ apprentice_initquestion APPRENTICE_QUESTION_WHICH_MOVE
apprentice_buff 0, APPRENTICE_BUFF_SPECIES3
apprentice_buff 1, APPRENTICE_BUFF_MOVE1
apprentice_buff 2, APPRENTICE_BUFF_MOVE2
- apprentice_msg FALSE, 8
+ apprentice_msg FALSE, APPRENTICE_MSG_WHICH_MOVE
apprentice_menu APPRENTICE_ASK_MOVES
copyvar VAR_0x8005, VAR_RESULT
compare VAR_0x8005, 0
- call_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6D50
+ call_if_eq Apprentice_EventScript_ChoseFirstMove
compare VAR_0x8005, 1
- call_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6D56
- setvar VAR_0x8004, APPRENTICE_FUNC_17
- special CallApprenticeFunction
- setvar VAR_0x8004, APPRENTICE_FUNC_5
- special CallApprenticeFunction
- setvar VAR_0x8004, APPRENTICE_FUNC_16
- setvar VAR_0x8005, 0
- copyvar VAR_0x8006, VAR_0x8007
- special CallApprenticeFunction
- setvar VAR_0x8004, APPRENTICE_FUNC_15
- special CallApprenticeFunction
- apprentice_msg TRUE, 9
- call BattleFrontier_BattleTowerLobby_EventScript_2B6E4D
+ call_if_eq Apprentice_EventScript_ChoseSecondMove
+ apprentice_setmove
+ apprentice_answeredquestion
+ apprentice_buffv 0, VAR_0x8007
+ apprentice_freequestion
+ apprentice_msg TRUE, APPRENTICE_MSG_THANKS_MOVE
+ call Apprentice_EventScript_Hide
release
releaseall
switch VAR_FACING
- case DIR_NORTH, BattleFrontier_BattleTowerLobby_EventScript_2B6E54
- goto BattleFrontier_BattleTowerLobby_EventScript_2B6E72
+ case DIR_NORTH, Apprentice_EventScript_LeaveNorth
+ goto Apprentice_EventScript_Leave
end
-BattleFrontier_BattleTowerLobby_EventScript_2B6D50: @ 82B6D50
- setvar VAR_0x8007, 3
+Apprentice_EventScript_ChoseFirstMove: @ 82B6D50
+ setvar VAR_0x8007, APPRENTICE_BUFF_MOVE1
return
-BattleFrontier_BattleTowerLobby_EventScript_2B6D56: @ 82B6D56
- setvar VAR_0x8007, 4
+Apprentice_EventScript_ChoseSecondMove: @ 82B6D56
+ setvar VAR_0x8007, APPRENTICE_BUFF_MOVE2
return
-BattleFrontier_BattleTowerLobby_EventScript_2B6D5C: @ 82B6D5C
- apprentice_msg FALSE, 4
+Apprentice_EventScript_PutWhichMonFirst: @ 82B6D5C
+ apprentice_msg FALSE, APPRENTICE_MSG_WHICH_MON_FIRST
apprentice_menu APPRENTICE_ASK_3SPECIES
- copyvar VAR_0x8005, VAR_RESULT
- setvar VAR_0x8004, APPRENTICE_FUNC_18
- special CallApprenticeFunction
- setvar VAR_0x8004, APPRENTICE_FUNC_5
- special CallApprenticeFunction
- apprentice_buff 0, APPRENTICE_BUFF_SPECIES4
- apprentice_msg TRUE, 5
- call BattleFrontier_BattleTowerLobby_EventScript_2B6E4D
+ apprentice_setfirstmon VAR_RESULT
+ apprentice_answeredquestion
+ apprentice_buff 0, APPRENTICE_BUFF_FIRST_MON_SPECIES
+ apprentice_msg TRUE, APPRENTICE_MSG_THANKS_MON_FIRST
+ call Apprentice_EventScript_Hide
release
releaseall
switch VAR_FACING
- case DIR_NORTH, BattleFrontier_BattleTowerLobby_EventScript_2B6E54
- goto BattleFrontier_BattleTowerLobby_EventScript_2B6E72
+ case DIR_NORTH, Apprentice_EventScript_LeaveNorth
+ goto Apprentice_EventScript_Leave
end
-BattleFrontier_BattleTowerLobby_EventScript_2B6DD4: @ 82B6DD4
- apprentice_msg TRUE, 11
+@ Last question, after which the Apprentice leaves (and is saved) to be replaced by another
+Apprentice_EventScript_PickWinSpeech: @ 82B6DD4
+ apprentice_msg TRUE, APPRENTICE_MSG_PICK_WIN_SPEECH
setvar VAR_0x8004, APPRENTICE_FUNC_25
special CallApprenticeFunction
setvar VAR_0x8004, EASY_CHAT_TYPE_APPRENTICE
@@ -272,52 +207,49 @@ BattleFrontier_BattleTowerLobby_EventScript_2B6DD4: @ 82B6DD4
faceplayer
setvar VAR_0x8004, APPRENTICE_FUNC_21
special CallApprenticeFunction
- apprentice_buff 0, APPRENTICE_BUFF_EASY_CHAT
- apprentice_msg TRUE, 15
- setvar VAR_0x8004, APPRENTICE_FUNC_9
- special CallApprenticeFunction
- call BattleFrontier_BattleTowerLobby_EventScript_2B6E4D
+ apprentice_buff 0, APPRENTICE_BUFF_WIN_SPEECH
+ apprentice_msg TRUE, APPRENTICE_MSG_THANKS_WIN_SPEECH
+ apprentice_reset
+ call Apprentice_EventScript_Hide
release
releaseall
switch VAR_FACING
- case DIR_NORTH, BattleFrontier_BattleTowerLobby_EventScript_2B6E54
- goto BattleFrontier_BattleTowerLobby_EventScript_2B6E72
+ case DIR_NORTH, Apprentice_EventScript_LeaveNorth
+ goto Apprentice_EventScript_Leave
end
-BattleFrontier_BattleTowerLobby_EventScript_2B6E4D: @ 82B6E4D
+Apprentice_EventScript_Hide: @ 82B6E4D
setflag FLAG_HIDE_APPRENTICE
setflag FLAG_DAILY_APPRENTICE_LEAVES
return
-BattleFrontier_BattleTowerLobby_EventScript_2B6E54: @ 82B6E54
- setvar VAR_0x8004, APPRENTICE_FUNC_SHOULD_LEAVE
- special CallApprenticeFunction
+Apprentice_EventScript_LeaveNorth: @ 82B6E54
+ apprentice_shouldleave
compare VAR_0x8004, FALSE @ Always TRUE here
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ApprenticeDontMove
- applymovement 6, BattleFrontier_BattleTowerLobby_Movement_2B6E94
+ goto_if_eq Apprentice_EventScript_DontMove
+ applymovement 6, Apprentice_Movement_LeaveNorth
waitmovement 0
end
-BattleFrontier_BattleTowerLobby_EventScript_2B6E72: @ 82B6E72
- setvar VAR_0x8004, APPRENTICE_FUNC_SHOULD_LEAVE
- special CallApprenticeFunction
+Apprentice_EventScript_Leave: @ 82B6E72
+ apprentice_shouldleave
compare VAR_0x8004, FALSE @ Always TRUE here
- goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ApprenticeDontMove
- applymovement 6, BattleFrontier_BattleTowerLobby_Movement_2B6E95
+ goto_if_eq Apprentice_EventScript_DontMove
+ applymovement 6, Apprentice_Movement_Leave
waitmovement 0
end
-BattleFrontier_BattleTowerLobby_EventScript_2B6E90: @ 82B6E90
+Apprentice_EventScript_Gone: @ 82B6E90
release
releaseall
end
-BattleFrontier_BattleTowerLobby_EventScript_ApprenticeDontMove: @ 82B6E93
+Apprentice_EventScript_DontMove: @ 82B6E93
end
-BattleFrontier_BattleTowerLobby_Movement_2B6E94: @ 82B6E94
+Apprentice_Movement_LeaveNorth: @ 82B6E94
walk_fast_right
-BattleFrontier_BattleTowerLobby_Movement_2B6E95: @ 82B6E95
+Apprentice_Movement_Leave: @ 82B6E95
walk_fast_down
walk_fast_down
walk_fast_right
diff --git a/data/text/apprentice.inc b/data/text/apprentice.inc
index 8ef0d4f2f..7d5bab198 100644
--- a/data/text/apprentice.inc
+++ b/data/text/apprentice.inc
@@ -62,7 +62,7 @@ gText_ApprenticeChallenge15:: @ 82B71F9
.string "I am {STR_VAR_1}'s no. {STR_VAR_2} apprentice,\n"
.string "and that's no lie.$"
-gText_ApprenticeIntro0:: @ 82B7229
+gText_ApprenticePleaseTeach0:: @ 82B7229
.string "Are you… {PLAYER}?\n"
.string "Oh! Sniff…sob…\p"
.string "Oh! S-sorry…\n"
@@ -100,7 +100,7 @@ gText_ApprenticeLevelModeThanks0:: @ 82B7423
.string "Thank you so much!\l"
.string "Please talk with me again!$"
-gText_ApprenticeIntro1:: @ 82B74C1
+gText_ApprenticePleaseTeach1:: @ 82B74C1
.string "Wowee! You're {PLAYER}, aren't you?\n"
.string "You're awesomely strong, aren't you?\p"
.string "I'm {STR_VAR_1}!\n"
@@ -127,7 +127,7 @@ gText_ApprenticeLevelModeThanks1:: @ 82B763F
.string "If we meet here again, please teach\n"
.string "me something else, teacher!$"
-gText_ApprenticeIntro2:: @ 82B76AC
+gText_ApprenticePleaseTeach2:: @ 82B76AC
.string "Um… Are you {PLAYER}?\n"
.string "My name is {STR_VAR_1}.\p"
.string "I want to become a POKéMON TRAINER,\n"
@@ -156,7 +156,7 @@ gText_ApprenticeLevelModeThanks2:: @ 82B7871
.string "If I have another question, I'll come\n"
.string "back here for your advice!$"
-gText_ApprenticeIntro3:: @ 82B78D4
+gText_ApprenticePleaseTeach3:: @ 82B78D4
.string "Oh? Huh? You're…\n"
.string "No, that can't be true.\p"
.string "There isn't any way that someone\n"
@@ -211,7 +211,7 @@ gText_ApprenticeLevelModeThanks3:: @ 82B7D18
.string "Thank you very much for spending\n"
.string "time with someone like me.$"
-gText_ApprenticeIntro4:: @ 82B7DD4
+gText_ApprenticePleaseTeach4:: @ 82B7DD4
.string "Oh! You're {PLAYER}{KUN}, aren't you?\p"
.string "I've heard that you're tough at\n"
.string "POKéMON!\p"
@@ -246,7 +246,7 @@ gText_ApprenticeLevelModeThanks4:: @ 82B7FE8
.string "Okay, I'll look to you for advice again.\n"
.string "Bye!$"
-gText_ApprenticeIntro5:: @ 82B8087
+gText_ApprenticePleaseTeach5:: @ 82B8087
.string "Oh, hi, there! {PLAYER}{KUN}!\n"
.string "I know you because you're famous!\l"
.string "Call me {STR_VAR_1}! Glad to meet you!\p"
@@ -282,7 +282,7 @@ gText_ApprenticeLevelModeThanks5:: @ 82B8356
.string "…Whoops, I'd better go to work!\n"
.string "Thanks! See you around!$"
-gText_ApprenticeIntro6:: @ 82B83CE
+gText_ApprenticePleaseTeach6:: @ 82B83CE
.string "No way! Uh-uh!\n"
.string "Are you maybe the real {PLAYER}?\p"
.string "A-hah! Awesome! I'm {STR_VAR_1},\n"
@@ -322,7 +322,7 @@ gText_ApprenticeLevelModeThanks6:: @ 82B8656
.string "Let's meet here again, okay?\n"
.string "Thanks!$"
-gText_ApprenticeIntro7:: @ 82B86EA
+gText_ApprenticePleaseTeach7:: @ 82B86EA
.string "I beg your pardon, but…\n"
.string "Are you {PLAYER}?\p"
.string "I'm {STR_VAR_1}, and I am delighted to\n"
@@ -361,7 +361,7 @@ gText_ApprenticeLevelModeThanks7:: @ 82B8957
.string "I hope I can count on you again.\l"
.string "Please take care!$"
-gText_ApprenticeIntro8:: @ 82B89C6
+gText_ApprenticePleaseTeach8:: @ 82B89C6
.string "Eek! Eek! {PLAYER}!\n"
.string "You spoke to me!\l"
.string "I… I'm overjoyed!\p"
@@ -398,7 +398,7 @@ gText_ApprenticeLevelModeThanks8:: @ 82B8C20
.string "I hope you'll be willing to teach me\n"
.string "some more another time.$"
-gText_ApprenticeIntro9:: @ 82B8CAA
+gText_ApprenticePleaseTeach9:: @ 82B8CAA
.string "Whoa! Could you be…\n"
.string "Might you be… {PLAYER}{KUN}?!\l"
.string "That strong and famous TRAINER?\l"
@@ -432,7 +432,7 @@ gText_ApprenticeLevelModeThanks9:: @ 82B8ED5
.string "All right, I'll look to you as my mentor!\n"
.string "Adios!$"
-gText_ApprenticeIntro10:: @ 82B8F45
+gText_ApprenticePleaseTeach10:: @ 82B8F45
.string "Oh, hey, {PLAYER}{KUN}, right?\n"
.string "The police were looking for you!\p"
.string "… … …\n"
@@ -473,7 +473,7 @@ gText_ApprenticeLevelModeThanks10:: @ 82B9204
.string "Thanks, master!\n"
.string "I hope you'll keep teaching me!$"
-gText_ApprenticeIntro11:: @ 82B929C
+gText_ApprenticePleaseTeach11:: @ 82B929C
.string "A-H-O-Y!\n"
.string "And that spells ahoy, and it means hi!\p"
.string "I'm {STR_VAR_1}, the rappin' SAILOR\n"
@@ -513,7 +513,7 @@ gText_ApprenticeLevelModeThanks11:: @ 82B9564
.string "If it's advice I ever need,\n"
.string "{PLAYER}, your word I'll always heed!$"
-gText_ApprenticeIntro12:: @ 82B95D8
+gText_ApprenticePleaseTeach12:: @ 82B95D8
.string "Say, hey, aren't you {PLAYER}?\n"
.string "What should I do? Talk to you?\l"
.string "Why not? I'm already talking to you!\p"
@@ -550,7 +550,7 @@ gText_ApprenticeLevelModeThanks12:: @ 82B989A
.string "but don't you forget about me.\p"
.string "See you again, my smart friend!$"
-gText_ApprenticeIntro13:: @ 82B992D
+gText_ApprenticePleaseTeach13:: @ 82B992D
.string "Oh, hi! You there!\n"
.string "Can I get you to massage my shoulder?\p"
.string "…Yes, there! That's it!\n"
@@ -584,7 +584,7 @@ gText_ApprenticeLevelModeThanks13:: @ 82B9B76
.string "I hope I can keep hitting you up for\n"
.string "help--after all, you're my mentor!$"
-gText_ApprenticeIntro14:: @ 82B9BF2
+gText_ApprenticePleaseTeach14:: @ 82B9BF2
.string "Er… Um…\n"
.string "{PLAYER}{KUN}…?\p"
.string "Please, don't look at me that way.\n"
@@ -625,7 +625,7 @@ gText_ApprenticeLevelModeThanks14:: @ 82B9EAA
.string "If we meet again, I hope you will be\l"
.string "as helpful.$"
-gText_ApprenticeIntro15:: @ 82B9F55
+gText_ApprenticePleaseTeach15:: @ 82B9F55
.string "Hm? You appear to be {PLAYER}{KUN}…\n"
.string "But are you really real?\p"
.string "You may call me {STR_VAR_1}.\p"
@@ -677,12 +677,12 @@ gText_ApprenticeHoldNothing0:: @ 82BA34E
.string "Oh, really? I shouldn't make\n"
.string "my {STR_VAR_1} hold anything?$"
-gText_ApprenticeThanksHeldItem0:: @ 82BA380
+gText_ApprenticeThanksNoHeldItem0:: @ 82BA380
.string "Oh, okay! I'm delighted it's settled!\n"
.string "Awesome! Wicked! Awoooh!\p"
.string "Thank you so much!$"
-gText_ApprenticeThanksHaveHeldItem0:: @ 82BA3D2
+gText_ApprenticeThanksHeldItem0:: @ 82BA3D2
.string "Oh, I'm so glad…\n"
.string "I think I have that {STR_VAR_1}, too.\p"
.string "I'm delighted it's settled!\n"
@@ -709,11 +709,11 @@ gText_ApprenticeHoldNothing1:: @ 82BA58C
.string "Huh? You mean my {STR_VAR_1} doesn't\n"
.string "have to hold anything?$"
-gText_ApprenticeThanksHeldItem1:: @ 82BA5BF
+gText_ApprenticeThanksNoHeldItem1:: @ 82BA5BF
.string "Oh, I get it! I'll do that!\n"
.string "Thanks for teaching me!$"
-gText_ApprenticeThanksHaveHeldItem1:: @ 82BA5F3
+gText_ApprenticeThanksHeldItem1:: @ 82BA5F3
.string "Oh, wow! One {STR_VAR_1}, huh?\n"
.string "Okay, I'll do that!\p"
.string "Thanks for teaching me!$"
@@ -735,11 +735,11 @@ gText_ApprenticeHoldNothing2:: @ 82BA742
.string "Oh, then my {STR_VAR_1} doesn't have\n"
.string "to hold anything?$"
-gText_ApprenticeThanksHeldItem2:: @ 82BA770
+gText_ApprenticeThanksNoHeldItem2:: @ 82BA770
.string "Okay, I got it!\n"
.string "See you again!$"
-gText_ApprenticeThanksHaveHeldItem2:: @ 82BA78F
+gText_ApprenticeThanksHeldItem2:: @ 82BA78F
.string "Oh, the item {STR_VAR_1}?\n"
.string "Understood!\p"
.string "I'll do my best to find one!\n"
@@ -768,13 +768,13 @@ gText_ApprenticeHoldNothing3:: @ 82BA96B
.string "A POKéMON belonging to someone like me\n"
.string "would be better off without an item?$"
-gText_ApprenticeThanksHeldItem3:: @ 82BA9B7
+gText_ApprenticeThanksNoHeldItem3:: @ 82BA9B7
.string "I understand…\n"
.string "You're saying I shouldn't rely on items.\l"
.string "I'll do my best not to!\p"
.string "Thank you very much!$"
-gText_ApprenticeThanksHaveHeldItem3:: @ 82BAA1B
+gText_ApprenticeThanksHeldItem3:: @ 82BAA1B
.string "The item {STR_VAR_1}, okay.\n"
.string "I'm not sure if I can get one…\l"
.string "No! I'll do my best to get it.\p"
@@ -804,7 +804,7 @@ gText_ApprenticeHoldNothing4:: @ 82BAC43
.string "Oh! So my {STR_VAR_1} should do\n"
.string "the best it can empty-handed?$"
-gText_ApprenticeThanksHeldItem4:: @ 82BAC78
+gText_ApprenticeThanksNoHeldItem4:: @ 82BAC78
.string "If you think that's best, I'll do that.\p"
.string "Knowing that you made the decision,\n"
.string "{PLAYER}{KUN}, I won't be so upset if\l"
@@ -812,7 +812,7 @@ gText_ApprenticeThanksHeldItem4:: @ 82BAC78
.string "Okay, I'll look to you for advice again.\n"
.string "Bye!$"
-gText_ApprenticeThanksHaveHeldItem4:: @ 82BAD17
+gText_ApprenticeThanksHeldItem4:: @ 82BAD17
.string "The item {STR_VAR_1}, huh?\n"
.string "Not bad. I'll use it!\p"
.string "Knowing that you made the decision,\n"
@@ -844,13 +844,13 @@ gText_ApprenticeHoldNothing5:: @ 82BAF4E
.string "Oh, so me being a busy guy, you say\n"
.string "my {STR_VAR_1} doesn't need anything?$"
-gText_ApprenticeThanksHeldItem5:: @ 82BAF8F
+gText_ApprenticeThanksNoHeldItem5:: @ 82BAF8F
.string "Okay, gotcha.\n"
.string "I won't need any time for that.\p"
.string "Thanks today!\n"
.string "See you around!$"
-gText_ApprenticeThanksHaveHeldItem5:: @ 82BAFDB
+gText_ApprenticeThanksHeldItem5:: @ 82BAFDB
.string "Okay, gotcha.\n"
.string "I'll find time somehow and find\l"
.string "that {STR_VAR_1} you recommended.\p"
@@ -877,14 +877,14 @@ gText_ApprenticeHoldNothing6:: @ 82BB18C
.string "Is that right? My {STR_VAR_1} doesn't\n"
.string "need to hold an item, you're saying.$"
-gText_ApprenticeThanksHeldItem6:: @ 82BB1CE
+gText_ApprenticeThanksNoHeldItem6:: @ 82BB1CE
.string "Okay, that's what I'll do!\p"
.string "I guess that's about all I wanted\n"
.string "to ask you today.\p"
.string "Let's meet here again, okay?\n"
.string "Thanks!$"
-gText_ApprenticeThanksHaveHeldItem6:: @ 82BB242
+gText_ApprenticeThanksHeldItem6:: @ 82BB242
.string "Uh-huh! One {STR_VAR_1}.\n"
.string "What a cool choice!\l"
.string "I'll definitely try that!\p"
@@ -919,14 +919,14 @@ gText_ApprenticeHoldNothing7:: @ 82BB4C3
.string "In other words… My POKéMON has\n"
.string "no need to hold an item?$"
-gText_ApprenticeThanksHeldItem7:: @ 82BB4FB
+gText_ApprenticeThanksNoHeldItem7:: @ 82BB4FB
.string "I understand clearly now!\n"
.string "I will keep trying like this.\p"
.string "Thank you, {PLAYER}.\n"
.string "I hope I can count on you again.\l"
.string "Please take care!$"
-gText_ApprenticeThanksHaveHeldItem7:: @ 82BB575
+gText_ApprenticeThanksHeldItem7:: @ 82BB575
.string "One {STR_VAR_1} it is!\n"
.string "I will order it right away.\p"
.string "Thank you, {PLAYER}.\n"
@@ -951,13 +951,13 @@ gText_ApprenticeHoldNothing8:: @ 82BB6E5
.string "Oh, wow! I didn't expect that answer!\n"
.string "So, a hold item isn't necessary?$"
-gText_ApprenticeThanksHeldItem8:: @ 82BB72C
+gText_ApprenticeThanksNoHeldItem8:: @ 82BB72C
.string "Perfectly understood!\n"
.string "I'll keep at this without an item!\p"
.string "I hope you'll be willing to teach me\n"
.string "some more another time.$"
-gText_ApprenticeThanksHaveHeldItem8:: @ 82BB7A2
+gText_ApprenticeThanksHeldItem8:: @ 82BB7A2
.string "{STR_VAR_1}! I'll use that!\p"
.string "Um… Could it be, {PLAYER}, you also\n"
.string "make your POKéMON hold that item?\p"
@@ -986,13 +986,13 @@ gText_ApprenticeHoldNothing9:: @ 82BB970
.string "Oh? So, you're saying my {STR_VAR_1}\n"
.string "can win without holding any item?$"
-gText_ApprenticeThanksHeldItem9:: @ 82BB9AE
+gText_ApprenticeThanksNoHeldItem9:: @ 82BB9AE
.string "Si, bueno!\n"
.string "I'll give it my best shot, like, slam!\p"
.string "All right, thanks, as always!\n"
.string "Adios!$"
-gText_ApprenticeThanksHaveHeldItem9:: @ 82BBA05
+gText_ApprenticeThanksHeldItem9:: @ 82BBA05
.string "Uh-huh, that's one {STR_VAR_1}?\n"
.string "Si, bueno!\l"
.string "I'll go find me one, like, bam!\p"
@@ -1023,7 +1023,7 @@ gText_ApprenticeHoldNothing10:: @ 82BBC1C
.string "What's that mean?\n"
.string "Don't make it hold anything?$"
-gText_ApprenticeThanksHeldItem10:: @ 82BBC4B
+gText_ApprenticeThanksNoHeldItem10:: @ 82BBC4B
.string "Okay, so it shouldn't hold anything.\n"
.string "Then, I'd better get something for it!\p"
.string "Just kidding!\n"
@@ -1031,7 +1031,7 @@ gText_ApprenticeThanksHeldItem10:: @ 82BBC4B
.string "Thanks, master!\n"
.string "I hope you'll keep teaching me!$"
-gText_ApprenticeThanksHaveHeldItem10:: @ 82BBCF6
+gText_ApprenticeThanksHeldItem10:: @ 82BBCF6
.string "Okay, so it's one {STR_VAR_1}!\n"
.string "I'll make it hold anything but that!\p"
.string "Just kidding!\n"
@@ -1062,13 +1062,13 @@ gText_ApprenticeHoldNothing11:: @ 82BBEE5
.string "My {STR_VAR_1} doesn't need to be\l"
.string "holding anything tight?$"
-gText_ApprenticeThanksHeldItem11:: @ 82BBF25
+gText_ApprenticeThanksNoHeldItem11:: @ 82BBF25
.string "Okay, I hear you, sure I do!\n"
.string "My POKéMON will go empty-handed, too!\p"
.string "If it's advice I ever need,\n"
.string "{PLAYER}, your word I'll always heed!$"
-gText_ApprenticeThanksHaveHeldItem11:: @ 82BBFA4
+gText_ApprenticeThanksHeldItem11:: @ 82BBFA4
.string "Okay, one {STR_VAR_1},\n"
.string "that's what I'll use.\l"
.string "I was right to make you choose!\p"
@@ -1101,14 +1101,14 @@ gText_ApprenticeHoldNothing12:: @ 82BC213
.string "My {STR_VAR_1} needs nothing?\n"
.string "Doesn't need to hold anything?$"
-gText_ApprenticeThanksHeldItem12:: @ 82BC247
+gText_ApprenticeThanksNoHeldItem12:: @ 82BC247
.string "If holding nothing is the best,\n"
.string "I'll do as you suggest!\p"
.string "Well, {PLAYER}, I have to roam free,\n"
.string "but don't you forget about me.\p"
.string "See you again, my smart friend!$"
-gText_ApprenticeThanksHaveHeldItem12:: @ 82BC2DD
+gText_ApprenticeThanksHeldItem12:: @ 82BC2DD
.string "If holding that {STR_VAR_1} is\n"
.string "the best, I'll do as you suggest!\p"
.string "Well, {PLAYER}, I have to roam free,\n"
@@ -1139,13 +1139,13 @@ gText_ApprenticeHoldNothing13:: @ 82BC514
.string "So your suggestion is my {STR_VAR_1}\n"
.string "doesn't have to hold anything?$"
-gText_ApprenticeThanksHeldItem13:: @ 82BC555
+gText_ApprenticeThanksNoHeldItem13:: @ 82BC555
.string "Hm, all right. That would be easier\n"
.string "for me, the way things are now.\p"
.string "I hope I can keep hitting you up\n"
.string "for help like this.$"
-gText_ApprenticeThanksHaveHeldItem13:: @ 82BC5CE
+gText_ApprenticeThanksHeldItem13:: @ 82BC5CE
.string "Hm, all right. That's one {STR_VAR_1}.\n"
.string "My POKéMON's arm is fine, so I'll make\l"
.string "it hold that item right away.\p"
@@ -1177,7 +1177,7 @@ gText_ApprenticeHoldNothing14:: @ 82BC808
.string "Oh… Then, you think it would be better\n"
.string "if my {STR_VAR_1} didn't have an item?$"
-gText_ApprenticeThanksHeldItem14:: @ 82BC84D
+gText_ApprenticeThanksNoHeldItem14:: @ 82BC84D
.string "Oh… Okay!\n"
.string "I'll go without an item.\p"
.string "This is nerve-racking, though.\n"
@@ -1186,7 +1186,7 @@ gText_ApprenticeThanksHeldItem14:: @ 82BC84D
.string "If we meet again, I hope you will be\l"
.string "as helpful.$"
-gText_ApprenticeThanksHaveHeldItem14:: @ 82BC8EA
+gText_ApprenticeThanksHeldItem14:: @ 82BC8EA
.string "Oh… Okay!\n"
.string "I'll go with that {STR_VAR_1}.\p"
.string "This is nerve-racking, though.\n"
@@ -1220,12 +1220,12 @@ gText_ApprenticeHoldNothing15:: @ 82BCB75
.string "It's better if it held nothing?\n"
.string "Are you certain?$"
-gText_ApprenticeThanksHeldItem15:: @ 82BCBA6
+gText_ApprenticeThanksNoHeldItem15:: @ 82BCBA6
.string "I see. If that's the case, that's fine.\n"
.string "I thank you for your time.\p"
.string "Let us meet again!$"
-gText_ApprenticeThanksHaveHeldItem15:: @ 82BCBFC
+gText_ApprenticeThanksHeldItem15:: @ 82BCBFC
.string "One {STR_VAR_1}?\n"
.string "Are you certain?\p"
.string "I see. If that's the case, that's fine.\n"
diff --git a/include/apprentice.h b/include/apprentice.h
index ac7dff886..44329b677 100644
--- a/include/apprentice.h
+++ b/include/apprentice.h
@@ -10,7 +10,7 @@ struct ApprenticeTrainer
u8 facilityClass;
u16 species[APPRENTICE_SPECIES_COUNT];
u8 id;
- u16 easyChatWords[6];
+ u16 speechLost[EASY_CHAT_BATTLE_WORDS_COUNT];
};
extern const struct ApprenticeTrainer gApprentices[];
diff --git a/include/constants/apprentice.h b/include/constants/apprentice.h
index 61f257767..87b7b12f5 100644
--- a/include/constants/apprentice.h
+++ b/include/constants/apprentice.h
@@ -7,33 +7,57 @@
#define APPRENTICE_LVL_MODE_50 (FRONTIER_LVL_50 + 1)
#define APPRENTICE_LVL_MODE_OPEN (FRONTIER_LVL_OPEN + 1)
-#define APPRENTICE_FUNC_0 0
-#define APPRENTICE_FUNC_1 1
-#define APPRENTICE_FUNC_2 2
+#define APPRENTICE_FUNC_GAVE_LVLMODE 0
+#define APPRENTICE_FUNC_SET_LVLMODE 1
+#define APPRENTICE_FUNC_SET_ID 2
#define APPRENTICE_FUNC_3 3
#define APPRENTICE_FUNC_4 4
-#define APPRENTICE_FUNC_5 5
+#define APPRENTICE_FUNC_ANSWERED_QUESTION 5
#define APPRENTICE_FUNC_6 6
#define APPRENTICE_FUNC_MENU 7
#define APPRENTICE_FUNC_PRINT_MSG 8
-#define APPRENTICE_FUNC_9 9
-#define APPRENTICE_FUNC_SET_TRUE_1 10
-#define APPRENTICE_FUNC_11 11
-#define APPRENTICE_FUNC_12 12
-#define APPRENTICE_FUNC_13 13
-#define APPRENTICE_FUNC_14 14
-#define APPRENTICE_FUNC_15 15
-#define APPRENTICE_FUNC_16 16
-#define APPRENTICE_FUNC_17 17
-#define APPRENTICE_FUNC_18 18
-#define APPRENTICE_FUNC_19 19
+#define APPRENTICE_FUNC_RESET 9
+#define APPRENTICE_FUNC_CHECK_GONE 10
+#define APPRENTICE_FUNC_GET_QUESTION 11
+#define APPRENTICE_FUNC_GET_NUM_PARTY_MONS 12
+#define APPRENTICE_FUNC_SET_PARTY_MON 13
+#define APPRENTICE_FUNC_INIT_QUESTION_DATA 14
+#define APPRENTICE_FUNC_FREE_QUESTION_DATA 15
+#define APPRENTICE_FUNC_BUFFER_STRING 16
+#define APPRENTICE_FUNC_SET_MOVE 17
+#define APPRENTICE_FUNC_SET_FIRST_MON 18
+#define APPRENTICE_FUNC_OPEN_BAG 19
#define APPRENTICE_FUNC_20 20
#define APPRENTICE_FUNC_21 21
-#define APPRENTICE_FUNC_22 22
-#define APPRENTICE_FUNC_23 23
-#define APPRENTICE_FUNC_24 24
+#define APPRENTICE_FUNC_SET_GFX_SAVED 22
+#define APPRENTICE_FUNC_SET_GFX 23
+#define APPRENTICE_FUNC_SHOULD_LEAVE 24
#define APPRENTICE_FUNC_25 25
+#define APPRENTICE_MSG_PLEASE_TEACH 0
+#define APPRENTICE_MSG_REJECT 1
+#define APPRENTICE_MSG_WHICH_LVL_MODE 2
+#define APPRENTICE_MSG_THANKS_LVL_MODE 3
+#define APPRENTICE_MSG_WHICH_MON_FIRST 4
+#define APPRENTICE_MSG_THANKS_MON_FIRST 5
+#define APPRENTICE_MSG_WHICH_MON 6
+#define APPRENTICE_MSG_THANKS_MON 7
+#define APPRENTICE_MSG_WHICH_MOVE 8
+#define APPRENTICE_MSG_THANKS_MOVE 9
+#define APPRENTICE_MSG_WHAT_HELD_ITEM 10
+#define APPRENTICE_MSG_PICK_WIN_SPEECH 11
+#define APPRENTICE_MSG_THANKS_HELD_ITEM 12
+#define APPRENTICE_MSG_HOLD_NOTHING 13
+#define APPRENTICE_MSG_THANKS_NO_HELD_ITEM 14
+#define APPRENTICE_MSG_THANKS_WIN_SPEECH 15
+#define APPRENTICE_MSG_ITEM_ALREADY_SUGGESTED 16
+
+#define APPRENTICE_QUESTION_WHICH_FIRST 1
+#define APPRENTICE_QUESTION_WHICH_MON 2
+#define APPRENTICE_QUESTION_WHICH_MOVE 3
+#define APPRENTICE_QUESTION_WHAT_ITEM 4
+#define APPRENTICE_QUESTION_WIN_SPEECH 5
+
#define APPRENTICE_ASK_WHICH_LEVEL 0
#define APPRENTICE_ASK_3SPECIES 1
#define APPRENTICE_ASK_2SPECIES 2
@@ -48,8 +72,8 @@
#define APPRENTICE_BUFF_MOVE2 4
#define APPRENTICE_BUFF_ITEM 5
#define APPRENTICE_BUFF_NAME 6
-#define APPRENTICE_BUFF_EASY_CHAT 7
+#define APPRENTICE_BUFF_WIN_SPEECH 7
#define APPRENTICE_BUFF_LEVEL 8
-#define APPRENTICE_BUFF_SPECIES4 9
+#define APPRENTICE_BUFF_FIRST_MON_SPECIES 9
#endif // GUARD_CONSTANTS_APPRENTICE_H
diff --git a/include/global.h b/include/global.h
index f067f5bbc..c00d71d8f 100644
--- a/include/global.h
+++ b/include/global.h
@@ -223,7 +223,7 @@ struct Apprentice
u8 field_1;
u8 number;
struct ApprenticeMon party[MULTI_PARTY_SIZE];
- u16 easyChatWords[EASY_CHAT_BATTLE_WORDS_COUNT];
+ u16 speechWon[EASY_CHAT_BATTLE_WORDS_COUNT];
u8 playerId[TRAINER_ID_LENGTH];
u8 playerName[PLAYER_NAME_LENGTH];
u8 language;
@@ -415,9 +415,9 @@ struct Sav2_B8
struct PlayersApprentice
{
/*0xB0*/ u8 id;
- /*0xB1*/ u8 lvlMode:2; //0: Unassigned, 1: Lv 50, 2: Open Lv
- /*0xB1*/ u8 field_B1_1:4;
- /*0xB1*/ u8 field_B1_2:2;
+ /*0xB1*/ u8 lvlMode:2; //0: Unassigned, 1: Lv 50, 2: Open Lv
+ /*0xB1*/ u8 questionsAnswered:4;
+ /*0xB1*/ u8 firstMonId:2;
/*0xB2*/ u8 field_B2_0:3;
/*0xB2*/ u8 field_B2_1:2;
/*0xB3*/ u8 field_B3;
diff --git a/include/item_menu.h b/include/item_menu.h
index a21a6da4f..508f94815 100644
--- a/include/item_menu.h
+++ b/include/item_menu.h
@@ -71,7 +71,7 @@ extern u16 gSpecialVar_ItemId;
void sub_81AAC14(void);
void FavorLadyOpenBagMenu(void);
void QuizLadyOpenBagMenu(void);
-void sub_81AAC28(void);
+void ApprenticeOpenBagMenu(void);
void sub_81AABB0(void);
void SetInitialScrollAndCursorPositions(u8 pocketId);
void bag_menu_mail_related(void);
diff --git a/src/apprentice.c b/src/apprentice.c
index a1b77ca40..03194ef6d 100644
--- a/src/apprentice.c
+++ b/src/apprentice.c
@@ -36,35 +36,35 @@
struct Unk030062ECStruct
{
u8 unk0;
- u16 unk2[MULTI_PARTY_SIZE][5];
- u8 unk20[3][5];
+ u16 unkA[MULTI_PARTY_SIZE][5];
+ u8 unkB[3][5];
};
struct Unk030062F0Struct
{
u16 unk0;
- u16 unk2;
+ u16 unkX;
u16 unk4;
u16 unk6;
};
// data/text/apprentice.inc
-extern const u8 gText_ApprenticeIntro0[];
-extern const u8 gText_ApprenticeIntro1[];
-extern const u8 gText_ApprenticeIntro2[];
-extern const u8 gText_ApprenticeIntro3[];
-extern const u8 gText_ApprenticeIntro4[];
-extern const u8 gText_ApprenticeIntro5[];
-extern const u8 gText_ApprenticeIntro6[];
-extern const u8 gText_ApprenticeIntro7[];
-extern const u8 gText_ApprenticeIntro8[];
-extern const u8 gText_ApprenticeIntro9[];
-extern const u8 gText_ApprenticeIntro10[];
-extern const u8 gText_ApprenticeIntro11[];
-extern const u8 gText_ApprenticeIntro12[];
-extern const u8 gText_ApprenticeIntro13[];
-extern const u8 gText_ApprenticeIntro14[];
-extern const u8 gText_ApprenticeIntro15[];
+extern const u8 gText_ApprenticePleaseTeach0[];
+extern const u8 gText_ApprenticePleaseTeach1[];
+extern const u8 gText_ApprenticePleaseTeach2[];
+extern const u8 gText_ApprenticePleaseTeach3[];
+extern const u8 gText_ApprenticePleaseTeach4[];
+extern const u8 gText_ApprenticePleaseTeach5[];
+extern const u8 gText_ApprenticePleaseTeach6[];
+extern const u8 gText_ApprenticePleaseTeach7[];
+extern const u8 gText_ApprenticePleaseTeach8[];
+extern const u8 gText_ApprenticePleaseTeach9[];
+extern const u8 gText_ApprenticePleaseTeach10[];
+extern const u8 gText_ApprenticePleaseTeach11[];
+extern const u8 gText_ApprenticePleaseTeach12[];
+extern const u8 gText_ApprenticePleaseTeach13[];
+extern const u8 gText_ApprenticePleaseTeach14[];
+extern const u8 gText_ApprenticePleaseTeach15[];
extern const u8 gText_ApprenticeRejectTeaching0[];
extern const u8 gText_ApprenticeRejectTeaching1[];
extern const u8 gText_ApprenticeRejectTeaching2[];
@@ -179,6 +179,22 @@ extern const u8 gText_ApprenticeHoldNothing12[];
extern const u8 gText_ApprenticeHoldNothing13[];
extern const u8 gText_ApprenticeHoldNothing14[];
extern const u8 gText_ApprenticeHoldNothing15[];
+extern const u8 gText_ApprenticeThanksNoHeldItem0[];
+extern const u8 gText_ApprenticeThanksNoHeldItem1[];
+extern const u8 gText_ApprenticeThanksNoHeldItem2[];
+extern const u8 gText_ApprenticeThanksNoHeldItem3[];
+extern const u8 gText_ApprenticeThanksNoHeldItem4[];
+extern const u8 gText_ApprenticeThanksNoHeldItem5[];
+extern const u8 gText_ApprenticeThanksNoHeldItem6[];
+extern const u8 gText_ApprenticeThanksNoHeldItem7[];
+extern const u8 gText_ApprenticeThanksNoHeldItem8[];
+extern const u8 gText_ApprenticeThanksNoHeldItem9[];
+extern const u8 gText_ApprenticeThanksNoHeldItem10[];
+extern const u8 gText_ApprenticeThanksNoHeldItem11[];
+extern const u8 gText_ApprenticeThanksNoHeldItem12[];
+extern const u8 gText_ApprenticeThanksNoHeldItem13[];
+extern const u8 gText_ApprenticeThanksNoHeldItem14[];
+extern const u8 gText_ApprenticeThanksNoHeldItem15[];
extern const u8 gText_ApprenticeThanksHeldItem0[];
extern const u8 gText_ApprenticeThanksHeldItem1[];
extern const u8 gText_ApprenticeThanksHeldItem2[];
@@ -195,22 +211,6 @@ extern const u8 gText_ApprenticeThanksHeldItem12[];
extern const u8 gText_ApprenticeThanksHeldItem13[];
extern const u8 gText_ApprenticeThanksHeldItem14[];
extern const u8 gText_ApprenticeThanksHeldItem15[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem0[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem1[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem2[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem3[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem4[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem5[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem6[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem7[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem8[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem9[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem10[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem11[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem12[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem13[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem14[];
-extern const u8 gText_ApprenticeThanksHaveHeldItem15[];
extern const u8 gText_ApprenticeItemAlreadyRecommended0[];
extern const u8 gText_ApprenticeItemAlreadyRecommended1[];
extern const u8 gText_ApprenticeItemAlreadyRecommended2[];
@@ -359,28 +359,28 @@ static void ExecuteFuncAfterButtonPress(void (*func)(void));
static void Script_GivenApprenticeLvlMode(void);
static void Script_SetApprenticeLvlMode(void);
-static void sub_81A0978(void);
+static void Script_SetApprenticeId(void);
static void sub_819FC60(void);
static void sub_81A0984(void);
-static void sub_81A0990(void);
+static void IncrementQuestionsAnswered(void);
static void sub_81A09D0(void);
static void Script_CreateApprenticeMenu(void);
static void Script_PrintApprenticeMessage(void);
static void Script_ResetPlayerApprentice(void);
-static void SetVar0x8004True1(void);
-static void sub_81A0CC0(void);
-static void sub_81A09B4(void);
-static void sub_81A0D40(void);
-static void sub_81A0DD4(void);
-static void sub_81A0FE4(void);
+static void GetShouldCheckApprenticeGone(void);
+static void ApprenticeGetQuestion(void);
+static void GetNumApprenticePartyMonsSelected(void);
+static void SetApprenticePartyMon(void);
+static void InitApprenticeQuestionData(void);
+static void FreeApprenticeQuestionData(void);
static void ApprenticeBufferString(void);
-static void sub_81A0D80(void);
-static void sub_81A11F8(void);
-static void sub_81A1218(void);
+static void SetApprenticeMonMove(void);
+static void SetFirstApprenticeMon(void);
+static void Script_ApprenticeOpenBagMenu(void);
static void sub_81A1224(void);
static void sub_81A1438(void);
-static void sub_81A150C(void);
-static void Script_SetPlayerApprenticeTrainerGfxId(void);
+static void SetSavedApprenticeTrainerGfxId(void);
+static void SetPlayerApprenticeTrainerGfxId(void);
static void GetShouldApprenticeLeave(void);
static void sub_81A1370(void);
@@ -394,7 +394,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_BUG_CATCHER,
.species = {SPECIES_BEAUTIFLY, SPECIES_DUSTOX, SPECIES_ILLUMISE, SPECIES_SHIFTRY, SPECIES_BRELOOM, SPECIES_NINJASK, SPECIES_SHEDINJA, SPECIES_PINSIR, SPECIES_HERACROSS, SPECIES_VOLBEAT},
.id = 0,
- .easyChatWords = {EC_WORD_NO, EC_WORD_MISTAKE, EC_WORD_EXCL, EC_WORD_I, EC_WORD_LOST, EC_WORD_BADLY},
+ .speechLost = {EC_WORD_NO, EC_WORD_MISTAKE, EC_WORD_EXCL, EC_WORD_I, EC_WORD_LOST, EC_WORD_BADLY},
},
{
.name = {_("ヒロオ"), _("LIONEL"), _("LIONEL"), _("CAIO"), _("LUDWIG"), _("LEO")},
@@ -402,7 +402,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_YOUNGSTER,
.species = {SPECIES_SWELLOW, SPECIES_SWALOT, SPECIES_SHUCKLE, SPECIES_MANECTRIC, SPECIES_TORKOAL, SPECIES_HARIYAMA, SPECIES_MIGHTYENA, SPECIES_LUDICOLO, SPECIES_CRAWDAUNT, SPECIES_WHISCASH},
.id = 1,
- .easyChatWords = {EC_WORD_OKAY, EC_WORD_I, EC_WORD_LOST, EC_WORD_YOU_RE, EC_WORD_A, EC_WORD_MASTER},
+ .speechLost = {EC_WORD_OKAY, EC_WORD_I, EC_WORD_LOST, EC_WORD_YOU_RE, EC_WORD_A, EC_WORD_MASTER},
},
{
.name = {_("ケイジ"), _("SONNY"), _("HERVE"), _("FEDRO"), _("WENZEL"), _("SANTI")},
@@ -410,7 +410,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_SCHOOL_KID_M,
.species = {SPECIES_LINOONE, SPECIES_MIGHTYENA, SPECIES_WHISCASH, SPECIES_ZANGOOSE, SPECIES_SEVIPER, SPECIES_NINETALES, SPECIES_KECLEON, SPECIES_SHUCKLE, SPECIES_MANECTRIC, SPECIES_MACHAMP},
.id = 2,
- .easyChatWords = {EC_WORD_I, EC_WORD_WENT, EC_WORD_AND, EC_WORD_LOST, EC_WORD_AWW, EC_WORD_ELLIPSIS},
+ .speechLost = {EC_WORD_I, EC_WORD_WENT, EC_WORD_AND, EC_WORD_LOST, EC_WORD_AWW, EC_WORD_ELLIPSIS},
},
{
.name = {_("ユラ"), _("LAYLA"), _("LAYLA"), _("ASTRID"), _("SONJA"), _("LOLA")},
@@ -418,7 +418,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_LASS,
.species = {SPECIES_SWALOT, SPECIES_XATU, SPECIES_ALTARIA, SPECIES_GOLDUCK, SPECIES_FLYGON, SPECIES_ALAKAZAM, SPECIES_GARDEVOIR, SPECIES_WAILORD, SPECIES_GRUMPIG, SPECIES_MIGHTYENA},
.id = 3,
- .easyChatWords = {EC_WORD_IS, EC_WORD_THIS, EC_WORD_TOO, EC_WORD_MUCH, EC_WORD_QUES, 0xFFFF},
+ .speechLost = {EC_WORD_IS, EC_WORD_THIS, EC_WORD_TOO, EC_WORD_MUCH, EC_WORD_QUES, 0xFFFF},
},
{
.name = {_("ヨウカ"), _("MACY"), _("AMELIE"), _("CLEO"), _("MARIA"), _("ELISA")},
@@ -426,7 +426,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_SCHOOL_KID_F,
.species = {SPECIES_WIGGLYTUFF, SPECIES_LINOONE, SPECIES_KINGDRA, SPECIES_DELCATTY, SPECIES_RAICHU, SPECIES_FEAROW, SPECIES_STARMIE, SPECIES_MEDICHAM, SPECIES_SHIFTRY, SPECIES_BEAUTIFLY},
.id = 4,
- .easyChatWords = {EC_WORD_THIS, EC_WORD_WON_T, EC_WORD_BE, EC_WORD_HAPPENING, EC_WORD_NEXT, EC_WORD_TIME},
+ .speechLost = {EC_WORD_THIS, EC_WORD_WON_T, EC_WORD_BE, EC_WORD_HAPPENING, EC_WORD_NEXT, EC_WORD_TIME},
},
{
.name = {_("ヤスシ"), _("DONTE"), _("BRAHIM"), _("GLAUCO"), _("JOSEF"), _("ROQUE")},
@@ -434,7 +434,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_RUNNING_TRIATHLETE_M,
.species = {SPECIES_STARMIE, SPECIES_DODRIO, SPECIES_AGGRON, SPECIES_MAGNETON, SPECIES_MACHAMP, SPECIES_ARMALDO, SPECIES_HERACROSS, SPECIES_NOSEPASS, SPECIES_EXPLOUD, SPECIES_MIGHTYENA},
.id = 5,
- .easyChatWords = {EC_WORD_I_AM, EC_WORD_GOING, EC_WORD_TO, EC_WORD_RUN, EC_WORD_BYE_BYE, EC_WORD_EXCL},
+ .speechLost = {EC_WORD_I_AM, EC_WORD_GOING, EC_WORD_TO, EC_WORD_RUN, EC_WORD_BYE_BYE, EC_WORD_EXCL},
},
{
.name = {_("ミサオ"), _("AMIRA"), _("LAURE"), _("DAFNE"), _("AMELIE"), _("LARA")},
@@ -442,7 +442,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_RUNNING_TRIATHLETE_F,
.species = {SPECIES_STARMIE, SPECIES_DODRIO, SPECIES_MAGNETON, SPECIES_MEDICHAM, SPECIES_MIGHTYENA, SPECIES_GLALIE, SPECIES_GOLEM, SPECIES_ELECTRODE, SPECIES_PELIPPER, SPECIES_SHARPEDO},
.id = 6,
- .easyChatWords = {EC_WORD_AHAHA, EC_WORD_DEFEATED, EC_WORD_EXCL, EC_WORD_IT_S, EC_WORD_NOTHING, EC_WORD_EXCL},
+ .speechLost = {EC_WORD_AHAHA, EC_WORD_DEFEATED, EC_WORD_EXCL, EC_WORD_IT_S, EC_WORD_NOTHING, EC_WORD_EXCL},
},
{
.name = {_("カズサ"), _("KALI"), _("JODIE"), _("ILENIA"), _("KARO"), _("ELSA")},
@@ -450,7 +450,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_BEAUTY,
.species = {SPECIES_NINETALES, SPECIES_ALAKAZAM, SPECIES_SCEPTILE, SPECIES_SALAMENCE, SPECIES_GOLDUCK, SPECIES_MAWILE, SPECIES_WEEZING, SPECIES_LANTURN, SPECIES_GARDEVOIR, SPECIES_MILOTIC},
.id = 7,
- .easyChatWords = {EC_WORD_YOU_RE, EC_WORD_STRONG, EC_WORD_AREN_T, EC_WORD_YOU, EC_WORD_QUES, 0xFFFF},
+ .speechLost = {EC_WORD_YOU_RE, EC_WORD_STRONG, EC_WORD_AREN_T, EC_WORD_YOU, EC_WORD_QUES, 0xFFFF},
},
{
.name = {_("スミレ"), _("ANNIE"), _("ANNIE"), _("IMELDA"), _("INES"), _("ROSA")},
@@ -458,7 +458,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_AROMA_LADY,
.species = {SPECIES_SCEPTILE, SPECIES_VILEPLUME, SPECIES_BELLOSSOM, SPECIES_ROSELIA, SPECIES_CORSOLA, SPECIES_FLYGON, SPECIES_BRELOOM, SPECIES_MILOTIC, SPECIES_ALTARIA, SPECIES_CRADILY},
.id = 8,
- .easyChatWords = {EC_WORD_WHAT, EC_WORD_TOUGH, EC_WORD_POKEMON, EC_WORD_YOU, EC_WORD_HAVE, EC_WORD_EXCL},
+ .speechLost = {EC_WORD_WHAT, EC_WORD_TOUGH, EC_WORD_POKEMON, EC_WORD_YOU, EC_WORD_HAVE, EC_WORD_EXCL},
},
{
.name = {_("アキノリ"), _("DILLEN"), _("RENE"), _("INDRO"), _("DETLEF"), _("PEDRO")},
@@ -466,7 +466,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_HIKER,
.species = {SPECIES_SKARMORY, SPECIES_GOLEM, SPECIES_BLAZIKEN, SPECIES_CAMERUPT, SPECIES_DONPHAN, SPECIES_MUK, SPECIES_SALAMENCE, SPECIES_TROPIUS, SPECIES_SOLROCK, SPECIES_RHYDON},
.id = 9,
- .easyChatWords = {EC_WORD_WE, EC_WORD_WERE, EC_WORD_JUST, EC_WORD_SHREDDED, EC_WORD_ELLIPSIS, 0xFFFF},
+ .speechLost = {EC_WORD_WE, EC_WORD_WERE, EC_WORD_JUST, EC_WORD_SHREDDED, EC_WORD_ELLIPSIS, 0xFFFF},
},
{
.name = {_("トウゾウ"), _("DALLAS"), _("BRUNO"), _("LEARCO"), _("ANSGAR"), _("MANOLO")},
@@ -474,7 +474,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_FISHERMAN,
.species = {SPECIES_SEAKING, SPECIES_STARMIE, SPECIES_GOLDUCK, SPECIES_TENTACRUEL, SPECIES_OCTILLERY, SPECIES_GOREBYSS, SPECIES_GLALIE, SPECIES_WAILORD, SPECIES_SHARPEDO, SPECIES_KINGDRA},
.id = 10,
- .easyChatWords = {EC_WORD_YOUR, EC_WORD_WIN, EC_WORD_ANGERS, EC_WORD_ME, EC_WORD_EXCL, 0xFFFF},
+ .speechLost = {EC_WORD_YOUR, EC_WORD_WIN, EC_WORD_ANGERS, EC_WORD_ME, EC_WORD_EXCL, 0xFFFF},
},
{
.name = {_("セイヤ"), _("FRANK"), _("FRANK"), _("OLINDO"), _("FRANK"), _("MAURO")},
@@ -482,7 +482,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_SAILOR,
.species = {SPECIES_QUAGSIRE, SPECIES_STARMIE, SPECIES_PELIPPER, SPECIES_CRAWDAUNT, SPECIES_WAILORD, SPECIES_GYARADOS, SPECIES_SWAMPERT, SPECIES_LANTURN, SPECIES_WHISCASH, SPECIES_SHUCKLE},
.id = 11,
- .easyChatWords = {EC_WORD_LOSING, EC_WORD_DOESN_T, EC_MOVE(CUT), EC_WORD_ME, EC_WORD_DEEP, EC_WORD_OK_QUES},
+ .speechLost = {EC_WORD_LOSING, EC_WORD_DOESN_T, EC_MOVE(CUT), EC_WORD_ME, EC_WORD_DEEP, EC_WORD_OK_QUES},
},
{
.name = {_("リュウジ"), _("LAMONT"), _("XAV"), _("ORFEO"), _("JÜRGEN"), _("JORGE")},
@@ -490,7 +490,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_GUITARIST,
.species = {SPECIES_ABSOL, SPECIES_CROBAT, SPECIES_EXPLOUD, SPECIES_MAGNETON, SPECIES_SHARPEDO, SPECIES_MANECTRIC, SPECIES_METAGROSS, SPECIES_ELECTRODE, SPECIES_NOSEPASS, SPECIES_WEEZING},
.id = 12,
- .easyChatWords = {EC_WORD_A, EC_WORD_LOSS, EC_WORD_IS, EC_WORD_WHAT, EC_WORD_THIS, EC_WORD_IS},
+ .speechLost = {EC_WORD_A, EC_WORD_LOSS, EC_WORD_IS, EC_WORD_WHAT, EC_WORD_THIS, EC_WORD_IS},
},
{
.name = {_("カツアキ"), _("TYRESE"), _("ANDY"), _("PARIDE"), _("DAVID"), _("CHICHO")},
@@ -498,7 +498,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_BLACK_BELT,
.species = {SPECIES_BLAZIKEN, SPECIES_GOLEM, SPECIES_MACHAMP, SPECIES_RHYDON, SPECIES_HARIYAMA, SPECIES_AGGRON, SPECIES_MEDICHAM, SPECIES_ZANGOOSE, SPECIES_VIGOROTH, SPECIES_SLAKING},
.id = 13,
- .easyChatWords = {EC_WORD_I_AM, EC_WORD_TOO_WEAK, EC_WORD_AND, EC_WORD_LOW, EC_WORD_OF, EC_WORD_POWER},
+ .speechLost = {EC_WORD_I_AM, EC_WORD_TOO_WEAK, EC_WORD_AND, EC_WORD_LOW, EC_WORD_OF, EC_WORD_POWER},
},
{
.name = {_("トシミツ"), _("DANTE"), _("DANTE"), _("RAOUL"), _("LOTHAR"), _("PABLO")},
@@ -506,7 +506,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_RUIN_MANIAC,
.species = {SPECIES_SCEPTILE, SPECIES_SANDSLASH, SPECIES_FLYGON, SPECIES_CLAYDOL, SPECIES_ARMALDO, SPECIES_CROBAT, SPECIES_CRADILY, SPECIES_SOLROCK, SPECIES_LUNATONE, SPECIES_GOLEM},
.id = 14,
- .easyChatWords = {EC_WORD_I, EC_WORD_DON_T, EC_WORD_UNDERSTAND, EC_WORD_WHAT, EC_WORD_IS, EC_WORD_HAPPENING},
+ .speechLost = {EC_WORD_I, EC_WORD_DON_T, EC_WORD_UNDERSTAND, EC_WORD_WHAT, EC_WORD_IS, EC_WORD_HAPPENING},
},
{
.name = {_("ローウェン"), _("ARTURO"), _("ARTURO"), _("ROMOLO"), _("BRIAN"), _("ARTURO")},
@@ -514,7 +514,7 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
.facilityClass = FACILITY_CLASS_GENTLEMAN,
.species = {SPECIES_ABSOL, SPECIES_MIGHTYENA, SPECIES_ALAKAZAM, SPECIES_BANETTE, SPECIES_NINETALES, SPECIES_CLAYDOL, SPECIES_MUK, SPECIES_SALAMENCE, SPECIES_WALREIN, SPECIES_DUSCLOPS},
.id = 15,
- .easyChatWords = {EC_WORD_THIS, EC_WORD_HAS, EC_WORD_TO, EC_WORD_BE, EC_WORD_A, EC_WORD_LIE},
+ .speechLost = {EC_WORD_THIS, EC_WORD_HAS, EC_WORD_TO, EC_WORD_BE, EC_WORD_A, EC_WORD_LIE},
},
};
@@ -525,22 +525,22 @@ const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
// Fourth is after a level mode is chosen for the apprentice
static const u8 *const sApprenticeFirstMeetingTexts[NUM_APPRENTICES][4] =
{
- {gText_ApprenticeIntro0, gText_ApprenticeRejectTeaching0, gText_ApprenticeWhichLevelMode0, gText_ApprenticeLevelModeThanks0},
- {gText_ApprenticeIntro1, gText_ApprenticeRejectTeaching1, gText_ApprenticeWhichLevelMode1, gText_ApprenticeLevelModeThanks1},
- {gText_ApprenticeIntro2, gText_ApprenticeRejectTeaching2, gText_ApprenticeWhichLevelMode2, gText_ApprenticeLevelModeThanks2},
- {gText_ApprenticeIntro3, gText_ApprenticeRejectTeaching3, gText_ApprenticeWhichLevelMode3, gText_ApprenticeLevelModeThanks3},
- {gText_ApprenticeIntro4, gText_ApprenticeRejectTeaching4, gText_ApprenticeWhichLevelMode4, gText_ApprenticeLevelModeThanks4},
- {gText_ApprenticeIntro5, gText_ApprenticeRejectTeaching5, gText_ApprenticeWhichLevelMode5, gText_ApprenticeLevelModeThanks5},
- {gText_ApprenticeIntro6, gText_ApprenticeRejectTeaching6, gText_ApprenticeWhichLevelMode6, gText_ApprenticeLevelModeThanks6},
- {gText_ApprenticeIntro7, gText_ApprenticeRejectTeaching7, gText_ApprenticeWhichLevelMode7, gText_ApprenticeLevelModeThanks7},
- {gText_ApprenticeIntro8, gText_ApprenticeRejectTeaching8, gText_ApprenticeWhichLevelMode8, gText_ApprenticeLevelModeThanks8},
- {gText_ApprenticeIntro9, gText_ApprenticeRejectTeaching9, gText_ApprenticeWhichLevelMode9, gText_ApprenticeLevelModeThanks9},
- {gText_ApprenticeIntro10, gText_ApprenticeRejectTeaching10, gText_ApprenticeWhichLevelMode10, gText_ApprenticeLevelModeThanks10},
- {gText_ApprenticeIntro11, gText_ApprenticeRejectTeaching11, gText_ApprenticeWhichLevelMode11, gText_ApprenticeLevelModeThanks11},
- {gText_ApprenticeIntro12, gText_ApprenticeRejectTeaching12, gText_ApprenticeWhichLevelMode12, gText_ApprenticeLevelModeThanks12},
- {gText_ApprenticeIntro13, gText_ApprenticeRejectTeaching13, gText_ApprenticeWhichLevelMode13, gText_ApprenticeLevelModeThanks13},
- {gText_ApprenticeIntro14, gText_ApprenticeRejectTeaching14, gText_ApprenticeWhichLevelMode14, gText_ApprenticeLevelModeThanks14},
- {gText_ApprenticeIntro15, gText_ApprenticeRejectTeaching15, gText_ApprenticeWhichLevelMode15, gText_ApprenticeLevelModeThanks15},
+ {gText_ApprenticePleaseTeach0, gText_ApprenticeRejectTeaching0, gText_ApprenticeWhichLevelMode0, gText_ApprenticeLevelModeThanks0},
+ {gText_ApprenticePleaseTeach1, gText_ApprenticeRejectTeaching1, gText_ApprenticeWhichLevelMode1, gText_ApprenticeLevelModeThanks1},
+ {gText_ApprenticePleaseTeach2, gText_ApprenticeRejectTeaching2, gText_ApprenticeWhichLevelMode2, gText_ApprenticeLevelModeThanks2},
+ {gText_ApprenticePleaseTeach3, gText_ApprenticeRejectTeaching3, gText_ApprenticeWhichLevelMode3, gText_ApprenticeLevelModeThanks3},
+ {gText_ApprenticePleaseTeach4, gText_ApprenticeRejectTeaching4, gText_ApprenticeWhichLevelMode4, gText_ApprenticeLevelModeThanks4},
+ {gText_ApprenticePleaseTeach5, gText_ApprenticeRejectTeaching5, gText_ApprenticeWhichLevelMode5, gText_ApprenticeLevelModeThanks5},
+ {gText_ApprenticePleaseTeach6, gText_ApprenticeRejectTeaching6, gText_ApprenticeWhichLevelMode6, gText_ApprenticeLevelModeThanks6},
+ {gText_ApprenticePleaseTeach7, gText_ApprenticeRejectTeaching7, gText_ApprenticeWhichLevelMode7, gText_ApprenticeLevelModeThanks7},
+ {gText_ApprenticePleaseTeach8, gText_ApprenticeRejectTeaching8, gText_ApprenticeWhichLevelMode8, gText_ApprenticeLevelModeThanks8},
+ {gText_ApprenticePleaseTeach9, gText_ApprenticeRejectTeaching9, gText_ApprenticeWhichLevelMode9, gText_ApprenticeLevelModeThanks9},
+ {gText_ApprenticePleaseTeach10, gText_ApprenticeRejectTeaching10, gText_ApprenticeWhichLevelMode10, gText_ApprenticeLevelModeThanks10},
+ {gText_ApprenticePleaseTeach11, gText_ApprenticeRejectTeaching11, gText_ApprenticeWhichLevelMode11, gText_ApprenticeLevelModeThanks11},
+ {gText_ApprenticePleaseTeach12, gText_ApprenticeRejectTeaching12, gText_ApprenticeWhichLevelMode12, gText_ApprenticeLevelModeThanks12},
+ {gText_ApprenticePleaseTeach13, gText_ApprenticeRejectTeaching13, gText_ApprenticeWhichLevelMode13, gText_ApprenticeLevelModeThanks13},
+ {gText_ApprenticePleaseTeach14, gText_ApprenticeRejectTeaching14, gText_ApprenticeWhichLevelMode14, gText_ApprenticeLevelModeThanks14},
+ {gText_ApprenticePleaseTeach15, gText_ApprenticeRejectTeaching15, gText_ApprenticeWhichLevelMode15, gText_ApprenticeLevelModeThanks15},
};
static const u8 *const sApprenticeWhichMonTexts[NUM_APPRENTICES][2] =
@@ -569,22 +569,22 @@ static const u8 *const sApprenticeWhichMonTexts[NUM_APPRENTICES][2] =
// TODO
static const u8 *const sApprenticeHeldItemTexts[NUM_APPRENTICES][5] =
{
- {gText_ApprenticeWhatHeldItem0, gText_ApprenticeHoldNothing0, gText_ApprenticeThanksHeldItem0, gText_ApprenticeThanksHaveHeldItem0, gText_ApprenticeItemAlreadyRecommended0},
- {gText_ApprenticeWhatHeldItem1, gText_ApprenticeHoldNothing1, gText_ApprenticeThanksHeldItem1, gText_ApprenticeThanksHaveHeldItem1, gText_ApprenticeItemAlreadyRecommended1},
- {gText_ApprenticeWhatHeldItem2, gText_ApprenticeHoldNothing2, gText_ApprenticeThanksHeldItem2, gText_ApprenticeThanksHaveHeldItem2, gText_ApprenticeItemAlreadyRecommended2},
- {gText_ApprenticeWhatHeldItem3, gText_ApprenticeHoldNothing3, gText_ApprenticeThanksHeldItem3, gText_ApprenticeThanksHaveHeldItem3, gText_ApprenticeItemAlreadyRecommended3},
- {gText_ApprenticeWhatHeldItem4, gText_ApprenticeHoldNothing4, gText_ApprenticeThanksHeldItem4, gText_ApprenticeThanksHaveHeldItem4, gText_ApprenticeItemAlreadyRecommended4},
- {gText_ApprenticeWhatHeldItem5, gText_ApprenticeHoldNothing5, gText_ApprenticeThanksHeldItem5, gText_ApprenticeThanksHaveHeldItem5, gText_ApprenticeItemAlreadyRecommended5},
- {gText_ApprenticeWhatHeldItem6, gText_ApprenticeHoldNothing6, gText_ApprenticeThanksHeldItem6, gText_ApprenticeThanksHaveHeldItem6, gText_ApprenticeItemAlreadyRecommended6},
- {gText_ApprenticeWhatHeldItem7, gText_ApprenticeHoldNothing7, gText_ApprenticeThanksHeldItem7, gText_ApprenticeThanksHaveHeldItem7, gText_ApprenticeItemAlreadyRecommended7},
- {gText_ApprenticeWhatHeldItem8, gText_ApprenticeHoldNothing8, gText_ApprenticeThanksHeldItem8, gText_ApprenticeThanksHaveHeldItem8, gText_ApprenticeItemAlreadyRecommended8},
- {gText_ApprenticeWhatHeldItem9, gText_ApprenticeHoldNothing9, gText_ApprenticeThanksHeldItem9, gText_ApprenticeThanksHaveHeldItem9, gText_ApprenticeItemAlreadyRecommended9},
- {gText_ApprenticeWhatHeldItem10, gText_ApprenticeHoldNothing10, gText_ApprenticeThanksHeldItem10, gText_ApprenticeThanksHaveHeldItem10, gText_ApprenticeItemAlreadyRecommended10},
- {gText_ApprenticeWhatHeldItem11, gText_ApprenticeHoldNothing11, gText_ApprenticeThanksHeldItem11, gText_ApprenticeThanksHaveHeldItem11, gText_ApprenticeItemAlreadyRecommended11},
- {gText_ApprenticeWhatHeldItem12, gText_ApprenticeHoldNothing12, gText_ApprenticeThanksHeldItem12, gText_ApprenticeThanksHaveHeldItem12, gText_ApprenticeItemAlreadyRecommended12},
- {gText_ApprenticeWhatHeldItem13, gText_ApprenticeHoldNothing13, gText_ApprenticeThanksHeldItem13, gText_ApprenticeThanksHaveHeldItem13, gText_ApprenticeItemAlreadyRecommended13},
- {gText_ApprenticeWhatHeldItem14, gText_ApprenticeHoldNothing14, gText_ApprenticeThanksHeldItem14, gText_ApprenticeThanksHaveHeldItem14, gText_ApprenticeItemAlreadyRecommended14},
- {gText_ApprenticeWhatHeldItem15, gText_ApprenticeHoldNothing15, gText_ApprenticeThanksHeldItem15, gText_ApprenticeThanksHaveHeldItem15, gText_ApprenticeItemAlreadyRecommended15},
+ {gText_ApprenticeWhatHeldItem0, gText_ApprenticeHoldNothing0, gText_ApprenticeThanksNoHeldItem0, gText_ApprenticeThanksHeldItem0, gText_ApprenticeItemAlreadyRecommended0},
+ {gText_ApprenticeWhatHeldItem1, gText_ApprenticeHoldNothing1, gText_ApprenticeThanksNoHeldItem1, gText_ApprenticeThanksHeldItem1, gText_ApprenticeItemAlreadyRecommended1},
+ {gText_ApprenticeWhatHeldItem2, gText_ApprenticeHoldNothing2, gText_ApprenticeThanksNoHeldItem2, gText_ApprenticeThanksHeldItem2, gText_ApprenticeItemAlreadyRecommended2},
+ {gText_ApprenticeWhatHeldItem3, gText_ApprenticeHoldNothing3, gText_ApprenticeThanksNoHeldItem3, gText_ApprenticeThanksHeldItem3, gText_ApprenticeItemAlreadyRecommended3},
+ {gText_ApprenticeWhatHeldItem4, gText_ApprenticeHoldNothing4, gText_ApprenticeThanksNoHeldItem4, gText_ApprenticeThanksHeldItem4, gText_ApprenticeItemAlreadyRecommended4},
+ {gText_ApprenticeWhatHeldItem5, gText_ApprenticeHoldNothing5, gText_ApprenticeThanksNoHeldItem5, gText_ApprenticeThanksHeldItem5, gText_ApprenticeItemAlreadyRecommended5},
+ {gText_ApprenticeWhatHeldItem6, gText_ApprenticeHoldNothing6, gText_ApprenticeThanksNoHeldItem6, gText_ApprenticeThanksHeldItem6, gText_ApprenticeItemAlreadyRecommended6},
+ {gText_ApprenticeWhatHeldItem7, gText_ApprenticeHoldNothing7, gText_ApprenticeThanksNoHeldItem7, gText_ApprenticeThanksHeldItem7, gText_ApprenticeItemAlreadyRecommended7},
+ {gText_ApprenticeWhatHeldItem8, gText_ApprenticeHoldNothing8, gText_ApprenticeThanksNoHeldItem8, gText_ApprenticeThanksHeldItem8, gText_ApprenticeItemAlreadyRecommended8},
+ {gText_ApprenticeWhatHeldItem9, gText_ApprenticeHoldNothing9, gText_ApprenticeThanksNoHeldItem9, gText_ApprenticeThanksHeldItem9, gText_ApprenticeItemAlreadyRecommended9},
+ {gText_ApprenticeWhatHeldItem10, gText_ApprenticeHoldNothing10, gText_ApprenticeThanksNoHeldItem10, gText_ApprenticeThanksHeldItem10, gText_ApprenticeItemAlreadyRecommended10},
+ {gText_ApprenticeWhatHeldItem11, gText_ApprenticeHoldNothing11, gText_ApprenticeThanksNoHeldItem11, gText_ApprenticeThanksHeldItem11, gText_ApprenticeItemAlreadyRecommended11},
+ {gText_ApprenticeWhatHeldItem12, gText_ApprenticeHoldNothing12, gText_ApprenticeThanksNoHeldItem12, gText_ApprenticeThanksHeldItem12, gText_ApprenticeItemAlreadyRecommended12},
+ {gText_ApprenticeWhatHeldItem13, gText_ApprenticeHoldNothing13, gText_ApprenticeThanksNoHeldItem13, gText_ApprenticeThanksHeldItem13, gText_ApprenticeItemAlreadyRecommended13},
+ {gText_ApprenticeWhatHeldItem14, gText_ApprenticeHoldNothing14, gText_ApprenticeThanksNoHeldItem14, gText_ApprenticeThanksHeldItem14, gText_ApprenticeItemAlreadyRecommended14},
+ {gText_ApprenticeWhatHeldItem15, gText_ApprenticeHoldNothing15, gText_ApprenticeThanksNoHeldItem15, gText_ApprenticeThanksHeldItem15, gText_ApprenticeItemAlreadyRecommended15},
};
static const u8 *const sApprenticeWhichMoveTexts[NUM_APPRENTICES][2] =
@@ -1026,39 +1026,40 @@ static const bool8 gUnknown_08611370[MOVES_COUNT] =
[MOVE_PSYCHO_BOOST] = TRUE,
};
-static const u8 gUnknown_086114D3[] = {0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00};
+static const u8 gUnknown_086114D3[] = {1, 1, 1, 2, 2, 2, 2, 2, 3, 0};
static void (* const sApprenticeFunctions[])(void) =
{
- [APPRENTICE_FUNC_0] = Script_GivenApprenticeLvlMode,
- [APPRENTICE_FUNC_1] = Script_SetApprenticeLvlMode,
- [APPRENTICE_FUNC_2] = sub_81A0978,
+ [APPRENTICE_FUNC_GAVE_LVLMODE] = Script_GivenApprenticeLvlMode,
+ [APPRENTICE_FUNC_SET_LVLMODE] = Script_SetApprenticeLvlMode,
+ [APPRENTICE_FUNC_SET_ID] = Script_SetApprenticeId,
[APPRENTICE_FUNC_3] = sub_819FC60,
[APPRENTICE_FUNC_4] = sub_81A0984,
- [APPRENTICE_FUNC_5] = sub_81A0990,
+ [APPRENTICE_FUNC_ANSWERED_QUESTION] = IncrementQuestionsAnswered,
[APPRENTICE_FUNC_6] = sub_81A09D0,
[APPRENTICE_FUNC_MENU] = Script_CreateApprenticeMenu,
[APPRENTICE_FUNC_PRINT_MSG] = Script_PrintApprenticeMessage,
- [APPRENTICE_FUNC_9] = Script_ResetPlayerApprentice,
- [APPRENTICE_FUNC_SET_TRUE_1] = SetVar0x8004True1,
- [APPRENTICE_FUNC_11] = sub_81A0CC0,
- [APPRENTICE_FUNC_12] = sub_81A09B4,
- [APPRENTICE_FUNC_13] = sub_81A0D40,
- [APPRENTICE_FUNC_14] = sub_81A0DD4,
- [APPRENTICE_FUNC_15] = sub_81A0FE4,
- [APPRENTICE_FUNC_16] = ApprenticeBufferString,
- [APPRENTICE_FUNC_17] = sub_81A0D80,
- [APPRENTICE_FUNC_18] = sub_81A11F8,
- [APPRENTICE_FUNC_19] = sub_81A1218,
+ [APPRENTICE_FUNC_RESET] = Script_ResetPlayerApprentice,
+ [APPRENTICE_FUNC_CHECK_GONE] = GetShouldCheckApprenticeGone,
+ [APPRENTICE_FUNC_GET_QUESTION] = ApprenticeGetQuestion,
+ [APPRENTICE_FUNC_GET_NUM_PARTY_MONS] = GetNumApprenticePartyMonsSelected,
+ [APPRENTICE_FUNC_SET_PARTY_MON] = SetApprenticePartyMon,
+ [APPRENTICE_FUNC_INIT_QUESTION_DATA] = InitApprenticeQuestionData,
+ [APPRENTICE_FUNC_FREE_QUESTION_DATA] = FreeApprenticeQuestionData,
+ [APPRENTICE_FUNC_BUFFER_STRING] = ApprenticeBufferString,
+ [APPRENTICE_FUNC_SET_MOVE] = SetApprenticeMonMove,
+ [APPRENTICE_FUNC_SET_FIRST_MON] = SetFirstApprenticeMon,
+ [APPRENTICE_FUNC_OPEN_BAG] = Script_ApprenticeOpenBagMenu,
[APPRENTICE_FUNC_20] = sub_81A1224,
[APPRENTICE_FUNC_21] = sub_81A1438,
- [APPRENTICE_FUNC_22] = sub_81A150C,
- [APPRENTICE_FUNC_23] = Script_SetPlayerApprenticeTrainerGfxId,
+ [APPRENTICE_FUNC_SET_GFX_SAVED] = SetSavedApprenticeTrainerGfxId,
+ [APPRENTICE_FUNC_SET_GFX] = SetPlayerApprenticeTrainerGfxId,
[APPRENTICE_FUNC_SHOULD_LEAVE] = GetShouldApprenticeLeave,
[APPRENTICE_FUNC_25] = sub_81A1370,
};
-static const u8 gUnknown_08611548[8] = {0x00, 0x01, 0x02, 0x03, 0x06, 0x07, 0x08, 0x09};
+// The first Apprentice can only be one of these
+static const u8 sInitialApprenticeIds[8] = {0, 1, 2, 3, 6, 7, 8, 9};
// text
/*
@@ -1067,11 +1068,11 @@ extern const u8 gText_No[];*/
void CopyFriendsApprenticeChallengeText(u8 saveblockApprenticeId)
{
- u8 i, var;
+ u8 i, num;
const u8 *Intro;
- var = gSaveBlock2Ptr->apprentices[saveblockApprenticeId].number;
- for (i = 0; var != 0 && i < APPRENTICE_COUNT; var /= 10, i++)
+ num = gSaveBlock2Ptr->apprentices[saveblockApprenticeId].number;
+ for (i = 0; num != 0 && i < APPRENTICE_COUNT; num /= 10, i++)
;
StringCopy7(gStringVar1, gSaveBlock2Ptr->apprentices[saveblockApprenticeId].playerName);
@@ -1090,8 +1091,8 @@ void ResetApprenticeStruct(struct Apprentice *apprentice)
{
u8 i;
- for (i = 0; i < ARRAY_COUNT(apprentice->easyChatWords); i++)
- apprentice->easyChatWords[i] = 0xFFFF;
+ for (i = 0; i < ARRAY_COUNT(apprentice->speechWon); i++)
+ apprentice->speechWon[i] = 0xFFFF;
apprentice->playerName[0] = EOS;
apprentice->id = NUM_APPRENTICES;
@@ -1104,8 +1105,8 @@ void ResetAllApprenticeData(void)
PLAYER_APPRENTICE.field_B2_1 = 0;
for (i = 0; i < APPRENTICE_COUNT; i++)
{
- for (j = 0; j < ARRAY_COUNT(gSaveBlock2Ptr->apprentices[i].easyChatWords); j++)
- gSaveBlock2Ptr->apprentices[i].easyChatWords[j] = 0xFFFF;
+ for (j = 0; j < ARRAY_COUNT(gSaveBlock2Ptr->apprentices[i].speechWon); j++)
+ gSaveBlock2Ptr->apprentices[i].speechWon[j] = 0xFFFF;
gSaveBlock2Ptr->apprentices[i].id = NUM_APPRENTICES;
gSaveBlock2Ptr->apprentices[i].playerName[0] = EOS;
gSaveBlock2Ptr->apprentices[i].lvlMode = 0;
@@ -1120,18 +1121,18 @@ void ResetAllApprenticeData(void)
Script_ResetPlayerApprentice();
}
-static bool8 GivenPlayersApprenticeLvlMode(void)
+static bool8 GivenApprenticeLvlMode(void)
{
return (PLAYER_APPRENTICE.lvlMode != 0);
}
-static void sub_819FBC8(void)
+static void SetApprenticeId(void)
{
if (gSaveBlock2Ptr->apprentices[0].number == 0)
{
do
{
- PLAYER_APPRENTICE.id = gUnknown_08611548[Random() % ARRAY_COUNT(gUnknown_08611548)];
+ PLAYER_APPRENTICE.id = sInitialApprenticeIds[Random() % ARRAY_COUNT(sInitialApprenticeIds)];
} while (PLAYER_APPRENTICE.id == gSaveBlock2Ptr->apprentices[0].id);
}
else
@@ -1168,6 +1169,7 @@ static void sub_819FC60(void)
PLAYER_APPRENTICE.monIds[i] = ((array[i * 2] & 0xF) << 4) | ((array[i * 2 + 1]) & 0xF);
}
+// TODO:
static u8 sub_819FCF8(u8 val, u8 *arg1, u8 *arg2)
{
u8 i, count;
@@ -1177,13 +1179,13 @@ static u8 sub_819FCF8(u8 val, u8 *arg1, u8 *arg2)
{
do
{
- monId = Random() % 3;
+ monId = Random() % (MULTI_PARTY_SIZE);
for (count = 0, i = 0; i < 5; i++)
{
- if (gUnknown_030062EC->unk2[monId][i] != MOVE_NONE)
+ if (gUnknown_030062EC->unkA[monId][i] != MOVE_NONE)
count++;
}
- } while (count > 3);
+ } while (count > MULTI_PARTY_SIZE);
}
else if (val == 1)
{
@@ -1196,8 +1198,8 @@ static u8 sub_819FCF8(u8 val, u8 *arg1, u8 *arg2)
static void sub_819FD64(void)
{
- u8 sp_0[10];
- u8 sp_C[3];
+ u8 sp_0[ARRAY_COUNT(gUnknown_086114D3)]; // TODO replace with constant, used in global for field_B8
+ u8 sp_C[MULTI_PARTY_SIZE];
u8 sp_10;
u8 i, j;
u8 rand1, rand2;
@@ -1213,7 +1215,7 @@ static void sub_819FD64(void)
SWAP(sp_C[rand1], sp_C[rand2], temp);
}
- for (i = 0; i < ARRAY_COUNT(sp_0); i++)
+ for (i = 0; i < ARRAY_COUNT(gUnknown_086114D3); i++)
sp_0[i] = gUnknown_086114D3[i];
for (i = 0; i < 50; i++)
{
@@ -1228,11 +1230,11 @@ static void sub_819FD64(void)
for (i = 0; i < 5; i++)
{
for (j = 0; j < 3; j++)
- gUnknown_030062EC->unk20[j][i] = 4;
+ gUnknown_030062EC->unkB[j][i] = 4;
}
sp_10 = 0;
- for (i = 0; i < 9; i++)
+ for (i = 0; i < ARRAY_COUNT(gUnknown_086114D3) - 1; i++)
{
PLAYER_APPRENTICE.field_B8[i].unk0_0 = sp_0[i];
if (sp_0[i] != 3)
@@ -1246,12 +1248,12 @@ static void sub_819FD64(void)
rand1 = Random() % 4;
for (j = 0; j < gUnknown_030062EC->unk0 + 1; j++)
{
- if (gUnknown_030062EC->unk20[id][j] == rand1)
+ if (gUnknown_030062EC->unkB[id][j] == rand1)
break;
}
} while (j != gUnknown_030062EC->unk0 + 1);
- gUnknown_030062EC->unk20[id][gUnknown_030062EC->unk0] = rand1;
+ gUnknown_030062EC->unkB[id][gUnknown_030062EC->unk0] = rand1;
PLAYER_APPRENTICE.field_B8[i].unk0_2 = rand1;
PLAYER_APPRENTICE.field_B8[i].unk2 = sub_819FF98(PLAYER_APPRENTICE.field_B8[i].unk0_1);
}
@@ -1379,17 +1381,18 @@ static u16 sub_819FF98(u8 monId)
return moveId;
}
+// TODO:
static bool8 sub_81A0194(u8 monId, u16 moveId)
{
u8 i;
for (i = 0; i < 5; i++)
{
- if (gUnknown_030062EC->unk2[monId][i] == moveId)
+ if (gUnknown_030062EC->unkA[monId][i] == moveId)
return FALSE;
}
- gUnknown_030062EC->unk2[monId][gUnknown_030062EC->unk0] = moveId;
+ gUnknown_030062EC->unkA[monId][gUnknown_030062EC->unk0] = moveId;
return TRUE;
}
@@ -1424,7 +1427,7 @@ static u16 sub_81A0284(u8 arg0, u8 speciesTableId, u8 arg2)
u16 moves[MAX_MON_MOVES];
u8 i, count;
- if (PLAYER_APPRENTICE.field_B1_1 < 3)
+ if (PLAYER_APPRENTICE.questionsAnswered < 3)
return 0;
count = 0;
@@ -1436,7 +1439,7 @@ static u16 sub_81A0284(u8 arg0, u8 speciesTableId, u8 arg2)
}
GetLatestLearnedMoves(gApprentices[PLAYER_APPRENTICE.id].species[speciesTableId], moves);
- for (i = 0; i < count && i < PLAYER_APPRENTICE.field_B1_1 - 3; i++)
+ for (i = 0; i < count && i < PLAYER_APPRENTICE.questionsAnswered - 3; i++)
{
if (PLAYER_APPRENTICE.field_B8[i].unk0_0 == 2
&& PLAYER_APPRENTICE.field_B8[i].unk0_1 == arg0
@@ -1463,7 +1466,7 @@ static void sub_81A0390(u8 arg0)
gSaveBlock2Ptr->apprentices[0].party[i].moves[j] = 0;
}
- j = PLAYER_APPRENTICE.field_B1_2;
+ j = PLAYER_APPRENTICE.firstMonId;
for (i = 0; i < MULTI_PARTY_SIZE; i++)
{
apprenticeMons[j] = &gSaveBlock2Ptr->apprentices[0].party[i];
@@ -1533,9 +1536,9 @@ static void CreateApprenticeMenu(u8 arg0)
case APPRENTICE_ASK_2SPECIES:
left = 0x12;
top = 8;
- if (PLAYER_APPRENTICE.field_B1_1 > 2)
+ if (PLAYER_APPRENTICE.questionsAnswered > 2)
return;
- strings[1] = gSpeciesNames[gUnknown_030062F0->unk2];
+ strings[1] = gSpeciesNames[gUnknown_030062F0->unkX];
strings[0] = gSpeciesNames[gUnknown_030062F0->unk0];
break;
case APPRENTICE_ASK_MOVES:
@@ -1660,10 +1663,10 @@ static void Script_ResetPlayerApprentice(void)
{
u8 i;
- sub_819FBC8();
+ SetApprenticeId();
PLAYER_APPRENTICE.lvlMode = 0;
- PLAYER_APPRENTICE.field_B1_1 = 0;
- PLAYER_APPRENTICE.field_B1_2 = 0;
+ PLAYER_APPRENTICE.questionsAnswered = 0;
+ PLAYER_APPRENTICE.firstMonId = 0;
PLAYER_APPRENTICE.field_B2_0 = 0;
for (i = 0; i < MULTI_PARTY_SIZE; i++)
@@ -1679,9 +1682,10 @@ static void Script_ResetPlayerApprentice(void)
}
}
+// The Apprentice is considered active after the first conversation, where the player decides a Lvl Mode for them
static void Script_GivenApprenticeLvlMode(void)
{
- if (!GivenPlayersApprenticeLvlMode())
+ if (!GivenApprenticeLvlMode())
gSpecialVar_Result = FALSE;
else
gSpecialVar_Result = TRUE;
@@ -1694,9 +1698,10 @@ static void Script_SetApprenticeLvlMode(void)
SetPlayersApprenticeLvlMode(gSpecialVar_0x8005);
}
-static void sub_81A0978(void)
+// Never called, APPRENTICE_FUNC_SET_ID is unused
+static void Script_SetApprenticeId(void)
{
- sub_819FBC8();
+ SetApprenticeId();
}
static void sub_81A0984(void)
@@ -1704,19 +1709,21 @@ static void sub_81A0984(void)
sub_819FD64();
}
-static void sub_81A0990(void)
+static void IncrementQuestionsAnswered(void)
{
- PLAYER_APPRENTICE.field_B1_1++;
+ PLAYER_APPRENTICE.questionsAnswered++;
}
-static void sub_81A09B4(void)
+// The first 3 questions answered after meeting the Apprentice are always selecting party mons
+// after which this is never called
+static void GetNumApprenticePartyMonsSelected(void)
{
- gSpecialVar_Result = PLAYER_APPRENTICE.field_B1_1;
+ gSpecialVar_Result = PLAYER_APPRENTICE.questionsAnswered;
}
static void sub_81A09D0(void)
{
- s32 var = PLAYER_APPRENTICE.field_B1_1 - 3;
+ s32 var = PLAYER_APPRENTICE.questionsAnswered - 3;
if (var < 0)
{
gSpecialVar_Result = FALSE;
@@ -1754,71 +1761,71 @@ static void PrintApprenticeMessage(void)
{
const u8 *string;
- if (gSpecialVar_0x8006 == 6)
+ if (gSpecialVar_0x8006 == APPRENTICE_MSG_WHICH_MON)
{
string = sApprenticeWhichMonTexts[PLAYER_APPRENTICE.id][0];
}
- else if (gSpecialVar_0x8006 == 7)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_THANKS_MON)
{
string = sApprenticeWhichMonTexts[PLAYER_APPRENTICE.id][1];
}
- else if (gSpecialVar_0x8006 == 8)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_WHICH_MOVE)
{
string = sApprenticeWhichMoveTexts[PLAYER_APPRENTICE.id][0];
}
- else if (gSpecialVar_0x8006 == 9)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_THANKS_MOVE)
{
string = sApprenticeWhichMoveTexts[PLAYER_APPRENTICE.id][1];
}
- else if (gSpecialVar_0x8006 == 4)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_WHICH_MON_FIRST)
{
string = sApprenticeWhichMonFirstTexts[PLAYER_APPRENTICE.id][0];
}
- else if (gSpecialVar_0x8006 == 5)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_THANKS_MON_FIRST)
{
string = sApprenticeWhichMonFirstTexts[PLAYER_APPRENTICE.id][1];
}
- else if (gSpecialVar_0x8006 == 10)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_WHAT_HELD_ITEM)
{
string = sApprenticeHeldItemTexts[PLAYER_APPRENTICE.id][0];
}
- else if (gSpecialVar_0x8006 == 11)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_PICK_WIN_SPEECH)
{
string = sApprenticePickWinSpeechTexts[PLAYER_APPRENTICE.id][0];
}
- else if (gSpecialVar_0x8006 == 12)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_THANKS_HELD_ITEM)
{
string = sApprenticeHeldItemTexts[PLAYER_APPRENTICE.id][3];
}
- else if (gSpecialVar_0x8006 == 13)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_HOLD_NOTHING)
{
string = sApprenticeHeldItemTexts[PLAYER_APPRENTICE.id][1];
}
- else if (gSpecialVar_0x8006 == 16)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_ITEM_ALREADY_SUGGESTED)
{
string = sApprenticeHeldItemTexts[PLAYER_APPRENTICE.id][4];
}
- else if (gSpecialVar_0x8006 == 14)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_THANKS_NO_HELD_ITEM)
{
string = sApprenticeHeldItemTexts[PLAYER_APPRENTICE.id][2];
}
- else if (gSpecialVar_0x8006 == 15)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_THANKS_WIN_SPEECH)
{
string = sApprenticePickWinSpeechTexts[PLAYER_APPRENTICE.id][1];
}
- else if (gSpecialVar_0x8006 == 0)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_PLEASE_TEACH)
{
string = sApprenticeFirstMeetingTexts[PLAYER_APPRENTICE.id][0];
}
- else if (gSpecialVar_0x8006 == 1)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_REJECT)
{
string = sApprenticeFirstMeetingTexts[PLAYER_APPRENTICE.id][1];
}
- else if (gSpecialVar_0x8006 == 2)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_WHICH_LVL_MODE)
{
string = sApprenticeFirstMeetingTexts[PLAYER_APPRENTICE.id][2];
}
- else if (gSpecialVar_0x8006 == 3)
+ else if (gSpecialVar_0x8006 == APPRENTICE_MSG_THANKS_LVL_MODE)
{
string = sApprenticeFirstMeetingTexts[PLAYER_APPRENTICE.id][3];
}
@@ -1843,19 +1850,19 @@ static void Script_PrintApprenticeMessage(void)
PrintApprenticeMessage();
}
-static void sub_81A0CC0(void)
+static void ApprenticeGetQuestion(void)
{
- if (PLAYER_APPRENTICE.field_B1_1 < 3)
+ if (PLAYER_APPRENTICE.questionsAnswered < MULTI_PARTY_SIZE)
{
gSpecialVar_Result = 2;
}
- else if (PLAYER_APPRENTICE.field_B1_1 > 11)
+ else if (PLAYER_APPRENTICE.questionsAnswered > 11)
{
gSpecialVar_Result = 5;
}
else
{
- s32 id = PLAYER_APPRENTICE.field_B1_1 - 3;
+ s32 id = PLAYER_APPRENTICE.questionsAnswered - 3;
switch (PLAYER_APPRENTICE.field_B8[id].unk0_0)
{
case 1:
@@ -1874,7 +1881,9 @@ static void sub_81A0CC0(void)
}
}
-static void sub_81A0D40(void)
+// gSpecialVar_0x8005 is 0 or 1 for the mon selection (0 is already on the team)
+// gSpecialVar_0x8006 is 0-2 for the number of party mons selected so far
+static void SetApprenticePartyMon(void)
{
if (gSpecialVar_0x8005)
{
@@ -1883,11 +1892,11 @@ static void sub_81A0D40(void)
}
}
-static void sub_81A0D80(void)
+static void SetApprenticeMonMove(void)
{
- if (PLAYER_APPRENTICE.field_B1_1 >= 3)
+ if (PLAYER_APPRENTICE.questionsAnswered >= MULTI_PARTY_SIZE)
{
- u8 id = PLAYER_APPRENTICE.field_B1_1 - 3;
+ u8 id = PLAYER_APPRENTICE.questionsAnswered - MULTI_PARTY_SIZE;
if (gSpecialVar_0x8005)
PLAYER_APPRENTICE.field_B8[id].unk0_3 = 1;
else
@@ -1895,7 +1904,7 @@ static void sub_81A0D80(void)
}
}
-static void sub_81A0DD4(void)
+static void InitApprenticeQuestionData(void)
{
u8 i;
u8 count = 0;
@@ -1905,44 +1914,45 @@ static void sub_81A0DD4(void)
;
gUnknown_030062F0 = AllocZeroed(sizeof(*gUnknown_030062F0));
- if (gSpecialVar_0x8005 == 2)
+ if (gSpecialVar_0x8005 == APPRENTICE_QUESTION_WHICH_MON)
{
- if (PLAYER_APPRENTICE.field_B1_1 < MULTI_PARTY_SIZE)
+ if (PLAYER_APPRENTICE.questionsAnswered < 3)
{
- id1 = PLAYER_APPRENTICE.monIds[PLAYER_APPRENTICE.field_B1_1] >> 4;
- gUnknown_030062F0->unk2 = gApprentices[PLAYER_APPRENTICE.id].species[id1];
+ // For the first 3 questions its used as an id to retrieve pokemon
+ id1 = PLAYER_APPRENTICE.monIds[PLAYER_APPRENTICE.questionsAnswered] >> 4;
+ gUnknown_030062F0->unkX = gApprentices[PLAYER_APPRENTICE.id].species[id1];
- id2 = PLAYER_APPRENTICE.monIds[PLAYER_APPRENTICE.field_B1_1] & 0xF;
+ id2 = PLAYER_APPRENTICE.monIds[PLAYER_APPRENTICE.questionsAnswered] & 0xF;
gUnknown_030062F0->unk0 = gApprentices[PLAYER_APPRENTICE.id].species[id2];
}
}
- else if (gSpecialVar_0x8005 == 3)
+ else if (gSpecialVar_0x8005 == APPRENTICE_QUESTION_WHICH_MOVE)
{
- if (PLAYER_APPRENTICE.field_B1_1 >= 3
- && PLAYER_APPRENTICE.field_B1_1 < count + 3
- && PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk0_0 == 2)
+ if (PLAYER_APPRENTICE.questionsAnswered >= 3
+ && PLAYER_APPRENTICE.questionsAnswered < count + 3
+ && PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.questionsAnswered - 3].unk0_0 == 2)
{
- count = PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk0_1;
+ count = PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.questionsAnswered - 3].unk0_1;
APPRENTICE_SPECIES_ID_2(id1, count);
gUnknown_030062F0->unk0 = gApprentices[PLAYER_APPRENTICE.id].species[id1];
- gUnknown_030062F0->unk4 = sub_81A0284(count, id1, PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk0_2);
- gUnknown_030062F0->unk6 = PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk2;
+ gUnknown_030062F0->unk4 = sub_81A0284(count, id1, PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.questionsAnswered - 3].unk0_2);
+ gUnknown_030062F0->unk6 = PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.questionsAnswered - 3].unk2;
}
}
- else if (gSpecialVar_0x8005 == 4)
+ else if (gSpecialVar_0x8005 == APPRENTICE_QUESTION_WHAT_ITEM)
{
- if (PLAYER_APPRENTICE.field_B1_1 >= 3
- && PLAYER_APPRENTICE.field_B1_1 < count + 3
- && PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk0_0 == 1)
+ if (PLAYER_APPRENTICE.questionsAnswered >= 3
+ && PLAYER_APPRENTICE.questionsAnswered < count + 3
+ && PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.questionsAnswered - 3].unk0_0 == 1)
{
- count = PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk0_1;
+ count = PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.questionsAnswered - 3].unk0_1;
APPRENTICE_SPECIES_ID_2(id2, count);
gUnknown_030062F0->unk0 = gApprentices[PLAYER_APPRENTICE.id].species[id2];
}
}
}
-static void sub_81A0FE4(void)
+static void FreeApprenticeQuestionData(void)
{
FREE_AND_SET_NULL(gUnknown_030062F0);
}
@@ -1974,7 +1984,7 @@ static void ApprenticeBufferString(void)
StringCopy(stringDst, gSpeciesNames[gUnknown_030062F0->unk0]);
break;
case APPRENTICE_BUFF_SPECIES2:
- StringCopy(stringDst, gSpeciesNames[gUnknown_030062F0->unk2]);
+ StringCopy(stringDst, gSpeciesNames[gUnknown_030062F0->unkX]);
break;
case APPRENTICE_BUFF_SPECIES3:
StringCopy(stringDst, gSpeciesNames[gUnknown_030062F0->unk0]);
@@ -1986,7 +1996,7 @@ static void ApprenticeBufferString(void)
StringCopy(stringDst, gMoveNames[gUnknown_030062F0->unk6]);
break;
case APPRENTICE_BUFF_ITEM:
- StringCopy(stringDst, ItemId_GetName(PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk2));
+ StringCopy(stringDst, ItemId_GetName(PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.questionsAnswered - 3].unk2));
break;
case APPRENTICE_BUFF_NAME:
TVShowConvertInternationalString(text, GetApprenticeNameInLanguage(PLAYER_APPRENTICE.id, LANGUAGE_ENGLISH), LANGUAGE_ENGLISH);
@@ -1998,14 +2008,14 @@ static void ApprenticeBufferString(void)
else // == APPRENTICE_LVL_MODE_OPEN
StringCopy(stringDst, gText_OpenLevel);
break;
- case APPRENTICE_BUFF_EASY_CHAT:
- FrontierSpeechToString(gSaveBlock2Ptr->apprentices[0].easyChatWords);
+ case APPRENTICE_BUFF_WIN_SPEECH:
+ FrontierSpeechToString(gSaveBlock2Ptr->apprentices[0].speechWon);
StringCopy(stringDst, gStringVar4);
break;
- case APPRENTICE_BUFF_SPECIES4:
- if (PLAYER_APPRENTICE.field_B1_2 < MULTI_PARTY_SIZE)
+ case APPRENTICE_BUFF_FIRST_MON_SPECIES:
+ if (PLAYER_APPRENTICE.firstMonId < MULTI_PARTY_SIZE)
{
- APPRENTICE_SPECIES_ID(speciesArrayId, PLAYER_APPRENTICE.field_B1_2);
+ APPRENTICE_SPECIES_ID(speciesArrayId, PLAYER_APPRENTICE.firstMonId);
}
else
{
@@ -2016,14 +2026,14 @@ static void ApprenticeBufferString(void)
}
}
-static void sub_81A11F8(void)
+static void SetFirstApprenticeMon(void)
{
- PLAYER_APPRENTICE.field_B1_2 = gSpecialVar_0x8005;
+ PLAYER_APPRENTICE.firstMonId = gSpecialVar_0x8005;
}
-static void sub_81A1218(void)
+static void Script_ApprenticeOpenBagMenu(void)
{
- sub_81AAC28();
+ ApprenticeOpenBagMenu();
}
static void sub_81A1224(void)
@@ -2031,36 +2041,36 @@ static void sub_81A1224(void)
u8 i, j;
u8 count;
- if (PLAYER_APPRENTICE.field_B1_1 < 3)
+ if (PLAYER_APPRENTICE.questionsAnswered < 3)
return;
for (count = 0, j = 0; j < 9 && PLAYER_APPRENTICE.field_B8[j].unk0_0; count++, j++)
;
- for (i = 0; i < count && i < PLAYER_APPRENTICE.field_B1_1 - 3; i++)
+ for (i = 0; i < count && i < PLAYER_APPRENTICE.questionsAnswered - 3; i++)
{
do {} while(0);
if (PLAYER_APPRENTICE.field_B8[i].unk0_0 == 1
&& PLAYER_APPRENTICE.field_B8[i].unk0_3
&& PLAYER_APPRENTICE.field_B8[i].unk2 == gSpecialVar_0x8005)
{
- PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk0_3 = 0;
- PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk2 = gSpecialVar_0x8005;
+ PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.questionsAnswered - 3].unk0_3 = 0;
+ PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.questionsAnswered - 3].unk2 = gSpecialVar_0x8005;
gSpecialVar_Result = FALSE;
return;
}
}
- PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk0_3 = 1;
- PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk2 = gSpecialVar_0x8005;
+ PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.questionsAnswered - 3].unk0_3 = 1;
+ PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.questionsAnswered - 3].unk2 = gSpecialVar_0x8005;
gSpecialVar_Result = TRUE;
}
static void sub_81A1370(void)
{
s32 i;
- s32 r10;
- s32 r9;
+ s32 apprenticeNum;
+ s32 apprenticeIdx;
if (gSaveBlock2Ptr->apprentices[0].playerName[0] == EOS)
return;
@@ -2074,20 +2084,20 @@ static void sub_81A1370(void)
}
}
- r10 = 0xFFFF;
- r9 = -1;
+ apprenticeNum = 0xFFFF;
+ apprenticeIdx = -1;
for (i = 1; i < TRAINER_ID_LENGTH; i++)
{
if (GetTrainerId(gSaveBlock2Ptr->apprentices[i].playerId) == GetTrainerId(gSaveBlock2Ptr->playerTrainerId)
- && gSaveBlock2Ptr->apprentices[i].number < r10)
+ && gSaveBlock2Ptr->apprentices[i].number < apprenticeNum)
{
- r10 = gSaveBlock2Ptr->apprentices[i].number;
- r9 = i;
+ apprenticeNum = gSaveBlock2Ptr->apprentices[i].number;
+ apprenticeIdx = i;
}
}
- if (r9 > 0)
- gSaveBlock2Ptr->apprentices[r9] = gSaveBlock2Ptr->apprentices[0];
+ if (apprenticeIdx > 0)
+ gSaveBlock2Ptr->apprentices[apprenticeIdx] = gSaveBlock2Ptr->apprentices[0];
}
static void sub_81A1438(void)
@@ -2113,7 +2123,8 @@ static void sub_81A1438(void)
CalcApprenticeChecksum(&gSaveBlock2Ptr->apprentices[0]);
}
-static void sub_81A150C(void)
+// Never called, APPRENTICE_FUNC_SET_GFX_SAVED is unused
+static void SetSavedApprenticeTrainerGfxId(void)
{
u8 i;
u8 mapObjectGfxId;
@@ -2138,7 +2149,7 @@ static void sub_81A150C(void)
}
}
-static void Script_SetPlayerApprenticeTrainerGfxId(void)
+static void SetPlayerApprenticeTrainerGfxId(void)
{
u8 i;
u8 mapObjectGfxId;
@@ -2162,9 +2173,9 @@ static void Script_SetPlayerApprenticeTrainerGfxId(void)
}
}
-// Both of the below functions may have dummied / used for debug
+// Both of the below functions may have been dummied / used for debug
// In all cases theres a conditional for VAR_0x8004 right after the call to these functions
-static void SetVar0x8004True1(void)
+static void GetShouldCheckApprenticeGone(void)
{
gSpecialVar_0x8004 = TRUE;
}
@@ -2196,7 +2207,8 @@ const u8 *GetApprenticeNameInLanguage(u32 apprenticeId, s32 language)
}
}
-static void sub_81A16B4(u8 taskId)
+// Functionally unused
+static void Task_SwitchToFollowupFuncAfterButtonPress(u8 taskId)
{
if (gMain.newKeys & A_BUTTON || gMain.newKeys & B_BUTTON)
SwitchTaskToFollowupFunc(taskId);
@@ -2219,8 +2231,9 @@ static void ExecuteFuncAfterButtonPress(void (*func)(void))
gTasks[taskId].data[1] = (u32)(func) >> 16;
}
-static void sub_81A175C(TaskFunc taskFunc)
+// Unused
+static void ExecuteFollowupFuncAfterButtonPress(TaskFunc task)
{
- u8 taskId = CreateTask(sub_81A16B4, 1);
- SetTaskFuncWithFollowupFunc(taskId, sub_81A16B4, taskFunc);
+ u8 taskId = CreateTask(Task_SwitchToFollowupFuncAfterButtonPress, 1);
+ SetTaskFuncWithFollowupFunc(taskId, Task_SwitchToFollowupFuncAfterButtonPress, task);
}
diff --git a/src/easy_chat.c b/src/easy_chat.c
index ce5fe3c7a..32478ff1a 100644
--- a/src/easy_chat.c
+++ b/src/easy_chat.c
@@ -1320,7 +1320,7 @@ void ShowEasyChatScreen(void)
words = &gSaveBlock1Ptr->lilycoveLady.quiz.correctAnswer;
break;
case EASY_CHAT_TYPE_APPRENTICE:
- words = gSaveBlock2Ptr->apprentices[0].easyChatWords;
+ words = gSaveBlock2Ptr->apprentices[0].speechWon;
break;
case EASY_CHAT_TYPE_QUESTIONNAIRE:
words = sub_801B058();
diff --git a/src/frontier_util.c b/src/frontier_util.c
index baf830af9..c32bdc19d 100644
--- a/src/frontier_util.c
+++ b/src/frontier_util.c
@@ -1725,7 +1725,7 @@ void CopyFrontierTrainerText(u8 whichText, u16 trainerId)
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED)
FrontierSpeechToString(GetRecordedBattleEasyChatSpeech());
else
- FrontierSpeechToString(gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].easyChatWords);
+ FrontierSpeechToString(gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].speechWon);
}
break;
case FRONTIER_PLAYER_WON_TEXT:
@@ -1753,12 +1753,12 @@ void CopyFrontierTrainerText(u8 whichText, u16 trainerId)
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED)
{
trainerId = GetRecordedBattleApprenticeId();
- FrontierSpeechToString(gApprentices[trainerId].easyChatWords);
+ FrontierSpeechToString(gApprentices[trainerId].speechLost);
}
else
{
trainerId = gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].id;
- FrontierSpeechToString(gApprentices[trainerId].easyChatWords);
+ FrontierSpeechToString(gApprentices[trainerId].speechLost);
}
}
break;
diff --git a/src/item_menu.c b/src/item_menu.c
index 40a0f0439..7f7808479 100755
--- a/src/item_menu.c
+++ b/src/item_menu.c
@@ -119,7 +119,7 @@ void sub_81AD9C0(u8);
void sub_81ADB14(u8);
void sub_81ADA7C(u8);
void sub_81ADC0C(u8);
-void bag_menu_leave_maybe(void);
+void CB2_ApprenticeExitBagMenu(void);
void CB2_FavorLadyExitBagMenu(void);
void CB2_QuizLadyExitBagMenu(void);
void sub_81ABA6C(void);
@@ -492,9 +492,9 @@ void sub_81AAC14(void)
GoToBagMenu(RETURN_LOCATION_PC, POCKETS_COUNT, sub_816B31C);
}
-void sub_81AAC28(void)
+void ApprenticeOpenBagMenu(void)
{
- GoToBagMenu(RETURN_LOCATION_FIELD_6, POCKETS_COUNT, bag_menu_leave_maybe);
+ GoToBagMenu(RETURN_LOCATION_FIELD_6, POCKETS_COUNT, CB2_ApprenticeExitBagMenu);
gSpecialVar_0x8005 = 0;
gSpecialVar_Result = 0;
}
@@ -2203,7 +2203,7 @@ void unknown_ItemMenu_Show(u8 taskId)
unknown_ItemMenu_Confirm(taskId);
}
-void bag_menu_leave_maybe(void)
+void CB2_ApprenticeExitBagMenu(void)
{
gFieldCallback = Apprentice_EnableBothScriptContexts;
SetMainCallback2(CB2_ReturnToField);
diff --git a/src/recorded_battle.c b/src/recorded_battle.c
index bd1974d48..bde2b7bb6 100644
--- a/src/recorded_battle.c
+++ b/src/recorded_battle.c
@@ -409,12 +409,12 @@ bool32 MoveRecordedBattleToSaveData(void)
if (sBattleOutcome == B_OUTCOME_WON)
{
- for (i = 0; i < 6; i++)
+ for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++)
battleSave->easyChatSpeech[i] = gSaveBlock2Ptr->frontier.towerRecords[gTrainerBattleOpponent_A - TRAINER_RECORD_MIXING_FRIEND].speechLost[i];
}
else
{
- for (i = 0; i < 6; i++)
+ for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++)
battleSave->easyChatSpeech[i] = gSaveBlock2Ptr->frontier.towerRecords[gTrainerBattleOpponent_A - TRAINER_RECORD_MIXING_FRIEND].speechWon[i];
}
battleSave->recordMixFriendLanguage = gSaveBlock2Ptr->frontier.towerRecords[gTrainerBattleOpponent_A - TRAINER_RECORD_MIXING_FRIEND].language;
@@ -427,12 +427,12 @@ bool32 MoveRecordedBattleToSaveData(void)
if (sBattleOutcome == B_OUTCOME_WON)
{
- for (i = 0; i < 6; i++)
+ for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++)
battleSave->easyChatSpeech[i] = gSaveBlock2Ptr->frontier.towerRecords[gTrainerBattleOpponent_B - TRAINER_RECORD_MIXING_FRIEND].speechLost[i];
}
else
{
- for (i = 0; i < 6; i++)
+ for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++)
battleSave->easyChatSpeech[i] = gSaveBlock2Ptr->frontier.towerRecords[gTrainerBattleOpponent_B - TRAINER_RECORD_MIXING_FRIEND].speechWon[i];
}
battleSave->recordMixFriendLanguage = gSaveBlock2Ptr->frontier.towerRecords[gTrainerBattleOpponent_B - TRAINER_RECORD_MIXING_FRIEND].language;
@@ -449,15 +449,15 @@ bool32 MoveRecordedBattleToSaveData(void)
if (gTrainerBattleOpponent_A >= TRAINER_RECORD_MIXING_APPRENTICE)
{
battleSave->apprenticeId = gSaveBlock2Ptr->apprentices[gTrainerBattleOpponent_A - TRAINER_RECORD_MIXING_APPRENTICE].id;
- for (i = 0; i < 6; i++)
- battleSave->easyChatSpeech[i] = gSaveBlock2Ptr->apprentices[gTrainerBattleOpponent_A - TRAINER_RECORD_MIXING_APPRENTICE].easyChatWords[i];
+ for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++)
+ battleSave->easyChatSpeech[i] = gSaveBlock2Ptr->apprentices[gTrainerBattleOpponent_A - TRAINER_RECORD_MIXING_APPRENTICE].speechWon[i];
battleSave->apprenticeLanguage = gSaveBlock2Ptr->apprentices[gTrainerBattleOpponent_A - TRAINER_RECORD_MIXING_APPRENTICE].language;
}
else if (gTrainerBattleOpponent_B >= TRAINER_RECORD_MIXING_APPRENTICE)
{
battleSave->apprenticeId = gSaveBlock2Ptr->apprentices[gTrainerBattleOpponent_B - TRAINER_RECORD_MIXING_APPRENTICE].id;
- for (i = 0; i < 6; i++)
- battleSave->easyChatSpeech[i] = gSaveBlock2Ptr->apprentices[gTrainerBattleOpponent_B - TRAINER_RECORD_MIXING_APPRENTICE].easyChatWords[i];
+ for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++)
+ battleSave->easyChatSpeech[i] = gSaveBlock2Ptr->apprentices[gTrainerBattleOpponent_B - TRAINER_RECORD_MIXING_APPRENTICE].speechWon[i];
battleSave->apprenticeLanguage = gSaveBlock2Ptr->apprentices[gTrainerBattleOpponent_B - TRAINER_RECORD_MIXING_APPRENTICE].language;
}
else if (gPartnerTrainerId >= TRAINER_RECORD_MIXING_APPRENTICE)