mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Merge pull request #909 from GriffinRichards/doc-apprentice
Document Apprentice
This commit is contained in:
commit
bef6150b59
@ -32,4 +32,138 @@ 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_shufflespecies
|
||||
setvar VAR_0x8004, APPRENTICE_FUNC_SHUFFLE_SPECIES
|
||||
special CallApprenticeFunction
|
||||
.endm
|
||||
|
||||
.macro apprentice_randomizequestions
|
||||
setvar VAR_0x8004, APPRENTICE_FUNC_RANDOMIZE_QUESTIONS
|
||||
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
|
||||
.if \tobuff >= VARS_START
|
||||
copyvar VAR_0x8006, \tobuff
|
||||
.else
|
||||
setvar VAR_0x8006, \tobuff
|
||||
.endif
|
||||
special CallApprenticeFunction
|
||||
.endm
|
||||
|
||||
.macro apprentice_setmove
|
||||
setvar VAR_0x8004, APPRENTICE_FUNC_SET_MOVE
|
||||
special CallApprenticeFunction
|
||||
.endm
|
||||
|
||||
.macro apprentice_setleadmon monId:req
|
||||
copyvar VAR_0x8005, \monId
|
||||
setvar VAR_0x8004, APPRENTICE_FUNC_SET_LEAD_MON
|
||||
special CallApprenticeFunction
|
||||
.endm
|
||||
|
||||
.macro apprentice_openbag
|
||||
setvar VAR_0x8004, APPRENTICE_FUNC_OPEN_BAG
|
||||
special CallApprenticeFunction
|
||||
waitstate
|
||||
.endm
|
||||
|
||||
.macro apprentice_trysetitem
|
||||
setvar VAR_0x8004, APPRENTICE_FUNC_TRY_SET_HELD_ITEM
|
||||
special CallApprenticeFunction
|
||||
.endm
|
||||
|
||||
.macro apprentice_save
|
||||
setvar VAR_0x8004, APPRENTICE_FUNC_SAVE
|
||||
special CallApprenticeFunction
|
||||
.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
|
||||
|
||||
.macro apprentice_shiftsaved
|
||||
setvar VAR_0x8004, APPRENTICE_FUNC_SHIFT_SAVED
|
||||
special CallApprenticeFunction
|
||||
.endm
|
||||
|
@ -1,3 +1,3 @@
|
||||
gUnknown_030062EC
|
||||
gUnknown_030062F0
|
||||
gUnknown_030062F4
|
||||
gApprenticePartyMovesData
|
||||
gApprenticeQuestionData
|
||||
gApprenticeFunc
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "constants/global.h"
|
||||
#include "constants/apprentice.h"
|
||||
#include "constants/battle.h"
|
||||
#include "constants/battle_frontier.h"
|
||||
#include "constants/battle_pike.h"
|
||||
@ -1111,6 +1112,7 @@ Common_EventScript_LegendaryFlewAway:: @ 8273776
|
||||
.include "data/scripts/lilycove_lady.inc"
|
||||
.include "data/text/match_call.inc"
|
||||
.include "data/scripts/apprentice.inc"
|
||||
.include "data/text/apprentice.inc"
|
||||
.include "data/text/battle_dome.inc"
|
||||
.include "data/scripts/battle_pike.inc"
|
||||
.include "data/text/blend_master.inc"
|
||||
|
@ -89,7 +89,7 @@
|
||||
"movement_range_y": 1,
|
||||
"trainer_type": "0",
|
||||
"trainer_sight_or_berry_tree_id": "0",
|
||||
"script": "EventScript_Apprentice",
|
||||
"script": "BattleFrontier_BattleTowerLobby_EventScript_Apprentice",
|
||||
"flag": "FLAG_HIDE_APPRENTICE"
|
||||
},
|
||||
{
|
||||
|
@ -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, 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, 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
|
||||
|
File diff suppressed because it is too large
Load Diff
2527
data/text/apprentice.inc
Normal file
2527
data/text/apprentice.inc
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,21 +1,21 @@
|
||||
#ifndef GUARD_APPRENTICE_H
|
||||
#define GUARD_APPRENTICE_H
|
||||
|
||||
#define APPRENTICE_SPECIES_COUNT 10
|
||||
#include "constants/apprentice.h"
|
||||
|
||||
struct ApprenticeTrainer
|
||||
{
|
||||
u8 name[6][PLAYER_NAME_LENGTH + 1]; // For all six languages.
|
||||
u8 name[NUM_LANGUAGES - 1][PLAYER_NAME_LENGTH + 1]; // For all languages except the unused one.
|
||||
u16 otId;
|
||||
u8 facilityClass;
|
||||
u16 species[APPRENTICE_SPECIES_COUNT];
|
||||
u8 id;
|
||||
u16 easyChatWords[6];
|
||||
u16 speechLost[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
};
|
||||
|
||||
extern const struct ApprenticeTrainer gApprentices[];
|
||||
|
||||
void CopyFriendsApprenticeChallengeText(u8 saveblockApprenticeId);
|
||||
void BufferApprenticeChallengeText(u8 saveApprenticeId);
|
||||
void Apprentice_EnableBothScriptContexts(void);
|
||||
void ResetApprenticeStruct(struct Apprentice *apprentice);
|
||||
void ResetAllApprenticeData(void);
|
||||
|
@ -1,6 +1,72 @@
|
||||
#ifndef GUARD_CONSTANTS_APPRENTICE_H
|
||||
#define GUARD_CONSTANTS_APPRENTICE_H
|
||||
|
||||
#define NUM_APPRENTICES 16
|
||||
#define APPRENTICE_SPECIES_COUNT 10
|
||||
|
||||
#define NUM_WHICH_MON_QUESTIONS MULTI_PARTY_SIZE
|
||||
#define NUM_WHICH_MOVE_QUESTIONS 5
|
||||
|
||||
#define APPRENTICE_LVL_MODE_50 (FRONTIER_LVL_50 + 1)
|
||||
#define APPRENTICE_LVL_MODE_OPEN (FRONTIER_LVL_OPEN + 1)
|
||||
|
||||
#define APPRENTICE_FUNC_GAVE_LVLMODE 0
|
||||
#define APPRENTICE_FUNC_SET_LVLMODE 1
|
||||
#define APPRENTICE_FUNC_SET_ID 2
|
||||
#define APPRENTICE_FUNC_SHUFFLE_SPECIES 3
|
||||
#define APPRENTICE_FUNC_RANDOMIZE_QUESTIONS 4
|
||||
#define APPRENTICE_FUNC_ANSWERED_QUESTION 5
|
||||
#define APPRENTICE_FUNC_IS_FINAL_QUESTION 6
|
||||
#define APPRENTICE_FUNC_MENU 7
|
||||
#define APPRENTICE_FUNC_PRINT_MSG 8
|
||||
#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_LEAD_MON 18
|
||||
#define APPRENTICE_FUNC_OPEN_BAG 19
|
||||
#define APPRENTICE_FUNC_TRY_SET_HELD_ITEM 20
|
||||
#define APPRENTICE_FUNC_SAVE 21
|
||||
#define APPRENTICE_FUNC_SET_GFX_SAVED 22
|
||||
#define APPRENTICE_FUNC_SET_GFX 23
|
||||
#define APPRENTICE_FUNC_SHOULD_LEAVE 24
|
||||
#define APPRENTICE_FUNC_SHIFT_SAVED 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
|
||||
|
||||
// Would be redundant with the above set if they used the same values
|
||||
#define QUESTION_ID_WIN_SPEECH 0
|
||||
#define QUESTION_ID_WHAT_ITEM 1
|
||||
#define QUESTION_ID_WHICH_MOVE 2
|
||||
#define QUESTION_ID_WHICH_FIRST 3
|
||||
|
||||
#define APPRENTICE_ASK_WHICH_LEVEL 0
|
||||
#define APPRENTICE_ASK_3SPECIES 1
|
||||
#define APPRENTICE_ASK_2SPECIES 2
|
||||
@ -15,8 +81,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_LEAD_MON_SPECIES 9
|
||||
|
||||
#endif // GUARD_CONSTANTS_APPRENTICE_H
|
||||
|
@ -24,6 +24,7 @@
|
||||
#define LANGUAGE_GERMAN 5
|
||||
#define LANGUAGE_KOREAN 6 // 6 goes unused but the theory is it was meant to be Korean
|
||||
#define LANGUAGE_SPANISH 7
|
||||
#define NUM_LANGUAGES 7
|
||||
|
||||
#define GAME_VERSION (VERSION_EMERALD)
|
||||
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
|
||||
@ -48,6 +49,8 @@
|
||||
#define EVENT_OBJECT_TEMPLATES_COUNT 64
|
||||
#define DECOR_MAX_SECRET_BASE 16
|
||||
#define DECOR_MAX_PLAYERS_HOUSE 12
|
||||
#define APPRENTICE_COUNT 4
|
||||
#define APPRENTICE_MAX_QUESTIONS 9
|
||||
|
||||
#define PYRAMID_BAG_ITEMS_COUNT 10
|
||||
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.
|
||||
@ -63,6 +66,7 @@
|
||||
#define POKEMON_NAME_LENGTH 10
|
||||
#define PLAYER_NAME_LENGTH 7
|
||||
#define MAIL_WORDS_COUNT 9
|
||||
#define EASY_CHAT_BATTLE_WORDS_COUNT 6
|
||||
#define MOVE_NAME_LENGTH 12
|
||||
|
||||
#define MALE 0
|
||||
|
@ -195,6 +195,10 @@
|
||||
#define MON_ALREADY_KNOWS_MOVE 0xFFFE
|
||||
#define MON_HAS_MAX_MOVES 0xFFFF
|
||||
|
||||
#define LEVEL_UP_MOVE_ID 0x01FF
|
||||
#define LEVEL_UP_MOVE_LV 0xFE00
|
||||
#define LEVEL_UP_END 0xFFFF
|
||||
|
||||
#define MON_MALE 0x00
|
||||
#define MON_FEMALE 0xFE
|
||||
#define MON_GENDERLESS 0xFF
|
||||
|
@ -214,14 +214,16 @@ struct ApprenticeMon
|
||||
u16 item;
|
||||
};
|
||||
|
||||
// This is for past players Apprentices or Apprentices received via Record Mix.
|
||||
// For the current Apprentice, see struct PlayersApprentice
|
||||
struct Apprentice
|
||||
{
|
||||
u8 id:5;
|
||||
u8 lvlMode:2; // + 1
|
||||
u8 field_1;
|
||||
u8 numQuestions;
|
||||
u8 number;
|
||||
struct ApprenticeMon party[MULTI_PARTY_SIZE];
|
||||
u16 easyChatWords[6];
|
||||
u16 speechWon[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
u8 playerId[TRAINER_ID_LENGTH];
|
||||
u8 playerName[PLAYER_NAME_LENGTH];
|
||||
u8 language;
|
||||
@ -264,9 +266,9 @@ struct EmeraldBattleTowerRecord
|
||||
/*0x02*/ u16 winStreak;
|
||||
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0C*/ u8 trainerId[TRAINER_ID_LENGTH];
|
||||
/*0x10*/ u16 greeting[6];
|
||||
/*0x1C*/ u16 speechWon[6];
|
||||
/*0x28*/ u16 speechLost[6];
|
||||
/*0x10*/ u16 greeting[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x1C*/ u16 speechWon[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x28*/ u16 speechLost[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x34*/ struct BattleTowerPokemon party[4];
|
||||
/*0xE4*/ u8 language;
|
||||
/*0xE8*/ u32 checksum;
|
||||
@ -279,9 +281,9 @@ struct BattleTowerEReaderTrainer
|
||||
/*0x02*/ u16 winStreak;
|
||||
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0C*/ u8 trainerId[TRAINER_ID_LENGTH];
|
||||
/*0x10*/ u16 greeting[6];
|
||||
/*0x1C*/ u16 farewellPlayerLost[6];
|
||||
/*0x28*/ u16 farewellPlayerWon[6];
|
||||
/*0x10*/ u16 greeting[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x1C*/ u16 farewellPlayerLost[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x28*/ u16 farewellPlayerWon[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x34*/ struct BattleTowerPokemon party[FRONTIER_PARTY_SIZE];
|
||||
/*0xB8*/ u32 checksum;
|
||||
};
|
||||
@ -401,26 +403,26 @@ struct BattleFrontier
|
||||
/*0xEFC*/ struct FrontierMonData field_EFC[3];
|
||||
};
|
||||
|
||||
struct Sav2_B8
|
||||
struct ApprenticeQuestion
|
||||
{
|
||||
u8 unk0_0:2;
|
||||
u8 unk0_1:2;
|
||||
u8 unk0_2:2;
|
||||
u8 unk0_3:2;
|
||||
u16 unk2;
|
||||
u8 questionId:2;
|
||||
u8 monId:2;
|
||||
u8 moveSlot:2;
|
||||
u8 suggestedChange:2; // TRUE if told to use held item or second move, FALSE if told to use no item or first move
|
||||
u16 data; // used both as an itemId and a moveId
|
||||
};
|
||||
|
||||
struct PlayersApprentice
|
||||
{
|
||||
/*0xB0*/ u8 id;
|
||||
/*0xB1*/ u8 activeLvlMode:2; // +1, 0 means not active
|
||||
/*0xB1*/ u8 field_B1_1:4;
|
||||
/*0xB1*/ u8 field_B1_2:2;
|
||||
/*0xB2*/ u8 field_B2_0:3;
|
||||
/*0xB2*/ u8 field_B2_1:2;
|
||||
/*0xB3*/ u8 field_B3;
|
||||
/*0xB4*/ u8 monIds[MULTI_PARTY_SIZE];
|
||||
/*0xB8*/ struct Sav2_B8 field_B8[9];
|
||||
/*0xB1*/ u8 lvlMode:2; //0: Unassigned, 1: Lv 50, 2: Open Lv
|
||||
/*0xB1*/ u8 questionsAnswered:4;
|
||||
/*0xB1*/ u8 leadMonId:2;
|
||||
/*0xB2*/ u8 party:3;
|
||||
/*0xB2*/ u8 saveId:2;
|
||||
/*0xB3*/ u8 unused;
|
||||
/*0xB4*/ u8 speciesIds[MULTI_PARTY_SIZE];
|
||||
/*0xB8*/ struct ApprenticeQuestion questions[APPRENTICE_MAX_QUESTIONS];
|
||||
};
|
||||
|
||||
struct RankingHall1P
|
||||
@ -465,7 +467,7 @@ struct SaveBlock2
|
||||
/*0xA8*/ u32 field_A8; // Written to, but never read.
|
||||
/*0xAC*/ u32 encryptionKey;
|
||||
/*0xB0*/ struct PlayersApprentice playerApprentice;
|
||||
/*0xDC*/ struct Apprentice apprentices[4]; // From record mixing.
|
||||
/*0xDC*/ struct Apprentice apprentices[APPRENTICE_COUNT];
|
||||
/*0x1EC*/ struct BerryCrush berryCrush;
|
||||
/*0x1FC*/ struct PokemonJumpResults pokeJump;
|
||||
/*0x20C*/ struct BerryPickingResults berryPick;
|
||||
@ -949,10 +951,10 @@ struct SaveBlock1
|
||||
/*0x2BA1*/ u8 outbreakPokemonProbability;
|
||||
/*0x2BA2*/ u16 outbreakDaysLeft;
|
||||
/*0x2BA4*/ struct GabbyAndTyData gabbyAndTyData;
|
||||
/*0x2BB0*/ u16 easyChatProfile[6];
|
||||
/*0x2BBC*/ u16 easyChatBattleStart[6];
|
||||
/*0x2BC8*/ u16 easyChatBattleWon[6];
|
||||
/*0x2BD4*/ u16 easyChatBattleLost[6];
|
||||
/*0x2BB0*/ u16 easyChatProfile[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x2BBC*/ u16 easyChatBattleStart[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x2BC8*/ u16 easyChatBattleWon[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x2BD4*/ u16 easyChatBattleLost[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x2BE0*/ struct MailStruct mail[MAIL_COUNT];
|
||||
/*0x2E20*/ u8 additionalPhrases[8]; // bitfield for 33 additional phrases in easy chat system
|
||||
/*0x2E28*/ OldMan oldMan;
|
||||
|
@ -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);
|
||||
|
@ -2400,6 +2400,10 @@ extern const u8 gUnknown_085EDC45[];
|
||||
extern const u8 gUnknown_085EDB00[];
|
||||
extern const u8 gUnknown_085EDC84[];
|
||||
|
||||
// Apprentice
|
||||
extern const u8 gText_Give[];
|
||||
extern const u8 gText_NoNeed[];
|
||||
|
||||
// Easy Chat Entry
|
||||
extern const u8 gText_StopGivingPkmnMail[];
|
||||
extern const u8 gText_LikeToQuitQuiz[];
|
||||
|
1853
src/apprentice.c
1853
src/apprentice.c
File diff suppressed because it is too large
Load Diff
@ -1272,10 +1272,10 @@ static bool8 ChooseSpecialBattleTowerTrainer(void)
|
||||
if (battleMode == FRONTIER_MODE_SINGLES)
|
||||
{
|
||||
ValidateApprenticesChecksums();
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < APPRENTICE_COUNT; i++)
|
||||
{
|
||||
if (gSaveBlock2Ptr->apprentices[i].lvlMode != 0
|
||||
&& gUnknown_085DF9EC[gSaveBlock2Ptr->apprentices[i].field_1] == winStreak
|
||||
&& gUnknown_085DF9EC[gSaveBlock2Ptr->apprentices[i].numQuestions] == winStreak
|
||||
&& gSaveBlock2Ptr->apprentices[i].lvlMode - 1 == lvlMode)
|
||||
{
|
||||
trainerIds[idsCount] = i + TRAINER_RECORD_MIXING_APPRENTICE;
|
||||
@ -2000,7 +2000,7 @@ static void Unused_CreateApprenticeMons(u16 trainerId, u8 firstMonId)
|
||||
u8 fixedIV = 0;
|
||||
struct Apprentice *apprentice = &gSaveBlock2Ptr->apprentices[0];
|
||||
|
||||
if (apprentice->field_1 < 5)
|
||||
if (apprentice->numQuestions < 5)
|
||||
fixedIV = 6;
|
||||
else
|
||||
fixedIV = 9;
|
||||
@ -2178,7 +2178,7 @@ static void sub_8163914(void)
|
||||
else if (trainerId < TRAINER_RECORD_MIXING_APPRENTICE)
|
||||
FrontierSpeechToString(gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].greeting);
|
||||
else
|
||||
CopyFriendsApprenticeChallengeText(trainerId - TRAINER_RECORD_MIXING_APPRENTICE);
|
||||
BufferApprenticeChallengeText(trainerId - TRAINER_RECORD_MIXING_APPRENTICE);
|
||||
}
|
||||
|
||||
static void HandleSpecialTrainerBattleEnd(void)
|
||||
@ -2569,10 +2569,10 @@ static void sub_81642A0(void)
|
||||
|
||||
r10 = 0;
|
||||
ValidateApprenticesChecksums();
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < APPRENTICE_COUNT; i++)
|
||||
{
|
||||
if (gSaveBlock2Ptr->apprentices[i].lvlMode != 0
|
||||
&& gUnknown_085DF9EC[gSaveBlock2Ptr->apprentices[i].field_1] / 7 <= challengeNum
|
||||
&& gUnknown_085DF9EC[gSaveBlock2Ptr->apprentices[i].numQuestions] / 7 <= challengeNum
|
||||
&& gSaveBlock2Ptr->apprentices[i].lvlMode - 1 == lvlMode)
|
||||
{
|
||||
k = 0;
|
||||
@ -3393,7 +3393,7 @@ static void ValidateApprenticesChecksums(void)
|
||||
{
|
||||
s32 i, j;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < APPRENTICE_COUNT; i++)
|
||||
{
|
||||
u32 *data = (u32*) &gSaveBlock2Ptr->apprentices[i];
|
||||
u32 checksum = 0;
|
||||
|
982
src/data/battle_frontier/apprentice.h
Normal file
982
src/data/battle_frontier/apprentice.h
Normal file
@ -0,0 +1,982 @@
|
||||
// data/text/apprentice.inc
|
||||
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[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching3[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching4[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching5[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching6[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching7[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching8[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching9[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching10[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching11[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching12[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching13[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching14[];
|
||||
extern const u8 gText_ApprenticeRejectTeaching15[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode0[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode1[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode2[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode3[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode4[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode5[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode6[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode7[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode8[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode9[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode10[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode11[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode12[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode13[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode14[];
|
||||
extern const u8 gText_ApprenticeWhichLevelMode15[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks0[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks1[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks2[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks3[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks4[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks5[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks6[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks7[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks8[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks9[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks10[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks11[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks12[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks13[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks14[];
|
||||
extern const u8 gText_ApprenticeLevelModeThanks15[];
|
||||
|
||||
extern const u8 gText_ApprenticeWhichMon0[];
|
||||
extern const u8 gText_ApprenticeWhichMon1[];
|
||||
extern const u8 gText_ApprenticeWhichMon2[];
|
||||
extern const u8 gText_ApprenticeWhichMon3[];
|
||||
extern const u8 gText_ApprenticeWhichMon4[];
|
||||
extern const u8 gText_ApprenticeWhichMon5[];
|
||||
extern const u8 gText_ApprenticeWhichMon6[];
|
||||
extern const u8 gText_ApprenticeWhichMon7[];
|
||||
extern const u8 gText_ApprenticeWhichMon8[];
|
||||
extern const u8 gText_ApprenticeWhichMon9[];
|
||||
extern const u8 gText_ApprenticeWhichMon10[];
|
||||
extern const u8 gText_ApprenticeWhichMon11[];
|
||||
extern const u8 gText_ApprenticeWhichMon12[];
|
||||
extern const u8 gText_ApprenticeWhichMon13[];
|
||||
extern const u8 gText_ApprenticeWhichMon14[];
|
||||
extern const u8 gText_ApprenticeWhichMon15[];
|
||||
extern const u8 gText_ApprenticeMonThanks0[];
|
||||
extern const u8 gText_ApprenticeMonThanks1[];
|
||||
extern const u8 gText_ApprenticeMonThanks2[];
|
||||
extern const u8 gText_ApprenticeMonThanks3[];
|
||||
extern const u8 gText_ApprenticeMonThanks4[];
|
||||
extern const u8 gText_ApprenticeMonThanks5[];
|
||||
extern const u8 gText_ApprenticeMonThanks6[];
|
||||
extern const u8 gText_ApprenticeMonThanks7[];
|
||||
extern const u8 gText_ApprenticeMonThanks8[];
|
||||
extern const u8 gText_ApprenticeMonThanks9[];
|
||||
extern const u8 gText_ApprenticeMonThanks10[];
|
||||
extern const u8 gText_ApprenticeMonThanks11[];
|
||||
extern const u8 gText_ApprenticeMonThanks12[];
|
||||
extern const u8 gText_ApprenticeMonThanks13[];
|
||||
extern const u8 gText_ApprenticeMonThanks14[];
|
||||
extern const u8 gText_ApprenticeMonThanks15[];
|
||||
|
||||
extern const u8 gText_ApprenticeWhatHeldItem0[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem1[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem2[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem3[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem4[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem5[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem6[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem7[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem8[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem9[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem10[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem11[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem12[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem13[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem14[];
|
||||
extern const u8 gText_ApprenticeWhatHeldItem15[];
|
||||
extern const u8 gText_ApprenticeHoldNothing0[];
|
||||
extern const u8 gText_ApprenticeHoldNothing1[];
|
||||
extern const u8 gText_ApprenticeHoldNothing2[];
|
||||
extern const u8 gText_ApprenticeHoldNothing3[];
|
||||
extern const u8 gText_ApprenticeHoldNothing4[];
|
||||
extern const u8 gText_ApprenticeHoldNothing5[];
|
||||
extern const u8 gText_ApprenticeHoldNothing6[];
|
||||
extern const u8 gText_ApprenticeHoldNothing7[];
|
||||
extern const u8 gText_ApprenticeHoldNothing8[];
|
||||
extern const u8 gText_ApprenticeHoldNothing9[];
|
||||
extern const u8 gText_ApprenticeHoldNothing10[];
|
||||
extern const u8 gText_ApprenticeHoldNothing11[];
|
||||
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[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem3[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem4[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem5[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem6[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem7[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem8[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem9[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem10[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem11[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem12[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem13[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem14[];
|
||||
extern const u8 gText_ApprenticeThanksHeldItem15[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended0[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended1[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended2[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended3[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended4[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended5[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended6[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended7[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended8[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended9[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended10[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended11[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended12[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended13[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended14[];
|
||||
extern const u8 gText_ApprenticeItemAlreadyRecommended15[];
|
||||
|
||||
extern const u8 gText_ApprenticeWhichMove0[];
|
||||
extern const u8 gText_ApprenticeWhichMove1[];
|
||||
extern const u8 gText_ApprenticeWhichMove2[];
|
||||
extern const u8 gText_ApprenticeWhichMove3[];
|
||||
extern const u8 gText_ApprenticeWhichMove4[];
|
||||
extern const u8 gText_ApprenticeWhichMove5[];
|
||||
extern const u8 gText_ApprenticeWhichMove6[];
|
||||
extern const u8 gText_ApprenticeWhichMove7[];
|
||||
extern const u8 gText_ApprenticeWhichMove8[];
|
||||
extern const u8 gText_ApprenticeWhichMove9[];
|
||||
extern const u8 gText_ApprenticeWhichMove10[];
|
||||
extern const u8 gText_ApprenticeWhichMove11[];
|
||||
extern const u8 gText_ApprenticeWhichMove12[];
|
||||
extern const u8 gText_ApprenticeWhichMove13[];
|
||||
extern const u8 gText_ApprenticeWhichMove14[];
|
||||
extern const u8 gText_ApprenticeWhichMove15[];
|
||||
extern const u8 gText_ApprenticeMoveThanks0[];
|
||||
extern const u8 gText_ApprenticeMoveThanks1[];
|
||||
extern const u8 gText_ApprenticeMoveThanks2[];
|
||||
extern const u8 gText_ApprenticeMoveThanks3[];
|
||||
extern const u8 gText_ApprenticeMoveThanks4[];
|
||||
extern const u8 gText_ApprenticeMoveThanks5[];
|
||||
extern const u8 gText_ApprenticeMoveThanks6[];
|
||||
extern const u8 gText_ApprenticeMoveThanks7[];
|
||||
extern const u8 gText_ApprenticeMoveThanks8[];
|
||||
extern const u8 gText_ApprenticeMoveThanks9[];
|
||||
extern const u8 gText_ApprenticeMoveThanks10[];
|
||||
extern const u8 gText_ApprenticeMoveThanks11[];
|
||||
extern const u8 gText_ApprenticeMoveThanks12[];
|
||||
extern const u8 gText_ApprenticeMoveThanks13[];
|
||||
extern const u8 gText_ApprenticeMoveThanks14[];
|
||||
extern const u8 gText_ApprenticeMoveThanks15[];
|
||||
|
||||
extern const u8 gText_ApprenticeWhichMonFirst0[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst1[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst2[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst3[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst4[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst5[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst6[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst7[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst8[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst9[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst10[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst11[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst12[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst13[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst14[];
|
||||
extern const u8 gText_ApprenticeWhichMonFirst15[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks0[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks1[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks2[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks3[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks4[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks5[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks6[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks7[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks8[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks9[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks10[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks11[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks12[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks13[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks14[];
|
||||
extern const u8 gText_ApprenticeMonFirstThanks15[];
|
||||
|
||||
extern const u8 gText_ApprenticePickWinSpeech0[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech1[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech2[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech3[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech4[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech5[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech6[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech7[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech8[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech9[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech10[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech11[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech12[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech13[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech14[];
|
||||
extern const u8 gText_ApprenticePickWinSpeech15[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks0[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks1[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks2[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks3[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks4[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks5[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks6[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks7[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks8[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks9[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks10[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks11[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks12[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks13[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks14[];
|
||||
extern const u8 gText_ApprenticeWinSpeechThanks15[];
|
||||
|
||||
extern const u8 gText_ApprenticeChallenge0[];
|
||||
extern const u8 gText_ApprenticeChallenge1[];
|
||||
extern const u8 gText_ApprenticeChallenge2[];
|
||||
extern const u8 gText_ApprenticeChallenge3[];
|
||||
extern const u8 gText_ApprenticeChallenge4[];
|
||||
extern const u8 gText_ApprenticeChallenge5[];
|
||||
extern const u8 gText_ApprenticeChallenge6[];
|
||||
extern const u8 gText_ApprenticeChallenge7[];
|
||||
extern const u8 gText_ApprenticeChallenge8[];
|
||||
extern const u8 gText_ApprenticeChallenge9[];
|
||||
extern const u8 gText_ApprenticeChallenge10[];
|
||||
extern const u8 gText_ApprenticeChallenge11[];
|
||||
extern const u8 gText_ApprenticeChallenge12[];
|
||||
extern const u8 gText_ApprenticeChallenge13[];
|
||||
extern const u8 gText_ApprenticeChallenge14[];
|
||||
extern const u8 gText_ApprenticeChallenge15[];
|
||||
|
||||
const struct ApprenticeTrainer gApprentices[NUM_APPRENTICES] =
|
||||
{
|
||||
{
|
||||
.name = {_("サダヒロ"), _("ALANN"), _("ALAIN"), _("ADELFO"), _("CLAUS"), _("TEO")},
|
||||
.otId = 0xBDC9,
|
||||
.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,
|
||||
.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")},
|
||||
.otId = 0xCF09,
|
||||
.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,
|
||||
.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")},
|
||||
.otId = 0x2E34,
|
||||
.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,
|
||||
.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")},
|
||||
.otId = 0x84EF,
|
||||
.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,
|
||||
.speechLost = {EC_WORD_IS, EC_WORD_THIS, EC_WORD_TOO, EC_WORD_MUCH, EC_WORD_QUES, 0xFFFF},
|
||||
},
|
||||
{
|
||||
.name = {_("ヨウカ"), _("MACY"), _("AMELIE"), _("CLEO"), _("MARIA"), _("ELISA")},
|
||||
.otId = 0x1E43,
|
||||
.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,
|
||||
.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")},
|
||||
.otId = 0x379F,
|
||||
.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,
|
||||
.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")},
|
||||
.otId = 0xF555,
|
||||
.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,
|
||||
.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")},
|
||||
.otId = 0x8D26,
|
||||
.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,
|
||||
.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")},
|
||||
.otId = 0x800C,
|
||||
.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,
|
||||
.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")},
|
||||
.otId = 0x469f,
|
||||
.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,
|
||||
.speechLost = {EC_WORD_WE, EC_WORD_WERE, EC_WORD_JUST, EC_WORD_SHREDDED, EC_WORD_ELLIPSIS, 0xFFFF},
|
||||
},
|
||||
{
|
||||
.name = {_("トウゾウ"), _("DALLAS"), _("BRUNO"), _("LEARCO"), _("ANSGAR"), _("MANOLO")},
|
||||
.otId = 0x71FC,
|
||||
.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,
|
||||
.speechLost = {EC_WORD_YOUR, EC_WORD_WIN, EC_WORD_ANGERS, EC_WORD_ME, EC_WORD_EXCL, 0xFFFF},
|
||||
},
|
||||
{
|
||||
.name = {_("セイヤ"), _("FRANK"), _("FRANK"), _("OLINDO"), _("FRANK"), _("MAURO")},
|
||||
.otId = 0xA39E,
|
||||
.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,
|
||||
.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")},
|
||||
.otId = 0xE590,
|
||||
.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,
|
||||
.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")},
|
||||
.otId = 0xD018,
|
||||
.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,
|
||||
.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")},
|
||||
.otId = 0xBC75,
|
||||
.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,
|
||||
.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")},
|
||||
.otId = 0xFA02,
|
||||
.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,
|
||||
.speechLost = {EC_WORD_THIS, EC_WORD_HAS, EC_WORD_TO, EC_WORD_BE, EC_WORD_A, EC_WORD_LIE},
|
||||
},
|
||||
};
|
||||
|
||||
// Sequence of 4 messages for the first meeting with the apprentice
|
||||
static const u8 *const sApprenticeFirstMeetingTexts[NUM_APPRENTICES][4] =
|
||||
{
|
||||
{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] =
|
||||
{
|
||||
{gText_ApprenticeWhichMon0, gText_ApprenticeMonThanks0},
|
||||
{gText_ApprenticeWhichMon1, gText_ApprenticeMonThanks1},
|
||||
{gText_ApprenticeWhichMon2, gText_ApprenticeMonThanks2},
|
||||
{gText_ApprenticeWhichMon3, gText_ApprenticeMonThanks3},
|
||||
{gText_ApprenticeWhichMon4, gText_ApprenticeMonThanks4},
|
||||
{gText_ApprenticeWhichMon5, gText_ApprenticeMonThanks5},
|
||||
{gText_ApprenticeWhichMon6, gText_ApprenticeMonThanks6},
|
||||
{gText_ApprenticeWhichMon7, gText_ApprenticeMonThanks7},
|
||||
{gText_ApprenticeWhichMon8, gText_ApprenticeMonThanks8},
|
||||
{gText_ApprenticeWhichMon9, gText_ApprenticeMonThanks9},
|
||||
{gText_ApprenticeWhichMon10, gText_ApprenticeMonThanks10},
|
||||
{gText_ApprenticeWhichMon11, gText_ApprenticeMonThanks11},
|
||||
{gText_ApprenticeWhichMon12, gText_ApprenticeMonThanks12},
|
||||
{gText_ApprenticeWhichMon13, gText_ApprenticeMonThanks13},
|
||||
{gText_ApprenticeWhichMon14, gText_ApprenticeMonThanks14},
|
||||
{gText_ApprenticeWhichMon15, gText_ApprenticeMonThanks15},
|
||||
};
|
||||
|
||||
// Sequence of 5 messages for suggesting a held item to the apprentice
|
||||
static const u8 *const sApprenticeHeldItemTexts[NUM_APPRENTICES][5] =
|
||||
{
|
||||
{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] =
|
||||
{
|
||||
{gText_ApprenticeWhichMove0, gText_ApprenticeMoveThanks0},
|
||||
{gText_ApprenticeWhichMove1, gText_ApprenticeMoveThanks1},
|
||||
{gText_ApprenticeWhichMove2, gText_ApprenticeMoveThanks2},
|
||||
{gText_ApprenticeWhichMove3, gText_ApprenticeMoveThanks3},
|
||||
{gText_ApprenticeWhichMove4, gText_ApprenticeMoveThanks4},
|
||||
{gText_ApprenticeWhichMove5, gText_ApprenticeMoveThanks5},
|
||||
{gText_ApprenticeWhichMove6, gText_ApprenticeMoveThanks6},
|
||||
{gText_ApprenticeWhichMove7, gText_ApprenticeMoveThanks7},
|
||||
{gText_ApprenticeWhichMove8, gText_ApprenticeMoveThanks8},
|
||||
{gText_ApprenticeWhichMove9, gText_ApprenticeMoveThanks9},
|
||||
{gText_ApprenticeWhichMove10, gText_ApprenticeMoveThanks10},
|
||||
{gText_ApprenticeWhichMove11, gText_ApprenticeMoveThanks11},
|
||||
{gText_ApprenticeWhichMove12, gText_ApprenticeMoveThanks12},
|
||||
{gText_ApprenticeWhichMove13, gText_ApprenticeMoveThanks13},
|
||||
{gText_ApprenticeWhichMove14, gText_ApprenticeMoveThanks14},
|
||||
{gText_ApprenticeWhichMove15, gText_ApprenticeMoveThanks15},
|
||||
};
|
||||
|
||||
static const u8 *const sApprenticeWhichMonFirstTexts[NUM_APPRENTICES][2] =
|
||||
{
|
||||
{gText_ApprenticeWhichMonFirst0, gText_ApprenticeMonFirstThanks0},
|
||||
{gText_ApprenticeWhichMonFirst1, gText_ApprenticeMonFirstThanks1},
|
||||
{gText_ApprenticeWhichMonFirst2, gText_ApprenticeMonFirstThanks2},
|
||||
{gText_ApprenticeWhichMonFirst3, gText_ApprenticeMonFirstThanks3},
|
||||
{gText_ApprenticeWhichMonFirst4, gText_ApprenticeMonFirstThanks4},
|
||||
{gText_ApprenticeWhichMonFirst5, gText_ApprenticeMonFirstThanks5},
|
||||
{gText_ApprenticeWhichMonFirst6, gText_ApprenticeMonFirstThanks6},
|
||||
{gText_ApprenticeWhichMonFirst7, gText_ApprenticeMonFirstThanks7},
|
||||
{gText_ApprenticeWhichMonFirst8, gText_ApprenticeMonFirstThanks8},
|
||||
{gText_ApprenticeWhichMonFirst9, gText_ApprenticeMonFirstThanks9},
|
||||
{gText_ApprenticeWhichMonFirst10, gText_ApprenticeMonFirstThanks10},
|
||||
{gText_ApprenticeWhichMonFirst11, gText_ApprenticeMonFirstThanks11},
|
||||
{gText_ApprenticeWhichMonFirst12, gText_ApprenticeMonFirstThanks12},
|
||||
{gText_ApprenticeWhichMonFirst13, gText_ApprenticeMonFirstThanks13},
|
||||
{gText_ApprenticeWhichMonFirst14, gText_ApprenticeMonFirstThanks14},
|
||||
{gText_ApprenticeWhichMonFirst15, gText_ApprenticeMonFirstThanks15},
|
||||
};
|
||||
|
||||
static const u8 *const sApprenticePickWinSpeechTexts[NUM_APPRENTICES][2] =
|
||||
{
|
||||
{gText_ApprenticePickWinSpeech0, gText_ApprenticeWinSpeechThanks0},
|
||||
{gText_ApprenticePickWinSpeech1, gText_ApprenticeWinSpeechThanks1},
|
||||
{gText_ApprenticePickWinSpeech2, gText_ApprenticeWinSpeechThanks2},
|
||||
{gText_ApprenticePickWinSpeech3, gText_ApprenticeWinSpeechThanks3},
|
||||
{gText_ApprenticePickWinSpeech4, gText_ApprenticeWinSpeechThanks4},
|
||||
{gText_ApprenticePickWinSpeech5, gText_ApprenticeWinSpeechThanks5},
|
||||
{gText_ApprenticePickWinSpeech6, gText_ApprenticeWinSpeechThanks6},
|
||||
{gText_ApprenticePickWinSpeech7, gText_ApprenticeWinSpeechThanks7},
|
||||
{gText_ApprenticePickWinSpeech8, gText_ApprenticeWinSpeechThanks8},
|
||||
{gText_ApprenticePickWinSpeech9, gText_ApprenticeWinSpeechThanks9},
|
||||
{gText_ApprenticePickWinSpeech10, gText_ApprenticeWinSpeechThanks10},
|
||||
{gText_ApprenticePickWinSpeech11, gText_ApprenticeWinSpeechThanks11},
|
||||
{gText_ApprenticePickWinSpeech12, gText_ApprenticeWinSpeechThanks12},
|
||||
{gText_ApprenticePickWinSpeech13, gText_ApprenticeWinSpeechThanks13},
|
||||
{gText_ApprenticePickWinSpeech14, gText_ApprenticeWinSpeechThanks14},
|
||||
{gText_ApprenticePickWinSpeech15, gText_ApprenticeWinSpeechThanks15},
|
||||
};
|
||||
|
||||
static const u8 *const sApprenticeChallengeTexts[NUM_APPRENTICES] =
|
||||
{
|
||||
gText_ApprenticeChallenge0,
|
||||
gText_ApprenticeChallenge1,
|
||||
gText_ApprenticeChallenge2,
|
||||
gText_ApprenticeChallenge3,
|
||||
gText_ApprenticeChallenge4,
|
||||
gText_ApprenticeChallenge5,
|
||||
gText_ApprenticeChallenge6,
|
||||
gText_ApprenticeChallenge7,
|
||||
gText_ApprenticeChallenge8,
|
||||
gText_ApprenticeChallenge9,
|
||||
gText_ApprenticeChallenge10,
|
||||
gText_ApprenticeChallenge11,
|
||||
gText_ApprenticeChallenge12,
|
||||
gText_ApprenticeChallenge13,
|
||||
gText_ApprenticeChallenge14,
|
||||
gText_ApprenticeChallenge15,
|
||||
};
|
||||
|
||||
// Unclear what the criteria are for valid moves
|
||||
// Notably, a large percentage of multi-strike moves are not valid
|
||||
static const bool8 sValidApprenticeMoves[MOVES_COUNT] =
|
||||
{
|
||||
[MOVE_NONE] = FALSE,
|
||||
[MOVE_POUND] = FALSE,
|
||||
[MOVE_KARATE_CHOP] = TRUE,
|
||||
[MOVE_DOUBLE_SLAP] = TRUE,
|
||||
[MOVE_COMET_PUNCH] = FALSE,
|
||||
[MOVE_MEGA_PUNCH] = TRUE,
|
||||
[MOVE_PAY_DAY] = FALSE,
|
||||
[MOVE_FIRE_PUNCH] = TRUE,
|
||||
[MOVE_ICE_PUNCH] = TRUE,
|
||||
[MOVE_THUNDER_PUNCH] = TRUE,
|
||||
[MOVE_SCRATCH] = FALSE,
|
||||
[MOVE_VICE_GRIP] = FALSE,
|
||||
[MOVE_GUILLOTINE] = TRUE,
|
||||
[MOVE_RAZOR_WIND] = FALSE,
|
||||
[MOVE_SWORDS_DANCE] = TRUE,
|
||||
[MOVE_CUT] = FALSE,
|
||||
[MOVE_GUST] = FALSE,
|
||||
[MOVE_WING_ATTACK] = FALSE,
|
||||
[MOVE_WHIRLWIND] = TRUE,
|
||||
[MOVE_FLY] = TRUE,
|
||||
[MOVE_BIND] = TRUE,
|
||||
[MOVE_SLAM] = TRUE,
|
||||
[MOVE_VINE_WHIP] = FALSE,
|
||||
[MOVE_STOMP] = TRUE,
|
||||
[MOVE_DOUBLE_KICK] = TRUE,
|
||||
[MOVE_MEGA_KICK] = TRUE,
|
||||
[MOVE_JUMP_KICK] = TRUE,
|
||||
[MOVE_ROLLING_KICK] = TRUE,
|
||||
[MOVE_SAND_ATTACK] = TRUE,
|
||||
[MOVE_HEADBUTT] = TRUE,
|
||||
[MOVE_HORN_ATTACK] = FALSE,
|
||||
[MOVE_FURY_ATTACK] = FALSE,
|
||||
[MOVE_HORN_DRILL] = TRUE,
|
||||
[MOVE_TACKLE] = FALSE,
|
||||
[MOVE_BODY_SLAM] = TRUE,
|
||||
[MOVE_WRAP] = TRUE,
|
||||
[MOVE_TAKE_DOWN] = TRUE,
|
||||
[MOVE_THRASH] = TRUE,
|
||||
[MOVE_DOUBLE_EDGE] = TRUE,
|
||||
[MOVE_TAIL_WHIP] = FALSE,
|
||||
[MOVE_POISON_STING] = FALSE,
|
||||
[MOVE_TWINEEDLE] = TRUE,
|
||||
[MOVE_PIN_MISSILE] = FALSE,
|
||||
[MOVE_LEER] = FALSE,
|
||||
[MOVE_BITE] = TRUE,
|
||||
[MOVE_GROWL] = FALSE,
|
||||
[MOVE_ROAR] = TRUE,
|
||||
[MOVE_SING] = TRUE,
|
||||
[MOVE_SUPERSONIC] = TRUE,
|
||||
[MOVE_SONIC_BOOM] = TRUE,
|
||||
[MOVE_DISABLE] = TRUE,
|
||||
[MOVE_ACID] = FALSE,
|
||||
[MOVE_EMBER] = FALSE,
|
||||
[MOVE_FLAMETHROWER] = TRUE,
|
||||
[MOVE_MIST] = TRUE,
|
||||
[MOVE_WATER_GUN] = FALSE,
|
||||
[MOVE_HYDRO_PUMP] = TRUE,
|
||||
[MOVE_SURF] = TRUE,
|
||||
[MOVE_ICE_BEAM] = TRUE,
|
||||
[MOVE_BLIZZARD] = TRUE,
|
||||
[MOVE_PSYBEAM] = TRUE,
|
||||
[MOVE_BUBBLE_BEAM] = FALSE,
|
||||
[MOVE_AURORA_BEAM] = FALSE,
|
||||
[MOVE_HYPER_BEAM] = TRUE,
|
||||
[MOVE_PECK] = FALSE,
|
||||
[MOVE_DRILL_PECK] = TRUE,
|
||||
[MOVE_SUBMISSION] = TRUE,
|
||||
[MOVE_LOW_KICK] = TRUE,
|
||||
[MOVE_COUNTER] = TRUE,
|
||||
[MOVE_SEISMIC_TOSS] = TRUE,
|
||||
[MOVE_STRENGTH] = TRUE,
|
||||
[MOVE_ABSORB] = FALSE,
|
||||
[MOVE_MEGA_DRAIN] = FALSE,
|
||||
[MOVE_LEECH_SEED] = TRUE,
|
||||
[MOVE_GROWTH] = TRUE,
|
||||
[MOVE_RAZOR_LEAF] = TRUE,
|
||||
[MOVE_SOLAR_BEAM] = TRUE,
|
||||
[MOVE_POISON_POWDER] = TRUE,
|
||||
[MOVE_STUN_SPORE] = TRUE,
|
||||
[MOVE_SLEEP_POWDER] = TRUE,
|
||||
[MOVE_PETAL_DANCE] = TRUE,
|
||||
[MOVE_STRING_SHOT] = FALSE,
|
||||
[MOVE_DRAGON_RAGE] = TRUE,
|
||||
[MOVE_FIRE_SPIN] = TRUE,
|
||||
[MOVE_THUNDER_SHOCK] = FALSE,
|
||||
[MOVE_THUNDERBOLT] = TRUE,
|
||||
[MOVE_THUNDER_WAVE] = TRUE,
|
||||
[MOVE_THUNDER] = TRUE,
|
||||
[MOVE_ROCK_THROW] = FALSE,
|
||||
[MOVE_EARTHQUAKE] = TRUE,
|
||||
[MOVE_FISSURE] = TRUE,
|
||||
[MOVE_DIG] = TRUE,
|
||||
[MOVE_TOXIC] = TRUE,
|
||||
[MOVE_CONFUSION] = FALSE,
|
||||
[MOVE_PSYCHIC] = TRUE,
|
||||
[MOVE_HYPNOSIS] = TRUE,
|
||||
[MOVE_MEDITATE] = TRUE,
|
||||
[MOVE_AGILITY] = TRUE,
|
||||
[MOVE_QUICK_ATTACK] = TRUE,
|
||||
[MOVE_RAGE] = FALSE,
|
||||
[MOVE_TELEPORT] = FALSE,
|
||||
[MOVE_NIGHT_SHADE] = TRUE,
|
||||
[MOVE_MIMIC] = TRUE,
|
||||
[MOVE_SCREECH] = TRUE,
|
||||
[MOVE_DOUBLE_TEAM] = TRUE,
|
||||
[MOVE_RECOVER] = TRUE,
|
||||
[MOVE_HARDEN] = TRUE,
|
||||
[MOVE_MINIMIZE] = TRUE,
|
||||
[MOVE_SMOKESCREEN] = TRUE,
|
||||
[MOVE_CONFUSE_RAY] = TRUE,
|
||||
[MOVE_WITHDRAW] = TRUE,
|
||||
[MOVE_DEFENSE_CURL] = TRUE,
|
||||
[MOVE_BARRIER] = TRUE,
|
||||
[MOVE_LIGHT_SCREEN] = TRUE,
|
||||
[MOVE_HAZE] = TRUE,
|
||||
[MOVE_REFLECT] = TRUE,
|
||||
[MOVE_FOCUS_ENERGY] = TRUE,
|
||||
[MOVE_BIDE] = FALSE,
|
||||
[MOVE_METRONOME] = TRUE,
|
||||
[MOVE_MIRROR_MOVE] = TRUE,
|
||||
[MOVE_SELF_DESTRUCT] = TRUE,
|
||||
[MOVE_EGG_BOMB] = TRUE,
|
||||
[MOVE_LICK] = TRUE,
|
||||
[MOVE_SMOG] = FALSE,
|
||||
[MOVE_SLUDGE] = FALSE,
|
||||
[MOVE_BONE_CLUB] = FALSE,
|
||||
[MOVE_FIRE_BLAST] = TRUE,
|
||||
[MOVE_WATERFALL] = TRUE,
|
||||
[MOVE_CLAMP] = TRUE,
|
||||
[MOVE_SWIFT] = TRUE,
|
||||
[MOVE_SKULL_BASH] = TRUE,
|
||||
[MOVE_SPIKE_CANNON] = FALSE,
|
||||
[MOVE_CONSTRICT] = FALSE,
|
||||
[MOVE_AMNESIA] = TRUE,
|
||||
[MOVE_KINESIS] = TRUE,
|
||||
[MOVE_SOFT_BOILED] = TRUE,
|
||||
[MOVE_HI_JUMP_KICK] = TRUE,
|
||||
[MOVE_GLARE] = TRUE,
|
||||
[MOVE_DREAM_EATER] = TRUE,
|
||||
[MOVE_POISON_GAS] = FALSE,
|
||||
[MOVE_BARRAGE] = FALSE,
|
||||
[MOVE_LEECH_LIFE] = FALSE,
|
||||
[MOVE_LOVELY_KISS] = TRUE,
|
||||
[MOVE_SKY_ATTACK] = TRUE,
|
||||
[MOVE_TRANSFORM] = TRUE,
|
||||
[MOVE_BUBBLE] = FALSE,
|
||||
[MOVE_DIZZY_PUNCH] = TRUE,
|
||||
[MOVE_SPORE] = TRUE,
|
||||
[MOVE_FLASH] = TRUE,
|
||||
[MOVE_PSYWAVE] = TRUE,
|
||||
[MOVE_SPLASH] = FALSE,
|
||||
[MOVE_ACID_ARMOR] = TRUE,
|
||||
[MOVE_CRABHAMMER] = TRUE,
|
||||
[MOVE_EXPLOSION] = TRUE,
|
||||
[MOVE_FURY_SWIPES] = FALSE,
|
||||
[MOVE_BONEMERANG] = TRUE,
|
||||
[MOVE_REST] = TRUE,
|
||||
[MOVE_ROCK_SLIDE] = TRUE,
|
||||
[MOVE_HYPER_FANG] = TRUE,
|
||||
[MOVE_SHARPEN] = TRUE,
|
||||
[MOVE_CONVERSION] = TRUE,
|
||||
[MOVE_TRI_ATTACK] = TRUE,
|
||||
[MOVE_SUPER_FANG] = TRUE,
|
||||
[MOVE_SLASH] = TRUE,
|
||||
[MOVE_SUBSTITUTE] = TRUE,
|
||||
[MOVE_STRUGGLE] = TRUE,
|
||||
[MOVE_SKETCH] = TRUE,
|
||||
[MOVE_TRIPLE_KICK] = TRUE,
|
||||
[MOVE_THIEF] = TRUE,
|
||||
[MOVE_SPIDER_WEB] = TRUE,
|
||||
[MOVE_MIND_READER] = TRUE,
|
||||
[MOVE_NIGHTMARE] = TRUE,
|
||||
[MOVE_FLAME_WHEEL] = FALSE,
|
||||
[MOVE_SNORE] = TRUE,
|
||||
[MOVE_CURSE] = TRUE,
|
||||
[MOVE_FLAIL] = TRUE,
|
||||
[MOVE_CONVERSION_2] = TRUE,
|
||||
[MOVE_AEROBLAST] = TRUE,
|
||||
[MOVE_COTTON_SPORE] = TRUE,
|
||||
[MOVE_REVERSAL] = TRUE,
|
||||
[MOVE_SPITE] = TRUE,
|
||||
[MOVE_POWDER_SNOW] = FALSE,
|
||||
[MOVE_PROTECT] = TRUE,
|
||||
[MOVE_MACH_PUNCH] = TRUE,
|
||||
[MOVE_SCARY_FACE] = TRUE,
|
||||
[MOVE_FAINT_ATTACK] = TRUE,
|
||||
[MOVE_SWEET_KISS] = TRUE,
|
||||
[MOVE_BELLY_DRUM] = TRUE,
|
||||
[MOVE_SLUDGE_BOMB] = TRUE,
|
||||
[MOVE_MUD_SLAP] = TRUE,
|
||||
[MOVE_OCTAZOOKA] = TRUE,
|
||||
[MOVE_SPIKES] = TRUE,
|
||||
[MOVE_ZAP_CANNON] = TRUE,
|
||||
[MOVE_FORESIGHT] = TRUE,
|
||||
[MOVE_DESTINY_BOND] = TRUE,
|
||||
[MOVE_PERISH_SONG] = TRUE,
|
||||
[MOVE_ICY_WIND] = TRUE,
|
||||
[MOVE_DETECT] = TRUE,
|
||||
[MOVE_BONE_RUSH] = FALSE,
|
||||
[MOVE_LOCK_ON] = TRUE,
|
||||
[MOVE_OUTRAGE] = TRUE,
|
||||
[MOVE_SANDSTORM] = TRUE,
|
||||
[MOVE_GIGA_DRAIN] = TRUE,
|
||||
[MOVE_ENDURE] = TRUE,
|
||||
[MOVE_CHARM] = TRUE,
|
||||
[MOVE_ROLLOUT] = TRUE,
|
||||
[MOVE_FALSE_SWIPE] = TRUE,
|
||||
[MOVE_SWAGGER] = TRUE,
|
||||
[MOVE_MILK_DRINK] = TRUE,
|
||||
[MOVE_SPARK] = FALSE,
|
||||
[MOVE_FURY_CUTTER] = TRUE,
|
||||
[MOVE_STEEL_WING] = TRUE,
|
||||
[MOVE_MEAN_LOOK] = TRUE,
|
||||
[MOVE_ATTRACT] = TRUE,
|
||||
[MOVE_SLEEP_TALK] = TRUE,
|
||||
[MOVE_HEAL_BELL] = TRUE,
|
||||
[MOVE_RETURN] = TRUE,
|
||||
[MOVE_PRESENT] = TRUE,
|
||||
[MOVE_FRUSTRATION] = TRUE,
|
||||
[MOVE_SAFEGUARD] = TRUE,
|
||||
[MOVE_PAIN_SPLIT] = TRUE,
|
||||
[MOVE_SACRED_FIRE] = TRUE,
|
||||
[MOVE_MAGNITUDE] = FALSE,
|
||||
[MOVE_DYNAMIC_PUNCH] = TRUE,
|
||||
[MOVE_MEGAHORN] = TRUE,
|
||||
[MOVE_DRAGON_BREATH] = TRUE,
|
||||
[MOVE_BATON_PASS] = TRUE,
|
||||
[MOVE_ENCORE] = TRUE,
|
||||
[MOVE_PURSUIT] = TRUE,
|
||||
[MOVE_RAPID_SPIN] = TRUE,
|
||||
[MOVE_SWEET_SCENT] = TRUE,
|
||||
[MOVE_IRON_TAIL] = TRUE,
|
||||
[MOVE_METAL_CLAW] = TRUE,
|
||||
[MOVE_VITAL_THROW] = TRUE,
|
||||
[MOVE_MORNING_SUN] = TRUE,
|
||||
[MOVE_SYNTHESIS] = TRUE,
|
||||
[MOVE_MOONLIGHT] = TRUE,
|
||||
[MOVE_HIDDEN_POWER] = TRUE,
|
||||
[MOVE_CROSS_CHOP] = TRUE,
|
||||
[MOVE_TWISTER] = FALSE,
|
||||
[MOVE_RAIN_DANCE] = TRUE,
|
||||
[MOVE_SUNNY_DAY] = TRUE,
|
||||
[MOVE_CRUNCH] = TRUE,
|
||||
[MOVE_MIRROR_COAT] = TRUE,
|
||||
[MOVE_PSYCH_UP] = TRUE,
|
||||
[MOVE_EXTREME_SPEED] = TRUE,
|
||||
[MOVE_ANCIENT_POWER] = TRUE,
|
||||
[MOVE_SHADOW_BALL] = TRUE,
|
||||
[MOVE_FUTURE_SIGHT] = TRUE,
|
||||
[MOVE_ROCK_SMASH] = TRUE,
|
||||
[MOVE_WHIRLPOOL] = TRUE,
|
||||
[MOVE_BEAT_UP] = TRUE,
|
||||
[MOVE_FAKE_OUT] = TRUE,
|
||||
[MOVE_UPROAR] = TRUE,
|
||||
[MOVE_STOCKPILE] = TRUE,
|
||||
[MOVE_SPIT_UP] = TRUE,
|
||||
[MOVE_SWALLOW] = TRUE,
|
||||
[MOVE_HEAT_WAVE] = TRUE,
|
||||
[MOVE_HAIL] = TRUE,
|
||||
[MOVE_TORMENT] = TRUE,
|
||||
[MOVE_FLATTER] = TRUE,
|
||||
[MOVE_WILL_O_WISP] = TRUE,
|
||||
[MOVE_MEMENTO] = TRUE,
|
||||
[MOVE_FACADE] = TRUE,
|
||||
[MOVE_FOCUS_PUNCH] = TRUE,
|
||||
[MOVE_SMELLING_SALT] = TRUE,
|
||||
[MOVE_FOLLOW_ME] = TRUE,
|
||||
[MOVE_NATURE_POWER] = TRUE,
|
||||
[MOVE_CHARGE] = TRUE,
|
||||
[MOVE_TAUNT] = TRUE,
|
||||
[MOVE_HELPING_HAND] = TRUE,
|
||||
[MOVE_TRICK] = TRUE,
|
||||
[MOVE_ROLE_PLAY] = TRUE,
|
||||
[MOVE_WISH] = TRUE,
|
||||
[MOVE_ASSIST] = TRUE,
|
||||
[MOVE_INGRAIN] = TRUE,
|
||||
[MOVE_SUPERPOWER] = TRUE,
|
||||
[MOVE_MAGIC_COAT] = TRUE,
|
||||
[MOVE_RECYCLE] = TRUE,
|
||||
[MOVE_REVENGE] = TRUE,
|
||||
[MOVE_BRICK_BREAK] = TRUE,
|
||||
[MOVE_YAWN] = TRUE,
|
||||
[MOVE_KNOCK_OFF] = TRUE,
|
||||
[MOVE_ENDEAVOR] = TRUE,
|
||||
[MOVE_ERUPTION] = TRUE,
|
||||
[MOVE_SKILL_SWAP] = TRUE,
|
||||
[MOVE_IMPRISON] = TRUE,
|
||||
[MOVE_REFRESH] = TRUE,
|
||||
[MOVE_GRUDGE] = TRUE,
|
||||
[MOVE_SNATCH] = TRUE,
|
||||
[MOVE_SECRET_POWER] = TRUE,
|
||||
[MOVE_DIVE] = TRUE,
|
||||
[MOVE_ARM_THRUST] = FALSE,
|
||||
[MOVE_CAMOUFLAGE] = TRUE,
|
||||
[MOVE_TAIL_GLOW] = TRUE,
|
||||
[MOVE_LUSTER_PURGE] = TRUE,
|
||||
[MOVE_MIST_BALL] = TRUE,
|
||||
[MOVE_FEATHER_DANCE] = TRUE,
|
||||
[MOVE_TEETER_DANCE] = TRUE,
|
||||
[MOVE_BLAZE_KICK] = TRUE,
|
||||
[MOVE_MUD_SPORT] = TRUE,
|
||||
[MOVE_ICE_BALL] = FALSE,
|
||||
[MOVE_NEEDLE_ARM] = TRUE,
|
||||
[MOVE_SLACK_OFF] = TRUE,
|
||||
[MOVE_HYPER_VOICE] = TRUE,
|
||||
[MOVE_POISON_FANG] = FALSE,
|
||||
[MOVE_CRUSH_CLAW] = TRUE,
|
||||
[MOVE_BLAST_BURN] = TRUE,
|
||||
[MOVE_HYDRO_CANNON] = TRUE,
|
||||
[MOVE_METEOR_MASH] = TRUE,
|
||||
[MOVE_ASTONISH] = TRUE,
|
||||
[MOVE_WEATHER_BALL] = TRUE,
|
||||
[MOVE_AROMATHERAPY] = TRUE,
|
||||
[MOVE_FAKE_TEARS] = TRUE,
|
||||
[MOVE_AIR_CUTTER] = TRUE,
|
||||
[MOVE_OVERHEAT] = TRUE,
|
||||
[MOVE_ODOR_SLEUTH] = TRUE,
|
||||
[MOVE_ROCK_TOMB] = TRUE,
|
||||
[MOVE_SILVER_WIND] = TRUE,
|
||||
[MOVE_METAL_SOUND] = TRUE,
|
||||
[MOVE_GRASS_WHISTLE] = TRUE,
|
||||
[MOVE_TICKLE] = TRUE,
|
||||
[MOVE_COSMIC_POWER] = TRUE,
|
||||
[MOVE_WATER_SPOUT] = TRUE,
|
||||
[MOVE_SIGNAL_BEAM] = TRUE,
|
||||
[MOVE_SHADOW_PUNCH] = TRUE,
|
||||
[MOVE_EXTRASENSORY] = TRUE,
|
||||
[MOVE_SKY_UPPERCUT] = TRUE,
|
||||
[MOVE_SAND_TOMB] = TRUE,
|
||||
[MOVE_SHEER_COLD] = TRUE,
|
||||
[MOVE_MUDDY_WATER] = TRUE,
|
||||
[MOVE_BULLET_SEED] = FALSE,
|
||||
[MOVE_AERIAL_ACE] = TRUE,
|
||||
[MOVE_ICICLE_SPEAR] = FALSE,
|
||||
[MOVE_IRON_DEFENSE] = TRUE,
|
||||
[MOVE_BLOCK] = TRUE,
|
||||
[MOVE_HOWL] = TRUE,
|
||||
[MOVE_DRAGON_CLAW] = TRUE,
|
||||
[MOVE_FRENZY_PLANT] = TRUE,
|
||||
[MOVE_BULK_UP] = TRUE,
|
||||
[MOVE_BOUNCE] = TRUE,
|
||||
[MOVE_MUD_SHOT] = FALSE,
|
||||
[MOVE_POISON_TAIL] = TRUE,
|
||||
[MOVE_COVET] = TRUE,
|
||||
[MOVE_VOLT_TACKLE] = TRUE,
|
||||
[MOVE_MAGICAL_LEAF] = TRUE,
|
||||
[MOVE_WATER_SPORT] = TRUE,
|
||||
[MOVE_CALM_MIND] = TRUE,
|
||||
[MOVE_LEAF_BLADE] = TRUE,
|
||||
[MOVE_DRAGON_DANCE] = TRUE,
|
||||
[MOVE_ROCK_BLAST] = FALSE,
|
||||
[MOVE_SHOCK_WAVE] = TRUE,
|
||||
[MOVE_WATER_PULSE] = TRUE,
|
||||
[MOVE_DOOM_DESIRE] = TRUE,
|
||||
[MOVE_PSYCHO_BOOST] = TRUE,
|
||||
};
|
||||
|
||||
// The possible questions to ask after the initial 3 WHICH MON questions. Retrieved from here and shuffled
|
||||
// WHAT_ITEM has max 3 occurrences, one for each party member
|
||||
// WHICH_MOVE has max 5 occurrences, defined as NUM_WHICH_MOVE_QUESTIONS
|
||||
// WHICH_FIRST has max 1 occurrence, lead mon should only be chosen once
|
||||
// WHICH_SPEECH has max 1 occurrence, as the apprentice leaves after its asked
|
||||
static const u8 sQuestionPossibilities[] =
|
||||
{
|
||||
QUESTION_ID_WHAT_ITEM,
|
||||
QUESTION_ID_WHAT_ITEM,
|
||||
QUESTION_ID_WHAT_ITEM,
|
||||
QUESTION_ID_WHICH_MOVE,
|
||||
QUESTION_ID_WHICH_MOVE,
|
||||
QUESTION_ID_WHICH_MOVE,
|
||||
QUESTION_ID_WHICH_MOVE,
|
||||
QUESTION_ID_WHICH_MOVE,
|
||||
QUESTION_ID_WHICH_FIRST,
|
||||
QUESTION_ID_WIN_SPEECH
|
||||
};
|
||||
|
||||
static void (* const sApprenticeFunctions[])(void) =
|
||||
{
|
||||
[APPRENTICE_FUNC_GAVE_LVLMODE] = Script_GivenApprenticeLvlMode,
|
||||
[APPRENTICE_FUNC_SET_LVLMODE] = Script_SetApprenticeLvlMode,
|
||||
[APPRENTICE_FUNC_SET_ID] = Script_SetApprenticeId,
|
||||
[APPRENTICE_FUNC_SHUFFLE_SPECIES] = ShuffleApprenticeSpecies,
|
||||
[APPRENTICE_FUNC_RANDOMIZE_QUESTIONS] = Script_SetRandomQuestionData,
|
||||
[APPRENTICE_FUNC_ANSWERED_QUESTION] = IncrementQuestionsAnswered,
|
||||
[APPRENTICE_FUNC_IS_FINAL_QUESTION] = IsFinalQuestion,
|
||||
[APPRENTICE_FUNC_MENU] = Script_CreateApprenticeMenu,
|
||||
[APPRENTICE_FUNC_PRINT_MSG] = Script_PrintApprenticeMessage,
|
||||
[APPRENTICE_FUNC_RESET] = Script_ResetPlayerApprentice,
|
||||
[APPRENTICE_FUNC_CHECK_GONE] = GetShouldCheckApprenticeGone,
|
||||
[APPRENTICE_FUNC_GET_QUESTION] = ApprenticeGetQuestion,
|
||||
[APPRENTICE_FUNC_GET_NUM_PARTY_MONS] = GetNumApprenticePartyMonsAssigned,
|
||||
[APPRENTICE_FUNC_SET_PARTY_MON] = SetApprenticePartyMon,
|
||||
[APPRENTICE_FUNC_INIT_QUESTION_DATA] = InitQuestionData,
|
||||
[APPRENTICE_FUNC_FREE_QUESTION_DATA] = FreeQuestionData,
|
||||
[APPRENTICE_FUNC_BUFFER_STRING] = ApprenticeBufferString,
|
||||
[APPRENTICE_FUNC_SET_MOVE] = SetApprenticeMonMove,
|
||||
[APPRENTICE_FUNC_SET_LEAD_MON] = SetLeadApprenticeMon,
|
||||
[APPRENTICE_FUNC_OPEN_BAG] = Script_ApprenticeOpenBagMenu,
|
||||
[APPRENTICE_FUNC_TRY_SET_HELD_ITEM] = TrySetApprenticeHeldItem,
|
||||
[APPRENTICE_FUNC_SAVE] = SaveApprentice,
|
||||
[APPRENTICE_FUNC_SET_GFX_SAVED] = SetSavedApprenticeTrainerGfxId,
|
||||
[APPRENTICE_FUNC_SET_GFX] = SetPlayerApprenticeTrainerGfxId,
|
||||
[APPRENTICE_FUNC_SHOULD_LEAVE] = GetShouldApprenticeLeave,
|
||||
[APPRENTICE_FUNC_SHIFT_SAVED] = ShiftSavedApprentices,
|
||||
};
|
||||
|
||||
// The first Apprentice can only be one of these
|
||||
static const u8 sInitialApprenticeIds[8] = {0, 1, 2, 3, 6, 7, 8, 9};
|
@ -1,5 +1,4 @@
|
||||
#define LEVEL_UP_MOVE(lvl, move) ((lvl << 9) | move)
|
||||
#define LEVEL_UP_END 0xffff
|
||||
|
||||
static const u16 sBulbasaurLevelUpLearnset[] = {
|
||||
LEVEL_UP_MOVE( 1, MOVE_TACKLE),
|
||||
|
@ -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();
|
||||
|
@ -1698,7 +1698,7 @@ void CopyFrontierTrainerText(u8 whichText, u16 trainerId)
|
||||
else if (trainerId < TRAINER_RECORD_MIXING_APPRENTICE)
|
||||
FrontierSpeechToString(gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].greeting);
|
||||
else
|
||||
CopyFriendsApprenticeChallengeText(trainerId - TRAINER_RECORD_MIXING_APPRENTICE);
|
||||
BufferApprenticeChallengeText(trainerId - TRAINER_RECORD_MIXING_APPRENTICE);
|
||||
break;
|
||||
case FRONTIER_PLAYER_LOST_TEXT:
|
||||
if (trainerId == TRAINER_EREADER)
|
||||
@ -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;
|
||||
|
@ -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,23 +492,23 @@ 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);
|
||||
gSpecialVar_0x8005 = 0;
|
||||
gSpecialVar_Result = 0;
|
||||
GoToBagMenu(RETURN_LOCATION_FIELD_6, POCKETS_COUNT, CB2_ApprenticeExitBagMenu);
|
||||
gSpecialVar_0x8005 = ITEM_NONE;
|
||||
gSpecialVar_Result = FALSE;
|
||||
}
|
||||
|
||||
void FavorLadyOpenBagMenu(void)
|
||||
{
|
||||
GoToBagMenu(RETURN_LOCATION_FIELD_4, POCKETS_COUNT, CB2_FavorLadyExitBagMenu);
|
||||
gSpecialVar_Result = 0;
|
||||
gSpecialVar_Result = FALSE;
|
||||
}
|
||||
|
||||
void QuizLadyOpenBagMenu(void)
|
||||
{
|
||||
GoToBagMenu(RETURN_LOCATION_FIELD_5, POCKETS_COUNT, CB2_QuizLadyExitBagMenu);
|
||||
gSpecialVar_Result = 0;
|
||||
gSpecialVar_Result = FALSE;
|
||||
}
|
||||
|
||||
void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)())
|
||||
@ -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);
|
||||
|
@ -2943,12 +2943,12 @@ void GiveBoxMonInitialMoveset(struct BoxPokemon *boxMon)
|
||||
u16 moveLevel;
|
||||
u16 move;
|
||||
|
||||
moveLevel = (gLevelUpLearnsets[species][i] & 0xFE00);
|
||||
moveLevel = (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_LV);
|
||||
|
||||
if (moveLevel > (level << 9))
|
||||
break;
|
||||
|
||||
move = (gLevelUpLearnsets[species][i] & 0x1FF);
|
||||
move = (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID);
|
||||
|
||||
if (GiveMoveToBoxMon(boxMon, move) == MON_HAS_MAX_MOVES)
|
||||
DeleteFirstMoveAndGiveMoveToBoxMon(boxMon, move);
|
||||
@ -2969,7 +2969,7 @@ u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove)
|
||||
{
|
||||
sLearningMoveTableID = 0;
|
||||
|
||||
while ((gLevelUpLearnsets[species][sLearningMoveTableID] & 0xFE00) != (level << 9))
|
||||
while ((gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_LV) != (level << 9))
|
||||
{
|
||||
sLearningMoveTableID++;
|
||||
if (gLevelUpLearnsets[species][sLearningMoveTableID] == LEVEL_UP_END)
|
||||
@ -2977,9 +2977,9 @@ u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove)
|
||||
}
|
||||
}
|
||||
|
||||
if ((gLevelUpLearnsets[species][sLearningMoveTableID] & 0xFE00) == (level << 9))
|
||||
if ((gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_LV) == (level << 9))
|
||||
{
|
||||
gMoveToLearn = (gLevelUpLearnsets[species][sLearningMoveTableID] & 0x1FF);
|
||||
gMoveToLearn = (gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_ID);
|
||||
sLearningMoveTableID++;
|
||||
retVal = GiveMoveToMon(mon, gMoveToLearn);
|
||||
}
|
||||
@ -6112,23 +6112,23 @@ u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves)
|
||||
{
|
||||
u16 moveLevel;
|
||||
|
||||
if (gLevelUpLearnsets[species][i] == 0xFFFF)
|
||||
if (gLevelUpLearnsets[species][i] == LEVEL_UP_END)
|
||||
break;
|
||||
|
||||
moveLevel = gLevelUpLearnsets[species][i] & 0xFE00;
|
||||
moveLevel = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_LV;
|
||||
|
||||
if (moveLevel <= (level << 9))
|
||||
{
|
||||
for (j = 0; j < MAX_MON_MOVES && learnedMoves[j] != (gLevelUpLearnsets[species][i] & 0x1FF); j++)
|
||||
for (j = 0; j < MAX_MON_MOVES && learnedMoves[j] != (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); j++)
|
||||
;
|
||||
|
||||
if (j == MAX_MON_MOVES)
|
||||
{
|
||||
for (k = 0; k < numMoves && moves[k] != (gLevelUpLearnsets[species][i] & 0x1FF); k++)
|
||||
for (k = 0; k < numMoves && moves[k] != (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); k++)
|
||||
;
|
||||
|
||||
if (k == numMoves)
|
||||
moves[numMoves++] = gLevelUpLearnsets[species][i] & 0x1FF;
|
||||
moves[numMoves++] = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6141,8 +6141,8 @@ u8 GetLevelUpMovesBySpecies(u16 species, u16 *moves)
|
||||
u8 numMoves = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 20 && gLevelUpLearnsets[species][i] != 0xFFFF; i++)
|
||||
moves[numMoves++] = gLevelUpLearnsets[species][i] & 0x1FF;
|
||||
for (i = 0; i < 20 && gLevelUpLearnsets[species][i] != LEVEL_UP_END; i++)
|
||||
moves[numMoves++] = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID;
|
||||
|
||||
return numMoves;
|
||||
}
|
||||
@ -6166,23 +6166,23 @@ u8 GetNumberOfRelearnableMoves(struct Pokemon *mon)
|
||||
{
|
||||
u16 moveLevel;
|
||||
|
||||
if (gLevelUpLearnsets[species][i] == 0xFFFF)
|
||||
if (gLevelUpLearnsets[species][i] == LEVEL_UP_END)
|
||||
break;
|
||||
|
||||
moveLevel = gLevelUpLearnsets[species][i] & 0xFE00;
|
||||
moveLevel = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_LV;
|
||||
|
||||
if (moveLevel <= (level << 9))
|
||||
{
|
||||
for (j = 0; j < MAX_MON_MOVES && learnedMoves[j] != (gLevelUpLearnsets[species][i] & 0x1FF); j++)
|
||||
for (j = 0; j < MAX_MON_MOVES && learnedMoves[j] != (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); j++)
|
||||
;
|
||||
|
||||
if (j == MAX_MON_MOVES)
|
||||
{
|
||||
for (k = 0; k < numMoves && moves[k] != (gLevelUpLearnsets[species][i] & 0x1FF); k++)
|
||||
for (k = 0; k < numMoves && moves[k] != (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); k++)
|
||||
;
|
||||
|
||||
if (k == numMoves)
|
||||
moves[numMoves++] = gLevelUpLearnsets[species][i] & 0x1FF;
|
||||
moves[numMoves++] = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ struct PlayerRecordsEmerald
|
||||
/* 0x1124 */ struct EmeraldBattleTowerRecord battleTowerRecord;
|
||||
/* 0x1210 */ u16 giftItem;
|
||||
/* 0x1214 */ LilycoveLady lilycoveLady;
|
||||
/* 0x1254 */ struct Apprentice apprentice[2];
|
||||
/* 0x1254 */ struct Apprentice apprentices[2];
|
||||
/* 0x12dc */ struct PlayerHallRecords hallRecords;
|
||||
/* 0x1434 */ u8 field_1434[0x10];
|
||||
}; // 0x1444
|
||||
@ -120,8 +120,8 @@ static void sub_80E7B2C(const u8 *);
|
||||
static void ReceiveDaycareMailData(struct RecordMixingDayCareMail *, size_t, u8, TVShow *);
|
||||
static void ReceiveGiftItem(u16 *item, u8 which);
|
||||
static void Task_DoRecordMixing(u8 taskId);
|
||||
static void sub_80E8110(struct Apprentice *arg0, struct Apprentice *arg1);
|
||||
static void ReceiveApprenticeData(struct Apprentice *arg0, size_t arg1, u32 arg2);
|
||||
static void GetSavedApprentices(struct Apprentice *dst, struct Apprentice *src);
|
||||
static void ReceiveApprenticeData(struct Apprentice *mixApprentice, size_t recordSize, u32 multiplayerId);
|
||||
static void ReceiveRankingHallRecords(struct PlayerHallRecords *hallRecords, size_t arg1, u32 arg2);
|
||||
static void sub_80E89F8(struct RecordMixingDayCareMail *dst);
|
||||
static void SanitizeDayCareMailForRuby(struct RecordMixingDayCareMail *src);
|
||||
@ -252,7 +252,7 @@ static void PrepareExchangePacket(void)
|
||||
if (GetMultiplayerId() == 0)
|
||||
sSentRecord->emerald.giftItem = GetRecordMixingGift();
|
||||
|
||||
sub_80E8110(sSentRecord->emerald.apprentice, sApprenticesSave);
|
||||
GetSavedApprentices(sSentRecord->emerald.apprentices, sApprenticesSave);
|
||||
GetPlayerHallRecords(&sSentRecord->emerald.hallRecords);
|
||||
}
|
||||
}
|
||||
@ -285,7 +285,7 @@ static void ReceiveExchangePacket(u32 which)
|
||||
ReceiveBattleTowerData(&sReceivedRecords->emerald.battleTowerRecord, sizeof(struct PlayerRecordsEmerald), which);
|
||||
ReceiveGiftItem(&sReceivedRecords->emerald.giftItem, which);
|
||||
ReceiveLilycoveLadyData(&sReceivedRecords->emerald.lilycoveLady, sizeof(struct PlayerRecordsEmerald), which);
|
||||
ReceiveApprenticeData(sReceivedRecords->emerald.apprentice, sizeof(struct PlayerRecordsEmerald), (u8) which);
|
||||
ReceiveApprenticeData(sReceivedRecords->emerald.apprentices, sizeof(struct PlayerRecordsEmerald), (u8) which);
|
||||
ReceiveRankingHallRecords(&sReceivedRecords->emerald.hallRecords, sizeof(struct PlayerRecordsEmerald), (u8) which);
|
||||
}
|
||||
}
|
||||
@ -651,7 +651,7 @@ static void ReceiveBattleTowerData(void *battleTowerRecord, size_t recordSize, u
|
||||
{
|
||||
struct EmeraldBattleTowerRecord *dest;
|
||||
struct BattleTowerPokemon *btPokemon;
|
||||
u32 mixIndices[4];
|
||||
u32 mixIndices[MAX_LINK_PLAYERS];
|
||||
s32 i;
|
||||
|
||||
ShufflePlayerIndices(mixIndices);
|
||||
@ -682,7 +682,7 @@ static void ReceiveBattleTowerData(void *battleTowerRecord, size_t recordSize, u
|
||||
static void ReceiveLilycoveLadyData(LilycoveLady *lilycoveLady, size_t recordSize, u8 which)
|
||||
{
|
||||
LilycoveLady *dest;
|
||||
u32 mixIndices[4];
|
||||
u32 mixIndices[MAX_LINK_PLAYERS];
|
||||
|
||||
ShufflePlayerIndices(mixIndices);
|
||||
memcpy((void *)lilycoveLady + recordSize * which, sLilycoveLadySave, sizeof(LilycoveLady));
|
||||
@ -1018,57 +1018,59 @@ static void Task_DoRecordMixing(u8 taskId)
|
||||
|
||||
// New Emerald functions
|
||||
|
||||
static void sub_80E8110(struct Apprentice *dst, struct Apprentice *src)
|
||||
static void GetSavedApprentices(struct Apprentice *dst, struct Apprentice *src)
|
||||
{
|
||||
s32 i, id;
|
||||
s32 var_2C, var_28, var_24, r8;
|
||||
s32 apprenticeSaveId, oldPlayerApprenticeSaveId;
|
||||
s32 numOldPlayerApprentices, numMixApprentices;
|
||||
|
||||
dst[0].playerName[0] = EOS;
|
||||
dst[1].playerName[0] = EOS;
|
||||
|
||||
dst[0] = src[0];
|
||||
|
||||
var_28 = 0;
|
||||
var_24 = 0;
|
||||
var_2C = 0;
|
||||
r8 = 0;
|
||||
oldPlayerApprenticeSaveId = 0;
|
||||
numOldPlayerApprentices = 0;
|
||||
apprenticeSaveId = 0;
|
||||
numMixApprentices = 0;
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
id = ((i + gSaveBlock2Ptr->playerApprentice.field_B2_1) % 3) + 1;
|
||||
id = ((i + gSaveBlock2Ptr->playerApprentice.saveId) % (APPRENTICE_COUNT - 1)) + 1;
|
||||
if (src[id].playerName[0] != EOS)
|
||||
{
|
||||
if (GetTrainerId(src[id].playerId) != GetTrainerId(gSaveBlock2Ptr->playerTrainerId))
|
||||
{
|
||||
r8++;
|
||||
var_2C = id;
|
||||
numMixApprentices++;
|
||||
apprenticeSaveId = id;
|
||||
}
|
||||
if (GetTrainerId(src[id].playerId) == GetTrainerId(gSaveBlock2Ptr->playerTrainerId))
|
||||
{
|
||||
var_24++;
|
||||
var_28 = id;
|
||||
numOldPlayerApprentices++;
|
||||
oldPlayerApprenticeSaveId = id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (r8 == 0 && var_24 != 0)
|
||||
// Prefer passing on other mixed Apprentices rather than old player's Apprentices
|
||||
if (numMixApprentices == 0 && numOldPlayerApprentices != 0)
|
||||
{
|
||||
r8 = var_24;
|
||||
var_2C = var_28;
|
||||
numMixApprentices = numOldPlayerApprentices;
|
||||
apprenticeSaveId = oldPlayerApprenticeSaveId;
|
||||
}
|
||||
|
||||
switch (r8)
|
||||
switch (numMixApprentices)
|
||||
{
|
||||
case 1:
|
||||
dst[1] = src[var_2C];
|
||||
dst[1] = src[apprenticeSaveId];
|
||||
break;
|
||||
case 2:
|
||||
if (Random2() > 0x3333)
|
||||
{
|
||||
dst[1] = src[gSaveBlock2Ptr->playerApprentice.field_B2_1 + 1];
|
||||
dst[1] = src[gSaveBlock2Ptr->playerApprentice.saveId + 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
dst[1] = src[((gSaveBlock2Ptr->playerApprentice.field_B2_1 + 1) % 3 + 1)];
|
||||
dst[1] = src[((gSaveBlock2Ptr->playerApprentice.saveId + 1) % (APPRENTICE_COUNT - 1) + 1)];
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1113,14 +1115,14 @@ void GetPlayerHallRecords(struct PlayerHallRecords *dst)
|
||||
}
|
||||
}
|
||||
|
||||
static bool32 sub_80E841C(struct Apprentice *arg0, struct Apprentice *arg1)
|
||||
static bool32 IsApprenticeAlreadySaved(struct Apprentice *mixApprentice, struct Apprentice *apprentices)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < APPRENTICE_COUNT; i++)
|
||||
{
|
||||
if (GetTrainerId(arg0->playerId) == GetTrainerId(arg1[i].playerId)
|
||||
&& arg0->number == arg1[i].number)
|
||||
if (GetTrainerId(mixApprentice->playerId) == GetTrainerId(apprentices[i].playerId)
|
||||
&& mixApprentice->number == apprentices[i].number)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@ -1129,40 +1131,40 @@ static bool32 sub_80E841C(struct Apprentice *arg0, struct Apprentice *arg1)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void ReceiveApprenticeData(struct Apprentice *arg0, size_t arg1, u32 arg2)
|
||||
static void ReceiveApprenticeData(struct Apprentice *mixApprentice, size_t recordSize, u32 multiplayerId)
|
||||
{
|
||||
s32 i, r7, r8;
|
||||
struct Apprentice *structPtr;
|
||||
u32 mixIndices[4];
|
||||
u32 structId;
|
||||
s32 i, numApprentices, apprenticeId;
|
||||
struct Apprentice *mixApprenticePtr;
|
||||
u32 mixIndices[MAX_LINK_PLAYERS];
|
||||
u32 apprenticeSaveId;
|
||||
|
||||
ShufflePlayerIndices(mixIndices);
|
||||
structPtr = (void*)(arg0) + (arg1 * mixIndices[arg2]);
|
||||
r7 = 0;
|
||||
r8 = 0;
|
||||
mixApprenticePtr = (void*)(mixApprentice) + (recordSize * mixIndices[multiplayerId]);
|
||||
numApprentices = 0;
|
||||
apprenticeId = 0;
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
if (structPtr[i].playerName[0] != EOS && !sub_80E841C(&structPtr[i], &gSaveBlock2Ptr->apprentices[0]))
|
||||
if (mixApprenticePtr[i].playerName[0] != EOS && !IsApprenticeAlreadySaved(&mixApprenticePtr[i], &gSaveBlock2Ptr->apprentices[0]))
|
||||
{
|
||||
r7++;
|
||||
r8 = i;
|
||||
numApprentices++;
|
||||
apprenticeId = i;
|
||||
}
|
||||
}
|
||||
|
||||
switch (r7)
|
||||
switch (numApprentices)
|
||||
{
|
||||
case 1:
|
||||
structId = gSaveBlock2Ptr->playerApprentice.field_B2_1 + 1;
|
||||
gSaveBlock2Ptr->apprentices[structId] = structPtr[r8];
|
||||
gSaveBlock2Ptr->playerApprentice.field_B2_1 = (gSaveBlock2Ptr->playerApprentice.field_B2_1 + 1) % 3;
|
||||
apprenticeSaveId = gSaveBlock2Ptr->playerApprentice.saveId + 1;
|
||||
gSaveBlock2Ptr->apprentices[apprenticeSaveId] = mixApprenticePtr[apprenticeId];
|
||||
gSaveBlock2Ptr->playerApprentice.saveId = (gSaveBlock2Ptr->playerApprentice.saveId + 1) % (APPRENTICE_COUNT - 1);
|
||||
break;
|
||||
case 2:
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
structId = ((i ^ 1) + gSaveBlock2Ptr->playerApprentice.field_B2_1) % 3 + 1;
|
||||
gSaveBlock2Ptr->apprentices[structId] = structPtr[i];
|
||||
apprenticeSaveId = ((i ^ 1) + gSaveBlock2Ptr->playerApprentice.saveId) % (APPRENTICE_COUNT - 1) + 1;
|
||||
gSaveBlock2Ptr->apprentices[apprenticeSaveId] = mixApprenticePtr[i];
|
||||
}
|
||||
gSaveBlock2Ptr->playerApprentice.field_B2_1 = (gSaveBlock2Ptr->playerApprentice.field_B2_1 + 2) % 3;
|
||||
gSaveBlock2Ptr->playerApprentice.saveId = (gSaveBlock2Ptr->playerApprentice.saveId + 2) % (APPRENTICE_COUNT - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user