diff --git a/asm/macros/trainer_hill.inc b/asm/macros/trainer_hill.inc index 65c8c6bef..988e2867a 100644 --- a/asm/macros/trainer_hill.inc +++ b/asm/macros/trainer_hill.inc @@ -100,9 +100,9 @@ special CallTrainerHillFunction .endm - @ Set the challenge mode to HILL_TAG_* (Normal, Variety, Unique, or Expert) - .macro trainerhill_settag tag:req - setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_TAG - copyvar VAR_0x8005, \tag + @ Set the challenge mode to HILL_MODE_* (Normal, Variety, Unique, or Expert) + .macro trainerhill_setmode mode:req + setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_MODE + copyvar VAR_0x8005, \mode special CallTrainerHillFunction .endm diff --git a/data/maps/TrainerHill_Entrance/scripts.inc b/data/maps/TrainerHill_Entrance/scripts.inc index 8989883e4..2dd001a3b 100644 --- a/data/maps/TrainerHill_Entrance/scripts.inc +++ b/data/maps/TrainerHill_Entrance/scripts.inc @@ -157,7 +157,7 @@ TrainerHill_Entrance_EventScript_ChooseChallenge:: switch VAR_RESULT case 4, TrainerHill_Entrance_EventScript_CancelEntry case MULTI_B_PRESSED, TrainerHill_Entrance_EventScript_CancelEntry - trainerhill_settag VAR_RESULT + trainerhill_setmode VAR_RESULT setvar VAR_TRAINER_HILL_IS_ACTIVE, 1 setvar VAR_TEMP_5, 0 special HealPlayerParty diff --git a/graphics/trainer_hill/maps_expert/floor_0/collision.bin b/graphics/trainer_hill/maps_expert/floor_0/collision.bin new file mode 100755 index 000000000..ca6e4ca28 Binary files /dev/null and b/graphics/trainer_hill/maps_expert/floor_0/collision.bin differ diff --git a/graphics/trainer_hill/maps_expert/floor_0/metatiles.bin b/graphics/trainer_hill/maps_expert/floor_0/metatiles.bin new file mode 100755 index 000000000..c7a43d4c6 --- /dev/null +++ b/graphics/trainer_hill/maps_expert/floor_0/metatiles.bin @@ -0,0 +1 @@ +1;;;9989:;;;1;;;;;,99:;;;;;1;;;;isMMMMMMMMis@;UUUUUUUU1AiAٚAsi;ۛsss1si;͛ssDss1si;ۛsss1siAۛAs@;1Ai;MMggggMM1si;UUUU1si;9999:;;9999:sissssssssssssss \ No newline at end of file diff --git a/graphics/trainer_hill/maps_expert/floor_1/collision.bin b/graphics/trainer_hill/maps_expert/floor_1/collision.bin new file mode 100755 index 000000000..ef5851500 Binary files /dev/null and b/graphics/trainer_hill/maps_expert/floor_1/collision.bin differ diff --git a/graphics/trainer_hill/maps_expert/floor_1/metatiles.bin b/graphics/trainer_hill/maps_expert/floor_1/metatiles.bin new file mode 100755 index 000000000..a89a14c69 --- /dev/null +++ b/graphics/trainer_hill/maps_expert/floor_1/metatiles.bin @@ -0,0 +1 @@ +1;;;9989:;;;FFFFFFFFFFFFFxF|}|{zF}FFFFFFFFFFFFF~}~FFFFFFFFFFFFFF}|{z|FFFFFFFFFFFFFF|}~}~FFFFFFFFFFFFF֖֖֛֖֖֖֖֖֖֖֛ \ No newline at end of file diff --git a/graphics/trainer_hill/maps_expert/floor_2/collision.bin b/graphics/trainer_hill/maps_expert/floor_2/collision.bin new file mode 100755 index 000000000..891a7f2c1 --- /dev/null +++ b/graphics/trainer_hill/maps_expert/floor_2/collision.bin @@ -0,0 +1 @@ +>>}~=x=x}~y>> \ No newline at end of file diff --git a/graphics/trainer_hill/maps_expert/floor_2/metatiles.bin b/graphics/trainer_hill/maps_expert/floor_2/metatiles.bin new file mode 100755 index 000000000..7164f059d --- /dev/null +++ b/graphics/trainer_hill/maps_expert/floor_2/metatiles.bin @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/graphics/trainer_hill/maps_expert/floor_3/collision.bin b/graphics/trainer_hill/maps_expert/floor_3/collision.bin new file mode 100755 index 000000000..3d25428f1 Binary files /dev/null and b/graphics/trainer_hill/maps_expert/floor_3/collision.bin differ diff --git a/graphics/trainer_hill/maps_expert/floor_3/metatiles.bin b/graphics/trainer_hill/maps_expert/floor_3/metatiles.bin new file mode 100755 index 000000000..f2200b713 --- /dev/null +++ b/graphics/trainer_hill/maps_expert/floor_3/metatiles.bin @@ -0,0 +1 @@ +1;;;9999:;;;FFFFFFF6666FFFFFFFF6FۛF6FF6ۛ6F֖ۛF6ۛ6FF6FۛF6FFFFFFFF6666FFFFFFF \ No newline at end of file diff --git a/graphics/trainer_hill/maps_jp/floor_0/collision.bin b/graphics/trainer_hill/maps_jp/floor_0/collision.bin new file mode 100755 index 000000000..817f4f54c --- /dev/null +++ b/graphics/trainer_hill/maps_jp/floor_0/collision.bin @@ -0,0 +1 @@ +oAcA`ADAUAU \ No newline at end of file diff --git a/graphics/trainer_hill/maps_jp/floor_0/metatiles.bin b/graphics/trainer_hill/maps_jp/floor_0/metatiles.bin new file mode 100755 index 000000000..8d1787efd --- /dev/null +++ b/graphics/trainer_hill/maps_jp/floor_0/metatiles.bin @@ -0,0 +1 @@ +155;&&%9:;;;1++;44++43????;1++;;;44;3???;;1++55555;3???;?1+444+44;,???;;1+;5;+;5;5;???;1+;+;+;+;+;???;14;+;4;+5+;;?;;1;;4;;;444?;;;? \ No newline at end of file diff --git a/graphics/trainer_hill/maps_jp/floor_1/collision.bin b/graphics/trainer_hill/maps_jp/floor_1/collision.bin new file mode 100755 index 000000000..58f80b49b Binary files /dev/null and b/graphics/trainer_hill/maps_jp/floor_1/collision.bin differ diff --git a/graphics/trainer_hill/maps_jp/floor_1/metatiles.bin b/graphics/trainer_hill/maps_jp/floor_1/metatiles.bin new file mode 100755 index 000000000..951723792 --- /dev/null +++ b/graphics/trainer_hill/maps_jp/floor_1/metatiles.bin @@ -0,0 +1 @@ +1;5;9&%9:;5;1;+;;+++++;;;+;1;+;;+++++>>;+;1;+;;+++++;;;+;?;+;;+++++;>>+;1;+;;++,++;;;+;1?+;;,,;,,>>;+;1;+5555;55555+;?;,,,,,;,,,,,,;1;??;55;55555551???;++5+++++++1??;;++++++++++1;;;?,,,,,,,,,, \ No newline at end of file diff --git a/graphics/trainer_hill/maps_normal/floor_0/collision.bin b/graphics/trainer_hill/maps_normal/floor_0/collision.bin new file mode 100755 index 000000000..80213aaae --- /dev/null +++ b/graphics/trainer_hill/maps_normal/floor_0/collision.bin @@ -0,0 +1 @@ +?%!~A } Ay \ No newline at end of file diff --git a/graphics/trainer_hill/maps_normal/floor_0/metatiles.bin b/graphics/trainer_hill/maps_normal/floor_0/metatiles.bin new file mode 100755 index 000000000..658a5ace6 --- /dev/null +++ b/graphics/trainer_hill/maps_normal/floor_0/metatiles.bin @@ -0,0 +1 @@ +1;55&&%&:;5;1;,,,+$$$$,;;,;-;;;;+;;;;5;55;3;2!0+;2!0+;,+;35;;;,5;;;+;;+;4,;2!0+20;+20,;15;;5;,;;5,;;551,20+205;+2!0,,15;;+;;+;,;5;;;1,20+20+;20+20;1555+;;+;;5+;551+,,,20+20,,;,,1+;;5;;+;;5;;;;1,20+;;,20,20;51;;;,;;;;;;;;;, \ No newline at end of file diff --git a/graphics/trainer_hill/maps_normal/floor_1/collision.bin b/graphics/trainer_hill/maps_normal/floor_1/collision.bin new file mode 100755 index 000000000..fb3f6aec0 --- /dev/null +++ b/graphics/trainer_hill/maps_normal/floor_1/collision.bin @@ -0,0 +1 @@ +s @ @QSQQQQQPP \ No newline at end of file diff --git a/graphics/trainer_hill/maps_normal/floor_1/metatiles.bin b/graphics/trainer_hill/maps_normal/floor_1/metatiles.bin new file mode 100755 index 000000000..52af9cfdc --- /dev/null +++ b/graphics/trainer_hill/maps_normal/floor_1/metatiles.bin @@ -0,0 +1 @@ +˛ۛۛۛ \ No newline at end of file diff --git a/graphics/trainer_hill/maps_normal/floor_2/collision.bin b/graphics/trainer_hill/maps_normal/floor_2/collision.bin new file mode 100755 index 000000000..b3ccacdd4 Binary files /dev/null and b/graphics/trainer_hill/maps_normal/floor_2/collision.bin differ diff --git a/graphics/trainer_hill/maps_normal/floor_2/metatiles.bin b/graphics/trainer_hill/maps_normal/floor_2/metatiles.bin new file mode 100755 index 000000000..bf2b52c32 --- /dev/null +++ b/graphics/trainer_hill/maps_normal/floor_2/metatiles.bin @@ -0,0 +1 @@ +1555&&8&.55;icddddqqqrdddcsicssssssssssscsicssssssssssscsicCA@ABAAJBAAcsicsssssssdssscsicACKCCABB@A@csicssdsssssssscsicA@BBAABJBABcsicsssssssdssscsicABACKAAA@CAcsicssssdsssssscsicA@CABBAJBABcsidsssssssdsssdsiCCABBACAA@BABsiBsssssssssssBs \ No newline at end of file diff --git a/graphics/trainer_hill/maps_normal/floor_3/collision.bin b/graphics/trainer_hill/maps_normal/floor_3/collision.bin new file mode 100755 index 000000000..f4c47254c Binary files /dev/null and b/graphics/trainer_hill/maps_normal/floor_3/collision.bin differ diff --git a/graphics/trainer_hill/maps_normal/floor_3/metatiles.bin b/graphics/trainer_hill/maps_normal/floor_3/metatiles.bin new file mode 100755 index 000000000..f81c9ef4e --- /dev/null +++ b/graphics/trainer_hill/maps_normal/floor_3/metatiles.bin @@ -0,0 +1 @@ +1;;;9&%9:;;;+$$$+;;;;;3+;;;+55;553+;;;+,,;,,3+;;;+4,+;;;,,;;;;;;;3+;;;54+;;;+,;;++;;;+,,+;;;+;;3+;;;+;+;3+555+;,;4,,,,, \ No newline at end of file diff --git a/graphics/trainer_hill/maps_unique/floor_0/collision.bin b/graphics/trainer_hill/maps_unique/floor_0/collision.bin new file mode 100755 index 000000000..e4a3b5a15 Binary files /dev/null and b/graphics/trainer_hill/maps_unique/floor_0/collision.bin differ diff --git a/graphics/trainer_hill/maps_unique/floor_0/metatiles.bin b/graphics/trainer_hill/maps_unique/floor_0/metatiles.bin new file mode 100755 index 000000000..ab592413f --- /dev/null +++ b/graphics/trainer_hill/maps_unique/floor_0/metatiles.bin @@ -0,0 +1 @@ +ۛ \ No newline at end of file diff --git a/graphics/trainer_hill/maps_unique/floor_1/collision.bin b/graphics/trainer_hill/maps_unique/floor_1/collision.bin new file mode 100755 index 000000000..00c559422 Binary files /dev/null and b/graphics/trainer_hill/maps_unique/floor_1/collision.bin differ diff --git a/graphics/trainer_hill/maps_unique/floor_1/metatiles.bin b/graphics/trainer_hill/maps_unique/floor_1/metatiles.bin new file mode 100755 index 000000000..43e94bb09 --- /dev/null +++ b/graphics/trainer_hill/maps_unique/floor_1/metatiles.bin @@ -0,0 +1 @@ +1;;;9&%9:;;;-;;;5,#$#,5;;;; \ No newline at end of file diff --git a/graphics/trainer_hill/maps_unique/floor_2/collision.bin b/graphics/trainer_hill/maps_unique/floor_2/collision.bin new file mode 100755 index 000000000..ada48a189 Binary files /dev/null and b/graphics/trainer_hill/maps_unique/floor_2/collision.bin differ diff --git a/graphics/trainer_hill/maps_unique/floor_2/metatiles.bin b/graphics/trainer_hill/maps_unique/floor_2/metatiles.bin new file mode 100755 index 000000000..9b9057e15 --- /dev/null +++ b/graphics/trainer_hill/maps_unique/floor_2/metatiles.bin @@ -0,0 +1 @@ +1;;;9989:;;;iFFFFFFFFFFFF|FiFzsssysss}sssFiFsFFFFFFFFFFFFiFss{s|s{szsssFiFFFFFFFFFFFFzFiFsssss}|s|s{sFiFFFFFF|FFFFFFFFF;;;FFFF;;;FFFF;;;FFFFFFFFxFFFFFFFFz|FFFFFFFFFFFFF|{zy}~} \ No newline at end of file diff --git a/graphics/trainer_hill/maps_unique/floor_3/collision.bin b/graphics/trainer_hill/maps_unique/floor_3/collision.bin new file mode 100755 index 000000000..e234fbe0c Binary files /dev/null and b/graphics/trainer_hill/maps_unique/floor_3/collision.bin differ diff --git a/graphics/trainer_hill/maps_unique/floor_3/metatiles.bin b/graphics/trainer_hill/maps_unique/floor_3/metatiles.bin new file mode 100755 index 000000000..66840137c --- /dev/null +++ b/graphics/trainer_hill/maps_unique/floor_3/metatiles.bin @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/graphics/trainer_hill/maps_variety/floor_0/collision.bin b/graphics/trainer_hill/maps_variety/floor_0/collision.bin new file mode 100755 index 000000000..24fc2ea1e Binary files /dev/null and b/graphics/trainer_hill/maps_variety/floor_0/collision.bin differ diff --git a/graphics/trainer_hill/maps_variety/floor_0/metatiles.bin b/graphics/trainer_hill/maps_variety/floor_0/metatiles.bin new file mode 100755 index 000000000..af741b7eb --- /dev/null +++ b/graphics/trainer_hill/maps_variety/floor_0/metatiles.bin @@ -0,0 +1 @@ +1;;;9989:;;;@AAAAABCCCCC@AA@CAAAB@CABBBA@AAAAB@CACC@A@AACAB@CCCA@A@AAABBB@CCCAA@A@AAAAA@A@AAAAA@A@ABAAA@A@AAAAA@A@AAAAA@A@BACCCA@BBBBA@A@@AAAAAAAAA@A@@CCAAABBBB@A@CCAACCCCCCCA@BBBBBBBBBBBBBB \ No newline at end of file diff --git a/graphics/trainer_hill/maps_variety/floor_1/collision.bin b/graphics/trainer_hill/maps_variety/floor_1/collision.bin new file mode 100755 index 000000000..27f945b28 Binary files /dev/null and b/graphics/trainer_hill/maps_variety/floor_1/collision.bin differ diff --git a/graphics/trainer_hill/maps_variety/floor_1/metatiles.bin b/graphics/trainer_hill/maps_variety/floor_1/metatiles.bin new file mode 100755 index 000000000..c5a9aa5d4 --- /dev/null +++ b/graphics/trainer_hill/maps_variety/floor_1/metatiles.bin @@ -0,0 +1 @@ +1;;;9989:;;;@@@@@@@B@BBBBBBBBBBBBBBBBBAB֖AB֖@֜ \ No newline at end of file diff --git a/graphics/trainer_hill/maps_variety/floor_2/collision.bin b/graphics/trainer_hill/maps_variety/floor_2/collision.bin new file mode 100755 index 000000000..606249b2a Binary files /dev/null and b/graphics/trainer_hill/maps_variety/floor_2/collision.bin differ diff --git a/graphics/trainer_hill/maps_variety/floor_2/metatiles.bin b/graphics/trainer_hill/maps_variety/floor_2/metatiles.bin new file mode 100755 index 000000000..fcb1d4f61 --- /dev/null +++ b/graphics/trainer_hill/maps_variety/floor_2/metatiles.bin @@ -0,0 +1 @@ +1;;;9989:;;; \ No newline at end of file diff --git a/graphics/trainer_hill/maps_variety/floor_3/collision.bin b/graphics/trainer_hill/maps_variety/floor_3/collision.bin new file mode 100755 index 000000000..153a26637 Binary files /dev/null and b/graphics/trainer_hill/maps_variety/floor_3/collision.bin differ diff --git a/graphics/trainer_hill/maps_variety/floor_3/metatiles.bin b/graphics/trainer_hill/maps_variety/floor_3/metatiles.bin new file mode 100755 index 000000000..b1b32f520 --- /dev/null +++ b/graphics/trainer_hill/maps_variety/floor_3/metatiles.bin @@ -0,0 +1 @@ +1;;;9989:;;;i@mAsA^AqBEEEEECsdsCsdsAsEEEEEe@sBmBsBmBEEEEElsAsds@sds@sBsAi@mAs@mCsCmBsBm@sdsCsdsAsdsAsdeBsBmAs@mBsAmBslsAsdsBsdsBsdsBi@mAsAmBsCmAsCm@sdsCsdsCsdsBsdeBsBmCsBmBsAm@sls@sdsAsdsBsdsBi@mBsBmCs@mAs@m@sds@sds@sdsCsd \ No newline at end of file diff --git a/include/constants/trainer_hill.h b/include/constants/trainer_hill.h index 0e802bba8..371763faf 100644 --- a/include/constants/trainer_hill.h +++ b/include/constants/trainer_hill.h @@ -8,6 +8,12 @@ #define TRAINER_HILL_ROOF 5 #define TRAINER_HILL_ENTRANCE 6 +#define HILL_MODE_NORMAL 0 +#define HILL_MODE_VARIETY 1 +#define HILL_MODE_UNIQUE 2 +#define HILL_MODE_EXPERT 3 +#define NUM_TRAINER_HILL_MODES 4 + #define NUM_TRAINER_HILL_FLOORS 4 #define NUM_TRAINER_HILL_FLOORS_JP 2 @@ -30,20 +36,33 @@ #define TRAINER_HILL_FUNC_SET_GAME_SAVED 14 #define TRAINER_HILL_FUNC_CLEAR_GAME_SAVED 15 #define TRAINER_HILL_FUNC_GET_WON 16 -#define TRAINER_HILL_FUNC_SET_TAG 17 +#define TRAINER_HILL_FUNC_SET_MODE 17 #define TRAINER_HILL_TEXT_INTRO 2 #define TRAINER_HILL_TEXT_PLAYER_LOST 3 #define TRAINER_HILL_TEXT_PLAYER_WON 4 #define TRAINER_HILL_TEXT_AFTER 5 -#define TRAINER_HILL_TRAINERS_PER_FLOOR 2 -#define NUM_TRAINER_HILL_TRAINERS (NUM_TRAINER_HILL_FLOORS * TRAINER_HILL_TRAINERS_PER_FLOOR) -#define NUM_TRAINER_HILL_TRAINERS_JP (NUM_TRAINER_HILL_FLOORS_JP * TRAINER_HILL_TRAINERS_PER_FLOOR) +#define HILL_TRAINERS_PER_FLOOR 2 +#define NUM_TRAINER_HILL_TRAINERS (NUM_TRAINER_HILL_FLOORS * HILL_TRAINERS_PER_FLOOR) +#define NUM_TRAINER_HILL_TRAINERS_JP (NUM_TRAINER_HILL_FLOORS_JP * HILL_TRAINERS_PER_FLOOR) // Values returned by TrainerHillGetChallengeStatus #define TRAINER_HILL_PLAYER_STATUS_LOST 0 #define TRAINER_HILL_PLAYER_STATUS_ECARD_SCANNED 1 #define TRAINER_HILL_PLAYER_STATUS_NORMAL 2 +#define HILL_TRAINER_NAME_LENGTH 11 + +#define TRAINER_HILL_OTID 0x10000000 + +// The full map of each Trainer Hill floor is 16x21. +// The first 5x21 at the top is the entrance/exit area, +// and the remaining 16x16 is the randomized portion of +// the room where the trainers are. +#define HILL_FLOOR_WIDTH 16 +#define HILL_FLOOR_HEIGHT_MAIN 16 +#define HILL_FLOOR_HEIGHT_MARGIN 5 +#define HILL_FLOOR_HEIGHT (HILL_FLOOR_HEIGHT_MAIN + HILL_FLOOR_HEIGHT_MARGIN) + #endif diff --git a/include/ereader_helpers.h b/include/ereader_helpers.h index 8bf3dc43b..29386bcb2 100755 --- a/include/ereader_helpers.h +++ b/include/ereader_helpers.h @@ -35,7 +35,7 @@ struct EReaderTrainerHillTrainer { u8 trainerNum; struct TrainerHillTrainer trainer; - struct TrHillDisplay display; + struct TrainerHillFloorMap map; u32 checksum; }; // size=0x274 diff --git a/include/global.h b/include/global.h index 0122ecd5c..89f725176 100644 --- a/include/global.h +++ b/include/global.h @@ -14,6 +14,7 @@ #include "constants/maps.h" #include "constants/pokemon.h" #include "constants/easy_chat.h" +#include "constants/trainer_hill.h" // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); @@ -279,8 +280,6 @@ struct BattleTowerPokemon u8 friendship; }; -#define NULL_BATTLE_TOWER_POKEMON { .nickname = __("$$$$$$$$$$$") } - struct EmeraldBattleTowerRecord { /*0x00*/ u8 lvlMode; // 0 = level 50, 1 = level 100 @@ -808,7 +807,7 @@ struct TrainerNameRecord u8 trainerName[PLAYER_NAME_LENGTH + 1]; }; -struct SaveTrainerHill +struct TrainerHillSave { /*0x3D64*/ u32 timer; /*0x3D68*/ u32 bestTime; @@ -820,7 +819,7 @@ struct SaveTrainerHill /*0x3D6E*/ u16 hasLost:1; /*0x3D6E*/ u16 maybeECardScanDuringChallenge:1; /*0x3D6E*/ u16 field_3D6E_0f:1; - /*0x3D6E*/ u16 tag:2; + /*0x3D6E*/ u16 mode:2; // HILL_MODE_* }; struct WonderNewsMetadata @@ -1003,7 +1002,7 @@ struct SaveBlock1 /*0x31F8*/ struct EnigmaBerry enigmaBerry; /*0x322C*/ struct MysteryGiftSave mysteryGift; /*0x3598*/ u8 unused_3598[0x180]; - /*0x3718*/ u32 trainerHillTimes[4]; + /*0x3718*/ u32 trainerHillTimes[NUM_TRAINER_HILL_MODES]; /*0x3728*/ struct RamScript ramScript; /*0x3B14*/ struct RecordMixingGift recordMixingGift; /*0x3B24*/ u8 seen2[NUM_DEX_FLAG_BYTES]; @@ -1011,7 +1010,7 @@ struct SaveBlock1 /*0x3B98*/ struct TrainerNameRecord trainerNameRecords[20]; /*0x3C88*/ u8 registeredTexts[UNION_ROOM_KB_ROW_COUNT][21]; /*0x3D5A*/ u8 unused_3D5A[10]; - /*0x3D64*/ struct SaveTrainerHill trainerHill; + /*0x3D64*/ struct TrainerHillSave trainerHill; /*0x3D70*/ struct WaldaPhrase waldaPhrase; // sizeof: 0x3D88 }; diff --git a/include/trainer_hill.h b/include/trainer_hill.h index 647ba9647..954087e1b 100644 --- a/include/trainer_hill.h +++ b/include/trainer_hill.h @@ -1,13 +1,13 @@ #ifndef GUARD_TRAINER_HILL_H #define GUARD_TRAINER_HILL_H -#define HILL_TRAINER_NAME_LENGTH 11 +#define DUMMY_HILL_MON { .nickname = __("$$$$$$$$$$$") } struct TrainerHillTrainer { u8 name[HILL_TRAINER_NAME_LENGTH]; u8 facilityClass; - u32 unused; + bool32 unused; // Set to TRUE on JP trainers u16 speechBefore[EASY_CHAT_BATTLE_WORDS_COUNT]; u16 speechWin[EASY_CHAT_BATTLE_WORDS_COUNT]; u16 speechLose[EASY_CHAT_BATTLE_WORDS_COUNT]; @@ -15,44 +15,30 @@ struct TrainerHillTrainer struct BattleTowerPokemon mons[PARTY_SIZE]; }; -struct TrHillRoomTrainers +struct TrainerHillFloorMap { - u8 name[2][HILL_TRAINER_NAME_LENGTH]; - u8 facilityClass[2]; + u8 metatileData[HILL_FLOOR_WIDTH * HILL_FLOOR_HEIGHT_MAIN]; // Add NUM_METATILES_IN_PRIMARY to the values in this array to get metatile ids. + u16 collisionData[HILL_FLOOR_WIDTH]; // One bit for each tile in column-major order, so every array entry is one row. 1 = impassable, 0 = passable + u8 trainerCoords[HILL_TRAINERS_PER_FLOOR]; // Starting at (0,6). Format is 0bYYYYXXXX. + u8 trainerDirections; // DIR_* - 1, 4 bits per trainer + u8 trainerRanges; // 4 bits per trainer }; -struct TrHillDisplay -{ - // Metatile data. Add 0x200 to the values in this array to get metatiles. - // This data then overwrites the metatiles in the map starting at (0,5) - u8 metatileData[0x100]; - // Collision data. One bit for each tile in column-major order, - // so every array entry is one row. 1 = impassable, 0 = passable - u16 collisionData[16]; - // Trainer coordinates, starting at (0,6). Format is 0bYYYYXXXX. - u8 coords[2]; - // Trainer facing directions. Same as (DIR_* - 1). - // Effectively an array of nibbles, one for each trainer. - u8 direction; - // Trainer sight ranges. Effectively an array of nibbles, one for each trainer. - u8 range; -}; - -struct TrHillFloor +struct TrainerHillFloor { u8 trainerNum1; u8 trainerNum2; - struct TrainerHillTrainer trainers[2]; - struct TrHillDisplay display; + struct TrainerHillTrainer trainers[HILL_TRAINERS_PER_FLOOR]; + struct TrainerHillFloorMap map; }; -struct TrHillTag +struct TrainerHillChallenge { u8 numTrainers; u8 unused1; u8 numFloors; - u32 checksum; - struct TrHillFloor floors[0]; + u32 checksum; // A byte array sum of the floor data + struct TrainerHillFloor floors[0]; // Floor data is assumed to follow, so this will be intentionally read out of bounds }; extern u32 *gTrainerHillVBlankCounter; diff --git a/src/data/battle_frontier/trainer_hill.h b/src/data/battle_frontier/trainer_hill.h index 75785b258..c13e6a8c9 100644 --- a/src/data/battle_frontier/trainer_hill.h +++ b/src/data/battle_frontier/trainer_hill.h @@ -1,20 +1,23 @@ -#define TRAINER_HILL_OTID 0x10000000 - // NOTE: Each of these macros turn data into one byte. Therefore ranges for all arguments is 0-15 -// See struct TrHillDisplay for more info about each +// See struct TrainerHillFloorMap for more info about each #define COORDS_XY(x,y) ((y<<4)|(x)) #define TRAINER_DIRS(a, b) (((a-1)<<4)|(b-1)) #define TRAINER_RANGE(a, b) ((a<<4)|(b)) -static const struct TrHillTag sDataTagJPDefault = { +// WARNING: While not referenced directly, the floor data in this file is referenced by virtue +// of coming after its corresponding challenge (see SetUpDataStruct in trainer_hill.c). +// Do not insert data between a pair of 'sChallenge_Mode' and 'sFloors_Mode'. + +// Unused +static const struct TrainerHillChallenge sChallenge_JPDefault = { .numTrainers = NUM_TRAINER_HILL_TRAINERS_JP, .unused1 = 1, .numFloors = NUM_TRAINER_HILL_FLOORS_JP, .checksum = 0x0 }; - -static const struct TrHillFloor sDataTagJPDefault_Floors[] = { +// Unused +static const struct TrainerHillFloor sFloors_JPDefault[] = { [0] = { .trainerNum1 = 0, .trainerNum2 = 0, @@ -22,7 +25,7 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { [0] = { .name = __("シゲノブ$$$$ "), .facilityClass = FACILITY_CLASS_YOUNGSTER, - .unused = 0x1, + .unused = TRUE, .speechBefore = { EC_WORD_TRAINER, EC_WORD_MRS, EC_WORD_EXCL, EC_WORD_THEY_WERE, EC_WORD_OPPONENT, EC_WORD_CAN }, .speechWin = { EC_WORD_TRAINER, EC_WORD_MRS, EC_WORD_WEAK, EC_WORD_OF, EC_WORD_WERE, EC_WORD_ELLIPSIS_ELLIPSIS_ELLIPSIS }, .speechLose = { EC_WORD_TRAINER, EC_WORD_MRS, EC_WORD_STRONG, EC_WORD_HEY_QUES, EC_WORD_EXCL, EC_WORD_EXCL }, @@ -32,13 +35,10 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .species = SPECIES_ZIGZAGOON, .heldItem = ITEM_SITRUS_BERRY, .moves = { MOVE_HEADBUTT, MOVE_PIN_MISSILE, MOVE_GROWL, MOVE_TAIL_WHIP }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 110, .attackEV = 100, .defenseEV = 100, .speedEV = 100, - .spAttackEV = 0, .spDefenseEV = 100, .otId = TRAINER_HILL_OTID, .hpIV = 5, @@ -50,18 +50,14 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .abilityNum = 0, .personality = 0x80, .nickname = __("ジグザグマ$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [1] = { .species = SPECIES_SHROOMISH, .heldItem = ITEM_PECHA_BERRY, .moves = { MOVE_MEGA_DRAIN, MOVE_LEECH_SEED, MOVE_POISON_POWDER, MOVE_GROWTH }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 120, - .attackEV = 0, .defenseEV = 120, - .speedEV = 0, .spAttackEV = 150, .spDefenseEV = 120, .otId = TRAINER_HILL_OTID, @@ -74,19 +70,15 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .abilityNum = 0, .personality = 0x0, .nickname = __("キノココ$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [2] = { .species = SPECIES_SANDSHREW, .heldItem = ITEM_QUICK_CLAW, .moves = { MOVE_SCRATCH, MOVE_POISON_STING, MOVE_SAND_ATTACK, MOVE_SWIFT }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 110, .attackEV = 100, .defenseEV = 100, - .speedEV = 0, - .spAttackEV = 0, .spDefenseEV = 200, .otId = TRAINER_HILL_OTID, .hpIV = 5, @@ -98,35 +90,32 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .abilityNum = 0, .personality = 0x80, .nickname = __("サンド$$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, - [3] = NULL_BATTLE_TOWER_POKEMON, - [4] = NULL_BATTLE_TOWER_POKEMON, - [5] = NULL_BATTLE_TOWER_POKEMON + [3] = DUMMY_HILL_MON, + [4] = DUMMY_HILL_MON, + [5] = DUMMY_HILL_MON } }, [1] = { .name = __("アカリ$$$$$ "), .facilityClass = FACILITY_CLASS_PARASOL_LADY, - .unused = 0x1, + .unused = TRUE, .speechBefore = { EC_WORD_SHE, EC_WORD_EVERY, EC_WORD_TYPE, EC_WORD_ADORE, EC_WORD_FOR, EC_WORD_EXCL }, .speechWin = { EC_WORD_SURPRISE, EC_WORD_THESE, EC_WORD_WONDER, EC_WORD_GIGGLE, EC_WORD_ELLIPSIS, EC_WORD_EXCL }, .speechLose = { EC_WORD_OH_QUES, EC_MOVE(EARTHQUAKE), EC_WORD_EXISTS, EC_WORD_OF, EC_WORD_WITHOUT, EC_WORD_EXCL }, .speechAfter = { EC_WORD_YOU_RE, EC_WORD_PROBABLY, EC_WORD_END, EC_WORD_UNTIL, EC_WORD_GOING, EC_WORD_ANYWHERE }, .mons = { - [0] = NULL_BATTLE_TOWER_POKEMON, - [1] = NULL_BATTLE_TOWER_POKEMON, - [2] = NULL_BATTLE_TOWER_POKEMON, + [0] = DUMMY_HILL_MON, + [1] = DUMMY_HILL_MON, + [2] = DUMMY_HILL_MON, [3] = { .species = SPECIES_WINGULL, .heldItem = ITEM_CHERI_BERRY, .moves = { MOVE_WATER_GUN, MOVE_WING_ATTACK, MOVE_GROWL, MOVE_SUPERSONIC }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 110, .attackEV = 100, .defenseEV = 100, - .speedEV = 0, .spAttackEV = 100, .spDefenseEV = 100, .otId = TRAINER_HILL_OTID, @@ -139,18 +128,15 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .abilityNum = 0, .personality = 0x0, .nickname = __("キャモメ$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [4] = { .species = SPECIES_NUMEL, .heldItem = ITEM_FOCUS_BAND, .moves = { MOVE_EMBER, MOVE_DIG, MOVE_TACKLE, MOVE_FOCUS_ENERGY }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 110, .attackEV = 100, .defenseEV = 100, - .speedEV = 0, .spAttackEV = 100, .spDefenseEV = 100, .otId = TRAINER_HILL_OTID, @@ -163,18 +149,15 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .abilityNum = 0, .personality = 0x96, .nickname = __("ドンメル$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [5] = { .species = SPECIES_SURSKIT, .heldItem = ITEM_PERSIM_BERRY, .moves = { MOVE_BUBBLE_BEAM, MOVE_MUD_SHOT, MOVE_QUICK_ATTACK, MOVE_AGILITY }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 100, .attackEV = 100, .defenseEV = 100, - .speedEV = 0, .spAttackEV = 100, .spDefenseEV = 100, .otId = TRAINER_HILL_OTID, @@ -187,34 +170,17 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .abilityNum = 0, .personality = 0x0, .nickname = __("アメタマ$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, } }, }, - .display = { - .metatileData = { - 0x31, 0x35, 0x35, 0x3b, 0x26, 0x26, 0x1b, 0x1c, 0x1d, 0x25, 0x39, 0x3a, 0x3b, 0x3b, 0x3b, 0x08, - 0x31, 0x2b, 0x2b, 0x3b, 0x34, 0x34, 0x2b, 0x2b, 0x34, 0x33, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x08, - 0x31, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x34, 0x34, 0x3b, 0x33, 0x3f, 0x3f, 0x3f, 0x3b, 0x3b, 0x08, - 0x31, 0x2b, 0x2b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x3b, 0x33, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, 0x08, - 0x31, 0x2b, 0x34, 0x34, 0x34, 0x2b, 0x34, 0x34, 0x3b, 0x2c, 0x3f, 0x3f, 0x3f, 0x3b, 0x3b, 0x08, - 0x31, 0x2b, 0x3b, 0x35, 0x3b, 0x2b, 0x3b, 0x35, 0x3b, 0x35, 0x3b, 0x3f, 0x3f, 0x3f, 0x3b, 0x08, - 0x31, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x3f, 0x3f, 0x3f, 0x3b, 0x08, - 0x31, 0x34, 0x3b, 0x2b, 0x3b, 0x34, 0x3b, 0x2b, 0x35, 0x2b, 0x3b, 0x3b, 0x3f, 0x3b, 0x3b, 0x08, - 0x31, 0x3b, 0x3b, 0x34, 0x3b, 0x3b, 0x3b, 0x34, 0x34, 0x34, 0x3f, 0x3b, 0x3b, 0x3b, 0x3f, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = { 0x0381, 0x6fc1, 0x6341, 0x6041, 0x7f41, 0x4401, 0x5541, 0x5541, 0x11c1, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }, - .coords = { COORDS_XY(8,2), COORDS_XY(8,7) }, - .direction = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH), - .range = TRAINER_RANGE(2, 3) + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_jp/floor_0/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_jp/floor_0/collision.bin"), + .trainerCoords = { COORDS_XY(8,2), COORDS_XY(8,7) }, + .trainerDirections = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH), + .trainerRanges = TRAINER_RANGE(2, 3) } }, [1] = { @@ -224,7 +190,7 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { [0] = { .name = __("シゲゾウ$$$$ "), .facilityClass = FACILITY_CLASS_NINJA_BOY, - .unused = 0x1, + .unused = TRUE, .speechBefore = { EC_WORD_WIN, EC_WORD_UNTIL, EC_WORD_DAUGHTER, EC_MOVE(CONSTRICT), EC_WORD_OF, EC_WORD_WERE }, .speechWin = { EC_MOVE(CONSTRICT), EC_WORD_UNTIL, EC_WORD_LESS, EC_WORD_NONE, EC_WORD_HEY_QUES, EC_WORD_EXCL }, .speechLose = { EC_WORD_YET, EC_WORD_ELLIPSIS_ELLIPSIS_ELLIPSIS, EC_WORD_URGH, EC_WORD_ALMOST, EC_WORD_POWER, EC_WORD_NONE }, @@ -234,14 +200,10 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .species = SPECIES_ELECTRIKE, .heldItem = ITEM_CHERI_BERRY, .moves = { MOVE_SPARK, MOVE_THUNDER_WAVE, MOVE_QUICK_ATTACK, MOVE_ROAR }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 120, .attackEV = 120, - .defenseEV = 0, .speedEV = 120, .spAttackEV = 150, - .spDefenseEV = 0, .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, @@ -252,18 +214,15 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .abilityNum = 1, .personality = 0x0, .nickname = __("ラクライ$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [1] = { .species = SPECIES_CORPHISH, .heldItem = ITEM_QUICK_CLAW, .moves = { MOVE_KNOCK_OFF, MOVE_CRABHAMMER, MOVE_TAUNT, MOVE_PROTECT }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 100, .attackEV = 110, .defenseEV = 100, - .speedEV = 0, .spAttackEV = 100, .spDefenseEV = 100, .otId = TRAINER_HILL_OTID, @@ -276,18 +235,15 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .abilityNum = 1, .personality = 0x96, .nickname = __("ヘイガニ$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [2] = { .species = SPECIES_BALTOY, .heldItem = ITEM_PERSIM_BERRY, .moves = { MOVE_PSYBEAM, MOVE_ROCK_TOMB, MOVE_MUD_SLAP, MOVE_HARDEN }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 100, .attackEV = 100, .defenseEV = 100, - .speedEV = 0, .spAttackEV = 110, .spDefenseEV = 100, .otId = TRAINER_HILL_OTID, @@ -300,35 +256,32 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .abilityNum = 0, .personality = 0x96, .nickname = __("ヤジロン$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, - [3] = NULL_BATTLE_TOWER_POKEMON, - [4] = NULL_BATTLE_TOWER_POKEMON, - [5] = NULL_BATTLE_TOWER_POKEMON, + [3] = DUMMY_HILL_MON, + [4] = DUMMY_HILL_MON, + [5] = DUMMY_HILL_MON, } }, [1] = { .name = __("ナミコ$$$$$ "), .facilityClass = FACILITY_CLASS_BEAUTY, - .unused = 0x1, + .unused = TRUE, .speechBefore = { EC_WORD_SISTER, EC_WORD_ALTHOUGH, EC_WORD_KIND, EC_WORD_MATCH, EC_WORD_PLEASE, EC_WORD_WITHOUT }, .speechWin = { EC_WORD_KIND, EC_WORD_ELLIPSIS, EC_WORD_INSTEAD, EC_WORD_DEEP, EC_WORD_WEAK, EC_WORD_QUES }, .speechLose = { EC_WORD_AWFUL, EC_WORD_GWAH, EC_WORD_HOPELESS, EC_WORD_CAN_T_WIN, EC_WORD_IS, EC_WORD_NONE }, .speechAfter = { EC_WORD_AWW, EC_EMPTY_WORD, EC_EMPTY_WORD, EC_WORD_ALMOST, EC_WORD_GOOD, EC_WORD_ANYWHERE }, .mons = { - [0] = NULL_BATTLE_TOWER_POKEMON, - [1] = NULL_BATTLE_TOWER_POKEMON, - [2] = NULL_BATTLE_TOWER_POKEMON, + [0] = DUMMY_HILL_MON, + [1] = DUMMY_HILL_MON, + [2] = DUMMY_HILL_MON, [3] = { .species = SPECIES_SPHEAL, .heldItem = ITEM_FOCUS_BAND, .moves = { MOVE_ICE_BALL, MOVE_BODY_SLAM, MOVE_WATER_GUN, MOVE_ENCORE }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 100, .attackEV = 100, .defenseEV = 100, - .speedEV = 0, .spAttackEV = 110, .spDefenseEV = 100, .otId = TRAINER_HILL_OTID, @@ -341,16 +294,13 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .abilityNum = 0, .personality = 0x80, .nickname = __("タマザラシ$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [4] = { .species = SPECIES_SPOINK, .heldItem = ITEM_PERSIM_BERRY, .moves = { MOVE_PSYWAVE, MOVE_FUTURE_SIGHT, MOVE_CONFUSE_RAY, MOVE_MAGIC_COAT }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 100, - .attackEV = 0, .defenseEV = 100, .speedEV = 100, .spAttackEV = 110, @@ -365,14 +315,12 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .abilityNum = 1, .personality = 0xf, .nickname = __("バネブー$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [5] = { .species = SPECIES_POOCHYENA, .heldItem = ITEM_PECHA_BERRY, .moves = { MOVE_BITE, MOVE_POISON_FANG, MOVE_SWAGGER, MOVE_SCARY_FACE }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 70, .attackEV = 80, .defenseEV = 80, @@ -389,39 +337,22 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { .abilityNum = 0, .personality = 0x96, .nickname = __("ポチエナ$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, } }, }, - .display = { - .metatileData = { - 0x31, 0x3b, 0x35, 0x3b, 0x39, 0x26, 0x1b, 0x1c, 0x1d, 0x25, 0x39, 0x3a, 0x3b, 0x35, 0x3b, 0x08, - 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x08, - 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3e, 0x3e, 0x3b, 0x2b, 0x3b, 0x08, - 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x08, - 0x3f, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3e, 0x3e, 0x2b, 0x3b, 0x08, - 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2c, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x08, - 0x31, 0x3f, 0x2b, 0x3b, 0x3b, 0x2c, 0x2c, 0x3b, 0x2c, 0x2c, 0x3e, 0x3e, 0x3b, 0x2b, 0x3b, 0x08, - 0x31, 0x3b, 0x2b, 0x35, 0x35, 0x35, 0x35, 0x3b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x2b, 0x3b, 0x08, - 0x3f, 0x3b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x3b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x3b, 0x08, - 0x31, 0x3b, 0x3f, 0x3f, 0x3b, 0x35, 0x35, 0x3b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x08, - 0x31, 0x3f, 0x3f, 0x3f, 0x3b, 0x2b, 0x2b, 0x35, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x08, - 0x31, 0x3f, 0x3f, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x08, - 0x31, 0x3b, 0x3b, 0x3b, 0x3f, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = { 0x0381, 0x27c5, 0x27c5, 0x27c5, 0x27c5, 0x27c5, 0x26c5, 0x2005, 0x3efd, 0x1, 0x6ff, 0x7ff, 0x7ff, 0xffff, 0xffff, 0xffff }, - .coords = { COORDS_XY(7,6), COORDS_XY(7,10) }, - .direction = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH), - .range = TRAINER_RANGE(3, 3) + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_jp/floor_1/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_jp/floor_1/collision.bin"), + .trainerCoords = { COORDS_XY(7,6), COORDS_XY(7,10) }, + .trainerDirections = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH), + .trainerRanges = TRAINER_RANGE(3, 3) } }, }; -static const struct TrHillTag sDataTagNormal = +static const struct TrainerHillChallenge sChallenge_Normal = { .numTrainers = NUM_TRAINER_HILL_TRAINERS, .unused1 = 2, @@ -429,7 +360,7 @@ static const struct TrHillTag sDataTagNormal = .checksum = 0x00051E05 }; -static const struct TrHillFloor sDataTagNormal_Floors[] = +static const struct TrainerHillFloor sFloors_Normal[] = { [0] = { @@ -441,7 +372,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = { .name = _("ALAINA"), .facilityClass = FACILITY_CLASS_HEX_MANIAC, - .unused = 0, .speechBefore = {EC_WORD_YOU, EC_WORD_CAN, EC_WORD_CHOOSE, EC_WORD_NOT, EC_WORD_TO, EC_WORD_BELIEVE}, .speechWin = {EC_WORD_A, EC_WORD_SUPER, EC_WORD_NATURAL, EC_WORD_POWER, EC_WORD_HAS, EC_WORD_COME}, .speechLose = {EC_WORD_THIS, EC_WORD_MUST_BE, EC_WORD_A, EC_MOVE(NIGHTMARE), EC_WORD_EXCL, EC_EMPTY_WORD}, @@ -453,8 +383,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_MISDREAVUS, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_SHADOW_BALL, MOVE_PSYCHIC, MOVE_THUNDERBOLT, MOVE_CONFUSE_RAY}, - .level = 0, - .ppBonuses = 0, .attackEV = 155, .speedEV = 255, .spAttackEV = 100, @@ -468,15 +396,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x0, .nickname = _("MISDREAVUS"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_SOLROCK, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_PSYCHIC, MOVE_FLAMETHROWER, MOVE_ROCK_SLIDE, MOVE_CALM_MIND}, - .level = 0, - .ppBonuses = 0, .hpEV = 200, .defenseEV = 100, .spAttackEV = 110, @@ -491,15 +417,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0xF, .nickname = _("SOLROCK"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_CLAYDOL, .heldItem = ITEM_SHELL_BELL, .moves = {MOVE_EARTHQUAKE, MOVE_PSYCHIC, MOVE_SHADOW_BALL, MOVE_ICE_BEAM}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .defenseEV = 135, .spDefenseEV = 120, @@ -513,15 +437,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0xC, .nickname = _("CLAYDOL"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_WEEZING, .heldItem = ITEM_SALAC_BERRY, .moves = {MOVE_SLUDGE_BOMB, MOVE_SHADOW_BALL, MOVE_FRUSTRATION, MOVE_DESTINY_BOND}, - .level = 0, - .ppBonuses = 0, .hpEV = 110, .attackEV = 200, .spDefenseEV = 200, @@ -542,8 +464,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_LUNATONE, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_PSYCHIC, MOVE_ICE_BEAM, MOVE_ROCK_SLIDE, MOVE_CALM_MIND}, - .level = 0, - .ppBonuses = 0, .hpEV = 200, .defenseEV = 100, .spAttackEV = 110, @@ -558,15 +478,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0xF, .nickname = _("LUNATONE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_FLYGON, .heldItem = ITEM_CHOICE_BAND, .moves = {MOVE_EARTHQUAKE, MOVE_DRAGON_CLAW, MOVE_CRUNCH, MOVE_FLAMETHROWER}, - .level = 0, - .ppBonuses = 0, .attackEV = 155, .speedEV = 255, .spAttackEV = 100, @@ -580,7 +498,7 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x83, .nickname = _("FLYGON"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -588,7 +506,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = { .name = _("ALFONSO"), .facilityClass = FACILITY_CLASS_CYCLING_TRIATHLETE_M, - .unused = 0, .speechBefore = {EC_WORD_I, EC_WORD_NEVER, EC_WORD_TAKE, EC_WORD_A, EC_WORD_TRAIN, EC_EMPTY_WORD}, .speechWin = {EC_WORD_I_AM, EC_WORD_FEELING, EC_MOVE2(SUPERSONIC), EC_WORD_ON, EC_WORD_MY, EC_WORD_BIKE}, .speechLose = {EC_WORD_MY, EC_WORD_BIKE, EC_WORD_EXCL, EC_WORD_YOU_VE, EC_WORD_DESTROYED, EC_WORD_IT}, @@ -600,8 +517,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_SEALEO, .heldItem = ITEM_NEVER_MELT_ICE, .moves = {MOVE_BLIZZARD, MOVE_ICE_BALL, MOVE_ENCORE, MOVE_HAIL}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -614,15 +529,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0xF, .nickname = _("SEALEO"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_AMPHAROS, .heldItem = ITEM_MAGNET, .moves = {MOVE_THUNDER, MOVE_THUNDER_WAVE, MOVE_COTTON_SPORE, MOVE_LIGHT_SCREEN}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -635,15 +548,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0xF, .nickname = _("AMPHAROS"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_MACHOKE, .heldItem = ITEM_BLACK_BELT, .moves = {MOVE_DYNAMIC_PUNCH, MOVE_MUD_SLAP, MOVE_COUNTER, MOVE_SCARY_FACE}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .attackEV = 255, .otId = TRAINER_HILL_OTID, @@ -656,15 +567,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x4E, .nickname = _("MACHOKE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_FLAREON, .heldItem = ITEM_CHARCOAL, .moves = {MOVE_FIRE_BLAST, MOVE_BITE, MOVE_QUICK_ATTACK, MOVE_SAND_ATTACK}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -677,15 +586,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x28, .nickname = _("FLAREON"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_MAGNETON, .heldItem = ITEM_MAGNET, .moves = {MOVE_ZAP_CANNON, MOVE_THUNDER_WAVE, MOVE_SCREECH, MOVE_METAL_SOUND}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -698,15 +605,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x0, .nickname = _("MAGNETON"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_PINSIR, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_GUILLOTINE, MOVE_BRICK_BREAK, MOVE_SWAGGER, MOVE_FAINT_ATTACK}, - .level = 0, - .ppBonuses = 0, .hpEV = 200, .defenseEV = 155, .spDefenseEV = 155, @@ -720,35 +625,18 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x85, .nickname = _("PINSIR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0x31, 0x3B, 0x35, 0x35, 0x26, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x26, 0x3A, 0x3B, 0x35, 0x3B, 0x08, - 0x31, 0x3B, 0x2C, 0x2C, 0x2C, 0x2B, 0x24, 0x24, 0x24, 0x24, 0x2C, 0x3B, 0x3B, 0x2C, 0x3B, 0x08, - 0x2D, 0x3B, 0x3B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x3B, 0x3B, 0x35, 0x3B, 0x35, 0x35, 0x3B, 0x08, - 0x33, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x3B, 0x2C, 0x2B, 0x3B, 0x08, - 0x33, 0x35, 0x3B, 0x3B, 0x3B, 0x2C, 0x35, 0x3B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x08, - 0x34, 0x2C, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x32, 0x30, 0x3B, 0x2B, 0x32, 0x30, 0x2C, 0x3B, 0x08, - 0x31, 0x35, 0x3B, 0x3B, 0x35, 0x3B, 0x2C, 0x3B, 0x3B, 0x35, 0x2C, 0x3B, 0x3B, 0x35, 0x35, 0x08, - 0x31, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x35, 0x3B, 0x2B, 0x32, 0x21, 0x30, 0x2C, 0x2C, 0x08, - 0x31, 0x35, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x2C, 0x3B, 0x35, 0x3B, 0x3B, 0x3B, 0x08, - 0x31, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x2B, 0x3B, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x3B, 0x08, - 0x31, 0x35, 0x35, 0x35, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x35, 0x2B, 0x3B, 0x35, 0x35, 0x08, - 0x31, 0x2B, 0x2C, 0x2C, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x2C, 0x2C, 0x3B, 0x2C, 0x2C, 0x08, - 0x31, 0x2B, 0x3B, 0x3B, 0x35, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x35, 0x3B, 0x3B, 0x3B, 0x3B, 0x08, - 0x31, 0x2C, 0x32, 0x30, 0x2B, 0x3B, 0x3B, 0x2C, 0x32, 0x30, 0x2C, 0x32, 0x30, 0x3B, 0x35, 0x08, - 0x31, 0x3B, 0x3B, 0x3B, 0x2C, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x2C, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = {0x0381, 0x3FE5, 0x0401, 0xBDED, 0x8425, 0xDFBD, 0x0221, 0x7E7F, 0x0941, 0x7F7D, 0x0911, 0x7FF7, 0x4101, 0x79F9, 0x0803, 0xFFFF}, - .coords = {COORDS_XY(11,1), COORDS_XY(13,2)}, - .direction = TRAINER_DIRS(DIR_WEST, DIR_NORTH), - .range = TRAINER_RANGE(2, 1), - } + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_normal/floor_0/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_normal/floor_0/collision.bin"), + .trainerCoords = {COORDS_XY(11,1), COORDS_XY(13,2)}, + .trainerDirections = TRAINER_DIRS(DIR_WEST, DIR_NORTH), + .trainerRanges = TRAINER_RANGE(2, 1), + } }, [1] = { @@ -760,7 +648,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = { .name = _("THEODORE"), .facilityClass = FACILITY_CLASS_BLACK_BELT, - .unused = 0, .speechBefore = {EC_WORD_MY, EC_WORD_POWER, EC_WORD_WILL, EC_MOVE2(STOMP), EC_WORD_YOU, EC_WORD_EXCL}, .speechWin = {EC_WORD_WAAAH, EC_WORD_HAHAHA, EC_WORD_EXCL, EC_WORD_WAAAH, EC_WORD_HAHAHA, EC_WORD_EXCL_EXCL}, .speechLose = {EC_WORD_I, EC_WORD_WENT, EC_WORD_AT, EC_WORD_IT, EC_WORD_TOO, EC_WORD_HARD}, @@ -772,8 +659,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_MEDITITE, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_FOCUS_PUNCH, MOVE_PROTECT, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spDefenseEV = 6, @@ -787,15 +672,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x80, .nickname = _("MEDITITE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_HERACROSS, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_FOCUS_PUNCH, MOVE_PROTECT, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spDefenseEV = 6, @@ -809,15 +692,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 1, .personality = 0x80, .nickname = _("HERACROSS"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_HITMONTOP, .heldItem = ITEM_SHELL_BELL, .moves = {MOVE_FOCUS_PUNCH, MOVE_PROTECT, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spDefenseEV = 6, @@ -831,15 +712,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x3, .nickname = _("HITMONTOP"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_MACHOP, .heldItem = ITEM_SALAC_BERRY, .moves = {MOVE_FOCUS_PUNCH, MOVE_REVENGE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spDefenseEV = 6, @@ -853,15 +732,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x4E, .nickname = _("MACHOP"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_PINSIR, .heldItem = ITEM_SALAC_BERRY, .moves = {MOVE_FOCUS_PUNCH, MOVE_REVENGE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spDefenseEV = 6, @@ -875,15 +752,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x80, .nickname = _("PINSIR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_HITMONCHAN, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_FOCUS_PUNCH, MOVE_REVENGE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spDefenseEV = 6, @@ -897,7 +772,7 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x3, .nickname = _("HITMONCHAN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -905,7 +780,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = { .name = _("JAYDEN"), .facilityClass = FACILITY_CLASS_PKMN_BREEDER_F, - .unused = 0, .speechBefore = {EC_WORD_SOME, EC_WORD_THINGS, EC_WORD_YOU, EC_WORD_CAN_T, EC_WORD_DO, EC_WORD_ALONE}, .speechWin = {EC_WORD_YOU, EC_WORD_WIN, EC_WORD_AS, EC_WORD_A, EC_WORD_GROUP, EC_EMPTY_WORD}, .speechLose = {EC_WORD_WE, EC_WORD_COULDN_T, EC_WORD_WIN, EC_WORD_TOGETHER, EC_WORD_QUES, EC_EMPTY_WORD}, @@ -917,8 +791,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_VULPIX, .heldItem = ITEM_LUM_BERRY, .moves = {MOVE_WILL_O_WISP, MOVE_CONFUSE_RAY, MOVE_TAIL_WHIP, MOVE_OVERHEAT}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 252, .spDefenseEV = 6, @@ -932,15 +804,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0xF, .nickname = _("VULPIX"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_MINUN, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_THUNDER_WAVE, MOVE_CHARM, MOVE_ENCORE, MOVE_SPARK}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 252, .spAttackEV = 6, @@ -954,15 +824,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x8C, .nickname = _("MINUN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_ROSELIA, .heldItem = ITEM_LUM_BERRY, .moves = {MOVE_TOXIC, MOVE_LEECH_SEED, MOVE_SWEET_SCENT, MOVE_GIGA_DRAIN}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 252, .spAttackEV = 6, @@ -976,15 +844,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 1, .personality = 0xF, .nickname = _("ROSELIA"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_MR_MIME, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_SAFEGUARD, MOVE_REFLECT, MOVE_LIGHT_SCREEN, MOVE_PSYCHIC}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 252, .spDefenseEV = 6, @@ -998,15 +864,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x82, .nickname = _("MR. MIME"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_PLUSLE, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_RAIN_DANCE, MOVE_LIGHT_SCREEN, MOVE_HELPING_HAND, MOVE_THUNDER}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 252, .spDefenseEV = 6, @@ -1020,15 +884,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x5, .nickname = _("PLUSLE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_TOGEPI, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_LIGHT_SCREEN, MOVE_REFLECT, MOVE_FOLLOW_ME, MOVE_METRONOME}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 252, .spDefenseEV = 6, @@ -1042,35 +904,18 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 1, .personality = 0x37, .nickname = _("TOGEPI"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0xD1, 0xD5, 0xD5, 0xD5, 0xD9, 0xD9, 0x1B, 0x1C, 0x1D, 0xC5, 0xC6, 0xCE, 0xD5, 0xDB, 0xD5, 0x08, - 0xD1, 0xCB, 0xC4, 0xC4, 0xDB, 0xDB, 0xC4, 0xC4, 0xC4, 0xCC, 0xCC, 0xCC, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xDB, 0x17, 0x17, 0x17, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xD5, 0x17, 0x17, 0x17, 0xD5, 0xD5, 0xD5, 0xD5, 0xDF, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0x17, 0x17, 0x1F, 0xCB, 0xCB, 0xC4, 0xC4, 0xDB, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xC4, 0xCB, 0xCB, 0xDF, 0xD5, 0xD5, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xDB, 0xC4, 0xC4, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xD5, 0xD5, 0xDF, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xC4, 0xC4, 0xDB, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xDF, 0xD5, 0xD5, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xC4, 0xC4, 0xDB, 0xC4, 0xC4, 0xC4, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0xDB, 0xD5, 0xD5, 0xD5, 0xCB, 0x08, - 0xD1, 0xC4, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0x08, - 0xD1, 0xDB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0x08, - 0xD1, 0xDB, 0xDB, 0xC4, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xC4, 0xC4, 0xC4, 0xC4, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = {0x0381, 0x73FB, 0x400B, 0x400B, 0x51EB, 0x538B, 0x51BB, 0x518B, 0x51EB, 0x518B, 0x51BB, 0x5003, 0x501F, 0x101F, 0x101F, 0xFFFF}, - .coords = {COORDS_XY(4,11), COORDS_XY(9,14)}, - .direction = TRAINER_DIRS(DIR_SOUTH, DIR_EAST), - .range = TRAINER_RANGE(3, 5), - } + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_normal/floor_1/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_normal/floor_1/collision.bin"), + .trainerCoords = {COORDS_XY(4,11), COORDS_XY(9,14)}, + .trainerDirections = TRAINER_DIRS(DIR_SOUTH, DIR_EAST), + .trainerRanges = TRAINER_RANGE(3, 5), + } }, [2] = { @@ -1082,7 +927,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = { .name = _("SALVADORE"), .facilityClass = FACILITY_CLASS_PKMN_BREEDER_M, - .unused = 0, .speechBefore = {EC_WORD_LET_S, EC_MOVE2(WRAP), EC_WORD_THINGS, EC_WORD_UP, EC_WORD_HERE, EC_WORD_HEY_QUES}, .speechWin = {EC_WORD_WOULD, EC_WORD_YOU, EC_WORD_LIKE, EC_WORD_TO, EC_WORD_GO_HOME, EC_WORD_QUES}, .speechLose = {EC_WORD_I, EC_WORD_WILL, EC_WORD_MAKE, EC_WORD_YOU, EC_WORD_SORRY, EC_WORD_FRIEND}, @@ -1094,8 +938,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_VAPOREON, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_HAZE, MOVE_HELPING_HAND, MOVE_TICKLE, MOVE_WATER_PULSE}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .defenseEV = 130, .spDefenseEV = 130, @@ -1116,8 +958,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_DODRIO, .heldItem = ITEM_KINGS_ROCK, .moves = {MOVE_HAZE, MOVE_TRI_ATTACK, MOVE_TAUNT, MOVE_TORMENT}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 252, .spDefenseEV = 6, @@ -1138,8 +978,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_OMASTAR, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_HAZE, MOVE_HYDRO_PUMP, MOVE_TICKLE, MOVE_ATTRACT}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .defenseEV = 130, .spDefenseEV = 130, @@ -1153,15 +991,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x14, .nickname = _("OMASTAR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_LICKITUNG, .heldItem = ITEM_CHESTO_BERRY, .moves = {MOVE_BELLY_DRUM, MOVE_REST, MOVE_MUD_SLAP, MOVE_SWAGGER}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .defenseEV = 130, .spDefenseEV = 130, @@ -1175,15 +1011,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x8, .nickname = _("LICKITUNG"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_SLOWBRO, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_BELLY_DRUM, MOVE_MUD_SLAP, MOVE_SWAGGER, MOVE_AMNESIA}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .defenseEV = 130, .spDefenseEV = 130, @@ -1204,8 +1038,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_LINOONE, .heldItem = ITEM_LUM_BERRY, .moves = {MOVE_BELLY_DRUM, MOVE_REST, MOVE_MUD_SLAP, MOVE_SWAGGER}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .defenseEV = 130, .spDefenseEV = 130, @@ -1219,7 +1051,7 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x8, .nickname = _("LINOONE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -1227,7 +1059,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = { .name = _("VERONICA"), .facilityClass = FACILITY_CLASS_PKMN_BREEDER_F, - .unused = 0, .speechBefore = {EC_WORD_I_AM, EC_WORD_THE, EC_WORD_STRONG, EC_WORD_BEAUTY, EC_WORD_AROUND, EC_WORD_HERE}, .speechWin = {EC_WORD_I_AM, EC_WORD_STRONG, EC_WORD_THAT_S, EC_WORD_WHY, EC_WORD_EXCL, EC_EMPTY_WORD}, .speechLose = {EC_WORD_I_AM, EC_WORD_TIRED, EC_WORD_TODAY, EC_WORD_THAT_S, EC_WORD_WHY, EC_WORD_EXCL}, @@ -1239,8 +1070,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_SKITTY, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_PSYCH_UP, MOVE_DOUBLE_EDGE, MOVE_SHADOW_BALL, MOVE_IRON_TAIL}, - .level = 0, - .ppBonuses = 0, .attackEV = 252, .speedEV = 252, .otId = TRAINER_HILL_OTID, @@ -1253,15 +1082,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0xCB, .nickname = _("SKITTY"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_MEDICHAM, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_PSYCH_UP, MOVE_HI_JUMP_KICK, MOVE_MEGA_KICK, MOVE_ROCK_SLIDE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 6, .speedEV = 252, @@ -1282,8 +1109,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_STANTLER, .heldItem = ITEM_SHELL_BELL, .moves = {MOVE_PSYCH_UP, MOVE_RETURN, MOVE_EARTHQUAKE, MOVE_SHADOW_BALL}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .speedEV = 6, @@ -1304,8 +1129,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_NIDOQUEEN, .heldItem = ITEM_SALAC_BERRY, .moves = {MOVE_SUPERPOWER, MOVE_BITE, MOVE_CHARM, MOVE_FLATTER}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spDefenseEV = 6, @@ -1326,8 +1149,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_NINETALES, .heldItem = ITEM_SALAC_BERRY, .moves = {MOVE_OVERHEAT, MOVE_QUICK_ATTACK, MOVE_SPITE, MOVE_TAIL_WHIP}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -1341,15 +1162,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0xD7, .nickname = _("NINETALES"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_CHARIZARD, .heldItem = ITEM_SALAC_BERRY, .moves = {MOVE_OVERHEAT, MOVE_BEAT_UP, MOVE_SCARY_FACE, MOVE_GROWL}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -1363,35 +1182,18 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x28, .nickname = _("CHARIZARD"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0x31, 0x35, 0x35, 0x35, 0x26, 0x26, 0x13, 0x14, 0x15, 0x38, 0x26, 0x2E, 0x35, 0x35, 0x3B, 0x08, - 0x69, 0x63, 0x64, 0x64, 0x64, 0x64, 0x71, 0x71, 0x71, 0x72, 0x64, 0x64, 0x64, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x43, 0x41, 0x40, 0x41, 0x42, 0x41, 0x41, 0x4A, 0x42, 0x41, 0x41, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x41, 0x43, 0x4B, 0x43, 0x43, 0x41, 0x42, 0x42, 0x40, 0x41, 0x40, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x41, 0x40, 0x42, 0x42, 0x41, 0x41, 0x42, 0x4A, 0x42, 0x41, 0x42, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x41, 0x42, 0x41, 0x43, 0x4B, 0x41, 0x41, 0x41, 0x40, 0x43, 0x41, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x41, 0x40, 0x43, 0x41, 0x42, 0x42, 0x41, 0x4A, 0x42, 0x41, 0x42, 0x63, 0x73, 0x08, - 0x69, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x64, 0x73, 0x08, - 0x69, 0x43, 0x43, 0x41, 0x42, 0x42, 0x41, 0x43, 0x41, 0x41, 0x40, 0x42, 0x41, 0x42, 0x73, 0x08, - 0x69, 0x42, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x42, 0x73, 0x08, - }, - .collisionData = {0x0381, 0x7C3D, 0x4005, 0x4005, 0x4005, 0x4045, 0x4005, 0x4805, 0x4005, 0x4045, 0x4005, 0x4205, 0x4005, 0x4045, 0x1, 0x1}, - .coords = {COORDS_XY(5,2), COORDS_XY(9,2)}, - .direction = TRAINER_DIRS(DIR_WEST, DIR_EAST), - .range = TRAINER_RANGE(3, 3), - } + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_normal/floor_2/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_normal/floor_2/collision.bin"), + .trainerCoords = {COORDS_XY(5,2), COORDS_XY(9,2)}, + .trainerDirections = TRAINER_DIRS(DIR_WEST, DIR_EAST), + .trainerRanges = TRAINER_RANGE(3, 3), + } }, [3] = { @@ -1403,7 +1205,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = { .name = _("KEENAN"), .facilityClass = FACILITY_CLASS_PSYCHIC_M, - .unused = 0, .speechBefore = {EC_WORD_YOU, EC_WORD_LOOK, EC_WORD_SO, EC_WORD_HURRIED, EC_EMPTY_WORD, EC_EMPTY_WORD}, .speechWin = {EC_WORD_TOO, EC_WORD_BAD, EC_EMPTY_WORD, EC_WORD_TIME, EC_WORD_IS, EC_WORD_UP}, .speechLose = {EC_WORD_DOES, EC_WORD_THE, EC_WORD_TIME, EC_WORD_WORRY, EC_WORD_YOU, EC_WORD_QUES}, @@ -1415,8 +1216,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_ALAKAZAM, .heldItem = ITEM_PETAYA_BERRY, .moves = {MOVE_SKILL_SWAP, MOVE_FIRE_PUNCH, MOVE_ICE_PUNCH, MOVE_REFLECT}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -1429,15 +1228,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x41, .nickname = _("ALAKAZAM"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_BLISSEY, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_SKILL_SWAP, MOVE_EGG_BOMB, MOVE_THUNDERBOLT, MOVE_SING}, - .level = 0, - .ppBonuses = 0, .defenseEV = 255, .spAttackEV = 155, .spDefenseEV = 100, @@ -1451,15 +1248,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 1, .personality = 0xF, .nickname = _("BLISSEY"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_GRUMPIG, .heldItem = ITEM_TWISTED_SPOON, .moves = {MOVE_SKILL_SWAP, MOVE_PSYCHIC, MOVE_CONFUSE_RAY, MOVE_REST}, - .level = 0, - .ppBonuses = 0, .hpEV = 110, .defenseEV = 200, .spAttackEV = 200, @@ -1473,15 +1268,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x8C, .nickname = _("GRUMPIG"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_GARDEVOIR, .heldItem = ITEM_SALAC_BERRY, .moves = {MOVE_SKILL_SWAP, MOVE_DREAM_EATER, MOVE_HYPNOSIS, MOVE_PROTECT}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -1494,15 +1287,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 1, .personality = 0xF, .nickname = _("GARDEVOIR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_VENOMOTH, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_SKILL_SWAP, MOVE_SIGNAL_BEAM, MOVE_SLEEP_POWDER, MOVE_TOXIC}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1515,15 +1306,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x80, .nickname = _("VENOMOTH"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_ESPEON, .heldItem = ITEM_LUM_BERRY, .moves = {MOVE_SKILL_SWAP, MOVE_PSYBEAM, MOVE_SWIFT, MOVE_ATTRACT}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -1536,7 +1325,7 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0xF, .nickname = _("ESPEON"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -1544,7 +1333,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = { .name = _("KRISTINA"), .facilityClass = FACILITY_CLASS_AROMA_LADY, - .unused = 0, .speechBefore = {EC_WORD_IT_S, EC_WORD_HOT, EC_WORD_ELLIPSIS, EC_WORD_WHAT, EC_WORD_A, EC_WORD_STENCH}, .speechWin = {EC_WORD_I, EC_WORD_REALLY, EC_WORD_LIKE, EC_WORD_AN, EC_WORD_OFFENSIVE, EC_WORD_STENCH}, .speechLose = {EC_WORD_I, EC_MOVE2(COVET), EC_WORD_ANY, EC_WORD_STRONG, EC_WORD_STENCH, EC_EMPTY_WORD}, @@ -1556,8 +1344,6 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .species = SPECIES_WEEZING, .heldItem = ITEM_POISON_BARB, .moves = {MOVE_TOXIC, MOVE_SLUDGE_BOMB, MOVE_SMOKESCREEN, MOVE_HAZE}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .attackEV = 255, .otId = TRAINER_HILL_OTID, @@ -1570,15 +1356,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x3, .nickname = _("WEEZING"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_GLOOM, .heldItem = ITEM_MIRACLE_SEED, .moves = {MOVE_PETAL_DANCE, MOVE_SYNTHESIS, MOVE_SUNNY_DAY, MOVE_SOLAR_BEAM}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -1591,15 +1375,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x8C, .nickname = _("GLOOM"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_MUK, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_SCREECH, MOVE_DISABLE, MOVE_SLUDGE_BOMB, MOVE_ACID_ARMOR}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .attackEV = 255, .otId = TRAINER_HILL_OTID, @@ -1612,15 +1394,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x3, .nickname = _("MUK"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_TROPIUS, .heldItem = ITEM_WHITE_HERB, .moves = {MOVE_SUNNY_DAY, MOVE_SOLAR_BEAM, MOVE_SWEET_SCENT, MOVE_AERIAL_ACE}, - .level = 0, - .ppBonuses = 0, .attackEV = 120, .speedEV = 255, .spAttackEV = 135, @@ -1634,15 +1414,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x83, .nickname = _("TROPIUS"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_BELLOSSOM, .heldItem = ITEM_MENTAL_HERB, .moves = {MOVE_SWEET_SCENT, MOVE_PETAL_DANCE, MOVE_STUN_SPORE, MOVE_SLUDGE_BOMB}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1655,15 +1433,13 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x6, .nickname = _("BELLOSSOM"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_MEGANIUM, .heldItem = ITEM_MIRACLE_SEED, .moves = {MOVE_RAZOR_LEAF, MOVE_BODY_SLAM, MOVE_LEECH_SEED, MOVE_SYNTHESIS}, - .level = 0, - .ppBonuses = 0, .attackEV = 200, .speedEV = 110, .spAttackEV = 200, @@ -1677,39 +1453,22 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = .abilityNum = 0, .personality = 0x1F, .nickname = _("MEGANIUM"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x1F, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x24, 0x24, 0x24, 0x2B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x08, - 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x35, 0x35, 0x3B, 0x35, 0x35, 0x08, - 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x2C, 0x2C, 0x3B, 0x2C, 0x2C, 0x08, - 0x33, 0x17, 0x1F, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x34, 0x17, 0x2C, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2C, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x17, 0x17, 0x17, 0x17, 0x17, 0x2C, 0x3B, 0x3B, 0x3B, 0x3B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x1F, 0x17, 0x17, 0x17, 0x17, 0x1F, 0x17, 0x3B, 0x3B, 0x3B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x35, 0x1F, 0x17, 0x17, 0x1F, 0x17, 0x08, - 0x34, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x2C, 0x3B, 0x3B, 0x2B, 0x17, 0x08, - 0x17, 0x17, 0x17, 0x1F, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x17, 0x17, 0x2C, 0x17, 0x08, - 0x1F, 0x17, 0x17, 0x2C, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x3B, 0x1F, 0x3B, 0x17, 0x08, - 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x3B, 0x2B, 0x3B, 0x17, 0x08, - 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x35, 0x35, 0x35, 0x2B, 0x17, 0x3B, 0x2C, 0x3B, 0x17, 0x08, - 0x34, 0x17, 0x17, 0x17, 0x17, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = {0x0381, 0x7C1, 0x8441, 0x8477, 0x8441, 0xA441, 0x0401, 0x1, 0x8401, 0x8465, 0x0445, 0x1441, 0x8449, 0x8449, 0x87C1, 0xFFFF}, - .coords = {COORDS_XY(7,4), COORDS_XY(7,10)}, - .direction = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH), - .range = TRAINER_RANGE(3, 3), - } + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_normal/floor_3/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_normal/floor_3/collision.bin"), + .trainerCoords = {COORDS_XY(7,4), COORDS_XY(7,10)}, + .trainerDirections = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH), + .trainerRanges = TRAINER_RANGE(3, 3), + } }, }; -static const struct TrHillTag sDataTagVariety = +static const struct TrainerHillChallenge sChallenge_Variety = { .numTrainers = NUM_TRAINER_HILL_TRAINERS, .unused1 = 1, @@ -1717,7 +1476,7 @@ static const struct TrHillTag sDataTagVariety = .checksum = 0x00054C15 }; -static const struct TrHillFloor sDataTagVariety_Floors[] = { +static const struct TrainerHillFloor sFloors_Variety[] = { [0] = { .trainerNum1 = 41, @@ -1728,7 +1487,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { { .name = _("TERRANCE"), .facilityClass = FACILITY_CLASS_GENTLEMAN, - .unused = 0, .speechBefore = {EC_WORD_GOOD, EC_WORD_CHILDREN, EC_WORD_WILL, EC_WORD_GET, EC_WORD_A, EC_MOVE2(PRESENT)}, .speechWin = {EC_WORD_THANK_YOU, EC_WORD_MY, EC_WORD_VICTORY, EC_WORD_IS, EC_WORD_YOUR, EC_MOVE2(PRESENT)}, .speechLose = {EC_WORD_THAT_WAS, EC_WORD_MY, EC_MOVE2(PRESENT), EC_WORD_TO, EC_WORD_YOU, EC_EMPTY_WORD}, @@ -1740,8 +1498,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .species = SPECIES_DELIBIRD, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_PRESENT, MOVE_SPLASH, MOVE_HAIL, MOVE_PROTECT}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1754,15 +1510,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 1, .personality = 0x8A, .nickname = _("DELIBIRD"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_CLEFAIRY, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_PRESENT, MOVE_COSMIC_POWER, MOVE_LIGHT_SCREEN, MOVE_MOONLIGHT}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1775,15 +1529,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xD, .nickname = _("CLEFAIRY"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_PIKACHU, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_PRESENT, MOVE_GROWL, MOVE_TAIL_WHIP, MOVE_AGILITY}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1796,15 +1548,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xD, .nickname = _("PIKACHU"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_MARILL, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_PRESENT, MOVE_DEFENSE_CURL, MOVE_TAIL_WHIP, MOVE_ENDURE}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1817,15 +1567,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 1, .personality = 0x8A, .nickname = _("MARILL"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_JIGGLYPUFF, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_PRESENT, MOVE_SING, MOVE_DISABLE, MOVE_REST}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1838,15 +1586,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xD, .nickname = _("JIGGLYPUFF"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_TOGETIC, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_PRESENT, MOVE_CHARM, MOVE_SWEET_KISS, MOVE_WISH}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1859,7 +1605,7 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 1, .personality = 0x26, .nickname = _("TOGETIC"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -1867,7 +1613,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { { .name = _("ELIZABETH"), .facilityClass = FACILITY_CLASS_LADY, - .unused = 0, .speechBefore = {EC_WORD_CAN, EC_WORD_YOU, EC_WORD_SENSE, EC_WORD_ME, EC_MOVE(FOCUS_ENERGY), EC_WORD_QUES}, .speechWin = {EC_WORD_THAT_S, EC_WORD_ABOUT, EC_WORD_RIGHT, EC_WORD_I, EC_WORD_WOULD, EC_WORD_THINK}, .speechLose = {EC_WORD_THINGS, EC_WORD_DON_T, EC_WORD_ALWAYS, EC_WORD_WORK, EC_WORD_OUT, EC_EMPTY_WORD}, @@ -1879,8 +1624,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .species = SPECIES_WIGGLYTUFF, .heldItem = ITEM_SILK_SCARF, .moves = {MOVE_ROLLOUT, MOVE_DEFENSE_CURL, MOVE_SING, MOVE_DREAM_EATER}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1893,15 +1636,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xC1, .nickname = _("WIGGLYTUFF"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_SABLEYE, .heldItem = ITEM_SILK_SCARF, .moves = {MOVE_ASTONISH, MOVE_FAINT_ATTACK, MOVE_DETECT, MOVE_CONFUSE_RAY}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1914,15 +1655,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x87, .nickname = _("SABLEYE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_GRUMPIG, .heldItem = ITEM_SILK_SCARF, .moves = {MOVE_PSYBEAM, MOVE_MAGIC_COAT, MOVE_BOUNCE, MOVE_FUTURE_SIGHT}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1935,15 +1674,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xA, .nickname = _("GRUMPIG"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_CORSOLA, .heldItem = ITEM_SILK_SCARF, .moves = {MOVE_BUBBLE_BEAM, MOVE_ROCK_BLAST, MOVE_REFLECT, MOVE_LIGHT_SCREEN}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1956,15 +1693,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x12, .nickname = _("CORSOLA"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_CLAMPERL, .heldItem = ITEM_SILK_SCARF, .moves = {MOVE_WHIRLPOOL, MOVE_IRON_DEFENSE, MOVE_ENDURE, MOVE_CONFUSE_RAY}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1977,15 +1712,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xA, .nickname = _("CLAMPERL"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_STARMIE, .heldItem = ITEM_SILK_SCARF, .moves = {MOVE_DIVE, MOVE_ICY_WIND, MOVE_SWIFT, MOVE_SKILL_SWAP}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -1998,34 +1731,17 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xA, .nickname = _("STARMIE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x40, 0x41, 0x41, 0x41, 0x41, 0x41, 0x42, 0x43, 0x43, 0x43, 0x43, 0x43, 0x40, 0x41, 0x41, 0x08, - 0x40, 0xFB, 0x43, 0x41, 0x41, 0x41, 0x42, 0x40, 0x43, 0x41, 0x42, 0x42, 0x42, 0xFB, 0x41, 0x08, - 0x40, 0x41, 0xFB, 0x41, 0x41, 0x41, 0x42, 0x40, 0x43, 0x41, 0x43, 0x43, 0xFB, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x41, 0xFB, 0x43, 0x41, 0x42, 0x40, 0x43, 0x43, 0x43, 0xFB, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x41, 0x41, 0x42, 0x42, 0x42, 0x40, 0x43, 0x43, 0x43, 0x41, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x42, 0x41, 0xFE, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x42, 0x41, 0x43, 0x43, 0x43, 0x41, 0x40, 0x42, 0x42, 0x42, 0x42, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x40, 0x41, 0xFB, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xFB, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x40, 0xFB, 0x43, 0x43, 0x41, 0x41, 0x41, 0x42, 0x42, 0x42, 0x42, 0xFB, 0x40, 0x41, 0x08, - 0x40, 0xFB, 0x43, 0x43, 0x41, 0x41, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0xFB, 0x41, 0x08, - 0x40, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x08, - }, - .collisionData = {0x0381, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1}, - .coords = {COORDS_XY(5,8), COORDS_XY(9,8)}, - .direction = TRAINER_DIRS(DIR_WEST, DIR_EAST), - .range = TRAINER_RANGE(3, 3), + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_variety/floor_0/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_variety/floor_0/collision.bin"), + .trainerCoords = {COORDS_XY(5,8), COORDS_XY(9,8)}, + .trainerDirections = TRAINER_DIRS(DIR_WEST, DIR_EAST), + .trainerRanges = TRAINER_RANGE(3, 3), } }, [1] = @@ -2038,7 +1754,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { { .name = _("ANNABELL"), .facilityClass = FACILITY_CLASS_PARASOL_LADY, - .unused = 0, .speechBefore = {EC_WORD_HI, EC_WORD_ARE, EC_WORD_YOU, EC_WORD_FEELING, EC_WORD_UPBEAT, EC_WORD_QUES}, .speechWin = {EC_WORD_AREN_T, EC_WORD_YOU, EC_WORD_FEELING, EC_WORD_WELL, EC_WORD_QUES, EC_EMPTY_WORD}, .speechLose = {EC_WORD_I, EC_WORD_CAN, EC_WORD_SEE, EC_WORD_YOU_RE, EC_WORD_FEELING, EC_WORD_GREAT}, @@ -2050,8 +1765,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .species = SPECIES_JIGGLYPUFF, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_SING, MOVE_HYPER_VOICE, MOVE_ATTRACT, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 85, .attackEV = 85, .defenseEV = 85, @@ -2068,15 +1781,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x0, .nickname = _("JIGGLYPUFF"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_JYNX, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_PERISH_SONG, MOVE_FAKE_TEARS, MOVE_ATTRACT, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 85, .attackEV = 85, .defenseEV = 85, @@ -2093,15 +1804,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x0, .nickname = _("JYNX"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_EXPLOUD, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_HOWL, MOVE_HYPER_VOICE, MOVE_ATTRACT, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 85, .attackEV = 85, .defenseEV = 85, @@ -2118,15 +1827,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x96, .nickname = _("EXPLOUD"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_ABSOL, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_SWORDS_DANCE, MOVE_SLASH, MOVE_ATTRACT, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 85, .attackEV = 85, .defenseEV = 85, @@ -2143,15 +1850,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x96, .nickname = _("ABSOL"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_PIDGEOTTO, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_FEATHER_DANCE, MOVE_AERIAL_ACE, MOVE_ATTRACT, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 85, .attackEV = 85, .defenseEV = 85, @@ -2168,15 +1873,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x96, .nickname = _("PIDGEOTTO"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_ALTARIA, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_DRAGON_DANCE, MOVE_AERIAL_ACE, MOVE_ATTRACT, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 85, .attackEV = 85, .defenseEV = 85, @@ -2193,7 +1896,7 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x0, .nickname = _("ALTARIA"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -2201,7 +1904,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { { .name = _("COLEMAN"), .facilityClass = FACILITY_CLASS_COLLECTOR, - .unused = 0, .speechBefore = {EC_WORD_I, EC_WORD_SEEK, EC_WORD_SOMEONE, EC_WORD_AS, EC_WORD_MY, EC_WORD_IDOL}, .speechWin = {EC_WORD_DID, EC_WORD_MY, EC_WORD_IDOL, EC_WORD_SEE, EC_WORD_THAT, EC_WORD_QUES}, .speechLose = {EC_WORD_YOU_RE, EC_WORD_LIKE, EC_WORD_A, EC_MOVE(HEAL_BELL), EC_WORD_TO_ME, EC_WORD_EXCL}, @@ -2213,8 +1915,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .species = SPECIES_CHIMECHO, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_UPROAR, MOVE_ATTRACT, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .speedEV = 252, @@ -2228,15 +1928,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xD, .nickname = _("CHIMECHO"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_WHISMUR, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_UPROAR, MOVE_ATTRACT, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .speedEV = 252, @@ -2250,15 +1948,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xD, .nickname = _("WHISMUR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_YANMA, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_UPROAR, MOVE_ATTRACT, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .speedEV = 252, @@ -2272,15 +1968,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x8A, .nickname = _("YANMA"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_ILLUMISE, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_ENCORE, MOVE_ATTRACT, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 6, .speedEV = 252, @@ -2294,15 +1988,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xA, .nickname = _("ILLUMISE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_SPHEAL, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_ENCORE, MOVE_ATTRACT, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 252, .spDefenseEV = 6, @@ -2316,15 +2008,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xA, .nickname = _("SPHEAL"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_VIGOROTH, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_ENCORE, MOVE_ATTRACT, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 6, .speedEV = 252, @@ -2338,34 +2028,17 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x87, .nickname = _("VIGOROTH"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x91, 0x9B, 0x9C, 0x96, 0x40, 0x40, 0x96, 0x9B, 0x96, 0x40, 0x40, 0x96, 0x9B, 0x9C, 0x9B, 0x08, - 0x9C, 0x9B, 0x96, 0x40, 0xDB, 0xDB, 0x40, 0x96, 0x40, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x08, - 0x91, 0x96, 0x40, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x42, 0x96, 0x9C, 0x08, - 0x91, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x9B, 0x08, - 0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x08, - 0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x08, - 0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x08, - 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x08, - 0x91, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x08, - 0x91, 0x9B, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9C, 0x08, - 0x9C, 0x9B, 0x9B, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9B, 0x08, - 0x96, 0x9B, 0x9B, 0x9B, 0x96, 0x41, 0xDB, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9C, 0x96, 0x08, - 0xD6, 0x96, 0x9C, 0x9B, 0x9B, 0x96, 0x41, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9B, 0x96, 0xD6, 0x08, - 0x9C, 0xD6, 0x96, 0x9B, 0x9C, 0x9B, 0x96, 0x40, 0x96, 0x9B, 0x9C, 0x9B, 0x96, 0xD6, 0x9C, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = {0x0381, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xFFFF}, - .coords = {COORDS_XY(3,8), COORDS_XY(11,8)}, - .direction = TRAINER_DIRS(DIR_WEST, DIR_EAST), - .range = TRAINER_RANGE(7, 7), + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_variety/floor_1/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_variety/floor_1/collision.bin"), + .trainerCoords = {COORDS_XY(3,8), COORDS_XY(11,8)}, + .trainerDirections = TRAINER_DIRS(DIR_WEST, DIR_EAST), + .trainerRanges = TRAINER_RANGE(7, 7), } }, [2] = @@ -2378,7 +2051,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { { .name = _("ENRIQUE"), .facilityClass = FACILITY_CLASS_RICH_BOY, - .unused = 0, .speechBefore = {EC_WORD_GET, EC_WORD_READY, EC_WORD_FOR, EC_WORD_AN, EC_WORD_AWESOME, EC_WORD_TIME}, .speechWin = {EC_WORD_HEY, EC_WORD_HEY, EC_WORD_EXCL, EC_WORD_WHAT_S_UP_QUES, EC_EMPTY_WORD, EC_EMPTY_WORD}, .speechLose = {EC_WORD_AWW, EC_WORD_COULDN_T, EC_WORD_YOU, EC_WORD_LET_ME_WIN, EC_WORD_QUES, EC_EMPTY_WORD}, @@ -2390,8 +2062,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .species = SPECIES_WOOPER, .heldItem = ITEM_FIGY_BERRY, .moves = {MOVE_RAIN_DANCE, MOVE_YAWN, MOVE_SURF, MOVE_HAZE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 6, .spAttackEV = 252, @@ -2405,15 +2075,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x8C, .nickname = _("WOOPER"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_POLIWAG, .heldItem = ITEM_WIKI_BERRY, .moves = {MOVE_SURF, MOVE_ICE_BEAM, MOVE_MIST, MOVE_HYPNOSIS}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 6, .spAttackEV = 252, @@ -2427,15 +2095,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 1, .personality = 0x3, .nickname = _("POLIWAG"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_PSYDUCK, .heldItem = ITEM_AGUAV_BERRY, .moves = {MOVE_HYPNOSIS, MOVE_SURF, MOVE_DISABLE, MOVE_SEISMIC_TOSS}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .defenseEV = 130, .spDefenseEV = 130, @@ -2449,15 +2115,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x3, .nickname = _("PSYDUCK"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_RHYDON, .heldItem = ITEM_SOFT_SAND, .moves = {MOVE_EARTHQUAKE, MOVE_MAGNITUDE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .speedEV = 6, @@ -2478,8 +2142,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .species = SPECIES_RHYHORN, .heldItem = ITEM_SOFT_SAND, .moves = {MOVE_EARTHQUAKE, MOVE_MAGNITUDE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .speedEV = 252, @@ -2500,8 +2162,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .species = SPECIES_CUBONE, .heldItem = ITEM_SOFT_SAND, .moves = {MOVE_EARTHQUAKE, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .speedEV = 252, @@ -2523,7 +2183,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { { .name = _("COLLEEN"), .facilityClass = FACILITY_CLASS_LADY, - .unused = 0, .speechBefore = {EC_WORD_I, EC_WORD_WOULD, EC_WORD_LIKE, EC_WORD_TO, EC_WORD_ROCK, EC_WORD_OUT}, .speechWin = {EC_WORD_I, EC_WORD_LIKE, EC_WORD_THIS, EC_WORD_ROCK, EC_WORD_THING, EC_WORD_EXCL}, .speechLose = {EC_WORD_GO_AHEAD, EC_WORD_AND, EC_WORD_CRUSH, EC_WORD_MY, EC_WORD_DREAM, EC_WORD_ELLIPSIS}, @@ -2535,8 +2194,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .species = SPECIES_MAGNEMITE, .heldItem = ITEM_MAGNET, .moves = {MOVE_THUNDER, MOVE_ZAP_CANNON, MOVE_SPARK, MOVE_THUNDER_SHOCK}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -2550,15 +2207,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x8C, .nickname = _("MAGNEMITE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_ELECTABUZZ, .heldItem = ITEM_MAGNET, .moves = {MOVE_THUNDER, MOVE_THUNDERBOLT, MOVE_THUNDER_PUNCH, MOVE_SHOCK_WAVE}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -2572,15 +2227,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x41, .nickname = _("ELECTABUZZ"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_FLAAFFY, .heldItem = ITEM_MAGNET, .moves = {MOVE_THUNDER, MOVE_THUNDERBOLT, MOVE_SHOCK_WAVE, MOVE_THUNDER_SHOCK}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .spAttackEV = 130, .otId = TRAINER_HILL_OTID, @@ -2593,15 +2246,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x0, .nickname = _("FLAAFFY"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_BALTOY, .heldItem = ITEM_SILK_SCARF, .moves = {MOVE_EXPLOSION, MOVE_SELF_DESTRUCT, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .speedEV = 252, @@ -2622,8 +2273,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .species = SPECIES_PINECO, .heldItem = ITEM_SILK_SCARF, .moves = {MOVE_EXPLOSION, MOVE_SELF_DESTRUCT, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .speedEV = 6, @@ -2644,8 +2293,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .species = SPECIES_VOLTORB, .heldItem = ITEM_SILK_SCARF, .moves = {MOVE_EXPLOSION, MOVE_SELF_DESTRUCT, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .speedEV = 252, @@ -2664,29 +2311,12 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { }, }, }, - .display = { - .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x1B, 0x1C, 0x1D, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x91, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x84, 0x84, 0x84, 0x9A, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0x17, 0xBB, 0xBB, 0x08, - }, - .collisionData = {0x0381, 0x0381, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1}, - .coords = {COORDS_XY(9,1), COORDS_XY(14,1)}, - .direction = TRAINER_DIRS(DIR_WEST, DIR_EAST), - .range = TRAINER_RANGE(4, 4), + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_variety/floor_2/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_variety/floor_2/collision.bin"), + .trainerCoords = {COORDS_XY(9,1), COORDS_XY(14,1)}, + .trainerDirections = TRAINER_DIRS(DIR_WEST, DIR_EAST), + .trainerRanges = TRAINER_RANGE(4, 4), } }, [3] = @@ -2699,7 +2329,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { { .name = _("KIMBERLY"), .facilityClass = FACILITY_CLASS_POKEFAN_F, - .unused = 0, .speechBefore = {EC_WORD_I, EC_WORD_LIKE, EC_WORD_WORKING, EC_WORD_AT, EC_WORD_MY, EC_WORD_OWN_TEMPO}, .speechWin = {EC_WORD_I_AM, EC_WORD_NOT, EC_WORD_BAD, EC_WORD_YOU, EC_WORD_THINK, EC_WORD_QUES}, .speechLose = {EC_WORD_YOU_RE, EC_WORD_A, EC_WORD_MEAN, EC_WORD_KID, EC_WORD_IT, EC_WORD_SEEMS}, @@ -2711,8 +2340,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .species = SPECIES_UNOWN, .heldItem = ITEM_MIRACLE_SEED, .moves = {MOVE_HIDDEN_POWER, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -2725,15 +2352,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x202, .nickname = _("UNOWN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_UNOWN, .heldItem = ITEM_MYSTIC_WATER, .moves = {MOVE_HIDDEN_POWER, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -2746,15 +2371,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x10001, .nickname = _("UNOWN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_UNOWN, .heldItem = ITEM_BLACK_BELT, .moves = {MOVE_HIDDEN_POWER, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -2767,15 +2390,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x102, .nickname = _("UNOWN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_SPINDA, .heldItem = ITEM_LUM_BERRY, .moves = {MOVE_TEETER_DANCE, MOVE_DIZZY_PUNCH, MOVE_CALM_MIND, MOVE_BATON_PASS}, - .level = 0, - .ppBonuses = 0, .hpEV = 110, .defenseEV = 200, .spDefenseEV = 200, @@ -2789,15 +2410,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x88FE980F, .nickname = _("SPINDA"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_PLUSLE, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_HELPING_HAND, MOVE_THUNDERBOLT, MOVE_AGILITY, MOVE_BATON_PASS}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -2810,15 +2429,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("PLUSLE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_VOLBEAT, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_HELPING_HAND, MOVE_SIGNAL_BEAM, MOVE_SOLAR_BEAM, MOVE_MOONLIGHT}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -2831,7 +2448,7 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 1, .personality = 0xF, .nickname = _("VOLBEAT"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -2839,7 +2456,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { { .name = _("FRANCISCO"), .facilityClass = FACILITY_CLASS_POKEFAN_M, - .unused = 0, .speechBefore = {EC_WORD_I, EC_WORD_STUDY, EC_WORD_EVERY, EC_WORD_DAY, EC_WORD_TOO, EC_EMPTY_WORD}, .speechWin = {EC_WORD_SO, EC_WORD_THAT_S, EC_WORD_HOW, EC_WORD_YOU, EC_WORD_LOSE, EC_EMPTY_WORD}, .speechLose = {EC_WORD_NO, EC_WORD_WONDER, EC_WORD_I, EC_WORD_COULDN_T, EC_WORD_BEAT, EC_WORD_YOU}, @@ -2851,8 +2467,6 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .species = SPECIES_SPINDA, .heldItem = ITEM_LUM_BERRY, .moves = {MOVE_TEETER_DANCE, MOVE_DIZZY_PUNCH, MOVE_CALM_MIND, MOVE_BATON_PASS}, - .level = 0, - .ppBonuses = 0, .hpEV = 110, .defenseEV = 200, .spDefenseEV = 200, @@ -2866,15 +2480,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xE2880098, .nickname = _("SPINDA"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_MINUN, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_HELPING_HAND, MOVE_THUNDERBOLT, MOVE_AGILITY, MOVE_BATON_PASS}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -2887,15 +2499,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x8C, .nickname = _("MINUN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_ILLUMISE, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_HELPING_HAND, MOVE_WISH, MOVE_THUNDERBOLT, MOVE_MOONLIGHT}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -2908,15 +2518,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("ILLUMISE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_UNOWN, .heldItem = ITEM_CHARCOAL, .moves = {MOVE_HIDDEN_POWER, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -2929,15 +2537,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x302, .nickname = _("UNOWN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_UNOWN, .heldItem = ITEM_SOFT_SAND, .moves = {MOVE_HIDDEN_POWER, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .attackEV = 255, .otId = TRAINER_HILL_OTID, @@ -2950,15 +2556,13 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x203, .nickname = _("UNOWN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_UNOWN, .heldItem = ITEM_TWISTED_SPOON, .moves = {MOVE_HIDDEN_POWER, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -2971,39 +2575,22 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { .abilityNum = 0, .personality = 0x301, .nickname = _("UNOWN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x69, 0x40, 0x6D, 0x41, 0x73, 0x41, 0x5E, 0x41, 0x71, 0x42, 0x45, 0x45, 0x45, 0x45, 0x45, 0x08, - 0x43, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x41, 0x73, 0x45, 0x45, 0x45, 0x45, 0x45, 0x08, - 0x65, 0x40, 0x73, 0x42, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x42, 0x45, 0x45, 0x45, 0x45, 0x45, 0x08, - 0x6C, 0x73, 0x41, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x42, 0x73, 0x41, 0x08, - 0x69, 0x40, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x43, 0x73, 0x43, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x08, - 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x08, - 0x65, 0x42, 0x73, 0x42, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x42, 0x73, 0x41, 0x6D, 0x42, 0x73, 0x08, - 0x6C, 0x73, 0x41, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x08, - 0x69, 0x40, 0x6D, 0x41, 0x73, 0x41, 0x6D, 0x42, 0x73, 0x43, 0x6D, 0x41, 0x73, 0x43, 0x6D, 0x08, - 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x08, - 0x65, 0x42, 0x73, 0x42, 0x6D, 0x43, 0x73, 0x42, 0x6D, 0x42, 0x73, 0x41, 0x6D, 0x40, 0x73, 0x08, - 0x6C, 0x73, 0x40, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x08, - 0x69, 0x40, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x43, 0x73, 0x40, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x08, - 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = {0x0381, 0x1, 0x2201, 0x1, 0x8881, 0x1, 0x2223, 0x1, 0x8889, 0x1, 0x2223, 0x1, 0x8889, 0x1, 0x2223, 0xFFFF}, - .coords = {COORDS_XY(10,2), COORDS_XY(14,2)}, - .direction = TRAINER_DIRS(DIR_WEST, DIR_EAST), - .range = TRAINER_RANGE(3, 3), + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_variety/floor_3/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_variety/floor_3/collision.bin"), + .trainerCoords = {COORDS_XY(10,2), COORDS_XY(14,2)}, + .trainerDirections = TRAINER_DIRS(DIR_WEST, DIR_EAST), + .trainerRanges = TRAINER_RANGE(3, 3), } }, }; -static const struct TrHillTag sDataTagUnique = +static const struct TrainerHillChallenge sChallenge_Unique = { .numTrainers = NUM_TRAINER_HILL_TRAINERS, .unused1 = 3, @@ -3011,7 +2598,7 @@ static const struct TrHillTag sDataTagUnique = .checksum = 0x000652F3 }; -static const struct TrHillFloor sDataTagUnique_Floors[] = { +static const struct TrainerHillFloor sFloors_Unique[] = { [0] = { .trainerNum1 = 49, @@ -3022,7 +2609,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { { .name = _("MEREDITH"), .facilityClass = FACILITY_CLASS_PKMN_RANGER_F, - .unused = 0, .speechBefore = {EC_WORD_UM, EC_WORD_ELLIPSIS, EC_EMPTY_WORD, EC_WORD_I, EC_WORD_ELLIPSIS, EC_EMPTY_WORD}, .speechWin = {EC_WORD_OH, EC_WORD_EXCL, EC_EMPTY_WORD, EC_WORD_UM, EC_WORD_ELLIPSIS, EC_WORD_YAY}, .speechLose = {EC_WORD_UM, EC_WORD_ELLIPSIS, EC_EMPTY_WORD, EC_WORD_WAAAH, EC_WORD_ELLIPSIS, EC_EMPTY_WORD}, @@ -3034,8 +2620,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_SUNFLORA, .heldItem = ITEM_PERSIM_BERRY, .moves = {MOVE_PETAL_DANCE, MOVE_GRASS_WHISTLE, MOVE_LIGHT_SCREEN, MOVE_SUNNY_DAY}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .defenseEV = 155, .spDefenseEV = 100, @@ -3049,15 +2633,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x0, .nickname = _("SUNFLORA"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_TANGELA, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_GIGA_DRAIN, MOVE_SLEEP_POWDER, MOVE_AMNESIA, MOVE_SUNNY_DAY}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .spDefenseEV = 255, .otId = TRAINER_HILL_OTID, @@ -3070,15 +2652,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x91, .nickname = _("TANGELA"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_VENUSAUR, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_SOLAR_BEAM, MOVE_EARTHQUAKE, MOVE_SYNTHESIS, MOVE_SUNNY_DAY}, - .level = 0, - .ppBonuses = 0, .hpEV = 100, .attackEV = 110, .defenseEV = 100, @@ -3094,15 +2674,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x1F, .nickname = _("VENUSAUR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_LANTURN, .heldItem = ITEM_PERSIM_BERRY, .moves = {MOVE_SPARK, MOVE_WATER_PULSE, MOVE_CONFUSE_RAY, MOVE_RAIN_DANCE}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -3115,15 +2693,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("LANTURN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_MANECTRIC, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_THUNDERBOLT, MOVE_HEADBUTT, MOVE_BITE, MOVE_RAIN_DANCE}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -3136,15 +2712,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 1, .personality = 0xF, .nickname = _("MANECTRIC"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_RAIKOU, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_THUNDER, MOVE_CRUNCH, MOVE_ROAR, MOVE_RAIN_DANCE}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -3157,7 +2731,7 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("RAIKOU"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -3165,7 +2739,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { { .name = _("BERNARD"), .facilityClass = FACILITY_CLASS_KINDLER, - .unused = 0, .speechBefore = {EC_WORD_I, EC_WORD_CAN_T, EC_WORD_LOSE, EC_WORD_THIS, EC_WORD_HOT, EC_WORD_BATTLE}, .speechWin = {EC_WORD_DID, EC_WORD_I, EC_WORD_COOL, EC_WORD_YOU, EC_WORD_DOWN, EC_WORD_QUES}, .speechLose = {EC_WORD_AIYEEH, EC_WORD_EXCL, EC_WORD_YOU_RE, EC_WORD_A, EC_WORD_TERRIBLE, EC_WORD_PERSON}, @@ -3177,8 +2750,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_RELICANTH, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_ANCIENT_POWER, MOVE_WATER_PULSE, MOVE_MUD_SPORT, MOVE_RAIN_DANCE}, - .level = 0, - .ppBonuses = 0, .hpEV = 155, .defenseEV = 100, .spDefenseEV = 255, @@ -3192,15 +2763,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x2F, .nickname = _("RELICANTH"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_GOLDUCK, .heldItem = ITEM_LAX_INCENSE, .moves = {MOVE_SURF, MOVE_PSYBEAM, MOVE_BRICK_BREAK, MOVE_RAIN_DANCE}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -3213,15 +2782,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("GOLDUCK"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_BLASTOISE, .heldItem = ITEM_SHELL_BELL, .moves = {MOVE_HYDRO_PUMP, MOVE_BITE, MOVE_MIRROR_COAT, MOVE_RAIN_DANCE}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -3234,15 +2801,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x28, .nickname = _("BLASTOISE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_MAGCARGO, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_HEAT_WAVE, MOVE_ROCK_SLIDE, MOVE_PROTECT, MOVE_SUNNY_DAY}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .spDefenseEV = 255, .otId = TRAINER_HILL_OTID, @@ -3255,15 +2820,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 1, .personality = 0x93, .nickname = _("MAGCARGO"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_RAPIDASH, .heldItem = ITEM_KINGS_ROCK, .moves = {MOVE_FIRE_BLAST, MOVE_BOUNCE, MOVE_QUICK_ATTACK, MOVE_SUNNY_DAY}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -3276,15 +2839,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 1, .personality = 0xF, .nickname = _("RAPIDASH"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_MOLTRES, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_SKY_ATTACK, MOVE_AERIAL_ACE, MOVE_ROAR, MOVE_SUNNY_DAY}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -3297,34 +2858,17 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("MOLTRES"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0xF1, 0xF5, 0xFB, 0xF5, 0xE6, 0xE6, 0x1B, 0x14, 0x15, 0xF8, 0xF9, 0xFA, 0xFB, 0xFB, 0xFB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xF9, 0xE6, 0xEE, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0x9B, 0x9B, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0x9B, 0xDB, 0xDB, 0x9B, 0xEC, 0xFB, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xF5, 0x95, 0x95, 0xF5, 0xF5, 0xF5, 0xEB, 0xEC, 0xEB, 0xFB, 0xEB, 0x08, - 0xED, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0x08, - 0xF4, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xF5, 0xFB, 0x08, - 0xF1, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0x08, - 0xF1, 0xF5, 0xF5, 0xEB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0xFB, 0x08, - 0xF1, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0xEB, 0xFB, 0x08, - 0xF1, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xFB, 0xEB, 0xFB, 0x08, - 0xF1, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0xEC, 0xFB, 0x08, - 0xF1, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = {0x0381, 0x5E01, 0x50FF, 0x5083, 0x503B, 0x5FEB, 0xC02B, 0x5FEB, 0x5009, 0x57FD, 0x1005, 0x7FF5, 0x15, 0x7FF5, 0x1, 0xFFFF}, - .coords = {COORDS_XY(4,3), COORDS_XY(7,3)}, - .direction = TRAINER_DIRS(DIR_WEST, DIR_EAST), - .range = TRAINER_RANGE(2, 2), + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_unique/floor_0/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_unique/floor_0/collision.bin"), + .trainerCoords = {COORDS_XY(4,3), COORDS_XY(7,3)}, + .trainerDirections = TRAINER_DIRS(DIR_WEST, DIR_EAST), + .trainerRanges = TRAINER_RANGE(2, 2), } }, [1] = @@ -3337,7 +2881,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { { .name = _("ABRAHAM"), .facilityClass = FACILITY_CLASS_RUIN_MANIAC, - .unused = 0, .speechBefore = {EC_WORD_I, EC_WORD_LIKE, EC_WORD_THIS, EC_WORD_POKEMON, EC_WORD_THE, EC_WORD_BEST}, .speechWin = {EC_WORD_WHAT, EC_WORD_A, EC_WORD_GREAT, EC_WORD_POKEMON, EC_WORD_IT, EC_WORD_IS}, .speechLose = {EC_WORD_I, EC_WORD_CONFUSED, EC_WORD_A, EC_WORD_MOVE, EC_WORD_WITH, EC_WORD_ANOTHER}, @@ -3349,8 +2892,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_SMEARGLE, .heldItem = ITEM_SCOPE_LENS, .moves = {MOVE_EARTHQUAKE, MOVE_SHADOW_BALL, MOVE_AERIAL_ACE, MOVE_IMPRISON}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 6, .speedEV = 252, @@ -3364,15 +2905,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x8A, .nickname = _("SMEARGLE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_SMEARGLE, .heldItem = ITEM_CHESTO_BERRY, .moves = {MOVE_REST, MOVE_THUNDER_WAVE, MOVE_FLAMETHROWER, MOVE_IMPRISON}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 252, .spAttackEV = 6, @@ -3386,15 +2925,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x87, .nickname = _("SMEARGLE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_SMEARGLE, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_TEETER_DANCE, MOVE_LOCK_ON, MOVE_SHEER_COLD, MOVE_EXPLOSION}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 6, .speedEV = 252, @@ -3408,15 +2945,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0xD, .nickname = _("SMEARGLE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_SMEARGLE, .heldItem = ITEM_SCOPE_LENS, .moves = {MOVE_PSYCHIC, MOVE_SURF, MOVE_THUNDERBOLT, MOVE_IMPRISON}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 252, .spAttackEV = 6, @@ -3430,15 +2965,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0xA, .nickname = _("SMEARGLE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_SMEARGLE, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_TOXIC, MOVE_PROTECT, MOVE_WILL_O_WISP, MOVE_IMPRISON}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 6, .speedEV = 252, @@ -3452,15 +2985,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0xA, .nickname = _("SMEARGLE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_SMEARGLE, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_TEETER_DANCE, MOVE_LOCK_ON, MOVE_SHEER_COLD, MOVE_DESTINY_BOND}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 6, .speedEV = 252, @@ -3474,7 +3005,7 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x8A, .nickname = _("SMEARGLE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -3482,7 +3013,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { { .name = _("LUC"), .facilityClass = FACILITY_CLASS_TUBER_M, - .unused = 0, .speechBefore = {EC_WORD_I, EC_WORD_HAVE, EC_WORD_A, EC_WORD_COOL, EC_WORD_RARE, EC_WORD_MOVE}, .speechWin = {EC_WORD_MY, EC_WORD_RARE, EC_WORD_MOVE, EC_WORD_IS, EC_WORD_COOL, EC_WORD_ISN_T_IT_QUES}, .speechLose = {EC_WORD_DIDN_T, EC_WORD_YOU, EC_WORD_SEE, EC_WORD_MY, EC_WORD_MOVE, EC_WORD_QUES}, @@ -3494,8 +3024,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_STARYU, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_CAMOUFLAGE, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 252, .spAttackEV = 6, @@ -3509,15 +3037,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 1, .personality = 0xA, .nickname = _("STARYU"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_MEOWTH, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_PAY_DAY, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 252, .spAttackEV = 6, @@ -3531,15 +3057,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0xD, .nickname = _("MEOWTH"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_BLAZIKEN, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_BLAZE_KICK, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 252, .spDefenseEV = 6, @@ -3553,15 +3077,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x28, .nickname = _("BLAZIKEN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_CUBONE, .heldItem = ITEM_THICK_CLUB, .moves = {MOVE_BONEMERANG, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 6, .spDefenseEV = 252, @@ -3575,15 +3097,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 1, .personality = 0x16, .nickname = _("CUBONE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_BEEDRILL, .heldItem = ITEM_SHELL_BELL, .moves = {MOVE_TWINEEDLE, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 252, .otId = TRAINER_HILL_OTID, @@ -3596,15 +3116,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x8A, .nickname = _("BEEDRILL"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_RATICATE, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_SUPER_FANG, MOVE_NONE, MOVE_NONE, MOVE_NONE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 6, .speedEV = 252, @@ -3618,34 +3136,17 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 1, .personality = 0xD, .nickname = _("RATICATE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x2D, 0x3B, 0x3B, 0x3B, 0x35, 0x2C, 0x23, 0x24, 0x23, 0x2C, 0x35, 0x3B, 0x3B, 0x3B, 0x3B, 0x08, - 0x94, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x8C, 0x87, 0x8C, 0x87, 0x95, 0x87, 0x9B, 0x08, - 0x91, 0x8F, 0x9B, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x95, 0x08, - 0x8D, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x95, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x8C, 0x08, - 0x94, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x9B, 0x9B, 0x9B, 0x87, 0x9B, 0x08, - 0x91, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x95, 0x9B, 0x95, 0x8F, 0x9B, 0x08, - 0x91, 0x97, 0x95, 0x97, 0x8C, 0x97, 0x95, 0x97, 0x95, 0x97, 0x8C, 0x9B, 0x8C, 0x97, 0x95, 0x08, - 0x91, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x9B, 0x87, 0x95, 0x87, 0x8C, 0x08, - 0x8D, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x08, - 0x94, 0x97, 0x95, 0x97, 0x8C, 0x97, 0x9B, 0x97, 0x95, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x9B, 0x08, - 0x91, 0x87, 0x8C, 0x87, 0x95, 0x87, 0x95, 0x87, 0x8B, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x9B, 0x08, - 0x91, 0x8F, 0x95, 0x8F, 0x8B, 0x8F, 0x8C, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x08, - 0x91, 0x97, 0x8C, 0x97, 0x8C, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x8B, 0x97, 0x9B, 0x08, - 0x91, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x8C, 0x9B, 0x9B, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = {0x0381, 0x7C1, 0x8AA1, 0x0209, 0x5557, 0xA281, 0x81, 0x5D6D, 0x2283, 0x89, 0xDD55, 0x20A1, 0xA81, 0x7D5D, 0x9, 0xFFFF}, - .coords = {COORDS_XY(9,6), COORDS_XY(13,6)}, - .direction = TRAINER_DIRS(DIR_WEST, DIR_EAST), - .range = TRAINER_RANGE(3, 3), + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_unique/floor_1/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_unique/floor_1/collision.bin"), + .trainerCoords = {COORDS_XY(9,6), COORDS_XY(13,6)}, + .trainerDirections = TRAINER_DIRS(DIR_WEST, DIR_EAST), + .trainerRanges = TRAINER_RANGE(3, 3), } }, [2] = @@ -3658,7 +3159,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { { .name = _("BREYDEN"), .facilityClass = FACILITY_CLASS_YOUNGSTER, - .unused = 0, .speechBefore = {EC_WORD_I, EC_WORD_CARE, EC_WORD_FOR, EC_WORD_MY, EC_WORD_POKEMON, EC_WORD_A_LOT}, .speechWin = {EC_WORD_MY, EC_WORD_POKEMON, EC_WORD_CAN, EC_WORD_DO, EC_WORD_IT, EC_WORD_ALL}, .speechLose = {EC_WORD_IT_S, EC_WORD_NOT, EC_WORD_LIKE, EC_WORD_WE, EC_WORD_ALWAYS, EC_WORD_WIN}, @@ -3670,8 +3170,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_CHARMELEON, .heldItem = ITEM_CHARCOAL, .moves = {MOVE_FIRE_SPIN, MOVE_DRAGON_RAGE, MOVE_FLAMETHROWER, MOVE_SLASH}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 252, .spAttackEV = 6, @@ -3692,8 +3190,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_WARTORTLE, .heldItem = ITEM_MYSTIC_WATER, .moves = {MOVE_HYDRO_PUMP, MOVE_SKULL_BASH, MOVE_RAIN_DANCE, MOVE_PROTECT}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .defenseEV = 130, .otId = TRAINER_HILL_OTID, @@ -3713,8 +3209,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_IVYSAUR, .heldItem = ITEM_MIRACLE_SEED, .moves = {MOVE_SOLAR_BEAM, MOVE_SYNTHESIS, MOVE_GROWTH, MOVE_SWEET_SCENT}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 6, .spAttackEV = 252, @@ -3735,8 +3229,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_BAYLEEF, .heldItem = ITEM_MIRACLE_SEED, .moves = {MOVE_SOLAR_BEAM, MOVE_SAFEGUARD, MOVE_LIGHT_SCREEN, MOVE_BODY_SLAM}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .attackEV = 130, .spAttackEV = 130, @@ -3757,8 +3249,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_CROCONAW, .heldItem = ITEM_MYSTIC_WATER, .moves = {MOVE_SCARY_FACE, MOVE_SLASH, MOVE_HYDRO_PUMP, MOVE_SCREECH}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .speedEV = 6, @@ -3779,8 +3269,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_QUILAVA, .heldItem = ITEM_CHARCOAL, .moves = {MOVE_QUICK_ATTACK, MOVE_FLAMETHROWER, MOVE_FLAME_WHEEL, MOVE_SWIFT}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -3802,7 +3290,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { { .name = _("ANIYA"), .facilityClass = FACILITY_CLASS_TUBER_F, - .unused = 0, .speechBefore = {EC_WORD_SOMEONE, EC_WORD_GOT, EC_WORD_ME, EC_WORD_A_LITTLE, EC_WORD_POKEMON, EC_WORD_EGG}, .speechWin = {EC_WORD_I_AM, EC_WORD_NOT, EC_WORD_NEW, EC_WORD_AT, EC_WORD_THIS, EC_WORD_EXCL}, .speechLose = {EC_WORD_OH, EC_WORD_BUT, EC_WORD_ELLIPSIS, EC_WORD_WHY, EC_WORD_WHY, EC_WORD_QUES_EXCL}, @@ -3814,8 +3301,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_SMOOCHUM, .heldItem = ITEM_PETAYA_BERRY, .moves = {MOVE_ICE_BEAM, MOVE_PSYCHIC, MOVE_SWEET_KISS, MOVE_FAKE_TEARS}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -3836,8 +3321,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_AZURILL, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_SURF, MOVE_SING, MOVE_RAIN_DANCE, MOVE_BLIZZARD}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -3858,8 +3341,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_ELEKID, .heldItem = ITEM_KINGS_ROCK, .moves = {MOVE_FIRE_PUNCH, MOVE_THUNDER, MOVE_ICE_PUNCH, MOVE_THUNDER_WAVE}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -3880,8 +3361,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_CLEFFA, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_MEGA_KICK, MOVE_SWEET_KISS, MOVE_SING, MOVE_METRONOME}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .speedEV = 252, @@ -3902,8 +3381,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_WYNAUT, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_ENCORE, MOVE_COUNTER, MOVE_MIRROR_COAT, MOVE_DESTINY_BOND}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .defenseEV = 130, .spDefenseEV = 130, @@ -3924,8 +3401,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_MAGBY, .heldItem = ITEM_SCOPE_LENS, .moves = {MOVE_FIRE_BLAST, MOVE_CONFUSE_RAY, MOVE_THUNDER_PUNCH, MOVE_BARRIER}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -3944,29 +3419,12 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { }, }, }, - .display = { - .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7C, 0x46, 0x08, - 0x69, 0x46, 0x7A, 0x73, 0x73, 0x73, 0x79, 0x73, 0x73, 0x73, 0x7D, 0x73, 0x73, 0x73, 0x46, 0x08, - 0x69, 0x46, 0x73, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, - 0x69, 0x46, 0x73, 0x73, 0x7B, 0x73, 0x7C, 0x73, 0x7B, 0x73, 0x7A, 0x73, 0x73, 0x73, 0x46, 0x08, - 0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7A, 0x46, 0x08, - 0x69, 0x46, 0x73, 0x73, 0x73, 0x73, 0x73, 0x7D, 0x7C, 0x73, 0x7C, 0x73, 0x7B, 0x73, 0x46, 0x08, - 0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7C, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, - 0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x08, - 0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x08, - 0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x08, - 0xF1, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, - 0xF1, 0x46, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x7A, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x7C, 0x08, - 0xF1, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0xFB, 0x08, - 0x7C, 0xFB, 0x7B, 0xFB, 0x7A, 0xFB, 0x79, 0xFB, 0xB3, 0xFB, 0x7D, 0xFB, 0x7E, 0xFB, 0x7D, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = {0x0381, 0x7FFB, 0x4003, 0x5FFF, 0x4003, 0x7FFB, 0x4003, 0x7EFF, 0x4443, 0x4443, 0x4443, 0x7EFF, 0x4001, 0x7FFD, 0x1, 0xFFFF}, - .coords = {COORDS_XY(6,9), COORDS_XY(8,9)}, - .direction = TRAINER_DIRS(DIR_WEST, DIR_EAST), - .range = TRAINER_RANGE(1, 1), + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_unique/floor_2/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_unique/floor_2/collision.bin"), + .trainerCoords = {COORDS_XY(6,9), COORDS_XY(8,9)}, + .trainerDirections = TRAINER_DIRS(DIR_WEST, DIR_EAST), + .trainerRanges = TRAINER_RANGE(1, 1), } }, [3] = @@ -3979,7 +3437,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { { .name = _("DANE"), .facilityClass = FACILITY_CLASS_BIRD_KEEPER, - .unused = 0, .speechBefore = {EC_WORD_I, EC_WORD_GOT, EC_WORD_MY, EC_WORD_POKEMON, EC_WORD_ON, EC_WORD_VACATION}, .speechWin = {EC_WORD_IT_S, EC_WORD_GREAT, EC_WORD_TO, EC_WORD_TRAVEL, EC_WORD_AND, EC_WORD_BATTLE}, .speechLose = {EC_WORD_WAAAH, EC_WORD_EXCL, EC_WORD_MY, EC_WORD_RARE, EC_WORD_POKEMON, EC_WORD_EXCL}, @@ -3991,8 +3448,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_SUDOWOODO, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_ROCK_SLIDE, MOVE_BLOCK, MOVE_TOXIC, MOVE_EXPLOSION}, - .level = 0, - .ppBonuses = 0, .hpEV = 100, .attackEV = 255, .spDefenseEV = 155, @@ -4006,15 +3461,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x80, .nickname = _("SUDOWOODO"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_SLOWKING, .heldItem = ITEM_SCOPE_LENS, .moves = {MOVE_SURF, MOVE_PSYCHIC, MOVE_BLIZZARD, MOVE_DISABLE}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .defenseEV = 255, .otId = TRAINER_HILL_OTID, @@ -4027,15 +3480,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 1, .personality = 0x8C, .nickname = _("SLOWKING"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_ENTEI, .heldItem = ITEM_PETAYA_BERRY, .moves = {MOVE_FLAMETHROWER, MOVE_CALM_MIND, MOVE_FIRE_SPIN, MOVE_ROAR}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -4048,15 +3499,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("ENTEI"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_HITMONCHAN, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_MEGA_PUNCH, MOVE_DETECT, MOVE_COUNTER, MOVE_SKY_UPPERCUT}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -4069,15 +3518,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x3, .nickname = _("HITMONCHAN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_MANTINE, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_SURF, MOVE_CONFUSE_RAY, MOVE_ATTRACT, MOVE_AERIAL_ACE}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .defenseEV = 255, .otId = TRAINER_HILL_OTID, @@ -4090,15 +3537,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 1, .personality = 0x6, .nickname = _("MANTINE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_ZAPDOS, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_THUNDERBOLT, MOVE_DRILL_PECK, MOVE_THUNDER_WAVE, MOVE_AGILITY}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -4111,7 +3556,7 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x18, .nickname = _("ZAPDOS"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -4119,7 +3564,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { { .name = _("STEPHANIE"), .facilityClass = FACILITY_CLASS_SWIMMING_TRIATHLETE_F, - .unused = 0, .speechBefore = {EC_WORD_THIS, EC_WORD_IS, EC_WORD_HOW, EC_WORD_YOU, EC_WORD_WIN, EC_WORD_EXCL}, .speechWin = {EC_WORD_DO, EC_WORD_YOU, EC_WORD_UNDERSTAND, EC_WORD_HOW, EC_WORD_NOW, EC_WORD_QUES}, .speechLose = {EC_WORD_YES, EC_WORD_THAT_S, EC_WORD_HOW, EC_WORD_YOU, EC_WORD_DO, EC_WORD_IT}, @@ -4131,8 +3575,6 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .species = SPECIES_HITMONLEE, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_MEGA_KICK, MOVE_MIND_READER, MOVE_FOCUS_ENERGY, MOVE_HI_JUMP_KICK}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .attackEV = 255, .otId = TRAINER_HILL_OTID, @@ -4145,15 +3587,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x3, .nickname = _("HITMONLEE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_PORYGON2, .heldItem = ITEM_SCOPE_LENS, .moves = {MOVE_LOCK_ON, MOVE_BLIZZARD, MOVE_CONVERSION_2, MOVE_PSYCHIC}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -4166,15 +3606,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("PORYGON2"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_SUICUNE, .heldItem = ITEM_PETAYA_BERRY, .moves = {MOVE_SURF, MOVE_CALM_MIND, MOVE_MIRROR_COAT, MOVE_MIST}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -4187,15 +3625,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("SUICUNE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_HOUNDOOM, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_FLAMETHROWER, MOVE_CRUNCH, MOVE_ROAR, MOVE_WILL_O_WISP}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -4208,15 +3644,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 1, .personality = 0xF, .nickname = _("HOUNDOOM"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_STANTLER, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_CONFUSE_RAY, MOVE_SWAGGER, MOVE_PSYCH_UP, MOVE_TAKE_DOWN}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -4229,15 +3663,13 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0x3, .nickname = _("STANTLER"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_ARTICUNO, .heldItem = ITEM_NEVER_MELT_ICE, .moves = {MOVE_BLIZZARD, MOVE_SHEER_COLD, MOVE_MIST, MOVE_AERIAL_ACE}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -4250,39 +3682,22 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("ARTICUNO"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0xF1, 0xFB, 0xFB, 0xFB, 0xF9, 0xF9, 0x1B, 0x1C, 0x1D, 0xE5, 0xE6, 0xEE, 0xF5, 0xFB, 0xFB, 0x08, - 0xED, 0xF5, 0xF5, 0xF5, 0xFB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEB, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0x08, - 0xF4, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, - 0xF1, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0x08, - 0xF1, 0xEB, 0xEC, 0xEC, 0xEC, 0xEB, 0xEC, 0xEC, 0xFB, 0xEC, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0x08, - 0xF1, 0xEB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xF5, 0xFB, 0xF5, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, - 0xF1, 0xEB, 0xFB, 0xF5, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xF5, 0xF5, 0xF5, 0xFB, 0xFB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0x08, - 0xF1, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0x08, - 0xF1, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, - 0xF1, 0xFB, 0xFB, 0xEC, 0xFB, 0xFB, 0xFB, 0xEC, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = {0x0381, 0x3F9, 0xF041, 0x41, 0x7F5F, 0x4401, 0x4541, 0x5579, 0x5541, 0x555F, 0x5541, 0x5541, 0x557D, 0x1101, 0x1101, 0xFFFF}, - .coords = {COORDS_XY(8,2), COORDS_XY(11,5)}, - .direction = TRAINER_DIRS(DIR_WEST, DIR_NORTH), - .range = TRAINER_RANGE(3, 3), + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_unique/floor_3/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_unique/floor_3/collision.bin"), + .trainerCoords = {COORDS_XY(8,2), COORDS_XY(11,5)}, + .trainerDirections = TRAINER_DIRS(DIR_WEST, DIR_NORTH), + .trainerRanges = TRAINER_RANGE(3, 3), } }, }; -static const struct TrHillTag sDataTagExpert = +static const struct TrainerHillChallenge sChallenge_Expert = { .numTrainers = NUM_TRAINER_HILL_TRAINERS, .unused1 = 1, @@ -4290,7 +3705,7 @@ static const struct TrHillTag sDataTagExpert = .checksum = 0x00061F3F }; -static const struct TrHillFloor sDataTagExpert_Floors[] = { +static const struct TrainerHillFloor sFloors_Expert[] = { [0] = { .trainerNum1 = 57, @@ -4301,7 +3716,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { { .name = _("ALFRED"), .facilityClass = FACILITY_CLASS_COOLTRAINER_M, - .unused = 0, .speechBefore = {EC_WORD_WE, EC_WORD_CAN, EC_WORD_TAKE, EC_WORD_ON, EC_WORD_ANY, EC_WORD_TYPE}, .speechWin = {EC_WORD_WE, EC_WORD_DID, EC_WORD_BETTER, EC_WORD_THAN, EC_WORD_OKAY, EC_WORD_EXCL}, .speechLose = {EC_WORD_OUR, EC_WORD_STRATEGY, EC_WORD_ISN_T, EC_WORD_ANY, EC_WORD_GOOD, EC_WORD_ELLIPSIS}, @@ -4313,8 +3727,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_SNORLAX, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_MEGA_KICK, MOVE_SHADOW_BALL, MOVE_BRICK_BREAK, MOVE_EARTHQUAKE}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .defenseEV = 252, @@ -4328,15 +3740,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x35, .nickname = _("SNORLAX"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_MILTANK, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_DOUBLE_EDGE, MOVE_SHADOW_BALL, MOVE_ATTRACT, MOVE_MILK_DRINK}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .speedEV = 252, @@ -4350,15 +3760,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x3, .nickname = _("MILTANK"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_URSARING, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_DOUBLE_EDGE, MOVE_CRUNCH, MOVE_BRICK_BREAK, MOVE_AERIAL_ACE}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spAttackEV = 6, @@ -4372,15 +3780,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x7F, .nickname = _("URSARING"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_SLAKING, .heldItem = ITEM_CHESTO_BERRY, .moves = {MOVE_HYPER_BEAM, MOVE_SHADOW_BALL, MOVE_BRICK_BREAK, MOVE_REST}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .spDefenseEV = 252, @@ -4394,15 +3800,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x80, .nickname = _("SLAKING"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_KANGASKHAN, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_MEGA_KICK, MOVE_SHADOW_BALL, MOVE_ATTRACT, MOVE_FAKE_OUT}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .speedEV = 252, @@ -4416,15 +3820,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x3, .nickname = _("KANGASKHAN"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_ZANGOOSE, .heldItem = ITEM_SCOPE_LENS, .moves = {MOVE_CRUSH_CLAW, MOVE_SHADOW_BALL, MOVE_BRICK_BREAK, MOVE_ROAR}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .speedEV = 252, @@ -4438,7 +3840,7 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x80, .nickname = _("ZANGOOSE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -4446,7 +3848,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { { .name = _("EDIE"), .facilityClass = FACILITY_CLASS_PSYCHIC_F, - .unused = 0, .speechBefore = {EC_WORD_WE, EC_WORD_WILL_BE_HERE, EC_WORD_FOR, EC_WORD_ANY, EC_WORD_TRAINER, EC_WORD_CHALLENGE}, .speechWin = {EC_WORD_MY, EC_WORD_STRATEGY, EC_WORD_WORKS, EC_WORD_TO, EC_WORD_PERFECTION, EC_WORD_EXCL}, .speechLose = {EC_WORD_NO, EC_WORD_NO, EC_WORD_ELLIPSIS, EC_WORD_THAT, EC_WORD_WON_T, EC_WORD_DO}, @@ -4458,8 +3859,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_SLOWKING, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_PSYCHIC, MOVE_SURF, MOVE_ICE_BEAM, MOVE_SKILL_SWAP}, - .level = 0, - .ppBonuses = 0, .hpEV = 200, .defenseEV = 110, .spAttackEV = 200, @@ -4473,15 +3872,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 1, .personality = 0xF, .nickname = _("SLOWKING"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_ESPEON, .heldItem = ITEM_LUM_BERRY, .moves = {MOVE_PSYCHIC, MOVE_BITE, MOVE_CALM_MIND, MOVE_REFLECT}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -4495,15 +3892,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x28, .nickname = _("ESPEON"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_STARMIE, .heldItem = ITEM_SHELL_BELL, .moves = {MOVE_PSYCHIC, MOVE_SURF, MOVE_THUNDERBOLT, MOVE_ICE_BEAM}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -4517,15 +3912,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 1, .personality = 0xF, .nickname = _("STARMIE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_GENGAR, .heldItem = ITEM_LUM_BERRY, .moves = {MOVE_PSYCHIC, MOVE_THUNDERBOLT, MOVE_FIRE_PUNCH, MOVE_ICE_PUNCH}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -4539,15 +3932,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("GENGAR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_GARDEVOIR, .heldItem = ITEM_SALAC_BERRY, .moves = {MOVE_PSYCHIC, MOVE_THUNDERBOLT, MOVE_MAGICAL_LEAF, MOVE_DESTINY_BOND}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -4561,15 +3952,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("GARDEVOIR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_ALAKAZAM, .heldItem = ITEM_LUM_BERRY, .moves = {MOVE_PSYCHIC, MOVE_RECOVER, MOVE_THUNDER_WAVE, MOVE_ATTRACT}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -4583,34 +3972,17 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("ALAKAZAM"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x1B, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x31, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x2C, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x08, - 0x31, 0x3B, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3B, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3B, 0x3B, 0x08, - 0x69, 0x73, 0x08, 0x4D, 0x4D, 0x4D, 0x4D, 0xD1, 0x4D, 0x4D, 0x4D, 0x4D, 0x08, 0x69, 0x73, 0x08, - 0x40, 0x3B, 0x08, 0x55, 0x55, 0x55, 0x55, 0xD1, 0x55, 0x55, 0x55, 0x55, 0x08, 0x31, 0x41, 0x08, - 0x69, 0x41, 0x08, 0xC5, 0xD9, 0xD9, 0xD9, 0x9A, 0xD9, 0xD9, 0xD9, 0xC6, 0x08, 0x41, 0x73, 0x08, - 0x69, 0x3B, 0x08, 0xD4, 0xDB, 0x9B, 0x73, 0x73, 0x73, 0x9B, 0xDB, 0xCC, 0x08, 0x31, 0x73, 0x08, - 0x69, 0x3B, 0x08, 0xCD, 0x9B, 0x73, 0x73, 0x44, 0x73, 0x73, 0x9B, 0xD5, 0x08, 0x31, 0x73, 0x08, - 0x69, 0x3B, 0x08, 0xD4, 0xDB, 0x9B, 0x73, 0x73, 0x73, 0x9B, 0xDB, 0xCC, 0x08, 0x31, 0x73, 0x08, - 0x69, 0x41, 0x08, 0xD1, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xDB, 0xDB, 0xDB, 0x08, 0x41, 0x73, 0x08, - 0x40, 0x3B, 0x08, 0x08, 0xC7, 0xC7, 0xDB, 0xDB, 0xDB, 0xC7, 0xC7, 0x08, 0x08, 0x31, 0x41, 0x08, - 0x69, 0x3B, 0x4D, 0x4D, 0x67, 0x67, 0xDB, 0xDB, 0xDB, 0x67, 0x67, 0x4D, 0x4D, 0x31, 0x73, 0x08, - 0x69, 0x3B, 0x55, 0x55, 0xD7, 0xD7, 0xD1, 0xDB, 0xDB, 0xD7, 0xD7, 0x55, 0x55, 0x31, 0x73, 0x08, - 0x69, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x3A, 0x73, 0x08, - 0x69, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = {0x0381, 0x0201, 0x3EF9, 0x3EF9, 0x3EF9, 0x2009, 0x3019, 0x2009, 0x3019, 0x2009, 0x3019, 0x3019, 0x3C79, 0x1, 0x1, 0xFFFF}, - .coords = {COORDS_XY(4,7), COORDS_XY(10,7)}, - .direction = TRAINER_DIRS(DIR_WEST, DIR_EAST), - .range = TRAINER_RANGE(5, 5), + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_expert/floor_0/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_expert/floor_0/collision.bin"), + .trainerCoords = {COORDS_XY(4,7), COORDS_XY(10,7)}, + .trainerDirections = TRAINER_DIRS(DIR_WEST, DIR_EAST), + .trainerRanges = TRAINER_RANGE(5, 5), } }, [1] = @@ -4623,7 +3995,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { { .name = _("RODERICK"), .facilityClass = FACILITY_CLASS_COOLTRAINER_M, - .unused = 0, .speechBefore = {EC_WORD_I, EC_WORD_CAN, EC_WORD_WIN, EC_WORD_WITHOUT, EC_WORD_A, EC_MOVE2(HELPING_HAND)}, .speechWin = {EC_WORD_IT_S, EC_WORD_ONLY, EC_WORD_NATURAL, EC_WORD_THAT, EC_WORD_I, EC_WORD_WIN}, .speechLose = {EC_WORD_LOSING, EC_WORD_HAS, EC_WORD_ME, EC_WORD_FEELING, EC_WORD_SMALL, EC_WORD_ELLIPSIS}, @@ -4635,8 +4006,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_SWELLOW, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_AERIAL_ACE, MOVE_AGILITY, MOVE_FACADE, MOVE_ATTRACT}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spDefenseEV = 6, @@ -4650,15 +4019,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x3, .nickname = _("SWELLOW"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_MACHAMP, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_LOW_KICK, MOVE_ROCK_SLIDE, MOVE_FACADE, MOVE_ATTRACT}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spDefenseEV = 6, @@ -4672,15 +4039,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x3, .nickname = _("MACHAMP"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_URSARING, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_PROTECT, MOVE_ROCK_SLIDE, MOVE_FACADE, MOVE_ATTRACT}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spDefenseEV = 6, @@ -4694,15 +4059,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x3, .nickname = _("URSARING"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_KINGLER, .heldItem = ITEM_PERSIM_BERRY, .moves = {MOVE_RETURN, MOVE_PROTECT, MOVE_CRABHAMMER, MOVE_ATTRACT}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spDefenseEV = 6, @@ -4716,15 +4079,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x80, .nickname = _("KINGLER"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_TYRANITAR, .heldItem = ITEM_PERSIM_BERRY, .moves = {MOVE_ROCK_SLIDE, MOVE_CRUNCH, MOVE_EARTHQUAKE, MOVE_ATTRACT}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .defenseEV = 6, @@ -4738,15 +4099,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x80, .nickname = _("TYRANITAR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_DRAGONITE, .heldItem = ITEM_PERSIM_BERRY, .moves = {MOVE_BODY_SLAM, MOVE_THUNDER_WAVE, MOVE_EARTHQUAKE, MOVE_ATTRACT}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .attackEV = 252, .spDefenseEV = 6, @@ -4760,7 +4119,7 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x80, .nickname = _("DRAGONITE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -4768,7 +4127,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { { .name = _("ALICIA"), .facilityClass = FACILITY_CLASS_COOLTRAINER_F, - .unused = 0, .speechBefore = {EC_WORD_I, EC_WORD_DON_T, EC_WORD_NEED, EC_WORD_A, EC_MOVE2(HELPING_HAND), EC_WORD_EXCL}, .speechWin = {EC_WORD_SORRY, EC_WORD_EXCL, EC_WORD_TOO, EC_WORD_BAD, EC_WORD_FOR, EC_WORD_YOU}, .speechLose = {EC_WORD_WHAT, EC_WORD_AN, EC_WORD_UNBELIEVABLE, EC_MOVE2(STRUGGLE), EC_WORD_THAT_WAS, EC_WORD_EXCL}, @@ -4780,8 +4138,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_JOLTEON, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_THUNDERBOLT, MOVE_THUNDER_WAVE, MOVE_ATTRACT, MOVE_SWAGGER}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -4795,15 +4151,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0xA, .nickname = _("JOLTEON"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_ALAKAZAM, .heldItem = ITEM_KINGS_ROCK, .moves = {MOVE_PSYCHIC, MOVE_ICE_PUNCH, MOVE_ATTRACT, MOVE_SWAGGER}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -4817,15 +4171,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0xA, .nickname = _("ALAKAZAM"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_STARMIE, .heldItem = ITEM_SCOPE_LENS, .moves = {MOVE_SURF, MOVE_PSYCHIC, MOVE_CONFUSE_RAY, MOVE_SWAGGER}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -4839,15 +4191,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 1, .personality = 0xA, .nickname = _("STARMIE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_DUSCLOPS, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_PURSUIT, MOVE_PROTECT, MOVE_ATTRACT, MOVE_WILL_O_WISP}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 252, .spDefenseEV = 6, @@ -4861,15 +4211,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x82, .nickname = _("DUSCLOPS"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_NINETALES, .heldItem = ITEM_WHITE_HERB, .moves = {MOVE_OVERHEAT, MOVE_CONFUSE_RAY, MOVE_WILL_O_WISP, MOVE_ATTRACT}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .speedEV = 252, .spAttackEV = 252, @@ -4883,15 +4231,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0xD2, .nickname = _("NINETALES"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_BANETTE, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_SHADOW_BALL, MOVE_FAINT_ATTACK, MOVE_ATTRACT, MOVE_WILL_O_WISP}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 252, .spDefenseEV = 6, @@ -4905,34 +4251,17 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x85, .nickname = _("BANETTE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x78, 0x08, - 0x91, 0x46, 0x9B, 0x7C, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7C, 0x9B, 0x7B, 0x9B, 0x7A, 0x9B, 0x08, - 0x91, 0x46, 0x7D, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, - 0x91, 0x46, 0x9B, 0x7E, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0xB3, 0x9B, 0x9B, 0x9B, 0x08, - 0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x9B, 0x08, - 0x91, 0x46, 0x9B, 0x7D, 0x9B, 0x7C, 0x9B, 0x7B, 0x9B, 0x7A, 0x9B, 0x7C, 0x9B, 0x9B, 0x9B, 0x08, - 0x91, 0x46, 0x9B, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, - 0x91, 0x46, 0x9B, 0x7C, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0x08, - 0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0xB3, 0x08, - 0x91, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x9B, 0x08, - 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x08, - 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0x08, - 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x08, - 0x91, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x9B, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - }, - .collisionData = {0x0381, 0x7FFD, 0x4001, 0x5FFF, 0x4001, 0x7FFD, 0x4001, 0x5FFF, 0x4001, 0x7FFD, 0x1, 0x1, 0x1, 0x1, 0x1, 0xFFFF}, - .coords = {COORDS_XY(7,10), COORDS_XY(7,14)}, - .direction = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH), - .range = TRAINER_RANGE(3, 3), + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_expert/floor_1/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_expert/floor_1/collision.bin"), + .trainerCoords = {COORDS_XY(7,10), COORDS_XY(7,14)}, + .trainerDirections = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH), + .trainerRanges = TRAINER_RANGE(3, 3), } }, [2] = @@ -4945,7 +4274,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { { .name = _("TERRENCE"), .facilityClass = FACILITY_CLASS_EXPERT_M, - .unused = 0, .speechBefore = {EC_WORD_OH_DEAR, EC_WORD_THIS, EC_WORD_MATCH, EC_WORD_IS, EC_WORD_FOR, EC_WORD_YOU}, .speechWin = {EC_WORD_OH_DEAR, EC_WORD_DID, EC_WORD_YOU, EC_WORD_SEE, EC_WORD_THAT, EC_WORD_QUES}, .speechLose = {EC_WORD_OH_DEAR, EC_WORD_I_AM, EC_WORD_SO, EC_WORD_SORRY, EC_EMPTY_WORD, EC_EMPTY_WORD}, @@ -4957,8 +4285,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_WOBBUFFET, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_MIRROR_COAT, MOVE_COUNTER, MOVE_SAFEGUARD, MOVE_ENCORE}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .defenseEV = 130, .spDefenseEV = 130, @@ -4972,15 +4298,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x94, .nickname = _("WOBBUFFET"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_EXPLOUD, .heldItem = ITEM_CHESTO_BERRY, .moves = {MOVE_HYPER_VOICE, MOVE_COUNTER, MOVE_REST, MOVE_ROCK_SLIDE}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .defenseEV = 130, .spDefenseEV = 130, @@ -5001,8 +4325,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_CROBAT, .heldItem = ITEM_KINGS_ROCK, .moves = {MOVE_MEAN_LOOK, MOVE_CONFUSE_RAY, MOVE_AERIAL_ACE, MOVE_TOXIC}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .defenseEV = 130, .spDefenseEV = 130, @@ -5016,15 +4338,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x0, .nickname = _("CROBAT"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_DUGTRIO, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_DOUBLE_TEAM, MOVE_PROTECT, MOVE_RETURN, MOVE_SLUDGE_BOMB}, - .level = 0, - .ppBonuses = 0, .hpEV = 6, .attackEV = 252, .speedEV = 252, @@ -5038,15 +4358,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 1, .personality = 0xD, .nickname = _("DUGTRIO"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_ELECTRODE, .heldItem = ITEM_PETAYA_BERRY, .moves = {MOVE_TORMENT, MOVE_MIRROR_COAT, MOVE_THUNDERBOLT, MOVE_LIGHT_SCREEN}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 252, .spAttackEV = 6, @@ -5067,8 +4385,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_GENGAR, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_CONFUSE_RAY, MOVE_MEAN_LOOK, MOVE_GIGA_DRAIN, MOVE_WILL_O_WISP}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 252, .spDefenseEV = 6, @@ -5082,7 +4398,7 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x14, .nickname = _("GENGAR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -5090,7 +4406,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { { .name = _("CARLOTTA"), .facilityClass = FACILITY_CLASS_EXPERT_F, - .unused = 0, .speechBefore = {EC_WORD_OH_DEAR, EC_WORD_I, EC_WORD_WILL, EC_WORD_WIN, EC_WORD_FOR, EC_WORD_YOU}, .speechWin = {EC_WORD_OH_DEAR, EC_WORD_WE, EC_WORD_HAVE, EC_WORD_A, EC_WORD_PARTY, EC_WORD_LATER}, .speechLose = {EC_WORD_OH_DEAR, EC_WORD_I_AM, EC_WORD_SORRY, EC_WORD_TO, EC_WORD_DISAPPOINT, EC_WORD_YOU}, @@ -5102,8 +4417,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_LAPRAS, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_SURF, MOVE_ICE_BEAM, MOVE_PERISH_SONG, MOVE_SING}, - .level = 0, - .ppBonuses = 0, .hpEV = 250, .defenseEV = 130, .spDefenseEV = 130, @@ -5124,8 +4437,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_ABSOL, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_PERISH_SONG, MOVE_DOUBLE_EDGE, MOVE_PROTECT, MOVE_TORMENT}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .defenseEV = 6, .speedEV = 252, @@ -5146,8 +4457,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_ALTARIA, .heldItem = ITEM_KINGS_ROCK, .moves = {MOVE_PERISH_SONG, MOVE_PROTECT, MOVE_DRAGON_CLAW, MOVE_FIRE_BLAST}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .spAttackEV = 6, .spDefenseEV = 252, @@ -5168,8 +4477,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_DEWGONG, .heldItem = ITEM_CHESTO_BERRY, .moves = {MOVE_ICE_BEAM, MOVE_SIGNAL_BEAM, MOVE_REST, MOVE_PERISH_SONG}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 252, .spAttackEV = 6, @@ -5190,8 +4497,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_POLITOED, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_HYDRO_PUMP, MOVE_BLIZZARD, MOVE_MIND_READER, MOVE_PERISH_SONG}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .spAttackEV = 6, .spDefenseEV = 252, @@ -5212,8 +4517,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_MAROWAK, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_PERISH_SONG, MOVE_EARTHQUAKE, MOVE_COUNTER, MOVE_PROTECT}, - .level = 0, - .ppBonuses = 0, .hpEV = 252, .speedEV = 6, .spDefenseEV = 252, @@ -5232,29 +4535,12 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { }, }, }, - .display = { - .metatileData = { - 0xD1, 0xDB, 0xDB, 0xDB, 0xD9, 0xD9, 0x1B, 0x14, 0x15, 0x98, 0x99, 0x9A, 0x9B, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xDB, 0xDB, 0xD5, 0xD5, 0xC3, 0xF9, 0x86, 0x8E, 0x95, 0x9B, 0x9B, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xDB, 0xD5, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xD5, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x9B, 0x08, - 0xD1, 0xD5, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8C, 0x8B, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x08, - 0xD1, 0xCB, 0xCB, 0xCB, 0xCB, 0xCC, 0xCC, 0xFB, 0xFB, 0x8C, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08, - 0xD1, 0xCC, 0xCC, 0xCC, 0xCC, 0xFB, 0xF5, 0xFB, 0xF5, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08, - 0xD1, 0xD5, 0xD5, 0xD5, 0xD5, 0xFB, 0xEC, 0xFB, 0xEC, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08, - 0xD1, 0xCB, 0xCB, 0xCB, 0xCB, 0xF5, 0xF5, 0xFB, 0xFB, 0xF5, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08, - 0xD1, 0xCC, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x08, - 0xD1, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0xF5, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xCC, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xDB, 0xCC, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xDB, 0xDB, 0xCC, 0xCC, 0xCB, 0xFB, 0x8C, 0x8C, 0x8C, 0x9B, 0x9B, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xCC, 0xFB, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x08, - }, - .collisionData = {0x0381, 0x0201, 0xEE1, 0x1EF1, 0x3EF9, 0x3EF9, 0x7E7D, 0x783D, 0x2BD, 0x783D, 0x7E7D, 0x3E79, 0x3EF9, 0x1EF1, 0xEE1, 0x201}, - .coords = {COORDS_XY(7,6), COORDS_XY(7,10)}, - .direction = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH), - .range = TRAINER_RANGE(3, 3), + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_expert/floor_2/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_expert/floor_2/collision.bin"), + .trainerCoords = {COORDS_XY(7,6), COORDS_XY(7,10)}, + .trainerDirections = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH), + .trainerRanges = TRAINER_RANGE(3, 3), } }, [3] = @@ -5267,7 +4553,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { { .name = _("NORA"), .facilityClass = FACILITY_CLASS_PKMN_RANGER_F, - .unused = 0, .speechBefore = {EC_WORD_WAAAH, EC_WORD_THIS, EC_WORD_IS, EC_WORD_SO, EC_WORD_EXCITING, EC_WORD_EXCL}, .speechWin = {EC_WORD_WAAAH, EC_WORD_I_AM, EC_WORD_SO, EC_WORD_HAPPY, EC_WORD_I, EC_WORD_WON}, .speechLose = {EC_WORD_WAAAH, EC_WORD_I_AM, EC_WORD_SO, EC_WORD_SAD, EC_WORD_I, EC_WORD_LOST}, @@ -5279,8 +4564,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_FORRETRESS, .heldItem = ITEM_QUICK_CLAW, .moves = {MOVE_EXPLOSION, MOVE_EARTHQUAKE, MOVE_ATTRACT, MOVE_SPIKES}, - .level = 0, - .ppBonuses = 0, .hpEV = 110, .attackEV = 200, .spDefenseEV = 200, @@ -5294,15 +4577,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x3, .nickname = _("FORRETRESS"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_ELECTRODE, .heldItem = ITEM_SALAC_BERRY, .moves = {MOVE_EXPLOSION, MOVE_THUNDERBOLT, MOVE_SWIFT, MOVE_LIGHT_SCREEN}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -5315,15 +4596,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 1, .personality = 0xC, .nickname = _("ELECTRODE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_EXEGGUTOR, .heldItem = ITEM_SHELL_BELL, .moves = {MOVE_EXPLOSION, MOVE_HYPNOSIS, MOVE_PSYCHIC, MOVE_SOLAR_BEAM}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -5336,15 +4615,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x7F, .nickname = _("EXEGGUTOR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_DUSCLOPS, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_IMPRISON, MOVE_PROTECT, MOVE_ICE_BEAM, MOVE_EARTHQUAKE}, - .level = 0, - .ppBonuses = 0, .hpEV = 110, .defenseEV = 200, .spDefenseEV = 200, @@ -5358,15 +4635,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x93, .nickname = _("DUSCLOPS"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_NINETALES, .heldItem = ITEM_WHITE_HERB, .moves = {MOVE_IMPRISON, MOVE_PROTECT, MOVE_OVERHEAT, MOVE_CONFUSE_RAY}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -5379,15 +4654,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0xF, .nickname = _("NINETALES"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_BANETTE, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_IMPRISON, MOVE_PROTECT, MOVE_THUNDERBOLT, MOVE_THUNDER}, - .level = 0, - .ppBonuses = 0, .hpEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -5400,7 +4673,7 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x96, .nickname = _("BANETTE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, @@ -5408,7 +4681,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { { .name = _("GAV"), .facilityClass = FACILITY_CLASS_PKMN_RANGER_M, - .unused = 0, .speechBefore = {EC_WORD_WAHAHAHA, EC_WORD_YOU, EC_WORD_CAN_T, EC_WORD_STOP, EC_WORD_ME, EC_WORD_EXCL}, .speechWin = {EC_WORD_WOWEE, EC_WORD_EXCL, EC_EMPTY_WORD, EC_WORD_I_AM, EC_WORD_AWESOME, EC_WORD_COOL}, .speechLose = {EC_WORD_I_AM, EC_WORD_NOT, EC_WORD_COOL, EC_WORD_AT, EC_WORD_ALL, EC_WORD_EXCL}, @@ -5420,8 +4692,6 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .species = SPECIES_SALAMENCE, .heldItem = ITEM_SHELL_BELL, .moves = {MOVE_ROCK_SLIDE, MOVE_FLAMETHROWER, MOVE_DRAGON_CLAW, MOVE_AERIAL_ACE}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -5434,15 +4704,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x95, .nickname = _("SALAMENCE"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [1] = { .species = SPECIES_GENGAR, .heldItem = ITEM_LUM_BERRY, .moves = {MOVE_PSYCHIC, MOVE_GIGA_DRAIN, MOVE_WILL_O_WISP, MOVE_DESTINY_BOND}, - .level = 0, - .ppBonuses = 0, .speedEV = 255, .spAttackEV = 255, .otId = TRAINER_HILL_OTID, @@ -5455,15 +4723,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x8C, .nickname = _("GENGAR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [2] = { .species = SPECIES_GYARADOS, .heldItem = ITEM_BRIGHT_POWDER, .moves = {MOVE_DRAGON_DANCE, MOVE_HYPER_BEAM, MOVE_BITE, MOVE_EARTHQUAKE}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -5476,15 +4742,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x3, .nickname = _("GYARADOS"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [3] = { .species = SPECIES_GENGAR, .heldItem = ITEM_SALAC_BERRY, .moves = {MOVE_EXPLOSION, MOVE_MEAN_LOOK, MOVE_SHADOW_BALL, MOVE_CONFUSE_RAY}, - .level = 0, - .ppBonuses = 0, .attackEV = 255, .speedEV = 255, .otId = TRAINER_HILL_OTID, @@ -5497,15 +4761,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x3, .nickname = _("GENGAR"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [4] = { .species = SPECIES_DUSCLOPS, .heldItem = ITEM_LEFTOVERS, .moves = {MOVE_MEAN_LOOK, MOVE_CONFUSE_RAY, MOVE_WILL_O_WISP, MOVE_SHADOW_BALL}, - .level = 0, - .ppBonuses = 0, .hpEV = 110, .defenseEV = 200, .spDefenseEV = 200, @@ -5519,15 +4781,13 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x14, .nickname = _("DUSCLOPS"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, [5] = { .species = SPECIES_MISDREAVUS, .heldItem = ITEM_FOCUS_BAND, .moves = {MOVE_MEAN_LOOK, MOVE_CONFUSE_RAY, MOVE_PERISH_SONG, MOVE_SHADOW_BALL}, - .level = 0, - .ppBonuses = 0, .hpEV = 180, .defenseEV = 180, .spDefenseEV = 150, @@ -5541,34 +4801,17 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { .abilityNum = 0, .personality = 0x85, .nickname = _("MISDREAVUS"), - .friendship = 255, + .friendship = MAX_FRIENDSHIP, }, }, }, }, - .display = { - .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x96, 0xFB, 0xF6, 0xFD, 0xF6, 0xF6, 0xFB, 0x46, 0xFB, 0xF6, 0xF6, 0xFD, 0xF6, 0xFB, 0x9B, 0x08, - 0xFB, 0x9B, 0xFB, 0xF6, 0xFB, 0xFB, 0xFB, 0x46, 0xFB, 0xFB, 0xFB, 0xF6, 0xFB, 0x9B, 0xFB, 0x08, - 0xF6, 0xFB, 0x9B, 0xFB, 0xFB, 0x46, 0x46, 0x9B, 0x46, 0x46, 0xFB, 0xFB, 0x9B, 0xFB, 0xF6, 0x08, - 0xFD, 0xF6, 0xFB, 0x9B, 0x46, 0x36, 0x36, 0x9B, 0x36, 0x36, 0x46, 0x9B, 0xFB, 0xF6, 0xFD, 0x08, - 0xF6, 0xFB, 0xFB, 0x46, 0x9B, 0x46, 0x46, 0xDB, 0x46, 0x46, 0x9B, 0x46, 0xFB, 0xFB, 0xF6, 0x08, - 0xF6, 0xFB, 0x46, 0x36, 0x46, 0x9B, 0xDB, 0xD6, 0xDB, 0x9B, 0x46, 0x36, 0x46, 0xFB, 0xF6, 0x08, - 0xFB, 0xFB, 0x46, 0x36, 0x9B, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0x9B, 0x36, 0x46, 0xFB, 0xFB, 0x08, - 0x96, 0x9B, 0x9B, 0x9B, 0x9B, 0xD6, 0xD6, 0x96, 0xD6, 0xD6, 0xDB, 0x9B, 0x9B, 0x9B, 0x96, 0x08, - 0xFB, 0xFB, 0x46, 0x36, 0x9B, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0x9B, 0x36, 0x46, 0xFB, 0xFB, 0x08, - 0xF6, 0xFB, 0x46, 0x36, 0x46, 0x9B, 0xDB, 0xD6, 0xDB, 0x9B, 0x46, 0x36, 0x46, 0xFB, 0xF6, 0x08, - 0xF6, 0xFB, 0xFB, 0x46, 0x9B, 0x46, 0x46, 0xDB, 0x46, 0x46, 0x9B, 0x46, 0xFB, 0xFB, 0xF6, 0x08, - 0xFD, 0xF6, 0xFB, 0x9B, 0x46, 0x36, 0x36, 0x9B, 0x36, 0x36, 0x46, 0x9B, 0xFB, 0xF6, 0xFD, 0x08, - 0xF6, 0xFB, 0x9B, 0xFB, 0xFB, 0x46, 0x46, 0x9B, 0x46, 0x46, 0xFB, 0xFB, 0x9B, 0xFB, 0xF6, 0x08, - 0xFB, 0x9B, 0xFB, 0xF6, 0xFB, 0xFB, 0xFB, 0x46, 0xFB, 0xFB, 0xFB, 0xF6, 0xFB, 0x9B, 0xFB, 0x08, - 0x96, 0xFB, 0xF6, 0xFD, 0xF6, 0xF6, 0xFB, 0x46, 0xFB, 0xF6, 0xF6, 0xFD, 0xF6, 0xFB, 0x9B, 0x08, - }, - .collisionData = {0x0381, 0x0101, 0x0101, 0x6C1, 0x0821, 0x16D1, 0x2829, 0x2009, 0x1, 0x2009, 0x2829, 0x16D1, 0x0821, 0x6C1, 0x0101, 0x101}, - .coords = {COORDS_XY(7,6), COORDS_XY(7,10)}, - .direction = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH), - .range = TRAINER_RANGE(3, 3), + .map = { + .metatileData = INCBIN_U8("graphics/trainer_hill/maps_expert/floor_3/metatiles.bin"), + .collisionData = INCBIN_U16("graphics/trainer_hill/maps_expert/floor_3/collision.bin"), + .trainerCoords = {COORDS_XY(7,6), COORDS_XY(7,10)}, + .trainerDirections = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH), + .trainerRanges = TRAINER_RANGE(3, 3), } }, }; diff --git a/src/ereader_helpers.c b/src/ereader_helpers.c index c3f17f234..ac6e0e1e1 100755 --- a/src/ereader_helpers.c +++ b/src/ereader_helpers.c @@ -57,22 +57,20 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .speechLose = { EC_WORD_TO_HER, EC_WORD_WIN, EC_WORD_JOKING, EC_WORD_HIGHS, EC_WORD_SCARY, EC_WORD_ELLIPSIS_EXCL }, .speechAfter = { EC_WORD_IGNORANT, EC_WORD_SO, EC_WORD_TODAY, EC_WORD_NIGHTTIME, EC_WORD_YOU_RE, EC_WORD_ELLIPSIS_ELLIPSIS_ELLIPSIS }, .mons = { - [0] = NULL_BATTLE_TOWER_POKEMON, - [1] = NULL_BATTLE_TOWER_POKEMON, - [2] = NULL_BATTLE_TOWER_POKEMON, + [0] = DUMMY_HILL_MON, + [1] = DUMMY_HILL_MON, + [2] = DUMMY_HILL_MON, [3] = { .species = SPECIES_SWALOT, .heldItem = ITEM_SHELL_BELL, .moves = { MOVE_SLUDGE_BOMB, MOVE_SHADOW_BALL, MOVE_PAIN_SPLIT, MOVE_YAWN }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 55, .attackEV = 255, .defenseEV = 100, .speedEV = 0, .spAttackEV = 0, .spDefenseEV = 100, - .otId = 0x10000000, + .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, .defenseIV = 5, @@ -82,21 +80,19 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .abilityNum = 1, .personality = 0x80, .nickname = __("マルノーム$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [4] = { .species = SPECIES_DUSTOX, .heldItem = ITEM_BRIGHT_POWDER, .moves = { MOVE_SILVER_WIND, MOVE_SLUDGE_BOMB, MOVE_SHADOW_BALL, MOVE_GIGA_DRAIN }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 0, .attackEV = 255, .defenseEV = 0, .speedEV = 0, .spAttackEV = 255, .spDefenseEV = 0, - .otId = 0x10000000, + .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, .defenseIV = 5, @@ -106,21 +102,19 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .abilityNum = 0, .personality = 0x6, .nickname = __("ドクケイル$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [5] = { .species = SPECIES_RELICANTH, .heldItem = ITEM_QUICK_CLAW, .moves = { MOVE_ANCIENT_POWER, MOVE_SURF, MOVE_EARTHQUAKE, MOVE_AMNESIA }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 100, .attackEV = 0, .defenseEV = 0, .speedEV = 0, .spAttackEV = 155, .spDefenseEV = 255, - .otId = 0x10000000, + .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, .defenseIV = 5, @@ -130,7 +124,7 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .abilityNum = 0, .personality = 0x2f, .nickname = __("ジーランス$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, } }, @@ -143,22 +137,20 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .speechLose = { EC_MOVE2(MINIMIZE), EC_WORD_AS_MUCH_AS, EC_EMPTY_WORD, EC_WORD_THEY_RE, EC_WORD_SAD, EC_WORD_EXCL }, .speechAfter = { EC_MOVE(BITE), EC_WORD_AS_MUCH_AS, EC_EMPTY_WORD, EC_WORD_THEY_RE, EC_WORD_ANGRY, EC_WORD_EXCL }, .mons = { - [0] = NULL_BATTLE_TOWER_POKEMON, - [1] = NULL_BATTLE_TOWER_POKEMON, - [2] = NULL_BATTLE_TOWER_POKEMON, + [0] = DUMMY_HILL_MON, + [1] = DUMMY_HILL_MON, + [2] = DUMMY_HILL_MON, [3] = { .species = SPECIES_CACTURNE, .heldItem = ITEM_QUICK_CLAW, .moves = { MOVE_GIGA_DRAIN, MOVE_FAINT_ATTACK, MOVE_THUNDER_PUNCH, MOVE_GROWTH }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 55, .attackEV = 0, .defenseEV = 100, .speedEV = 0, .spAttackEV = 255, .spDefenseEV = 100, - .otId = 0x10000000, + .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, .defenseIV = 5, @@ -168,21 +160,19 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .abilityNum = 0, .personality = 0x8c, .nickname = __("ノクタス$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [4] = { .species = SPECIES_SWELLOW, .heldItem = ITEM_BRIGHT_POWDER, .moves = { MOVE_FACADE, MOVE_AERIAL_ACE, MOVE_QUICK_ATTACK, MOVE_DOUBLE_TEAM }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 255, .attackEV = 255, .defenseEV = 0, .speedEV = 0, .spAttackEV = 0, .spDefenseEV = 0, - .otId = 0x10000000, + .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, .defenseIV = 5, @@ -192,21 +182,19 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .abilityNum = 0, .personality = 0x80, .nickname = __("オオスバメ$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [5] = { .species = SPECIES_WHISCASH, .heldItem = ITEM_CHESTO_BERRY, .moves = { MOVE_SURF, MOVE_EARTHQUAKE, MOVE_AMNESIA, MOVE_REST }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 0, .attackEV = 255, .defenseEV = 0, .speedEV = 0, .spAttackEV = 255, .spDefenseEV = 0, - .otId = 0x10000000, + .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, .defenseIV = 5, @@ -216,7 +204,7 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .abilityNum = 0, .personality = 0x0, .nickname = __("ナマズン$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, } }, @@ -229,22 +217,20 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .speechLose = { EC_WORD_THAT, EC_WORD_ABOVE, EC_WORD_LOST, EC_WORD_STORES, EC_WORD_JOKING, EC_WORD_ELLIPSIS_ELLIPSIS_ELLIPSIS }, .speechAfter = { EC_WORD_ENTERTAINING, EC_WORD_NONE, EC_WORD_HEY_QUES, EC_WORD_ALMOST, EC_WORD_EXCL, EC_EMPTY_WORD }, .mons = { - [0] = NULL_BATTLE_TOWER_POKEMON, - [1] = NULL_BATTLE_TOWER_POKEMON, - [2] = NULL_BATTLE_TOWER_POKEMON, + [0] = DUMMY_HILL_MON, + [1] = DUMMY_HILL_MON, + [2] = DUMMY_HILL_MON, [3] = { .species = SPECIES_DELCATTY, .heldItem = ITEM_LUM_BERRY, .moves = { MOVE_SING, MOVE_BODY_SLAM, MOVE_SHADOW_BALL, MOVE_IRON_TAIL }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 0, .attackEV = 255, .defenseEV = 0, .speedEV = 255, .spAttackEV = 0, .spDefenseEV = 0, - .otId = 0x10000000, + .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, .defenseIV = 5, @@ -254,21 +240,19 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .abilityNum = 0, .personality = 0x3, .nickname = __("エネコロロ$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [4] = { .species = SPECIES_ROSELIA, .heldItem = ITEM_LEFTOVERS, .moves = { MOVE_GIGA_DRAIN, MOVE_GRASS_WHISTLE, MOVE_TOXIC, MOVE_LEECH_SEED }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 255, .attackEV = 0, .defenseEV = 0, .speedEV = 0, .spAttackEV = 255, .spDefenseEV = 0, - .otId = 0x10000000, + .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, .defenseIV = 5, @@ -278,21 +262,19 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .abilityNum = 1, .personality = 0x6, .nickname = __("ロゼリア$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [5] = { .species = SPECIES_BEAUTIFLY, .heldItem = ITEM_BRIGHT_POWDER, .moves = { MOVE_SILVER_WIND, MOVE_AERIAL_ACE, MOVE_ATTRACT, MOVE_PSYCHIC }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 100, .attackEV = 200, .defenseEV = 0, .speedEV = 0, .spAttackEV = 200, .spDefenseEV = 0, - .otId = 0x10000000, + .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, .defenseIV = 5, @@ -302,7 +284,7 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .abilityNum = 0, .personality = 0x6, .nickname = __("アゲハント$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, } }, @@ -315,22 +297,20 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .speechLose = { EC_WORD_OUTSIDE, EC_WORD_UNCLE, EC_WORD_SURPRISE, EC_WORD_THESE, EC_WORD_HEY_QUES, EC_WORD_ELLIPSIS_EXCL }, .speechAfter = { EC_WORD_HE_S, EC_WORD_NO_1, EC_WORD_STRONG, EC_WORD_CHILDREN, EC_WORD_CAN_T, EC_WORD_EXCL_EXCL }, .mons = { - [0] = NULL_BATTLE_TOWER_POKEMON, - [1] = NULL_BATTLE_TOWER_POKEMON, - [2] = NULL_BATTLE_TOWER_POKEMON, + [0] = DUMMY_HILL_MON, + [1] = DUMMY_HILL_MON, + [2] = DUMMY_HILL_MON, [3] = { .species = SPECIES_MAWILE, .heldItem = ITEM_BRIGHT_POWDER, .moves = { MOVE_CRUNCH, MOVE_FLAMETHROWER, MOVE_THUNDER_PUNCH, MOVE_COMET_PUNCH }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 0, .attackEV = 0, .defenseEV = 100, .speedEV = 0, .spAttackEV = 255, .spDefenseEV = 155, - .otId = 0x10000000, + .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, .defenseIV = 5, @@ -340,21 +320,19 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .abilityNum = 1, .personality = 0x0, .nickname = __("クチート$$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [4] = { .species = SPECIES_SHARPEDO, .heldItem = ITEM_SCOPE_LENS, .moves = { MOVE_SURF, MOVE_CRUNCH, MOVE_DOUBLE_EDGE, MOVE_EARTHQUAKE }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 255, .attackEV = 0, .defenseEV = 0, .speedEV = 0, .spAttackEV = 255, .spDefenseEV = 0, - .otId = 0x10000000, + .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, .defenseIV = 5, @@ -364,21 +342,19 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .abilityNum = 0, .personality = 0x96, .nickname = __("サメハダー$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, [5] = { .species = SPECIES_BANETTE, .heldItem = ITEM_LUM_BERRY, .moves = { MOVE_PSYCHIC, MOVE_SHADOW_BALL, MOVE_THUNDERBOLT, MOVE_WILL_O_WISP }, - .level = 0, - .ppBonuses = 0x0, .hpEV = 255, .attackEV = 0, .defenseEV = 0, .speedEV = 0, .spAttackEV = 255, .spDefenseEV = 0, - .otId = 0x10000000, + .otId = TRAINER_HILL_OTID, .hpIV = 5, .attackIV = 5, .defenseIV = 5, @@ -388,7 +364,7 @@ static const struct TrainerHillTrainer sTrainerHillTrainerTemplates_JP[] = { .abilityNum = 0, .personality = 0x96, .nickname = __("ジュペッタ$$$$$$"), - .friendship = 255 + .friendship = MAX_FRIENDSHIP }, } }, @@ -447,40 +423,40 @@ static bool32 ValidateTrainerHillChecksum(struct EReaderTrainerHillSet *hillSet) return TRUE; } -static bool32 TryWriteTrainerHill_Internal(struct EReaderTrainerHillSet * hillSet, struct TrHillTag * hillTag) +static bool32 TryWriteTrainerHill_Internal(struct EReaderTrainerHillSet * hillSet, struct TrainerHillChallenge * challenge) { int i; AGB_ASSERT_EX(hillSet->dummy == 0, "cereader_tool.c", 450); AGB_ASSERT_EX(hillSet->id == 0, "cereader_tool.c", 452); - memset(hillTag, 0, SECTOR_SIZE); - hillTag->numTrainers = hillSet->numTrainers; - hillTag->unused1 = GetTrainerHillUnkVal(); - hillTag->numFloors = (hillSet->numTrainers + 1) / TRAINER_HILL_TRAINERS_PER_FLOOR; + memset(challenge, 0, SECTOR_SIZE); + challenge->numTrainers = hillSet->numTrainers; + challenge->unused1 = GetTrainerHillUnkVal(); + challenge->numFloors = (hillSet->numTrainers + 1) / HILL_TRAINERS_PER_FLOOR; for (i = 0; i < hillSet->numTrainers; i++) { if (!(i & 1)) { - hillTag->floors[i / TRAINER_HILL_TRAINERS_PER_FLOOR].trainerNum1 = hillSet->trainers[i].trainerNum; - hillTag->floors[i / TRAINER_HILL_TRAINERS_PER_FLOOR].display = hillSet->trainers[i].display; - hillTag->floors[i / TRAINER_HILL_TRAINERS_PER_FLOOR].trainers[0] = hillSet->trainers[i].trainer; + challenge->floors[i / HILL_TRAINERS_PER_FLOOR].trainerNum1 = hillSet->trainers[i].trainerNum; + challenge->floors[i / HILL_TRAINERS_PER_FLOOR].map = hillSet->trainers[i].map; + challenge->floors[i / HILL_TRAINERS_PER_FLOOR].trainers[0] = hillSet->trainers[i].trainer; } else { - hillTag->floors[i / TRAINER_HILL_TRAINERS_PER_FLOOR].trainerNum2 = hillSet->trainers[i].trainerNum; - hillTag->floors[i / TRAINER_HILL_TRAINERS_PER_FLOOR].trainers[1] = hillSet->trainers[i].trainer; + challenge->floors[i / HILL_TRAINERS_PER_FLOOR].trainerNum2 = hillSet->trainers[i].trainerNum; + challenge->floors[i / HILL_TRAINERS_PER_FLOOR].trainers[1] = hillSet->trainers[i].trainer; } } if (i & 1) { - hillTag->floors[i / TRAINER_HILL_TRAINERS_PER_FLOOR].trainers[1] = sTrainerHillTrainerTemplates_JP[i / TRAINER_HILL_TRAINERS_PER_FLOOR]; + challenge->floors[i / HILL_TRAINERS_PER_FLOOR].trainers[1] = sTrainerHillTrainerTemplates_JP[i / HILL_TRAINERS_PER_FLOOR]; } - hillTag->checksum = CalcByteArraySum((u8 *)hillTag->floors, NUM_TRAINER_HILL_FLOORS * sizeof(struct TrHillFloor)); - if (TryWriteSpecialSaveSector(SECTOR_ID_TRAINER_HILL, (u8 *)hillTag) != SAVE_STATUS_OK) + challenge->checksum = CalcByteArraySum((u8 *)challenge->floors, NUM_TRAINER_HILL_FLOORS * sizeof(struct TrainerHillFloor)); + if (TryWriteSpecialSaveSector(SECTOR_ID_TRAINER_HILL, (u8 *)challenge) != SAVE_STATUS_OK) return FALSE; return TRUE; diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 39c6202a0..dad6b97ea 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -32,23 +32,21 @@ #include "constants/trainer_hill.h" #include "constants/trainer_types.h" -#define HILL_TAG_NORMAL 0 -#define HILL_TAG_VARIETY 1 -#define HILL_TAG_UNIQUE 2 -#define HILL_TAG_EXPERT 3 - #define HILL_MAX_TIME 215999 // 60 * 60 * 60 - 1 -// EWRAM -struct TrHillStruct2 +struct FloorTrainers { - u8 floorId; - struct TrHillTag tag; - struct TrHillFloor floors[NUM_TRAINER_HILL_FLOORS]; + u8 name[HILL_TRAINERS_PER_FLOOR][HILL_TRAINER_NAME_LENGTH]; + u8 facilityClass[HILL_TRAINERS_PER_FLOOR]; }; -static EWRAM_DATA struct TrHillStruct2 *sHillData = NULL; -static EWRAM_DATA struct TrHillRoomTrainers *sRoomTrainers = NULL; +static EWRAM_DATA struct { + u8 floorId; + struct TrainerHillChallenge challenge; + struct TrainerHillFloor floors[NUM_TRAINER_HILL_FLOORS]; +} *sHillData = NULL; + +static EWRAM_DATA struct FloorTrainers *sFloorTrainers = NULL; EWRAM_DATA u32 *gTrainerHillVBlankCounter = NULL; // This file's functions. @@ -69,7 +67,7 @@ static void GetGameSaved(void); static void SetGameSaved(void); static void ClearGameSaved(void); static void GetChallengeWon(void); -static void TrainerHillSetTag(void); +static void TrainerHillSetMode(void); static void SetUpDataStruct(void); static void FreeDataStruct(void); static void TrainerHillDummy(void); @@ -202,12 +200,12 @@ static const u16 *const *const sPrizeListSets[] = static const u16 sEReader_Pal[] = INCBIN_U16("graphics/trainer_hill/ereader.gbapal"); static const u8 sRecordWinColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY}; -static const struct TrHillTag *const sDataPerTag[] = +static const struct TrainerHillChallenge *const sChallengeData[NUM_TRAINER_HILL_MODES] = { - &sDataTagNormal, - &sDataTagVariety, - &sDataTagUnique, - &sDataTagExpert, + [HILL_MODE_NORMAL] = &sChallenge_Normal, + [HILL_MODE_VARIETY] = &sChallenge_Variety, + [HILL_MODE_UNIQUE] = &sChallenge_Unique, + [HILL_MODE_EXPERT] = &sChallenge_Expert, }; // Unused. @@ -238,15 +236,15 @@ static void (* const sHillFunctions[])(void) = [TRAINER_HILL_FUNC_SET_GAME_SAVED] = SetGameSaved, [TRAINER_HILL_FUNC_CLEAR_GAME_SAVED] = ClearGameSaved, [TRAINER_HILL_FUNC_GET_WON] = GetChallengeWon, - [TRAINER_HILL_FUNC_SET_TAG] = TrainerHillSetTag, + [TRAINER_HILL_FUNC_SET_MODE] = TrainerHillSetMode, }; -static const u8 *const sTagMatchStrings[] = +static const u8 *const sModeStrings[NUM_TRAINER_HILL_MODES] = { - gText_NormalTagMatch, - gText_VarietyTagMatch, - gText_UniqueTagMatch, - gText_ExpertTagMatch, + [HILL_MODE_NORMAL] = gText_NormalTagMatch, + [HILL_MODE_VARIETY] = gText_VarietyTagMatch, + [HILL_MODE_UNIQUE] = gText_UniqueTagMatch, + [HILL_MODE_EXPERT] = gText_ExpertTagMatch, }; static const struct ObjectEventTemplate sTrainerObjectEventTemplate = @@ -261,18 +259,17 @@ static const struct ObjectEventTemplate sTrainerObjectEventTemplate = static const u32 sNextFloorMapNum[NUM_TRAINER_HILL_FLOORS] = { - MAP_NUM(TRAINER_HILL_2F), - MAP_NUM(TRAINER_HILL_3F), - MAP_NUM(TRAINER_HILL_4F), - MAP_NUM(TRAINER_HILL_ROOF) + [TRAINER_HILL_1F - 1] = MAP_NUM(TRAINER_HILL_2F), + [TRAINER_HILL_2F - 1] = MAP_NUM(TRAINER_HILL_3F), + [TRAINER_HILL_3F - 1] = MAP_NUM(TRAINER_HILL_4F), + [TRAINER_HILL_4F - 1] = MAP_NUM(TRAINER_HILL_ROOF) }; -static const u8 sTrainerPartySlots[][PARTY_SIZE / 2] = +static const u8 sTrainerPartySlots[HILL_TRAINERS_PER_FLOOR][PARTY_SIZE / 2] = { {0, 1, 2}, {3, 4, 5} }; -// code void CallTrainerHillFunction(void) { SetUpDataStruct(); @@ -287,7 +284,7 @@ void ResetTrainerHillResults(void) gSaveBlock2Ptr->frontier.savedGame = 0; gSaveBlock2Ptr->frontier.unk_EF9 = 0; gSaveBlock1Ptr->trainerHill.bestTime = 0; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_TRAINER_HILL_MODES; i++) SetTimerValue(&gSaveBlock1Ptr->trainerHillTimes[i], HILL_MAX_TIME); } @@ -300,7 +297,7 @@ u8 GetTrainerHillOpponentClass(u16 trainerId) { u8 id = trainerId - 1; - return gFacilityClassToTrainerClass[sRoomTrainers->facilityClass[id]]; + return gFacilityClassToTrainerClass[sFloorTrainers->facilityClass[id]]; } void GetTrainerHillTrainerName(u8 *dst, u16 trainerId) @@ -309,7 +306,7 @@ void GetTrainerHillTrainerName(u8 *dst, u16 trainerId) u8 id = trainerId - 1; for (i = 0; i < HILL_TRAINER_NAME_LENGTH; i++) - dst[i] = sRoomTrainers->name[id][i]; + dst[i] = sFloorTrainers->name[id][i]; } u8 GetTrainerHillTrainerFrontSpriteId(u16 trainerId) @@ -329,15 +326,14 @@ void InitTrainerHillBattleStruct(void) s32 i, j; SetUpDataStruct(); - sRoomTrainers = AllocZeroed(sizeof(*sRoomTrainers)); + sFloorTrainers = AllocZeroed(sizeof(*sFloorTrainers)); - for (i = 0; i < 2; i++) + for (i = 0; i < HILL_TRAINERS_PER_FLOOR; i++) { for (j = 0; j < HILL_TRAINER_NAME_LENGTH; j++) - { - sRoomTrainers->name[i][j] = sHillData->floors[sHillData->floorId].trainers[i].name[j]; - } - sRoomTrainers->facilityClass[i] = sHillData->floors[sHillData->floorId].trainers[i].facilityClass; + sFloorTrainers->name[i][j] = sHillData->floors[sHillData->floorId].trainers[i].name[j]; + + sFloorTrainers->facilityClass[i] = sHillData->floors[sHillData->floorId].trainers[i].facilityClass; } SetTrainerHillVBlankCounter(&gSaveBlock1Ptr->trainerHill.timer); FreeDataStruct(); @@ -345,8 +341,7 @@ void InitTrainerHillBattleStruct(void) void FreeTrainerHillBattleStruct(void) { - if (sRoomTrainers != NULL) - FREE_AND_SET_NULL(sRoomTrainers); + TRY_FREE_AND_SET_NULL(sFloorTrainers); } static void SetUpDataStruct(void) @@ -355,15 +350,20 @@ static void SetUpDataStruct(void) { sHillData = AllocZeroed(sizeof(*sHillData)); sHillData->floorId = gMapHeader.mapLayoutId - LAYOUT_TRAINER_HILL_1F; - CpuCopy32(sDataPerTag[gSaveBlock1Ptr->trainerHill.tag], &sHillData->tag, sizeof(sHillData->tag) + 4 * sizeof(struct TrHillFloor)); + + // This copy depends on the floor data for each challenge being directly after the + // challenge header data, and for the field 'floors' in sHillData to come directly + // after the field 'challenge'. + // e.g. for HILL_MODE_NORMAL, it will copy sChallenge_Normal to sHillData->challenge and + // it will copy sFloors_Normal to sHillData->floors + CpuCopy32(sChallengeData[gSaveBlock1Ptr->trainerHill.mode], &sHillData->challenge, sizeof(sHillData->challenge) + sizeof(sHillData->floors)); TrainerHillDummy(); } } static void FreeDataStruct(void) { - if (sHillData != NULL) - FREE_AND_SET_NULL(sHillData); + TRY_FREE_AND_SET_NULL(sHillData); } void CopyTrainerHillTrainerText(u8 which, u16 trainerId) @@ -428,7 +428,7 @@ static void GiveChallengePrize(void) { u16 itemId = GetPrizeItemId(); - if (sHillData->tag.numFloors != NUM_TRAINER_HILL_FLOORS || gSaveBlock1Ptr->trainerHill.receivedPrize) + if (sHillData->challenge.numFloors != NUM_TRAINER_HILL_FLOORS || gSaveBlock1Ptr->trainerHill.receivedPrize) { gSpecialVar_Result = 2; } @@ -456,7 +456,7 @@ static void CheckFinalTime(void) else if (GetTimerValue(&gSaveBlock1Ptr->trainerHill.bestTime) > gSaveBlock1Ptr->trainerHill.timer) { SetTimerValue(&gSaveBlock1Ptr->trainerHill.bestTime, gSaveBlock1Ptr->trainerHill.timer); - gSaveBlock1Ptr->trainerHillTimes[gSaveBlock1Ptr->trainerHill.tag] = gSaveBlock1Ptr->trainerHill.bestTime; + gSaveBlock1Ptr->trainerHillTimes[gSaveBlock1Ptr->trainerHill.mode] = gSaveBlock1Ptr->trainerHill.bestTime; gSpecialVar_Result = 0; } else @@ -529,9 +529,9 @@ static void BufferChallengeTime(void) static void GetAllFloorsUsed(void) { SetUpDataStruct(); - if (sHillData->tag.numFloors != NUM_TRAINER_HILL_FLOORS) + if (sHillData->challenge.numFloors != NUM_TRAINER_HILL_FLOORS) { - ConvertIntToDecimalStringN(gStringVar1, sHillData->tag.numFloors, STR_CONV_MODE_LEFT_ALIGN, 1); + ConvertIntToDecimalStringN(gStringVar1, sHillData->challenge.numFloors, STR_CONV_MODE_LEFT_ALIGN, 1); gSpecialVar_Result = FALSE; } else @@ -592,9 +592,9 @@ void PrintOnTrainerHillRecordsWindow(void) AddTextPrinterParameterized3(0, FONT_NORMAL, x, 2, sRecordWinColors, TEXT_SKIP_DRAW, gText_TimeBoard); y = 18; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_TRAINER_HILL_MODES; i++) { - AddTextPrinterParameterized3(0, FONT_NORMAL, 0, y, sRecordWinColors, TEXT_SKIP_DRAW, sTagMatchStrings[i]); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0, y, sRecordWinColors, TEXT_SKIP_DRAW, sModeStrings[i]); y += 15; total = GetTimerValue(&gSaveBlock1Ptr->trainerHillTimes[i]); minutes = total / (60 * 60); @@ -637,23 +637,23 @@ void LoadTrainerHillObjectEventTemplates(void) return; SetUpDataStruct(); - for (i = 0; i < 2; i++) + for (i = 0; i < HILL_TRAINERS_PER_FLOOR; i++) gSaveBlock2Ptr->frontier.trainerIds[i] = 0xFFFF; CpuFill32(0, gSaveBlock1Ptr->objectEventTemplates, sizeof(gSaveBlock1Ptr->objectEventTemplates)); floorId = GetFloorId(); - for (i = 0; i < 2; i++) + for (i = 0; i < HILL_TRAINERS_PER_FLOOR; i++) { u8 bits; eventTemplates[i] = sTrainerObjectEventTemplate; eventTemplates[i].localId = i + 1; eventTemplates[i].graphicsId = FacilityClassToGraphicsId(sHillData->floors[floorId].trainers[i].facilityClass); - eventTemplates[i].x = sHillData->floors[floorId].display.coords[i] & 0xF; - eventTemplates[i].y = ((sHillData->floors[floorId].display.coords[i] >> 4) & 0xF) + 5; + eventTemplates[i].x = sHillData->floors[floorId].map.trainerCoords[i] & 0xF; + eventTemplates[i].y = ((sHillData->floors[floorId].map.trainerCoords[i] >> 4) & 0xF) + 5; bits = i << 2; - eventTemplates[i].movementType = ((sHillData->floors[floorId].display.direction >> bits) & 0xF) + MOVEMENT_TYPE_FACE_UP; - eventTemplates[i].trainerRange_berryTreeId = (sHillData->floors[floorId].display.range >> bits) & 0xF; + eventTemplates[i].movementType = ((sHillData->floors[floorId].map.trainerDirections >> bits) & 0xF) + MOVEMENT_TYPE_FACE_UP; + eventTemplates[i].trainerRange_berryTreeId = (sHillData->floors[floorId].map.trainerRanges >> bits) & 0xF; eventTemplates[i].script = TrainerHill_EventScript_TrainerBattle; gSaveBlock2Ptr->frontier.trainerIds[i] = i + 1; } @@ -669,14 +669,14 @@ bool32 LoadTrainerHillFloorObjectEventScripts(void) return TRUE; } -static u16 GetMetatileForFloor(u8 floorId, u32 x, u32 y, u32 stride) // stride is always 16 +static u16 GetMetatileForFloor(u8 floorId, u32 x, u32 y, u32 floorWidth) // floorWidth is always 16 { bool8 impassable; u16 metatile; u16 elevation; - impassable = (sHillData->floors[floorId].display.collisionData[y] >> (15 - x) & 1); - metatile = sHillData->floors[floorId].display.metatileData[stride * y + x] + NUM_METATILES_IN_PRIMARY; + impassable = (sHillData->floors[floorId].map.collisionData[y] >> (15 - x) & 1); + metatile = sHillData->floors[floorId].map.metatileData[floorWidth * y + x] + NUM_METATILES_IN_PRIMARY; elevation = 3 << MAPGRID_ELEVATION_SHIFT; return ((impassable << MAPGRID_COLLISION_SHIFT) & MAPGRID_COLLISION_MASK) | elevation | (metatile & MAPGRID_METATILE_ID_MASK); @@ -684,7 +684,7 @@ static u16 GetMetatileForFloor(u8 floorId, u32 x, u32 y, u32 stride) // stride i void GenerateTrainerHillFloorLayout(u16 *mapArg) { - s32 i, j; + s32 y, x; u16 *src, *dst; u8 mapId = GetCurrentTrainerHillMapId(); @@ -705,24 +705,25 @@ void GenerateTrainerHillFloorLayout(u16 *mapArg) mapId = GetFloorId(); src = gMapHeader.mapLayout->map; gBackupMapLayout.map = mapArg; - gBackupMapLayout.width = 31; - gBackupMapLayout.height = 35; + // Dimensions include border area loaded beyond map + gBackupMapLayout.width = HILL_FLOOR_WIDTH + 15; + gBackupMapLayout.height = HILL_FLOOR_HEIGHT + 14; dst = mapArg + 224; // First 5 rows of the map (Entrance / Exit) are always the same - for (i = 0; i < 5; i++) + for (y = 0; y < HILL_FLOOR_HEIGHT_MARGIN; y++) { - for (j = 0; j < 16; j++) - dst[j] = src[j]; + for (x = 0; x < HILL_FLOOR_WIDTH; x++) + dst[x] = src[x]; dst += 31; src += 16; } // Load the 16x16 floor-specific layout - for (i = 0; i < 16; i++) + for (y = 0; y < HILL_FLOOR_HEIGHT_MAIN; y++) { - for (j = 0; j < 16; j++) - dst[j] = GetMetatileForFloor(mapId, j, i, 16); + for (x = 0; x < HILL_FLOOR_WIDTH; x++) + dst[x] = GetMetatileForFloor(mapId, x, y, HILL_FLOOR_WIDTH); dst += 31; } @@ -812,8 +813,8 @@ u16 LocalIdToHillTrainerId(u8 localId) bool8 GetHillTrainerFlag(u8 objectEventId) { - u32 floorId = GetFloorId() * 2; - u8 bitId = gObjectEvents[objectEventId].localId - 1 + floorId; + u32 trainerIndexStart = GetFloorId() * HILL_TRAINERS_PER_FLOOR; + u8 bitId = gObjectEvents[objectEventId].localId - 1 + trainerIndexStart; return gSaveBlock2Ptr->frontier.trainerFlags & gBitTable[bitId]; } @@ -821,24 +822,24 @@ bool8 GetHillTrainerFlag(u8 objectEventId) void SetHillTrainerFlag(void) { u8 i; - u8 floorId = GetFloorId() * 2; + u8 trainerIndexStart = GetFloorId() * HILL_TRAINERS_PER_FLOOR; - for (i = 0; i < 2; i++) + for (i = 0; i < HILL_TRAINERS_PER_FLOOR; i++) { if (gSaveBlock2Ptr->frontier.trainerIds[i] == gTrainerBattleOpponent_A) { - gSaveBlock2Ptr->frontier.trainerFlags |= gBitTable[floorId + i]; + gSaveBlock2Ptr->frontier.trainerFlags |= gBitTable[trainerIndexStart + i]; break; } } if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) { - for (i = 0; i < 2; i++) + for (i = 0; i < HILL_TRAINERS_PER_FLOOR; i++) { if (gSaveBlock2Ptr->frontier.trainerIds[i] == gTrainerBattleOpponent_B) { - gSaveBlock2Ptr->frontier.trainerFlags |= gBitTable[floorId + i]; + gSaveBlock2Ptr->frontier.trainerFlags |= gBitTable[trainerIndexStart + i]; break; } } @@ -861,14 +862,14 @@ static void CreateNPCTrainerHillParty(u16 trainerId, u8 firstMonId) u8 trId, level; s32 i, floorId, partySlot; - if (trainerId == 0 || trainerId > 2) + if (trainerId == 0 || trainerId > HILL_TRAINERS_PER_FLOOR) return; trId = trainerId - 1; SetUpDataStruct(); level = GetHighestLevelInPlayerParty(); floorId = GetFloorId(); - for (i = firstMonId, partySlot = 0; i < firstMonId + 3; i++, partySlot++) + for (i = firstMonId, partySlot = 0; i < firstMonId + PARTY_SIZE / 2; i++, partySlot++) { u8 id = sTrainerPartySlots[trId][partySlot]; struct Pokemon *mon = &gEnemyParty[i]; @@ -890,7 +891,7 @@ void FillHillTrainersParties(void) { ZeroEnemyPartyMons(); CreateNPCTrainerHillParty(gTrainerBattleOpponent_A, 0); - CreateNPCTrainerHillParty(gTrainerBattleOpponent_B, 3); + CreateNPCTrainerHillParty(gTrainerBattleOpponent_B, PARTY_SIZE / 2); } // This function is unused, but my best guess is @@ -935,7 +936,7 @@ u8 GetNumFloorsInTrainerHillChallenge(void) u8 floors; SetUpDataStruct(); - floors = sHillData->tag.numFloors; + floors = sHillData->challenge.numFloors; FreeDataStruct(); return floors; @@ -989,16 +990,20 @@ static void GetChallengeWon(void) gSpecialVar_Result = TRUE; } -static void TrainerHillSetTag(void) +static void TrainerHillSetMode(void) { - gSaveBlock1Ptr->trainerHill.tag = gSpecialVar_0x8005; + gSaveBlock1Ptr->trainerHill.mode = gSpecialVar_0x8005; gSaveBlock1Ptr->trainerHill.bestTime = gSaveBlock1Ptr->trainerHillTimes[gSpecialVar_0x8005]; } -static u8 GetPrizeListId(bool8 maxTrainers) +// Determines which prize list to use from the set of prize lists. +static u8 GetPrizeListId(bool8 allowTMs) { u8 prizeListId, i, modBy; + // The initial selection depends on the trainer numbers for the completed challenge. + // These don't change with the available challenge modes, so Normal/Unique will always + // have a prizeListId of 8, and Variety/Expert will have a prizeListId of 24. prizeListId = 0; for (i = 0; i < NUM_TRAINER_HILL_FLOORS; i++) { @@ -1006,8 +1011,10 @@ static u8 GetPrizeListId(bool8 maxTrainers) prizeListId ^= sHillData->floors[i].trainerNum2 & 0x1F; } - // Not possible to win TMs with fewer than 8 trainers - if (maxTrainers) + // In practice, the conditional below is always true. + // The 2nd half of the lists in both sets of lists all have a TM as the "grand prize", while the 1st half do not, + // so taking the mod of the (total / 2) ensures that a prize list without a TM will be used. + if (allowTMs) modBy = NUM_TRAINER_HILL_PRIZE_LISTS; else modBy = NUM_TRAINER_HILL_PRIZE_LISTS / 2; @@ -1020,38 +1027,64 @@ static u16 GetPrizeItemId(void) { u8 i; const u16 *prizeList; - s32 var = 0, prizeListSetId, minutes, id; + s32 trainerNumSum = 0, prizeListSetId, minutes, id; + // First determine which set of prize lists to use. The sets of lists only differ in + // what TMs they can offer as the "grand prize" for a time under 12 minutes. + // Which set of lists gets used is based on the sum of all the trainer numbers for that + // challenge. These don't change with the available challenge modes, so Normal will always + // have a prizeListSetId of 0, and Unique/Variety/Expert will have a prizeListSetId of 1. for (i = 0; i < NUM_TRAINER_HILL_FLOORS; i++) { - var += sHillData->floors[i].trainerNum1; - var += sHillData->floors[i].trainerNum2; + trainerNumSum += sHillData->floors[i].trainerNum1; + trainerNumSum += sHillData->floors[i].trainerNum2; } + prizeListSetId = trainerNumSum / 256; + prizeListSetId %= (int)ARRAY_COUNT(sPrizeListSets); - prizeListSetId = var / 256; - prizeListSetId %= 2; - if (FlagGet(FLAG_SYS_GAME_CLEAR) && sHillData->tag.numTrainers == NUM_TRAINER_HILL_TRAINERS) + // Now get which prize list to use from the set. See GetPrizeListId for details. + // The below conditional will always be true, because a Trainer Hill challenge can't be entered + // until the player has entered the Hall of Fame (FLAG_SYS_GAME_CLEAR is set) and because all + // of the available challenge modes have the full 8 trainers (NUM_TRAINER_HILL_TRAINERS). + if (FlagGet(FLAG_SYS_GAME_CLEAR) && sHillData->challenge.numTrainers == NUM_TRAINER_HILL_TRAINERS) i = GetPrizeListId(TRUE); else i = GetPrizeListId(FALSE); - if (gSaveBlock1Ptr->trainerHill.tag == HILL_TAG_EXPERT) + // 1 is added to Expert mode's prize list selection because otherwise it has the same prizes as Variety + if (gSaveBlock1Ptr->trainerHill.mode == HILL_MODE_EXPERT) i = (i + 1) % NUM_TRAINER_HILL_PRIZE_LISTS; + // After the above (non-random) calculations, the following are the possible prize list selections: + // sPrizeListSets[0][8] (Normal) + // sPrizeListSets[1][4] (Variety) + // sPrizeListSets[1][8] (Unique) + // sPrizeListSets[1][5] (Expert) prizeList = sPrizeListSets[prizeListSetId][i]; + + // Which prize is given from the list depends on the time scored. + // The prize for any time after 12 minutes is the same in every list. + // The prizes for a time under 12 minutes are: + // - ITEM_TM11_SUNNY_DAY (Normal) + // - ITEM_ELIXIR (Variety) + // - ITEM_TM19_GIGA_DRAIN (Unique) + // - ITEM_TM31_BRICK_BREAK (Expert) + // As an additional note, if players were allowed to enter a Trainer Hill challenge before + // entering the Hall of Fame, there would be 1 additional prize possibility (ITEM_MAX_ETHER) + // as Normal / Unique modes would use sPrizeListSets[0][3] / sPrizeListSets[1][3] respectively. minutes = (signed)(gSaveBlock1Ptr->trainerHill.timer) / (60 * 60); if (minutes < 12) - id = 0; + id = 0; // Depends on list else if (minutes < 13) - id = 1; + id = 1; // ITEM_ETHER else if (minutes < 14) - id = 2; + id = 2; // ITEM_MAX_POTION else if (minutes < 16) - id = 3; + id = 3; // ITEM_REVIVE else if (minutes < 18) - id = 4; + id = 4; // ITEM_FLUFFY_TAIL else - id = 5; + id = 5; // ITEM_GREAT_BALL return prizeList[id]; }