diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/battle_bg.c | 153 | ||||
-rw-r--r-- | src/battle_interface.c | 21 | ||||
-rw-r--r-- | src/battle_records.c | 6 | ||||
-rw-r--r-- | src/battle_script_commands.c | 11 | ||||
-rw-r--r-- | src/data/graphics/battle_terrain.h | 30 | ||||
-rw-r--r-- | src/data/graphics/battle_terrain_unused.h | 32 | ||||
-rw-r--r-- | src/diploma.c | 12 | ||||
-rw-r--r-- | src/evolution_scene.c | 4 | ||||
-rw-r--r-- | src/fame_checker.c | 351 | ||||
-rw-r--r-- | src/field_effect.c | 12 | ||||
-rw-r--r-- | src/graphics.c | 54 | ||||
-rw-r--r-- | src/hall_of_fame.c | 4 | ||||
-rw-r--r-- | src/help_system.c | 2 | ||||
-rw-r--r-- | src/item_menu.c | 2 | ||||
-rw-r--r-- | src/item_pc.c | 2 | ||||
-rw-r--r-- | src/librfu_intr.c | 14 | ||||
-rw-r--r-- | src/librfu_rfu.c | 3 | ||||
-rw-r--r-- | src/librfu_sio32id.c | 28 | ||||
-rw-r--r-- | src/list_menu.c | 167 | ||||
-rw-r--r-- | src/move_descriptions.c | 714 | ||||
-rw-r--r-- | src/pokedex.c | 2 | ||||
-rw-r--r-- | src/pokedex_area_markers.c | 6 | ||||
-rw-r--r-- | src/pokedex_screen.c | 2908 | ||||
-rw-r--r-- | src/task.c | 24 | ||||
-rw-r--r-- | src/trainer_tower.c | 140 | ||||
-rw-r--r-- | src/trainer_tower_sets.c | 8997 | ||||
-rw-r--r-- | src/water.c | 2 |
27 files changed, 11839 insertions, 1862 deletions
diff --git a/src/battle_bg.c b/src/battle_bg.c index 32d3e017a..c30f10643 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -343,64 +343,73 @@ static const struct WindowTemplate gUnknown_8248330[] = { }, DUMMY_WIN_TEMPLATE }; -static const u32 sBattleTerrainPalette_Grass[] = INCBIN_U32("graphics/battle/unk_8248400.gbapal.lz"); -static const u32 sBattleTerrainTiles_Grass[] = INCBIN_U32("graphics/battle/unk_824844C.4bpp.lz"); -static const u32 sBattleTerrainTilemap_Grass[] = INCBIN_U32("graphics/battle/unk_82489A8.bin.lz"); -static const u32 sBattleTerrainAnimTiles_Grass[] = INCBIN_U32("graphics/battle/unk_8248C68.4bpp.lz"); -static const u32 sBattleTerrainAnimTilemap_Grass[] = INCBIN_U32("graphics/battle/unk_8248F58.bin.lz"); -static const u32 sBattleTerrainPalette_LongGrass[] = INCBIN_U32("graphics/battle/unk_8249074.gbapal.lz"); -static const u32 sBattleTerrainTiles_LongGrass[] = INCBIN_U32("graphics/battle/unk_82490C4.4bpp.lz"); -static const u32 sBattleTerrainTilemap_LongGrass[] = INCBIN_U32("graphics/battle/unk_8249620.bin.lz"); -static const u32 sBattleTerrainAnimTiles_LongGrass[] = INCBIN_U32("graphics/battle/unk_82498DC.4bpp.lz"); -static const u32 sBattleTerrainAnimTilemap_LongGrass[] = INCBIN_U32("graphics/battle/unk_8249E10.bin.lz"); -static const u32 sBattleTerrainPalette_Sand[] = INCBIN_U32("graphics/battle/unk_8249F98.gbapal.lz"); -static const u32 sBattleTerrainTiles_Sand[] = INCBIN_U32("graphics/battle/unk_8249FE4.4bpp.lz"); -static const u32 sBattleTerrainTilemap_Sand[] = INCBIN_U32("graphics/battle/unk_824A37C.bin.lz"); -static const u32 sBattleTerrainAnimTiles_Sand[] = INCBIN_U32("graphics/battle/unk_824A618.4bpp.lz"); -static const u32 sBattleTerrainAnimTilemap_Sand[] = INCBIN_U32("graphics/battle/unk_824A844.bin.lz"); -static const u32 sBattleTerrainPalette_Underwater[] = INCBIN_U32("graphics/battle/unk_824A940.gbapal.lz"); -static const u32 sBattleTerrainTiles_Underwater[] = INCBIN_U32("graphics/battle/unk_824A990.4bpp.lz"); -static const u32 sBattleTerrainTilemap_Underwater[] = INCBIN_U32("graphics/battle/unk_824ACD0.bin.lz"); -static const u32 sBattleTerrainAnimTiles_Underwater[] = INCBIN_U32("graphics/battle/unk_824AF70.4bpp.lz"); -static const u32 sBattleTerrainAnimTilemap_Underwater[] = INCBIN_U32("graphics/battle/unk_824B0DC.bin.lz"); -static const u32 sBattleTerrainPalette_Water[] = INCBIN_U32("graphics/battle/unk_824B19C.gbapal.lz"); -static const u32 sBattleTerrainTiles_Water[] = INCBIN_U32("graphics/battle/unk_824B1EC.4bpp.lz"); -static const u32 sBattleTerrainTilemap_Water[] = INCBIN_U32("graphics/battle/unk_824B608.bin.lz"); -static const u32 sBattleTerrainAnimTiles_Water[] = INCBIN_U32("graphics/battle/unk_824B8A8.4bpp.lz"); -static const u32 sBattleTerrainAnimTilemap_Water[] = INCBIN_U32("graphics/battle/unk_824BBE0.bin.lz"); -static const u32 sBattleTerrainPalette_Pond[] = INCBIN_U32("graphics/battle/unk_824BCE0.gbapal.lz"); -static const u32 sBattleTerrainTiles_Pond[] = INCBIN_U32("graphics/battle/unk_824BD38.4bpp.lz"); -static const u32 sBattleTerrainTilemap_Pond[] = INCBIN_U32("graphics/battle/unk_824C07C.bin.lz"); -static const u32 sBattleTerrainAnimTiles_Pond[] = INCBIN_U32("graphics/battle/unk_824C314.4bpp.lz"); -static const u32 sBattleTerrainAnimTilemap_Pond[] = INCBIN_U32("graphics/battle/unk_824C520.bin.lz"); -static const u32 sBattleTerrainPalette_Mountain[] = INCBIN_U32("graphics/battle/unk_824C5D8.gbapal.lz"); -static const u32 sBattleTerrainTiles_Mountain[] = INCBIN_U32("graphics/battle/unk_824C624.4bpp.lz"); -static const u32 sBattleTerrainTilemap_Mountain[] = INCBIN_U32("graphics/battle/unk_824C958.bin.lz"); -static const u32 sBattleTerrainAnimTiles_Mountain[] = INCBIN_U32("graphics/battle/unk_824CBF8.4bpp.lz"); -static const u32 sBattleTerrainAnimTilemap_Mountain[] = INCBIN_U32("graphics/battle/unk_824CEC8.bin.lz"); -static const u32 sBattleTerrainPalette_Cave[] = INCBIN_U32("graphics/battle/unk_824CF98.gbapal.lz"); -static const u32 sBattleTerrainTiles_Cave[] = INCBIN_U32("graphics/battle/unk_824CFEC.4bpp.lz"); -static const u32 sBattleTerrainTilemap_Cave[] = INCBIN_U32("graphics/battle/unk_824D418.bin.lz"); -static const u32 sBattleTerrainAnimTiles_Cave[] = INCBIN_U32("graphics/battle/unk_824D6B8.4bpp.lz"); -static const u32 sBattleTerrainAnimTilemap_Cave[] = INCBIN_U32("graphics/battle/unk_824DC98.bin.lz"); -static const u32 sBattleTerrainPalette_Building[] = INCBIN_U32("graphics/battle/unk_824DDF0.gbapal.lz"); -static const u32 sBattleTerrainTiles_Building[] = INCBIN_U32("graphics/battle/unk_824DE34.4bpp.lz"); -static const u32 sBattleTerrainTilemap_Building[] = INCBIN_U32("graphics/battle/unk_824E16C.bin.lz"); -static const u32 sBattleTerrainAnimTiles_Building[] = INCBIN_U32("graphics/battle/unk_824E410.4bpp.lz"); -static const u32 sBattleTerrainAnimTilemap_Building[] = INCBIN_U32("graphics/battle/unk_824E490.bin.lz"); -static const u32 sBattleTerrainPalette_Link[] = INCBIN_U32("graphics/battle/unk_824E528.gbapal.lz"); -static const u32 sBattleTerrainPalette_Gym[] = INCBIN_U32("graphics/battle/unk_824E56C.gbapal.lz"); -static const u32 sBattleTerrainPalette_Leader[] = INCBIN_U32("graphics/battle/unk_824E5B8.gbapal.lz"); -static const u32 sBattleTerrainPalette_Indoor2[] = INCBIN_U32("graphics/battle/unk_824E604.gbapal.lz"); -static const u32 sBattleTerrainPalette_Indoor1[] = INCBIN_U32("graphics/battle/unk_824E650.gbapal.lz"); -static const u32 sBattleTerrainPalette_Lorelei[] = INCBIN_U32("graphics/battle/unk_824E6A4.gbapal.lz"); -static const u32 sBattleTerrainPalette_Bruno[] = INCBIN_U32("graphics/battle/unk_824E6F0.gbapal.lz"); -static const u32 sBattleTerrainPalette_Agatha[] = INCBIN_U32("graphics/battle/unk_824E740.gbapal.lz"); -static const u32 sBattleTerrainPalette_Lance[] = INCBIN_U32("graphics/battle/unk_824E78C.gbapal.lz"); -static const u32 sBattleTerrainPalette_Champion[] = INCBIN_U32("graphics/battle/unk_824E7DC.gbapal.lz"); -static const u32 sBattleTerrainPalette_Plain[] = INCBIN_U32("graphics/battle/unk_824E81C.gbapal.lz"); -static const u32 sBattleTerrainTiles_Indoor2[] = INCBIN_U32("graphics/battle/unk_824E858.4bpp.lz"); -static const u32 sBattleTerrainTilemap_Indoor2[] = INCBIN_U32("graphics/battle/unk_824EB90.bin.lz"); +static const u32 sBattleTerrainPalette_Grass[] = INCBIN_U32("graphics/battle_terrain/grass/terrain.gbapal.lz"); +static const u32 sBattleTerrainTiles_Grass[] = INCBIN_U32("graphics/battle_terrain/grass/terrain.4bpp.lz"); +static const u32 sBattleTerrainTilemap_Grass[] = INCBIN_U32("graphics/battle_terrain/grass/terrain.bin.lz"); +static const u32 sBattleTerrainAnimTiles_Grass[] = INCBIN_U32("graphics/battle_terrain/grass/anim.4bpp.lz"); +static const u32 sBattleTerrainAnimTilemap_Grass[] = INCBIN_U32("graphics/battle_terrain/grass/anim.bin.lz"); + +static const u32 sBattleTerrainPalette_LongGrass[] = INCBIN_U32("graphics/battle_terrain/longgrass/terrain.gbapal.lz"); +static const u32 sBattleTerrainTiles_LongGrass[] = INCBIN_U32("graphics/battle_terrain/longgrass/terrain.4bpp.lz"); +static const u32 sBattleTerrainTilemap_LongGrass[] = INCBIN_U32("graphics/battle_terrain/longgrass/terrain.bin.lz"); +static const u32 sBattleTerrainAnimTiles_LongGrass[] = INCBIN_U32("graphics/battle_terrain/longgrass/anim.4bpp.lz"); +static const u32 sBattleTerrainAnimTilemap_LongGrass[] = INCBIN_U32("graphics/battle_terrain/longgrass/anim.bin.lz"); + +static const u32 sBattleTerrainPalette_Sand[] = INCBIN_U32("graphics/battle_terrain/sand/terrain.gbapal.lz"); +static const u32 sBattleTerrainTiles_Sand[] = INCBIN_U32("graphics/battle_terrain/sand/terrain.4bpp.lz"); +static const u32 sBattleTerrainTilemap_Sand[] = INCBIN_U32("graphics/battle_terrain/sand/terrain.bin.lz"); +static const u32 sBattleTerrainAnimTiles_Sand[] = INCBIN_U32("graphics/battle_terrain/sand/anim.4bpp.lz"); +static const u32 sBattleTerrainAnimTilemap_Sand[] = INCBIN_U32("graphics/battle_terrain/sand/anim.bin.lz"); + +static const u32 sBattleTerrainPalette_Underwater[] = INCBIN_U32("graphics/battle_terrain/underwater/terrain.gbapal.lz"); +static const u32 sBattleTerrainTiles_Underwater[] = INCBIN_U32("graphics/battle_terrain/underwater/terrain.4bpp.lz"); +static const u32 sBattleTerrainTilemap_Underwater[] = INCBIN_U32("graphics/battle_terrain/underwater/terrain.bin.lz"); +static const u32 sBattleTerrainAnimTiles_Underwater[] = INCBIN_U32("graphics/battle_terrain/underwater/anim.4bpp.lz"); +static const u32 sBattleTerrainAnimTilemap_Underwater[] = INCBIN_U32("graphics/battle_terrain/underwater/anim.bin.lz"); + +static const u32 sBattleTerrainPalette_Water[] = INCBIN_U32("graphics/battle_terrain/water/terrain.gbapal.lz"); +static const u32 sBattleTerrainTiles_Water[] = INCBIN_U32("graphics/battle_terrain/water/terrain.4bpp.lz"); +static const u32 sBattleTerrainTilemap_Water[] = INCBIN_U32("graphics/battle_terrain/water/terrain.bin.lz"); +static const u32 sBattleTerrainAnimTiles_Water[] = INCBIN_U32("graphics/battle_terrain/water/anim.4bpp.lz"); +static const u32 sBattleTerrainAnimTilemap_Water[] = INCBIN_U32("graphics/battle_terrain/water/anim.bin.lz"); + +static const u32 sBattleTerrainPalette_Pond[] = INCBIN_U32("graphics/battle_terrain/pond/terrain.gbapal.lz"); +static const u32 sBattleTerrainTiles_Pond[] = INCBIN_U32("graphics/battle_terrain/pond/terrain.4bpp.lz"); +static const u32 sBattleTerrainTilemap_Pond[] = INCBIN_U32("graphics/battle_terrain/pond/terrain.bin.lz"); +static const u32 sBattleTerrainAnimTiles_Pond[] = INCBIN_U32("graphics/battle_terrain/pond/anim.4bpp.lz"); +static const u32 sBattleTerrainAnimTilemap_Pond[] = INCBIN_U32("graphics/battle_terrain/pond/anim.bin.lz"); + +static const u32 sBattleTerrainPalette_Mountain[] = INCBIN_U32("graphics/battle_terrain/mountain/terrain.gbapal.lz"); +static const u32 sBattleTerrainTiles_Mountain[] = INCBIN_U32("graphics/battle_terrain/mountain/terrain.4bpp.lz"); +static const u32 sBattleTerrainTilemap_Mountain[] = INCBIN_U32("graphics/battle_terrain/mountain/terrain.bin.lz"); +static const u32 sBattleTerrainAnimTiles_Mountain[] = INCBIN_U32("graphics/battle_terrain/mountain/anim.4bpp.lz"); +static const u32 sBattleTerrainAnimTilemap_Mountain[] = INCBIN_U32("graphics/battle_terrain/mountain/anim.bin.lz"); + +static const u32 sBattleTerrainPalette_Cave[] = INCBIN_U32("graphics/battle_terrain/cave/terrain.gbapal.lz"); +static const u32 sBattleTerrainTiles_Cave[] = INCBIN_U32("graphics/battle_terrain/cave/terrain.4bpp.lz"); +static const u32 sBattleTerrainTilemap_Cave[] = INCBIN_U32("graphics/battle_terrain/cave/terrain.bin.lz"); +static const u32 sBattleTerrainAnimTiles_Cave[] = INCBIN_U32("graphics/battle_terrain/cave/anim.4bpp.lz"); +static const u32 sBattleTerrainAnimTilemap_Cave[] = INCBIN_U32("graphics/battle_terrain/cave/anim.bin.lz"); + +static const u32 sBattleTerrainPalette_Building[] = INCBIN_U32("graphics/battle_terrain/building/terrain.gbapal.lz"); +static const u32 sBattleTerrainTiles_Building[] = INCBIN_U32("graphics/battle_terrain/building/terrain.4bpp.lz"); +static const u32 sBattleTerrainTilemap_Building[] = INCBIN_U32("graphics/battle_terrain/building/terrain.bin.lz"); +static const u32 sBattleTerrainAnimTiles_Building[] = INCBIN_U32("graphics/battle_terrain/building/anim.4bpp.lz"); +static const u32 sBattleTerrainAnimTilemap_Building[] = INCBIN_U32("graphics/battle_terrain/building/anim.bin.lz"); + +static const u32 sBattleTerrainPalette_Link[] = INCBIN_U32("graphics/battle_terrain/indoor/link.gbapal.lz"); +static const u32 sBattleTerrainPalette_Gym[] = INCBIN_U32("graphics/battle_terrain/indoor/gym.gbapal.lz"); +static const u32 sBattleTerrainPalette_Leader[] = INCBIN_U32("graphics/battle_terrain/indoor/leader.gbapal.lz"); +static const u32 sBattleTerrainPalette_Indoor2[] = INCBIN_U32("graphics/battle_terrain/indoor/2.gbapal.lz"); +static const u32 sBattleTerrainPalette_Indoor1[] = INCBIN_U32("graphics/battle_terrain/indoor/1.gbapal.lz"); +static const u32 sBattleTerrainPalette_Lorelei[] = INCBIN_U32("graphics/battle_terrain/indoor/lorelei.gbapal.lz"); +static const u32 sBattleTerrainPalette_Bruno[] = INCBIN_U32("graphics/battle_terrain/indoor/bruno.gbapal.lz"); +static const u32 sBattleTerrainPalette_Agatha[] = INCBIN_U32("graphics/battle_terrain/indoor/agatha.gbapal.lz"); +static const u32 sBattleTerrainPalette_Lance[] = INCBIN_U32("graphics/battle_terrain/indoor/lance.gbapal.lz"); +static const u32 sBattleTerrainPalette_Champion[] = INCBIN_U32("graphics/battle_terrain/indoor/champion.gbapal.lz"); +static const u32 sBattleTerrainPalette_Plain[] = INCBIN_U32("graphics/battle_terrain/indoor/plain.gbapal.lz"); +static const u32 sBattleTerrainTiles_Indoor[] = INCBIN_U32("graphics/battle_terrain/indoor/terrain.4bpp.lz"); +static const u32 sBattleTerrainTilemap_Indoor[] = INCBIN_U32("graphics/battle_terrain/indoor/terrain.bin.lz"); static const struct BattleBackground sBattleTerrainTable[] = { [BATTLE_TERRAIN_GRASS] = @@ -509,56 +518,56 @@ static const struct BattleBackground sBattleTerrainTable[] = { }, [BATTLE_TERRAIN_INDOOR_2] = { - .tileset = sBattleTerrainTiles_Indoor2, - .tilemap = sBattleTerrainTilemap_Indoor2, + .tileset = sBattleTerrainTiles_Indoor, + .tilemap = sBattleTerrainTilemap_Indoor, .entryTileset = sBattleTerrainAnimTiles_Building, .entryTilemap = sBattleTerrainAnimTilemap_Building, .palette = sBattleTerrainPalette_Indoor2 }, [BATTLE_TERRAIN_INDOOR_1] = { - .tileset = sBattleTerrainTiles_Indoor2, - .tilemap = sBattleTerrainTilemap_Indoor2, + .tileset = sBattleTerrainTiles_Indoor, + .tilemap = sBattleTerrainTilemap_Indoor, .entryTileset = sBattleTerrainAnimTiles_Building, .entryTilemap = sBattleTerrainAnimTilemap_Building, .palette = sBattleTerrainPalette_Indoor1 }, [BATTLE_TERRAIN_LORELEI] = { - .tileset = sBattleTerrainTiles_Indoor2, - .tilemap = sBattleTerrainTilemap_Indoor2, + .tileset = sBattleTerrainTiles_Indoor, + .tilemap = sBattleTerrainTilemap_Indoor, .entryTileset = sBattleTerrainAnimTiles_Building, .entryTilemap = sBattleTerrainAnimTilemap_Building, .palette = sBattleTerrainPalette_Lorelei }, [BATTLE_TERRAIN_BRUNO] = { - .tileset = sBattleTerrainTiles_Indoor2, - .tilemap = sBattleTerrainTilemap_Indoor2, + .tileset = sBattleTerrainTiles_Indoor, + .tilemap = sBattleTerrainTilemap_Indoor, .entryTileset = sBattleTerrainAnimTiles_Building, .entryTilemap = sBattleTerrainAnimTilemap_Building, .palette = sBattleTerrainPalette_Bruno }, [BATTLE_TERRAIN_AGATHA] = { - .tileset = sBattleTerrainTiles_Indoor2, - .tilemap = sBattleTerrainTilemap_Indoor2, + .tileset = sBattleTerrainTiles_Indoor, + .tilemap = sBattleTerrainTilemap_Indoor, .entryTileset = sBattleTerrainAnimTiles_Building, .entryTilemap = sBattleTerrainAnimTilemap_Building, .palette = sBattleTerrainPalette_Agatha }, [BATTLE_TERRAIN_LANCE] = { - .tileset = sBattleTerrainTiles_Indoor2, - .tilemap = sBattleTerrainTilemap_Indoor2, + .tileset = sBattleTerrainTiles_Indoor, + .tilemap = sBattleTerrainTilemap_Indoor, .entryTileset = sBattleTerrainAnimTiles_Building, .entryTilemap = sBattleTerrainAnimTilemap_Building, .palette = sBattleTerrainPalette_Lance }, [BATTLE_TERRAIN_CHAMPION] = { - .tileset = sBattleTerrainTiles_Indoor2, - .tilemap = sBattleTerrainTilemap_Indoor2, + .tileset = sBattleTerrainTiles_Indoor, + .tilemap = sBattleTerrainTilemap_Indoor, .entryTileset = sBattleTerrainAnimTiles_Building, .entryTilemap = sBattleTerrainAnimTilemap_Building, .palette = sBattleTerrainPalette_Champion diff --git a/src/battle_interface.c b/src/battle_interface.c index 3744c34eb..1df525967 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -342,7 +342,7 @@ static const struct SubspriteTable gUnknown_8260404[] = { {NELEMS(gUnknown_82603E4), gUnknown_82603E4} }; -static const u16 gUnknown_26040C[] = INCBIN_U16("graphics/battle_interface/unk_826404C.4bpp"); +static const u16 sBattleInterface_Unused[] = INCBIN_U16("graphics/battle_interface/unused.4bpp"); static const struct CompressedSpriteSheet sStatusSummaryBarSpriteSheets[] = { {gFile_graphics_battle_interface_ball_status_bar_sheet, 0x0200, 55052}, @@ -360,8 +360,8 @@ static const struct SpritePalette sStatusSummaryBallsSpritePals[] = { }; static const struct SpriteSheet sStatusSummaryBallsSpriteSheets[] = { - {gUnknown_8D12404, 0x0080, 55060}, - {gUnknown_8D12404, 0x0080, 55061} + {gBattleInterface_SummaryBallDisplayGfx, 0x0080, 55060}, + {gBattleInterface_SummaryBallDisplayGfx, 0x0080, 55061} }; static const struct OamData gUnknown_82604AC = { @@ -736,18 +736,11 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl) u32 windowId, spriteTileNum; u8 *windowTileData; u8 text[16] = _("{LV_2}"); - u32 xPos, var1; - void *objVram; + u32 xPos; + u8 *objVram; - xPos = (u32) ConvertIntToDecimalStringN(text + 2, lvl, STR_CONV_MODE_LEFT_ALIGN, 3); - // Alright, that part was unmatchable. It's basically doing: - // xPos = 5 * (3 - (u32)(&text[2])); - xPos--; - xPos--; - xPos -= ((u32)(text)); - var1 = (3 - xPos); - xPos = 4 * var1; - xPos += var1; + objVram = ConvertIntToDecimalStringN(text + 2, lvl, STR_CONV_MODE_LEFT_ALIGN, 3); + xPos = 5 * (3 - (objVram - (text + 2))); windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, xPos, 3, &windowId); spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP; diff --git a/src/battle_records.c b/src/battle_records.c index a32276199..017c1078c 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -25,7 +25,7 @@ static void Task_WaitFadeIn(u8 taskId); static void Task_WaitButton(u8 taskId); static void Task_FadeOut(u8 taskId); static void Task_DestroyAndReturnToField(u8 taskId); -static void ClearWindowCommitAndRemove(u8 winddowId); +static void ClearWindowCommitAndRemove(u8 windowId); static void ResetGpu(void); static void StopAllRunningTasks(void); static void EnableDisplay(void); @@ -35,8 +35,8 @@ static void CommitWindow(u8 windowId); static void LoadFrameGfxOnBg(u8 bgId); static const u16 sTiles[] = INCBIN_U16("graphics/battle_records/bg_tiles.4bpp"); -static const u16 sPalette[] = INCBIN_U16("graphics/battle_records/palette.gbapal"); -static const u16 sTilemap[] = INCBIN_U16("graphics/battle_records/tilemap.bin"); +static const u16 sPalette[] = INCBIN_U16("graphics/battle_records/bg_tiles.gbapal"); +static const u16 sTilemap[] = INCBIN_U16("graphics/battle_records/bg_tiles.bin"); static const struct WindowTemplate sWindowTemplates[] = { { diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 54452e3c1..ee9251017 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -703,8 +703,9 @@ static const struct WindowTemplate sUnusedWinTemplate = .baseBlock = 0x3F, }; -static const u16 gUnknown_82506D0[] = INCBIN_U16("graphics/battle_interface/unk_battlebox.gbapal"); -static const u32 gUnknown_82506F0[] = INCBIN_U32("graphics/battle_interface/unk_battlebox.4bpp.lz"); +// not used +static const u16 sUnknownBattleboxPal[] = INCBIN_U16("graphics/battle_interface/unk_battlebox.gbapal"); +static const u32 sUnknownBattleboxGfx[] = INCBIN_U32("graphics/battle_interface/unk_battlebox.4bpp.lz"); // not used static const u8 sRubyLevelUpStatBoxStats[] = @@ -5593,8 +5594,8 @@ static void sub_8026480(void) { gBattle_BG2_Y = 0; gBattle_BG2_X = 0x1A0; - LoadPalette(gUnknown_82506D0, 0x60, 0x20); - CopyToWindowPixelBuffer(13, gUnknown_82506F0, 0, 0); + LoadPalette(sUnknownBattleboxPal, 0x60, 0x20); + CopyToWindowPixelBuffer(13, sUnknownBattleboxGfx, 0, 0); PutWindowTilemap(13); CopyWindowToVram(13, COPYWIN_BOTH); PutMonIconOnLvlUpBox(); @@ -9179,7 +9180,7 @@ static void atkF2_displaydexinfo(void) if (!gPaletteFade.active) { FreeAllWindowBuffers(); - gBattleCommunication[TASK_ID] = sub_8106B60(species); + gBattleCommunication[TASK_ID] = DexScreen_RegisterMonToPokedex(species); ++gBattleCommunication[0]; } break; diff --git a/src/data/graphics/battle_terrain.h b/src/data/graphics/battle_terrain.h deleted file mode 100644 index f91c2d0d9..000000000 --- a/src/data/graphics/battle_terrain.h +++ /dev/null @@ -1,30 +0,0 @@ - -const u32 gFile_graphics_battle_terrain_plain_palette_palette[] = INCBIN_U32("graphics/battle_terrain/plain/palette.gbapal.lz"); - -const u32 gFile_graphics_battle_terrain_building_tiles_sheet[] = INCBIN_U32("graphics/battle_terrain/building/tiles.4bpp.lz"); - -const u32 gFile_graphics_battle_terrain_stadium_battle_frontier_palette[] = INCBIN_U32("graphics/battle_terrain/stadium/battle_frontier.gbapal.lz"); - -const u32 gFile_graphics_battle_terrain_building_map_tilemap[] = INCBIN_U32("graphics/battle_terrain/building/map.bin.lz"); - -const u32 gFile_graphics_battle_terrain_stadium_tiles_sheet[] = INCBIN_U32("graphics/battle_terrain/stadium/tiles.4bpp.lz"); -const u32 gFile_graphics_battle_terrain_stadium_map_tilemap[] = INCBIN_U32("graphics/battle_terrain/stadium/map.bin.lz"); - -const u32 gFile_graphics_battle_terrain_building_palette_palette[] = INCBIN_U32("graphics/battle_terrain/building/palette.gbapal.lz"); - -const u32 gFile_graphics_battle_terrain_water_kyogre_palette[] = INCBIN_U32("graphics/battle_terrain/water/kyogre.gbapal.lz"); -const u32 gFile_graphics_battle_terrain_cave_groudon_palette[] = INCBIN_U32("graphics/battle_terrain/cave/groudon.gbapal.lz"); - -const u32 gFile_graphics_battle_terrain_building_palette2_palette[] = INCBIN_U32("graphics/battle_terrain/building/palette2.gbapal.lz"); -const u32 gFile_graphics_battle_terrain_building_palette3_palette[] = INCBIN_U32("graphics/battle_terrain/building/palette3.gbapal.lz"); - -const u32 gFile_graphics_battle_terrain_stadium_palette1_palette[] = INCBIN_U32("graphics/battle_terrain/stadium/palette1.gbapal.lz"); -const u32 gFile_graphics_battle_terrain_stadium_palette2_palette[] = INCBIN_U32("graphics/battle_terrain/stadium/palette2.gbapal.lz"); -const u32 gFile_graphics_battle_terrain_stadium_palette3_palette[] = INCBIN_U32("graphics/battle_terrain/stadium/palette3.gbapal.lz"); -const u32 gFile_graphics_battle_terrain_stadium_palette4_palette[] = INCBIN_U32("graphics/battle_terrain/stadium/palette4.gbapal.lz"); -const u32 gFile_graphics_battle_terrain_stadium_palette5_palette[] = INCBIN_U32("graphics/battle_terrain/stadium/palette5.gbapal.lz"); -const u32 gFile_graphics_battle_terrain_stadium_palette6_palette[] = INCBIN_U32("graphics/battle_terrain/stadium/palette6.gbapal.lz"); -const u32 gFile_graphics_battle_terrain_stadium_palette7_palette[] = INCBIN_U32("graphics/battle_terrain/stadium/palette7.gbapal.lz"); - -const u32 gFile_graphics_battle_terrain_building_anim_tiles_sheet[] = INCBIN_U32("graphics/battle_terrain/building/anim_tiles.4bpp.lz"); -const u32 gFile_graphics_battle_terrain_building_anim_map_tilemap[] = INCBIN_U32("graphics/battle_terrain/building/anim_map.bin.lz"); diff --git a/src/data/graphics/battle_terrain_unused.h b/src/data/graphics/battle_terrain_unused.h new file mode 100644 index 000000000..b2024a8c2 --- /dev/null +++ b/src/data/graphics/battle_terrain_unused.h @@ -0,0 +1,32 @@ + +// All graphics in this file go completely unused. + +const u32 gUnusedBattleTerrain_Plain_Palette[] = INCBIN_U32("graphics/battle_terrain/unused/plain.gbapal.lz"); + +const u32 gUnusedBattleTerrain_Building_Tiles_Sheet[] = INCBIN_U32("graphics/battle_terrain/unused/building/tiles.4bpp.lz"); + +const u32 gUnusedBattleTerrain_Stadium_Battle_Frontier_Palette[] = INCBIN_U32("graphics/battle_terrain/unused/stadium/battle_frontier.gbapal.lz"); + +const u32 gUnusedBattleTerrain_Building_Map_Tilemap[] = INCBIN_U32("graphics/battle_terrain/unused/building/map.bin.lz"); + +const u32 gUnusedBattleTerrain_Stadium_Tiles_Sheet[] = INCBIN_U32("graphics/battle_terrain/unused/stadium/tiles.4bpp.lz"); +const u32 gUnusedBattleTerrain_Stadium_Map_Tilemap[] = INCBIN_U32("graphics/battle_terrain/unused/stadium/map.bin.lz"); + +const u32 gUnusedBattleTerrain_Building_Palette[] = INCBIN_U32("graphics/battle_terrain/unused/building/palette.gbapal.lz"); + +const u32 gUnusedBattleTerrain_Kyogre_Palette[] = INCBIN_U32("graphics/battle_terrain/unused/kyogre.gbapal.lz"); +const u32 gUnusedBattleTerrain_Groudon_Palette[] = INCBIN_U32("graphics/battle_terrain/unused/groudon.gbapal.lz"); + +const u32 gUnusedBattleTerrain_Building_Palette2[] = INCBIN_U32("graphics/battle_terrain/unused/building/palette2.gbapal.lz"); +const u32 gUnusedBattleTerrain_Building_Palette3[] = INCBIN_U32("graphics/battle_terrain/unused/building/palette3.gbapal.lz"); + +const u32 gUnusedBattleTerrain_Stadium_Palette1[] = INCBIN_U32("graphics/battle_terrain/unused/stadium/palette1.gbapal.lz"); +const u32 gUnusedBattleTerrain_Stadium_Palette2[] = INCBIN_U32("graphics/battle_terrain/unused/stadium/palette2.gbapal.lz"); +const u32 gUnusedBattleTerrain_Stadium_Palette3[] = INCBIN_U32("graphics/battle_terrain/unused/stadium/palette3.gbapal.lz"); +const u32 gUnusedBattleTerrain_Stadium_Palette4[] = INCBIN_U32("graphics/battle_terrain/unused/stadium/palette4.gbapal.lz"); +const u32 gUnusedBattleTerrain_Stadium_Palette5[] = INCBIN_U32("graphics/battle_terrain/unused/stadium/palette5.gbapal.lz"); +const u32 gUnusedBattleTerrain_Stadium_Palette6[] = INCBIN_U32("graphics/battle_terrain/unused/stadium/palette6.gbapal.lz"); +const u32 gUnusedBattleTerrain_Stadium_Palette7[] = INCBIN_U32("graphics/battle_terrain/unused/stadium/palette7.gbapal.lz"); + +const u32 gUnusedBattleTerrain_Building_Anim_Tiles_Sheet[] = INCBIN_U32("graphics/battle_terrain/unused/building/anim_tiles.4bpp.lz"); +const u32 gUnusedBattleTerrain_Building_Anim_Map_Tilemap[] = INCBIN_U32("graphics/battle_terrain/unused/building/anim_map.bin.lz"); diff --git a/src/diploma.c b/src/diploma.c index 50c3adf41..38df40663 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -29,9 +29,9 @@ static void Task_WaitForExit(u8); static void Task_DiplomaInit(u8); static void Task_DiplomaReturnToOverworld(u8); -static const u32 gUnknown_84147C0[] = INCBIN_U32("graphics/diploma/unk_84147C0.4bpp.lz"); -static const u32 gUnknown_84154E8[] = INCBIN_U32("graphics/diploma/unk_84154E8.bin.lz"); -static const u16 gUnknown_8415954[] = INCBIN_U16("graphics/diploma/unk_8415954.gbapal"); +static const u32 sDiplomaGfx[] = INCBIN_U32("graphics/diploma/diploma.4bpp.lz"); +static const u32 sDiplomaTilemap[] = INCBIN_U32("graphics/diploma/diploma.bin.lz"); +static const u16 sDiplomaPal[] = INCBIN_U16("graphics/diploma/diploma.gbapal"); static const u8 gUnknown_8415994[] = _("{HIGHLIGHT TRANSPARENT}プレイヤー"); static const u8 gUnknown_841599D[] = _("{HIGHLIGHT TRANSPARENT}さま"); @@ -118,7 +118,7 @@ static void Task_DiplomaInit(u8 taskId) } break; case 3: - CopyToBgTilemapBuffer(1, gUnknown_84154E8, 0, 0); + CopyToBgTilemapBuffer(1, sDiplomaTilemap, 0, 0); break; case 4: if (HasAllMons()) @@ -231,7 +231,7 @@ static u8 DiplomaLoadGfx(void) ResetTempTileDataBuffers(); break; case 1: - DecompressAndCopyTileDataToVram(1, gUnknown_84147C0, 0, 0, 0); + DecompressAndCopyTileDataToVram(1, sDiplomaGfx, 0, 0, 0); break; case 2: if (!(FreeTempTileDataBuffersIfPossible() == 1)) @@ -240,7 +240,7 @@ static u8 DiplomaLoadGfx(void) } return 0; case 3: - LoadPalette(gUnknown_8415954, 0, 0x40); + LoadPalette(sDiplomaPal, 0, 0x40); default: return 1; } diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 1f8fd1cda..0eb36b523 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -59,12 +59,12 @@ static void Task_MovingBackgroundPos(u8 taskId); static void ResetBgRegsAfterMovingBackgroundCancel(void); // const data -static const u16 sUnrefPal_83F6C90[] = INCBIN_U16("graphics/evolution_scene/unknown_5B4114.gbapal"); +static const u16 sUnusedPal[] = INCBIN_U16("graphics/evolution_scene/unused.gbapal"); static const u32 sMovingBackgroundTiles[] = INCBIN_U32("graphics/evolution_scene/bg.4bpp.lz"); static const u32 sMovingBackgroundMap1[] = INCBIN_U32("graphics/evolution_scene/bg.bin.lz"); static const u32 sMovingBackgroundMap2[] = INCBIN_U32("graphics/evolution_scene/bg2.bin.lz"); static const u16 sBlackPalette[] = INCBIN_U16("graphics/evolution_scene/gray_transition_intro.gbapal"); -static const u16 unref_83F7D80[] = INCBIN_U16("graphics/evolution_scene/unref_83F7D80.bin"); +static const u16 sUnusedTilemap[] = INCBIN_U16("graphics/evolution_scene/unused_tilemap.bin"); static const u16 sMovingBgPals[] = INCBIN_U16("graphics/evolution_scene/transition.gbapal"); static const u8 sText_ShedinjaJapaneseName[] = _("ヌケニン"); diff --git a/src/fame_checker.c b/src/fame_checker.c index ea6e63be9..cad65366b 100644 --- a/src/fame_checker.c +++ b/src/fame_checker.c @@ -18,6 +18,7 @@ #include "text_window.h" #include "fame_checker.h" #include "strings.h" +#include "constants/event_objects.h" #define SPRITETAG_SELECTOR_CURSOR 1000 #define SPRITETAG_QUESTION_MARK 1001 @@ -136,23 +137,28 @@ static const u8 sTextColor_White[3] = {0, 1, 2}; static const u8 sTextColor_DkGrey[3] = {0, 2, 3}; static const u8 sTextColor_Green[3] = {0, 6, 7}; +#define FAME_CHECKER_PROF_OAK (FC_NONTRAINER_START + 0) +#define FAME_CHECKER_DAISY_OAK (FC_NONTRAINER_START + 1) +#define FAME_CHECKER_BILL (FC_NONTRAINER_START + 2) +#define FAME_CHECKER_MR_FUJI (FC_NONTRAINER_START + 3) + static const u16 sTrainerIdxs[] = { - FC_NONTRAINER_START + 0, // OAK - FC_NONTRAINER_START + 1, // DAISY - 0x019e, // BROCK - 0x019f, // MISTY - 0x01a0, // LTSURGE - 0x01a1, // ERIKA - 0x01a2, // KOGA - 0x01a4, // SABRINA - 0x01a3, // BLAINE - 0x019a, // LORELEI - 0x019b, // BRUNO - 0x019c, // AGATHA - 0x019d, // LANCE - FC_NONTRAINER_START + 2, // BILL - FC_NONTRAINER_START + 3, // MRFUJI - 0x015c // GIOVANNI + [FAMECHECKER_OAK] = FAME_CHECKER_PROF_OAK, + [FAMECHECKER_DAISY] = FAME_CHECKER_DAISY_OAK, + [FAMECHECKER_BROCK] = TRAINER_LEADER_BROCK, + [FAMECHECKER_MISTY] = TRAINER_LEADER_MISTY, + [FAMECHECKER_LTSURGE] = TRAINER_LEADER_LT_SURGE, + [FAMECHECKER_ERIKA] = TRAINER_LEADER_ERIKA, + [FAMECHECKER_KOGA] = TRAINER_LEADER_KOGA, + [FAMECHECKER_SABRINA] = TRAINER_LEADER_SABRINA, + [FAMECHECKER_BLAINE] = TRAINER_LEADER_BLAINE, + [FAMECHECKER_LORELEI] = TRAINER_ELITE_FOUR_LORELEI, + [FAMECHECKER_BRUNO] = TRAINER_ELITE_FOUR_BRUNO, + [FAMECHECKER_AGATHA] = TRAINER_ELITE_FOUR_AGATHA, + [FAMECHECKER_LANCE] = TRAINER_ELITE_FOUR_LANCE, + [FAMECHECKER_BILL] = FAME_CHECKER_BILL, + [FAMECHECKER_MRFUJI] = FAME_CHECKER_MR_FUJI, + [FAMECHECKER_GIOVANNI] = TRAINER_BOSS_GIOVANNI }; static const u8 *const sNonTrainerNamePointers[] = { @@ -163,13 +169,78 @@ static const u8 *const sNonTrainerNamePointers[] = { }; static const u8 sFameCheckerTrainerPicIdxs[] = { - 0x56, 0x54, 0x74, 0x75, 0x76, 0x77, 0x78, 0x7a, 0x79, 0x70, 0x71, 0x72, 0x73, 0x64, 0x7b, 0x6c, - 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 // these values are unused + [FAMECHECKER_OAK] = TRAINER_PIC_CAMPER, + [FAMECHECKER_DAISY] = TRAINER_PIC_LASS, + [FAMECHECKER_BROCK] = TRAINER_PIC_LEADER_BROCK, + [FAMECHECKER_MISTY] = TRAINER_PIC_LEADER_MISTY, + [FAMECHECKER_LTSURGE] = TRAINER_PIC_LEADER_LT_SURGE, + [FAMECHECKER_ERIKA] = TRAINER_PIC_LEADER_ERIKA, + [FAMECHECKER_KOGA] = TRAINER_PIC_LEADER_KOGA, + [FAMECHECKER_SABRINA] = TRAINER_PIC_LEADER_SABRINA, + [FAMECHECKER_BLAINE] = TRAINER_PIC_LEADER_BLAINE, + [FAMECHECKER_LORELEI] = TRAINER_PIC_ELITE_FOUR_LORELEI, + [FAMECHECKER_BRUNO] = TRAINER_PIC_ELITE_FOUR_BRUNO, + [FAMECHECKER_AGATHA] = TRAINER_PIC_ELITE_FOUR_AGATHA, + [FAMECHECKER_LANCE] = TRAINER_PIC_ELITE_FOUR_LANCE, + [FAMECHECKER_BILL] = TRAINER_PIC_PSYCHIC_M, + [FAMECHECKER_MRFUJI] = TRAINER_PIC_GENTLEMAN, + [FAMECHECKER_GIOVANNI] = TRAINER_PIC_LEADER_GIOVANNI, +}; + +static const u8 sFameCheckerTrainerGenders_Unused[] = { + [FAMECHECKER_OAK] = MALE, + [FAMECHECKER_DAISY] = FEMALE, + [FAMECHECKER_BROCK] = MALE, + [FAMECHECKER_MISTY] = FEMALE, + [FAMECHECKER_LTSURGE] = MALE, + [FAMECHECKER_ERIKA] = FEMALE, + [FAMECHECKER_KOGA] = MALE, + [FAMECHECKER_SABRINA] = FEMALE, + [FAMECHECKER_BLAINE] = MALE, + [FAMECHECKER_LORELEI] = FEMALE, + [FAMECHECKER_BRUNO] = MALE, + [FAMECHECKER_AGATHA] = FEMALE, + [FAMECHECKER_LANCE] = MALE, + [FAMECHECKER_BILL] = MALE, + [FAMECHECKER_MRFUJI] = MALE, + [FAMECHECKER_GIOVANNI] = MALE, }; -static const u8 *const sFameCheckerNameAndQuotesPointers[] = { - gFameCheckerPersonName_ProfOak, gFameCheckerPersonName_Daisy, gFameCheckerPersonName_Brock, gFameCheckerPersonName_Misty, gFameCheckerPersonName_LtSurge, gFameCheckerPersonName_Erika, gFameCheckerPersonName_Koga, gFameCheckerPersonName_Sabrina, gFameCheckerPersonName_Blaine, gFameCheckerPersonName_Lorelei, gFameCheckerPersonName_Bruno, gFameCheckerPersonName_Agatha, gFameCheckerPersonName_Lance, gFameCheckerPersonName_Bill, gFameCheckerPersonName_MrFuji, gFameCheckerPersonName_Giovanni, - gFameCheckerPersonQuote_ProfOak, gFameCheckerPersonQuote_Daisy, gFameCheckerPersonQuote_Brock, gFameCheckerPersonQuote_Misty, gFameCheckerPersonQuote_LtSurge, gFameCheckerPersonQuote_Erika, gFameCheckerPersonQuote_Koga, gFameCheckerPersonQuote_Sabrina, gFameCheckerPersonQuote_Blaine, gFameCheckerPersonQuote_Lorelei, gFameCheckerPersonQuote_Bruno, gFameCheckerPersonQuote_Agatha, gFameCheckerPersonQuote_Lance, gFameCheckerPersonQuote_Bill, gFameCheckerPersonQuote_MrFuji, gFameCheckerPersonQuote_Giovanni +static const u8 *const sFameCheckerNameAndQuotesPointers[2 * NUM_FAMECHECKER_PERSONS] = +{ + gFameCheckerPersonName_ProfOak, + gFameCheckerPersonName_Daisy, + gFameCheckerPersonName_Brock, + gFameCheckerPersonName_Misty, + gFameCheckerPersonName_LtSurge, + gFameCheckerPersonName_Erika, + gFameCheckerPersonName_Koga, + gFameCheckerPersonName_Sabrina, + gFameCheckerPersonName_Blaine, + gFameCheckerPersonName_Lorelei, + gFameCheckerPersonName_Bruno, + gFameCheckerPersonName_Agatha, + gFameCheckerPersonName_Lance, + gFameCheckerPersonName_Bill, + gFameCheckerPersonName_MrFuji, + gFameCheckerPersonName_Giovanni, + + gFameCheckerPersonQuote_ProfOak, + gFameCheckerPersonQuote_Daisy, + gFameCheckerPersonQuote_Brock, + gFameCheckerPersonQuote_Misty, + gFameCheckerPersonQuote_LtSurge, + gFameCheckerPersonQuote_Erika, + gFameCheckerPersonQuote_Koga, + gFameCheckerPersonQuote_Sabrina, + gFameCheckerPersonQuote_Blaine, + gFameCheckerPersonQuote_Lorelei, + gFameCheckerPersonQuote_Bruno, + gFameCheckerPersonQuote_Agatha, + gFameCheckerPersonQuote_Lance, + gFameCheckerPersonQuote_Bill, + gFameCheckerPersonQuote_MrFuji, + gFameCheckerPersonQuote_Giovanni }; static const u8 *const sFameCheckerFlavorTextPointers[] = { @@ -192,22 +263,118 @@ static const u8 *const sFameCheckerFlavorTextPointers[] = { }; static const u8 sFameCheckerArrayNpcGraphicsIds[] = { - 0x67, 0x47, 0x30, 0x69, 0x4b, 0x37, - 0x37, 0x30, 0x3d, 0x69, 0x23, 0x69, - 0x66, 0x50, 0x1b, 0x13, 0x1e, 0x69, - 0x66, 0x51, 0x2b, 0x27, 0x1d, 0x69, - 0x66, 0x52, 0x3d, 0x3d, 0x3e, 0x69, - 0x66, 0x53, 0x16, 0x1d, 0x53, 0x69, - 0x66, 0x54, 0x1a, 0x16, 0x69, 0x1e, - 0x66, 0x19, 0x55, 0x55, 0x69, 0x29, - 0x66, 0x56, 0x37, 0x1c, 0x69, 0x69, - 0x4d, 0x4d, 0x20, 0x69, 0x11, 0x23, - 0x4f, 0x4f, 0x69, 0x36, 0x1d, 0x36, - 0x4b, 0x36, 0x36, 0x69, 0x4b, 0x23, - 0x4a, 0x4a, 0x18, 0x17, 0x69, 0x29, - 0x48, 0x12, 0x20, 0x59, 0x59, 0x59, - 0x11, 0x31, 0x69, 0x1e, 0x69, 0x69, - 0x57, 0x37, 0x37, 0x57, 0x5b, 0x37 + // OAK + OBJ_EVENT_GFX_SIGN, + OBJ_EVENT_GFX_PROF_OAK, + OBJ_EVENT_GFX_WORKER_F, + OBJ_EVENT_GFX_CLIPBOARD, + OBJ_EVENT_GFX_AGATHA, + OBJ_EVENT_GFX_SCIENTIST, + // DAISY + OBJ_EVENT_GFX_SCIENTIST, + OBJ_EVENT_GFX_WORKER_F, + OBJ_EVENT_GFX_GENTLEMAN, + OBJ_EVENT_GFX_CLIPBOARD, + OBJ_EVENT_GFX_OLD_WOMAN, + OBJ_EVENT_GFX_CLIPBOARD, + // BROCK + OBJ_EVENT_GFX_GYM_SIGN, + OBJ_EVENT_GFX_BROCK, + OBJ_EVENT_GFX_FAT_MAN, + OBJ_EVENT_GFX_BOY, + OBJ_EVENT_GFX_BALDING_MAN, + OBJ_EVENT_GFX_CLIPBOARD, + // MISTY + OBJ_EVENT_GFX_GYM_SIGN, + OBJ_EVENT_GFX_MISTY, + OBJ_EVENT_GFX_SWIMMER_M_WATER, + OBJ_EVENT_GFX_CAMPER, + OBJ_EVENT_GFX_BEAUTY, + OBJ_EVENT_GFX_CLIPBOARD, + // LTSURGE + OBJ_EVENT_GFX_GYM_SIGN, + OBJ_EVENT_GFX_LT_SURGE, + OBJ_EVENT_GFX_GENTLEMAN, + OBJ_EVENT_GFX_GENTLEMAN, + OBJ_EVENT_GFX_SAILOR, + OBJ_EVENT_GFX_CLIPBOARD, + // ERIKA + OBJ_EVENT_GFX_GYM_SIGN, + OBJ_EVENT_GFX_ERIKA, + OBJ_EVENT_GFX_LASS, + OBJ_EVENT_GFX_BEAUTY, + OBJ_EVENT_GFX_ERIKA, + OBJ_EVENT_GFX_CLIPBOARD, + // KOGA + OBJ_EVENT_GFX_GYM_SIGN, + OBJ_EVENT_GFX_KOGA, + OBJ_EVENT_GFX_ROCKER, + OBJ_EVENT_GFX_LASS, + OBJ_EVENT_GFX_CLIPBOARD, + OBJ_EVENT_GFX_BALDING_MAN, + // SABRINA + OBJ_EVENT_GFX_GYM_SIGN, + OBJ_EVENT_GFX_MAN, + OBJ_EVENT_GFX_SABRINA, + OBJ_EVENT_GFX_SABRINA, + OBJ_EVENT_GFX_CLIPBOARD, + OBJ_EVENT_GFX_COOLTRAINER_M, + // BLAINE + OBJ_EVENT_GFX_GYM_SIGN, + OBJ_EVENT_GFX_BLAINE, + OBJ_EVENT_GFX_SCIENTIST, + OBJ_EVENT_GFX_WOMAN_2, + OBJ_EVENT_GFX_CLIPBOARD, + OBJ_EVENT_GFX_CLIPBOARD, + // LORELEI + OBJ_EVENT_GFX_LORELEI, + OBJ_EVENT_GFX_LORELEI, + OBJ_EVENT_GFX_OLD_MAN_1, + OBJ_EVENT_GFX_CLIPBOARD, + OBJ_EVENT_GFX_LITTLE_GIRL, + OBJ_EVENT_GFX_OLD_WOMAN, + // BRUNO + OBJ_EVENT_GFX_BRUNO, + OBJ_EVENT_GFX_BRUNO, + OBJ_EVENT_GFX_CLIPBOARD, + OBJ_EVENT_GFX_BLACKBELT, + OBJ_EVENT_GFX_BEAUTY, + OBJ_EVENT_GFX_BLACKBELT, + // AGATHA + OBJ_EVENT_GFX_AGATHA, + OBJ_EVENT_GFX_BLACKBELT, + OBJ_EVENT_GFX_BLACKBELT, + OBJ_EVENT_GFX_CLIPBOARD, + OBJ_EVENT_GFX_AGATHA, + OBJ_EVENT_GFX_OLD_WOMAN, + // LANCE + OBJ_EVENT_GFX_LANCE, + OBJ_EVENT_GFX_LANCE, + OBJ_EVENT_GFX_BATTLE_GIRL, + OBJ_EVENT_GFX_WOMAN_1, + OBJ_EVENT_GFX_CLIPBOARD, + OBJ_EVENT_GFX_COOLTRAINER_M, + // BILL + OBJ_EVENT_GFX_BLUE, + OBJ_EVENT_GFX_YOUNGSTER, + OBJ_EVENT_GFX_OLD_MAN_1, + OBJ_EVENT_GFX_CELIO, + OBJ_EVENT_GFX_CELIO, + OBJ_EVENT_GFX_CELIO, + // MRFUJI + OBJ_EVENT_GFX_LITTLE_GIRL, + OBJ_EVENT_GFX_ROCKET_M, + OBJ_EVENT_GFX_CLIPBOARD, + OBJ_EVENT_GFX_BALDING_MAN, + OBJ_EVENT_GFX_CLIPBOARD, + OBJ_EVENT_GFX_CLIPBOARD, + // GIOVANNI + OBJ_EVENT_GFX_GIOVANNI, + OBJ_EVENT_GFX_SCIENTIST, + OBJ_EVENT_GFX_SCIENTIST, + OBJ_EVENT_GFX_GIOVANNI, + OBJ_EVENT_GFX_GYM_GUY, + OBJ_EVENT_GFX_SCIENTIST }; static const u8 *const sFlavorTextOriginLocationTexts[] = { @@ -268,43 +435,79 @@ static const struct SpritePalette sUISpritePalettes[] = { static const struct BgTemplate sUIBgTemplates[4] = { { .bg = 3, - .charBaseIndex = 0x03, - .mapBaseIndex = 0x1e, + .charBaseIndex = 3, + .mapBaseIndex = 30, .screenSize = 0, .paletteMode = FALSE, .priority = 3, - .baseTile = 0x000}, + .baseTile = 0x000 + }, { .bg = 2, - .charBaseIndex = 0x03, - .mapBaseIndex = 0x1b, + .charBaseIndex = 3, + .mapBaseIndex = 27, .screenSize = 0, .paletteMode = FALSE, .priority = 2, - .baseTile = 0x000}, + .baseTile = 0x000 + }, { .bg = 1, - .charBaseIndex = 0x03, - .mapBaseIndex = 0x1c, + .charBaseIndex = 3, + .mapBaseIndex = 28, .screenSize = 1, .paletteMode = FALSE, .priority = 0, - .baseTile = 0x000}, + .baseTile = 0x000 + }, { .bg = 0, - .charBaseIndex = 0x00, - .mapBaseIndex = 0x1f, + .charBaseIndex = 0, + .mapBaseIndex = 31, .screenSize = 0, .paletteMode = FALSE, .priority = 2, - .baseTile = 0x000}, + .baseTile = 0x000 + }, }; static const struct WindowTemplate sUIWindowTemplates[] = { - {0, 1, 3, 8, 10, 15, 0x014}, // List Menu - {0, 6, 0, 24, 2, 15, 0x064}, // UI across the top - {0, 2, 15, 26, 4, 15, 0x094}, // Textbox on the bottom - {0, 15, 10, 11, 4, 15, 0x0FC}, // Icon description + [FCWINDOWID_LIST] = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 3, + .width = 8, + .height = 10, + .paletteNum = 15, + .baseBlock = 20 + }, + [FCWINDOWID_UIHELP] = { + .bg = 0, + .tilemapLeft = 6, + .tilemapTop = 0, + .width = 24, + .height = 2, + .paletteNum = 15, + .baseBlock = 20 + 8 * 10 + }, + [FCWINDOWID_MSGBOX] = { + .bg = 0, + .tilemapLeft = 2, + .tilemapTop = 15, + .width = 26, + .height = 4, + .paletteNum = 15, + .baseBlock = 20 + 8 * 10 + 24 * 2 + }, + [FCWINDOWID_ICONDESC] = { + .bg = 0, + .tilemapLeft = 15, + .tilemapTop = 10, + .width = 11, + .height = 4, + .paletteNum = 15, + .baseBlock = 20 + 8 * 10 + 24 * 2 + 26 * 4 + }, DUMMY_WIN_TEMPLATE }; @@ -446,9 +649,9 @@ static void MainCB2_LoadFameChecker(void) gMain.state++; break; case 2: - sBg3TilemapBuffer = AllocZeroed(0x800); - sBg1TilemapBuffer = AllocZeroed(0x1000); - sBg2TilemapBuffer = AllocZeroed(0x800); + sBg3TilemapBuffer = AllocZeroed(BG_SCREEN_SIZE); // 256x256 + sBg1TilemapBuffer = AllocZeroed(BG_SCREEN_SIZE * 2); // 512x256 + sBg2TilemapBuffer = AllocZeroed(BG_SCREEN_SIZE); // 256x256 ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sUIBgTemplates, NELEMS(sUIBgTemplates)); SetBgTilemapBuffer(3, sBg3TilemapBuffer); @@ -544,7 +747,7 @@ static void Task_TopMenuHandleInput(u8 taskId) else if (cursorPos != sFameCheckerData->numUnlockedPersons - 1) // anything but CANCEL { PlaySE(SE_M_LOCK_ON); - FillWindowPixelRect(FCWINDOWID_ICONDESC, 0x00, 0, 0, 88, 32); + FillWindowPixelRect(FCWINDOWID_ICONDESC, PIXEL_FILL(0), 0, 0, 88, 32); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_ICONDESC); UpdateInfoBoxTilemap(2, 4); UpdateInfoBoxTilemap(1, 5); @@ -619,7 +822,7 @@ static bool8 TryExitPickMode(u8 taskId) static void MessageBoxPrintEmptyText(void) { - AddTextPrinterParameterized2(2, 2, gFameCheckerText_ClearTextbox, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gFameCheckerText_ClearTextbox, 0, NULL, 2, 1, 3); } static void Task_EnterPickMode(u8 taskId) @@ -733,7 +936,7 @@ static void FC_MoveSelectorCursor(u8 taskId, s8 dx, s8 dy) gSprites[data[0]].pos1.y += dy; for (i = 0; i < 6; i++) SetMessageSelectorIconObjMode(sFameCheckerData->spriteIds[i], ST_OAM_OBJ_BLEND); - FillWindowPixelRect(FCWINDOWID_MSGBOX, 0x11, 0, 0, 0xd0, 0x20); + FillWindowPixelRect(FCWINDOWID_MSGBOX, PIXEL_FILL(1), 0, 0, 0xd0, 0x20); MessageBoxPrintEmptyText(); if (SetMessageSelectorIconObjMode(sFameCheckerData->spriteIds[data[1]], ST_OAM_OBJ_NORMAL) == TRUE) { @@ -746,7 +949,7 @@ static void FC_MoveSelectorCursor(u8 taskId, s8 dx, s8 dy) static void GetPickModeText(void) { - u8 offset = 0; + s32 whichText = 0; u16 who = FameCheckerGetCursorY(); if (gSaveBlock1Ptr->fameChecker[sFameCheckerData->unlockedPersons[who]].pickState != FCPICKSTATE_COLORED) { @@ -755,10 +958,10 @@ static void GetPickModeText(void) } else { - FillWindowPixelRect(FCWINDOWID_MSGBOX, 0x11, 0, 0, 0xd0, 0x20); + FillWindowPixelRect(FCWINDOWID_MSGBOX, PIXEL_FILL(1), 0, 0, 0xd0, 0x20); if (HasUnlockedAllFlavorTextsForCurrentPerson() == TRUE) - offset = NUM_FAMECHECKER_PERSONS; - StringExpandPlaceholders(gStringVar4, sFameCheckerNameAndQuotesPointers[sFameCheckerData->unlockedPersons[who] + offset]); + whichText = NUM_FAMECHECKER_PERSONS; + StringExpandPlaceholders(gStringVar4, sFameCheckerNameAndQuotesPointers[sFameCheckerData->unlockedPersons[who] + whichText]); AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gStringVar4, GetTextSpeedSetting(), NULL, 2, 1, 3); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_MSGBOX); } @@ -768,7 +971,7 @@ static void PrintSelectedNameInBrightGreen(u8 taskId) { s16 *data = gTasks[taskId].data; u16 cursorPos = FameCheckerGetCursorY(); - FillWindowPixelRect(FCWINDOWID_MSGBOX, 0x11, 0, 0, 0xd0, 0x20); + FillWindowPixelRect(FCWINDOWID_MSGBOX, PIXEL_FILL(1), 0, 0, 0xd0, 0x20); StringExpandPlaceholders(gStringVar4, sFameCheckerFlavorTextPointers[sFameCheckerData->unlockedPersons[cursorPos] * 6 + data[1]]); AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gStringVar4, GetTextSpeedSetting(), NULL, 2, 1, 3); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_MSGBOX); @@ -776,7 +979,7 @@ static void PrintSelectedNameInBrightGreen(u8 taskId) static void WipeMsgBoxAndTransfer(void) { - FillWindowPixelRect(FCWINDOWID_MSGBOX, 0x11, 0, 0, 0xd0, 0x20); + FillWindowPixelRect(FCWINDOWID_MSGBOX, PIXEL_FILL(1), 0, 0, 0xd0, 0x20); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_MSGBOX); } @@ -839,10 +1042,10 @@ static void Task_DestroyAssetsAndCloseFameChecker(u8 taskId) Free(sBg2TilemapBuffer); Free(sFameCheckerData); Free(sListMenuItems); - FC_DestroyWindow(0); - FC_DestroyWindow(1); - FC_DestroyWindow(2); - FC_DestroyWindow(3); + FC_DestroyWindow(FCWINDOWID_LIST); + FC_DestroyWindow(FCWINDOWID_UIHELP); + FC_DestroyWindow(FCWINDOWID_MSGBOX); + FC_DestroyWindow(FCWINDOWID_ICONDESC); FreeAllWindowBuffers(); DestroyTask(taskId); } @@ -879,7 +1082,7 @@ static void PrintUIHelp(u8 state) src = gFameCheckerText_PickScreenUI; } width = GetStringWidth(0, src, 0); - FillWindowPixelRect(FCWINDOWID_UIHELP, 0x00, 0, 0, 0xc0, 0x10); + FillWindowPixelRect(FCWINDOWID_UIHELP, PIXEL_FILL(0), 0, 0, 0xc0, 0x10); AddTextPrinterParameterized4(FCWINDOWID_UIHELP, 0, 188 - width, 0, 0, 2, sTextColor_White, -1, src); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_UIHELP); } @@ -1191,7 +1394,7 @@ static void UpdateIconDescriptionBox(u8 whichText) u32 idx = 6 * sFameCheckerData->unlockedPersons[FameCheckerGetCursorY()] + whichText; HandleFlavorTextModeSwitch(TRUE); gIconDescriptionBoxIsOpen = 1; - FillWindowPixelRect(FCWINDOWID_ICONDESC, 0x00, 0, 0, 0x58, 0x20); + FillWindowPixelRect(FCWINDOWID_ICONDESC, PIXEL_FILL(0), 0, 0, 0x58, 0x20); width = (0x54 - GetStringWidth(0, sFlavorTextOriginLocationTexts[idx], 0)) / 2; AddTextPrinterParameterized4(FCWINDOWID_ICONDESC, 0, width, 0, 0, 2, sTextColor_DkGrey, -1, sFlavorTextOriginLocationTexts[idx]); StringExpandPlaceholders(gStringVar1, sFlavorTextOriginObjectNameTexts[idx]); @@ -1221,7 +1424,7 @@ static void InitListMenuTemplate(void) gFameChecker_ListMenuTemplate.itemPrintFunc = NULL; gFameChecker_ListMenuTemplate.totalItems = 1; gFameChecker_ListMenuTemplate.maxShowed = 1; - gFameChecker_ListMenuTemplate.windowId = 0; + gFameChecker_ListMenuTemplate.windowId = FCWINDOWID_LIST; gFameChecker_ListMenuTemplate.header_X = 0; gFameChecker_ListMenuTemplate.item_X = 8; gFameChecker_ListMenuTemplate.cursor_X = 0; @@ -1274,7 +1477,7 @@ static void FC_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu *list } else { - FillWindowPixelRect(FCWINDOWID_MSGBOX, 0x11, 0, 0, 0xd0, 0x20); + FillWindowPixelRect(FCWINDOWID_MSGBOX, PIXEL_FILL(1), 0, 0, 0xd0, 0x20); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_MSGBOX); } } @@ -1309,7 +1512,7 @@ static void Task_SwitchToPickMode(u8 taskId) static void PrintCancelDescription(void) { - FillWindowPixelRect(FCWINDOWID_MSGBOX, 0x11, 0, 0, 0xd0, 0x20); + FillWindowPixelRect(FCWINDOWID_MSGBOX, PIXEL_FILL(1), 0, 0, 0xd0, 0x20); AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gFameCheckerText_FameCheckerWillBeClosed, 0, NULL, 2, 1, 3); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_MSGBOX); } diff --git a/src/field_effect.c b/src/field_effect.c index 5942e68fd..c2b507882 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -59,10 +59,10 @@ static void SpriteCB_PokeballGlow(struct Sprite * sprite); static void SpriteCB_PokecenterMonitor(struct Sprite * sprite); static void SpriteCB_HallOfFameMonitor(struct Sprite * sprite); -static const u16 sNewGameOakObjectSpriteTiles[] = INCBIN_U16("graphics/field_effects/unk_83CA770.4bpp"); -static const u16 sNewGameOakObjectPals[] = INCBIN_U16("graphics/field_effects/unk_83CAF70.gbapal"); -static const u16 sUnknown_83CAF90[] = INCBIN_U16("graphics/field_effects/unk_83CAF90.4bpp"); -static const u16 sUnknown_83CAFB0[] = INCBIN_U16("graphics/field_effects/unk_83CAFB0.gbapal"); +static const u16 sNewGameOakObjectSpriteTiles[] = INCBIN_U16("graphics/field_effects/new_game_oak.4bpp"); +static const u16 sNewGameOakObjectPals[] = INCBIN_U16("graphics/field_effects/new_game_oak.gbapal"); +static const u16 sPokeballGfx[] = INCBIN_U16("graphics/field_effects/pokeball.4bpp"); +static const u16 sPokeballPal[] = INCBIN_U16("graphics/field_effects/pokeball.gbapal"); static const u16 sUnknown_83CAFD0[] = INCBIN_U16("graphics/field_effects/unk_83CAFD0.4bpp"); static const u16 sUnknown_83CB3D0[] = INCBIN_U16("graphics/field_effects/unk_83CB3D0.gbapal"); static const u16 sUnknown_83CB3F0[] = INCBIN_U16("graphics/field_effects/unk_83CB3F0.4bpp"); @@ -161,7 +161,7 @@ static const struct SpriteTemplate sNewGameOakObjectTemplate = { }; const struct SpritePalette gUnknown_83CBE9C = { - sUnknown_83CAFB0, 4103 + sPokeballPal, 4103 }; const struct SpritePalette gUnknown_83CBEA4 = { @@ -185,7 +185,7 @@ static const struct OamData sOamData_83CBEAC = { }; static const struct SpriteFrameImage sUnknown_83CBEB4[] = { - {sUnknown_83CAF90, 0x20} + {sPokeballGfx, 0x20} }; static const struct SpriteFrameImage sUnknown_83CBEBC[] = { diff --git a/src/graphics.c b/src/graphics.c index fb9caf1e0..04a6f6206 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -366,10 +366,10 @@ const u8 gHealthboxElementsGfxTable_Misc[] = INCBIN_U8("graphics/battle_interfac const u8 gHealthboxElementsGfxTable_HpBarAnim[] = INCBIN_U8("graphics/battle_interface/hp_bar_anim.4bpp"); const u8 gHealthboxElementsGfxTable_MiscFrameEnd[] = INCBIN_U8("graphics/battle_interface/misc_frame_end.4bpp"); -const u8 gUnknown_8D12404[] = INCBIN_U8("graphics/battle_interface/ball_display.4bpp"); +const u8 gBattleInterface_SummaryBallDisplayGfx[] = INCBIN_U8("graphics/battle_interface/ball_display.4bpp"); //Originally an array? -const u8 gUnknown_08C1249C[] = INCBIN_U8("graphics/battle_interface/ball_display_unused_extra.4bpp"); +const u8 gBattleInterface_UnusedSummaryBallDisplayGfx[] = INCBIN_U8("graphics/battle_interface/ball_display_unused_extra.4bpp"); const u8 gBattleInterfaceGfx_Status2[] = INCBIN_U8("graphics/battle_interface/status2.4bpp"); // these three duplicate sets of graphics are for the opponent pokemon const u8 gBattleInterfaceGfx_Status3[] = INCBIN_U8("graphics/battle_interface/status3.4bpp"); // and are also for use in double battles. they use dynamic palettes so const u8 gBattleInterfaceGfx_Status4[] = INCBIN_U8("graphics/battle_interface/status4.4bpp"); // coloring them is an extreme headache and wont be done for now @@ -461,25 +461,25 @@ const u32 gFile_graphics_unknown_unknown_D17AB8_tilemap[] = INCBIN_U32("graphics const u32 gContestMiscGfx[] = INCBIN_U32("graphics/contest/misc.4bpp.lz"); -const u32 gFile_graphics_contest_audience_sheet[] = INCBIN_U32("graphics/contest/audience.4bpp.lz"); +const u32 gContestAudienceGfx[] = INCBIN_U32("graphics/contest/audience.4bpp.lz"); -const u32 gFile_graphics_contest_faces_sheet[] = INCBIN_U32("graphics/contest/faces.4bpp.lz"); +const u32 gContestFacesSheetGfx[] = INCBIN_U32("graphics/contest/faces.4bpp.lz"); -const u32 gFile_graphics_contest_judge_symbols_sheet[] = INCBIN_U32("graphics/contest/judge_symbols.4bpp.lz"); -const u32 gFile_graphics_contest_judge_symbols_palette[] = INCBIN_U32("graphics/contest/judge_symbols.gbapal.lz"); +const u32 gContestJudgeSymbolsGfx[] = INCBIN_U32("graphics/contest/judge_symbols.4bpp.lz"); +const u32 gContestJudgeSymbolsPal[] = INCBIN_U32("graphics/contest/judge_symbols.gbapal.lz"); -const u8 gFile_graphics_contest_heart[] = INCBIN_U8("graphics/contest/heart.4bpp"); +const u8 gContestHeartGfx[] = INCBIN_U8("graphics/contest/heart.4bpp"); const u32 gFile_graphics_unknown_unknown_D196E4_sheet[] = INCBIN_U32("graphics/unknown/unknown_D196E4.4bpp.lz"); const u32 gFile_graphics_unknown_unknown_D196E4_palette[] = INCBIN_U32("graphics/unknown/unknown_D196E4.gbapal.lz"); -const u32 gUnknown_8D197FC[] = INCBIN_U32("graphics/contest/misc_2.4bpp.lz"); +const u32 gContestMisc2Gfx[] = INCBIN_U32("graphics/contest/misc_2.4bpp.lz"); -const u32 gFile_graphics_contest_misc_2_tilemap_1_tilemap[] = INCBIN_U32("graphics/contest/misc_2_tilemap_1.bin.lz"); -const u32 gFile_graphics_contest_misc_2_tilemap_2_tilemap[] = INCBIN_U32("graphics/contest/misc_2_tilemap_2.bin.lz"); -const u32 gFile_graphics_contest_misc_2_tilemap_3_tilemap[] = INCBIN_U32("graphics/contest/misc_2_tilemap_3.bin.lz"); +const u32 gContestMiscTilemap1[] = INCBIN_U32("graphics/contest/misc_2_tilemap_1.bin.lz"); +const u32 gContestMiscTilemap2[] = INCBIN_U32("graphics/contest/misc_2_tilemap_2.bin.lz"); +const u32 gContestMiscTilemap3[] = INCBIN_U32("graphics/contest/misc_2_tilemap_3.bin.lz"); -const u32 gFile_graphics_contest_misc_2_palette[] = INCBIN_U32("graphics/contest/misc_2.gbapal.lz"); +const u32 gContestMiscPal[] = INCBIN_U32("graphics/contest/misc.gbapal.lz"); const u32 gBattleAnimSpriteGfx_Impact[] = INCBIN_U32("graphics/battle_anims/sprites/impact.4bpp.lz"); const u32 gBattleAnimSpritePal_Impact[] = INCBIN_U32("graphics/battle_anims/sprites/impact.gbapal.lz"); @@ -582,8 +582,8 @@ const u32 gBattleAnimSpritePal_BlackBall2[] = INCBIN_U32("graphics/battle_anims/ const u32 gBattleAnimSpritePal_PurpleGasCloud[] = INCBIN_U32("graphics/battle_anims/sprites/purple_gas_cloud.gbapal.lz"); -const u32 gFile_graphics_contest_judge_sheet[] = INCBIN_U32("graphics/contest/judge.4bpp.lz"); -const u32 gFile_graphics_contest_judge_palette[] = INCBIN_U32("graphics/contest/judge.gbapal.lz"); +const u32 gContestJudgeGfx[] = INCBIN_U32("graphics/contest/judge.4bpp.lz"); +const u32 gContestJudgePal[] = INCBIN_U32("graphics/contest/judge.gbapal.lz"); const u32 gBattleAnimSpriteGfx_Spark[] = INCBIN_U32("graphics/battle_anims/sprites/spark.4bpp.lz"); const u32 gBattleAnimSpritePal_Spark[] = INCBIN_U32("graphics/battle_anims/sprites/spark.gbapal.lz"); @@ -964,7 +964,7 @@ const u32 gFile_graphics_battle_transitions_vs_frame_palette[] = INCBIN_U32("gra const u32 gVsLettersGfx[] = INCBIN_U32("graphics/battle_transitions/vs.4bpp.lz"); -#include "data/graphics/battle_terrain.h" +#include "data/graphics/battle_terrain_unused.h" const u32 gBattleAnimSpriteGfx_FlyingDirt[] = INCBIN_U32("graphics/battle_anims/sprites/flying_dirt.4bpp.lz"); @@ -984,8 +984,8 @@ const u32 gBattleAnimSpriteGfx_IcicleSpear[] = INCBIN_U32("graphics/battle_anims const u32 gBattleAnimSpritePal_IcicleSpear[] = INCBIN_U32("graphics/battle_anims/sprites/icicle_spear.gbapal.lz"); const u32 gContestNextTurnGfx[] = INCBIN_U32("graphics/contest/next_turn.4bpp.lz"); -const u8 gFile_graphics_contest_nextturn_numbers[] = INCBIN_U8("graphics/contest/next_turn_numbers.4bpp"); -const u8 gFile_graphics_contest_nextturn_random[] = INCBIN_U8("graphics/contest/next_turn_random.4bpp"); +const u8 gContestNextTurnNumbersGfx[] = INCBIN_U8("graphics/contest/next_turn_numbers.4bpp"); +const u8 gContestNextTurnRandomGfx[] = INCBIN_U8("graphics/contest/next_turn_random.4bpp"); const u32 gBattleAnimSpriteGfx_GlowyRedOrb[] = INCBIN_U32("graphics/battle_anims/sprites/glowy_red_orb.4bpp.lz"); const u32 gBattleAnimSpritePal_GlowyRedOrb[] = INCBIN_U32("graphics/battle_anims/sprites/glowy_red_orb.gbapal.lz"); @@ -994,9 +994,9 @@ const u32 gBattleAnimSpritePal_SleepPowder[] = INCBIN_U32("graphics/battle_anims const u32 gBattleAnimSpritePal_StunSpore[] = INCBIN_U32("graphics/battle_anims/sprites/stun_spore.gbapal.lz"); const u32 gContestApplauseGfx[] = INCBIN_U32("graphics/contest/applause.4bpp.lz"); -const u8 gFile_graphics_contest_applause_meter[] = INCBIN_U8("graphics/contest/applause_meter.4bpp"); +const u8 gContestApplauseMeterGfx[] = INCBIN_U8("graphics/contest/applause_meter.4bpp"); -const u16 gFile_graphics_contest_nextturn[] = INCBIN_U16("graphics/contest/next_turn.gbapal"); +const u16 gContestNextTurnPal[] = INCBIN_U16("graphics/contest/next_turn.gbapal"); const u32 gBattleAnimSpriteGfx_Splash[] = INCBIN_U32("graphics/battle_anims/sprites/splash.4bpp.lz"); const u32 gBattleAnimSpritePal_Splash[] = INCBIN_U32("graphics/battle_anims/sprites/splash.gbapal.lz"); @@ -1136,12 +1136,12 @@ const u8 gItemPcTiles[] = INCBIN_U8("graphics/item_pc/unk_8E85090.4bpp.lz"); const u32 gItemPcBgPals[] = INCBIN_U32("graphics/item_pc/unk_8E85408.gbapal.lz"); const u8 gItemPcTilemap[] = INCBIN_U8("graphics/item_pc/unk_8E85458.bin.lz"); -const u32 gBerryPouchSpriteTiles[] = INCBIN_U32("graphics/berry_pouch/unk_8E8560C.4bpp.lz"); -const u8 gBerryPouchBgGfx[] = INCBIN_U8("graphics/berry_pouch/unk_8E859D0.4bpp.lz"); -const u32 gBerryPouchBgPals[] = INCBIN_U32("graphics/berry_pouch/unk_8E85BA4.gbapal.lz"); -const u32 gBerryPouchBgPal0FemaleOverride[] = INCBIN_U32("graphics/berry_pouch/unk_8E85BF4.gbapal.lz"); -const u32 gBerryPouchSpritePalette[] = INCBIN_U32("graphics/berry_pouch/unk_8E85C1C.gbapal.lz"); -const u8 gBerryPouchBg1Tilemap[] = INCBIN_U8("graphics/berry_pouch/unk_8E85C44.bin.lz"); +const u32 gBerryPouchSpriteTiles[] = INCBIN_U32("graphics/berry_pouch/berry_pouch.4bpp.lz"); +const u8 gBerryPouchBgGfx[] = INCBIN_U8("graphics/berry_pouch/background.4bpp.lz"); +const u32 gBerryPouchBgPals[] = INCBIN_U32("graphics/berry_pouch/background.gbapal.lz"); +const u32 gBerryPouchBgPal0FemaleOverride[] = INCBIN_U32("graphics/berry_pouch/background_female.gbapal.lz"); +const u32 gBerryPouchSpritePalette[] = INCBIN_U32("graphics/berry_pouch/berry_pouch.gbapal.lz"); +const u8 gBerryPouchBg1Tilemap[] = INCBIN_U8("graphics/berry_pouch/background.bin.lz"); const u32 gBuyMenuFrame_Gfx[] = INCBIN_U32("graphics/shop_menu/shop_menu.4bpp.lz"); const u32 gBuyMenuFrame_Tilemap[] = INCBIN_U32("graphics/shop_menu/shop_tilemap.bin"); @@ -1245,8 +1245,8 @@ const u32 gEasyChatRedRectangularCursor_Tiles[] = INCBIN_U32("graphics/interface const u16 gPokeSummary_StatusAilmentIconPals[] = INCBIN_U16("graphics/interface/link_rfu_frame.gbapal"); const u32 gPokeSummary_StatusAilmentIconTiles[] = INCBIN_U32("graphics/interface/link_rfu_status.4bpp.lz"); -const u16 gUnknown_8E9C14C[] = INCBIN_U16("graphics/interface/pokedex_abc.gbapal"); -const u16 gUnknown_8E9C16C[] = INCBIN_U16("graphics/interface/pokedex_abc.4bpp.lz"); +const u16 gDexScreen_TopMenuIconPals_AtoZ[] = INCBIN_U16("graphics/pokedex/cat_icon_abc.gbapal"); +const u32 gDexScreen_TopMenuIconTiles_AtoZ[] = INCBIN_U32("graphics/pokedex/cat_icon_abc.4bpp.lz"); const u16 gPSSMenu_Pal[] = INCBIN_U16("graphics/interface/box_tiles_pal1.gbapal"); const u16 gUnknown_8E9C3F8[] = INCBIN_U16("graphics/interface/box_tiles_pal2.gbapal"); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 8480edfaf..e6f8b72ec 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -283,8 +283,8 @@ static const struct SpriteTemplate sSpriteTemplate_Confetti = { .callback = SpriteCB_Confetti }; -static const u16 sHallOfFame_Pal[] = INCBIN_U16("graphics/hall_of_fame/unk_840C3BC.gbapal"); -static const u32 sHallOfFame_Gfx[] = INCBIN_U32("graphics/hall_of_fame/unk_840C3BC.4bpp.lz"); +static const u16 sHallOfFame_Pal[] = INCBIN_U16("graphics/hall_of_fame/hall_of_fame.gbapal"); +static const u32 sHallOfFame_Gfx[] = INCBIN_U32("graphics/hall_of_fame/hall_of_fame.4bpp.lz"); static const struct HallofFameMon sDummyHofMon = { .tid = 0x03EA03EA, // (u16[]){1002, 1002} corrupted sprite template? diff --git a/src/help_system.c b/src/help_system.c index 27ec64baa..f29359354 100644 --- a/src/help_system.c +++ b/src/help_system.c @@ -1646,7 +1646,7 @@ static const u8 *const sHelpSystemSubmenuItemLists[HELPCONTEXT_COUNT * (TOPIC_CO NULL, NULL, NULL, NULL, NULL // HELPCONTEXT_UNUSED }; -static const u16 unref_845BCB0[] = INCBIN_U16("graphics/help_system/unk_845BCB0.bin"); +static const u16 unref_845BCB0[] = INCBIN_U16("graphics/help_system/unused.bin"); static const u8 sHelpSystemContextTopicOrder[TOPIC_COUNT] = { TOPIC_ABOUT_GAME, diff --git a/src/item_menu.c b/src/item_menu.c index 6b23482e5..e0022322d 100644 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -1224,7 +1224,7 @@ static void BeginMovingItemInPocket(u8 taskId, s16 itemIndex) u16 cursorPos; s16 *data = gTasks[taskId].data; ListMenuGetScrollAndRow(data[0], &cursorPos, &itemsAbove); - ListMenuSetUnkIndicatorsStructField(data[0], 0x10, 1); + ListMenuSetTemplateField(data[0], LISTFIELD_CURSORKIND, 1); data[1] = itemIndex; sBagMenuDisplay->itemOriginalLocation = itemIndex; StringCopy(gStringVar1, ItemId_GetName(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1]))); diff --git a/src/item_pc.c b/src/item_pc.c index 4366997ba..bf1bf87df 100644 --- a/src/item_pc.c +++ b/src/item_pc.c @@ -767,7 +767,7 @@ static void ItemPc_MoveItemModeInit(u8 taskId, s16 pos) { s16 * data = gTasks[taskId].data; - ListMenuSetUnkIndicatorsStructField(data[0], 16, 1); + ListMenuSetTemplateField(data[0], LISTFIELD_CURSORKIND, 1); data[1] = pos; sStateDataPtr->moveModeOrigPos = pos; StringCopy(gStringVar1, ItemId_GetName(ItemPc_GetItemIdBySlotId(data[1]))); diff --git a/src/librfu_intr.c b/src/librfu_intr.c index 41085182a..4c2f2573a 100644 --- a/src/librfu_intr.c +++ b/src/librfu_intr.c @@ -147,11 +147,7 @@ static void sio32intr_clock_slave(void) { u32 regSIODATA32; u32 r0; - #ifndef NONMATCHING - register u32 reqLen asm("r2"); - #else - u32 reqLen; - #endif + u32 reqLen; gSTWIStatus->timerActive = 0; STWI_set_timer_in_RAM(100); @@ -164,10 +160,14 @@ static void sio32intr_clock_slave(void) ((u32*)gSTWIStatus->rxPacket)[0] = regSIODATA32; gSTWIStatus->reqNext = 1; r0 = 0x99660000; - if ((regSIODATA32 >> 16) == (r0 >> 16)) + // variable reuse required + reqLen = (regSIODATA32 >> 16); + if (reqLen == (r0 >> 16)) { + // only reqLen = regSIODATA32 >> 8 is required to match, but it looks a bit + // more consistent when both lines update the variables. Might have been a macro? gSTWIStatus->reqLength = reqLen = regSIODATA32 >> 8; - gSTWIStatus->reqActiveCommand = regSIODATA32; + gSTWIStatus->reqActiveCommand = reqLen = (regSIODATA32 >> 0); if (gSTWIStatus->reqLength == 0) { if ( diff --git a/src/librfu_rfu.c b/src/librfu_rfu.c index e82c8ed7b..9f642907b 100644 --- a/src/librfu_rfu.c +++ b/src/librfu_rfu.c @@ -1758,9 +1758,6 @@ static void rfu_constructSendLLFrame(void) { u8 *maxSize = llf_p - offsetof(struct RfuFixed, LLFBuffer[1]); - // Does the volatile qualifier make sense? - // It's the same as: - // asm("":::"memory"); pakcketSize = maxSize - *(u8 *volatile *)&gRfuFixed; } } diff --git a/src/librfu_sio32id.c b/src/librfu_sio32id.c index b6623540f..d726bca7b 100644 --- a/src/librfu_sio32id.c +++ b/src/librfu_sio32id.c @@ -123,34 +123,30 @@ static void Sio32IDIntr(void) { u32 regSIODATA32; u16 delay; -#ifndef NONMATCHING - register u32 rfuSIO32IdUnk0_times_16 asm("r1"); - register u16 negRfuSIO32IdUnk6 asm("r0"); -#else u32 rfuSIO32IdUnk0_times_16; u16 negRfuSIO32IdUnk6; -#endif regSIODATA32 = REG_SIODATA32; if (gRfuSIO32Id.MS_mode != AGB_CLK_MASTER) REG_SIOCNT |= SIO_ENABLE; - rfuSIO32IdUnk0_times_16 = 16 * gRfuSIO32Id.MS_mode; // to handle side effect of inline asm - rfuSIO32IdUnk0_times_16 = (regSIODATA32 << rfuSIO32IdUnk0_times_16) >> 16; + rfuSIO32IdUnk0_times_16 = (regSIODATA32 << (16 * gRfuSIO32Id.MS_mode)) >> 16; regSIODATA32 = (regSIODATA32 << 16 * (1 - gRfuSIO32Id.MS_mode)) >> 16; if (gRfuSIO32Id.lastId == 0) { - if (rfuSIO32IdUnk0_times_16 == gRfuSIO32Id.recv_id) + u16 backup = rfuSIO32IdUnk0_times_16; + if (backup == gRfuSIO32Id.recv_id) { - if (gRfuSIO32Id.count > 3) + if (gRfuSIO32Id.count < 4) { - gRfuSIO32Id.lastId = regSIODATA32; - } - else if (rfuSIO32IdUnk0_times_16 == (u16)~gRfuSIO32Id.send_id) - { - negRfuSIO32IdUnk6 = ~gRfuSIO32Id.recv_id; - if (regSIODATA32 == negRfuSIO32IdUnk6) - ++gRfuSIO32Id.count; + backup = (u16)~gRfuSIO32Id.send_id; + if (gRfuSIO32Id.recv_id == backup) + { + if (regSIODATA32 == (u16)~gRfuSIO32Id.recv_id) + ++gRfuSIO32Id.count; + } } + else + gRfuSIO32Id.lastId = regSIODATA32; } else { diff --git a/src/list_menu.c b/src/list_menu.c index 5d3cb037f..d1e69c2ff 100644 --- a/src/list_menu.c +++ b/src/list_menu.c @@ -11,29 +11,6 @@ #include "pokemon_icon.h" #include "constants/songs.h" -struct UnkIndicatorsStruct -{ - u8 field_0; - u16 *field_4; - u16 field_8; - u16 field_A; - u16 field_C; - u16 field_E; - u8 field_10; - u8 field_11; - u8 field_12; - u8 field_13; - u8 field_14_0:4; - u8 field_14_1:4; - u8 field_15_0:4; - u8 field_15_1:4; - u8 field_16_0:3; - u8 field_16_1:3; - u8 field_16_2:2; - u8 field_17_0:6; - u8 field_17_1:2; -}; - struct MysteryGiftLinkMenuStruct { u32 currItemId; @@ -646,114 +623,114 @@ void ListMenuDefaultCursorMoveFunc(s32 itemIndex, bool8 onInit, struct ListMenu PlaySE(SE_SELECT); } -static s32 ListMenuGetUnkIndicatorsStructFields(u8 taskId, u8 field) +static s32 ListMenuGetTemplateField(u8 taskId, u8 field) { - struct UnkIndicatorsStruct *data = (struct UnkIndicatorsStruct *)gTasks[taskId].data; + struct ListMenu *data = (struct ListMenu *)gTasks[taskId].data; switch (field) { - case 0: - case 1: - return (s32)(data->field_4); - case 2: - return data->field_C; - case 3: - return data->field_E; - case 4: - return data->field_10; - case 5: - return data->field_11; - case 6: - return data->field_12; - case 7: - return data->field_13; - case 8: - return data->field_14_0; - case 9: - return data->field_14_1; - case 10: - return data->field_15_0; - case 11: - return data->field_15_1; - case 12: - return data->field_16_0; - case 13: - return data->field_16_1; - case 14: - return data->field_16_2; - case 15: - return data->field_17_0; - case 16: - return data->field_17_1; + case LISTFIELD_MOVECURSORFUNC: + case LISTFIELD_MOVECURSORFUNC2: + return (s32)(data->template.moveCursorFunc); + case LISTFIELD_TOTALITEMS: + return data->template.totalItems; + case LISTFIELD_MAXSHOWED: + return data->template.maxShowed; + case LISTFIELD_WINDOWID: + return data->template.windowId; + case LISTFIELD_HEADERX: + return data->template.header_X; + case LISTFIELD_ITEMX: + return data->template.item_X; + case LISTFIELD_CURSORX: + return data->template.cursor_X; + case LISTFIELD_UPTEXTY: + return data->template.upText_Y; + case LISTFIELD_CURSORPAL: + return data->template.cursorPal; + case LISTFIELD_FILLVALUE: + return data->template.fillValue; + case LISTFIELD_CURSORSHADOWPAL: + return data->template.cursorShadowPal; + case LISTFIELD_LETTERSPACING: + return data->template.lettersSpacing; + case LISTFIELD_ITEMVERTICALPADDING: + return data->template.itemVerticalPadding; + case LISTFIELD_SCROLLMULTIPLE: + return data->template.scrollMultiple; + case LISTFIELD_FONTID: + return data->template.fontId; + case LISTFIELD_CURSORKIND: + return data->template.cursorKind; default: return -1; } } -void ListMenuSetUnkIndicatorsStructField(u8 taskId, u8 field, s32 value) +void ListMenuSetTemplateField(u8 taskId, u8 field, s32 value) { - struct UnkIndicatorsStruct *data = (struct UnkIndicatorsStruct *)gTasks[taskId].data; + struct ListMenu *data = (struct ListMenu *)gTasks[taskId].data; switch (field) { - case 0: - case 1: - data->field_4 = (void *)value; + case LISTFIELD_MOVECURSORFUNC: + case LISTFIELD_MOVECURSORFUNC2: + data->template.moveCursorFunc = (void *)value; break; - case 2: - data->field_C = value; + case LISTFIELD_TOTALITEMS: + data->template.totalItems = value; break; - case 3: - data->field_E = value; + case LISTFIELD_MAXSHOWED: + data->template.maxShowed = value; break; - case 4: - data->field_10 = value; + case LISTFIELD_WINDOWID: + data->template.windowId = value; break; - case 5: - data->field_11 = value; + case LISTFIELD_HEADERX: + data->template.header_X = value; break; - case 6: - data->field_12 = value; + case LISTFIELD_ITEMX: + data->template.item_X = value; break; - case 7: - data->field_13 = value; + case LISTFIELD_CURSORX: + data->template.cursor_X = value; break; - case 8: - data->field_14_0 = value; + case LISTFIELD_UPTEXTY: + data->template.upText_Y = value; break; - case 9: - data->field_14_1 = value; + case LISTFIELD_CURSORPAL: + data->template.cursorPal = value; break; - case 10: - data->field_15_0 = value; + case LISTFIELD_FILLVALUE: + data->template.fillValue = value; break; - case 11: - data->field_15_1 = value; + case LISTFIELD_CURSORSHADOWPAL: + data->template.cursorShadowPal = value; break; - case 12: - data->field_16_0 = value; + case LISTFIELD_LETTERSPACING: + data->template.lettersSpacing = value; break; - case 13: - data->field_16_1 = value; + case LISTFIELD_ITEMVERTICALPADDING: + data->template.itemVerticalPadding = value; break; - case 14: - data->field_16_2 = value; + case LISTFIELD_SCROLLMULTIPLE: + data->template.scrollMultiple = value; break; - case 15: - data->field_17_0 = value; + case LISTFIELD_FONTID: + data->template.fontId = value; break; - case 16: - data->field_17_1 = value; + case LISTFIELD_CURSORKIND: + data->template.cursorKind = value; break; } } -void sub_8107CD8(u8 palOffset, u16 speciesId) +void ListMenu_LoadMonIconPalette(u8 palOffset, u16 speciesId) { LoadPalette(GetValidMonIconPalettePtr(speciesId), palOffset, 0x20); } -void sub_8107CF8(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y) +void ListMenu_DrawMonIconGraphics(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y) { BlitBitmapToWindow(windowId, GetMonIconPtr(speciesId, personality, 1), x, y, 32, 32); } diff --git a/src/move_descriptions.c b/src/move_descriptions.c new file mode 100644 index 000000000..8ece0e12d --- /dev/null +++ b/src/move_descriptions.c @@ -0,0 +1,714 @@ +#include "global.h" +#include "constants/moves.h" + +const u8 gMoveDescription_Pound[] = _("A physical attack\ndelivered with a\nlong tail or a\nforeleg, etc."); +const u8 gMoveDescription_KarateChop[] = _("The foe is attacked\nwith a sharp chop.\nIt has a high\ncritical-hit ratio."); +const u8 gMoveDescription_DoubleSlap[] = _("The foe is slapped\nrepeatedly, back\nand forth, two to\nfive times."); +const u8 gMoveDescription_CometPunch[] = _("The foe is hit with\na flurry of punches\nthat strike two to\nfive times."); +const u8 gMoveDescription_MegaPunch[] = _("The foe is slugged\nby a punch thrown\nwith muscle-packed\npower."); +const u8 gMoveDescription_PayDay[] = _("Numerous coins are\nhurled at the foe.\nMoney is earned\nafter battle."); +const u8 gMoveDescription_FirePunch[] = _("The foe is punched\nwith a fiery fist.\nIt may leave the\nfoe with a burn."); +const u8 gMoveDescription_IcePunch[] = _("The foe is punched\nwith an icy fist.\nIt may leave the\nfoe frozen."); +const u8 gMoveDescription_ThunderPunch[] = _("The foe is punched\nwith an electrified\nfist. It may leave\nthe foe paralyzed."); +const u8 gMoveDescription_Scratch[] = _("Hard, pointed, and\nsharp claws rake\nthe foe."); +const u8 gMoveDescription_ViceGrip[] = _("Huge, impressive\npincers grip and\nsqueeze the foe."); +const u8 gMoveDescription_Guillotine[] = _("A vicious tearing\nattack with pincers.\nThe foe will faint\nif it hits."); +const u8 gMoveDescription_RazorWind[] = _("Blades of wind hit\nthe foe on the 2nd\nturn. It has a high\ncritical-hit ratio."); +const u8 gMoveDescription_SwordsDance[] = _("A frenetic dance of\nfighting. It sharply\nraises the ATTACK\nstat."); +const u8 gMoveDescription_Cut[] = _("A basic attack.\nIt can be used to\ncut down thin trees\nand grass."); +const u8 gMoveDescription_Gust[] = _("Strikes the foe\nwith a gust of wind\nwhipped up by\nwings."); +const u8 gMoveDescription_WingAttack[] = _("The foe is struck\nwith large, imposing\nwings spread wide."); +const u8 gMoveDescription_Whirlwind[] = _("The foe is made to\nswitch out with an\nally. In the wild,\nthe battle ends."); +const u8 gMoveDescription_Fly[] = _("A 2-turn move that\nhits on the 2nd\nturn. Use it to fly\nto any known town."); +const u8 gMoveDescription_Bind[] = _("A long body or\ntentacles are used\nto bind the foe for\ntwo to five turns."); +const u8 gMoveDescription_Slam[] = _("The foe is struck\nwith a long tail,\nvines, etc."); +const u8 gMoveDescription_VineWhip[] = _("The foe is struck\nwith slender, whip-\nlike vines."); +const u8 gMoveDescription_Stomp[] = _("The foe is stomped\nwith a big foot.\nIt may make the\nfoe flinch."); +const u8 gMoveDescription_DoubleKick[] = _("Two legs are used\nto quickly kick the\nfoe twice in one\nturn."); +const u8 gMoveDescription_MegaKick[] = _("The foe is attacked\nby a kick fired\nwith muscle-packed\npower."); +const u8 gMoveDescription_JumpKick[] = _("The user jumps up\nhigh, then kicks.\nIf it misses, the\nuser hurts itself."); +const u8 gMoveDescription_RollingKick[] = _("A quick kick from a\nrolling spin.\nIt may make the\nfoe flinch."); +const u8 gMoveDescription_SandAttack[] = _("A lot of sand is\nhurled in the foe's\nface, reducing its\naccuracy."); +const u8 gMoveDescription_Headbutt[] = _("The user sticks its\nhead out and rams.\nIt may make the\nfoe flinch."); +const u8 gMoveDescription_HornAttack[] = _("The foe is jabbed\nwith a sharply\npointed horn to\ninflict damage."); +const u8 gMoveDescription_FuryAttack[] = _("The foe is jabbed\nrepeatedly with a\nhorn or beak two to\nfive times."); +const u8 gMoveDescription_HornDrill[] = _("The horn is rotated\nlike a drill to ram.\nThe foe will faint\nif it hits."); +const u8 gMoveDescription_Tackle[] = _("A physical attack\nin which the user\ncharges, full body,\ninto the foe."); +const u8 gMoveDescription_BodySlam[] = _("The user drops its\nfull body on the\nfoe. It may leave\nthe foe paralyzed."); +const u8 gMoveDescription_Wrap[] = _("A long body or\nvines are used to\nwrap the foe for\ntwo to five turns."); +const u8 gMoveDescription_TakeDown[] = _("A reckless, full-\nbody charge attack\nthat also hurts the\nuser a little."); +const u8 gMoveDescription_Thrash[] = _("The user rampages\nabout for two to\nthree turns, then\nbecomes confused."); +const u8 gMoveDescription_DoubleEdge[] = _("A reckless, life-\nrisking tackle that\nalso hurts the user\na little."); +const u8 gMoveDescription_TailWhip[] = _("The user wags its\ntail cutely, making\nthe foe lower its\nDEFENSE stat."); +const u8 gMoveDescription_PoisonSting[] = _("The foe is stabbed\nwith a toxic barb,\netc. It may poison\nthe foe."); +const u8 gMoveDescription_Twineedle[] = _("The foe is stabbed\ntwice with foreleg\nstingers. It may\npoison the foe."); +const u8 gMoveDescription_PinMissile[] = _("Sharp pins are shot\nat the foe and hit\ntwo to five times\nat once."); +const u8 gMoveDescription_Leer[] = _("The foe is given an\nintimidating look\nthat lowers its\nDEFENSE stat."); +const u8 gMoveDescription_Bite[] = _("The user bites with\nvicious fangs.\nIt may make the\nfoe flinch."); +const u8 gMoveDescription_Growl[] = _("The user growls in\na cute way, making\nthe foe lower its\nATTACK stat."); +const u8 gMoveDescription_Roar[] = _("The foe is made to\nswitch out with an\nally. In the wild,\nthe battle ends."); +const u8 gMoveDescription_Sing[] = _("A soothing song\nin a calming voice\nlulls the foe into\na deep slumber."); +const u8 gMoveDescription_Supersonic[] = _("The user generates\nodd sound waves.\nIt may confuse the\nfoe."); +const u8 gMoveDescription_SonicBoom[] = _("The foe is hit with\na shock wave that\nalways inflicts 20-\nHP damage."); +const u8 gMoveDescription_Disable[] = _("For a few turns,\nit prevents the foe\nfrom using the move\nit last used."); +const u8 gMoveDescription_Acid[] = _("The foe is sprayed\nwith a harsh, hide-\nmelting acid that\nmay lower DEFENSE."); +const u8 gMoveDescription_Ember[] = _("The foe is attacked\nwith small flames.\nThe foe may suffer\na burn."); +const u8 gMoveDescription_Flamethrower[] = _("The foe is scorched\nwith intense flames.\nThe foe may suffer\na burn."); +const u8 gMoveDescription_Mist[] = _("The ally party is\nprotected by a\nmist that prevents\nstat reductions."); +const u8 gMoveDescription_WaterGun[] = _("The foe is struck\nwith a lot of water\nexpelled forcibly\nfrom the mouth."); +const u8 gMoveDescription_HydroPump[] = _("A high volume of\nwater is blasted at\nthe foe under great\npressure."); +const u8 gMoveDescription_Surf[] = _("A big wave crashes\ndown on the foe.\nCan also be used\nfor crossing water."); +const u8 gMoveDescription_IceBeam[] = _("The foe is struck\nwith an icy beam.\nIt may freeze the\nfoe solid."); +const u8 gMoveDescription_Blizzard[] = _("The foe is blasted\nwith a blizzard.\nIt may freeze the\nfoe solid."); +const u8 gMoveDescription_Psybeam[] = _("A peculiar ray is\nshot at the foe.\nIt may leave the\nfoe confused."); +const u8 gMoveDescription_BubbleBeam[] = _("A spray of bubbles\nstrikes the foe.\nIt may lower the\nfoe's SPEED stat."); +const u8 gMoveDescription_AuroraBeam[] = _("A rainbow-colored\nattack beam.\nIt may lower the\nfoe's ATTACK stat."); +const u8 gMoveDescription_HyperBeam[] = _("A severely damaging\nattack that makes\nthe user rest on\nthe next turn."); +const u8 gMoveDescription_Peck[] = _("The foe is jabbed\nwith a sharply\npointed beak or\nhorn."); +const u8 gMoveDescription_DrillPeck[] = _("A corkscrewing\nattack with the\nsharp beak acting\nas a drill."); +const u8 gMoveDescription_Submission[] = _("A reckless, full-\nbody throw attack\nthat also hurts the\nuser a little."); +const u8 gMoveDescription_LowKick[] = _("A low, tripping kick\nthat inflicts more\ndamage on heavier\nfoes."); +const u8 gMoveDescription_Counter[] = _("A retaliation move\nthat counters any\nphysical hit with\ndouble the damage."); +const u8 gMoveDescription_SeismicToss[] = _("A gravity-fed throw\nthat causes damage\nmatching the user's\nlevel."); +const u8 gMoveDescription_Strength[] = _("The foe is slugged\nat maximum power.\nCan also be used\nto move boulders."); +const u8 gMoveDescription_Absorb[] = _("An attack that\nabsorbs half the\ndamage it inflicted\nto restore HP."); +const u8 gMoveDescription_MegaDrain[] = _("A tough attack that\ndrains half the\ndamage it inflicted\nto restore HP."); +const u8 gMoveDescription_LeechSeed[] = _("A seed is planted\non the foe to steal\nsome HP for the \nuser on every turn."); +const u8 gMoveDescription_Growth[] = _("The user's body is\nforced to grow,\nraising the SP.\nATK stat."); +const u8 gMoveDescription_RazorLeaf[] = _("The foe is hit with\na cutting leaf.\nIt has a high\ncritical-hit ratio."); +const u8 gMoveDescription_SolarBeam[] = _("A 2-turn move that\nblasts the foe with\nabsorbed energy in\nthe 2nd turn."); +const u8 gMoveDescription_PoisonPowder[] = _("A cloud of toxic\ndust is scattered.\nIt may poison the\nfoe."); +const u8 gMoveDescription_StunSpore[] = _("Paralyzing dust is\nscattered wildly.\nIt may paralyze\nthe foe."); +const u8 gMoveDescription_SleepPowder[] = _("A sleep-inducing\ndust is scattered\nin high volume\naround a foe."); +const u8 gMoveDescription_PetalDance[] = _("The user attacks\nwith petals for two\nto three turns,\nthen gets confused."); +const u8 gMoveDescription_StringShot[] = _("The foe is bound\nwith strings shot\nfrom the mouth to\nreduce its SPEED."); +const u8 gMoveDescription_DragonRage[] = _("The foe is hit with\na shock wave that\nalways inflicts 40-\nHP damage."); +const u8 gMoveDescription_FireSpin[] = _("The foe is trapped\nin an intense spiral\nof fire that rages\ntwo to five turns."); +const u8 gMoveDescription_ThunderShock[] = _("An electric shock\nattack that may\nalso leave the foe\nparalyzed."); +const u8 gMoveDescription_Thunderbolt[] = _("A strong electrical\nattack that may\nalso leave the foe\nparalyzed."); +const u8 gMoveDescription_ThunderWave[] = _("A weak electric\nshock that is sure\nto cause paralysis\nif it hits."); +const u8 gMoveDescription_Thunder[] = _("A brutal lightning\nattack that may\nalso leave the foe\nparalyzed."); +const u8 gMoveDescription_RockThrow[] = _("The foe is attacked\nwith a shower of\nsmall, easily\nthrown rocks."); +const u8 gMoveDescription_Earthquake[] = _("An earthquake that\nstrikes all POKéMON\nin battle excluding\nthe user."); +const u8 gMoveDescription_Fissure[] = _("The foe is dropped\ninto a fissure.\nThe foe faints if it\nhits."); +const u8 gMoveDescription_Dig[] = _("An attack that hits\non the 2nd turn.\nCan also be used\nto exit dungeons."); +const u8 gMoveDescription_Toxic[] = _("A move that badly\npoisons the foe.\nIts poison damage\nworsens every turn."); +const u8 gMoveDescription_Confusion[] = _("A weak telekinetic\nattack that may\nalso leave the foe\nconfused."); +const u8 gMoveDescription_Psychic[] = _("A strong telekinetic\nattack. It may also\nlower the foe's\nSP. DEF stat."); +const u8 gMoveDescription_Hypnosis[] = _("Hypnotic suggestion\nis used to make the\nfoe fall into a\ndeep sleep."); +const u8 gMoveDescription_Meditate[] = _("The user meditates\nto awaken its power\nand raise its\nATTACK stat."); +const u8 gMoveDescription_Agility[] = _("The user relaxes\nand lightens its\nbody to sharply\nboost its SPEED."); +const u8 gMoveDescription_QuickAttack[] = _("An almost invisibly\nfast attack that\nis certain to strike\nfirst."); +const u8 gMoveDescription_Rage[] = _("An attack that\nbecomes stronger\neach time the user\nis hit in battle."); +const u8 gMoveDescription_Teleport[] = _("Use it to flee from\nany wild POKéMON.\nAlso warps to the\nlast POKé CENTER."); +const u8 gMoveDescription_NightShade[] = _("An attack with a\nmirage that inflicts\ndamage matching\nthe user's level."); +const u8 gMoveDescription_Mimic[] = _("The user copies the\nmove last used by\nthe foe for the\nrest of the battle."); +const u8 gMoveDescription_Screech[] = _("An ear-splitting\nscreech is emitted\nto sharply reduce\nthe foe's DEFENSE."); +const u8 gMoveDescription_DoubleTeam[] = _("The user creates\nillusory copies of\nitself to raise its\nevasiveness."); +const u8 gMoveDescription_Recover[] = _("A self-healing move\nthat restores HP by\nup to half of the\nuser's maximum HP."); +const u8 gMoveDescription_Harden[] = _("The user stiffens\nall the muscles in\nits body to raise\nits DEFENSE stat."); +const u8 gMoveDescription_Minimize[] = _("The user compresses\nall the cells in its\nbody to raise its\nevasiveness."); +const u8 gMoveDescription_Smokescreen[] = _("An obscuring cloud\nof smoke or ink\nreduces the foe's\naccuracy."); +const u8 gMoveDescription_ConfuseRay[] = _("The foe is exposed\nto a sinister ray\nthat triggers\nconfusion."); +const u8 gMoveDescription_Withdraw[] = _("The user withdraws\nits body in its hard\nshell, raising its\nDEFENSE stat."); +const u8 gMoveDescription_DefenseCurl[] = _("The user curls up\nto conceal weak\nspots and raise its\nDEFENSE stat."); +const u8 gMoveDescription_Barrier[] = _("The user creates a\nsturdy wall that\nsharply raises its\nDEFENSE stat."); +const u8 gMoveDescription_LightScreen[] = _("A wall of light\ncuts damage from\nSP. ATK attacks\nfor five turns."); +const u8 gMoveDescription_Haze[] = _("Eliminates all stat\nchanges among all\nPOKéMON engaged in\nbattle."); +const u8 gMoveDescription_Reflect[] = _("A wall of light\ncuts damage from\nphysical attacks\nfor five turns."); +const u8 gMoveDescription_FocusEnergy[] = _("The user takes a\ndeep breath and\nfocuses to raise its\ncritical-hit ratio."); +const u8 gMoveDescription_Bide[] = _("The user endures\nattacks for two\nturns, then strikes\nback double."); +const u8 gMoveDescription_Metronome[] = _("Waggles a finger\nand stimulates the\nbrain into using any\nmove at random."); +const u8 gMoveDescription_MirrorMove[] = _("The user counters\nthe move last used\nby the foe with the\nsame move."); +const u8 gMoveDescription_SelfDestruct[] = _("The user blows up\nto inflict severe\ndamage, even\nmaking itself faint."); +const u8 gMoveDescription_EggBomb[] = _("A large egg is\nhurled with great\nforce at the foe to\ninflict damage."); +const u8 gMoveDescription_Lick[] = _("The foe is licked\nand hit with a long\ntongue. It may\nalso paralyze."); +const u8 gMoveDescription_Smog[] = _("The foe is attacked\nwith exhaust gases.\nIt may also poison\nthe foe."); +const u8 gMoveDescription_Sludge[] = _("Toxic sludge is\nhurled at the foe.\nIt may poison the\ntarget."); +const u8 gMoveDescription_BoneClub[] = _("The foe is clubbed\nwith a bone held in\nhand. It may make\nthe foe flinch."); +const u8 gMoveDescription_FireBlast[] = _("The foe is hit with\nan intense flame.\nIt may leave the\ntarget with a burn."); +const u8 gMoveDescription_Waterfall[] = _("A powerful charge\nattack. It can also\nbe used to climb\na waterfall."); +const u8 gMoveDescription_Clamp[] = _("The foe is clamped\nand squeezed by\nthe user's shell for\ntwo to five turns."); +const u8 gMoveDescription_Swift[] = _("Star-shaped rays\nthat never miss are\nfired at all foes in\nbattle."); +const u8 gMoveDescription_SkullBash[] = _("The user raises its\nDEFENSE in the 1st\nturn, then attacks\nin the 2nd turn."); +const u8 gMoveDescription_SpikeCannon[] = _("Sharp spikes are\nfired at the foe to\nstrike two to five\ntimes."); +const u8 gMoveDescription_Constrict[] = _("The foe is attacked\nwith long tentacles\nor vines. It may\nlower SPEED."); +const u8 gMoveDescription_Amnesia[] = _("Forgets about\nsomething and\nsharply raises\nSP. DEF."); +const u8 gMoveDescription_Kinesis[] = _("The user distracts\nthe foe by bending\na spoon. It may\nlower accuracy."); +const u8 gMoveDescription_SoftBoiled[] = _("Heals the user by\nup to half its full\nHP. It can be used\nto heal an ally."); +const u8 gMoveDescription_HiJumpKick[] = _("A strong jumping\nknee kick. If it\nmisses, the user is\nhurt."); +const u8 gMoveDescription_Glare[] = _("The user intimidates\nthe foe with the\ndesign on its belly\nto cause paralysis."); +const u8 gMoveDescription_DreamEater[] = _("Absorbs half the\ndamage it inflicted\non a sleeping foe\nto restore HP."); +const u8 gMoveDescription_PoisonGas[] = _("The foe is sprayed\nwith a cloud of\ntoxic gas that may\npoison the foe."); +const u8 gMoveDescription_Barrage[] = _("Round objects are\nhurled at the foe\nto strike two to\nfive times."); +const u8 gMoveDescription_LeechLife[] = _("An attack that\nabsorbs half the\ndamage it inflicted\nto restore HP."); +const u8 gMoveDescription_LovelyKiss[] = _("The user forces a\nkiss on the foe\nwith a scary face\nthat induces sleep."); +const u8 gMoveDescription_SkyAttack[] = _("A 2nd-turn attack\nmove with a high\ncritical-hit ratio.\nThe foe may flinch."); +const u8 gMoveDescription_Transform[] = _("The user transforms\ninto a copy of the\nfoe with even the\nsame move set."); +const u8 gMoveDescription_Bubble[] = _("A spray of bubbles\nhits the foe.\nIt may lower the\nfoe's SPEED stat."); +const u8 gMoveDescription_DizzyPunch[] = _("The foe is hit with\na rhythmic punch\nthat may leave it\nconfused."); +const u8 gMoveDescription_Spore[] = _("The user scatters\nbursts of fine\nspores that induce\nsleep."); +const u8 gMoveDescription_Flash[] = _("A blast of light\nthat cuts the foe's\naccuracy. It also\nilluminates caves."); +const u8 gMoveDescription_Psywave[] = _("The foe is attacked\nwith an odd, hot\nenergy wave that\nvaries in intensity."); +const u8 gMoveDescription_Splash[] = _("The user just flops\nand splashes around\nwithout having any\neffect."); +const u8 gMoveDescription_AcidArmor[] = _("The user alters its\ncells to liquefy\nitself and sharply\nraise DEFENSE."); +const u8 gMoveDescription_Crabhammer[] = _("A large pincer is\nused to hammer the\nfoe. It has a high\ncritical-hit ratio."); +const u8 gMoveDescription_Explosion[] = _("The user explodes\nto inflict terrible\ndamage even while\nfainting itself."); +const u8 gMoveDescription_FurySwipes[] = _("The foe is raked\nwith sharp claws or\nscythes two to five\ntimes."); +const u8 gMoveDescription_Bonemerang[] = _("The user throws a\nbone that hits the\nfoe once, then once\nagain on return."); +const u8 gMoveDescription_Rest[] = _("The user sleeps for\ntwo turns to fully\nrestore HP and heal\nany status problem."); +const u8 gMoveDescription_RockSlide[] = _("Large boulders are\nhurled at the foe.\nIt may make the\nfoe flinch."); +const u8 gMoveDescription_HyperFang[] = _("The foe is attacked\nwith sharp fangs.\nIt may make the\nfoe flinch."); +const u8 gMoveDescription_Sharpen[] = _("The user reduces\nits polygon count\nto sharpen edges\nand raise ATTACK."); +const u8 gMoveDescription_Conversion[] = _("The user changes\nits type to match\nthe type of one of\nits moves."); +const u8 gMoveDescription_TriAttack[] = _("A simultaneous\n3-beam attack that\nmay paralyze, burn,\nor freeze the foe."); +const u8 gMoveDescription_SuperFang[] = _("The user attacks\nwith sharp fangs\nand halves the\nfoe's HP."); +const u8 gMoveDescription_Slash[] = _("The foe is slashed\nwith claws, etc.\nIt has a high\ncritical-hit ratio."); +const u8 gMoveDescription_Substitute[] = _("The user creates a\ndecoy using one-\nquarter of its full\nHP."); +const u8 gMoveDescription_Struggle[] = _("An attack that is\nused only if there\nis no PP. It also\nhurts the user."); +const u8 gMoveDescription_Sketch[] = _("This move copies\nthe move last used\nby the foe, then\ndisappears."); +const u8 gMoveDescription_TripleKick[] = _("A 3-kick attack\nthat becomes more\npowerful with each\nsuccessive hit."); +const u8 gMoveDescription_Thief[] = _("An attack that may\ntake the foe's held\nitem if the user\nisn't holding one."); +const u8 gMoveDescription_SpiderWeb[] = _("Ensnares the foe \nwith sticky string\nso it doesn't flee\nor switch out."); +const u8 gMoveDescription_MindReader[] = _("The user predicts\nthe foe's action to\nensure its next\nattack hits."); +const u8 gMoveDescription_Nightmare[] = _("A sleeping foe is\nshown a nightmare\nthat inflicts some\ndamage every turn."); +const u8 gMoveDescription_FlameWheel[] = _("The user makes a\nfiery charge at the\nfoe. It may cause\na burn."); +const u8 gMoveDescription_Snore[] = _("An attack that can\nbe used only while\nasleep. It may\ncause flinching."); +const u8 gMoveDescription_Curse[] = _("A move that works\ndifferently for the\nGHOST-type and all\nthe other types."); +const u8 gMoveDescription_Flail[] = _("A desperate attack\nthat becomes more\npowerful the less\nHP the user has."); +const u8 gMoveDescription_Conversion2[] = _("The user changes\ntype to make itself\nresistant to the\nlast attack it took."); +const u8 gMoveDescription_Aeroblast[] = _("A vortex of air is\nshot at the foe.\nIt has a high\ncritical-hit ratio."); +const u8 gMoveDescription_CottonSpore[] = _("Cotton-like spores\ncling to the foe,\nsharply reducing\nits SPEED stat."); +const u8 gMoveDescription_Reversal[] = _("An all-out attack\nthat becomes more\npowerful the less\nHP the user has."); +const u8 gMoveDescription_Spite[] = _("A move that cuts\n2 to 5 PP from the\nmove last used by\nthe foe."); +const u8 gMoveDescription_PowderSnow[] = _("Blasts the foe with\na snowy gust.\nIt may cause\nfreezing."); +const u8 gMoveDescription_Protect[] = _("Enables the user to\nevade all attacks.\nIt may fail if used\nin succession."); +const u8 gMoveDescription_MachPunch[] = _("A punch thrown at\nblinding speed.\nIt is certain to\nstrike first."); +const u8 gMoveDescription_ScaryFace[] = _("Frightens the foe\nwith a scary face\nto sharply reduce\nits SPEED."); +const u8 gMoveDescription_FaintAttack[] = _("The user draws up\nclose to the foe\ndisarmingly, then\nhits without fail."); +const u8 gMoveDescription_SweetKiss[] = _("The user kisses\nthe foe with sweet\ncuteness that\ncauses confusion."); +const u8 gMoveDescription_BellyDrum[] = _("The user maximizes\nits ATTACK stat at\nthe cost of half\nits full HP."); +const u8 gMoveDescription_SludgeBomb[] = _("Filthy sludge is\nhurled at the foe.\nIt may poison the\ntarget."); +const u8 gMoveDescription_MudSlap[] = _("Mud is hurled in\nthe foe's face to\ninflict damage and\nlower its accuracy."); +const u8 gMoveDescription_Octazooka[] = _("Ink is blasted in\nthe foe's face or\neyes to damage and\nlower accuracy."); +const u8 gMoveDescription_Spikes[] = _("A trap of spikes is\nlaid around the\nfoe's party to hurt\nfoes switching in."); +const u8 gMoveDescription_ZapCannon[] = _("An electric blast is\nfired like a cannon\nto inflict damage\nand paralyze."); +const u8 gMoveDescription_Foresight[] = _("Completely negates\nthe foe's efforts to\nheighten its ability\nto evade."); +const u8 gMoveDescription_DestinyBond[] = _("If the user faints,\nthe foe delivering\nthe final hit also\nfaints."); +const u8 gMoveDescription_PerishSong[] = _("Any battler that\nhears this faints\nin three turns\nunless it switches."); +const u8 gMoveDescription_IcyWind[] = _("A chilling wind is\nused to attack.\nIt also lowers the\nSPEED stat."); +const u8 gMoveDescription_Detect[] = _("Enables the user to\nevade all attacks.\nIt may fail if used\nin succession."); +const u8 gMoveDescription_BoneRush[] = _("The user strikes\nthe foe with a bone\nin hand two to five\ntimes."); +const u8 gMoveDescription_LockOn[] = _("The user locks on\nto the foe, making\nthe next move sure\nto hit."); +const u8 gMoveDescription_Outrage[] = _("The user thrashes\nabout for two to\nthree turns, then\nbecomes confused."); +const u8 gMoveDescription_Sandstorm[] = _("A 5-turn sandstorm\nthat damages all\ntypes except ROCK,\nGROUND, and STEEL."); +const u8 gMoveDescription_GigaDrain[] = _("A harsh attack that\nabsorbs half the\ndamage it inflicted\nto restore HP."); +const u8 gMoveDescription_Endure[] = _("The user endures\nany hit with 1 HP\nleft. It may fail if\nused in succession."); +const u8 gMoveDescription_Charm[] = _("The foe is charmed\nby the user's cute\nappeals, sharply\ncutting its ATTACK."); +const u8 gMoveDescription_Rollout[] = _("A 5-turn rolling\nattack that becomes\nstronger each time\nit hits."); +const u8 gMoveDescription_FalseSwipe[] = _("A restrained attack\nthat always leaves\nthe foe with at\nleast 1 HP."); +const u8 gMoveDescription_Swagger[] = _("A move that makes\nthe foe confused,\nbut also sharply\nraises its ATTACK."); +const u8 gMoveDescription_MilkDrink[] = _("Heals the user by\nup to half its full\nHP. It can be used\nto heal an ally."); +const u8 gMoveDescription_Spark[] = _("An electrically\ncharged tackle that\nmay also paralyze\nthe foe."); +const u8 gMoveDescription_FuryCutter[] = _("An attack that\ngrows stronger on\neach successive\nhit."); +const u8 gMoveDescription_SteelWing[] = _("The foe is hit with\nwings of steel.\nIt may also raise\nthe user's DEFENSE."); +const u8 gMoveDescription_MeanLook[] = _("The foe is fixed\nwith a mean look\nthat prevents it\nfrom escaping."); +const u8 gMoveDescription_Attract[] = _("If it is the other\ngender, the foe is\nmade infatuated and\nunlikely to attack."); +const u8 gMoveDescription_SleepTalk[] = _("While asleep, the\nuser randomly uses\none of the moves it\nknows."); +const u8 gMoveDescription_HealBell[] = _("A soothing bell\nchimes to heal the\nstatus problems of\nall allies."); +const u8 gMoveDescription_Return[] = _("This attack move\ngrows more powerful\nthe more the user\nlikes its TRAINER."); +const u8 gMoveDescription_Present[] = _("The foe is given a\nbooby-trapped gift.\nIt restores HP\nsometimes, however."); +const u8 gMoveDescription_Frustration[] = _("This attack move\ngrows more powerful\nthe less the user\nlikes its TRAINER."); +const u8 gMoveDescription_Safeguard[] = _("It protects the\nuser's party from\nall status problems\nfor five turns."); +const u8 gMoveDescription_PainSplit[] = _("The user adds its\nHP to the foe's HP,\nthen equally shares\nthe total HP."); +const u8 gMoveDescription_SacredFire[] = _("A mystical and\npowerful fire\nattack that may\ninflict a burn."); +const u8 gMoveDescription_Magnitude[] = _("A ground-shaking\nattack against all\nstanding POKéMON.\nIts power varies."); +const u8 gMoveDescription_DynamicPunch[] = _("The foe is punched\nwith the user's full\npower. It confuses\nthe foe if it hits."); +const u8 gMoveDescription_Megahorn[] = _("A brutal ramming\nattack delivered\nwith a tough and\nimpressive horn."); +const u8 gMoveDescription_DragonBreath[] = _("The foe is hit with\nan incredible blast\nof breath that may\nalso paralyze."); +const u8 gMoveDescription_BatonPass[] = _("The user switches\nout, passing along\nany stat changes\nto the new battler."); +const u8 gMoveDescription_Encore[] = _("Makes the foe use\nthe move it last\nused repeatedly for\ntwo to six turns."); +const u8 gMoveDescription_Pursuit[] = _("An attack move that\nworks especially\nwell on a foe that\nis switching out."); +const u8 gMoveDescription_RapidSpin[] = _("An attack that\nfrees the user from\nBIND, WRAP, LEECH\nSEED, and SPIKES."); +const u8 gMoveDescription_SweetScent[] = _("Allures the foe to\nreduce evasiveness.\nIt also attracts\nwild POKéMON."); +const u8 gMoveDescription_IronTail[] = _("An attack with a\nsteel-hard tail.\nIt may lower the\nfoe's DEFENSE stat."); +const u8 gMoveDescription_MetalClaw[] = _("The foe is attacked\nwith steel claws.\nIt may also raise\nthe user's ATTACK."); +const u8 gMoveDescription_VitalThrow[] = _("Makes the user\nattack after the\nfoe. In return,\nit will not miss."); +const u8 gMoveDescription_MorningSun[] = _("Restores the user's\nHP. The amount of\nHP regained varies\nwith the weather."); +const u8 gMoveDescription_Synthesis[] = _("Restores the user's\nHP. The amount of\nHP regained varies\nwith the weather."); +const u8 gMoveDescription_Moonlight[] = _("Restores the user's\nHP. The amount of\nHP regained varies\nwith the weather."); +const u8 gMoveDescription_HiddenPower[] = _("An attack that\nvaries in type and\nintensity depending\non the user."); +const u8 gMoveDescription_CrossChop[] = _("The foe is hit with\ndouble chops.\nIt has a high\ncritical-hit ratio."); +const u8 gMoveDescription_Twister[] = _("A vicious twister\nattacks the foe.\nIt may make the\nfoe flinch."); +const u8 gMoveDescription_RainDance[] = _("A heavy rain falls\nfor five turns,\npowering up WATER-\ntype moves."); +const u8 gMoveDescription_SunnyDay[] = _("The sun blazes for\nfive turns, powering\nup FIRE-type\nmoves."); +const u8 gMoveDescription_Crunch[] = _("The foe is crunched\nwith sharp fangs.\nIt may lower the\nfoe's SP. DEF."); +const u8 gMoveDescription_MirrorCoat[] = _("A retaliation move\nthat pays back the\nfoe's special attack\ndouble."); +const u8 gMoveDescription_PsychUp[] = _("The user hypnotizes\nitself into copying\nany stat change\nmade by the foe."); +const u8 gMoveDescription_ExtremeSpeed[] = _("A blindingly speedy\ncharge attack that\nalways goes before\nany other."); +const u8 gMoveDescription_AncientPower[] = _("An ancient power is\nused to attack. It\nmay also raise all\nthe user's stats."); +const u8 gMoveDescription_ShadowBall[] = _("A shadowy blob is\nhurled at the foe.\nMay also lower the\nfoe's SP. DEF."); +const u8 gMoveDescription_FutureSight[] = _("Two turns after\nthis move is used,\nthe foe is attacked\npsychically."); +const u8 gMoveDescription_RockSmash[] = _("An attack that may\nalso cut DEFENSE.\nIt can also smash\ncracked boulders."); +const u8 gMoveDescription_Whirlpool[] = _("The foe is trapped\nin a fast, vicious\nwhirlpool for two\nto five turns."); +const u8 gMoveDescription_BeatUp[] = _("All party POKéMON\njoin in the attack.\nThe more allies,\nthe more damage."); +const u8 gMoveDescription_FakeOut[] = _("An attack that hits\nfirst and causes\nflinching. Usable\nonly on 1st turn."); +const u8 gMoveDescription_Uproar[] = _("The user attacks in\nan uproar that\nprevents sleep for\ntwo to five turns."); +const u8 gMoveDescription_Stockpile[] = _("The user charges\nup power for use\nlater. It can be\nused three times."); +const u8 gMoveDescription_SpitUp[] = _("The power built\nusing STOCKPILE is\nreleased at once\nfor attack."); +const u8 gMoveDescription_Swallow[] = _("The energy it built\nusing STOCKPILE is\nabsorbed to restore\nHP."); +const u8 gMoveDescription_HeatWave[] = _("The user exhales a\nheated breath to\nattack. It may also\ninflict a burn."); +const u8 gMoveDescription_Hail[] = _("A hailstorm lasting\nfive turns damages\nall POKéMON except\nthe ICE-type."); +const u8 gMoveDescription_Torment[] = _("It enrages the foe,\nmaking it incapable\nof using the same\nmove successively."); +const u8 gMoveDescription_Flatter[] = _("Flattery is used to\nconfuse the foe,\nbut its SP. ATK\nalso rises."); +const u8 gMoveDescription_WillOWisp[] = _("A sinister, bluish\nwhite flame is shot\nat the foe to\ninflict a burn."); +const u8 gMoveDescription_Memento[] = _("The user faints,\nbut sharply lowers\nthe foe's ATTACK\nand SP. ATK."); +const u8 gMoveDescription_Facade[] = _("An attack that is\nboosted if user is\nburned, poisoned,\nor paralyzed."); +const u8 gMoveDescription_FocusPunch[] = _("An attack that is\nexecuted last.\nThe user flinches\nif hit beforehand."); +const u8 gMoveDescription_SmellingSalt[] = _("Doubly effective on\na paralyzed foe,\nbut it also cures\nthe foe's paralysis."); +const u8 gMoveDescription_FollowMe[] = _("The user draws\nattention to itself,\nmaking foes attack\nonly the user."); +const u8 gMoveDescription_NaturePower[] = _("An attack that\nchanges type\ndepending on the\nuser's location."); +const u8 gMoveDescription_Charge[] = _("The user charges\npower to boost the\nELECTRIC move it\nuses next."); +const u8 gMoveDescription_Taunt[] = _("The foe is taunted\ninto a rage that\nallows it to use\nonly attack moves."); +const u8 gMoveDescription_HelpingHand[] = _("A move that boosts\nthe power of the\nally's attack in a\nbattle."); +const u8 gMoveDescription_Trick[] = _("A move that tricks\nthe foe into\ntrading held items\nwith the user."); +const u8 gMoveDescription_RolePlay[] = _("The user mimics the\nfoe completely and\ncopies the foe's\nability."); +const u8 gMoveDescription_Wish[] = _("A self-healing move\nthat restores half\nthe full HP on the\nnext turn."); +const u8 gMoveDescription_Assist[] = _("The user randomly\npicks and uses a\nmove of an allied\nPOKéMON."); +const u8 gMoveDescription_Ingrain[] = _("The user lays roots\nthat restore HP on\nevery turn.\nIt can't switch out."); +const u8 gMoveDescription_Superpower[] = _("A powerful attack,\nbut it also lowers\nthe user's ATTACK\nand DEFENSE stats."); +const u8 gMoveDescription_MagicCoat[] = _("Reflects back the\nfoe's LEECH SEED\nand any status-\ndamaging move."); +const u8 gMoveDescription_Recycle[] = _("A move that\nrecycles a used\nitem for use once\nmore."); +const u8 gMoveDescription_Revenge[] = _("An attack move that\ngains in intensity if\nthe target has hurt\nthe user."); +const u8 gMoveDescription_BrickBreak[] = _("An attack that also\nbreaks any barrier\nlike LIGHT SCREEN\nand REFLECT."); +const u8 gMoveDescription_Yawn[] = _("A huge yawn lulls\nthe foe into falling\nasleep on the next\nturn."); +const u8 gMoveDescription_KnockOff[] = _("Knocks down the\nfoe's held item to\nprevent its use\nduring the battle."); +const u8 gMoveDescription_Endeavor[] = _("Gains power the\nfewer HP the user\nhas compared with\nthe foe."); +const u8 gMoveDescription_Eruption[] = _("The higher the\nuser's HP, the more\npowerful this\nattack becomes."); +const u8 gMoveDescription_SkillSwap[] = _("The user employs\nits psychic power\nto swap abilities\nwith the foe."); +const u8 gMoveDescription_Imprison[] = _("Prevents foes from\nusing any move\nthat is also known\nby the user."); +const u8 gMoveDescription_Refresh[] = _("A self-healing move\nthat cures the user\nof a poisoning,\nburn, or paralysis."); +const u8 gMoveDescription_Grudge[] = _("If the user faints,\nthis move deletes\nthe PP of the move\nthat finished it."); +const u8 gMoveDescription_Snatch[] = _("Steals the effects\nof the foe's\nhealing or status-\nchanging move."); +const u8 gMoveDescription_SecretPower[] = _("An attack that may\nhave an additional\neffect that varies\nwith the terrain."); +const u8 gMoveDescription_Dive[] = _("The user dives\nunderwater on the\nfirst turn and\nstrikes next turn."); +const u8 gMoveDescription_ArmThrust[] = _("A quick flurry of\nstraight-arm\npunches that hit\ntwo to five times."); +const u8 gMoveDescription_Camouflage[] = _("Alters the user's\ntype depending on\nthe location's\nterrain."); +const u8 gMoveDescription_TailGlow[] = _("The user flashes a\nlight that sharply\nraises its SP. ATK\nstat."); +const u8 gMoveDescription_LusterPurge[] = _("A burst of light\ninjures the foe. It\nmay also lower the\nfoe's SP. DEF."); +const u8 gMoveDescription_MistBall[] = _("A flurry of down\nhits the foe. It\nmay also lower the\nfoe's SP. ATK."); +const u8 gMoveDescription_FeatherDance[] = _("The foe is covered\nwith a mass of down\nthat sharply cuts\nthe ATTACK stat."); +const u8 gMoveDescription_TeeterDance[] = _("A wobbly dance\nthat confuses all\nthe POKéMON in\nbattle."); +const u8 gMoveDescription_BlazeKick[] = _("A fiery kick with a\nhigh critical-hit\nratio. It may also\nburn the foe."); +const u8 gMoveDescription_MudSport[] = _("Weakens ELECTRIC-\ntype attacks while\nthe user is in the\nbattle."); +const u8 gMoveDescription_IceBall[] = _("A 5-turn rolling\nattack that becomes\nstronger each time\nit rolls."); +const u8 gMoveDescription_NeedleArm[] = _("An attack using\nthorny arms.\nIt may make the\nfoe flinch."); +const u8 gMoveDescription_SlackOff[] = _("The user slacks off\nand restores its HP\nby half its full\nHP."); +const u8 gMoveDescription_HyperVoice[] = _("The user lets loose\na horribly loud\nshout with the\npower to damage."); +const u8 gMoveDescription_PoisonFang[] = _("The foe is bitten\nwith toxic fangs.\nIt may also badly\npoison the foe."); +const u8 gMoveDescription_CrushClaw[] = _("The foe is attacked\nwith sharp claws.\nIt may also lower\nthe foe's DEFENSE."); +const u8 gMoveDescription_BlastBurn[] = _("The foe is hit with\na huge explosion.\nThe user can't move\non the next turn."); +const u8 gMoveDescription_HydroCannon[] = _("The foe is hit with\na watery cannon.\nThe user can't move\non the next turn."); +const u8 gMoveDescription_MeteorMash[] = _("The foe is hit with\na hard, fast punch.\nIt may also raise\nthe user's ATTACK."); +const u8 gMoveDescription_Astonish[] = _("An attack using a\nstartling shout.\nIt also may make\nthe foe flinch."); +const u8 gMoveDescription_WeatherBall[] = _("An attack that\nvaries in power and\ntype depending on\nthe weather."); +const u8 gMoveDescription_Aromatherapy[] = _("A soothing scent is\nreleased to heal\nall status problems\nin the user's party."); +const u8 gMoveDescription_FakeTears[] = _("The user feigns\ncrying to sharply\nlower the foe's\nSP. DEF stat."); +const u8 gMoveDescription_AirCutter[] = _("The foe is hit with\nrazor-like wind.\nIt has a high\ncritical-hit ratio."); +const u8 gMoveDescription_Overheat[] = _("An intense attack\nthat also sharply\nreduces the user's\nSP. ATK stat."); +const u8 gMoveDescription_OdorSleuth[] = _("Completely negates\nthe foe's efforts to\nheighten its ability\nto evade."); +const u8 gMoveDescription_RockTomb[] = _("Boulders are hurled\nat the foe. It also\nlowers the foe's\nSPEED if it hits."); +const u8 gMoveDescription_SilverWind[] = _("The foe is attacked\nwith a silver dust.\nIt may raise all\nthe user's stats."); +const u8 gMoveDescription_MetalSound[] = _("A horrible metallic\nscreech is used to\nsharply lower the\nfoe's SP. DEF."); +const u8 gMoveDescription_GrassWhistle[] = _("A pleasant melody\nis played to lull\nthe foe into a deep\nsleep."); +const u8 gMoveDescription_Tickle[] = _("The foe is made to\nlaugh, reducing its\nATTACK and DEFENSE\nstats."); +const u8 gMoveDescription_CosmicPower[] = _("The user absorbs a\nmystic power to\nraise its DEFENSE\nand SP. DEF."); +const u8 gMoveDescription_WaterSpout[] = _("The higher the\nuser's HP, the more\npowerful this\nattack becomes."); +const u8 gMoveDescription_SignalBeam[] = _("The foe is hit with\na flashing beam\nthat may also\ncause confusion."); +const u8 gMoveDescription_ShadowPunch[] = _("The user throws a\npunch from the\nshadows. It cannot\nbe evaded."); +const u8 gMoveDescription_Extrasensory[] = _("The user attacks\nwith an odd power\nthat may make the\nfoe flinch."); +const u8 gMoveDescription_SkyUppercut[] = _("The user attacks\nwith an uppercut\nthrown skywards\nwith force."); +const u8 gMoveDescription_SandTomb[] = _("The foe is trapped\ninside a painful\nsandstorm for two\nto five turns."); +const u8 gMoveDescription_SheerCold[] = _("The foe is attacked\nwith ultimate cold\nthat causes fainting\nif it hits."); +const u8 gMoveDescription_MuddyWater[] = _("The user attacks\nwith muddy water.\nIt may also lower\nthe foe's accuracy."); +const u8 gMoveDescription_BulletSeed[] = _("The user shoots\nseeds at the foe.\nTwo to five seeds\nare shot at once."); +const u8 gMoveDescription_AerialAce[] = _("An extremely fast\nattack against one\ntarget. It can't be\nevaded."); +const u8 gMoveDescription_IcicleSpear[] = _("Sharp icicles are\nfired at the foe.\nIt strikes two to\nfive times."); +const u8 gMoveDescription_IronDefense[] = _("The user hardens\nits body's surface\nto sharply raise its\nDEFENSE stat."); +const u8 gMoveDescription_Block[] = _("The user blocks the\nfoe's way with arms\nspread wide to\nprevent escape."); +const u8 gMoveDescription_Howl[] = _("The user howls to\nraise its spirit and\nboost its ATTACK\nstat."); +const u8 gMoveDescription_DragonClaw[] = _("Sharp, huge claws\nhook and slash the\nfoe quickly and\nwith great power."); +const u8 gMoveDescription_FrenzyPlant[] = _("The foe is hit with\nan enormous branch.\nThe user can't move\non the next turn."); +const u8 gMoveDescription_BulkUp[] = _("The user bulks up\nits body to boost\nboth its ATTACK and\nDEFENSE stats."); +const u8 gMoveDescription_Bounce[] = _("The user bounces\non the foe on the\n2nd turn. It may\nparalyze the foe."); +const u8 gMoveDescription_MudShot[] = _("The user attacks by\nhurling mud.\nIt also reduces the\nfoe's SPEED."); +const u8 gMoveDescription_PoisonTail[] = _("An attack with a\nhigh critical-hit\nratio. It may also\npoison the foe."); +const u8 gMoveDescription_Covet[] = _("A cutely executed\nattack that also\nsteals the foe's\nhold item."); +const u8 gMoveDescription_VoltTackle[] = _("The user throws an\nelectrified tackle.\nIt hurts the user\na little."); +const u8 gMoveDescription_MagicalLeaf[] = _("The foe is attacked\nwith a strange leaf\nthat cannot be\nevaded."); +const u8 gMoveDescription_WaterSport[] = _("Weakens FIRE-type\nattacks while the\nuser is in the\nbattle."); +const u8 gMoveDescription_CalmMind[] = _("The user focuses\nits mind to raise\nthe SP. ATK and\nSP. DEF stats."); +const u8 gMoveDescription_LeafBlade[] = _("The foe is slashed\nwith a sharp leaf.\nIt has a high\ncritical-hit ratio."); +const u8 gMoveDescription_DragonDance[] = _("A mystic, powerful\ndance that boosts\nthe user's ATTACK\nand SPEED stats."); +const u8 gMoveDescription_RockBlast[] = _("The user hurls two\nto five hard rocks\nat the foe to\nattack."); +const u8 gMoveDescription_ShockWave[] = _("A rapid jolt of\nelectricity strikes\nthe foe. It can't\nbe evaded."); +const u8 gMoveDescription_WaterPulse[] = _("An attack with a\npulsing blast of\nwater. It may also\nconfuse the foe."); +const u8 gMoveDescription_DoomDesire[] = _("A move that attacks\nthe foe with a\nblast of light two\nturns after use."); +const u8 gMoveDescription_PsychoBoost[] = _("An intense attack\nthat also sharply\nreduces the user's\nSP. ATK stat."); + +const u8 *const gMoveDescriptionPointers[MOVES_COUNT - 1] = { + [MOVE_POUND - 1] = gMoveDescription_Pound, + [MOVE_KARATE_CHOP - 1] = gMoveDescription_KarateChop, + [MOVE_DOUBLE_SLAP - 1] = gMoveDescription_DoubleSlap, + [MOVE_COMET_PUNCH - 1] = gMoveDescription_CometPunch, + [MOVE_MEGA_PUNCH - 1] = gMoveDescription_MegaPunch, + [MOVE_PAY_DAY - 1] = gMoveDescription_PayDay, + [MOVE_FIRE_PUNCH - 1] = gMoveDescription_FirePunch, + [MOVE_ICE_PUNCH - 1] = gMoveDescription_IcePunch, + [MOVE_THUNDER_PUNCH - 1] = gMoveDescription_ThunderPunch, + [MOVE_SCRATCH - 1] = gMoveDescription_Scratch, + [MOVE_VICE_GRIP - 1] = gMoveDescription_ViceGrip, + [MOVE_GUILLOTINE - 1] = gMoveDescription_Guillotine, + [MOVE_RAZOR_WIND - 1] = gMoveDescription_RazorWind, + [MOVE_SWORDS_DANCE - 1] = gMoveDescription_SwordsDance, + [MOVE_CUT - 1] = gMoveDescription_Cut, + [MOVE_GUST - 1] = gMoveDescription_Gust, + [MOVE_WING_ATTACK - 1] = gMoveDescription_WingAttack, + [MOVE_WHIRLWIND - 1] = gMoveDescription_Whirlwind, + [MOVE_FLY - 1] = gMoveDescription_Fly, + [MOVE_BIND - 1] = gMoveDescription_Bind, + [MOVE_SLAM - 1] = gMoveDescription_Slam, + [MOVE_VINE_WHIP - 1] = gMoveDescription_VineWhip, + [MOVE_STOMP - 1] = gMoveDescription_Stomp, + [MOVE_DOUBLE_KICK - 1] = gMoveDescription_DoubleKick, + [MOVE_MEGA_KICK - 1] = gMoveDescription_MegaKick, + [MOVE_JUMP_KICK - 1] = gMoveDescription_JumpKick, + [MOVE_ROLLING_KICK - 1] = gMoveDescription_RollingKick, + [MOVE_SAND_ATTACK - 1] = gMoveDescription_SandAttack, + [MOVE_HEADBUTT - 1] = gMoveDescription_Headbutt, + [MOVE_HORN_ATTACK - 1] = gMoveDescription_HornAttack, + [MOVE_FURY_ATTACK - 1] = gMoveDescription_FuryAttack, + [MOVE_HORN_DRILL - 1] = gMoveDescription_HornDrill, + [MOVE_TACKLE - 1] = gMoveDescription_Tackle, + [MOVE_BODY_SLAM - 1] = gMoveDescription_BodySlam, + [MOVE_WRAP - 1] = gMoveDescription_Wrap, + [MOVE_TAKE_DOWN - 1] = gMoveDescription_TakeDown, + [MOVE_THRASH - 1] = gMoveDescription_Thrash, + [MOVE_DOUBLE_EDGE - 1] = gMoveDescription_DoubleEdge, + [MOVE_TAIL_WHIP - 1] = gMoveDescription_TailWhip, + [MOVE_POISON_STING - 1] = gMoveDescription_PoisonSting, + [MOVE_TWINEEDLE - 1] = gMoveDescription_Twineedle, + [MOVE_PIN_MISSILE - 1] = gMoveDescription_PinMissile, + [MOVE_LEER - 1] = gMoveDescription_Leer, + [MOVE_BITE - 1] = gMoveDescription_Bite, + [MOVE_GROWL - 1] = gMoveDescription_Growl, + [MOVE_ROAR - 1] = gMoveDescription_Roar, + [MOVE_SING - 1] = gMoveDescription_Sing, + [MOVE_SUPERSONIC - 1] = gMoveDescription_Supersonic, + [MOVE_SONIC_BOOM - 1] = gMoveDescription_SonicBoom, + [MOVE_DISABLE - 1] = gMoveDescription_Disable, + [MOVE_ACID - 1] = gMoveDescription_Acid, + [MOVE_EMBER - 1] = gMoveDescription_Ember, + [MOVE_FLAMETHROWER - 1] = gMoveDescription_Flamethrower, + [MOVE_MIST - 1] = gMoveDescription_Mist, + [MOVE_WATER_GUN - 1] = gMoveDescription_WaterGun, + [MOVE_HYDRO_PUMP - 1] = gMoveDescription_HydroPump, + [MOVE_SURF - 1] = gMoveDescription_Surf, + [MOVE_ICE_BEAM - 1] = gMoveDescription_IceBeam, + [MOVE_BLIZZARD - 1] = gMoveDescription_Blizzard, + [MOVE_PSYBEAM - 1] = gMoveDescription_Psybeam, + [MOVE_BUBBLE_BEAM - 1] = gMoveDescription_BubbleBeam, + [MOVE_AURORA_BEAM - 1] = gMoveDescription_AuroraBeam, + [MOVE_HYPER_BEAM - 1] = gMoveDescription_HyperBeam, + [MOVE_PECK - 1] = gMoveDescription_Peck, + [MOVE_DRILL_PECK - 1] = gMoveDescription_DrillPeck, + [MOVE_SUBMISSION - 1] = gMoveDescription_Submission, + [MOVE_LOW_KICK - 1] = gMoveDescription_LowKick, + [MOVE_COUNTER - 1] = gMoveDescription_Counter, + [MOVE_SEISMIC_TOSS - 1] = gMoveDescription_SeismicToss, + [MOVE_STRENGTH - 1] = gMoveDescription_Strength, + [MOVE_ABSORB - 1] = gMoveDescription_Absorb, + [MOVE_MEGA_DRAIN - 1] = gMoveDescription_MegaDrain, + [MOVE_LEECH_SEED - 1] = gMoveDescription_LeechSeed, + [MOVE_GROWTH - 1] = gMoveDescription_Growth, + [MOVE_RAZOR_LEAF - 1] = gMoveDescription_RazorLeaf, + [MOVE_SOLAR_BEAM - 1] = gMoveDescription_SolarBeam, + [MOVE_POISON_POWDER - 1] = gMoveDescription_PoisonPowder, + [MOVE_STUN_SPORE - 1] = gMoveDescription_StunSpore, + [MOVE_SLEEP_POWDER - 1] = gMoveDescription_SleepPowder, + [MOVE_PETAL_DANCE - 1] = gMoveDescription_PetalDance, + [MOVE_STRING_SHOT - 1] = gMoveDescription_StringShot, + [MOVE_DRAGON_RAGE - 1] = gMoveDescription_DragonRage, + [MOVE_FIRE_SPIN - 1] = gMoveDescription_FireSpin, + [MOVE_THUNDER_SHOCK - 1] = gMoveDescription_ThunderShock, + [MOVE_THUNDERBOLT - 1] = gMoveDescription_Thunderbolt, + [MOVE_THUNDER_WAVE - 1] = gMoveDescription_ThunderWave, + [MOVE_THUNDER - 1] = gMoveDescription_Thunder, + [MOVE_ROCK_THROW - 1] = gMoveDescription_RockThrow, + [MOVE_EARTHQUAKE - 1] = gMoveDescription_Earthquake, + [MOVE_FISSURE - 1] = gMoveDescription_Fissure, + [MOVE_DIG - 1] = gMoveDescription_Dig, + [MOVE_TOXIC - 1] = gMoveDescription_Toxic, + [MOVE_CONFUSION - 1] = gMoveDescription_Confusion, + [MOVE_PSYCHIC - 1] = gMoveDescription_Psychic, + [MOVE_HYPNOSIS - 1] = gMoveDescription_Hypnosis, + [MOVE_MEDITATE - 1] = gMoveDescription_Meditate, + [MOVE_AGILITY - 1] = gMoveDescription_Agility, + [MOVE_QUICK_ATTACK - 1] = gMoveDescription_QuickAttack, + [MOVE_RAGE - 1] = gMoveDescription_Rage, + [MOVE_TELEPORT - 1] = gMoveDescription_Teleport, + [MOVE_NIGHT_SHADE - 1] = gMoveDescription_NightShade, + [MOVE_MIMIC - 1] = gMoveDescription_Mimic, + [MOVE_SCREECH - 1] = gMoveDescription_Screech, + [MOVE_DOUBLE_TEAM - 1] = gMoveDescription_DoubleTeam, + [MOVE_RECOVER - 1] = gMoveDescription_Recover, + [MOVE_HARDEN - 1] = gMoveDescription_Harden, + [MOVE_MINIMIZE - 1] = gMoveDescription_Minimize, + [MOVE_SMOKESCREEN - 1] = gMoveDescription_Smokescreen, + [MOVE_CONFUSE_RAY - 1] = gMoveDescription_ConfuseRay, + [MOVE_WITHDRAW - 1] = gMoveDescription_Withdraw, + [MOVE_DEFENSE_CURL - 1] = gMoveDescription_DefenseCurl, + [MOVE_BARRIER - 1] = gMoveDescription_Barrier, + [MOVE_LIGHT_SCREEN - 1] = gMoveDescription_LightScreen, + [MOVE_HAZE - 1] = gMoveDescription_Haze, + [MOVE_REFLECT - 1] = gMoveDescription_Reflect, + [MOVE_FOCUS_ENERGY - 1] = gMoveDescription_FocusEnergy, + [MOVE_BIDE - 1] = gMoveDescription_Bide, + [MOVE_METRONOME - 1] = gMoveDescription_Metronome, + [MOVE_MIRROR_MOVE - 1] = gMoveDescription_MirrorMove, + [MOVE_SELF_DESTRUCT - 1] = gMoveDescription_SelfDestruct, + [MOVE_EGG_BOMB - 1] = gMoveDescription_EggBomb, + [MOVE_LICK - 1] = gMoveDescription_Lick, + [MOVE_SMOG - 1] = gMoveDescription_Smog, + [MOVE_SLUDGE - 1] = gMoveDescription_Sludge, + [MOVE_BONE_CLUB - 1] = gMoveDescription_BoneClub, + [MOVE_FIRE_BLAST - 1] = gMoveDescription_FireBlast, + [MOVE_WATERFALL - 1] = gMoveDescription_Waterfall, + [MOVE_CLAMP - 1] = gMoveDescription_Clamp, + [MOVE_SWIFT - 1] = gMoveDescription_Swift, + [MOVE_SKULL_BASH - 1] = gMoveDescription_SkullBash, + [MOVE_SPIKE_CANNON - 1] = gMoveDescription_SpikeCannon, + [MOVE_CONSTRICT - 1] = gMoveDescription_Constrict, + [MOVE_AMNESIA - 1] = gMoveDescription_Amnesia, + [MOVE_KINESIS - 1] = gMoveDescription_Kinesis, + [MOVE_SOFT_BOILED - 1] = gMoveDescription_SoftBoiled, + [MOVE_HI_JUMP_KICK - 1] = gMoveDescription_HiJumpKick, + [MOVE_GLARE - 1] = gMoveDescription_Glare, + [MOVE_DREAM_EATER - 1] = gMoveDescription_DreamEater, + [MOVE_POISON_GAS - 1] = gMoveDescription_PoisonGas, + [MOVE_BARRAGE - 1] = gMoveDescription_Barrage, + [MOVE_LEECH_LIFE - 1] = gMoveDescription_LeechLife, + [MOVE_LOVELY_KISS - 1] = gMoveDescription_LovelyKiss, + [MOVE_SKY_ATTACK - 1] = gMoveDescription_SkyAttack, + [MOVE_TRANSFORM - 1] = gMoveDescription_Transform, + [MOVE_BUBBLE - 1] = gMoveDescription_Bubble, + [MOVE_DIZZY_PUNCH - 1] = gMoveDescription_DizzyPunch, + [MOVE_SPORE - 1] = gMoveDescription_Spore, + [MOVE_FLASH - 1] = gMoveDescription_Flash, + [MOVE_PSYWAVE - 1] = gMoveDescription_Psywave, + [MOVE_SPLASH - 1] = gMoveDescription_Splash, + [MOVE_ACID_ARMOR - 1] = gMoveDescription_AcidArmor, + [MOVE_CRABHAMMER - 1] = gMoveDescription_Crabhammer, + [MOVE_EXPLOSION - 1] = gMoveDescription_Explosion, + [MOVE_FURY_SWIPES - 1] = gMoveDescription_FurySwipes, + [MOVE_BONEMERANG - 1] = gMoveDescription_Bonemerang, + [MOVE_REST - 1] = gMoveDescription_Rest, + [MOVE_ROCK_SLIDE - 1] = gMoveDescription_RockSlide, + [MOVE_HYPER_FANG - 1] = gMoveDescription_HyperFang, + [MOVE_SHARPEN - 1] = gMoveDescription_Sharpen, + [MOVE_CONVERSION - 1] = gMoveDescription_Conversion, + [MOVE_TRI_ATTACK - 1] = gMoveDescription_TriAttack, + [MOVE_SUPER_FANG - 1] = gMoveDescription_SuperFang, + [MOVE_SLASH - 1] = gMoveDescription_Slash, + [MOVE_SUBSTITUTE - 1] = gMoveDescription_Substitute, + [MOVE_STRUGGLE - 1] = gMoveDescription_Struggle, + [MOVE_SKETCH - 1] = gMoveDescription_Sketch, + [MOVE_TRIPLE_KICK - 1] = gMoveDescription_TripleKick, + [MOVE_THIEF - 1] = gMoveDescription_Thief, + [MOVE_SPIDER_WEB - 1] = gMoveDescription_SpiderWeb, + [MOVE_MIND_READER - 1] = gMoveDescription_MindReader, + [MOVE_NIGHTMARE - 1] = gMoveDescription_Nightmare, + [MOVE_FLAME_WHEEL - 1] = gMoveDescription_FlameWheel, + [MOVE_SNORE - 1] = gMoveDescription_Snore, + [MOVE_CURSE - 1] = gMoveDescription_Curse, + [MOVE_FLAIL - 1] = gMoveDescription_Flail, + [MOVE_CONVERSION_2 - 1] = gMoveDescription_Conversion2, + [MOVE_AEROBLAST - 1] = gMoveDescription_Aeroblast, + [MOVE_COTTON_SPORE - 1] = gMoveDescription_CottonSpore, + [MOVE_REVERSAL - 1] = gMoveDescription_Reversal, + [MOVE_SPITE - 1] = gMoveDescription_Spite, + [MOVE_POWDER_SNOW - 1] = gMoveDescription_PowderSnow, + [MOVE_PROTECT - 1] = gMoveDescription_Protect, + [MOVE_MACH_PUNCH - 1] = gMoveDescription_MachPunch, + [MOVE_SCARY_FACE - 1] = gMoveDescription_ScaryFace, + [MOVE_FAINT_ATTACK - 1] = gMoveDescription_FaintAttack, + [MOVE_SWEET_KISS - 1] = gMoveDescription_SweetKiss, + [MOVE_BELLY_DRUM - 1] = gMoveDescription_BellyDrum, + [MOVE_SLUDGE_BOMB - 1] = gMoveDescription_SludgeBomb, + [MOVE_MUD_SLAP - 1] = gMoveDescription_MudSlap, + [MOVE_OCTAZOOKA - 1] = gMoveDescription_Octazooka, + [MOVE_SPIKES - 1] = gMoveDescription_Spikes, + [MOVE_ZAP_CANNON - 1] = gMoveDescription_ZapCannon, + [MOVE_FORESIGHT - 1] = gMoveDescription_Foresight, + [MOVE_DESTINY_BOND - 1] = gMoveDescription_DestinyBond, + [MOVE_PERISH_SONG - 1] = gMoveDescription_PerishSong, + [MOVE_ICY_WIND - 1] = gMoveDescription_IcyWind, + [MOVE_DETECT - 1] = gMoveDescription_Detect, + [MOVE_BONE_RUSH - 1] = gMoveDescription_BoneRush, + [MOVE_LOCK_ON - 1] = gMoveDescription_LockOn, + [MOVE_OUTRAGE - 1] = gMoveDescription_Outrage, + [MOVE_SANDSTORM - 1] = gMoveDescription_Sandstorm, + [MOVE_GIGA_DRAIN - 1] = gMoveDescription_GigaDrain, + [MOVE_ENDURE - 1] = gMoveDescription_Endure, + [MOVE_CHARM - 1] = gMoveDescription_Charm, + [MOVE_ROLLOUT - 1] = gMoveDescription_Rollout, + [MOVE_FALSE_SWIPE - 1] = gMoveDescription_FalseSwipe, + [MOVE_SWAGGER - 1] = gMoveDescription_Swagger, + [MOVE_MILK_DRINK - 1] = gMoveDescription_MilkDrink, + [MOVE_SPARK - 1] = gMoveDescription_Spark, + [MOVE_FURY_CUTTER - 1] = gMoveDescription_FuryCutter, + [MOVE_STEEL_WING - 1] = gMoveDescription_SteelWing, + [MOVE_MEAN_LOOK - 1] = gMoveDescription_MeanLook, + [MOVE_ATTRACT - 1] = gMoveDescription_Attract, + [MOVE_SLEEP_TALK - 1] = gMoveDescription_SleepTalk, + [MOVE_HEAL_BELL - 1] = gMoveDescription_HealBell, + [MOVE_RETURN - 1] = gMoveDescription_Return, + [MOVE_PRESENT - 1] = gMoveDescription_Present, + [MOVE_FRUSTRATION - 1] = gMoveDescription_Frustration, + [MOVE_SAFEGUARD - 1] = gMoveDescription_Safeguard, + [MOVE_PAIN_SPLIT - 1] = gMoveDescription_PainSplit, + [MOVE_SACRED_FIRE - 1] = gMoveDescription_SacredFire, + [MOVE_MAGNITUDE - 1] = gMoveDescription_Magnitude, + [MOVE_DYNAMIC_PUNCH - 1] = gMoveDescription_DynamicPunch, + [MOVE_MEGAHORN - 1] = gMoveDescription_Megahorn, + [MOVE_DRAGON_BREATH - 1] = gMoveDescription_DragonBreath, + [MOVE_BATON_PASS - 1] = gMoveDescription_BatonPass, + [MOVE_ENCORE - 1] = gMoveDescription_Encore, + [MOVE_PURSUIT - 1] = gMoveDescription_Pursuit, + [MOVE_RAPID_SPIN - 1] = gMoveDescription_RapidSpin, + [MOVE_SWEET_SCENT - 1] = gMoveDescription_SweetScent, + [MOVE_IRON_TAIL - 1] = gMoveDescription_IronTail, + [MOVE_METAL_CLAW - 1] = gMoveDescription_MetalClaw, + [MOVE_VITAL_THROW - 1] = gMoveDescription_VitalThrow, + [MOVE_MORNING_SUN - 1] = gMoveDescription_MorningSun, + [MOVE_SYNTHESIS - 1] = gMoveDescription_Synthesis, + [MOVE_MOONLIGHT - 1] = gMoveDescription_Moonlight, + [MOVE_HIDDEN_POWER - 1] = gMoveDescription_HiddenPower, + [MOVE_CROSS_CHOP - 1] = gMoveDescription_CrossChop, + [MOVE_TWISTER - 1] = gMoveDescription_Twister, + [MOVE_RAIN_DANCE - 1] = gMoveDescription_RainDance, + [MOVE_SUNNY_DAY - 1] = gMoveDescription_SunnyDay, + [MOVE_CRUNCH - 1] = gMoveDescription_Crunch, + [MOVE_MIRROR_COAT - 1] = gMoveDescription_MirrorCoat, + [MOVE_PSYCH_UP - 1] = gMoveDescription_PsychUp, + [MOVE_EXTREME_SPEED - 1] = gMoveDescription_ExtremeSpeed, + [MOVE_ANCIENT_POWER - 1] = gMoveDescription_AncientPower, + [MOVE_SHADOW_BALL - 1] = gMoveDescription_ShadowBall, + [MOVE_FUTURE_SIGHT - 1] = gMoveDescription_FutureSight, + [MOVE_ROCK_SMASH - 1] = gMoveDescription_RockSmash, + [MOVE_WHIRLPOOL - 1] = gMoveDescription_Whirlpool, + [MOVE_BEAT_UP - 1] = gMoveDescription_BeatUp, + [MOVE_FAKE_OUT - 1] = gMoveDescription_FakeOut, + [MOVE_UPROAR - 1] = gMoveDescription_Uproar, + [MOVE_STOCKPILE - 1] = gMoveDescription_Stockpile, + [MOVE_SPIT_UP - 1] = gMoveDescription_SpitUp, + [MOVE_SWALLOW - 1] = gMoveDescription_Swallow, + [MOVE_HEAT_WAVE - 1] = gMoveDescription_HeatWave, + [MOVE_HAIL - 1] = gMoveDescription_Hail, + [MOVE_TORMENT - 1] = gMoveDescription_Torment, + [MOVE_FLATTER - 1] = gMoveDescription_Flatter, + [MOVE_WILL_O_WISP - 1] = gMoveDescription_WillOWisp, + [MOVE_MEMENTO - 1] = gMoveDescription_Memento, + [MOVE_FACADE - 1] = gMoveDescription_Facade, + [MOVE_FOCUS_PUNCH - 1] = gMoveDescription_FocusPunch, + [MOVE_SMELLING_SALT - 1] = gMoveDescription_SmellingSalt, + [MOVE_FOLLOW_ME - 1] = gMoveDescription_FollowMe, + [MOVE_NATURE_POWER - 1] = gMoveDescription_NaturePower, + [MOVE_CHARGE - 1] = gMoveDescription_Charge, + [MOVE_TAUNT - 1] = gMoveDescription_Taunt, + [MOVE_HELPING_HAND - 1] = gMoveDescription_HelpingHand, + [MOVE_TRICK - 1] = gMoveDescription_Trick, + [MOVE_ROLE_PLAY - 1] = gMoveDescription_RolePlay, + [MOVE_WISH - 1] = gMoveDescription_Wish, + [MOVE_ASSIST - 1] = gMoveDescription_Assist, + [MOVE_INGRAIN - 1] = gMoveDescription_Ingrain, + [MOVE_SUPERPOWER - 1] = gMoveDescription_Superpower, + [MOVE_MAGIC_COAT - 1] = gMoveDescription_MagicCoat, + [MOVE_RECYCLE - 1] = gMoveDescription_Recycle, + [MOVE_REVENGE - 1] = gMoveDescription_Revenge, + [MOVE_BRICK_BREAK - 1] = gMoveDescription_BrickBreak, + [MOVE_YAWN - 1] = gMoveDescription_Yawn, + [MOVE_KNOCK_OFF - 1] = gMoveDescription_KnockOff, + [MOVE_ENDEAVOR - 1] = gMoveDescription_Endeavor, + [MOVE_ERUPTION - 1] = gMoveDescription_Eruption, + [MOVE_SKILL_SWAP - 1] = gMoveDescription_SkillSwap, + [MOVE_IMPRISON - 1] = gMoveDescription_Imprison, + [MOVE_REFRESH - 1] = gMoveDescription_Refresh, + [MOVE_GRUDGE - 1] = gMoveDescription_Grudge, + [MOVE_SNATCH - 1] = gMoveDescription_Snatch, + [MOVE_SECRET_POWER - 1] = gMoveDescription_SecretPower, + [MOVE_DIVE - 1] = gMoveDescription_Dive, + [MOVE_ARM_THRUST - 1] = gMoveDescription_ArmThrust, + [MOVE_CAMOUFLAGE - 1] = gMoveDescription_Camouflage, + [MOVE_TAIL_GLOW - 1] = gMoveDescription_TailGlow, + [MOVE_LUSTER_PURGE - 1] = gMoveDescription_LusterPurge, + [MOVE_MIST_BALL - 1] = gMoveDescription_MistBall, + [MOVE_FEATHER_DANCE - 1] = gMoveDescription_FeatherDance, + [MOVE_TEETER_DANCE - 1] = gMoveDescription_TeeterDance, + [MOVE_BLAZE_KICK - 1] = gMoveDescription_BlazeKick, + [MOVE_MUD_SPORT - 1] = gMoveDescription_MudSport, + [MOVE_ICE_BALL - 1] = gMoveDescription_IceBall, + [MOVE_NEEDLE_ARM - 1] = gMoveDescription_NeedleArm, + [MOVE_SLACK_OFF - 1] = gMoveDescription_SlackOff, + [MOVE_HYPER_VOICE - 1] = gMoveDescription_HyperVoice, + [MOVE_POISON_FANG - 1] = gMoveDescription_PoisonFang, + [MOVE_CRUSH_CLAW - 1] = gMoveDescription_CrushClaw, + [MOVE_BLAST_BURN - 1] = gMoveDescription_BlastBurn, + [MOVE_HYDRO_CANNON - 1] = gMoveDescription_HydroCannon, + [MOVE_METEOR_MASH - 1] = gMoveDescription_MeteorMash, + [MOVE_ASTONISH - 1] = gMoveDescription_Astonish, + [MOVE_WEATHER_BALL - 1] = gMoveDescription_WeatherBall, + [MOVE_AROMATHERAPY - 1] = gMoveDescription_Aromatherapy, + [MOVE_FAKE_TEARS - 1] = gMoveDescription_FakeTears, + [MOVE_AIR_CUTTER - 1] = gMoveDescription_AirCutter, + [MOVE_OVERHEAT - 1] = gMoveDescription_Overheat, + [MOVE_ODOR_SLEUTH - 1] = gMoveDescription_OdorSleuth, + [MOVE_ROCK_TOMB - 1] = gMoveDescription_RockTomb, + [MOVE_SILVER_WIND - 1] = gMoveDescription_SilverWind, + [MOVE_METAL_SOUND - 1] = gMoveDescription_MetalSound, + [MOVE_GRASS_WHISTLE - 1] = gMoveDescription_GrassWhistle, + [MOVE_TICKLE - 1] = gMoveDescription_Tickle, + [MOVE_COSMIC_POWER - 1] = gMoveDescription_CosmicPower, + [MOVE_WATER_SPOUT - 1] = gMoveDescription_WaterSpout, + [MOVE_SIGNAL_BEAM - 1] = gMoveDescription_SignalBeam, + [MOVE_SHADOW_PUNCH - 1] = gMoveDescription_ShadowPunch, + [MOVE_EXTRASENSORY - 1] = gMoveDescription_Extrasensory, + [MOVE_SKY_UPPERCUT - 1] = gMoveDescription_SkyUppercut, + [MOVE_SAND_TOMB - 1] = gMoveDescription_SandTomb, + [MOVE_SHEER_COLD - 1] = gMoveDescription_SheerCold, + [MOVE_MUDDY_WATER - 1] = gMoveDescription_MuddyWater, + [MOVE_BULLET_SEED - 1] = gMoveDescription_BulletSeed, + [MOVE_AERIAL_ACE - 1] = gMoveDescription_AerialAce, + [MOVE_ICICLE_SPEAR - 1] = gMoveDescription_IcicleSpear, + [MOVE_IRON_DEFENSE - 1] = gMoveDescription_IronDefense, + [MOVE_BLOCK - 1] = gMoveDescription_Block, + [MOVE_HOWL - 1] = gMoveDescription_Howl, + [MOVE_DRAGON_CLAW - 1] = gMoveDescription_DragonClaw, + [MOVE_FRENZY_PLANT - 1] = gMoveDescription_FrenzyPlant, + [MOVE_BULK_UP - 1] = gMoveDescription_BulkUp, + [MOVE_BOUNCE - 1] = gMoveDescription_Bounce, + [MOVE_MUD_SHOT - 1] = gMoveDescription_MudShot, + [MOVE_POISON_TAIL - 1] = gMoveDescription_PoisonTail, + [MOVE_COVET - 1] = gMoveDescription_Covet, + [MOVE_VOLT_TACKLE - 1] = gMoveDescription_VoltTackle, + [MOVE_MAGICAL_LEAF - 1] = gMoveDescription_MagicalLeaf, + [MOVE_WATER_SPORT - 1] = gMoveDescription_WaterSport, + [MOVE_CALM_MIND - 1] = gMoveDescription_CalmMind, + [MOVE_LEAF_BLADE - 1] = gMoveDescription_LeafBlade, + [MOVE_DRAGON_DANCE - 1] = gMoveDescription_DragonDance, + [MOVE_ROCK_BLAST - 1] = gMoveDescription_RockBlast, + [MOVE_SHOCK_WAVE - 1] = gMoveDescription_ShockWave, + [MOVE_WATER_PULSE - 1] = gMoveDescription_WaterPulse, + [MOVE_DOOM_DESIRE - 1] = gMoveDescription_DoomDesire, + [MOVE_PSYCHO_BOOST - 1] = gMoveDescription_PsychoBoost, +}; diff --git a/src/pokedex.c b/src/pokedex.c index c49767ea9..e3e83c3c4 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -22,7 +22,7 @@ u16 GetPokedexHeightWeight(u16 dexNum, u8 data) s8 GetSetPokedexFlag(u16 nationalDexNo, u8 caseID) { - return sub_8104AB0(nationalDexNo, caseID, 0); + return DexScreen_GetSetPokedexFlag(nationalDexNo, caseID, 0); } u16 GetNationalPokedexCount(u8 caseID) diff --git a/src/pokedex_area_markers.c b/src/pokedex_area_markers.c index a47d6876d..5226133ac 100644 --- a/src/pokedex_area_markers.c +++ b/src/pokedex_area_markers.c @@ -157,7 +157,7 @@ static void Task_ShowAreaMarkers(u8 taskId) gSprites[data->spr_id].invisible = FALSE; } -u8 sub_8134230(u16 species, u16 tilesTag, u8 palIdx, u8 y) +u8 Ctor_PokedexAreaMarkers(u16 species, u16 tilesTag, u8 palIdx, u8 y) { struct SpriteTemplate spriteTemplate; struct CompressedSpriteSheet spriteSheet; @@ -201,7 +201,7 @@ u8 sub_8134230(u16 species, u16 tilesTag, u8 palIdx, u8 y) return taskId; } -void sub_81343F4(u8 taskId) +void Dtor_PokedexAreaMarkers(u8 taskId) { struct PAM_TaskData * data = (void *)gTasks[taskId].data; FreeSpriteTilesByTag(data->tilesTag); @@ -228,7 +228,7 @@ void SetAreaSubsprite(s32 i, s32 whichArea, struct Subsprite * subsprites) subsprites[i].y = sSubspriteLookupTable[whichArea][2]; } -u8 sub_81344E0(u8 taskId) +u8 PokedexAreaMarkers_Any(u8 taskId) { struct PAM_TaskData * data = (void *)gTasks[taskId].data; return data->subsprites.subspriteCount; diff --git a/src/pokedex_screen.c b/src/pokedex_screen.c index 3c05010ae..c4749055d 100644 --- a/src/pokedex_screen.c +++ b/src/pokedex_screen.c @@ -20,58 +20,64 @@ #include "pokedex_area_markers.h" #include "field_specials.h" +enum TextMode { + TEXT_LEFT, + TEXT_CENTER, + TEXT_RIGHT +}; + struct PokedexScreenData { - u8 field_00; - u8 field_01; - u8 field_02[4]; - u32 field_08; - u32 field_0C; - u16 field_10; - u16 field_12; - u8 field_14; - u8 field_15; - u8 field_16; - u8 field_17; - u16 field_18[4]; - u8 field_20[4]; - u8 field_24[4]; - u8 field_28; - u8 field_29; - u8 field_2A; - u8 field_2B; - u8 field_2C; - u8 field_2D; - u8 field_2E; - u8 field_2F; - u32 field_30; - u16 field_34; - u16 field_36; - u16 field_38; - u16 field_3A; - u16 field_3C; - u16 field_3E; - u8 field_40; - u8 field_41; - u8 field_42; - struct ListMenuItem * field_44; - u16 field_48; - u8 field_4A[0x10]; - u16 field_5A; - u16 * field_5C; - u8 field_60; - u8 field_61; - u16 field_62; - u8 field_64; - u16 field_66; - u16 field_68; - u16 field_6A; - u16 field_6C; + u8 taskId; + u8 state; + u8 data[4]; + u32 unlockedCategories; + u32 modeSelectInput; + u16 modeSelectItemsAbove; + u16 modeSelectCursorPos; + u8 modeSelectWindowId; + u8 selectionIconWindowId; + u8 dexCountsWindowId; + u8 modeSelectListMenuId; + u16 pageSpecies[4]; + u8 categoryMonWindowIds[4]; + u8 categoryMonInfoWindowIds[4]; + u8 category; + u8 firstPageInCategory; + u8 lastPageInCategory; + u8 pageNum; + u8 numMonsOnPage; + u8 categoryCursorPosInPage; + u8 categoryPageSelectionCursorTimer; + u8 parentOfCategoryMenu; + u32 characteristicMenuInput; + u16 kantoOrderMenuItemsAbove; + u16 kantoOrderMenuCursorPos; + u16 characteristicOrderMenuItemsAbove; + u16 characteristicOrderMenuCursorPos; + u16 nationalOrderMenuItemsAbove; + u16 nationalOrderMenuCursorPos; + u8 numericalOrderWindowId; + u8 orderedListMenuTaskId; + u8 dexOrderId; + struct ListMenuItem * listItems; + u16 orderedDexCount; + u8 windowIds[0x10]; + u16 dexSpecies; + u16 * bgBufsMem; + u8 scrollArrowsTaskId; + u8 categoryPageCursorTaskId; + u16 modeSelectCursorPosBak; + u8 unlockedSeviiAreas; + u16 numSeenKanto; + u16 numOwnedKanto; + u16 numSeenNational; + u16 numOwnedNational; }; struct PokedexScreenWindowGfx { - const u16 * map; + const u32 * tiles; const u16 * pal; }; @@ -81,61 +87,61 @@ struct PokedexCategoryPage u8 count; }; -EWRAM_DATA struct PokedexScreenData * gUnknown_203ACF0 = NULL; - -static void sub_810287C(u8 taskId); -static void sub_8102C28(void); -static void sub_8102F80(u8 taskId); -static void sub_810317C(void); -static void sub_8103238(u8 taskId); -static void sub_810345C(void); -static u16 sub_8103518(u8 a0); -static void sub_8103924(const struct ListMenuTemplate * a0, u8 a1); -static u8 sub_81039F0(void); -static void sub_8103988(u8 a0); -static void sub_8103AC8(u8 taskId); -static u8 sub_8104234(void); -static int sub_8104284(void); -static void sub_81042EC(u8 taskId); -static bool32 sub_8104664(u8 a0); -void sub_81047B0(u8 *windowId_p); -void sub_81047C8(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 colorIdx); -static void sub_810491C(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx); -void sub_8104A34(u8 windowId, u8 fontId, u16 species, u8 x, u8 y); -static u16 sub_8104BBC(u8 caseId, bool8 whichDex); -void sub_8104C2C(const u8 *src); -void sub_8104E90(void); -bool8 sub_8104F0C(bool8 a0); -void sub_8105058(u8 a0); -void sub_8105178(u8 a0, u8 a1, u8 a2); -static bool8 sub_81052D0(u8 a0); -void sub_8105594(u8 a0, u8 a1); -u8 sub_8105E1C(u8 a0); -u8 sub_8106014(void); -u8 sub_810603C(void); -bool8 sub_8106838(u8 category, u8 a1); -u8 sub_81068A0(u8 a0); -u8 sub_810699C(u8 category); -bool8 sub_8106A20(u16 a0); -u8 sub_81067C0(void); -void sub_81068DC(u8 category, u8 a1); -u8 sub_8106AF8(u16 a0); -void sub_8106B34(void); -void sub_8106E78(const u8 *a0, s32 a1); -static void sub_8102EC0(s32 itemIndex, bool8 onInit, struct ListMenu *list); -static void sub_8102F48(u8 windowId, s32 itemId, u8 y); -static void sub_8103A40(u8 windowId, s32 itemId, u8 y); -static void sub_8106BD8(u8 taskId); -static void sub_8106BE8(u8 taskId); +EWRAM_DATA static struct PokedexScreenData * sPokedexScreenData = NULL; + +static void Task_PokedexScreen(u8 taskId); +static void DexScreen_InitGfxForTopMenu(void); +static void Task_DexScreen_NumericalOrder(u8 taskId); +static void DexScreen_InitGfxForNumericalOrderList(void); +static void Task_DexScreen_CharacteristicOrder(u8 taskId); +static void DexScreen_CreateCharacteristicListMenu(void); +static u16 DexScreen_CountMonsInOrderedList(u8 orderIdx); +static void DexScreen_InitListMenuForOrderedList(const struct ListMenuTemplate * template, u8 order); +static u8 DexScreen_CreateDexOrderScrollArrows(void); +static void DexScreen_DestroyDexOrderListMenu(u8 order); +static void Task_DexScreen_CategorySubmenu(u8 taskId); +static u8 DexScreen_CreateCategoryMenuScrollArrows(void); +static int DexScreen_InputHandler_GetShoulderInput(void); +static void Task_DexScreen_ShowMonPage(u8 taskId); +static bool32 DexScreen_TryScrollMonsVertical(u8 direction); +static void DexScreen_RemoveWindow(u8 *windowId_p); +static void DexScreen_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 colorIdx); +static void DexScreen_PrintNum3RightAlign(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx); +static void DexScreen_PrintMonDexNo(u8 windowId, u8 fontId, u16 species, u8 x, u8 y); +static u16 DexScreen_GetDexCount(u8 caseId, bool8 whichDex); +static void DexScreen_PrintControlInfo(const u8 *src); +static void DexScreen_DestroyCategoryPageMonIconAndInfoWindows(void); +static bool8 DexScreen_CreateCategoryListGfx(bool8 justRegistered); +static void DexScreen_CreateCategoryPageSelectionCursor(u8 cursorPos); +static void DexScreen_UpdateCategoryPageCursorObject(u8 taskId, u8 cursorPos, u8 numMonsInPage); +static bool8 DexScreen_FlipCategoryPageInDirection(u8 direction); +void DexScreen_DexPageZoomEffectFrame(u8 bg, u8 scale); +static u8 DexScreen_DrawMonDexPage(bool8 justRegistered); +u8 RemoveDexPageWindows(void); +u8 DexScreen_DrawMonAreaPage(void); +static bool8 DexScreen_IsPageUnlocked(u8 category, u8 pageNum); +static bool8 DexScreen_IsCategoryUnlocked(u8 category); +static u8 DexScreen_GetPageLimitsForCategory(u8 category); +static bool8 DexScreen_LookUpCategoryBySpecies(u16 species); +u8 DexScreen_DestroyAreaScreenResources(void); +void DexScreen_CreateCategoryPageSpeciesList(u8 category, u8 pageNum); +static u8 DexScreen_PageNumberToRenderablePages(u16 page); +void DexScreen_InputHandler_StartToCry(void); +void DexScreen_PrintStringWithAlignment(const u8 *str, s32 mode); +static void MoveCursorFunc_DexModeSelect(s32 itemIndex, bool8 onInit, struct ListMenu *list); +static void ItemPrintFunc_DexModeSelect(u8 windowId, s32 itemId, u8 y); +static void ItemPrintFunc_OrderedListMenu(u8 windowId, s32 itemId, u8 y); +static void Task_DexScreen_RegisterNonKantoMonBeforeNationalDex(u8 taskId); +static void Task_DexScreen_RegisterMonToPokedex(u8 taskId); #include "data/pokemon_graphics/footprint_table.h" -const u8 gUnknown_8440124[] = INCBIN_U8("graphics/pokedex/unk_8440124.bin.lz"); -const u8 gUnknown_8440274[] = INCBIN_U8("graphics/pokedex/unk_8440274.4bpp.lz"); -const u8 gUnknown_84403AC[] = INCBIN_U8("graphics/pokedex/unk_84403AC.4bpp.lz"); -const u16 gUnknown_84404C8[] = INCBIN_U16("graphics/pokedex/unk_84404C8.gbapal"); +const u32 sCategoryMonInfoBgTiles[] = INCBIN_U32("graphics/pokedex/mini_page.4bpp.lz"); +const u32 sKantoDexTiles[] = INCBIN_U32("graphics/pokedex/kanto_dex_bgtiles.4bpp.lz"); +const u32 sNatDexTiles[] = INCBIN_U32("graphics/pokedex/national_dex_bgtiles.4bpp.lz"); +const u16 sKantoDexPalette[0x100] = INCBIN_U16("graphics/pokedex/kanto_dex_bgpals.gbapal"); -const u16 gUnknown_84406C8[] = { +const u16 sDexScreen_CategoryCursorPals[] = { RGB(24, 22, 17), RGB(26, 24, 20), RGB(26, 20, 15), RGB(27, 23, 19), RGB(28, 18, 15), RGB(28, 22, 19), @@ -144,47 +150,47 @@ const u16 gUnknown_84406C8[] = { RGB(26, 20, 15), RGB(27, 23, 19) }; -const u16 gUnknown_84406E0[] = INCBIN_U16("graphics/pokedex/unk_84406E0.gbapal"); -const u16 gUnknown_84408E0[] = INCBIN_U16("graphics/pokedex/unk_84408E0.bin.lz"); -const u16 gUnknown_8440BD8[] = INCBIN_U16("graphics/pokedex/unk_8440BD8.bin.lz"); -const u32 gUnknown_8440EF0[] = INCBIN_U32("graphics/pokedex/unk_8440EF0.bin.lz"); -const u16 gUnknown_844112C[] = INCBIN_U16("graphics/pokedex/unk_844112C.bin.lz"); -const u16 gUnknown_84414BC[] = INCBIN_U16("graphics/pokedex/unk_84414BC.bin.lz"); -const u32 gUnknown_8441808[] = INCBIN_U32("graphics/pokedex/unk_8441808.bin.lz"); -const u16 gUnknown_8441A40[] = INCBIN_U16("graphics/pokedex/unk_8441A40.bin.lz"); -const u16 gUnknown_8441D54[] = INCBIN_U16("graphics/pokedex/unk_8441D54.bin.lz"); -const u16 gUnknown_8442004[] = INCBIN_U16("graphics/pokedex/unk_8442004.bin.lz"); -const u16 gUnknown_844223C[] = INCBIN_U16("graphics/pokedex/unk_844223C.bin.lz"); -const u16 gUnknown_84424E4[] = INCBIN_U16("graphics/pokedex/unk_84424E4.bin.lz"); -const u16 gUnknown_8442838[] = INCBIN_U16("graphics/pokedex/unk_8442838.bin.lz"); -const u16 gUnknown_8442BC0[] = INCBIN_U16("graphics/pokedex/unk_8442BC0.bin.lz"); -const u16 gUnknown_8442EF8[] = INCBIN_U16("graphics/pokedex/unk_8442EF8.bin.lz"); -const u16 gUnknown_844318C[] = INCBIN_U16("graphics/pokedex/unk_844318C.bin.lz"); -const u16 gUnknown_8443420[] = INCBIN_U16("graphics/pokedex/unk_8443420.gbapal"); -const u16 gUnknown_8443440[] = INCBIN_U16("graphics/pokedex/unk_8443440.gbapal"); -const u16 gUnknown_8443460[] = INCBIN_U16("graphics/pokedex/unk_8443460.gbapal"); -const u16 gUnknown_8443480[] = INCBIN_U16("graphics/pokedex/unk_8443480.gbapal"); -const u16 gUnknown_84434A0[] = INCBIN_U16("graphics/pokedex/unk_84434A0.gbapal"); -const u16 gUnknown_84434C0[] = INCBIN_U16("graphics/pokedex/unk_84434C0.gbapal"); -const u16 gUnknown_84434E0[] = INCBIN_U16("graphics/pokedex/unk_84434E0.gbapal"); -const u16 gUnknown_8443500[] = INCBIN_U16("graphics/pokedex/unk_8443500.gbapal"); -const u16 gUnknown_8443520[] = INCBIN_U16("graphics/pokedex/unk_8443520.gbapal"); -const u16 gUnknown_8443540[] = INCBIN_U16("graphics/pokedex/unk_8443540.gbapal"); -const u16 gUnknown_8443560[] = INCBIN_U16("graphics/pokedex/unk_8443560.gbapal"); -const u16 gUnknown_8443580[] = INCBIN_U16("graphics/pokedex/unk_8443580.gbapal"); -const u16 gUnknown_84435A0[] = INCBIN_U16("graphics/pokedex/unk_84435A0.gbapal"); -const u16 gUnknown_84435C0[] = INCBIN_U16("graphics/pokedex/unk_84435C0.gbapal"); -const u16 gUnknown_84435E0[] = INCBIN_U16("graphics/pokedex/unk_84435E0.gbapal"); -const u8 gUnknown_8443600[] = INCBIN_U8("graphics/pokedex/unk_8443600.4bpp"); -const u32 gUnknown_8443620[] = INCBIN_U32("graphics/pokedex/unk_8443620.bin.lz"); -const u32 gUnknown_8443910[] = INCBIN_U32("graphics/pokedex/unk_8443910.bin.lz"); -const u32 gUnknown_8443988[] = INCBIN_U32("graphics/pokedex/unk_8443988.bin.lz"); -const u32 gUnknown_84439FC[] = INCBIN_U32("graphics/pokedex/unk_84439FC.bin.lz"); -const u32 gUnknown_8443A78[] = INCBIN_U32("graphics/pokedex/unk_8443A78.bin.lz"); -const u32 gUnknown_8443AF8[] = INCBIN_U32("graphics/pokedex/unk_8443AF8.bin.lz"); -const u32 gUnknown_8443BB0[] = INCBIN_U32("graphics/pokedex/unk_8443BB0.bin.lz"); -const u32 gUnknown_8443C54[] = INCBIN_U32("graphics/pokedex/unk_8443C54.bin.lz"); -const u16 gUnknown_8443D00[] = INCBIN_U16("graphics/pokedex/unk_8443D00.4bpp"); +const u16 sNationalDexPalette[0x100] = INCBIN_U16("graphics/pokedex/national_dex_bgpals.gbapal"); +const u32 sTopMenuIconTiles_Cave[] = INCBIN_U32("graphics/pokedex/cat_icon_cave.4bpp.lz"); +const u32 sTopMenuIconTiles_Urban[] = INCBIN_U32("graphics/pokedex/cat_icon_urban.4bpp.lz"); +const u32 sTopMenuSelectionIconTiles_Cancel[] = INCBIN_U32("graphics/pokedex/cat_icon_cancel.4bpp.lz"); +const u32 sTopMenuIconTiles_Forest[] = INCBIN_U32("graphics/pokedex/cat_icon_forest.4bpp.lz"); +const u32 sTopMenuIconTiles_Grassland[] = INCBIN_U32("graphics/pokedex/cat_icon_grassland.4bpp.lz"); +const u32 sTopMenuIconTiles_QuestionMark[] = INCBIN_U32("graphics/pokedex/cat_icon_qmark.4bpp.lz"); +const u32 sTopMenuIconTiles_Mountain[] = INCBIN_U32("graphics/pokedex/cat_icon_mountain.4bpp.lz"); +const u32 sTopMenuIconTiles_Rare[] = INCBIN_U32("graphics/pokedex/cat_icon_rare.4bpp.lz"); +const u32 sTopMenuIconTiles_Sea[] = INCBIN_U32("graphics/pokedex/cat_icon_sea.4bpp.lz"); +const u32 sTopMenuIconTiles_Numerical[] = INCBIN_U32("graphics/pokedex/cat_icon_numerical.4bpp.lz"); +const u32 sTopMenuIconTiles_RoughTerrain[] = INCBIN_U32("graphics/pokedex/cat_icon_rough_terrain.4bpp.lz"); +const u32 sTopMenuIconTiles_WatersEdge[] = INCBIN_U32("graphics/pokedex/cat_icon_waters_edge.4bpp.lz"); +const u32 sTopMenuIconTiles_Type[] = INCBIN_U32("graphics/pokedex/cat_icon_type.4bpp.lz"); +const u32 sTopMenuIconTiles_Lightest[] = INCBIN_U32("graphics/pokedex/cat_icon_lightest.4bpp.lz"); +const u32 sTopMenuIconTiles_Smallest[] = INCBIN_U32("graphics/pokedex/cat_icon_smallest.4bpp.lz"); +const u16 sTopMenuIconPals_Cave[] = INCBIN_U16("graphics/pokedex/cat_icon_cave.gbapal"); +const u16 sTopMenuIconPals_Urban[] = INCBIN_U16("graphics/pokedex/cat_icon_urban.gbapal"); +const u16 sTopMenuSelectionIconPals_Cancel[] = INCBIN_U16("graphics/pokedex/cat_icon_cancel.gbapal"); +const u16 sTopMenuIconPals_Forest[] = INCBIN_U16("graphics/pokedex/cat_icon_forest.gbapal"); +const u16 sTopMenuIconPals_Grassland[] = INCBIN_U16("graphics/pokedex/cat_icon_grassland.gbapal"); +const u16 sTopMenuIconPals_QuestionMark[] = INCBIN_U16("graphics/pokedex/cat_icon_qmark.gbapal"); +const u16 sTopMenuIconPals_Mountain[] = INCBIN_U16("graphics/pokedex/cat_icon_mountain.gbapal"); +const u16 sTopMenuIconPals_Rare[] = INCBIN_U16("graphics/pokedex/cat_icon_rare.gbapal"); +const u16 sTopMenuIconPals_Sea[] = INCBIN_U16("graphics/pokedex/cat_icon_sea.gbapal"); +const u16 sTopMenuIconPals_Numerical[] = INCBIN_U16("graphics/pokedex/cat_icon_numerical.gbapal"); +const u16 sTopMenuIconPals_RoughTerrain[] = INCBIN_U16("graphics/pokedex/cat_icon_rough_terrain.gbapal"); +const u16 sTopMenuIconPals_WatersEdge[] = INCBIN_U16("graphics/pokedex/cat_icon_waters_edge.gbapal"); +const u16 sTopMenuIconPals_Type[] = INCBIN_U16("graphics/pokedex/cat_icon_type.gbapal"); +const u16 sTopMenuIconPals_Lightest[] = INCBIN_U16("graphics/pokedex/cat_icon_lightest.gbapal"); +const u16 sTopMenuIconPals_Smallest[] = INCBIN_U16("graphics/pokedex/cat_icon_smallest.gbapal"); +const u8 sDexScreen_CaughtIcon[] = INCBIN_U8("graphics/pokedex/caught_marker.4bpp"); +const u32 sTilemap_AreaMap_Kanto[] = INCBIN_U32("graphics/pokedex/map_kanto.4bpp.lz"); +const u32 sTilemap_AreaMap_OneIsland[] = INCBIN_U32("graphics/pokedex/map_one_island.4bpp.lz"); +const u32 sTilemap_AreaMap_TwoIsland[] = INCBIN_U32("graphics/pokedex/map_two_island.4bpp.lz"); +const u32 sTilemap_AreaMap_ThreeIsland[] = INCBIN_U32("graphics/pokedex/map_three_island.4bpp.lz"); +const u32 sTilemap_AreaMap_FourIsland[] = INCBIN_U32("graphics/pokedex/map_four_island.4bpp.lz"); +const u32 sTilemap_AreaMap_FiveIsland[] = INCBIN_U32("graphics/pokedex/map_five_island.4bpp.lz"); +const u32 sTilemap_AreaMap_SixIsland[] = INCBIN_U32("graphics/pokedex/map_six_island.4bpp.lz"); +const u32 sTilemap_AreaMap_SevenIsland[] = INCBIN_U32("graphics/pokedex/map_seven_island.4bpp.lz"); +const u16 sBlitTiles_WideEllipse[] = INCBIN_U16("graphics/pokedex/blit_wide_ellipse.4bpp"); #include "data/pokemon/pokedex_orders.h" @@ -193,7 +199,7 @@ static const u8 gExpandedPlaceholder_PokedexDescription[] = _(""); #include "data/pokemon/pokedex_text.h" #include "data/pokemon/pokedex_entries.h" -static const struct BgTemplate sUnknown_8451EBC[] = { +static const struct BgTemplate sBgTemplates[] = { { .bg = 0, .charBaseIndex = 0, @@ -232,7 +238,7 @@ static const struct BgTemplate sUnknown_8451EBC[] = { }, }; -static const struct WindowTemplate sUnknown_8451ECC[] = { +static const struct WindowTemplate sWindowTemplates[] = { { .bg = 0, .tilemapLeft = 0, @@ -262,82 +268,82 @@ static const struct WindowTemplate sUnknown_8451ECC[] = { }, }; -static const struct PokedexScreenData sUnknown_8451EE4 = { - .field_10 = 1, - .field_14 = -1, - .field_15 = -1, - .field_16 = -1, - .field_18 = {-1, -1, -1, -1}, - .field_20 = {-1, -1, -1, -1}, - .field_24 = {-1, -1, -1, -1}, - .field_40 = -1, - .field_4A = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, - .field_60 = -1, - .field_61 = -1, +static const struct PokedexScreenData sDexScreenDataInitialState = { + .modeSelectItemsAbove = 1, + .modeSelectWindowId = -1, + .selectionIconWindowId = -1, + .dexCountsWindowId = -1, + .pageSpecies = {-1, -1, -1, -1}, + .categoryMonWindowIds = {-1, -1, -1, -1}, + .categoryMonInfoWindowIds = {-1, -1, -1, -1}, + .numericalOrderWindowId = -1, + .windowIds = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, + .scrollArrowsTaskId = -1, + .categoryPageCursorTaskId = -1, +}; + + +static const struct WindowTemplate sWindowTemplate_ModeSelect = { + .bg = 1, + .tilemapLeft = 1, + .tilemapTop = 2, + .width = 20, + .height = 16, + .paletteNum = 0, + .baseBlock = 0x0008 +}; + +static const struct WindowTemplate sWindowTemplate_SelectionIcon = { + .bg = 1, + .tilemapLeft = 21, + .tilemapTop = 11, + .width = 8, + .height = 6, + .paletteNum = 1, + .baseBlock = 0x0148 }; +static const struct WindowTemplate sWindowTemplate_DexCounts = { + .bg = 1, + .tilemapLeft = 21, + .tilemapTop = 2, + .width = 9, + .height = 9, + .paletteNum = 0, + .baseBlock = 0x0178 +}; -static const struct WindowTemplate sUnknown_8451F54 = { - .bg = 1, - .tilemapLeft = 1, - .tilemapTop = 2, - .width = 20, - .height = 16, - .paletteNum = 0, - .baseBlock = 0x0008 - }; - -static const struct WindowTemplate sUnknown_8451F5C = { - .bg = 1, - .tilemapLeft = 21, - .tilemapTop = 11, - .width = 8, - .height = 6, - .paletteNum = 1, - .baseBlock = 0x0148 - }; - -static const struct WindowTemplate sUnknown_8451F64 = { - .bg = 1, - .tilemapLeft = 21, - .tilemapTop = 2, - .width = 9, - .height = 9, - .paletteNum = 0, - .baseBlock = 0x0178 - }; - -static const struct ListMenuItem sUnknown_8451F6C[] = { - {gText_PokemonList, -3}, - {gText_NumericalMode, 9}, - {gText_PokemonHabitats, -3}, - {gText_DexCategory_GrasslandPkmn, 0}, - {gText_DexCategory_ForestPkmn, 1}, - {gText_DexCategory_WatersEdgePkmn, 2}, - {gText_DexCategory_SeaPkmn, 3}, - {gText_DexCategory_CavePkmn, 4}, - {gText_DexCategory_MountainPkmn, 5}, - {gText_DexCategory_RoughTerrainPkmn, 6}, - {gText_DexCategory_UrbanPkmn, 7}, - {gText_DexCategory_RarePkmn, 8}, - {gText_Search, -3}, - {gText_AToZMode, 10}, - {gText_TypeMode, 11}, - {gText_LightestMode, 12}, - {gText_SmallestMode, 13}, - {gText_PokedexOther, -3}, - {gText_ClosePokedex, -2}, +static const struct ListMenuItem sListMenuItems_KantoDexModeSelect[] = { + {gText_PokemonList, LIST_HEADER}, + {gText_NumericalMode, DEX_MODE(NUMERICAL_KANTO)}, + {gText_PokemonHabitats, LIST_HEADER}, + {gText_DexCategory_GrasslandPkmn, DEX_CATEGORY_GRASSLAND}, + {gText_DexCategory_ForestPkmn, DEX_CATEGORY_FOREST}, + {gText_DexCategory_WatersEdgePkmn, DEX_CATEGORY_WATERS_EDGE}, + {gText_DexCategory_SeaPkmn, DEX_CATEGORY_SEA}, + {gText_DexCategory_CavePkmn, DEX_CATEGORY_CAVE}, + {gText_DexCategory_MountainPkmn, DEX_CATEGORY_MOUNTAIN}, + {gText_DexCategory_RoughTerrainPkmn, DEX_CATEGORY_ROUGH_TERRAIN}, + {gText_DexCategory_UrbanPkmn, DEX_CATEGORY_URBAN}, + {gText_DexCategory_RarePkmn, DEX_CATEGORY_RARE}, + {gText_Search, LIST_HEADER}, + {gText_AToZMode, DEX_MODE(ATOZ)}, + {gText_TypeMode, DEX_MODE(TYPE)}, + {gText_LightestMode, DEX_MODE(LIGHTEST)}, + {gText_SmallestMode, DEX_MODE(SMALLEST)}, + {gText_PokedexOther, LIST_HEADER}, + {gText_ClosePokedex, LIST_CANCEL}, }; -static const struct ListMenuTemplate sUnknown_8452004 = { - .items = sUnknown_8451F6C, - .moveCursorFunc = sub_8102EC0, - .itemPrintFunc = sub_8102F48, - .totalItems = NELEMS(sUnknown_8451F6C), +static const struct ListMenuTemplate sListMenuTemplate_KantoDexModeSelect = { + .items = sListMenuItems_KantoDexModeSelect, + .moveCursorFunc = MoveCursorFunc_DexModeSelect, + .itemPrintFunc = ItemPrintFunc_DexModeSelect, + .totalItems = NELEMS(sListMenuItems_KantoDexModeSelect), .maxShowed = 9, - .windowId = 0, - .header_X = 0, - .item_X = 12, + .windowId = 0, + .header_X = 0, + .item_X = 12, .cursor_X = 4, .upText_Y = 2, .cursorPal = 1, @@ -350,38 +356,38 @@ static const struct ListMenuTemplate sUnknown_8452004 = { .cursorKind = 0, }; -static const struct ListMenuItem sUnknown_845201C[] = { - {gText_PokemonList, -3}, - {gText_NumericalModeKanto, 9}, - {gText_NumericalModeNational, 14}, - {gText_PokemonHabitats, -3}, - {gText_DexCategory_GrasslandPkmn, 0}, - {gText_DexCategory_ForestPkmn, 1}, - {gText_DexCategory_WatersEdgePkmn, 2}, - {gText_DexCategory_SeaPkmn, 3}, - {gText_DexCategory_CavePkmn, 4}, - {gText_DexCategory_MountainPkmn, 5}, - {gText_DexCategory_RoughTerrainPkmn, 6}, - {gText_DexCategory_UrbanPkmn, 7}, - {gText_DexCategory_RarePkmn, 8}, - {gText_Search, -3}, - {gText_AToZMode, 10}, - {gText_TypeMode, 11}, - {gText_LightestMode, 12}, - {gText_SmallestMode, 13}, - {gText_PokedexOther, -3}, - {gText_ClosePokedex, -2}, +static const struct ListMenuItem sListMenuItems_NatDexModeSelect[] = { + {gText_PokemonList, LIST_HEADER}, + {gText_NumericalModeKanto, DEX_MODE(NUMERICAL_KANTO)}, + {gText_NumericalModeNational, DEX_MODE(NUMERICAL_NATIONAL)}, + {gText_PokemonHabitats, LIST_HEADER}, + {gText_DexCategory_GrasslandPkmn, DEX_CATEGORY_GRASSLAND}, + {gText_DexCategory_ForestPkmn, DEX_CATEGORY_FOREST}, + {gText_DexCategory_WatersEdgePkmn, DEX_CATEGORY_WATERS_EDGE}, + {gText_DexCategory_SeaPkmn, DEX_CATEGORY_SEA}, + {gText_DexCategory_CavePkmn, DEX_CATEGORY_CAVE}, + {gText_DexCategory_MountainPkmn, DEX_CATEGORY_MOUNTAIN}, + {gText_DexCategory_RoughTerrainPkmn, DEX_CATEGORY_ROUGH_TERRAIN}, + {gText_DexCategory_UrbanPkmn, DEX_CATEGORY_URBAN}, + {gText_DexCategory_RarePkmn, DEX_CATEGORY_RARE}, + {gText_Search, LIST_HEADER}, + {gText_AToZMode, DEX_MODE(ATOZ)}, + {gText_TypeMode, DEX_MODE(TYPE)}, + {gText_LightestMode, DEX_MODE(LIGHTEST)}, + {gText_SmallestMode, DEX_MODE(SMALLEST)}, + {gText_PokedexOther, LIST_HEADER}, + {gText_ClosePokedex, LIST_CANCEL}, }; -static const struct ListMenuTemplate sUnknown_84520BC = { - .items = sUnknown_845201C, - .moveCursorFunc = sub_8102EC0, - .itemPrintFunc = sub_8102F48, - .totalItems = NELEMS(sUnknown_845201C), +static const struct ListMenuTemplate sListMenuTemplate_NatDexModeSelect = { + .items = sListMenuItems_NatDexModeSelect, + .moveCursorFunc = MoveCursorFunc_DexModeSelect, + .itemPrintFunc = ItemPrintFunc_DexModeSelect, + .totalItems = NELEMS(sListMenuItems_NatDexModeSelect), .maxShowed = 9, - .windowId = 0, - .header_X = 0, - .item_X = 12, + .windowId = 0, + .header_X = 0, + .item_X = 12, .cursor_X = 4, .upText_Y = 2, .cursorPal = 1, @@ -394,54 +400,99 @@ static const struct ListMenuTemplate sUnknown_84520BC = { .cursorKind = 0, }; -static const struct ScrollArrowsTemplate sUnknown_84520D4 = { - .firstArrowType = 2, - .firstX = 200, - .firstY = 19, - .secondArrowType = 3, - .secondX = 200, +static const struct ScrollArrowsTemplate sScrollArrowsTemplate_KantoDex = { + .firstArrowType = 2, + .firstX = 200, + .firstY = 19, + .secondArrowType = 3, + .secondX = 200, .secondY = 141, - .fullyUpThreshold = 0, - .fullyDownThreshold = 10, - .tileTag = 2000, + .fullyUpThreshold = 0, + .fullyDownThreshold = 10, + .tileTag = 2000, .palTag = 0xFFFF, .palNum = 1 }; -static const struct ScrollArrowsTemplate sUnknown_84520E4 = { - .firstArrowType = 2, - .firstX = 200, - .firstY = 19, - .secondArrowType = 3, - .secondX = 200, +static const struct ScrollArrowsTemplate sScrollArrowsTemplate_NatDex = { + .firstArrowType = 2, + .firstX = 200, + .firstY = 19, + .secondArrowType = 3, + .secondX = 200, .secondY = 141, - .fullyUpThreshold = 0, - .fullyDownThreshold = 11, - .tileTag = 2000, + .fullyUpThreshold = 0, + .fullyDownThreshold = 11, + .tileTag = 2000, .palTag = 0xFFFF, .palNum = 1 }; -static const struct PokedexScreenWindowGfx sUnknown_84520F4[] = { - {.map = gUnknown_84414BC, .pal = gUnknown_84434A0}, - {.map = gUnknown_844112C, .pal = gUnknown_8443480}, - {.map = gUnknown_8442838, .pal = gUnknown_8443580}, - {.map = gUnknown_8442004, .pal = gUnknown_8443520}, - {.map = gUnknown_84408E0, .pal = gUnknown_8443420}, - {.map = gUnknown_8441A40, .pal = gUnknown_84434E0}, - {.map = gUnknown_84424E4, .pal = gUnknown_8443560}, - {.map = gUnknown_8440BD8, .pal = gUnknown_8443440}, - {.map = gUnknown_8441D54, .pal = gUnknown_8443500}, - {.map = gUnknown_844223C, .pal = gUnknown_8443540}, - {.map = gUnknown_8E9C16C, .pal = gUnknown_8E9C14C}, - {.map = gUnknown_8442BC0, .pal = gUnknown_84435A0}, - {.map = gUnknown_8442EF8, .pal = gUnknown_84435C0}, - {.map = gUnknown_844318C, .pal = gUnknown_84435E0}, - {.map = gUnknown_844223C, .pal = gUnknown_8443540}, +static const struct PokedexScreenWindowGfx sTopMenuSelectionIconGfxPtrs[] = { + [DEX_CATEGORY_GRASSLAND] = { + .tiles = sTopMenuIconTiles_Grassland, + .pal = sTopMenuIconPals_Grassland + }, + [DEX_CATEGORY_FOREST] = { + .tiles = sTopMenuIconTiles_Forest, + .pal = sTopMenuIconPals_Forest + }, + [DEX_CATEGORY_WATERS_EDGE] = { + .tiles = sTopMenuIconTiles_WatersEdge, + .pal = sTopMenuIconPals_WatersEdge + }, + [DEX_CATEGORY_SEA] = { + .tiles = sTopMenuIconTiles_Sea, + .pal = sTopMenuIconPals_Sea + }, + [DEX_CATEGORY_CAVE] = { + .tiles = sTopMenuIconTiles_Cave, + .pal = sTopMenuIconPals_Cave + }, + [DEX_CATEGORY_MOUNTAIN] = { + .tiles = sTopMenuIconTiles_Mountain, + .pal = sTopMenuIconPals_Mountain + }, + [DEX_CATEGORY_ROUGH_TERRAIN] = { + .tiles = sTopMenuIconTiles_RoughTerrain, + .pal = sTopMenuIconPals_RoughTerrain + }, + [DEX_CATEGORY_URBAN] = { + .tiles = sTopMenuIconTiles_Urban, + .pal = sTopMenuIconPals_Urban + }, + [DEX_CATEGORY_RARE] = { + .tiles = sTopMenuIconTiles_Rare, + .pal = sTopMenuIconPals_Rare + }, + [DEX_MODE(NUMERICAL_KANTO)] = { + .tiles = sTopMenuIconTiles_Numerical, + .pal = sTopMenuIconPals_Numerical + }, + [DEX_MODE(ATOZ)] = { + .tiles = gDexScreen_TopMenuIconTiles_AtoZ, + .pal = gDexScreen_TopMenuIconPals_AtoZ + }, + [DEX_MODE(TYPE)] = { + .tiles = sTopMenuIconTiles_Type, + .pal = sTopMenuIconPals_Type + }, + [DEX_MODE(LIGHTEST)] = { + .tiles = sTopMenuIconTiles_Lightest, + .pal = sTopMenuIconPals_Lightest + }, + [DEX_MODE(SMALLEST)] = { + .tiles = sTopMenuIconTiles_Smallest, + .pal = sTopMenuIconPals_Smallest + }, + [DEX_MODE(NUMERICAL_NATIONAL)] = { + .tiles = sTopMenuIconTiles_Numerical, + .pal = sTopMenuIconPals_Numerical + }, }; -static const struct WindowTemplate sUnknown_845216C = { +static const struct WindowTemplate sWindowTemplate_OrderedListMenu = { .bg = 1, .tilemapLeft = 2, .tilemapTop = 2, @@ -451,15 +502,15 @@ static const struct WindowTemplate sUnknown_845216C = { .baseBlock = 0x0008 }; -static const struct ListMenuTemplate sUnknown_8452174 = { - .items = sUnknown_8451F6C, +static const struct ListMenuTemplate sListMenuTemplate_OrderedListMenu = { + .items = sListMenuItems_KantoDexModeSelect, .moveCursorFunc = ListMenuDefaultCursorMoveFunc, - .itemPrintFunc = sub_8103A40, - .totalItems = 0, + .itemPrintFunc = ItemPrintFunc_OrderedListMenu, + .totalItems = 0, .maxShowed = 9, - .windowId = 0, - .header_X = 0, - .item_X = 56, + .windowId = 0, + .header_X = 0, + .item_X = 56, .cursor_X = 4, .upText_Y = 2, .cursorPal = 1, @@ -472,37 +523,55 @@ static const struct ListMenuTemplate sUnknown_8452174 = { .cursorKind = 0, }; -static const struct ListMenuWindowRect sUnknown_845218C = { - .x = 0, - .y = 0, - .width = 5, - .height = 16, - .palNum = 0, -}; - -// Unused -static const u8 gUnknown_8452194[] = { - 0x05, 0x00, 0x02, 0x10, 0x01, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x0f, 0x00, 0x08, 0x10, 0x02, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 +static const struct ListMenuWindowRect sListMenuRects_OrderedList[] = { + { + .x = 0, + .y = 0, + .width = 5, + .height = 16, + .palNum = 0 + }, { + .x = 5, + .y = 0, + .width = 2, + .height = 16, + .palNum = 1 + }, { + .x = 7, + .y = 0, + .width = 8, + .height = 16, + .palNum = 0 + }, { + .x = 15, + .y = 0, + .width = 8, + .height = 16, + .palNum = 2, + }, { + .x = 0xFF, + .y = 0xFF, + .width = 0xFF, + .height = 0xFF, + .palNum = 0xFF + } }; -static const struct ScrollArrowsTemplate sUnknown_84521B4 = { - .firstArrowType = 2, - .firstX = 200, - .firstY = 19, - .secondArrowType = 3, - .secondX = 200, +static const struct ScrollArrowsTemplate sDexOrderScrollArrowsTemplate = { + .firstArrowType = 2, + .firstX = 200, + .firstY = 19, + .secondArrowType = 3, + .secondX = 200, .secondY = 141, - .fullyUpThreshold = 0, - .fullyDownThreshold = 0, - .tileTag = 2000, + .fullyUpThreshold = 0, + .fullyDownThreshold = 0, + .tileTag = 2000, .palTag = 0xFFFF, .palNum = 1, }; -static const struct WindowTemplate sUnknown_84521C4 = { +static const struct WindowTemplate sWindowTemplate_CategoryMonIcon = { .bg = 2, .tilemapLeft = 0, .tilemapTop = 0, @@ -512,7 +581,7 @@ static const struct WindowTemplate sUnknown_84521C4 = { .baseBlock = 0x0000 }; -static const struct WindowTemplate sUnknown_84521CC = { +static const struct WindowTemplate sWindowTemplate_CategoryMonInfo = { .bg = 1, .tilemapLeft = 0, .tilemapTop = 0, @@ -522,7 +591,7 @@ static const struct WindowTemplate sUnknown_84521CC = { .baseBlock = 0x0000 }; -const struct WindowTemplate gUnknown_84521D4 = { +const struct WindowTemplate sWindowTemplate_DexEntry_MonPic = { .bg = 1, .tilemapLeft = 19, .tilemapTop = 3, @@ -532,7 +601,7 @@ const struct WindowTemplate gUnknown_84521D4 = { .baseBlock = 0x01a8 }; -const struct WindowTemplate gUnknown_84521DC = { +const struct WindowTemplate sWindowTemplate_DexEntry_SpeciesStats = { .bg = 1, .tilemapLeft = 2, .tilemapTop = 3, @@ -542,7 +611,7 @@ const struct WindowTemplate gUnknown_84521DC = { .baseBlock = 0x01e8 }; -const struct WindowTemplate gUnknown_84521E4 = { +const struct WindowTemplate sWindowTemplate_DexEntry_FlavorText = { .bg = 1, .tilemapLeft = 0, .tilemapTop = 11, @@ -552,7 +621,7 @@ const struct WindowTemplate gUnknown_84521E4 = { .baseBlock = 0x0250 }; -const struct WindowTemplate gUnknown_84521EC = { +const struct WindowTemplate sWindowTemplate_AreaMap_MonIcon = { .bg = 2, .tilemapLeft = 1, .tilemapTop = 2, @@ -562,7 +631,7 @@ const struct WindowTemplate gUnknown_84521EC = { .baseBlock = 0x01a8 }; -const struct WindowTemplate gUnknown_84521F4 = { +const struct WindowTemplate sWindowTemplate_AreaMap_SpeciesName = { .bg = 2, .tilemapLeft = 5, .tilemapTop = 2, @@ -572,7 +641,7 @@ const struct WindowTemplate gUnknown_84521F4 = { .baseBlock = 0x01b8 }; -const struct WindowTemplate gUnknown_84521FC = { +const struct WindowTemplate sWindowTemplate_AreaMap_Size = { .bg = 2, .tilemapLeft = 2, .tilemapTop = 7, @@ -582,7 +651,7 @@ const struct WindowTemplate gUnknown_84521FC = { .baseBlock = 0x01d0 }; -const struct WindowTemplate gUnknown_8452204 = { +const struct WindowTemplate sWindowTemplate_AreaMap_Area = { .bg = 2, .tilemapLeft = 18, .tilemapTop = 2, @@ -592,7 +661,7 @@ const struct WindowTemplate gUnknown_8452204 = { .baseBlock = 0x01e4 }; -const struct WindowTemplate gUnknown_845220C = { +const struct WindowTemplate sWindowTemplate_AreaMap_MonTypes = { .bg = 2, .tilemapLeft = 5, .tilemapTop = 5, @@ -602,7 +671,7 @@ const struct WindowTemplate gUnknown_845220C = { .baseBlock = 0x01f8 }; -const struct WindowTemplate gUnknown_8452214 = { +const struct WindowTemplate sWindowTemplate_AreaMap_Kanto = { .bg = 2, .tilemapLeft = 17, .tilemapTop = 4, @@ -612,7 +681,7 @@ const struct WindowTemplate gUnknown_8452214 = { .baseBlock = 0x0208 }; -static const struct WindowTemplate sUnknown_845221C = { +static const struct WindowTemplate sWindowTemplate_AreaMap_OneIsland = { .bg = 2, .tilemapLeft = 13, .tilemapTop = 4, @@ -622,7 +691,7 @@ static const struct WindowTemplate sUnknown_845221C = { .baseBlock = 0x0274 }; -static const struct WindowTemplate sUnknown_8452224 = { +static const struct WindowTemplate sWindowTemplate_AreaMap_TwoIsland = { .bg = 2, .tilemapLeft = 13, .tilemapTop = 7, @@ -632,7 +701,7 @@ static const struct WindowTemplate sUnknown_8452224 = { .baseBlock = 0x0280 }; -static const struct WindowTemplate sUnknown_845222C = { +static const struct WindowTemplate sWindowTemplate_AreaMap_ThreeIsland = { .bg = 2, .tilemapLeft = 13, .tilemapTop = 10, @@ -642,7 +711,7 @@ static const struct WindowTemplate sUnknown_845222C = { .baseBlock = 0x028c }; -static const struct WindowTemplate sUnknown_8452234 = { +static const struct WindowTemplate sWindowTemplate_AreaMap_FourIsland = { .bg = 2, .tilemapLeft = 13, .tilemapTop = 13, @@ -652,7 +721,7 @@ static const struct WindowTemplate sUnknown_8452234 = { .baseBlock = 0x0298 }; -static const struct WindowTemplate sUnknown_845223C = { +static const struct WindowTemplate sWindowTemplate_AreaMap_FiveIsland = { .bg = 2, .tilemapLeft = 17, .tilemapTop = 13, @@ -662,7 +731,7 @@ static const struct WindowTemplate sUnknown_845223C = { .baseBlock = 0x02a8 }; -static const struct WindowTemplate sUnknown_8452244 = { +static const struct WindowTemplate sWindowTemplate_AreaMap_SixIsland = { .bg = 2, .tilemapLeft = 21, .tilemapTop = 13, @@ -672,7 +741,7 @@ static const struct WindowTemplate sUnknown_8452244 = { .baseBlock = 0x02b8 }; -static const struct WindowTemplate sUnknown_845224C = { +static const struct WindowTemplate sWindowTemplate_AreaMap_SevenIsland = { .bg = 2, .tilemapLeft = 25, .tilemapTop = 13, @@ -684,46 +753,47 @@ static const struct WindowTemplate sUnknown_845224C = { struct { const struct WindowTemplate * window; - const u32 * tilemap; -} const gUnknown_8452254[] = { - {&sUnknown_845221C, gUnknown_8443910}, - {&sUnknown_8452224, gUnknown_8443988}, - {&sUnknown_845222C, gUnknown_84439FC}, - {&sUnknown_8452234, gUnknown_8443A78}, - {&sUnknown_845223C, gUnknown_8443AF8}, - {&sUnknown_8452244, gUnknown_8443BB0}, - {&sUnknown_845224C, gUnknown_8443C54}, + const u32 * tiles; +} const sAreaMapStructs_SeviiIslands[] = { + {&sWindowTemplate_AreaMap_OneIsland, sTilemap_AreaMap_OneIsland}, + {&sWindowTemplate_AreaMap_TwoIsland, sTilemap_AreaMap_TwoIsland}, + {&sWindowTemplate_AreaMap_ThreeIsland, sTilemap_AreaMap_ThreeIsland}, + {&sWindowTemplate_AreaMap_FourIsland, sTilemap_AreaMap_FourIsland}, + {&sWindowTemplate_AreaMap_FiveIsland, sTilemap_AreaMap_FiveIsland}, + {&sWindowTemplate_AreaMap_SixIsland, sTilemap_AreaMap_SixIsland}, + {&sWindowTemplate_AreaMap_SevenIsland, sTilemap_AreaMap_SevenIsland}, }; -static const u16 sUnknown_845228C[] = INCBIN_U16("graphics/pokedex/unk_845228C.bin"); +static const u16 sCategoryPageIconWindowBg[] = INCBIN_U16("graphics/pokedex/page_icon_tilemap.bin"); -static const u8 sUnknown_845230C[][4] = { - {0x0b, 0x03, 0x0b, 0x0b}, +// Circular window x/y; Rectangular window x/y +static const u8 sPageIconCoords_1Mon[1][4] = { + {11, 3, 11, 11}, }; -static const u8 sUnknown_8452310[][4] = { - {0x03, 0x03, 0x0b, 0x03}, - {0x12, 0x09, 0x0a, 0x0b}, +static const u8 sPageIconCoords_2Mons[2][4] = { + { 3, 3, 11, 3}, + {18, 9, 10, 11}, }; -static const u8 sUnknown_8452318[][4] = { - {0x01, 0x02, 0x09, 0x02}, - {0x0b, 0x09, 0x03, 0x0b}, - {0x15, 0x03, 0x15, 0x0b} +static const u8 sPageIconCoords_3Mons[3][4] = { + { 1, 2, 9, 2}, + {11, 9, 3, 11}, + {21, 3, 21, 11} }; -static const u8 sUnknown_8452324[][4] = { - {0x00, 0x02, 0x06, 0x03}, - {0x07, 0x0a, 0x00, 0x0c}, - {0x0f, 0x0a, 0x16, 0x0b}, - {0x16, 0x02, 0x0f, 0x04} +static const u8 sPageIconCoords_4Mons[4][4] = { + { 0, 2, 6, 3}, + { 7, 10, 0, 12}, + {15, 10, 22, 11}, + {22, 2, 15, 4} }; -const u8 (*const gUnknown_8452334[])[4] = { - sUnknown_845230C, - sUnknown_8452310, - sUnknown_8452318, - sUnknown_8452324, +const u8 (*const sCategoryPageIconCoords[])[4] = { + sPageIconCoords_1Mon, + sPageIconCoords_2Mons, + sPageIconCoords_3Mons, + sPageIconCoords_4Mons, }; static const u8 * const sDexCategoryNamePtrs[] = { @@ -738,86 +808,55 @@ static const u8 * const sDexCategoryNamePtrs[] = { gText_DexCategory_RarePkmn, }; -const u16 gUnknown_8452368[] = INCBIN_U16("graphics/pokedex/unk_8452368.gbapal"); - -static const u8 sUnknown_8452388[][30] = { - { - 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, - 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, - 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e - }, { - 0x05, 0x0b, 0x11, 0x17, 0x1d, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, - 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, - 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e - }, { - 0x02, 0x05, 0x08, 0x0b, 0x0e, 0x11, 0x14, 0x17, 0x1a, 0x1d, - 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, - 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e - }, { - 0x02, 0x03, 0x05, 0x07, 0x09, 0x0b, 0x0d, 0x0f, 0x11, 0x13, - 0x15, 0x17, 0x19, 0x1b, 0x1d, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, - 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e - }, { - 0x02, 0x04, 0x05, 0x07, 0x08, 0x0a, 0x0b, 0x0d, 0x0e, 0x10, - 0x11, 0x13, 0x14, 0x16, 0x17, 0x19, 0x1a, 0x1c, 0x1d, 0x1e, - 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e - }, { - 0x01, 0x02, 0x03, 0x04, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, - 0x0d, 0x0f, 0x10, 0x11, 0x13, 0x14, 0x15, 0x17, 0x18, 0x19, - 0x1b, 0x1c, 0x1d, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e - }, { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x08, 0x09, 0x0a, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x14, 0x15, 0x16, - 0x17, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1e, 0x1e, 0x1e - }, { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x15, 0x16, - 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1e, 0x1e - }, { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, - 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e - }, { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, - 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d - }, +const u16 sPalette_Silhouette[] = INCBIN_U16("graphics/pokedex/silhouette_sprite_pal.gbapal"); + +static const u8 sDexScreenPageTurnColumns[][30] = { + {30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}, + { 5, 11, 17, 23, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}, + { 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}, + { 2, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}, + { 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}, + { 1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 30, 30, 30, 30, 30, 30}, + { 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 30, 30, 30}, + { 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 30, 30}, + { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30}, + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29}, }; -static const struct ScrollArrowsTemplate sUnknown_84524B4 = { - .firstArrowType = 0, - .firstX = 16, - .firstY = 80, - .secondArrowType = 1, - .secondX = 224, +static const struct ScrollArrowsTemplate sScrollArrowsTemplate_CategoryMenu = { + .firstArrowType = 0, + .firstX = 16, + .firstY = 80, + .secondArrowType = 1, + .secondX = 224, .secondY = 80, - .fullyUpThreshold = 0, - .fullyDownThreshold = 0, - .tileTag = 2000, + .fullyUpThreshold = 0, + .fullyDownThreshold = 0, + .tileTag = 2000, .palTag = 0xFFFF, .palNum = 1, }; -const struct CursorStruct gUnknown_84524C4 = { - .left = 0, +const struct CursorStruct sCursorStruct_CategoryPage = { + .left = 0, .top = 160, - .rowWidth = 64, - .rowHeight = 40, - .tileTag = 2002, + .rowWidth = 64, + .rowHeight = 40, + .tileTag = 2002, .palTag = 0xFFFF, .palNum = 4, }; #include "data/pokemon/pokedex_categories.h" -void sub_81024C0(void) +void VBlankCB(void) { LoadOam(); ProcessSpriteCopyRequests(); TransferPlttBuffer(); } -void sub_81024D4(void) +void CB2_PokedexScreen(void) { if (!gPaletteFade.active || IsDma3ManagerBusyWithBgCopy()) { @@ -832,7 +871,7 @@ void sub_81024D4(void) } } -void sub_810250C(void) +void DexScreen_LoadResources(void) { bool8 natDex; u8 taskId; @@ -845,29 +884,29 @@ void sub_810250C(void) ResetTasks(); ScanlineEffect_Stop(); ResetBgsAndClearDma3BusyFlags(TRUE); - InitBgsFromTemplates(0, sUnknown_8451EBC, NELEMS(sUnknown_8451EBC)); + InitBgsFromTemplates(0, sBgTemplates, NELEMS(sBgTemplates)); SetBgTilemapBuffer(3, (u16*)Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(2, (u16*)Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(1, (u16*)Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(0, (u16*)Alloc(BG_SCREEN_SIZE)); if (natDex) - DecompressAndLoadBgGfxUsingHeap(3, (void*)gUnknown_84403AC, BG_SCREEN_SIZE, 0, 0); + DecompressAndLoadBgGfxUsingHeap(3, (void*)sNatDexTiles, BG_SCREEN_SIZE, 0, 0); else - DecompressAndLoadBgGfxUsingHeap(3, (void*)gUnknown_8440274, BG_SCREEN_SIZE, 0, 0); - InitWindows(sUnknown_8451ECC); + DecompressAndLoadBgGfxUsingHeap(3, (void*)sKantoDexTiles, BG_SCREEN_SIZE, 0, 0); + InitWindows(sWindowTemplates); DeactivateAllTextPrinters(); m4aSoundVSyncOn(); - SetVBlankCallback(sub_81024C0); + SetVBlankCallback(VBlankCB); EnableInterrupts(INTR_FLAG_VBLANK); - taskId = CreateTask(sub_810287C, 0); - gUnknown_203ACF0 = Alloc(sizeof(struct PokedexScreenData)); - *gUnknown_203ACF0 = sUnknown_8451EE4; - gUnknown_203ACF0->field_00 = taskId; - gUnknown_203ACF0->field_44 = Alloc(NATIONAL_DEX_COUNT * sizeof(struct ListMenuItem)); - gUnknown_203ACF0->field_6A = sub_8104BBC(0, 1); - gUnknown_203ACF0->field_6C = sub_8104BBC(1, 1); - gUnknown_203ACF0->field_66 = sub_8104BBC(0, 0); - gUnknown_203ACF0->field_68 = sub_8104BBC(1, 0); + taskId = CreateTask(Task_PokedexScreen, 0); + sPokedexScreenData = Alloc(sizeof(struct PokedexScreenData)); + *sPokedexScreenData = sDexScreenDataInitialState; + sPokedexScreenData->taskId = taskId; + sPokedexScreenData->listItems = Alloc(NATIONAL_DEX_COUNT * sizeof(struct ListMenuItem)); + sPokedexScreenData->numSeenNational = DexScreen_GetDexCount(FLAG_GET_SEEN, 1); + sPokedexScreenData->numOwnedNational = DexScreen_GetDexCount(FLAG_GET_CAUGHT, 1); + sPokedexScreenData->numSeenKanto = DexScreen_GetDexCount(FLAG_GET_SEEN, 0); + sPokedexScreenData->numOwnedKanto = DexScreen_GetDexCount(FLAG_GET_CAUGHT, 0); SetBGMVolume_SuppressHelpSystemReduction(0x80); ChangeBgX(0, 0, 0); ChangeBgY(0, 0, 0); @@ -879,31 +918,31 @@ void sub_810250C(void) ChangeBgY(3, 0, 0); gPaletteFade.bufferTransferDisabled = TRUE; if (natDex) - LoadPalette(gUnknown_84406E0, 0, 0x200); + LoadPalette(sNationalDexPalette, 0, 0x200); else - LoadPalette(gUnknown_84404C8, 0, 0x200); - FillBgTilemapBufferRect(3, 0x001, 0, 0, 32, 32, 0); - FillBgTilemapBufferRect(2, 0x000, 0, 0, 32, 32, 0x11); - FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11); - FillBgTilemapBufferRect(0, 0x0003, 0, 0, 32, 2, 0xF); - FillBgTilemapBufferRect(0, 0x0000, 0, 2, 32, 16, 0x11); - FillBgTilemapBufferRect(0, 0x003, 0, 18, 32, 2, 0xF); + LoadPalette(sKantoDexPalette, 0, 0x200); + FillBgTilemapBufferRect(3, 0x001, 0, 0, 32, 32, 0x00); + FillBgTilemapBufferRect(2, 0x000, 0, 0, 32, 32, 0x11); + FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11); + FillBgTilemapBufferRect(0, 0x003, 0, 0, 32, 2, 0x0F); + FillBgTilemapBufferRect(0, 0x000, 0, 2, 32, 16, 0x11); + FillBgTilemapBufferRect(0, 0x003, 0, 18, 32, 2, 0x0F); } void CB2_OpenPokedexFromStartMenu(void) { - sub_810250C(); + DexScreen_LoadResources(); ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_WIN1_ON); SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 0); - SetMainCallback2(sub_81024D4); + SetMainCallback2(CB2_PokedexScreen); SetHelpContext(HELPCONTEXT_POKEDEX); } #define FREE_IF_NOT_NULL(ptr0) ({ void * ptr = (ptr0); if (ptr) Free(ptr); }) -bool8 sub_8102798(void) +bool8 DoClosePokedex(void) { switch (gMain.state) { @@ -918,8 +957,8 @@ bool8 sub_8102798(void) UpdatePaletteFade(); return FALSE; case 2: - FREE_IF_NOT_NULL(gUnknown_203ACF0->field_44); - FREE_IF_NOT_NULL(gUnknown_203ACF0); + FREE_IF_NOT_NULL(sPokedexScreenData->listItems); + FREE_IF_NOT_NULL(sPokedexScreenData); FreeAllWindowBuffers(); FREE_IF_NOT_NULL(GetBgTilemapBuffer(0)); FREE_IF_NOT_NULL(GetBgTilemapBuffer(1)); @@ -931,44 +970,44 @@ bool8 sub_8102798(void) return TRUE; } -void sub_8102858(void) +void CB2_ClosePokedex(void) { - if (sub_8102798()) + if (DoClosePokedex()) { SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_WIN1_ON); SetMainCallback2(CB2_ReturnToFieldWithOpenMenu); } } -static void sub_810287C(u8 taskId) +static void Task_PokedexScreen(u8 taskId) { int i; - switch (gUnknown_203ACF0->field_01) + switch (sPokedexScreenData->state) { case 0: - gUnknown_203ACF0->field_08 = 0; + sPokedexScreenData->unlockedCategories = 0; for (i = 0; i < 9; i++) - gUnknown_203ACF0->field_08 |= (sub_81068A0(i) << i); - gUnknown_203ACF0->field_01 = 2; + sPokedexScreenData->unlockedCategories |= (DexScreen_IsCategoryUnlocked(i) << i); + sPokedexScreenData->state = 2; break; case 1: - RemoveScrollIndicatorArrowPair(gUnknown_203ACF0->field_60); - sub_81047B0(&gUnknown_203ACF0->field_14); - sub_81047B0(&gUnknown_203ACF0->field_15); - sub_81047B0(&gUnknown_203ACF0->field_16); - SetMainCallback2(sub_8102858); + RemoveScrollIndicatorArrowPair(sPokedexScreenData->scrollArrowsTaskId); + DexScreen_RemoveWindow(&sPokedexScreenData->modeSelectWindowId); + DexScreen_RemoveWindow(&sPokedexScreenData->selectionIconWindowId); + DexScreen_RemoveWindow(&sPokedexScreenData->dexCountsWindowId); + SetMainCallback2(CB2_ClosePokedex); DestroyTask(taskId); break; case 2: - sub_8102C28(); - gUnknown_203ACF0->field_01 = 3; + DexScreen_InitGfxForTopMenu(); + sPokedexScreenData->state = 3; break; case 3: CopyBgTilemapBufferToVram(3); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_01 = 4; + sPokedexScreenData->state = 4; break; case 4: ShowBg(3); @@ -981,352 +1020,352 @@ static void sub_810287C(u8 taskId) BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0, RGB_WHITEALPHA); } else - BeginNormalPaletteFade(0xFFFF7FFF, 0, 16, 0, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 5; + BeginNormalPaletteFade(~0x8000, 0, 16, 0, RGB_WHITEALPHA); + sPokedexScreenData->state = 5; break; case 5: - ListMenuGetScrollAndRow(gUnknown_203ACF0->field_17, &gUnknown_203ACF0->field_62, NULL); + ListMenuGetScrollAndRow(sPokedexScreenData->modeSelectListMenuId, &sPokedexScreenData->modeSelectCursorPosBak, NULL); if (IsNationalPokedexEnabled()) - gUnknown_203ACF0->field_60 = AddScrollIndicatorArrowPair(&sUnknown_84520E4, &gUnknown_203ACF0->field_62); + sPokedexScreenData->scrollArrowsTaskId = AddScrollIndicatorArrowPair(&sScrollArrowsTemplate_NatDex, &sPokedexScreenData->modeSelectCursorPosBak); else - gUnknown_203ACF0->field_60 = AddScrollIndicatorArrowPair(&sUnknown_84520D4, &gUnknown_203ACF0->field_62); - gUnknown_203ACF0->field_01 = 6; + sPokedexScreenData->scrollArrowsTaskId = AddScrollIndicatorArrowPair(&sScrollArrowsTemplate_KantoDex, &sPokedexScreenData->modeSelectCursorPosBak); + sPokedexScreenData->state = 6; break; case 6: - gUnknown_203ACF0->field_0C = ListMenu_ProcessInput(gUnknown_203ACF0->field_17); - ListMenuGetScrollAndRow(gUnknown_203ACF0->field_17, &gUnknown_203ACF0->field_62, NULL); + sPokedexScreenData->modeSelectInput = ListMenu_ProcessInput(sPokedexScreenData->modeSelectListMenuId); + ListMenuGetScrollAndRow(sPokedexScreenData->modeSelectListMenuId, &sPokedexScreenData->modeSelectCursorPosBak, NULL); if (JOY_NEW(A_BUTTON)) { - switch (gUnknown_203ACF0->field_0C) + switch (sPokedexScreenData->modeSelectInput) { case LIST_CANCEL: - gUnknown_203ACF0->field_01 = 1; + sPokedexScreenData->state = 1; break; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - if (sub_81068A0(gUnknown_203ACF0->field_0C)) + case DEX_CATEGORY_GRASSLAND: + case DEX_CATEGORY_FOREST: + case DEX_CATEGORY_WATERS_EDGE: + case DEX_CATEGORY_SEA: + case DEX_CATEGORY_CAVE: + case DEX_CATEGORY_MOUNTAIN: + case DEX_CATEGORY_ROUGH_TERRAIN: + case DEX_CATEGORY_URBAN: + case DEX_CATEGORY_RARE: + if (DexScreen_IsCategoryUnlocked(sPokedexScreenData->modeSelectInput)) { - RemoveScrollIndicatorArrowPair(gUnknown_203ACF0->field_60); - gUnknown_203ACF0->field_28 = gUnknown_203ACF0->field_0C; - BeginNormalPaletteFade(0xFFFF7FFF, 0, 0, 16, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 7; + RemoveScrollIndicatorArrowPair(sPokedexScreenData->scrollArrowsTaskId); + sPokedexScreenData->category = sPokedexScreenData->modeSelectInput; + BeginNormalPaletteFade(~0x8000, 0, 0, 16, RGB_WHITEALPHA); + sPokedexScreenData->state = 7; } break; - case 9: - case 14: - RemoveScrollIndicatorArrowPair(gUnknown_203ACF0->field_60); - gUnknown_203ACF0->field_42 = gUnknown_203ACF0->field_0C - 9; - BeginNormalPaletteFade(0xFFFF7FFF, 0, 0, 16, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 9; + case DEX_MODE(NUMERICAL_KANTO): + case DEX_MODE(NUMERICAL_NATIONAL): + RemoveScrollIndicatorArrowPair(sPokedexScreenData->scrollArrowsTaskId); + sPokedexScreenData->dexOrderId = sPokedexScreenData->modeSelectInput - DEX_CATEGORY_COUNT; + BeginNormalPaletteFade(~0x8000, 0, 0, 16, RGB_WHITEALPHA); + sPokedexScreenData->state = 9; break; - case 10: - case 11: - case 12: - case 13: - RemoveScrollIndicatorArrowPair(gUnknown_203ACF0->field_60); - gUnknown_203ACF0->field_42 = gUnknown_203ACF0->field_0C - 9; - gUnknown_203ACF0->field_38 = gUnknown_203ACF0->field_3A = 0; - BeginNormalPaletteFade(0xFFFF7FFF, 0, 0, 16, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 8; + case DEX_MODE(ATOZ): + case DEX_MODE(TYPE): + case DEX_MODE(LIGHTEST): + case DEX_MODE(SMALLEST): + RemoveScrollIndicatorArrowPair(sPokedexScreenData->scrollArrowsTaskId); + sPokedexScreenData->dexOrderId = sPokedexScreenData->modeSelectInput - DEX_CATEGORY_COUNT; + sPokedexScreenData->characteristicOrderMenuItemsAbove = sPokedexScreenData->characteristicOrderMenuCursorPos = 0; + BeginNormalPaletteFade(~0x8000, 0, 0, 16, RGB_WHITEALPHA); + sPokedexScreenData->state = 8; break; } break; } if (JOY_NEW(B_BUTTON)) { - gUnknown_203ACF0->field_01 = 1; + sPokedexScreenData->state = 1; } break; case 7: - DestroyListMenuTask(gUnknown_203ACF0->field_17, &gUnknown_203ACF0->field_12, &gUnknown_203ACF0->field_10); + DestroyListMenuTask(sPokedexScreenData->modeSelectListMenuId, &sPokedexScreenData->modeSelectCursorPos, &sPokedexScreenData->modeSelectItemsAbove); FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 20); CopyBgTilemapBufferToVram(1); - sub_81047B0(&gUnknown_203ACF0->field_14); - sub_81047B0(&gUnknown_203ACF0->field_15); - sub_81047B0(&gUnknown_203ACF0->field_16); - gUnknown_203ACF0->field_2B = 0; - gUnknown_203ACF0->field_2D = 0; - gUnknown_203ACF0->field_2F = 0; - gTasks[taskId].func = sub_8103AC8; - gUnknown_203ACF0->field_01 = 0; + DexScreen_RemoveWindow(&sPokedexScreenData->modeSelectWindowId); + DexScreen_RemoveWindow(&sPokedexScreenData->selectionIconWindowId); + DexScreen_RemoveWindow(&sPokedexScreenData->dexCountsWindowId); + sPokedexScreenData->pageNum = 0; + sPokedexScreenData->categoryCursorPosInPage = 0; + sPokedexScreenData->parentOfCategoryMenu = 0; + gTasks[taskId].func = Task_DexScreen_CategorySubmenu; + sPokedexScreenData->state = 0; break; case 8: - DestroyListMenuTask(gUnknown_203ACF0->field_17, &gUnknown_203ACF0->field_12, &gUnknown_203ACF0->field_10); + DestroyListMenuTask(sPokedexScreenData->modeSelectListMenuId, &sPokedexScreenData->modeSelectCursorPos, &sPokedexScreenData->modeSelectItemsAbove); HideBg(1); - sub_81047B0(&gUnknown_203ACF0->field_14); - sub_81047B0(&gUnknown_203ACF0->field_15); - sub_81047B0(&gUnknown_203ACF0->field_16); - gTasks[taskId].func = sub_8103238; - gUnknown_203ACF0->field_01 = 0; + DexScreen_RemoveWindow(&sPokedexScreenData->modeSelectWindowId); + DexScreen_RemoveWindow(&sPokedexScreenData->selectionIconWindowId); + DexScreen_RemoveWindow(&sPokedexScreenData->dexCountsWindowId); + gTasks[taskId].func = Task_DexScreen_CharacteristicOrder; + sPokedexScreenData->state = 0; break; case 9: - DestroyListMenuTask(gUnknown_203ACF0->field_17, &gUnknown_203ACF0->field_12, &gUnknown_203ACF0->field_10); + DestroyListMenuTask(sPokedexScreenData->modeSelectListMenuId, &sPokedexScreenData->modeSelectCursorPos, &sPokedexScreenData->modeSelectItemsAbove); HideBg(1); - sub_81047B0(&gUnknown_203ACF0->field_14); - sub_81047B0(&gUnknown_203ACF0->field_15); - sub_81047B0(&gUnknown_203ACF0->field_16); - gTasks[taskId].func = sub_8102F80; - gUnknown_203ACF0->field_01 = 0; + DexScreen_RemoveWindow(&sPokedexScreenData->modeSelectWindowId); + DexScreen_RemoveWindow(&sPokedexScreenData->selectionIconWindowId); + DexScreen_RemoveWindow(&sPokedexScreenData->dexCountsWindowId); + gTasks[taskId].func = Task_DexScreen_NumericalOrder; + sPokedexScreenData->state = 0; break; } } -static void sub_8102C28(void) +static void DexScreen_InitGfxForTopMenu(void) { struct ListMenuTemplate listMenuTemplate; FillBgTilemapBufferRect(3, 0x00E, 0, 0, 30, 20, 0x00); FillBgTilemapBufferRect(2, 0x000, 0, 0, 30, 20, 0x11); FillBgTilemapBufferRect(1, 0x000, 0, 0, 30, 20, 0x11); - gUnknown_203ACF0->field_14 = AddWindow(&sUnknown_8451F54); - gUnknown_203ACF0->field_15 = AddWindow(&sUnknown_8451F5C); - gUnknown_203ACF0->field_16 = AddWindow(&sUnknown_8451F64); + sPokedexScreenData->modeSelectWindowId = AddWindow(&sWindowTemplate_ModeSelect); + sPokedexScreenData->selectionIconWindowId = AddWindow(&sWindowTemplate_SelectionIcon); + sPokedexScreenData->dexCountsWindowId = AddWindow(&sWindowTemplate_DexCounts); if (IsNationalPokedexEnabled()) { - listMenuTemplate = sUnknown_84520BC; - listMenuTemplate.windowId = gUnknown_203ACF0->field_14; - gUnknown_203ACF0->field_17 = ListMenuInit(&listMenuTemplate, gUnknown_203ACF0->field_12, gUnknown_203ACF0->field_10); - FillWindowPixelBuffer(gUnknown_203ACF0->field_16, PIXEL_FILL(0)); - sub_81047C8(gUnknown_203ACF0->field_16, 0, gText_Seen, 0, 2, 0); - sub_81047C8(gUnknown_203ACF0->field_16, 0, gText_Kanto, 8, 13, 0); - sub_810491C(gUnknown_203ACF0->field_16, 0, gUnknown_203ACF0->field_66, 52, 13, 2); - sub_81047C8(gUnknown_203ACF0->field_16, 0, gText_National, 8, 24, 0); - sub_810491C(gUnknown_203ACF0->field_16, 0, gUnknown_203ACF0->field_6A, 52, 24, 2); - sub_81047C8(gUnknown_203ACF0->field_16, 0, gText_Owned, 0, 37, 0); - sub_81047C8(gUnknown_203ACF0->field_16, 0, gText_Kanto, 8, 48, 0); - sub_810491C(gUnknown_203ACF0->field_16, 0, gUnknown_203ACF0->field_68, 52, 48, 2); - sub_81047C8(gUnknown_203ACF0->field_16, 0, gText_National, 8, 59, 0); - sub_810491C(gUnknown_203ACF0->field_16, 0, gUnknown_203ACF0->field_6C, 52, 59, 2); + listMenuTemplate = sListMenuTemplate_NatDexModeSelect; + listMenuTemplate.windowId = sPokedexScreenData->modeSelectWindowId; + sPokedexScreenData->modeSelectListMenuId = ListMenuInit(&listMenuTemplate, sPokedexScreenData->modeSelectCursorPos, sPokedexScreenData->modeSelectItemsAbove); + FillWindowPixelBuffer(sPokedexScreenData->dexCountsWindowId, PIXEL_FILL(0)); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_Seen, 0, 2, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_Kanto, 8, 13, 0); + DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 0, sPokedexScreenData->numSeenKanto, 52, 13, 2); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_National, 8, 24, 0); + DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 0, sPokedexScreenData->numSeenNational, 52, 24, 2); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_Owned, 0, 37, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_Kanto, 8, 48, 0); + DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 0, sPokedexScreenData->numOwnedKanto, 52, 48, 2); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_National, 8, 59, 0); + DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 0, sPokedexScreenData->numOwnedNational, 52, 59, 2); } else { - listMenuTemplate = sUnknown_8452004; - listMenuTemplate.windowId = gUnknown_203ACF0->field_14; - gUnknown_203ACF0->field_17 = ListMenuInit(&listMenuTemplate, gUnknown_203ACF0->field_12, gUnknown_203ACF0->field_10); - FillWindowPixelBuffer(gUnknown_203ACF0->field_16, PIXEL_FILL(0)); - sub_81047C8(gUnknown_203ACF0->field_16, 1, gText_Seen, 0, 9, 0); - sub_810491C(gUnknown_203ACF0->field_16, 1, gUnknown_203ACF0->field_66, 32, 21, 2); - sub_81047C8(gUnknown_203ACF0->field_16, 1, gText_Owned, 0, 37, 0); - sub_810491C(gUnknown_203ACF0->field_16, 1, gUnknown_203ACF0->field_68, 32, 49, 2); + listMenuTemplate = sListMenuTemplate_KantoDexModeSelect; + listMenuTemplate.windowId = sPokedexScreenData->modeSelectWindowId; + sPokedexScreenData->modeSelectListMenuId = ListMenuInit(&listMenuTemplate, sPokedexScreenData->modeSelectCursorPos, sPokedexScreenData->modeSelectItemsAbove); + FillWindowPixelBuffer(sPokedexScreenData->dexCountsWindowId, PIXEL_FILL(0)); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 1, gText_Seen, 0, 9, 0); + DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 1, sPokedexScreenData->numSeenKanto, 32, 21, 2); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 1, gText_Owned, 0, 37, 0); + DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 1, sPokedexScreenData->numOwnedKanto, 32, 49, 2); } FillWindowPixelBuffer(0, PIXEL_FILL(15)); - sub_8106E78(gText_PokedexTableOfContents, 1); + DexScreen_PrintStringWithAlignment(gText_PokedexTableOfContents, TEXT_CENTER); FillWindowPixelBuffer(1, PIXEL_FILL(15)); - sub_8104C2C(gText_PickOK); + DexScreen_PrintControlInfo(gText_PickOK); PutWindowTilemap(0); CopyWindowToVram(0, COPYWIN_GFX); PutWindowTilemap(1); CopyWindowToVram(1, COPYWIN_GFX); - PutWindowTilemap(gUnknown_203ACF0->field_16); - CopyWindowToVram(gUnknown_203ACF0->field_16, COPYWIN_GFX); + PutWindowTilemap(sPokedexScreenData->dexCountsWindowId); + CopyWindowToVram(sPokedexScreenData->dexCountsWindowId, COPYWIN_GFX); } -static void sub_8102EC0(s32 itemIndex, bool8 onInit, struct ListMenu *list) +static void MoveCursorFunc_DexModeSelect(s32 itemIndex, bool8 onInit, struct ListMenu *list) { if (!onInit) PlaySE(SE_SELECT); if (itemIndex == LIST_CANCEL) { - CopyToWindowPixelBuffer(gUnknown_203ACF0->field_15, gUnknown_8440EF0, 0x000, 0x000); - LoadPalette(gUnknown_8443460, 0x10, 0x20); + CopyToWindowPixelBuffer(sPokedexScreenData->selectionIconWindowId, sTopMenuSelectionIconTiles_Cancel, 0x000, 0x000); + LoadPalette(sTopMenuSelectionIconPals_Cancel, 0x10, 0x20); } else { - CopyToWindowPixelBuffer(gUnknown_203ACF0->field_15, sUnknown_84520F4[itemIndex].map, 0x000, 0x000); - LoadPalette(sUnknown_84520F4[itemIndex].pal, 0x10, 0x20); + CopyToWindowPixelBuffer(sPokedexScreenData->selectionIconWindowId, sTopMenuSelectionIconGfxPtrs[itemIndex].tiles, 0x000, 0x000); + LoadPalette(sTopMenuSelectionIconGfxPtrs[itemIndex].pal, 0x10, 0x20); } - PutWindowTilemap(gUnknown_203ACF0->field_15); - CopyWindowToVram(gUnknown_203ACF0->field_15, COPYWIN_GFX); + PutWindowTilemap(sPokedexScreenData->selectionIconWindowId); + CopyWindowToVram(sPokedexScreenData->selectionIconWindowId, COPYWIN_GFX); } -static void sub_8102F48(u8 windowId, s32 itemId, u8 y) +static void ItemPrintFunc_DexModeSelect(u8 windowId, s32 itemId, u8 y) { u32 itemId_ = itemId; - if (itemId_ > 8 || gUnknown_203ACF0->field_08 & (1 << itemId_)) - ListMenuOverrideSetColors(1, 0, 3); + if (itemId_ >= DEX_CATEGORY_COUNT || sPokedexScreenData->unlockedCategories & (1 << itemId_)) + ListMenuOverrideSetColors(TEXT_COLOR_WHITE, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_GRAY); else - ListMenuOverrideSetColors(10, 0, 11); + ListMenuOverrideSetColors(TEXT_DYNAMIC_COLOR_1, TEXT_COLOR_TRANSPARENT, TEXT_DYNAMIC_COLOR_2); } -static void sub_8102F80(u8 taskId) +static void Task_DexScreen_NumericalOrder(u8 taskId) { - switch (gUnknown_203ACF0->field_01) + switch (sPokedexScreenData->state) { case 0: ListMenuLoadStdPalAt(0x10, 0); ListMenuLoadStdPalAt(0x20, 1); - gUnknown_203ACF0->field_48 = sub_8103518(gUnknown_203ACF0->field_42); - gUnknown_203ACF0->field_01 = 2; + sPokedexScreenData->orderedDexCount = DexScreen_CountMonsInOrderedList(sPokedexScreenData->dexOrderId); + sPokedexScreenData->state = 2; break; case 1: - sub_8103988(gUnknown_203ACF0->field_42); + DexScreen_DestroyDexOrderListMenu(sPokedexScreenData->dexOrderId); HideBg(1); - sub_81047B0(&gUnknown_203ACF0->field_40); - gTasks[taskId].func = sub_810287C; - gUnknown_203ACF0->field_01 = 0; + DexScreen_RemoveWindow(&sPokedexScreenData->numericalOrderWindowId); + gTasks[taskId].func = Task_PokedexScreen; + sPokedexScreenData->state = 0; break; case 2: - sub_810317C(); - gUnknown_203ACF0->field_01 = 3; + DexScreen_InitGfxForNumericalOrderList(); + sPokedexScreenData->state = 3; break; case 3: CopyBgTilemapBufferToVram(3); CopyBgTilemapBufferToVram(1); - gUnknown_203ACF0->field_01 = 4; + sPokedexScreenData->state = 4; break; case 4: ShowBg(1); - BeginNormalPaletteFade(0xFFFF7FFF, 0, 16, 0, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 5; + BeginNormalPaletteFade(~0x8000, 0, 16, 0, RGB_WHITEALPHA); + sPokedexScreenData->state = 5; break; case 5: - ListMenuGetScrollAndRow(gUnknown_203ACF0->field_17, &gUnknown_203ACF0->field_62, NULL); - gUnknown_203ACF0->field_60 = sub_81039F0(); - gUnknown_203ACF0->field_01 = 6; + ListMenuGetScrollAndRow(sPokedexScreenData->modeSelectListMenuId, &sPokedexScreenData->modeSelectCursorPosBak, NULL); + sPokedexScreenData->scrollArrowsTaskId = DexScreen_CreateDexOrderScrollArrows(); + sPokedexScreenData->state = 6; break; case 6: - gUnknown_203ACF0->field_30 = ListMenu_ProcessInput(gUnknown_203ACF0->field_41); - ListMenuGetScrollAndRow(gUnknown_203ACF0->field_17, &gUnknown_203ACF0->field_62, NULL); + sPokedexScreenData->characteristicMenuInput = ListMenu_ProcessInput(sPokedexScreenData->orderedListMenuTaskId); + ListMenuGetScrollAndRow(sPokedexScreenData->modeSelectListMenuId, &sPokedexScreenData->modeSelectCursorPosBak, NULL); if (JOY_NEW(A_BUTTON)) { - if ((gUnknown_203ACF0->field_30 >> 16) & 1) + if ((sPokedexScreenData->characteristicMenuInput >> 16) & 1) { - gUnknown_203ACF0->field_5A = gUnknown_203ACF0->field_30; - RemoveScrollIndicatorArrowPair(gUnknown_203ACF0->field_60); - BeginNormalPaletteFade(0xFFFF7FFF, 0, 0, 16, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 7; + sPokedexScreenData->dexSpecies = sPokedexScreenData->characteristicMenuInput; + RemoveScrollIndicatorArrowPair(sPokedexScreenData->scrollArrowsTaskId); + BeginNormalPaletteFade(~0x8000, 0, 0, 16, RGB_WHITEALPHA); + sPokedexScreenData->state = 7; } } else if (JOY_NEW(B_BUTTON)) { - RemoveScrollIndicatorArrowPair(gUnknown_203ACF0->field_60); - BeginNormalPaletteFade(0xFFFF7FFF, 0, 0, 16, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 1; + RemoveScrollIndicatorArrowPair(sPokedexScreenData->scrollArrowsTaskId); + BeginNormalPaletteFade(~0x8000, 0, 0, 16, RGB_WHITEALPHA); + sPokedexScreenData->state = 1; } break; case 7: - sub_8103988(gUnknown_203ACF0->field_42); + DexScreen_DestroyDexOrderListMenu(sPokedexScreenData->dexOrderId); FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 32, 20); CopyBgTilemapBufferToVram(1); - sub_81047B0(&gUnknown_203ACF0->field_40); - gTasks[taskId].func = sub_81042EC; - gUnknown_203ACF0->field_01 = 0; + DexScreen_RemoveWindow(&sPokedexScreenData->numericalOrderWindowId); + gTasks[taskId].func = Task_DexScreen_ShowMonPage; + sPokedexScreenData->state = 0; break; } } -static void sub_810317C(void) +static void DexScreen_InitGfxForNumericalOrderList(void) { struct ListMenuTemplate template; FillBgTilemapBufferRect(3, 0x00E, 0, 0, 30, 20, 0x00); FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11); - gUnknown_203ACF0->field_40 = AddWindow(&sUnknown_845216C); - template = sUnknown_8452174; - template.items = gUnknown_203ACF0->field_44; - template.windowId = gUnknown_203ACF0->field_40; - template.totalItems = gUnknown_203ACF0->field_48; - sub_8103924(&template, gUnknown_203ACF0->field_42); + sPokedexScreenData->numericalOrderWindowId = AddWindow(&sWindowTemplate_OrderedListMenu); + template = sListMenuTemplate_OrderedListMenu; + template.items = sPokedexScreenData->listItems; + template.windowId = sPokedexScreenData->numericalOrderWindowId; + template.totalItems = sPokedexScreenData->orderedDexCount; + DexScreen_InitListMenuForOrderedList(&template, sPokedexScreenData->dexOrderId); FillWindowPixelBuffer(0, PIXEL_FILL(15)); - sub_8106E78(gText_PokemonListNoColor, 1); + DexScreen_PrintStringWithAlignment(gText_PokemonListNoColor, TEXT_CENTER); FillWindowPixelBuffer(1, PIXEL_FILL(15)); - sub_8104C2C(gText_PickOKExit); + DexScreen_PrintControlInfo(gText_PickOKExit); CopyWindowToVram(0, COPYWIN_GFX); CopyWindowToVram(1, COPYWIN_GFX); } -static void sub_8103238(u8 taskId) +static void Task_DexScreen_CharacteristicOrder(u8 taskId) { - switch (gUnknown_203ACF0->field_01) + switch (sPokedexScreenData->state) { case 0: ListMenuLoadStdPalAt(0x10, 0); ListMenuLoadStdPalAt(0x20, 1); - gUnknown_203ACF0->field_48 = sub_8103518(gUnknown_203ACF0->field_42); - gUnknown_203ACF0->field_01 = 2; + sPokedexScreenData->orderedDexCount = DexScreen_CountMonsInOrderedList(sPokedexScreenData->dexOrderId); + sPokedexScreenData->state = 2; break; case 1: - sub_8103988(gUnknown_203ACF0->field_42); + DexScreen_DestroyDexOrderListMenu(sPokedexScreenData->dexOrderId); HideBg(1); - sub_81047B0(&gUnknown_203ACF0->field_40); - gTasks[taskId].func = sub_810287C; - gUnknown_203ACF0->field_01 = 0; + DexScreen_RemoveWindow(&sPokedexScreenData->numericalOrderWindowId); + gTasks[taskId].func = Task_PokedexScreen; + sPokedexScreenData->state = 0; break; case 2: - sub_810345C(); - gUnknown_203ACF0->field_01 = 3; + DexScreen_CreateCharacteristicListMenu(); + sPokedexScreenData->state = 3; break; case 3: CopyBgTilemapBufferToVram(3); CopyBgTilemapBufferToVram(1); - gUnknown_203ACF0->field_01 = 4; + sPokedexScreenData->state = 4; break; case 4: ShowBg(1); - BeginNormalPaletteFade(0xFFFF7FFF, 0, 16, 0, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 5; + BeginNormalPaletteFade(~0x8000, 0, 16, 0, RGB_WHITEALPHA); + sPokedexScreenData->state = 5; break; case 5: - ListMenuGetScrollAndRow(gUnknown_203ACF0->field_17, &gUnknown_203ACF0->field_62, NULL); - gUnknown_203ACF0->field_60 = sub_81039F0(); - gUnknown_203ACF0->field_01 = 6; + ListMenuGetScrollAndRow(sPokedexScreenData->modeSelectListMenuId, &sPokedexScreenData->modeSelectCursorPosBak, NULL); + sPokedexScreenData->scrollArrowsTaskId = DexScreen_CreateDexOrderScrollArrows(); + sPokedexScreenData->state = 6; break; case 6: - gUnknown_203ACF0->field_30 = ListMenu_ProcessInput(gUnknown_203ACF0->field_41); - ListMenuGetScrollAndRow(gUnknown_203ACF0->field_17, &gUnknown_203ACF0->field_62, NULL); + sPokedexScreenData->characteristicMenuInput = ListMenu_ProcessInput(sPokedexScreenData->orderedListMenuTaskId); + ListMenuGetScrollAndRow(sPokedexScreenData->modeSelectListMenuId, &sPokedexScreenData->modeSelectCursorPosBak, NULL); if (JOY_NEW(A_BUTTON)) { - if (((gUnknown_203ACF0->field_30 >> 16) & 1) && !sub_8106A20(gUnknown_203ACF0->field_30)) + if (((sPokedexScreenData->characteristicMenuInput >> 16) & 1) && !DexScreen_LookUpCategoryBySpecies(sPokedexScreenData->characteristicMenuInput)) { - RemoveScrollIndicatorArrowPair(gUnknown_203ACF0->field_60); - BeginNormalPaletteFade(0xFFFF7FFF, 0, 0, 16, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 7; + RemoveScrollIndicatorArrowPair(sPokedexScreenData->scrollArrowsTaskId); + BeginNormalPaletteFade(~0x8000, 0, 0, 16, RGB_WHITEALPHA); + sPokedexScreenData->state = 7; } } else if (JOY_NEW(B_BUTTON)) { - RemoveScrollIndicatorArrowPair(gUnknown_203ACF0->field_60); - BeginNormalPaletteFade(0xFFFF7FFF, 0, 0, 16, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 1; + RemoveScrollIndicatorArrowPair(sPokedexScreenData->scrollArrowsTaskId); + BeginNormalPaletteFade(~0x8000, 0, 0, 16, RGB_WHITEALPHA); + sPokedexScreenData->state = 1; } break; case 7: - sub_8103988(gUnknown_203ACF0->field_42); + DexScreen_DestroyDexOrderListMenu(sPokedexScreenData->dexOrderId); FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 32, 20); CopyBgTilemapBufferToVram(1); - sub_81047B0(&gUnknown_203ACF0->field_40); - gUnknown_203ACF0->field_2F = 1; - gTasks[taskId].func = sub_8103AC8; - gUnknown_203ACF0->field_01 = 0; + DexScreen_RemoveWindow(&sPokedexScreenData->numericalOrderWindowId); + sPokedexScreenData->parentOfCategoryMenu = 1; + gTasks[taskId].func = Task_DexScreen_CategorySubmenu; + sPokedexScreenData->state = 0; break; } } -static void sub_810345C(void) +static void DexScreen_CreateCharacteristicListMenu(void) { struct ListMenuTemplate template; FillBgTilemapBufferRect(3, 0x00E, 0, 0, 30, 20, 0x00); FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11); - gUnknown_203ACF0->field_40 = AddWindow(&sUnknown_845216C); - template = sUnknown_8452174; - template.items = gUnknown_203ACF0->field_44; - template.windowId = gUnknown_203ACF0->field_40; - template.totalItems = gUnknown_203ACF0->field_48; - sub_8103924(&template, gUnknown_203ACF0->field_42); + sPokedexScreenData->numericalOrderWindowId = AddWindow(&sWindowTemplate_OrderedListMenu); + template = sListMenuTemplate_OrderedListMenu; + template.items = sPokedexScreenData->listItems; + template.windowId = sPokedexScreenData->numericalOrderWindowId; + template.totalItems = sPokedexScreenData->orderedDexCount; + DexScreen_InitListMenuForOrderedList(&template, sPokedexScreenData->dexOrderId); FillWindowPixelBuffer(0, PIXEL_FILL(15)); - sub_8106E78(gText_SearchNoColor, 1); + DexScreen_PrintStringWithAlignment(gText_SearchNoColor, TEXT_CENTER); FillWindowPixelBuffer(1, PIXEL_FILL(15)); - sub_8104C2C(gText_PickOKExit); + DexScreen_PrintControlInfo(gText_PickOKExit); CopyWindowToVram(0, COPYWIN_GFX); CopyWindowToVram(1, COPYWIN_GFX); } -static u16 sub_8103518(u8 a0) +static u16 DexScreen_CountMonsInOrderedList(u8 orderIdx) { s32 max_n = IsNationalPokedexEnabled() ? NATIONAL_DEX_COUNT : KANTO_DEX_COUNT; u16 ndex_num; @@ -1335,165 +1374,165 @@ static u16 sub_8103518(u8 a0) bool8 caught; bool8 seen; - switch (a0) + switch (orderIdx) { default: - case 0: + case DEX_ORDER_NUMERICAL_KANTO: for (i = 0; i < KANTO_DEX_COUNT; i++) { ndex_num = i + 1; - seen = sub_8104AB0(ndex_num, FLAG_GET_SEEN, 0); - caught = sub_8104AB0(ndex_num, FLAG_GET_CAUGHT, 0); + seen = DexScreen_GetSetPokedexFlag(ndex_num, FLAG_GET_SEEN, FALSE); + caught = DexScreen_GetSetPokedexFlag(ndex_num, FLAG_GET_CAUGHT, FALSE); if (seen) { - gUnknown_203ACF0->field_44[i].label = gSpeciesNames[NationalPokedexNumToSpecies(ndex_num)]; + sPokedexScreenData->listItems[i].label = gSpeciesNames[NationalPokedexNumToSpecies(ndex_num)]; ret = ndex_num; } else { - gUnknown_203ACF0->field_44[i].label = gText_5Dashes; + sPokedexScreenData->listItems[i].label = gText_5Dashes; } - gUnknown_203ACF0->field_44[i].index = (caught << 17) + (seen << 16) + NationalPokedexNumToSpecies(ndex_num); + sPokedexScreenData->listItems[i].index = (caught << 17) + (seen << 16) + NationalPokedexNumToSpecies(ndex_num); } break; - case 1: - for (i = 0; i < SPECIES_CHIMECHO; i++) + case DEX_ORDER_ATOZ: + for (i = 0; i < NUM_SPECIES - 1; i++) { ndex_num = gPokedexOrder_Alphabetical[i]; if (ndex_num <= max_n) { - seen = sub_8104AB0(ndex_num, FLAG_GET_SEEN, 0); - caught = sub_8104AB0(ndex_num, FLAG_GET_CAUGHT, 0); + seen = DexScreen_GetSetPokedexFlag(ndex_num, FLAG_GET_SEEN, FALSE); + caught = DexScreen_GetSetPokedexFlag(ndex_num, FLAG_GET_CAUGHT, FALSE); if (seen) { - gUnknown_203ACF0->field_44[ret].label = gSpeciesNames[NationalPokedexNumToSpecies(ndex_num)]; - gUnknown_203ACF0->field_44[ret].index = (caught << 17) + (seen << 16) + NationalPokedexNumToSpecies(ndex_num); + sPokedexScreenData->listItems[ret].label = gSpeciesNames[NationalPokedexNumToSpecies(ndex_num)]; + sPokedexScreenData->listItems[ret].index = (caught << 17) + (seen << 16) + NationalPokedexNumToSpecies(ndex_num); ret++; } } } break; - case 2: + case DEX_ORDER_TYPE: for (i = 0; i < NUM_SPECIES - 1; i++) { ndex_num = SpeciesToNationalPokedexNum(gPokedexOrder_Type[i]); if (ndex_num <= max_n) { - seen = sub_8104AB0(ndex_num, FLAG_GET_SEEN, 0); - caught = sub_8104AB0(ndex_num, FLAG_GET_CAUGHT, 0); + seen = DexScreen_GetSetPokedexFlag(ndex_num, FLAG_GET_SEEN, FALSE); + caught = DexScreen_GetSetPokedexFlag(ndex_num, FLAG_GET_CAUGHT, FALSE); if (caught) { - gUnknown_203ACF0->field_44[ret].label = gSpeciesNames[NationalPokedexNumToSpecies(ndex_num)]; - gUnknown_203ACF0->field_44[ret].index = (caught << 17) + (seen << 16) + NationalPokedexNumToSpecies(ndex_num); + sPokedexScreenData->listItems[ret].label = gSpeciesNames[NationalPokedexNumToSpecies(ndex_num)]; + sPokedexScreenData->listItems[ret].index = (caught << 17) + (seen << 16) + NationalPokedexNumToSpecies(ndex_num); ret++; } } } break; - case 3: + case DEX_ORDER_LIGHTEST: for (i = 0; i < NATIONAL_DEX_COUNT; i++) { ndex_num = gPokedexOrder_Weight[i]; if (ndex_num <= max_n) { - seen = sub_8104AB0(ndex_num, FLAG_GET_SEEN, 0); - caught = sub_8104AB0(ndex_num, FLAG_GET_CAUGHT, 0); + seen = DexScreen_GetSetPokedexFlag(ndex_num, FLAG_GET_SEEN, FALSE); + caught = DexScreen_GetSetPokedexFlag(ndex_num, FLAG_GET_CAUGHT, FALSE); if (caught) { - gUnknown_203ACF0->field_44[ret].label = gSpeciesNames[NationalPokedexNumToSpecies(ndex_num)]; - gUnknown_203ACF0->field_44[ret].index = (caught << 17) + (seen << 16) + NationalPokedexNumToSpecies(ndex_num); + sPokedexScreenData->listItems[ret].label = gSpeciesNames[NationalPokedexNumToSpecies(ndex_num)]; + sPokedexScreenData->listItems[ret].index = (caught << 17) + (seen << 16) + NationalPokedexNumToSpecies(ndex_num); ret++; } } } break; - case 4: + case DEX_ORDER_SMALLEST: for (i = 0; i < NATIONAL_DEX_COUNT; i++) { ndex_num = gPokedexOrder_Height[i]; if (ndex_num <= max_n) { - seen = sub_8104AB0(ndex_num, FLAG_GET_SEEN, 0); - caught = sub_8104AB0(ndex_num, FLAG_GET_CAUGHT, 0); + seen = DexScreen_GetSetPokedexFlag(ndex_num, FLAG_GET_SEEN, FALSE); + caught = DexScreen_GetSetPokedexFlag(ndex_num, FLAG_GET_CAUGHT, FALSE); if (caught) { - gUnknown_203ACF0->field_44[ret].label = gSpeciesNames[NationalPokedexNumToSpecies(ndex_num)]; - gUnknown_203ACF0->field_44[ret].index = (caught << 17) + (seen << 16) + NationalPokedexNumToSpecies(ndex_num); + sPokedexScreenData->listItems[ret].label = gSpeciesNames[NationalPokedexNumToSpecies(ndex_num)]; + sPokedexScreenData->listItems[ret].index = (caught << 17) + (seen << 16) + NationalPokedexNumToSpecies(ndex_num); ret++; } } } break; - case 5: + case DEX_ORDER_NUMERICAL_NATIONAL: for (i = 0; i < NATIONAL_DEX_COUNT; i++) { ndex_num = i + 1; - seen = sub_8104AB0(ndex_num, FLAG_GET_SEEN, 0); - caught = sub_8104AB0(ndex_num, FLAG_GET_CAUGHT, 0); + seen = DexScreen_GetSetPokedexFlag(ndex_num, FLAG_GET_SEEN, FALSE); + caught = DexScreen_GetSetPokedexFlag(ndex_num, FLAG_GET_CAUGHT, FALSE); if (seen) { - gUnknown_203ACF0->field_44[i].label = gSpeciesNames[NationalPokedexNumToSpecies(ndex_num)]; + sPokedexScreenData->listItems[i].label = gSpeciesNames[NationalPokedexNumToSpecies(ndex_num)]; ret = ndex_num; } else { - gUnknown_203ACF0->field_44[i].label = gText_5Dashes; + sPokedexScreenData->listItems[i].label = gText_5Dashes; } - gUnknown_203ACF0->field_44[i].index = (caught << 17) + (seen << 16) + NationalPokedexNumToSpecies(ndex_num); + sPokedexScreenData->listItems[i].index = (caught << 17) + (seen << 16) + NationalPokedexNumToSpecies(ndex_num); } break; } return ret; } -static void sub_8103924(const struct ListMenuTemplate * template, u8 a1) +static void DexScreen_InitListMenuForOrderedList(const struct ListMenuTemplate * template, u8 order) { - switch (a1) + switch (order) { default: - case 0: - gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &sUnknown_845218C, gUnknown_203ACF0->field_36, gUnknown_203ACF0->field_34); + case DEX_ORDER_NUMERICAL_KANTO: + sPokedexScreenData->orderedListMenuTaskId = ListMenuInitInRect(template, sListMenuRects_OrderedList, sPokedexScreenData->kantoOrderMenuCursorPos, sPokedexScreenData->kantoOrderMenuItemsAbove); break; - case 1: - case 2: - case 3: - case 4: - gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &sUnknown_845218C, gUnknown_203ACF0->field_3A, gUnknown_203ACF0->field_38); + case DEX_ORDER_ATOZ: + case DEX_ORDER_TYPE: + case DEX_ORDER_LIGHTEST: + case DEX_ORDER_SMALLEST: + sPokedexScreenData->orderedListMenuTaskId = ListMenuInitInRect(template, sListMenuRects_OrderedList, sPokedexScreenData->characteristicOrderMenuCursorPos, sPokedexScreenData->characteristicOrderMenuItemsAbove); break; - case 5: - gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &sUnknown_845218C, gUnknown_203ACF0->field_3E, gUnknown_203ACF0->field_3C); + case DEX_ORDER_NUMERICAL_NATIONAL: + sPokedexScreenData->orderedListMenuTaskId = ListMenuInitInRect(template, sListMenuRects_OrderedList, sPokedexScreenData->nationalOrderMenuCursorPos, sPokedexScreenData->nationalOrderMenuItemsAbove); break; } } -static void sub_8103988(u8 a0) +static void DexScreen_DestroyDexOrderListMenu(u8 order) { - switch (a0) + switch (order) { default: - case 0: - DestroyListMenuTask(gUnknown_203ACF0->field_41, &gUnknown_203ACF0->field_36, &gUnknown_203ACF0->field_34); + case DEX_ORDER_NUMERICAL_KANTO: + DestroyListMenuTask(sPokedexScreenData->orderedListMenuTaskId, &sPokedexScreenData->kantoOrderMenuCursorPos, &sPokedexScreenData->kantoOrderMenuItemsAbove); break; - case 1: - case 2: - case 3: - case 4: - DestroyListMenuTask(gUnknown_203ACF0->field_41, &gUnknown_203ACF0->field_3A, &gUnknown_203ACF0->field_38); + case DEX_ORDER_ATOZ: + case DEX_ORDER_TYPE: + case DEX_ORDER_LIGHTEST: + case DEX_ORDER_SMALLEST: + DestroyListMenuTask(sPokedexScreenData->orderedListMenuTaskId, &sPokedexScreenData->characteristicOrderMenuCursorPos, &sPokedexScreenData->characteristicOrderMenuItemsAbove); break; - case 5: - DestroyListMenuTask(gUnknown_203ACF0->field_41, &gUnknown_203ACF0->field_3E, &gUnknown_203ACF0->field_3C); + case DEX_ORDER_NUMERICAL_NATIONAL: + DestroyListMenuTask(sPokedexScreenData->orderedListMenuTaskId, &sPokedexScreenData->nationalOrderMenuCursorPos, &sPokedexScreenData->nationalOrderMenuItemsAbove); break; } } -static u8 sub_81039F0(void) +static u8 DexScreen_CreateDexOrderScrollArrows(void) { - struct ScrollArrowsTemplate template = sUnknown_84521B4; - if (gUnknown_203ACF0->field_48 > sUnknown_8452174.maxShowed) - template.fullyDownThreshold = gUnknown_203ACF0->field_48 - sUnknown_8452174.maxShowed; + struct ScrollArrowsTemplate template = sDexOrderScrollArrowsTemplate; + if (sPokedexScreenData->orderedDexCount > sListMenuTemplate_OrderedListMenu.maxShowed) + template.fullyDownThreshold = sPokedexScreenData->orderedDexCount - sListMenuTemplate_OrderedListMenu.maxShowed; else template.fullyDownThreshold = 0; - return AddScrollIndicatorArrowPair(&template, &gUnknown_203ACF0->field_62); + return AddScrollIndicatorArrowPair(&template, &sPokedexScreenData->modeSelectCursorPosBak); } struct PokedexListItem @@ -1503,208 +1542,207 @@ struct PokedexListItem bool8 caught:1; }; -static void sub_8103A40(u8 windowId, s32 itemId, u8 y) +static void ItemPrintFunc_OrderedListMenu(u8 windowId, s32 itemId, u8 y) { - u32 itemId_ = itemId; - u16 species = itemId_; - bool8 seen = (itemId_ >> 16) & 1; // not used but required to match - bool8 caught = (itemId_ >> 17) & 1; + u16 species = (u32)itemId; + bool8 seen = ((u32)itemId >> 16) & 1; // not used but required to match + bool8 caught = ((u32)itemId >> 17) & 1; u8 type1; - sub_8104A34(gUnknown_203ACF0->field_40, 0, species, 12, y); + DexScreen_PrintMonDexNo(sPokedexScreenData->numericalOrderWindowId, 0, species, 12, y); if (caught) { - BlitMoveInfoIcon(gUnknown_203ACF0->field_40, 0, 0x28, y); + BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, 0, 0x28, y); type1 = gBaseStats[species].type1; - BlitMoveInfoIcon(gUnknown_203ACF0->field_40, type1 + 1, 0x78, y); + BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, type1 + 1, 0x78, y); if (type1 != gBaseStats[species].type2) - BlitMoveInfoIcon(gUnknown_203ACF0->field_40, gBaseStats[species].type2 + 1, 0x98, y); + BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, gBaseStats[species].type2 + 1, 0x98, y); } } -static void sub_8103AC8(u8 taskId) +static void Task_DexScreen_CategorySubmenu(u8 taskId) { - int r4; + int pageFlipCmd; u8 *ptr; - switch (gUnknown_203ACF0->field_01) + switch (sPokedexScreenData->state) { case 0: HideBg(3); HideBg(2); HideBg(1); - sub_810699C(gUnknown_203ACF0->field_28); - if (gUnknown_203ACF0->field_2B < gUnknown_203ACF0->field_29) - gUnknown_203ACF0->field_2B = gUnknown_203ACF0->field_29; - gUnknown_203ACF0->field_01 = 2; + DexScreen_GetPageLimitsForCategory(sPokedexScreenData->category); + if (sPokedexScreenData->pageNum < sPokedexScreenData->firstPageInCategory) + sPokedexScreenData->pageNum = sPokedexScreenData->firstPageInCategory; + sPokedexScreenData->state = 2; break; case 1: - sub_8104E90(); + DexScreen_DestroyCategoryPageMonIconAndInfoWindows(); HideBg(2); HideBg(1); - switch (gUnknown_203ACF0->field_2F) + switch (sPokedexScreenData->parentOfCategoryMenu) { case 0: default: - gTasks[taskId].func = sub_810287C; + gTasks[taskId].func = Task_PokedexScreen; break; case 1: - gTasks[taskId].func = sub_8103238; + gTasks[taskId].func = Task_DexScreen_CharacteristicOrder; break; } - gUnknown_203ACF0->field_01 = 0; + sPokedexScreenData->state = 0; break; case 2: - sub_8104F0C(0); + DexScreen_CreateCategoryListGfx(FALSE); CopyBgTilemapBufferToVram(3); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); - sub_8105058(0xFF); - gUnknown_203ACF0->field_01 = 3; + DexScreen_CreateCategoryPageSelectionCursor(0xFF); + sPokedexScreenData->state = 3; break; case 3: - BeginNormalPaletteFade(0xFFFF7FFF, 0, 16, 0, RGB_WHITEALPHA); + BeginNormalPaletteFade(~0x8000, 0, 16, 0, RGB_WHITEALPHA); ShowBg(3); ShowBg(2); ShowBg(1); - gUnknown_203ACF0->field_01 = 4; + sPokedexScreenData->state = 4; break; case 4: - gUnknown_203ACF0->field_60 = sub_8104234(); - gUnknown_203ACF0->field_61 = ListMenuAddCursorObjectInternal(&gUnknown_84524C4, 0); - gUnknown_203ACF0->field_01 = 5; + sPokedexScreenData->scrollArrowsTaskId = DexScreen_CreateCategoryMenuScrollArrows(); + sPokedexScreenData->categoryPageCursorTaskId = ListMenuAddCursorObjectInternal(&sCursorStruct_CategoryPage, 0); + sPokedexScreenData->state = 5; break; case 5: - sub_8105058(gUnknown_203ACF0->field_2D); - sub_8105178(gUnknown_203ACF0->field_61, gUnknown_203ACF0->field_2D, gUnknown_203ACF0->field_2C); - gUnknown_203ACF0->field_62 = gUnknown_203ACF0->field_2B; - r4 = 0; - if (JOY_NEW(A_BUTTON) && sub_8104AB0(gUnknown_203ACF0->field_18[gUnknown_203ACF0->field_2D], FLAG_GET_SEEN, 1)) - { - RemoveScrollIndicatorArrowPair(gUnknown_203ACF0->field_60); - ListMenuRemoveCursorObject(gUnknown_203ACF0->field_61, 0); - gUnknown_203ACF0->field_01 = 12; + DexScreen_CreateCategoryPageSelectionCursor(sPokedexScreenData->categoryCursorPosInPage); + DexScreen_UpdateCategoryPageCursorObject(sPokedexScreenData->categoryPageCursorTaskId, sPokedexScreenData->categoryCursorPosInPage, sPokedexScreenData->numMonsOnPage); + sPokedexScreenData->modeSelectCursorPosBak = sPokedexScreenData->pageNum; + pageFlipCmd = 0; + if (JOY_NEW(A_BUTTON) && DexScreen_GetSetPokedexFlag(sPokedexScreenData->pageSpecies[sPokedexScreenData->categoryCursorPosInPage], FLAG_GET_SEEN, TRUE)) + { + RemoveScrollIndicatorArrowPair(sPokedexScreenData->scrollArrowsTaskId); + ListMenuRemoveCursorObject(sPokedexScreenData->categoryPageCursorTaskId, 0); + sPokedexScreenData->state = 12; break; } if (!JOY_HELD(R_BUTTON) && JOY_REPT(DPAD_LEFT)) { - if (gUnknown_203ACF0->field_2D != 0) + if (sPokedexScreenData->categoryCursorPosInPage != 0) { - gUnknown_203ACF0->field_2D--; + sPokedexScreenData->categoryCursorPosInPage--; PlaySE(SE_SELECT); break; } else - r4 = 1; + pageFlipCmd = 1; } if (!JOY_HELD(R_BUTTON) && JOY_REPT(DPAD_RIGHT)) { - if (gUnknown_203ACF0->field_2D < gUnknown_203ACF0->field_2C - 1) + if (sPokedexScreenData->categoryCursorPosInPage < sPokedexScreenData->numMonsOnPage - 1) { - gUnknown_203ACF0->field_2D++; + sPokedexScreenData->categoryCursorPosInPage++; PlaySE(SE_SELECT); break; } else - r4 = 2; + pageFlipCmd = 2; } - if (r4 == 0) - r4 = sub_8104284(); - switch (r4) + if (pageFlipCmd == 0) + pageFlipCmd = DexScreen_InputHandler_GetShoulderInput(); + switch (pageFlipCmd) { - case 0: + case 0: // No action break; - case 1: - while (gUnknown_203ACF0->field_2B > gUnknown_203ACF0->field_29) + case 1: // Left + while (sPokedexScreenData->pageNum > sPokedexScreenData->firstPageInCategory) { - gUnknown_203ACF0->field_2B--; - if (sub_8106838(gUnknown_203ACF0->field_28, gUnknown_203ACF0->field_2B)) + sPokedexScreenData->pageNum--; + if (DexScreen_IsPageUnlocked(sPokedexScreenData->category, sPokedexScreenData->pageNum)) { - gUnknown_203ACF0->field_01 = 8; + sPokedexScreenData->state = 8; break; } } - if (gUnknown_203ACF0->field_01 != 8) - gUnknown_203ACF0->field_01 = 6; + if (sPokedexScreenData->state != 8) + sPokedexScreenData->state = 6; break; - case 2: - while (gUnknown_203ACF0->field_2B < gUnknown_203ACF0->field_2A - 1) + case 2: // Right + while (sPokedexScreenData->pageNum < sPokedexScreenData->lastPageInCategory - 1) { - gUnknown_203ACF0->field_2B++; - if (sub_8106838(gUnknown_203ACF0->field_28, gUnknown_203ACF0->field_2B)) + sPokedexScreenData->pageNum++; + if (DexScreen_IsPageUnlocked(sPokedexScreenData->category, sPokedexScreenData->pageNum)) { - gUnknown_203ACF0->field_01 = 10; + sPokedexScreenData->state = 10; break; } } - if (gUnknown_203ACF0->field_01 != 10) - gUnknown_203ACF0->field_01 = 6; + if (sPokedexScreenData->state != 10) + sPokedexScreenData->state = 6; break; } if (JOY_NEW(B_BUTTON)) { - gUnknown_203ACF0->field_01 = 6; + sPokedexScreenData->state = 6; } break; case 6: case 7: - RemoveScrollIndicatorArrowPair(gUnknown_203ACF0->field_60); - ListMenuRemoveCursorObject(gUnknown_203ACF0->field_61, 0); - BeginNormalPaletteFade(0xFFFF7FFF, 0, 0, 16, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 1; + RemoveScrollIndicatorArrowPair(sPokedexScreenData->scrollArrowsTaskId); + ListMenuRemoveCursorObject(sPokedexScreenData->categoryPageCursorTaskId, 0); + BeginNormalPaletteFade(~0x8000, 0, 0, 16, RGB_WHITEALPHA); + sPokedexScreenData->state = 1; break; case 8: case 10: - sub_8104E90(); - sub_8105058(0xFF); - ListMenuUpdateCursorObject(gUnknown_203ACF0->field_61, 0, 0xA0, 0); - gUnknown_203ACF0->field_2E = 0; - gUnknown_203ACF0->field_02[0] = 0; - gUnknown_203ACF0->field_01++; + DexScreen_DestroyCategoryPageMonIconAndInfoWindows(); + DexScreen_CreateCategoryPageSelectionCursor(0xFF); + ListMenuUpdateCursorObject(sPokedexScreenData->categoryPageCursorTaskId, 0, 0xA0, 0); + sPokedexScreenData->categoryPageSelectionCursorTimer = 0; + sPokedexScreenData->data[0] = 0; + sPokedexScreenData->state++; break; case 9: - if (sub_81052D0(0)) + if (DexScreen_FlipCategoryPageInDirection(0)) { - gUnknown_203ACF0->field_2D = gUnknown_203ACF0->field_2C - 1; - gUnknown_203ACF0->field_01 = 5; + sPokedexScreenData->categoryCursorPosInPage = sPokedexScreenData->numMonsOnPage - 1; + sPokedexScreenData->state = 5; } break; case 11: - if (sub_81052D0(1)) + if (DexScreen_FlipCategoryPageInDirection(1)) { - gUnknown_203ACF0->field_2D = 0; - gUnknown_203ACF0->field_01 = 5; + sPokedexScreenData->categoryCursorPosInPage = 0; + sPokedexScreenData->state = 5; } break; case 12: - gUnknown_203ACF0->field_5A = gUnknown_203ACF0->field_18[gUnknown_203ACF0->field_2D]; + sPokedexScreenData->dexSpecies = sPokedexScreenData->pageSpecies[sPokedexScreenData->categoryCursorPosInPage]; PlaySE(SE_SELECT); - gUnknown_203ACF0->field_01 = 14; + sPokedexScreenData->state = 14; break; case 13: - sub_8106014(); - gUnknown_203ACF0->field_01 = 4; + RemoveDexPageWindows(); + sPokedexScreenData->state = 4; break; case 14: - sub_8105E1C(0); - gUnknown_203ACF0->field_01 = 15; + DexScreen_DrawMonDexPage(FALSE); + sPokedexScreenData->state = 15; break; case 15: - gUnknown_203ACF0->field_02[0] = 0; - gUnknown_203ACF0->field_02[1] = 0; - gUnknown_203ACF0->field_01++; + sPokedexScreenData->data[0] = 0; + sPokedexScreenData->data[1] = 0; + sPokedexScreenData->state++; // fallthrough case 16: - if (gUnknown_203ACF0->field_02[1] < 6) + if (sPokedexScreenData->data[1] < 6) { - if (gUnknown_203ACF0->field_02[0]) + if (sPokedexScreenData->data[0]) { - sub_8105594(0, gUnknown_203ACF0->field_02[1]); + DexScreen_DexPageZoomEffectFrame(0, sPokedexScreenData->data[1]); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_02[0] = 4; - gUnknown_203ACF0->field_02[1]++; + sPokedexScreenData->data[0] = 4; + sPokedexScreenData->data[1]++; } else { - gUnknown_203ACF0->field_02[0]--; + sPokedexScreenData->data[0]--; } } else @@ -1714,73 +1752,73 @@ static void sub_8103AC8(u8 taskId) CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - PlayCry2(gUnknown_203ACF0->field_5A, 0, 125, 10); - gUnknown_203ACF0->field_02[0] = 0; - gUnknown_203ACF0->field_01 = 17; + PlayCry2(sPokedexScreenData->dexSpecies, 0, 125, 10); + sPokedexScreenData->data[0] = 0; + sPokedexScreenData->state = 17; } break; case 17: if (JOY_NEW(A_BUTTON)) { - sub_8106014(); + RemoveDexPageWindows(); FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 2, 30, 16); CopyBgTilemapBufferToVram(1); - gUnknown_203ACF0->field_01 = 21; + sPokedexScreenData->state = 21; } else if (JOY_NEW(B_BUTTON)) { - gUnknown_203ACF0->field_01 = 18; + sPokedexScreenData->state = 18; } else { - sub_8106B34(); + DexScreen_InputHandler_StartToCry(); } break; case 18: - sub_8104F0C(0); - sub_8105594(0, 6); + DexScreen_CreateCategoryListGfx(FALSE); + DexScreen_DexPageZoomEffectFrame(0, 6); CopyBgTilemapBufferToVram(3); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_01 = 19; + sPokedexScreenData->state = 19; break; case 19: - gUnknown_203ACF0->field_02[0] = 0; - gUnknown_203ACF0->field_02[1] = 6; - gUnknown_203ACF0->field_01++; + sPokedexScreenData->data[0] = 0; + sPokedexScreenData->data[1] = 6; + sPokedexScreenData->state++; // fallthrough case 20: - if (gUnknown_203ACF0->field_02[1]) + if (sPokedexScreenData->data[1]) { - if (gUnknown_203ACF0->field_02[0]) + if (sPokedexScreenData->data[0]) { - gUnknown_203ACF0->field_02[1]--; + sPokedexScreenData->data[1]--; FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 2, 30, 16); - sub_8105594(0, gUnknown_203ACF0->field_02[1]); + DexScreen_DexPageZoomEffectFrame(0, sPokedexScreenData->data[1]); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_02[0] = 1; + sPokedexScreenData->data[0] = 1; } else - gUnknown_203ACF0->field_02[0]--; + sPokedexScreenData->data[0]--; } else { FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 2, 30, 16); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_01 = 13; + sPokedexScreenData->state = 13; } break; case 21: - sub_810603C(); - gUnknown_203ACF0->field_01 = 22; + DexScreen_DrawMonAreaPage(); + sPokedexScreenData->state = 22; break; case 22: CopyBgTilemapBufferToVram(3); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_01 = 23; + sPokedexScreenData->state = 23; break; case 23: if (JOY_NEW(A_BUTTON)) @@ -1791,7 +1829,7 @@ static void sub_8103AC8(u8 taskId) CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_01 = 26; + sPokedexScreenData->state = 26; } else if (JOY_NEW(B_BUTTON)) { @@ -1801,42 +1839,45 @@ static void sub_8103AC8(u8 taskId) CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_01 = 24; + sPokedexScreenData->state = 24; } else { - sub_8106B34(); + DexScreen_InputHandler_StartToCry(); } break; case 24: - sub_81067C0(); - gUnknown_203ACF0->field_01 = 25; + DexScreen_DestroyAreaScreenResources(); + sPokedexScreenData->state = 25; break; case 25: - sub_8105E1C(0); + DexScreen_DrawMonDexPage(FALSE); CopyBgTilemapBufferToVram(3); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_01 = 17; + sPokedexScreenData->state = 17; break; case 26: - sub_81067C0(); - gUnknown_203ACF0->field_01 = 18; + DexScreen_DestroyAreaScreenResources(); + sPokedexScreenData->state = 18; break; } } -static u8 sub_8104234(void) +static u8 DexScreen_CreateCategoryMenuScrollArrows(void) { - struct ScrollArrowsTemplate template = sUnknown_84524B4; - template.fullyUpThreshold = gUnknown_203ACF0->field_29; - template.fullyDownThreshold = gUnknown_203ACF0->field_2A - 1; - gUnknown_203ACF0->field_62 = gUnknown_203ACF0->field_2B; - return AddScrollIndicatorArrowPair(&template, &gUnknown_203ACF0->field_62); + struct ScrollArrowsTemplate template = sScrollArrowsTemplate_CategoryMenu; + template.fullyUpThreshold = sPokedexScreenData->firstPageInCategory; + template.fullyDownThreshold = sPokedexScreenData->lastPageInCategory - 1; + sPokedexScreenData->modeSelectCursorPosBak = sPokedexScreenData->pageNum; + return AddScrollIndicatorArrowPair(&template, &sPokedexScreenData->modeSelectCursorPosBak); } -static int sub_8104284(void) +/* + * Returns 1 to flip pages left, 2 to flip pages right, 0 for no action + */ +static int DexScreen_InputHandler_GetShoulderInput(void) { switch (gSaveBlock2Ptr->optionsButtonMode) { @@ -1861,95 +1902,95 @@ static int sub_8104284(void) } } -static void sub_81042EC(u8 taskId) +static void Task_DexScreen_ShowMonPage(u8 taskId) { - switch (gUnknown_203ACF0->field_01) + switch (sPokedexScreenData->state) { case 0: HideBg(3); HideBg(2); HideBg(1); - gUnknown_203ACF0->field_01 = 2; + sPokedexScreenData->state = 2; break; case 1: HideBg(2); HideBg(1); - gTasks[taskId].func = sub_8102F80; - gUnknown_203ACF0->field_01 = 0; + gTasks[taskId].func = Task_DexScreen_NumericalOrder; + sPokedexScreenData->state = 0; break; case 2: - gUnknown_203ACF0->field_2C = 1; - sub_8105E1C(0); - gUnknown_203ACF0->field_01 = 3; + sPokedexScreenData->numMonsOnPage = 1; + DexScreen_DrawMonDexPage(FALSE); + sPokedexScreenData->state = 3; break; case 3: CopyBgTilemapBufferToVram(3); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - PlayCry2(gUnknown_203ACF0->field_5A, 0, 125, 10); - gUnknown_203ACF0->field_01 = 4; + PlayCry2(sPokedexScreenData->dexSpecies, 0, 125, 10); + sPokedexScreenData->state = 4; break; case 4: - BeginNormalPaletteFade(0xFFFF7FFF, 0, 16, 0, RGB_WHITEALPHA); + BeginNormalPaletteFade(~0x8000, 0, 16, 0, RGB_WHITEALPHA); ShowBg(3); ShowBg(2); ShowBg(1); - gUnknown_203ACF0->field_01 = 5; + sPokedexScreenData->state = 5; break; case 5: if (JOY_NEW(A_BUTTON)) { - sub_8106014(); + RemoveDexPageWindows(); FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 2, 30, 16); CopyBgTilemapBufferToVram(1); - gUnknown_203ACF0->field_01 = 7; + sPokedexScreenData->state = 7; } else if (JOY_NEW(B_BUTTON)) { - sub_8106014(); - BeginNormalPaletteFade(0xFFFF7FFF, 0, 0, 16, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 1; + RemoveDexPageWindows(); + BeginNormalPaletteFade(~0x8000, 0, 0, 16, RGB_WHITEALPHA); + sPokedexScreenData->state = 1; } - else if (JOY_NEW(DPAD_UP) && sub_8104664(1)) + else if (JOY_NEW(DPAD_UP) && DexScreen_TryScrollMonsVertical(1)) { - sub_8106014(); - BeginNormalPaletteFade(0xFFFF7FFF, 0, 0, 16, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 6; + RemoveDexPageWindows(); + BeginNormalPaletteFade(~0x8000, 0, 0, 16, RGB_WHITEALPHA); + sPokedexScreenData->state = 6; } - else if (JOY_NEW(DPAD_DOWN) && sub_8104664(0)) + else if (JOY_NEW(DPAD_DOWN) && DexScreen_TryScrollMonsVertical(0)) { - sub_8106014(); - BeginNormalPaletteFade(0xFFFF7FFF, 0, 0, 16, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 6; + RemoveDexPageWindows(); + BeginNormalPaletteFade(~0x8000, 0, 0, 16, RGB_WHITEALPHA); + sPokedexScreenData->state = 6; } else { - sub_8106B34(); + DexScreen_InputHandler_StartToCry(); } break; case 6: HideBg(2); HideBg(1); - gUnknown_203ACF0->field_5A = gUnknown_203ACF0->field_30; - gUnknown_203ACF0->field_01 = 2; + sPokedexScreenData->dexSpecies = sPokedexScreenData->characteristicMenuInput; + sPokedexScreenData->state = 2; break; case 7: - sub_810603C(); - gUnknown_203ACF0->field_01 = 8; + DexScreen_DrawMonAreaPage(); + sPokedexScreenData->state = 8; break; case 8: CopyBgTilemapBufferToVram(3); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_01 = 9; + sPokedexScreenData->state = 9; break; case 9: if (JOY_NEW(A_BUTTON)) { - BeginNormalPaletteFade(0xFFFF7FFF, 0, 0, 16, RGB_WHITEALPHA); - gUnknown_203ACF0->field_01 = 12; + BeginNormalPaletteFade(~0x8000, 0, 0, 16, RGB_WHITEALPHA); + sPokedexScreenData->state = 12; } else if (JOY_NEW(B_BUTTON)) { @@ -1959,128 +2000,128 @@ static void sub_81042EC(u8 taskId) CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_01 = 10; + sPokedexScreenData->state = 10; } else { - sub_8106B34(); + DexScreen_InputHandler_StartToCry(); } break; case 10: - sub_81067C0(); - gUnknown_203ACF0->field_01 = 11; + DexScreen_DestroyAreaScreenResources(); + sPokedexScreenData->state = 11; break; case 11: - sub_8105E1C(0); + DexScreen_DrawMonDexPage(FALSE); CopyBgTilemapBufferToVram(3); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_01 = 5; + sPokedexScreenData->state = 5; break; case 12: - sub_81067C0(); + DexScreen_DestroyAreaScreenResources(); FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 2, 30, 16); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_01 = 1; + sPokedexScreenData->state = 1; break; } } -static bool32 sub_8104664(u8 a0) +static bool32 DexScreen_TryScrollMonsVertical(u8 direction) { - int r3; - u16 *r6, *r12; + int selectedIndex; + u16 *itemsAbove_p, *cursorPos_p; - switch (gUnknown_203ACF0->field_42) + switch (sPokedexScreenData->dexOrderId) { default: - case 0: - r12 = &gUnknown_203ACF0->field_36; - r6 = &gUnknown_203ACF0->field_34; + case DEX_ORDER_NUMERICAL_KANTO: + cursorPos_p = &sPokedexScreenData->kantoOrderMenuCursorPos; + itemsAbove_p = &sPokedexScreenData->kantoOrderMenuItemsAbove; break; - case 1: - case 2: - case 3: - case 4: - r12 = &gUnknown_203ACF0->field_3A; - r6 = &gUnknown_203ACF0->field_38; + case DEX_ORDER_ATOZ: + case DEX_ORDER_TYPE: + case DEX_ORDER_LIGHTEST: + case DEX_ORDER_SMALLEST: + cursorPos_p = &sPokedexScreenData->characteristicOrderMenuCursorPos; + itemsAbove_p = &sPokedexScreenData->characteristicOrderMenuItemsAbove; break; - case 5: - r12 = &gUnknown_203ACF0->field_3E; - r6 = &gUnknown_203ACF0->field_3C; + case DEX_ORDER_NUMERICAL_NATIONAL: + cursorPos_p = &sPokedexScreenData->nationalOrderMenuCursorPos; + itemsAbove_p = &sPokedexScreenData->nationalOrderMenuItemsAbove; break; } - r3 = *r12 + *r6; - if (a0) + selectedIndex = *cursorPos_p + *itemsAbove_p; + if (direction) // Seek up { - if (r3 == 0) + if (selectedIndex == 0) return FALSE; - r3--; - while (r3 >= 0) //Should be while (--r3 >= 0) without the r3-- in the body or before the while at all, but this is needed to match. + selectedIndex--; + while (selectedIndex >= 0) //Should be while (--selectedIndex >= 0) without the selectedIndex-- in the body or before the while at all, but this is needed to match. { - if ((gUnknown_203ACF0->field_44[r3].index >> 16) & 1) + if ((sPokedexScreenData->listItems[selectedIndex].index >> 16) & 1) { break; } - r3--; + selectedIndex--; } - if (r3 < 0) + if (selectedIndex < 0) { return FALSE; } } - else + else // Seek down { - if (r3 == gUnknown_203ACF0->field_48 - 1) + if (selectedIndex == sPokedexScreenData->orderedDexCount - 1) { return FALSE; } - r3++; - while (r3 < gUnknown_203ACF0->field_48) //Should be while (++r3 < gUnknown_203ACF0->field_48) without the r3++ in the body or before the while at all, but this is needed to match. + selectedIndex++; + while (selectedIndex < sPokedexScreenData->orderedDexCount) //Should be while (++selectedIndex < sPokedexScreenData->orderedDexCount) without the selectedIndex++ in the body or before the while at all, but this is needed to match. { - if ((gUnknown_203ACF0->field_44[r3].index >> 16) & 1) + if ((sPokedexScreenData->listItems[selectedIndex].index >> 16) & 1) break; - r3++; + selectedIndex++; } - if (r3 >= gUnknown_203ACF0->field_48) + if (selectedIndex >= sPokedexScreenData->orderedDexCount) { return FALSE; } } - gUnknown_203ACF0->field_30 = gUnknown_203ACF0->field_44[r3].index; + sPokedexScreenData->characteristicMenuInput = sPokedexScreenData->listItems[selectedIndex].index; - if (gUnknown_203ACF0->field_48 > 9) + if (sPokedexScreenData->orderedDexCount > 9) { - if (r3 < 4) + if (selectedIndex < 4) { - *r12 = 0; - *r6 = r3; + *cursorPos_p = 0; + *itemsAbove_p = selectedIndex; } - else if (r3 >= (gUnknown_203ACF0->field_48 - 4)) + else if (selectedIndex >= (sPokedexScreenData->orderedDexCount - 4)) { - *r12 = (gUnknown_203ACF0->field_48 - 9); - *r6 = r3 + 9 - (gUnknown_203ACF0->field_48); + *cursorPos_p = (sPokedexScreenData->orderedDexCount - 9); + *itemsAbove_p = selectedIndex + 9 - (sPokedexScreenData->orderedDexCount); } else { - *r12 = r3 - 4; - *r6 = 4; + *cursorPos_p = selectedIndex - 4; + *itemsAbove_p = 4; } } else { - *r12 = 0; - *r6 = r3; + *cursorPos_p = 0; + *itemsAbove_p = selectedIndex; } return TRUE; } -void sub_81047B0(u8 *windowId_p) +static void DexScreen_RemoveWindow(u8 *windowId_p) { if (*windowId_p != 0xFF) { @@ -2089,7 +2130,7 @@ void sub_81047B0(u8 *windowId_p) } } -void sub_81047C8(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 colorIdx) +static void DexScreen_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 colorIdx) { u8 textColor[3]; switch (colorIdx) @@ -2123,17 +2164,17 @@ void sub_81047C8(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 colorIdx) AddTextPrinterParameterized4(windowId, fontId, x, y, fontId == 0 ? 0 : 1, 0, textColor, -1, str); } -void sub_8104880(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx) +void DexScreen_PrintNum3LeadingZeroes(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx) { u8 buff[4]; buff[0] = (num / 100) + CHAR_0; buff[1] = ((num %= 100) / 10) + CHAR_0; buff[2] = (num % 10) + CHAR_0; buff[3] = EOS; - sub_81047C8(windowId, fontId, buff, x, y, colorIdx); + DexScreen_AddTextPrinterParameterized(windowId, fontId, buff, x, y, colorIdx); } -static void sub_810491C(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx) +static void DexScreen_PrintNum3RightAlign(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx) { u8 buff[4]; int i; @@ -2147,10 +2188,10 @@ static void sub_810491C(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx break; buff[i] = CHAR_SPACE; } - sub_81047C8(windowId, fontId, buff, x, y, colorIdx); + DexScreen_AddTextPrinterParameterized(windowId, fontId, buff, x, y, colorIdx); } -u32 sub_81049CC(int species) +static u32 DexScreen_GetDefaultPersonality(int species) { switch (species) { @@ -2163,19 +2204,19 @@ u32 sub_81049CC(int species) } } -void sub_81049FC(u8 windowId, u16 species, u16 paletteOffset) +static void DexScreen_LoadMonPicInWindow(u8 windowId, u16 species, u16 paletteOffset) { - LoadMonPicInWindow(species, 8, sub_81049CC(species), TRUE, paletteOffset >> 4, windowId); + LoadMonPicInWindow(species, 8, DexScreen_GetDefaultPersonality(species), TRUE, paletteOffset >> 4, windowId); } -void sub_8104A34(u8 windowId, u8 fontId, u16 species, u8 x, u8 y) +static void DexScreen_PrintMonDexNo(u8 windowId, u8 fontId, u16 species, u8 x, u8 y) { u16 dexNum = SpeciesToNationalPokedexNum(species); - sub_81047C8(windowId, fontId, gText_PokedexNo, x, y, 0); - sub_8104880(windowId, fontId, dexNum, x + 9, y, 0); + DexScreen_AddTextPrinterParameterized(windowId, fontId, gText_PokedexNo, x, y, 0); + DexScreen_PrintNum3LeadingZeroes(windowId, fontId, dexNum, x + 9, y, 0); } -s8 sub_8104AB0(u16 nationalDexNo, u8 caseId, bool8 indexIsSpecies) +s8 DexScreen_GetSetPokedexFlag(u16 nationalDexNo, u8 caseId, bool8 indexIsSpecies) { u8 index; u8 bit; @@ -2195,6 +2236,7 @@ s8 sub_8104AB0(u16 nationalDexNo, u8 caseId, bool8 indexIsSpecies) case FLAG_GET_SEEN: if (gSaveBlock2Ptr->pokedex.seen[index] & mask) { + // Anticheat if ((gSaveBlock2Ptr->pokedex.seen[index] & mask) == (gSaveBlock1Ptr->seen1[index] & mask) && (gSaveBlock2Ptr->pokedex.seen[index] & mask) == (gSaveBlock1Ptr->seen2[index] & mask)) retVal = 1; @@ -2203,6 +2245,7 @@ s8 sub_8104AB0(u16 nationalDexNo, u8 caseId, bool8 indexIsSpecies) case FLAG_GET_CAUGHT: if (gSaveBlock2Ptr->pokedex.owned[index] & mask) { + // Anticheat if ((gSaveBlock2Ptr->pokedex.owned[index] & mask) == (gSaveBlock2Ptr->pokedex.seen[index] & mask) && (gSaveBlock2Ptr->pokedex.owned[index] & mask) == (gSaveBlock1Ptr->seen1[index] & mask) && (gSaveBlock2Ptr->pokedex.owned[index] & mask) == (gSaveBlock1Ptr->seen2[index] & mask)) @@ -2211,6 +2254,7 @@ s8 sub_8104AB0(u16 nationalDexNo, u8 caseId, bool8 indexIsSpecies) break; case FLAG_SET_SEEN: gSaveBlock2Ptr->pokedex.seen[index] |= mask; + // Anticheat gSaveBlock1Ptr->seen1[index] |= mask; gSaveBlock1Ptr->seen2[index] |= mask; break; @@ -2221,7 +2265,7 @@ s8 sub_8104AB0(u16 nationalDexNo, u8 caseId, bool8 indexIsSpecies) return retVal; } -static u16 sub_8104BBC(u8 caseId, bool8 whichDex) +static u16 DexScreen_GetDexCount(u8 caseId, bool8 whichDex) { u16 count = 0; u16 i; @@ -2231,14 +2275,14 @@ static u16 sub_8104BBC(u8 caseId, bool8 whichDex) case 0: // Kanto for (i = 0; i < KANTO_DEX_COUNT; i++) { - if (sub_8104AB0(i + 1, caseId, FALSE)) + if (DexScreen_GetSetPokedexFlag(i + 1, caseId, FALSE)) count++; } break; case 1: // National for (i = 0; i < NATIONAL_DEX_COUNT; i++) { - if (sub_8104AB0(i + 1, caseId, FALSE)) + if (DexScreen_GetSetPokedexFlag(i + 1, caseId, FALSE)) count++; } @@ -2247,157 +2291,157 @@ static u16 sub_8104BBC(u8 caseId, bool8 whichDex) return count; } -void sub_8104C2C(const u8 *src) +static void DexScreen_PrintControlInfo(const u8 *src) { - sub_81047C8(1, 0, src, 236 - GetStringWidth(0, src, 0), 2, 4); + DexScreen_AddTextPrinterParameterized(1, 0, src, 236 - GetStringWidth(0, src, 0), 2, 4); } -bool8 sub_8104C64(u16 a0, u8 a1, u8 a2) +bool8 DexScreen_DrawMonPicInCategoryPage(u16 species, u8 slot, u8 numSlots) { struct WindowTemplate template; - a2--; - CopyToBgTilemapBufferRect_ChangePalette(3, sUnknown_845228C, gUnknown_8452334[a2][a1][0], gUnknown_8452334[a2][a1][1], 8, 8, a1 + 5); - if (gUnknown_203ACF0->field_20[a1] == 0xFF) - { - template = sUnknown_84521C4; - template.tilemapLeft = gUnknown_8452334[a2][a1][0]; - template.tilemapTop = gUnknown_8452334[a2][a1][1]; - template.paletteNum = a1 + 1; - template.baseBlock = a1 * 64 + 8; - gUnknown_203ACF0->field_20[a1] = AddWindow(&template); - FillWindowPixelBuffer(gUnknown_203ACF0->field_20[a1], PIXEL_FILL(0)); - sub_81049FC(gUnknown_203ACF0->field_20[a1], a0, a1 * 16 + 16); - PutWindowTilemap(gUnknown_203ACF0->field_20[a1]); - CopyWindowToVram(gUnknown_203ACF0->field_20[a1], COPYWIN_GFX); + numSlots--; + CopyToBgTilemapBufferRect_ChangePalette(3, sCategoryPageIconWindowBg, sCategoryPageIconCoords[numSlots][slot][0], sCategoryPageIconCoords[numSlots][slot][1], 8, 8, slot + 5); + if (sPokedexScreenData->categoryMonWindowIds[slot] == 0xFF) + { + template = sWindowTemplate_CategoryMonIcon; + template.tilemapLeft = sCategoryPageIconCoords[numSlots][slot][0]; + template.tilemapTop = sCategoryPageIconCoords[numSlots][slot][1]; + template.paletteNum = slot + 1; + template.baseBlock = slot * 64 + 8; + sPokedexScreenData->categoryMonWindowIds[slot] = AddWindow(&template); + FillWindowPixelBuffer(sPokedexScreenData->categoryMonWindowIds[slot], PIXEL_FILL(0)); + DexScreen_LoadMonPicInWindow(sPokedexScreenData->categoryMonWindowIds[slot], species, slot * 16 + 16); + PutWindowTilemap(sPokedexScreenData->categoryMonWindowIds[slot]); + CopyWindowToVram(sPokedexScreenData->categoryMonWindowIds[slot], COPYWIN_GFX); } else - PutWindowTilemap(gUnknown_203ACF0->field_20[a1]); + PutWindowTilemap(sPokedexScreenData->categoryMonWindowIds[slot]); - if (gUnknown_203ACF0->field_24[a1] == 0xFF) + if (sPokedexScreenData->categoryMonInfoWindowIds[slot] == 0xFF) { - if (a0 != SPECIES_NONE) + if (species != SPECIES_NONE) { - template = sUnknown_84521CC; - template.tilemapLeft = gUnknown_8452334[a2][a1][2]; - template.tilemapTop = gUnknown_8452334[a2][a1][3]; - template.baseBlock = a1 * 40 + 0x108; - gUnknown_203ACF0->field_24[a1] = AddWindow(&template); - CopyToWindowPixelBuffer(gUnknown_203ACF0->field_24[a1], gUnknown_8440124, 0, 0); - sub_8104A34(gUnknown_203ACF0->field_24[a1], 0, a0, 12, 0); - sub_81047C8(gUnknown_203ACF0->field_24[a1], 2, gSpeciesNames[a0], 2, 13, 0); - if (sub_8104AB0(a0, FLAG_GET_CAUGHT, TRUE)) - BlitBitmapRectToWindow(gUnknown_203ACF0->field_24[a1], gUnknown_8443600, 0, 0, 8, 8, 2, 3, 8, 8); - PutWindowTilemap(gUnknown_203ACF0->field_24[a1]); - CopyWindowToVram(gUnknown_203ACF0->field_24[a1], COPYWIN_GFX); + template = sWindowTemplate_CategoryMonInfo; + template.tilemapLeft = sCategoryPageIconCoords[numSlots][slot][2]; + template.tilemapTop = sCategoryPageIconCoords[numSlots][slot][3]; + template.baseBlock = slot * 40 + 0x108; + sPokedexScreenData->categoryMonInfoWindowIds[slot] = AddWindow(&template); + CopyToWindowPixelBuffer(sPokedexScreenData->categoryMonInfoWindowIds[slot], sCategoryMonInfoBgTiles, 0, 0); + DexScreen_PrintMonDexNo(sPokedexScreenData->categoryMonInfoWindowIds[slot], 0, species, 12, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->categoryMonInfoWindowIds[slot], 2, gSpeciesNames[species], 2, 13, 0); + if (DexScreen_GetSetPokedexFlag(species, FLAG_GET_CAUGHT, TRUE)) + BlitBitmapRectToWindow(sPokedexScreenData->categoryMonInfoWindowIds[slot], sDexScreen_CaughtIcon, 0, 0, 8, 8, 2, 3, 8, 8); + PutWindowTilemap(sPokedexScreenData->categoryMonInfoWindowIds[slot]); + CopyWindowToVram(sPokedexScreenData->categoryMonInfoWindowIds[slot], COPYWIN_GFX); } } else - PutWindowTilemap(gUnknown_203ACF0->field_24[a1]); + PutWindowTilemap(sPokedexScreenData->categoryMonInfoWindowIds[slot]); return TRUE; } -void sub_8104E90(void) +static void DexScreen_DestroyCategoryPageMonIconAndInfoWindows(void) { int i; for (i = 0; i < 4; i++) { - sub_81047B0(&gUnknown_203ACF0->field_20[i]); - sub_81047B0(&gUnknown_203ACF0->field_24[i]); + DexScreen_RemoveWindow(&sPokedexScreenData->categoryMonWindowIds[i]); + DexScreen_RemoveWindow(&sPokedexScreenData->categoryMonInfoWindowIds[i]); } } -void sub_8104EC0(u8 unused, u16 a1, u16 a2, u8 unused2, u8 unused3) +static void DexScreen_PrintCategoryPageNumbers(u8 windowId, u16 currentPage, u16 totalPages, u16 x, u16 y) { u8 buffer[30]; u8 *ptr = StringCopy(buffer, gText_Page); - ptr = ConvertIntToDecimalStringN(ptr, a1, STR_CONV_MODE_RIGHT_ALIGN, 2); + ptr = ConvertIntToDecimalStringN(ptr, currentPage, STR_CONV_MODE_RIGHT_ALIGN, 2); *ptr++ = CHAR_SLASH; - ptr = ConvertIntToDecimalStringN(ptr, a2, STR_CONV_MODE_RIGHT_ALIGN, 2); - sub_8106E78(buffer, 2); + ptr = ConvertIntToDecimalStringN(ptr, totalPages, STR_CONV_MODE_RIGHT_ALIGN, 2); + DexScreen_PrintStringWithAlignment(buffer, TEXT_RIGHT); } -bool8 sub_8104F0C(bool8 a0) +static bool8 DexScreen_CreateCategoryListGfx(bool8 justRegistered) { FillBgTilemapBufferRect_Palette0(3, 2, 0, 0, 30, 20); FillBgTilemapBufferRect_Palette0(2, 0, 0, 0, 32, 20); FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 20); - sub_81068DC(gUnknown_203ACF0->field_28, gUnknown_203ACF0->field_2B); + DexScreen_CreateCategoryPageSpeciesList(sPokedexScreenData->category, sPokedexScreenData->pageNum); FillWindowPixelBuffer(0, PIXEL_FILL(15)); - if (a0) + if (justRegistered) { - sub_8106E78(sDexCategoryNamePtrs[gUnknown_203ACF0->field_28], 1); + DexScreen_PrintStringWithAlignment(sDexCategoryNamePtrs[sPokedexScreenData->category], TEXT_CENTER); } else { - sub_8106E78(sDexCategoryNamePtrs[gUnknown_203ACF0->field_28], 0); - sub_8104EC0(0, sub_8106AF8(gUnknown_203ACF0->field_2B), sub_8106AF8(gUnknown_203ACF0->field_2A - 1), 160, 2); + DexScreen_PrintStringWithAlignment(sDexCategoryNamePtrs[sPokedexScreenData->category], TEXT_LEFT); + DexScreen_PrintCategoryPageNumbers(0, DexScreen_PageNumberToRenderablePages(sPokedexScreenData->pageNum), DexScreen_PageNumberToRenderablePages(sPokedexScreenData->lastPageInCategory - 1), 160, 2); } CopyWindowToVram(0, COPYWIN_GFX); FillWindowPixelBuffer(1, PIXEL_FILL(15)); - if (!a0) - sub_8104C2C(gText_PickFlipPageCheckCancel); + if (!justRegistered) + DexScreen_PrintControlInfo(gText_PickFlipPageCheckCancel); CopyWindowToVram(1, COPYWIN_GFX); - if (gUnknown_203ACF0->field_18[0] != 0xFFFF) - sub_8104C64(gUnknown_203ACF0->field_18[0], 0, gUnknown_203ACF0->field_2C); - if (gUnknown_203ACF0->field_18[1] != 0xFFFF) - sub_8104C64(gUnknown_203ACF0->field_18[1], 1, gUnknown_203ACF0->field_2C); - if (gUnknown_203ACF0->field_18[2] != 0xFFFF) - sub_8104C64(gUnknown_203ACF0->field_18[2], 2, gUnknown_203ACF0->field_2C); - if (gUnknown_203ACF0->field_18[3] != 0xFFFF) - sub_8104C64(gUnknown_203ACF0->field_18[3], 3, gUnknown_203ACF0->field_2C); + if (sPokedexScreenData->pageSpecies[0] != 0xFFFF) + DexScreen_DrawMonPicInCategoryPage(sPokedexScreenData->pageSpecies[0], 0, sPokedexScreenData->numMonsOnPage); + if (sPokedexScreenData->pageSpecies[1] != 0xFFFF) + DexScreen_DrawMonPicInCategoryPage(sPokedexScreenData->pageSpecies[1], 1, sPokedexScreenData->numMonsOnPage); + if (sPokedexScreenData->pageSpecies[2] != 0xFFFF) + DexScreen_DrawMonPicInCategoryPage(sPokedexScreenData->pageSpecies[2], 2, sPokedexScreenData->numMonsOnPage); + if (sPokedexScreenData->pageSpecies[3] != 0xFFFF) + DexScreen_DrawMonPicInCategoryPage(sPokedexScreenData->pageSpecies[3], 3, sPokedexScreenData->numMonsOnPage); return FALSE; } -void sub_8105058(u8 a0) +static void DexScreen_CreateCategoryPageSelectionCursor(u8 cursorPos) { int i; - u32 r7; + u32 palIdx; - if (a0 == 0xFF) + if (cursorPos == 0xFF) { for (i = 0; i < 4; i++) { - LoadPalette(&gUnknown_84406C8[0], 0x52 + 0x10 * i, 2); - LoadPalette(&gUnknown_84406C8[1], 0x58 + 0x10 * i, 2); + LoadPalette(&sDexScreen_CategoryCursorPals[0], 0x52 + 0x10 * i, 2); + LoadPalette(&sDexScreen_CategoryCursorPals[1], 0x58 + 0x10 * i, 2); } - LoadPalette(&gUnknown_84406C8[0], 0x141, 2); - gUnknown_203ACF0->field_2E = 0; + LoadPalette(&sDexScreen_CategoryCursorPals[0], 0x141, 2); + sPokedexScreenData->categoryPageSelectionCursorTimer = 0; } else { - gUnknown_203ACF0->field_2E++; - if (gUnknown_203ACF0->field_2E == 16) - gUnknown_203ACF0->field_2E = 0; - r7 = gUnknown_203ACF0->field_2E >> 2; + sPokedexScreenData->categoryPageSelectionCursorTimer++; + if (sPokedexScreenData->categoryPageSelectionCursorTimer == 16) + sPokedexScreenData->categoryPageSelectionCursorTimer = 0; + palIdx = sPokedexScreenData->categoryPageSelectionCursorTimer >> 2; for (i = 0; i < 4; i++) { - if (i == a0) + if (i == cursorPos) { - LoadPalette(&gUnknown_84406C8[2 * r7 + 2], 0x52 + 0x10 * i, 2); - LoadPalette(&gUnknown_84406C8[2 * r7 + 3], 0x58 + 0x10 * i, 2); + LoadPalette(&sDexScreen_CategoryCursorPals[2 * palIdx + 2], 0x52 + 0x10 * i, 2); + LoadPalette(&sDexScreen_CategoryCursorPals[2 * palIdx + 3], 0x58 + 0x10 * i, 2); } else { - LoadPalette(&gUnknown_84406C8[0], 0x52 + 0x10 * i, 2); - LoadPalette(&gUnknown_84406C8[1], 0x58 + 0x10 * i, 2); + LoadPalette(&sDexScreen_CategoryCursorPals[0], 0x52 + 0x10 * i, 2); + LoadPalette(&sDexScreen_CategoryCursorPals[1], 0x58 + 0x10 * i, 2); } } - LoadPalette(&gUnknown_84406C8[2 * r7 + 2], 0x141, 2); + LoadPalette(&sDexScreen_CategoryCursorPals[2 * palIdx + 2], 0x141, 2); } } -void sub_8105178(u8 a0, u8 a1, u8 a2) +static void DexScreen_UpdateCategoryPageCursorObject(u8 taskId, u8 cursorPos, u8 numMonsInPage) { - a2--; - ListMenuUpdateCursorObject(a0, gUnknown_8452334[a2][a1][2] * 8, gUnknown_8452334[a2][a1][3] * 8, 0); + numMonsInPage--; + ListMenuUpdateCursorObject(taskId, sCategoryPageIconCoords[numMonsInPage][cursorPos][2] * 8, sCategoryPageIconCoords[numMonsInPage][cursorPos][3] * 8, 0); } -bool8 sub_81051AC(const u16 *a0, u8 a1, u16 *a2, u8 a3) +bool8 DexPage_TileBuffer_CopyCol(const u16 *srcBuf, u8 srcCol, u16 *dstBuf, u8 dstCol) { int i; - const u16 *src = &a0[a1]; - u16 *dst = &a2[a3]; + const u16 *src = &srcBuf[srcCol]; + u16 *dst = &dstBuf[dstCol]; for (i = 0; i < 20; i++) { *dst = *src; @@ -2407,42 +2451,42 @@ bool8 sub_81051AC(const u16 *a0, u8 a1, u16 *a2, u8 a3) return FALSE; } -bool8 sub_81051D0(u16 a0, u16 *a1, u8 a2) +bool8 DexPage_TileBuffer_FillCol(u16 tileNo, u16 *tileBuf, u8 x) { int i; - u16 *dst = &a1[a2]; + u16 *dst = &tileBuf[x]; for (i = 0; i < 20; i++) { - *dst = a0; + *dst = tileNo; dst += 32; } return FALSE; } -bool8 sub_81051F0(u8 a0) +bool8 DexScreen_TurnCategoryPage_BgEffect(u8 page) { - int i; - int r4; + int dstCol; + int srcCol; u16 *bg1buff = GetBgTilemapBuffer(1); u16 *bg2buff = GetBgTilemapBuffer(2); u16 *bg3buff = GetBgTilemapBuffer(3); - u16 *sp04 = gUnknown_203ACF0->field_5C + 0x800; - u16 *sp08 = gUnknown_203ACF0->field_5C + 0x400; - u16 *sp0C = gUnknown_203ACF0->field_5C + 0x000; - for (i = 0; i < 30; i++) + u16 *bg1mem = sPokedexScreenData->bgBufsMem + 0x800; + u16 *bg2mem = sPokedexScreenData->bgBufsMem + 0x400; + u16 *bg3mem = sPokedexScreenData->bgBufsMem + 0x000; + for (dstCol = 0; dstCol < 30; dstCol++) { - r4 = sUnknown_8452388[a0][i]; - if (r4 == 30) + srcCol = sDexScreenPageTurnColumns[page][dstCol]; + if (srcCol == 30) { - sub_81051D0(0x000, bg1buff, i); - sub_81051D0(0x000, bg2buff, i); - sub_81051D0(0x00C, bg3buff, i); + DexPage_TileBuffer_FillCol(0x000, bg1buff, dstCol); + DexPage_TileBuffer_FillCol(0x000, bg2buff, dstCol); + DexPage_TileBuffer_FillCol(0x00C, bg3buff, dstCol); } else { - sub_81051AC(sp04, r4, bg1buff, i); - sub_81051AC(sp08, r4, bg2buff, i); - sub_81051AC(sp0C, r4, bg3buff, i); + DexPage_TileBuffer_CopyCol(bg1mem, srcCol, bg1buff, dstCol); + DexPage_TileBuffer_CopyCol(bg2mem, srcCol, bg2buff, dstCol); + DexPage_TileBuffer_CopyCol(bg3mem, srcCol, bg3buff, dstCol); } } CopyBgTilemapBufferToVram(1); @@ -2451,28 +2495,32 @@ bool8 sub_81051F0(u8 a0) return FALSE; } -static bool8 sub_81052D0(u8 a0) +/* + * Direction = 0: Left; 1: Right + */ +static bool8 DexScreen_FlipCategoryPageInDirection(u8 direction) { - u16 r4; + u16 color; if (IsNationalPokedexEnabled()) - r4 = gUnknown_84406E0[7]; + color = sNationalDexPalette[7]; else - r4 = gUnknown_84404C8[7]; - switch (gUnknown_203ACF0->field_02[0]) + color = sKantoDexPalette[7]; + switch (sPokedexScreenData->data[0]) { case 0: - gUnknown_203ACF0->field_5C = Alloc(3 * BG_SCREEN_SIZE); - if (a0) - gUnknown_203ACF0->field_02[0] = 6; + sPokedexScreenData->bgBufsMem = Alloc(3 * BG_SCREEN_SIZE); + if (direction) + sPokedexScreenData->data[0] = 6; else - gUnknown_203ACF0->field_02[0] = 2; + sPokedexScreenData->data[0] = 2; break; case 1: - Free(gUnknown_203ACF0->field_5C); + Free(sPokedexScreenData->bgBufsMem); return TRUE; + // Go left case 2: - BeginNormalPaletteFade(0x00007FFF, 0, 0, 16, r4); - gUnknown_203ACF0->field_02[0]++; + BeginNormalPaletteFade(0x00007FFF, 0, 0, 16, color); + sPokedexScreenData->data[0]++; break; case 3: FillBgTilemapBufferRect_Palette0(3, 0x00C, 0, 0, 30, 20); @@ -2481,128 +2529,141 @@ static bool8 sub_81052D0(u8 a0) CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(3); - gUnknown_203ACF0->field_02[0]++; + sPokedexScreenData->data[0]++; break; case 4: - BeginNormalPaletteFade(0x00007FFF, 0, 0, 0, r4); - sub_8104F0C(FALSE); - CpuFastCopy(GetBgTilemapBuffer(3), &gUnknown_203ACF0->field_5C[0 * BG_SCREEN_SIZE / 2], BG_SCREEN_SIZE); - CpuFastCopy(GetBgTilemapBuffer(2), &gUnknown_203ACF0->field_5C[1 * BG_SCREEN_SIZE / 2], BG_SCREEN_SIZE); - CpuFastCopy(GetBgTilemapBuffer(1), &gUnknown_203ACF0->field_5C[2 * BG_SCREEN_SIZE / 2], BG_SCREEN_SIZE); + BeginNormalPaletteFade(0x00007FFF, 0, 0, 0, color); + DexScreen_CreateCategoryListGfx(FALSE); + CpuFastCopy(GetBgTilemapBuffer(3), &sPokedexScreenData->bgBufsMem[0 * BG_SCREEN_SIZE / 2], BG_SCREEN_SIZE); + CpuFastCopy(GetBgTilemapBuffer(2), &sPokedexScreenData->bgBufsMem[1 * BG_SCREEN_SIZE / 2], BG_SCREEN_SIZE); + CpuFastCopy(GetBgTilemapBuffer(1), &sPokedexScreenData->bgBufsMem[2 * BG_SCREEN_SIZE / 2], BG_SCREEN_SIZE); FillBgTilemapBufferRect_Palette0(3, 0x00C, 0, 0, 30, 20); FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 32, 20); FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 32, 20); - - gUnknown_203ACF0->field_02[1] = 0; - gUnknown_203ACF0->field_02[0]++; + + sPokedexScreenData->data[1] = 0; + sPokedexScreenData->data[0]++; PlaySE(SE_BALL_TRAY_ENTER); break; case 5: - if (gUnknown_203ACF0->field_02[1] < 10) + if (sPokedexScreenData->data[1] < 10) { - sub_81051F0(gUnknown_203ACF0->field_02[1]); - gUnknown_203ACF0->field_02[1]++; + DexScreen_TurnCategoryPage_BgEffect(sPokedexScreenData->data[1]); + sPokedexScreenData->data[1]++; } else { - gUnknown_203ACF0->field_02[0] = 1; + sPokedexScreenData->data[0] = 1; } break; + // Go right case 6: - CpuFastCopy(GetBgTilemapBuffer(3), &gUnknown_203ACF0->field_5C[0 * BG_SCREEN_SIZE / 2], BG_SCREEN_SIZE); - CpuFastCopy(GetBgTilemapBuffer(2), &gUnknown_203ACF0->field_5C[1 * BG_SCREEN_SIZE / 2], BG_SCREEN_SIZE); - CpuFastCopy(GetBgTilemapBuffer(1), &gUnknown_203ACF0->field_5C[2 * BG_SCREEN_SIZE / 2], BG_SCREEN_SIZE); + CpuFastCopy(GetBgTilemapBuffer(3), &sPokedexScreenData->bgBufsMem[0 * BG_SCREEN_SIZE / 2], BG_SCREEN_SIZE); + CpuFastCopy(GetBgTilemapBuffer(2), &sPokedexScreenData->bgBufsMem[1 * BG_SCREEN_SIZE / 2], BG_SCREEN_SIZE); + CpuFastCopy(GetBgTilemapBuffer(1), &sPokedexScreenData->bgBufsMem[2 * BG_SCREEN_SIZE / 2], BG_SCREEN_SIZE); - gUnknown_203ACF0->field_02[1] = 9; - gUnknown_203ACF0->field_02[0]++; + sPokedexScreenData->data[1] = 9; + sPokedexScreenData->data[0]++; PlaySE(SE_BALL_TRAY_ENTER); break; case 7: - if (gUnknown_203ACF0->field_02[1] != 0) + if (sPokedexScreenData->data[1] != 0) { - sub_81051F0(gUnknown_203ACF0->field_02[1]); - gUnknown_203ACF0->field_02[1]--; + DexScreen_TurnCategoryPage_BgEffect(sPokedexScreenData->data[1]); + sPokedexScreenData->data[1]--; } else { - sub_81051F0(gUnknown_203ACF0->field_02[0]); - BeginNormalPaletteFade(0x00007FFF, 0, 16, 16, r4); - gUnknown_203ACF0->field_02[0]++; +#ifdef BUGFIX + DexScreen_TurnCategoryPage_BgEffect(0); +#else + DexScreen_TurnCategoryPage_BgEffect(sPokedexScreenData->data[0]); +#endif + BeginNormalPaletteFade(0x00007FFF, 0, 16, 16, color); + sPokedexScreenData->data[0]++; } break; case 8: gPaletteFade.bufferTransferDisabled = TRUE; - sub_8104F0C(FALSE); + DexScreen_CreateCategoryListGfx(FALSE); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(3); - gUnknown_203ACF0->field_02[0]++; + sPokedexScreenData->data[0]++; break; case 9: gPaletteFade.bufferTransferDisabled = FALSE; - BeginNormalPaletteFade(0x00007FFF, 0, 16, 0, r4); - gUnknown_203ACF0->field_02[0] = 1; + BeginNormalPaletteFade(0x00007FFF, 0, 16, 0, color); + sPokedexScreenData->data[0] = 1; break; } return FALSE; } -void sub_8105594(u8 a0, u8 a1) +// Scale from 0 to 6 +void DexScreen_DexPageZoomEffectFrame(u8 bg, u8 scale) { - u8 v0, v1, v2, v3; - s16 v4, v5, v6; - - if (!gUnknown_203ACF0->field_2C) + u8 tileLeft, tileTop, width, height; + s16 left, top, divY; + + if (!sPokedexScreenData->numMonsOnPage) { - v0 = gUnknown_8452334[0][0][2]; - v1 = gUnknown_8452334[0][0][3]; + tileLeft = sCategoryPageIconCoords[0][0][2]; + tileTop = sCategoryPageIconCoords[0][0][3]; } else { - v0 = gUnknown_8452334[gUnknown_203ACF0->field_2C - 1][gUnknown_203ACF0->field_2D][2]; - v1 = gUnknown_8452334[gUnknown_203ACF0->field_2C - 1][gUnknown_203ACF0->field_2D][3]; - } - - v2 = 6 + (a1 * 4); - v3 = 3 + (a1 * 2); - if (v2 >= 28) - v2 = 28; - if (v3 >= 14) - v3 = 14; - v4 = v0 - ((a1 * 4) / 2); - v5 = v1 - ((a1 * 2) / 2); - if ((v4 + v2 + 2) >= 30) - v4 -= ((v4 + v2 + 2) - 30); - else if (v4 < 0) - v4 = 0; - if ((v5 + v3 + 2) >= 18) - v5 -= ((v5 + v3 + 2) - 18); - else if (v5 < 2) - v5 = 2; - v6 = (v5 + 1) + ((v3 / 2) + 1); - - FillBgTilemapBufferRect_Palette0(a0, 4, v4, v5, 1, 1); - FillBgTilemapBufferRect_Palette0(a0, 5, v4 + 1, v5, v2, 1); - FillBgTilemapBufferRect_Palette0(a0, 1028, v4 + 1 + v2, v5, 1, 1); - - FillBgTilemapBufferRect_Palette0(a0, 10, v4, v5 + 1 + v3, 1, 1); - FillBgTilemapBufferRect_Palette0(a0, 11, v4 + 1, v5 + 1 + v3, v2, 1); - FillBgTilemapBufferRect_Palette0(a0, 1034, v4 + 1 + v2, v5 + 1 + v3, 1, 1); - - FillBgTilemapBufferRect_Palette0(a0, 6, v4, v5 + 1, 1, v6 - v5 - 1); - FillBgTilemapBufferRect_Palette0(a0, 7, v4, v6, 1, 1); - FillBgTilemapBufferRect_Palette0(a0, 9, v4, v6 + 1, 1, v5 + v3 - v6); - - FillBgTilemapBufferRect_Palette0(a0, 1030, v4 + 1 + v2, v5 + 1, 1, v6 - v5 - 1); - FillBgTilemapBufferRect_Palette0(a0, 1031, v4 + 1 + v2, v6, 1, 1); - FillBgTilemapBufferRect_Palette0(a0, 1033, v4 + 1 + v2, v6 + 1, 1, v5 + v3 - v6); - - FillBgTilemapBufferRect_Palette0(a0, 1, v4 + 1, v5 + 1, v2, v6 - v5 - 1); - FillBgTilemapBufferRect_Palette0(a0, 8, v4 + 1, v6, v2, 1); - FillBgTilemapBufferRect_Palette0(a0, 2, v4 + 1, v6 + 1, v2, v5 + v3 - v6); -} - -void sub_8105800(u8 a0, u16 species, u8 a2, u8 a3) + tileLeft = sCategoryPageIconCoords[sPokedexScreenData->numMonsOnPage - 1][sPokedexScreenData->categoryCursorPosInPage][2]; + tileTop = sCategoryPageIconCoords[sPokedexScreenData->numMonsOnPage - 1][sPokedexScreenData->categoryCursorPosInPage][3]; + } + + width = 6 + (scale * 4); + height = 3 + (scale * 2); + if (width >= 28) // Make sure it's not wider than the screen + width = 28; + if (height >= 14) // Make sure it's not taller than the screen + height = 14; + + left = tileLeft - ((scale * 4) / 2); + top = tileTop - ((scale * 2) / 2); + if ((left + width + 2) >= 30) // Don't wrap right... + left -= ((left + width + 2) - 30); + else if (left < 0) // ... left ... + left = 0; + if ((top + height + 2) >= 18) // ... down ... + top -= ((top + height + 2) - 18); + else if (top < 2) // or up. + top = 2; + + divY = (top + 1) + ((height / 2) + 1); // The horizontal divider + + // Top edge + FillBgTilemapBufferRect_Palette0(bg, 4, left, top, 1, 1); + FillBgTilemapBufferRect_Palette0(bg, 5, left + 1, top, width, 1); + FillBgTilemapBufferRect_Palette0(bg, BG_TILE_H_FLIP(4), left + 1 + width, top, 1, 1); + + // Bottom edge + FillBgTilemapBufferRect_Palette0(bg, 10, left, top + 1 + height, 1, 1); + FillBgTilemapBufferRect_Palette0(bg, 11, left + 1, top + 1 + height, width, 1); + FillBgTilemapBufferRect_Palette0(bg, BG_TILE_H_FLIP(10), left + 1 + width, top + 1 + height, 1, 1); + + // Left edge + FillBgTilemapBufferRect_Palette0(bg, 6, left, top + 1, 1, divY - top - 1); + FillBgTilemapBufferRect_Palette0(bg, 7, left, divY, 1, 1); + FillBgTilemapBufferRect_Palette0(bg, 9, left, divY + 1, 1, top + height - divY); + + // Right edge + FillBgTilemapBufferRect_Palette0(bg, BG_TILE_H_FLIP(6), left + 1 + width, top + 1, 1, divY - top - 1); + FillBgTilemapBufferRect_Palette0(bg, BG_TILE_H_FLIP(7), left + 1 + width, divY, 1, 1); + FillBgTilemapBufferRect_Palette0(bg, BG_TILE_H_FLIP(9), left + 1 + width, divY + 1, 1, top + height - divY); + + // Interior + FillBgTilemapBufferRect_Palette0(bg, 1, left + 1, top + 1, width, divY - top - 1); + FillBgTilemapBufferRect_Palette0(bg, 8, left + 1, divY, width, 1); + FillBgTilemapBufferRect_Palette0(bg, 2, left + 1, divY + 1, width, top + height - divY); +} + +void DexScreen_PrintMonCategory(u8 windowId, u16 species, u8 x, u8 y) { u8 * categoryName; u8 index, categoryStr[12]; @@ -2611,7 +2672,7 @@ void sub_8105800(u8 a0, u16 species, u8 a2, u8 a3) categoryName = (u8 *)gPokedexEntries[species].categoryName; index = 0; - if (sub_8104AB0(species, 1, 0)) + if (DexScreen_GetSetPokedexFlag(species, FLAG_GET_CAUGHT, FALSE)) { #if REVISION == 0 while ((categoryName[index] != CHAR_SPACE) && (index < 11)) @@ -2631,15 +2692,15 @@ void sub_8105800(u8 a0, u16 species, u8 a2, u8 a3) index++; } } - + categoryStr[index] = EOS; - sub_81047C8(a0, 0, categoryStr, a2, a3, 0); - a2 += GetStringWidth(0, categoryStr, 0); - sub_81047C8(a0, 0, gText_PokedexPokemon, a2, a3, 0); + DexScreen_AddTextPrinterParameterized(windowId, 0, categoryStr, x, y, 0); + x += GetStringWidth(0, categoryStr, 0); + DexScreen_AddTextPrinterParameterized(windowId, 0, gText_PokedexPokemon, x, y, 0); } -void sub_81058C4(u8 windowId, u16 species, u8 x, u8 y) +void DexScreen_PrintMonHeight(u8 windowId, u16 species, u8 x, u8 y) { u16 height; u32 inches, feet; @@ -2657,7 +2718,7 @@ void sub_81058C4(u8 windowId, u16 species, u8 x, u8 y) buffer[i++] = 5; buffer[i++] = CHAR_SPACE; - if (sub_8104AB0(species, FLAG_GET_CAUGHT, 0)) + if (DexScreen_GetSetPokedexFlag(species, FLAG_GET_CAUGHT, FALSE)) { inches = 10000 * height / 254; // actually tenths of inches here if (inches % 10 >= 5) @@ -2691,12 +2752,12 @@ void sub_81058C4(u8 windowId, u16 species, u8 x, u8 y) } buffer[i++] = EOS; - sub_81047C8(windowId, 0, labelText, x, y, 0); + DexScreen_AddTextPrinterParameterized(windowId, 0, labelText, x, y, 0); x += 30; - sub_81047C8(windowId, 0, buffer, x, y, 0); + DexScreen_AddTextPrinterParameterized(windowId, 0, buffer, x, y, 0); } -void sub_8105A3C(u8 windowId, u16 species, u8 x, u8 y) +void DexScreen_PrintMonWeight(u8 windowId, u16 species, u8 x, u8 y) { u16 weight; u32 lbs; @@ -2717,10 +2778,11 @@ void sub_8105A3C(u8 windowId, u16 species, u8 x, u8 y) buffer[i++] = EXT_CTRL_CODE_MIN_LETTER_SPACING; buffer[i++] = 5; - if (sub_8104AB0(species, FLAG_GET_CAUGHT, 0)) + if (DexScreen_GetSetPokedexFlag(species, FLAG_GET_CAUGHT, FALSE)) { - lbs = (weight * 100000) / 4536; + lbs = (weight * 100000) / 4536; // Convert to hundredths of lb + // Round up to the nearest 0.1 lb if (lbs % 10 >= 5) lbs += 10; @@ -2746,7 +2808,7 @@ void sub_8105A3C(u8 windowId, u16 species, u8 x, u8 y) output = TRUE; i++; } - + lbs %= 10000; if ((buffer[i] = (lbs / 1000) + CHAR_0) == CHAR_0 && !output) { @@ -2782,23 +2844,23 @@ void sub_8105A3C(u8 windowId, u16 species, u8 x, u8 y) buffer[i + j] = lbsText[j]; buffer[i + j] = EOS; - sub_81047C8(windowId, 0, labelText, x, y, 0); + DexScreen_AddTextPrinterParameterized(windowId, 0, labelText, x, y, 0); x += 30; - sub_81047C8(windowId, 0, buffer, x, y, 0); + DexScreen_AddTextPrinterParameterized(windowId, 0, buffer, x, y, 0); } -void sub_8105CB0(u8 a0, u16 species, u8 x, u8 y) +void DexScreen_PrintMonFlavorText(u8 windowId, u16 species, u8 x, u8 y) { struct TextPrinterTemplate printerTemplate; u16 length; - s32 v1; + s32 xCenter; species = SpeciesToNationalPokedexNum(species); - if (sub_8104AB0(species, 1, 0)) + if (DexScreen_GetSetPokedexFlag(species, FLAG_GET_CAUGHT, FALSE)) { printerTemplate.currentChar = gPokedexEntries[species].description; - printerTemplate.windowId = a0; + printerTemplate.windowId = windowId; printerTemplate.fontId = 2; printerTemplate.letterSpacing = 1; printerTemplate.lineSpacing = 0; @@ -2808,10 +2870,10 @@ void sub_8105CB0(u8 a0, u16 species, u8 x, u8 y) printerTemplate.shadowColor = 2; length = GetStringWidth(2, gPokedexEntries[species].description, 0); - v1 = x + (240 - length) / 2; + xCenter = x + (240 - length) / 2; - if (v1 > 0) - x = v1; + if (xCenter > 0) + x = xCenter; else x = 0; @@ -2824,257 +2886,281 @@ void sub_8105CB0(u8 a0, u16 species, u8 x, u8 y) } } -void sub_8105D64(u8 a0, u16 species, u8 a2, u8 a3) +void DexScreen_DrawMonFootprint(u8 windowId, u16 species, u8 x, u8 y) { - u16 i, j, unused, v3; - u8 v4, v5; + u16 i, j, unused, tileIdx; + u8 footprintPixel, footprintTile; u8 * buffer; u8 * footprint; - if (!(sub_8104AB0(species, 1, 1))) + if (!(DexScreen_GetSetPokedexFlag(species, FLAG_GET_CAUGHT, TRUE))) return; footprint = (u8 *)(gMonFootprintTable[species]); buffer = gDecompressionBuffer; unused = 0; - v3 = 0; + tileIdx = 0; + // Expand 1bpp to 4bpp for (i = 0; i < 32; i++) { - v4 = footprint[i]; - for (j = 0; j < 4; j++) + footprintPixel = footprint[i]; + for (j = 0; j < 8 / 2; j++) { - v5 = 0; - if (v4 & (1 << (j * 2))) - v5 |= 1; - if (v4 & (2 << (j * 2))) - v5 |= 16; - buffer[v3] = v5; - v3++; + footprintTile = 0; + if (footprintPixel & (1 << (j * 2))) + footprintTile |= 0x01; + if (footprintPixel & (2 << (j * 2))) + footprintTile |= 0x10; + buffer[tileIdx] = footprintTile; + tileIdx++; } } - BlitBitmapRectToWindow(a0, buffer, 0, 0, 16, 16, a2, a3, 16, 16); + BlitBitmapRectToWindow(windowId, buffer, 0, 0, 16, 16, x, y, 16, 16); } -u8 sub_8105E1C(bool8 a0) +static u8 DexScreen_DrawMonDexPage(bool8 justRegistered) { - sub_8105594(3, 6); + DexScreen_DexPageZoomEffectFrame(3, 6); FillBgTilemapBufferRect_Palette0(2, 0, 0, 0, 30, 20); FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 30, 20); FillBgTilemapBufferRect_Palette0(0, 0, 0, 2, 30, 16); - gUnknown_203ACF0->field_4A[0] = AddWindow(&gUnknown_84521D4); - gUnknown_203ACF0->field_4A[1] = AddWindow(&gUnknown_84521DC); - gUnknown_203ACF0->field_4A[2] = AddWindow(&gUnknown_84521E4); - - FillWindowPixelBuffer(gUnknown_203ACF0->field_4A[0], 0); - sub_81049FC(gUnknown_203ACF0->field_4A[0], gUnknown_203ACF0->field_5A, 144); - PutWindowTilemap(gUnknown_203ACF0->field_4A[0]); - CopyWindowToVram(gUnknown_203ACF0->field_4A[0], 2); - FillWindowPixelBuffer(gUnknown_203ACF0->field_4A[1], 0); - sub_8104A34(gUnknown_203ACF0->field_4A[1], 0, gUnknown_203ACF0->field_5A, 0, 8); - sub_81047C8(gUnknown_203ACF0->field_4A[1], 2, gSpeciesNames[gUnknown_203ACF0->field_5A], 28, 8, 0); - sub_8105800(gUnknown_203ACF0->field_4A[1], gUnknown_203ACF0->field_5A, 0, 24); - sub_81058C4(gUnknown_203ACF0->field_4A[1], gUnknown_203ACF0->field_5A, 0, 36); - sub_8105A3C(gUnknown_203ACF0->field_4A[1], gUnknown_203ACF0->field_5A, 0, 48); - sub_8105D64(gUnknown_203ACF0->field_4A[1], gUnknown_203ACF0->field_5A, 88, 40); - - PutWindowTilemap(gUnknown_203ACF0->field_4A[1]); - CopyWindowToVram(gUnknown_203ACF0->field_4A[1], 2); - FillWindowPixelBuffer(gUnknown_203ACF0->field_4A[2], 0); - sub_8105CB0(gUnknown_203ACF0->field_4A[2], gUnknown_203ACF0->field_5A, 0, 8); - PutWindowTilemap(gUnknown_203ACF0->field_4A[2]); - CopyWindowToVram(gUnknown_203ACF0->field_4A[2], 2); - FillWindowPixelBuffer(1, 255); - if (a0 == FALSE) - { - sub_81047C8(1, 0, gText_Cry, 8, 2, 4); - sub_8104C2C(gText_NextDataCancel); + sPokedexScreenData->windowIds[0] = AddWindow(&sWindowTemplate_DexEntry_MonPic); + sPokedexScreenData->windowIds[1] = AddWindow(&sWindowTemplate_DexEntry_SpeciesStats); + sPokedexScreenData->windowIds[2] = AddWindow(&sWindowTemplate_DexEntry_FlavorText); + + // Mon pic + FillWindowPixelBuffer(sPokedexScreenData->windowIds[0], PIXEL_FILL(0)); + DexScreen_LoadMonPicInWindow(sPokedexScreenData->windowIds[0], sPokedexScreenData->dexSpecies, 144); + PutWindowTilemap(sPokedexScreenData->windowIds[0]); + CopyWindowToVram(sPokedexScreenData->windowIds[0], COPYWIN_GFX); + + // Species stats + FillWindowPixelBuffer(sPokedexScreenData->windowIds[1], PIXEL_FILL(0)); + DexScreen_PrintMonDexNo(sPokedexScreenData->windowIds[1], 0, sPokedexScreenData->dexSpecies, 0, 8); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[1], 2, gSpeciesNames[sPokedexScreenData->dexSpecies], 28, 8, 0); + DexScreen_PrintMonCategory(sPokedexScreenData->windowIds[1], sPokedexScreenData->dexSpecies, 0, 24); + DexScreen_PrintMonHeight(sPokedexScreenData->windowIds[1], sPokedexScreenData->dexSpecies, 0, 36); + DexScreen_PrintMonWeight(sPokedexScreenData->windowIds[1], sPokedexScreenData->dexSpecies, 0, 48); + DexScreen_DrawMonFootprint(sPokedexScreenData->windowIds[1], sPokedexScreenData->dexSpecies, 88, 40); + PutWindowTilemap(sPokedexScreenData->windowIds[1]); + CopyWindowToVram(sPokedexScreenData->windowIds[1], COPYWIN_GFX); + + // Dex entry + FillWindowPixelBuffer(sPokedexScreenData->windowIds[2], PIXEL_FILL(0)); + DexScreen_PrintMonFlavorText(sPokedexScreenData->windowIds[2], sPokedexScreenData->dexSpecies, 0, 8); + PutWindowTilemap(sPokedexScreenData->windowIds[2]); + CopyWindowToVram(sPokedexScreenData->windowIds[2], COPYWIN_GFX); + + // Control info + FillWindowPixelBuffer(1, PIXEL_FILL(15)); + if (justRegistered == FALSE) + { + DexScreen_AddTextPrinterParameterized(1, 0, gText_Cry, 8, 2, 4); + DexScreen_PrintControlInfo(gText_NextDataCancel); } else - sub_8104C2C(gText_Next); + // Just registered + DexScreen_PrintControlInfo(gText_Next); PutWindowTilemap(1); - CopyWindowToVram(1, 2); + CopyWindowToVram(1, COPYWIN_GFX); return 1; } -u8 sub_8106014(void) +u8 RemoveDexPageWindows(void) { - sub_81047B0(&gUnknown_203ACF0->field_4A[0]); - sub_81047B0(&gUnknown_203ACF0->field_4A[1]); - sub_81047B0(&gUnknown_203ACF0->field_4A[2]); + DexScreen_RemoveWindow(&sPokedexScreenData->windowIds[0]); + DexScreen_RemoveWindow(&sPokedexScreenData->windowIds[1]); + DexScreen_RemoveWindow(&sPokedexScreenData->windowIds[2]); return 0; } -u8 sub_810603C(void) +u8 DexScreen_DrawMonAreaPage(void) { int i; - u8 v1, v2; - bool8 v3; - s16 v4, v5; + u8 width, height; + bool8 monIsCaught; + s16 left, top; u16 speciesId, species; - u16 v8; + u16 kantoMapVoff; - species = gUnknown_203ACF0->field_5A; + species = sPokedexScreenData->dexSpecies; speciesId = SpeciesToNationalPokedexNum(species); - v3 = sub_8104AB0(species, 1, 1); - v1 = 28; - v2 = 14; - v4 = 0; - v5 = 2; - - FillBgTilemapBufferRect_Palette0(3, 4, v4, v5, 1, 1); - FillBgTilemapBufferRect_Palette0(3, 1028, v4 + 1 + v1, v5, 1, 1); - FillBgTilemapBufferRect_Palette0(3, 2052, v4, v5 + 1 + v2, 1, 1); - FillBgTilemapBufferRect_Palette0(3, 3076, v4 + 1 + v1, v5 + 1 + v2, 1, 1); - FillBgTilemapBufferRect_Palette0(3, 5, v4 + 1, v5, v1, 1); - FillBgTilemapBufferRect_Palette0(3, 2053, v4 + 1, v5 + 1 + v2, v1, 1); - FillBgTilemapBufferRect_Palette0(3, 6, v4, v5 + 1, 1, v2); - FillBgTilemapBufferRect_Palette0(3, 1030, v4 + 1 + v1, v5 + 1, 1, v2); - FillBgTilemapBufferRect_Palette0(3, 1, v4 + 1, v5 + 1, v1, v2); + monIsCaught = DexScreen_GetSetPokedexFlag(species, FLAG_GET_CAUGHT, TRUE); + width = 28; + height = 14; + left = 0; + top = 2; + + FillBgTilemapBufferRect_Palette0(3, 4, left, top, 1, 1); + FillBgTilemapBufferRect_Palette0(3, BG_TILE_H_FLIP(4), left + 1 + width, top, 1, 1); + FillBgTilemapBufferRect_Palette0(3, BG_TILE_V_FLIP(4), left, top + 1 + height, 1, 1); + FillBgTilemapBufferRect_Palette0(3, BG_TILE_H_V_FLIP(4), left + 1 + width, top + 1 + height, 1, 1); + FillBgTilemapBufferRect_Palette0(3, 5, left + 1, top, width, 1); + FillBgTilemapBufferRect_Palette0(3, BG_TILE_V_FLIP(5), left + 1, top + 1 + height, width, 1); + FillBgTilemapBufferRect_Palette0(3, 6, left, top + 1, 1, height); + FillBgTilemapBufferRect_Palette0(3, BG_TILE_H_FLIP(6), left + 1 + width, top + 1, 1, height); + FillBgTilemapBufferRect_Palette0(3, 1, left + 1, top + 1, width, height); FillBgTilemapBufferRect_Palette0(0, 0, 0, 2, 30, 16); - v1 = 10; - v2 = 6; - v4 = 1; - v5 = 9; - - FillBgTilemapBufferRect_Palette0(0, 29, v4, v5, 1, 1); - FillBgTilemapBufferRect_Palette0(0, 1053, v4 + 1 + v1, v5, 1, 1); - FillBgTilemapBufferRect_Palette0(0, 2077, v4, v5 + 1 + v2, 1, 1); - FillBgTilemapBufferRect_Palette0(0, 3101, v4 + 1 + v1, v5 + 1 + v2, 1, 1); - FillBgTilemapBufferRect_Palette0(0, 30, v4 + 1, v5, v1, 1); - FillBgTilemapBufferRect_Palette0(0, 2078, v4 + 1, v5 + 1 + v2, v1, 1); - FillBgTilemapBufferRect_Palette0(0, 31, v4, v5 + 1, 1, v2); - FillBgTilemapBufferRect_Palette0(0, 1055, v4 + 1 + v1, v5 + 1, 1, v2); + width = 10; + height = 6; + left = 1; + top = 9; + + FillBgTilemapBufferRect_Palette0(0, 29, left, top, 1, 1); + FillBgTilemapBufferRect_Palette0(0, BG_TILE_H_FLIP(29), left + 1 + width, top, 1, 1); + FillBgTilemapBufferRect_Palette0(0, BG_TILE_V_FLIP(29), left, top + 1 + height, 1, 1); + FillBgTilemapBufferRect_Palette0(0, BG_TILE_H_V_FLIP(29), left + 1 + width, top + 1 + height, 1, 1); + FillBgTilemapBufferRect_Palette0(0, 30, left + 1, top, width, 1); + FillBgTilemapBufferRect_Palette0(0, BG_TILE_V_FLIP(30), left + 1, top + 1 + height, width, 1); + FillBgTilemapBufferRect_Palette0(0, 31, left, top + 1, 1, height); + FillBgTilemapBufferRect_Palette0(0, BG_TILE_H_FLIP(31), left + 1 + width, top + 1, 1, height); FillBgTilemapBufferRect_Palette0(2, 0, 0, 0, 30, 20); FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 30, 20); - gUnknown_203ACF0->field_64 = GetUnlockedSeviiAreas(); - v8 = 4; + sPokedexScreenData->unlockedSeviiAreas = GetUnlockedSeviiAreas(); + kantoMapVoff = 4; + // If any of the postgame islands are unlocked, Kanto map needs to be flush with the + // top of the screen. for (i = 3; i < 7; i++) - if ((gUnknown_203ACF0->field_64 >> i) & 1) - v8 = 0; - - gUnknown_203ACF0->field_4A[0] = AddWindow(&gUnknown_8452214); - CopyToWindowPixelBuffer(gUnknown_203ACF0->field_4A[0], (void *)gUnknown_8443620, 0, 0); - SetWindowAttribute(gUnknown_203ACF0->field_4A[0], 2, - GetWindowAttribute(gUnknown_203ACF0->field_4A[0], 2) + v8); - PutWindowTilemap(gUnknown_203ACF0->field_4A[0]); + if ((sPokedexScreenData->unlockedSeviiAreas >> i) & 1) + kantoMapVoff = 0; + + sPokedexScreenData->windowIds[0] = AddWindow(&sWindowTemplate_AreaMap_Kanto); + CopyToWindowPixelBuffer(sPokedexScreenData->windowIds[0], (void *)sTilemap_AreaMap_Kanto, 0, 0); + SetWindowAttribute(sPokedexScreenData->windowIds[0], WINDOW_TILEMAP_TOP, + GetWindowAttribute(sPokedexScreenData->windowIds[0], WINDOW_TILEMAP_TOP) + kantoMapVoff); + PutWindowTilemap(sPokedexScreenData->windowIds[0]); for (i = 0; i < 7; i++) - if ((gUnknown_203ACF0->field_64 >> i) & 1) - { - gUnknown_203ACF0->field_4A[i + 1] = AddWindow(gUnknown_8452254[i].window); - CopyToWindowPixelBuffer(gUnknown_203ACF0->field_4A[i + 1], gUnknown_8452254[i].tilemap, 0, 0); - SetWindowAttribute(gUnknown_203ACF0->field_4A[i + 1], 2, GetWindowAttribute(gUnknown_203ACF0->field_4A[i + 1], 2) + v8); - PutWindowTilemap(gUnknown_203ACF0->field_4A[i + 1]); - CopyWindowToVram(gUnknown_203ACF0->field_4A[i + 1], 2); - } - gUnknown_203ACF0->field_4A[8] = AddWindow(&gUnknown_84521F4); - gUnknown_203ACF0->field_4A[9] = AddWindow(&gUnknown_84521FC); - gUnknown_203ACF0->field_4A[10] = AddWindow(&gUnknown_8452204); - gUnknown_203ACF0->field_4A[11] = AddWindow(&gUnknown_84521EC); - gUnknown_203ACF0->field_4A[12] = AddWindow(&gUnknown_845220C); - FillWindowPixelBuffer(gUnknown_203ACF0->field_4A[11], 0); - sub_8107CD8(160, species); - sub_8107CF8(gUnknown_203ACF0->field_4A[11], species, sub_81049CC(species), 0, 0); - PutWindowTilemap(gUnknown_203ACF0->field_4A[11]); - CopyWindowToVram(gUnknown_203ACF0->field_4A[11], 2); - FillWindowPixelBuffer(gUnknown_203ACF0->field_4A[9], 0); - { - s32 width = GetStringWidth(0, gText_Size, 0); - sub_81047C8(gUnknown_203ACF0->field_4A[9], 0, gText_Size, (gUnknown_84521FC.width * 8 - width) / 2, 4, 0); - } - PutWindowTilemap(gUnknown_203ACF0->field_4A[9]); - CopyWindowToVram(gUnknown_203ACF0->field_4A[9], 2); - - FillWindowPixelBuffer(gUnknown_203ACF0->field_4A[10], 0); - { - s32 width = GetStringWidth(0, gText_Area, 0); - sub_81047C8(gUnknown_203ACF0->field_4A[10], 0, gText_Area, (gUnknown_8452204.width * 8 - width) / 2, 4, 0); - } - SetWindowAttribute(gUnknown_203ACF0->field_4A[10], 2, GetWindowAttribute(gUnknown_203ACF0->field_4A[10], 2) + v8); - PutWindowTilemap(gUnknown_203ACF0->field_4A[10]); - CopyWindowToVram(gUnknown_203ACF0->field_4A[10], 2); - FillWindowPixelBuffer(gUnknown_203ACF0->field_4A[8], 0); - sub_8104A34(gUnknown_203ACF0->field_4A[8], 0, species, 0, 0); - sub_81047C8(gUnknown_203ACF0->field_4A[8], 2, gSpeciesNames[species], 3, 12, 0); - PutWindowTilemap(gUnknown_203ACF0->field_4A[8]); - CopyWindowToVram(gUnknown_203ACF0->field_4A[8], 2); - FillWindowPixelBuffer(gUnknown_203ACF0->field_4A[12], 0); + if ((sPokedexScreenData->unlockedSeviiAreas >> i) & 1) + { + sPokedexScreenData->windowIds[i + 1] = AddWindow(sAreaMapStructs_SeviiIslands[i].window); + CopyToWindowPixelBuffer(sPokedexScreenData->windowIds[i + 1], sAreaMapStructs_SeviiIslands[i].tiles, 0, 0); + SetWindowAttribute(sPokedexScreenData->windowIds[i + 1], WINDOW_TILEMAP_TOP, GetWindowAttribute(sPokedexScreenData->windowIds[i + 1], WINDOW_TILEMAP_TOP) + kantoMapVoff); + PutWindowTilemap(sPokedexScreenData->windowIds[i + 1]); + CopyWindowToVram(sPokedexScreenData->windowIds[i + 1], COPYWIN_GFX); + } + sPokedexScreenData->windowIds[8] = AddWindow(&sWindowTemplate_AreaMap_SpeciesName); + sPokedexScreenData->windowIds[9] = AddWindow(&sWindowTemplate_AreaMap_Size); + sPokedexScreenData->windowIds[10] = AddWindow(&sWindowTemplate_AreaMap_Area); + sPokedexScreenData->windowIds[11] = AddWindow(&sWindowTemplate_AreaMap_MonIcon); + sPokedexScreenData->windowIds[12] = AddWindow(&sWindowTemplate_AreaMap_MonTypes); + + // Draw the mon icon + FillWindowPixelBuffer(sPokedexScreenData->windowIds[11], PIXEL_FILL(0)); + ListMenu_LoadMonIconPalette(160, species); + ListMenu_DrawMonIconGraphics(sPokedexScreenData->windowIds[11], species, DexScreen_GetDefaultPersonality(species), 0, 0); + PutWindowTilemap(sPokedexScreenData->windowIds[11]); + CopyWindowToVram(sPokedexScreenData->windowIds[11], COPYWIN_GFX); + + // Print "Size" + FillWindowPixelBuffer(sPokedexScreenData->windowIds[9], PIXEL_FILL(0)); + { + s32 strWidth = GetStringWidth(0, gText_Size, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[9], 0, gText_Size, (sWindowTemplate_AreaMap_Size.width * 8 - strWidth) / 2, 4, 0); + } + PutWindowTilemap(sPokedexScreenData->windowIds[9]); + CopyWindowToVram(sPokedexScreenData->windowIds[9], COPYWIN_GFX); + + // Print "Area" + FillWindowPixelBuffer(sPokedexScreenData->windowIds[10], PIXEL_FILL(0)); + { + s32 strWidth = GetStringWidth(0, gText_Area, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[10], 0, gText_Area, (sWindowTemplate_AreaMap_Area.width * 8 - strWidth) / 2, 4, 0); + } + SetWindowAttribute(sPokedexScreenData->windowIds[10], WINDOW_TILEMAP_TOP, GetWindowAttribute(sPokedexScreenData->windowIds[10], WINDOW_TILEMAP_TOP) + kantoMapVoff); + PutWindowTilemap(sPokedexScreenData->windowIds[10]); + CopyWindowToVram(sPokedexScreenData->windowIds[10], COPYWIN_GFX); + + // Print species name + FillWindowPixelBuffer(sPokedexScreenData->windowIds[8], PIXEL_FILL(0)); + DexScreen_PrintMonDexNo(sPokedexScreenData->windowIds[8], 0, species, 0, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[8], 2, gSpeciesNames[species], 3, 12, 0); + PutWindowTilemap(sPokedexScreenData->windowIds[8]); + CopyWindowToVram(sPokedexScreenData->windowIds[8], COPYWIN_GFX); + + // Type icons + FillWindowPixelBuffer(sPokedexScreenData->windowIds[12], PIXEL_FILL(0)); ListMenuLoadStdPalAt(176, 1); - if (v3) + if (monIsCaught) { - BlitMoveInfoIcon(gUnknown_203ACF0->field_4A[12], 1 + gBaseStats[species].type1, 0, 1); + BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gBaseStats[species].type1, 0, 1); if (gBaseStats[species].type1 != gBaseStats[species].type2) - BlitMoveInfoIcon(gUnknown_203ACF0->field_4A[12], 1 + gBaseStats[species].type2, 32, 1); + BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gBaseStats[species].type2, 32, 1); } - PutWindowTilemap(gUnknown_203ACF0->field_4A[12]); - CopyWindowToVram(gUnknown_203ACF0->field_4A[12], 2); + PutWindowTilemap(sPokedexScreenData->windowIds[12]); + CopyWindowToVram(sPokedexScreenData->windowIds[12], COPYWIN_GFX); + + // Show size comparison ResetAllPicSprites(); - LoadPalette(gUnknown_8452368, 288, 32); + LoadPalette(sPalette_Silhouette, 288, 32); - if (v3) + if (monIsCaught) { - gUnknown_203ACF0->field_4A[14] = CreateMonPicSprite_HandleDeoxys(species, 8, sub_81049CC(species), 1, 40, 104, 0, 65535); - gSprites[gUnknown_203ACF0->field_4A[14]].oam.paletteNum = 2; - gSprites[gUnknown_203ACF0->field_4A[14]].oam.affineMode = 1; - gSprites[gUnknown_203ACF0->field_4A[14]].oam.matrixNum = 2; - gSprites[gUnknown_203ACF0->field_4A[14]].oam.priority = 1; - gSprites[gUnknown_203ACF0->field_4A[14]].pos2.y = gPokedexEntries[speciesId].pokemonOffset; + sPokedexScreenData->windowIds[14] = CreateMonPicSprite_HandleDeoxys(species, 8, DexScreen_GetDefaultPersonality(species), TRUE, 40, 104, 0, 0xFFFF); + gSprites[sPokedexScreenData->windowIds[14]].oam.paletteNum = 2; + gSprites[sPokedexScreenData->windowIds[14]].oam.affineMode = 1; + gSprites[sPokedexScreenData->windowIds[14]].oam.matrixNum = 2; + gSprites[sPokedexScreenData->windowIds[14]].oam.priority = 1; + gSprites[sPokedexScreenData->windowIds[14]].pos2.y = gPokedexEntries[speciesId].pokemonOffset; SetOamMatrix(2, gPokedexEntries[speciesId].pokemonScale, 0, 0, gPokedexEntries[speciesId].pokemonScale); - gUnknown_203ACF0->field_4A[15] = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId_Debug(gSaveBlock2Ptr->playerGender, 1), 1, 80, 104, 0, 65535); - gSprites[gUnknown_203ACF0->field_4A[15]].oam.paletteNum = 2; - gSprites[gUnknown_203ACF0->field_4A[15]].oam.affineMode = 1; - gSprites[gUnknown_203ACF0->field_4A[15]].oam.matrixNum = 1; - gSprites[gUnknown_203ACF0->field_4A[15]].oam.priority = 1; - gSprites[gUnknown_203ACF0->field_4A[15]].pos2.y = gPokedexEntries[speciesId].trainerOffset; + sPokedexScreenData->windowIds[15] = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId_Debug(gSaveBlock2Ptr->playerGender, TRUE), 1, 80, 104, 0, 0xFFFF); + gSprites[sPokedexScreenData->windowIds[15]].oam.paletteNum = 2; + gSprites[sPokedexScreenData->windowIds[15]].oam.affineMode = 1; + gSprites[sPokedexScreenData->windowIds[15]].oam.matrixNum = 1; + gSprites[sPokedexScreenData->windowIds[15]].oam.priority = 1; + gSprites[sPokedexScreenData->windowIds[15]].pos2.y = gPokedexEntries[speciesId].trainerOffset; SetOamMatrix(1, gPokedexEntries[speciesId].trainerScale, 0, 0, gPokedexEntries[speciesId].trainerScale); } else { - gUnknown_203ACF0->field_4A[14] = 0xff; - gUnknown_203ACF0->field_4A[15] = 0xff; + sPokedexScreenData->windowIds[14] = 0xff; + sPokedexScreenData->windowIds[15] = 0xff; } - gUnknown_203ACF0->field_02[2] = sub_8134230(species, 2001, 3, v8 * 8); - if (!(sub_81344E0(gUnknown_203ACF0->field_02[2]))) + // Create the area markers + sPokedexScreenData->data[2] = Ctor_PokedexAreaMarkers(species, 2001, 3, kantoMapVoff * 8); + if (!(PokedexAreaMarkers_Any(sPokedexScreenData->data[2]))) { - BlitBitmapRectToWindow(gUnknown_203ACF0->field_4A[0], (void *)gUnknown_8443D00, 0, 0, 88, 16, 4, 28, 88, 16); + BlitBitmapRectToWindow(sPokedexScreenData->windowIds[0], (void *)sBlitTiles_WideEllipse, 0, 0, 88, 16, 4, 28, 88, 16); { - s32 width = GetStringWidth(0, gText_AreaUnknown, 0); - sub_81047C8(gUnknown_203ACF0->field_4A[0], 0, gText_AreaUnknown, (96 - width) / 2, 29, 0); + s32 strWidth = GetStringWidth(0, gText_AreaUnknown, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[0], 0, gText_AreaUnknown, (96 - strWidth) / 2, 29, 0); } } - CopyWindowToVram(gUnknown_203ACF0->field_4A[0], 2); - FillWindowPixelBuffer(1, 255); - sub_81047C8(1, 0, gText_Cry, 8, 2, 4); - sub_8104C2C(gText_CancelPreviousData); + CopyWindowToVram(sPokedexScreenData->windowIds[0], COPYWIN_GFX); + + // Draw the control info + FillWindowPixelBuffer(1, PIXEL_FILL(15)); + DexScreen_AddTextPrinterParameterized(1, 0, gText_Cry, 8, 2, 4); + DexScreen_PrintControlInfo(gText_CancelPreviousData); PutWindowTilemap(1); - CopyWindowToVram(1, 2); + CopyWindowToVram(1, COPYWIN_GFX); return 1; } -u8 sub_81067C0(void) +u8 DexScreen_DestroyAreaScreenResources(void) { int i; - sub_81343F4(gUnknown_203ACF0->field_02[2]); + Dtor_PokedexAreaMarkers(sPokedexScreenData->data[2]); for (i = 0; i < 13; i++) - sub_81047B0(&gUnknown_203ACF0->field_4A[i]); - if (gUnknown_203ACF0->field_4A[15] != 0xff) - FreeAndDestroyTrainerPicSprite(gUnknown_203ACF0->field_4A[15]); - if (gUnknown_203ACF0->field_4A[14] != 0xff) - FreeAndDestroyMonPicSprite(gUnknown_203ACF0->field_4A[14]); + DexScreen_RemoveWindow(&sPokedexScreenData->windowIds[i]); + if (sPokedexScreenData->windowIds[15] != 0xff) + FreeAndDestroyTrainerPicSprite(sPokedexScreenData->windowIds[15]); + if (sPokedexScreenData->windowIds[14] != 0xff) + FreeAndDestroyMonPicSprite(sPokedexScreenData->windowIds[14]); return 0; } -int sub_8106810(u16 species) +static int DexScreen_CanShowMonInDex(u16 species) { if (IsNationalPokedexEnabled() == TRUE) return TRUE; @@ -3083,7 +3169,7 @@ int sub_8106810(u16 species) return FALSE; } -u8 sub_8106838(u8 categoryNum, u8 pageNum) +static u8 DexScreen_IsPageUnlocked(u8 categoryNum, u8 pageNum) { int i, count; u16 species; @@ -3095,14 +3181,14 @@ u8 sub_8106838(u8 categoryNum, u8 pageNum) if (i < count) { species = gDexCategories[categoryNum].page[pageNum].species[i]; - if (sub_8106810(species) == TRUE && sub_8104AB0(species, 0, 1)) - return 1; + if (DexScreen_CanShowMonInDex(species) == TRUE && DexScreen_GetSetPokedexFlag(species, FLAG_GET_SEEN, TRUE)) + return TRUE; } } - return 0; + return FALSE; } -u8 sub_81068A0(u8 categoryNum) +static bool8 DexScreen_IsCategoryUnlocked(u8 categoryNum) { int i; u8 count; @@ -3110,67 +3196,67 @@ u8 sub_81068A0(u8 categoryNum) count = gDexCategories[categoryNum].count; for (i = 0; i < count; i++) - if (sub_8106838(categoryNum, i)) + if (DexScreen_IsPageUnlocked(categoryNum, i)) return 1; return 0; } -void sub_81068DC(u8 categoryNum, u8 pageNum) +void DexScreen_CreateCategoryPageSpeciesList(u8 categoryNum, u8 pageNum) { int i, count; u16 species; count = gDexCategories[categoryNum].page[pageNum].count; - gUnknown_203ACF0->field_2C = 0; + sPokedexScreenData->numMonsOnPage = 0; for (i = 0; i < 4; i++) - gUnknown_203ACF0->field_18[i] = 0xffff; + sPokedexScreenData->pageSpecies[i] = 0xffff; for (i = 0; i < count; i++) { species = gDexCategories[categoryNum].page[pageNum].species[i]; - if (sub_8106810(species) == TRUE && sub_8104AB0(species, 0, 1)) + if (DexScreen_CanShowMonInDex(species) == TRUE && DexScreen_GetSetPokedexFlag(species, FLAG_GET_SEEN, TRUE)) { - gUnknown_203ACF0->field_18[gUnknown_203ACF0->field_2C] = gDexCategories[categoryNum].page[pageNum].species[i]; - gUnknown_203ACF0->field_2C++; + sPokedexScreenData->pageSpecies[sPokedexScreenData->numMonsOnPage] = gDexCategories[categoryNum].page[pageNum].species[i]; + sPokedexScreenData->numMonsOnPage++; } } } -u8 sub_810699C(u8 category) +static u8 DexScreen_GetPageLimitsForCategory(u8 category) { int i; - u8 count, v2, v3; + u8 count, firstPage, lastPage; count = gDexCategories[category].count; - v2 = 0xff; - v3 = 0xff; + firstPage = 0xff; + lastPage = 0xff; for (i = 0; i < count; i++) - if (sub_8106838(category, i)) + if (DexScreen_IsPageUnlocked(category, i)) { - if (v2 == 0xff) - v2 = i; - v3 = i; + if (firstPage == 0xff) + firstPage = i; + lastPage = i; } - if (v3 != 0xff) + if (lastPage != 0xff) { - gUnknown_203ACF0->field_29 = v2; - gUnknown_203ACF0->field_2A = v3 + 1; - return 0; + sPokedexScreenData->firstPageInCategory = firstPage; + sPokedexScreenData->lastPageInCategory = lastPage + 1; + return FALSE; } else { - gUnknown_203ACF0->field_29 = 0; - gUnknown_203ACF0->field_2A = 0; - return 1; + sPokedexScreenData->firstPageInCategory = 0; + sPokedexScreenData->lastPageInCategory = 0; + return TRUE; } } -u8 sub_8106A20(u16 a0) +static u8 DexScreen_LookUpCategoryBySpecies(u16 species) { - int i, j, k, categoryCount, categoryPageCount, v5; - u16 species; + int i, j, k, categoryCount, categoryPageCount, posInPage; + u16 dexSpecies; for (i = 0; i < NELEMS(gDexCategories); i++) { @@ -3178,84 +3264,84 @@ u8 sub_8106A20(u16 a0) for (j = 0; j < categoryCount; j++) { categoryPageCount = gDexCategories[i].page[j].count; - for (k = 0, v5 = 0; k < categoryPageCount; k++) + for (k = 0, posInPage = 0; k < categoryPageCount; k++) { - species = gDexCategories[i].page[j].species[k]; - if (a0 == species) + dexSpecies = gDexCategories[i].page[j].species[k]; + if (species == dexSpecies) { - gUnknown_203ACF0->field_28 = i; - gUnknown_203ACF0->field_2B = j; - gUnknown_203ACF0->field_2D = v5; - return 0; + sPokedexScreenData->category = i; + sPokedexScreenData->pageNum = j; + sPokedexScreenData->categoryCursorPosInPage = posInPage; + return FALSE; } - if (sub_8106810(species) == TRUE && sub_8104AB0(species, 0, 1)) - v5++; + if (DexScreen_CanShowMonInDex(dexSpecies) == TRUE && DexScreen_GetSetPokedexFlag(dexSpecies, FLAG_GET_SEEN, TRUE)) + posInPage++; } } } - return 1; + return TRUE; } -u8 sub_8106AF8(u16 a0) +static u8 DexScreen_PageNumberToRenderablePages(u16 page) { - int i, v1; + int i, count; - for (i = 0, v1 = 0; i < a0; i++) - if (sub_8106838(gUnknown_203ACF0->field_28, i)) - v1++; + for (i = 0, count = 0; i < page; i++) + if (DexScreen_IsPageUnlocked(sPokedexScreenData->category, i)) + count++; - return v1 + 1; + return count + 1; } -void sub_8106B34(void) +void DexScreen_InputHandler_StartToCry(void) { if (JOY_NEW(START_BUTTON)) - PlayCry2(gUnknown_203ACF0->field_5A, 0, 125, 10); + PlayCry2(sPokedexScreenData->dexSpecies, 0, 125, 10); } -u8 sub_8106B60(u16 species) +u8 DexScreen_RegisterMonToPokedex(u16 species) { - sub_8104AB0(species, 2, 1); - sub_8104AB0(species, 3, 1); + DexScreen_GetSetPokedexFlag(species, FLAG_SET_SEEN, TRUE); + DexScreen_GetSetPokedexFlag(species, FLAG_SET_CAUGHT, TRUE); if (!IsNationalPokedexEnabled() && SpeciesToNationalPokedexNum(species) > KANTO_DEX_COUNT) - return CreateTask(sub_8106BD8, 0); + return CreateTask(Task_DexScreen_RegisterNonKantoMonBeforeNationalDex, 0); - sub_810250C(); - gTasks[gUnknown_203ACF0->field_00].func = sub_8106BE8; - sub_8106A20(species); + DexScreen_LoadResources(); + gTasks[sPokedexScreenData->taskId].func = Task_DexScreen_RegisterMonToPokedex; + DexScreen_LookUpCategoryBySpecies(species); - return gUnknown_203ACF0->field_00; + return sPokedexScreenData->taskId; } -static void sub_8106BD8(u8 taskId) +static void Task_DexScreen_RegisterNonKantoMonBeforeNationalDex(u8 taskId) { DestroyTask(taskId); } -static void sub_8106BE8(u8 taskId) +static void Task_DexScreen_RegisterMonToPokedex(u8 taskId) { - switch (gUnknown_203ACF0->field_01) + switch (sPokedexScreenData->state) { case 0: - sub_810699C(gUnknown_203ACF0->field_28); - if (gUnknown_203ACF0->field_2B < gUnknown_203ACF0->field_29) - gUnknown_203ACF0->field_2B = gUnknown_203ACF0->field_29; - gUnknown_203ACF0->field_01 = 3; + DexScreen_GetPageLimitsForCategory(sPokedexScreenData->category); + if (sPokedexScreenData->pageNum < sPokedexScreenData->firstPageInCategory) + sPokedexScreenData->pageNum = sPokedexScreenData->firstPageInCategory; + sPokedexScreenData->state = 3; break; case 1: - sub_8106014(); - sub_8104E90(); + RemoveDexPageWindows(); + DexScreen_DestroyCategoryPageMonIconAndInfoWindows(); gMain.state = 0; - gUnknown_203ACF0->field_01 = 2; + sPokedexScreenData->state = 2; break; case 2: - if (sub_8102798()) + if (DoClosePokedex()) DestroyTask(taskId); break; case 3: - sub_8104F0C(1); + DexScreen_CreateCategoryListGfx(TRUE); PutWindowTilemap(0); PutWindowTilemap(1); @@ -3264,9 +3350,9 @@ static void sub_8106BE8(u8 taskId) CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - sub_8105058(0xff); + DexScreen_CreateCategoryPageSelectionCursor(0xff); - gUnknown_203ACF0->field_01 = 4; + sPokedexScreenData->state = 4; break; case 4: gPaletteFade.bufferTransferDisabled = 0; @@ -3276,49 +3362,49 @@ static void sub_8106BE8(u8 taskId) ShowBg(1); ShowBg(0); - gUnknown_203ACF0->field_01 = 5; + sPokedexScreenData->state = 5; break; case 5: gTasks[taskId].data[0] = 30; - gUnknown_203ACF0->field_61 = ListMenuAddCursorObjectInternal(&gUnknown_84524C4, 0); - gUnknown_203ACF0->field_01 = 6; + sPokedexScreenData->categoryPageCursorTaskId = ListMenuAddCursorObjectInternal(&sCursorStruct_CategoryPage, 0); + sPokedexScreenData->state = 6; break; case 6: - sub_8105058(gUnknown_203ACF0->field_2D); - sub_8105178(gUnknown_203ACF0->field_61, gUnknown_203ACF0->field_2D, gUnknown_203ACF0->field_2C); + DexScreen_CreateCategoryPageSelectionCursor(sPokedexScreenData->categoryCursorPosInPage); + DexScreen_UpdateCategoryPageCursorObject(sPokedexScreenData->categoryPageCursorTaskId, sPokedexScreenData->categoryCursorPosInPage, sPokedexScreenData->numMonsOnPage); if (gTasks[taskId].data[0]) gTasks[taskId].data[0]--; else { - ListMenuRemoveCursorObject(gUnknown_203ACF0->field_61, 0); - gUnknown_203ACF0->field_01 = 7; + ListMenuRemoveCursorObject(sPokedexScreenData->categoryPageCursorTaskId, 0); + sPokedexScreenData->state = 7; } break; case 7: - gUnknown_203ACF0->field_5A = gUnknown_203ACF0->field_18[gUnknown_203ACF0->field_2D]; - gUnknown_203ACF0->field_01 = 8; + sPokedexScreenData->dexSpecies = sPokedexScreenData->pageSpecies[sPokedexScreenData->categoryCursorPosInPage]; + sPokedexScreenData->state = 8; break; case 8: - sub_8105E1C(1); - gUnknown_203ACF0->field_01 = 9; + DexScreen_DrawMonDexPage(TRUE); + sPokedexScreenData->state = 9; break; case 9: - gUnknown_203ACF0->field_02[0] = 0; - gUnknown_203ACF0->field_02[1] = 0; - gUnknown_203ACF0->field_01++; + sPokedexScreenData->data[0] = 0; + sPokedexScreenData->data[1] = 0; + sPokedexScreenData->state++; case 10: - if (gUnknown_203ACF0->field_02[1] < 6) + if (sPokedexScreenData->data[1] < 6) { - if (gUnknown_203ACF0->field_02[0]) + if (sPokedexScreenData->data[0]) { - sub_8105594(0, gUnknown_203ACF0->field_02[1]); + DexScreen_DexPageZoomEffectFrame(0, sPokedexScreenData->data[1]); CopyBgTilemapBufferToVram(0); - gUnknown_203ACF0->field_02[0] = 4; - gUnknown_203ACF0->field_02[1]++; + sPokedexScreenData->data[0] = 4; + sPokedexScreenData->data[1]++; } else - gUnknown_203ACF0->field_02[0]--; + sPokedexScreenData->data[0]--; } else { @@ -3328,35 +3414,35 @@ static void sub_8106BE8(u8 taskId) CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - PlayCry2(gUnknown_203ACF0->field_5A, 0, 125, 10); - gUnknown_203ACF0->field_02[0] = 0; - gUnknown_203ACF0->field_01 = 11; + PlayCry2(sPokedexScreenData->dexSpecies, 0, 125, 10); + sPokedexScreenData->data[0] = 0; + sPokedexScreenData->state = 11; } break; case 11: if (JOY_NEW(A_BUTTON | B_BUTTON)) - gUnknown_203ACF0->field_01 = 2; + sPokedexScreenData->state = 2; break; } } -void sub_8106E78(const u8 * str, s32 mode) +void DexScreen_PrintStringWithAlignment(const u8 * str, s32 mode) { u32 x; switch (mode) { - case 0: + case TEXT_LEFT: x = 8; break; - case 1: + case TEXT_CENTER: x = (u32)(240 - GetStringWidth(2, str, 0)) / 2; break; - case 2: + case TEXT_RIGHT: default: x = 232 - GetStringWidth(2, str, 0); break; } - sub_81047C8(0, 2, str, x, 2, 4); + DexScreen_AddTextPrinterParameterized(0, 2, str, x, 2, 4); } diff --git a/src/task.c b/src/task.c index 83800a440..672d200fe 100644 --- a/src/task.c +++ b/src/task.c @@ -139,32 +139,20 @@ void TaskDummy(u8 taskId) { } -#define TASK_DATA_OP(taskId, offset, op) \ -{ \ - u32 tasksAddr = (u32)gTasks; \ - u32 addr = taskId * sizeof(struct Task) + offset; \ - u32 dataAddr = tasksAddr + offsetof(struct Task, data); \ - addr += dataAddr; \ - op; \ -} - void SetTaskFuncWithFollowupFunc(u8 taskId, TaskFunc func, TaskFunc followupFunc) { - TASK_DATA_OP(taskId, 28, *((u16 *)addr) = (u32)followupFunc) - TASK_DATA_OP(taskId, 30, *((u16 *)addr) = (u32)followupFunc >> 16) + u8 followupFuncIndex = NUM_TASK_DATA - 2; // Should be const. + + gTasks[taskId].data[followupFuncIndex] = (s16)((u32)followupFunc); + gTasks[taskId].data[followupFuncIndex + 1] = (s16)((u32)followupFunc >> 16); // Store followupFunc as two half-words in the data array. gTasks[taskId].func = func; } void SwitchTaskToFollowupFunc(u8 taskId) { - s32 func; - - gTasks[taskId].func = NULL; - - TASK_DATA_OP(taskId, 28, func = *((u16 *)addr)) - TASK_DATA_OP(taskId, 30, func |= *((s16 *)addr) << 16) + u8 followupFuncIndex = NUM_TASK_DATA - 2; // Should be const. - gTasks[taskId].func = (TaskFunc)func; + gTasks[taskId].func = (TaskFunc)((u16)(gTasks[taskId].data[followupFuncIndex]) | (gTasks[taskId].data[followupFuncIndex + 1] << 16)); } bool8 FuncIsActiveTask(TaskFunc func) diff --git a/src/trainer_tower.c b/src/trainer_tower.c index b39782297..fe45a2938 100644 --- a/src/trainer_tower.c +++ b/src/trainer_tower.c @@ -19,13 +19,13 @@ #include "constants/event_objects.h" #include "constants/trainer_tower.h" -#define CURR_FLOOR sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx] +#define CURR_FLOOR sTrainerTowerState->data.floors[sTrainerTowerState->floorIdx] #define TRAINER_TOWER gSaveBlock1Ptr->trainerTower[gSaveBlock1Ptr->towerChallengeId] -struct UnkStruct_203F458 +struct TrainerTowerState { /* 0x0000 */ u8 floorIdx; - /* 0x0004 */ struct EReaderTrainerTowerSet unk_0004; + /* 0x0004 */ struct EReaderTrainerTowerSet data; }; struct TrainerTowerOpponent @@ -37,7 +37,7 @@ struct TrainerTowerOpponent /* 0x30 */ u16 speechLose2[6]; /* 0x3C */ u8 battleType; /* 0x3D */ u8 facilityClass; - /* 0x3E */ u8 gender; + /* 0x3E */ u8 textColor; }; struct SinglesTrainerInfo @@ -62,7 +62,7 @@ struct TrainerEncounterMusicPairs u8 musicId; }; -static EWRAM_DATA struct UnkStruct_203F458 * sTrainerTowerState = NULL; +static EWRAM_DATA struct TrainerTowerState * sTrainerTowerState = NULL; static EWRAM_DATA struct TrainerTowerOpponent * sTrainerTowerOpponent = NULL; static EWRAM_DATA u8 sUnused_203F460 = 0; @@ -310,8 +310,15 @@ static const struct TrainerEncounterMusicPairs sTrainerEncounterMusicLUT[105] = }; static const struct WindowTemplate sTimeBoardWindowTemplate[] = { - {0, 3, 1, 27, 18, 15, 0x001}, - DUMMY_WIN_TEMPLATE + { + .bg = 0, + .tilemapLeft = 3, + .tilemapTop = 1, + .width = 27, + .height = 18, + .paletteNum = 15, + .baseBlock = 0x001 + }, DUMMY_WIN_TEMPLATE }; static const u32 sUnused_847A228 = 0x70; @@ -389,41 +396,44 @@ static const u16 sTrainerTowerEncounterMusic[] = { [TRAINER_ENCOUNTER_MUSIC_RICH] = MUS_ENCOUNTER_BOY }; -static const u8 sSingleBattleChallengeMonIdxs[][2] = { - {0x00, 0x02}, - {0x01, 0x03}, - {0x02, 0x04}, - {0x03, 0x05}, - {0x04, 0x01}, - {0x05, 0x02}, - {0x00, 0x03}, - {0x01, 0x04} +// The trainer only uses two Pokemon from the encoded pool, based on the current floor +static const u8 sSingleBattleChallengeMonIdxs[MAX_TRAINER_TOWER_FLOORS][2] = { + {0, 2}, + {1, 3}, + {2, 4}, + {3, 5}, + {4, 1}, + {5, 2}, + {0, 3}, + {1, 4} }; -static const u8 sDoubleBattleChallengeMonIdxs[][2] = { - {0x00, 0x01}, - {0x01, 0x03}, - {0x02, 0x00}, - {0x03, 0x04}, - {0x04, 0x02}, - {0x05, 0x02}, - {0x00, 0x03}, - {0x01, 0x05} +// Each trainer only uses one Pokemon from the encoded pool, based on the current floor +static const u8 sDoubleBattleChallengeMonIdxs[MAX_TRAINER_TOWER_FLOORS][2] = { + {0, 1}, + {1, 3}, + {2, 0}, + {3, 4}, + {4, 2}, + {5, 2}, + {0, 3}, + {1, 5} }; -static const u8 sKnockoutChallengeMonIdxs[][3] = { - {0x00, 0x02, 0x04}, - {0x01, 0x03, 0x05}, - {0x02, 0x03, 0x01}, - {0x03, 0x04, 0x00}, - {0x04, 0x01, 0x02}, - {0x05, 0x00, 0x03}, - {0x00, 0x05, 0x02}, - {0x01, 0x04, 0x05} +// Each trainer only uses one Pokemon from the encoded pool, based on the current floor +static const u8 sKnockoutChallengeMonIdxs[MAX_TRAINER_TOWER_FLOORS][3] = { + {0, 2, 4}, + {1, 3, 5}, + {2, 3, 1}, + {3, 4, 0}, + {4, 1, 2}, + {5, 0, 3}, + {0, 5, 2}, + {1, 4, 5} }; -extern const struct EReaderTrainerTowerSetSubstruct gUnknown_84827AC; -extern const struct TrainerTowerFloor *const gUnknown_84827B4[][MAX_TRAINER_TOWER_FLOORS]; +extern const struct EReaderTrainerTowerSetSubstruct gTrainerTowerLocalHeader; +extern const struct TrainerTowerFloor *const gTrainerTowerFloors[][MAX_TRAINER_TOWER_FLOORS]; void CallTrainerTowerFunc(void) { @@ -471,7 +481,7 @@ void InitTrainerTowerBattleStruct(void) sTrainerTowerOpponent->battleType = CURR_FLOOR.challengeType; sTrainerTowerOpponent->facilityClass = CURR_FLOOR.trainers[trainerId].facilityClass; - sTrainerTowerOpponent->gender = CURR_FLOOR.trainers[trainerId].gender; + sTrainerTowerOpponent->textColor = CURR_FLOOR.trainers[trainerId].textColor; SetVBlankCounter1Ptr(&TRAINER_TOWER.timer); FreeTrainerTowerDataStruct(); } @@ -504,24 +514,24 @@ void GetTrainerTowerOpponentLoseText(u8 *dest, u8 opponentIdx) static void SetUpTrainerTowerDataStruct(void) { u32 challengeType = gSaveBlock1Ptr->towerChallengeId; - s32 r4; - const struct TrainerTowerFloor *const * r7; + s32 i; + const struct TrainerTowerFloor *const * floors_p; sTrainerTowerState = AllocZeroed(sizeof(*sTrainerTowerState)); sTrainerTowerState->floorIdx = gMapHeader.mapLayoutId - LAYOUT_TRAINER_TOWER_1F; if (ReadTrainerTowerAndValidate() == TRUE) - CEReaderTool_LoadTrainerTower(&sTrainerTowerState->unk_0004); + CEReaderTool_LoadTrainerTower(&sTrainerTowerState->data); else { - struct UnkStruct_203F458 * r0_ = sTrainerTowerState; - const struct EReaderTrainerTowerSetSubstruct * r1 = &gUnknown_84827AC; - memcpy(&r0_->unk_0004, r1, sizeof(struct EReaderTrainerTowerSetSubstruct)); - r7 = gUnknown_84827B4[challengeType]; - for (r4 = 0; r4 < MAX_TRAINER_TOWER_FLOORS; r4++) + struct TrainerTowerState * ttstate_p = sTrainerTowerState; + const struct EReaderTrainerTowerSetSubstruct * header_p = &gTrainerTowerLocalHeader; + memcpy(&ttstate_p->data, header_p, sizeof(struct EReaderTrainerTowerSetSubstruct)); + floors_p = gTrainerTowerFloors[challengeType]; + for (i = 0; i < MAX_TRAINER_TOWER_FLOORS; i++) { - *(sTrainerTowerState->unk_0004.floors + r4) = *(r7[r4]); // manual pointer arithmetic needed to match + *(sTrainerTowerState->data.floors + i) = *(floors_p[i]); // manual pointer arithmetic needed to match } - sTrainerTowerState->unk_0004.checksum = CalcByteArraySum((void *)sTrainerTowerState->unk_0004.floors, sizeof(sTrainerTowerState->unk_0004.floors)); + sTrainerTowerState->data.checksum = CalcByteArraySum((void *)sTrainerTowerState->data.floors, sizeof(sTrainerTowerState->data.floors)); ValidateOrResetCurTrainerTowerRecord(); } } @@ -533,7 +543,7 @@ static void FreeTrainerTowerDataStruct(void) static void InitTrainerTowerFloor(void) { - if (gMapHeader.mapLayoutId - LAYOUT_TRAINER_TOWER_LOBBY > sTrainerTowerState->unk_0004.numFloors) + if (gMapHeader.mapLayoutId - LAYOUT_TRAINER_TOWER_LOBBY > sTrainerTowerState->data.numFloors) { gSpecialVar_Result = 3; // Skip past usable challenge types SetCurrentMapLayout(LAYOUT_TRAINER_TOWER_ROOF); @@ -620,17 +630,21 @@ static void SetTrainerTowerNPCGraphics(void) static void TT_ConvertEasyChatMessageToString(u16 *ecWords, u8 *dest) { - s32 r1; + s32 i; ConvertEasyChatWordsToString(dest, ecWords, 3, 2); if ((unsigned)GetStringWidth(2, dest, -1) > 196) { + // Has to be printed 2x3 ConvertEasyChatWordsToString(dest, ecWords, 2, 3); - r1 = 0; - while (dest[r1++] != CHAR_NEWLINE) + // Skip line 1 + i = 0; + while (dest[i++] != CHAR_NEWLINE) ; - while (dest[r1] != CHAR_NEWLINE) - r1++; - dest[r1] = CHAR_PROMPT_SCROLL; + // Skip line 2 + while (dest[i] != CHAR_NEWLINE) + i++; + // Replace \n with \l at the end of line 2 + dest[i] = CHAR_PROMPT_SCROLL; } } @@ -784,7 +798,7 @@ static void GetOwnerState(void) static void GiveChallengePrize(void) { - u16 itemId = sPrizeList[sTrainerTowerState->unk_0004.floors->prize]; + u16 itemId = sPrizeList[sTrainerTowerState->data.floors->prize]; if (TRAINER_TOWER.receivedPrize) { @@ -891,15 +905,15 @@ static void ShowResultsBoard(void) windowId = AddWindow(sTimeBoardWindowTemplate); LoadStdWindowFrameGfx(); DrawStdWindowFrame(windowId, FALSE); - AddTextPrinterParameterized(windowId, 2, gText_TimeBoard, 0x4A, 0, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gText_TimeBoard, 74, 0, TEXT_SPEED_FF, NULL); for (i = 0; i < NUM_TOWER_CHALLENGE_TYPES; i++) { PRINT_TOWER_TIME(GetTrainerTowerRecordTime(&TRAINER_TOWER.bestTime)); StringExpandPlaceholders(gStringVar4, gText_XMinYZSec); - AddTextPrinterParameterized(windowId, 2, gTrainerTowerChallengeTypeTexts[i - 1], 0x18, 0x24 + 0x14 * i, 0xFF, NULL); - AddTextPrinterParameterized(windowId, 2, gStringVar4, 0x60, 0x2E + 0x14 * i, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gTrainerTowerChallengeTypeTexts[i - 1], 24, 36 + 20 * i, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, 2, gStringVar4, 96, 46 + 20 * i, TEXT_SPEED_FF, NULL); } PutWindowTilemap(windowId); @@ -922,9 +936,9 @@ static void TrainerTowerGetDoublesEligiblity(void) static void TrainerTowerGetNumFloors(void) { - if (sTrainerTowerState->unk_0004.numFloors != sTrainerTowerState->unk_0004.floors[0].floorIdx) + if (sTrainerTowerState->data.numFloors != sTrainerTowerState->data.floors[0].floorIdx) { - ConvertIntToDecimalStringN(gStringVar1, sTrainerTowerState->unk_0004.numFloors, STR_CONV_MODE_LEFT_ALIGN, 1); + ConvertIntToDecimalStringN(gStringVar1, sTrainerTowerState->data.numFloors, STR_CONV_MODE_LEFT_ALIGN, 1); gSpecialVar_Result = TRUE; } else @@ -1029,9 +1043,9 @@ static s32 GetPartyMaxLevel(void) static void ValidateOrResetCurTrainerTowerRecord(void) { - if (TRAINER_TOWER.unk9 != sTrainerTowerState->unk_0004.id) + if (TRAINER_TOWER.unk9 != sTrainerTowerState->data.id) { - TRAINER_TOWER.unk9 = sTrainerTowerState->unk_0004.id; + TRAINER_TOWER.unk9 = sTrainerTowerState->data.id; SetTrainerTowerRecordTime(&TRAINER_TOWER.bestTime, TRAINER_TOWER_MAX_TIME); TRAINER_TOWER.receivedPrize = FALSE; } @@ -1043,7 +1057,7 @@ void PrintTrainerTowerRecords(void) u8 windowId = 0; SetUpTrainerTowerDataStruct(); - FillWindowPixelRect(0, 0, 0, 0, 0xd8, 0x90); + FillWindowPixelRect(0, PIXEL_FILL(0), 0, 0, 216, 144); ValidateOrResetCurTrainerTowerRecord(); AddTextPrinterParameterized3(0, 2, 0x4a, 0, sTextColors, 0, gText_TimeBoard); diff --git a/src/trainer_tower_sets.c b/src/trainer_tower_sets.c new file mode 100644 index 000000000..119950d7f --- /dev/null +++ b/src/trainer_tower_sets.c @@ -0,0 +1,8997 @@ +#include "global.h" +#include "cereader_tool.h" +#include "trainer_tower.h" +#include "text.h" +#include "constants/easy_chat.h" +#include "constants/items.h" +#include "constants/moves.h" +#include "constants/trainer_tower.h" +#include "constants/facility_trainer_classes.h" + +// Dummy strings must be declared explicitly for the sake of modern gcc +#define DUMMY_TOWER_MON(iv) {.hpIV = iv, .attackIV = iv, .defenseIV = iv, .speedIV = iv, .spAttackIV = iv, .spDefenseIV = iv, .nickname = _("$$$$$$$$$$")} +#define DUMMY_TOWER_TEAM(iv) {.name = _(""), .textColor = 1, .speechBefore = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, .speechWin = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, .speechLose = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, .speechAfter = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, .mons = {DUMMY_TOWER_MON(iv), DUMMY_TOWER_MON(iv), DUMMY_TOWER_MON(iv), DUMMY_TOWER_MON(iv), DUMMY_TOWER_MON(iv), DUMMY_TOWER_MON(iv)}} + +static const struct TrainerTowerFloor sTrainerTowerFloor_Single_4 = { + .id = 1, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_SINGLE, + .prize = TTPRIZE_WHITE_HERB, + .trainers = { + { + .name = _("COLE"), + .facilityClass = FACILITY_CLASS_YOUNGSTER_2, + .textColor = 1, + .speechBefore = {EC_WORD_AHAHA, EC_WORD_YOU_RE, EC_WORD_NOT, EC_WORD_GOING, EC_WORD_ANYWHERE, EC_WORD_EXCL}, + .speechWin = {EC_WORD_ALL_RIGHT, EC_WORD_EXCL, EC_WORD_BYE_BYE, EC_WORD_EXCL, 0xFFFF, 0xFFFF}, + .speechLose = {EC_WORD_HIYAH, EC_WORD_EXCL_EXCL, EC_WORD_DONE, EC_WORD_IN, EC_WORD_TOTALLY, EC_WORD_EXCL_EXCL}, + .speechAfter = {EC_WORD_TCH, EC_WORD_TCH, EC_WORD_YOU_RE, EC_WORD_TOO_STRONG, 0xFFFF, 0xFFFF}, + .mons = { + { + .species = SPECIES_RATICATE, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_SHOCK_WAVE, MOVE_HYPER_FANG, MOVE_SCARY_FACE, MOVE_ENDEAVOR}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 200, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x16, // FEMALE SASSY + .nickname = _("RATICATE"), + .friendship = 255 + }, + { + .species = SPECIES_MAGMAR, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_FIRE_PUNCH, MOVE_SUNNY_DAY, MOVE_SMOG, MOVE_STRENGTH}, + .hpEV = 100, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 210, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x56, // MALE HASTY + .nickname = _("MAGMAR"), + .friendship = 255 + }, + { + .species = SPECIES_MAGCARGO, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_FLAMETHROWER, MOVE_AMNESIA, MOVE_BODY_SLAM, MOVE_HARDEN}, + .hpEV = 110, + .attackEV = 200, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 200, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x02, // FEMALE BRAVE + .nickname = _("MAGCARGO"), + .friendship = 255 + }, + { + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_OVERHEAT, MOVE_SEISMIC_TOSS, MOVE_SWAGGER, MOVE_KARATE_CHOP}, + .hpEV = 100, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 210, + .spAttackEV = 200, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x87, // MALE TIMID + .nickname = _("PRIMEAPE"), + .friendship = 255 + }, + { + .species = SPECIES_GOLBAT, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_GIGA_DRAIN, MOVE_CONFUSE_RAY, MOVE_SLUDGE_BOMB, MOVE_MEAN_LOOK}, + .hpEV = 0, + .attackEV = 200, + .defenseEV = 0, + .speedEV = 110, + .spAttackEV = 200, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x81, // MALE NAUGHTY + .nickname = _("GOLBAT"), + .friendship = 255 + }, + { + .species = SPECIES_SLOWBRO, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_SUNNY_DAY, MOVE_YAWN, MOVE_FLAMETHROWER, MOVE_CONFUSION}, + .hpEV = 100, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 210, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x11, // FEMALE QUIET + .nickname = _("SLOWBRO"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00016aab +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Single_7 = { + .id = 2, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_SINGLE, + .prize = TTPRIZE_DRAGON_SCALE, + .trainers = { + { + .name = _("JAC"), + .facilityClass = FACILITY_CLASS_BURGLAR, + .textColor = 1, + .speechBefore = {EC_WORD_I_AM, EC_WORD_A, EC_MOVE2(THIEF), EC_WORD_EXCL, EC_WORD_GIVE_ME, EC_WORD_SOMETHING}, + .speechWin = {EC_WORD_YOU_VE, EC_WORD_GOT, EC_WORD_NOTHING, EC_WORD_THAT, EC_WORD_I, EC_WORD_WANT}, + .speechLose = {EC_WORD_EEK, EC_WORD_EXCL_EXCL, EC_WORD_I_AM, EC_WORD_SORRY, EC_WORD_I, EC_WORD_SURRENDER}, + .speechAfter = {EC_WORD_I, EC_WORD_WILL, EC_WORD_STOP, EC_WORD_BEING, EC_WORD_A, EC_MOVE2(THIEF)}, + .mons = { + { + .species = SPECIES_MEOWTH, + .heldItem = ITEM_LIECHI_BERRY, + .moves = {MOVE_SWAGGER, MOVE_SUBSTITUTE, MOVE_FAKE_OUT, MOVE_SLASH}, + .hpEV = 200, + .attackEV = 110, + .defenseEV = 0, + .speedEV = 200, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 138 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x8A, // MALE JOLLY + .nickname = _("MEOWTH"), + .friendship = 255 + }, + { + .species = SPECIES_FLAREON, + .heldItem = ITEM_PETAYA_BERRY, + .moves = {MOVE_FLAMETHROWER, MOVE_BITE, MOVE_SAND_ATTACK, MOVE_FIRE_SPIN}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 0, + .spAttackEV = 200, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("FLAREON"), + .friendship = 255 + }, + { + .species = SPECIES_PORYGON, + .heldItem = ITEM_PETAYA_BERRY, + .moves = {MOVE_TRI_ATTACK, MOVE_RECYCLE, MOVE_PSYBEAM, MOVE_CONVERSION_2}, + .hpEV = 100, + .attackEV = 0, + .defenseEV = 210, + .speedEV = 0, + .spAttackEV = 200, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x07, // GENDERLESS RELAXED + .nickname = _("PORYGON"), + .friendship = 255 + }, + { + .species = SPECIES_CHANSEY, + .heldItem = ITEM_LUCKY_PUNCH, + .moves = {MOVE_FLAMETHROWER, MOVE_LIGHT_SCREEN, MOVE_BODY_SLAM, MOVE_MINIMIZE}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x10, // FEMALE MILD + .nickname = _("CHANSEY"), + .friendship = 255 + }, + { + .species = SPECIES_FARFETCHD, + .heldItem = ITEM_STICK, + .moves = {MOVE_KNOCK_OFF, MOVE_SWORDS_DANCE, MOVE_FLY, MOVE_SAND_ATTACK}, + .hpEV = 100, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 110, + .otId = 133 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x85, // MALE IMPISH + .nickname = _("FARFETCH'D"), + .friendship = 255 + }, + { + .species = SPECIES_MR_MIME, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_SUBSTITUTE, MOVE_SHOCK_WAVE, MOVE_LIGHT_SCREEN, MOVE_BRICK_BREAK}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 130 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x82, // MALE BOLD + .nickname = _("MR. MIME"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00016456 +}; + +static const struct TrainerTowerFloor gUnknown_847B36C = { + .id = 3, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_SINGLE, + .prize = TTPRIZE_IRON, + .trainers = { + { + .name = _("MILY"), + .facilityClass = FACILITY_CLASS_PSYCHIC_4, + .textColor = 1, + .speechBefore = {EC_WORD_LOOK, EC_WORD_AT, EC_WORD_MY, EC_WORD_POKEMON, EC_MOVE2(SUPERPOWER), EC_WORD_EXCL}, + .speechWin = {EC_WORD_ISN_T, EC_WORD_IT, EC_WORD_INCREDIBLE, EC_WORD_QUES, EC_WORD_POKEMON, EC_WORD_POWER}, + .speechLose = {EC_WORD_THIS, EC_WORD_IS, EC_WORD_AN, EC_WORD_AWFUL, EC_MOVE(NIGHTMARE), EC_WORD_ELLIPSIS_EXCL}, + .speechAfter = {EC_WORD_THIS, EC_WORD_IS, EC_WORD_A, EC_WORD_DREAM, EC_WORD_NOTHING, EC_WORD_MORE}, + .mons = { + { + .species = SPECIES_CHANSEY, + .heldItem = ITEM_ORAN_BERRY, + .moves = {MOVE_LIGHT_SCREEN, MOVE_EGG_BOMB, MOVE_MINIMIZE, MOVE_SECRET_POWER}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x08, // FEMALE IMPISH + .nickname = _("CHANSEY"), + .friendship = 255 + }, + { + .species = SPECIES_CLEFABLE, + .heldItem = ITEM_ORAN_BERRY, + .moves = {MOVE_METRONOME, MOVE_REFLECT, MOVE_SING, MOVE_POUND}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 200, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x16, // FEMALE SASSY + .nickname = _("CLEFABLE"), + .friendship = 255 + }, + { + .species = SPECIES_TOGETIC, + .heldItem = ITEM_ORAN_BERRY, + .moves = {MOVE_METRONOME, MOVE_REFLECT, MOVE_SWEET_KISS, MOVE_PECK}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x16, // FEMALE SASSY + .nickname = _("TOGETIC"), + .friendship = 255 + }, + { + .species = SPECIES_TOGETIC, + .heldItem = ITEM_ORAN_BERRY, + .moves = {MOVE_METRONOME, MOVE_HIDDEN_POWER, MOVE_ATTRACT, MOVE_LIGHT_SCREEN}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x20, // MALE RELAXED + .nickname = _("TOGETIC"), + .friendship = 255 + }, + { + .species = SPECIES_CHANSEY, + .heldItem = ITEM_ORAN_BERRY, + .moves = {MOVE_FLAMETHROWER, MOVE_SOFT_BOILED, MOVE_LIGHT_SCREEN, MOVE_SECRET_POWER}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x05, // FEMALE BOLD + .nickname = _("CHANSEY"), + .friendship = 255 + }, + { + .species = SPECIES_CLEFABLE, + .heldItem = ITEM_ORAN_BERRY, + .moves = {MOVE_REFLECT, MOVE_FLAMETHROWER, MOVE_SING, MOVE_BODY_SLAM}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 0, + .spAttackEV = 200, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0xC0, // MALE QUIET + .nickname = _("CLEFABLE"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x000164ec +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Double_5 = { + .id = 4, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_DOUBLE, + .prize = TTPRIZE_CHOICE_BAND, + .trainers = { + { + .name = _("JOS & ANNE"), + .facilityClass = FACILITY_CLASS_COOL_COUPLE, + .textColor = 7, + .speechBefore = {EC_WORD_I, EC_WORD_CAN_T, EC_WORD_LOSE, EC_WORD_TO, EC_WORD_YOU, EC_WORD_HERE}, + .speechWin = {EC_WORD_VERY, EC_WORD_WELL, EC_WORD_DONE, EC_WORD_EXCL, EC_WORD_GOOD, EC_WORD_BATTLE}, + .speechLose = {EC_WORD_UNBELIEVABLE, EC_WORD_ELLIPSIS, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, + .speechAfter = {EC_WORD_I_AM, EC_WORD_DISAPPOINTED, EC_WORD_BUT, EC_WORD_YOU, EC_WORD_WIN, EC_WORD_ELLIPSIS}, + .mons = { + { + .species = SPECIES_RAPIDASH, + .heldItem = ITEM_WHITE_HERB, + .moves = {MOVE_BOUNCE, MOVE_OVERHEAT, MOVE_HYPNOSIS, MOVE_RETURN}, + .hpEV = 100, + .attackEV = 100, + .defenseEV = 0, + .speedEV = 110, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 1, + .personality = 0x10, // FEMALE MILD + .nickname = _("RAPIDASH"), + .friendship = 255 + }, + { + .species = SPECIES_NINETALES, + .heldItem = ITEM_CHARCOAL, + .moves = {MOVE_CONFUSE_RAY, MOVE_WILL_O_WISP, MOVE_HEAT_WAVE, MOVE_DIG}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 200, + .spAttackEV = 200, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x15, // FEMALE GENTLE + .nickname = _("NINETALES"), + .friendship = 255 + }, + { + .species = SPECIES_MISDREAVUS, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_GRUDGE, MOVE_PSYCHIC, MOVE_SHADOW_BALL, MOVE_THUNDERBOLT}, + .hpEV = 200, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 210, + .spAttackEV = 100, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x0A, // FEMALE TIMID + .nickname = _("MISDREAVUS"), + .friendship = 255 + }, + { + .species = SPECIES_ALAKAZAM, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_LIGHT_SCREEN, MOVE_RECOVER, MOVE_PSYCHIC, MOVE_THUNDER_PUNCH}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x0A, // FEMALE TIMID + .nickname = _("ALAKAZAM"), + .friendship = 255 + }, + { + .species = SPECIES_BLISSEY, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_LIGHT_SCREEN, MOVE_ATTRACT, MOVE_RETURN, MOVE_PSYCHIC}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 1, + .personality = 0x16, // FEMALE SASSY + .nickname = _("BLISSEY"), + .friendship = 255 + }, + { + .species = SPECIES_CROBAT, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_TOXIC, MOVE_FLY, MOVE_CONFUSE_RAY, MOVE_SHADOW_BALL}, + .hpEV = 100, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 210, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x17, // FEMALE CAREFUL + .nickname = _("CROBAT"), + .friendship = 255 + }, + } + }, + { + .name = _("JOS & ANNE"), + .facilityClass = FACILITY_CLASS_COOL_COUPLE, + .textColor = 7, + .speechBefore = {EC_WORD_HERE_GOES, EC_WORD_EXCL_EXCL, EC_WORD_GET, EC_WORD_READY, EC_WORD_TO, EC_WORD_LOSE}, + .speechWin = {EC_WORD_PERFECT, EC_WORD_EXCL, EC_WORD_WE, EC_WORD_GET, EC_WORD_THE, EC_WORD_WIN}, + .speechLose = {EC_WORD_LOST, EC_WORD_QUES_EXCL, EC_WORD_YOU, EC_WORD_MUST_BE, EC_WORD_JOKING, EC_WORD_EXCL}, + .speechAfter = {EC_WORD_HOW, EC_WORD_COULD, EC_WORD_I, EC_WORD_LOSE, EC_WORD_THIS, EC_WORD_QUES}, + .mons = { + { + .species = SPECIES_HOUNDOOM, + .heldItem = ITEM_CHARCOAL, + .moves = {MOVE_TAUNT, MOVE_FLAMETHROWER, MOVE_WILL_O_WISP, MOVE_CRUNCH}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 1, + .personality = 0x82, // MALE BOLD + .nickname = _("HOUNDOOM"), + .friendship = 255 + }, + { + .species = SPECIES_AERODACTYL, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_ROAR, MOVE_FIRE_BLAST, MOVE_HYPER_BEAM, MOVE_AERIAL_ACE}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 1, + .personality = 0x33, // MALE LONELY + .nickname = _("AERODACTYL"), + .friendship = 255 + }, + { + .species = SPECIES_ARCANINE, + .heldItem = ITEM_CHARCOAL, + .moves = {MOVE_HEAT_WAVE, MOVE_EXTREME_SPEED, MOVE_ROAR, MOVE_DIG}, + .hpEV = 210, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 200, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x56, // MALE HASTY + .nickname = _("ARCANINE"), + .friendship = 255 + }, + { + .species = SPECIES_WEEZING, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_EXPLOSION, MOVE_SMOKESCREEN, MOVE_SLUDGE_BOMB, MOVE_THUNDERBOLT}, + .hpEV = 100, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 110, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x8E, // MALE QUIET + .nickname = _("WEEZING"), + .friendship = 255 + }, + { + .species = SPECIES_CHARIZARD, + .heldItem = ITEM_WHITE_HERB, + .moves = {MOVE_OVERHEAT, MOVE_OUTRAGE, MOVE_DRAGON_RAGE, MOVE_SMOKESCREEN}, + .hpEV = 100, + .attackEV = 110, + .defenseEV = 0, + .speedEV = 100, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x33, // MALE LONELY + .nickname = _("CHARIZARD"), + .friendship = 255 + }, + { + .species = SPECIES_GENGAR, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_HYPNOSIS, MOVE_DREAM_EATER, MOVE_SHADOW_BALL, MOVE_THUNDERBOLT}, + .hpEV = 55, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x87, // MALE TIMID + .nickname = _("GENGAR"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00017908 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Double_6 = { + .id = 5, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_DOUBLE, + .prize = TTPRIZE_CALCIUM, + .trainers = { + { + .name = _("EMY & ALEK"), + .facilityClass = FACILITY_CLASS_YOUNG_COUPLE_2, + .textColor = 1, + .speechBefore = {EC_WORD_I_AM, EC_WORD_SO, EC_WORD_LOST, EC_WORD_IN, EC_WORD_LOVEY_DOVEY, EC_WORD_HAPPINESS}, + .speechWin = {EC_WORD_OH, EC_WORD_OH, EC_WORD_HE, EC_WORD_IS, EC_WORD_REALLY, EC_WORD_AWESOME}, + .speechLose = {EC_WORD_AIYEEH, EC_WORD_EXCL_EXCL, EC_WORD_YOU_RE, EC_WORD_NOT, EC_WORD_SERIOUS, EC_WORD_QUES}, + .speechAfter = {EC_WORD_WHO, EC_WORD_ARE, EC_WORD_YOU, EC_WORD_QUES, 0xFFFF, 0xFFFF}, + .mons = { + { + .species = SPECIES_TAUROS, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_FLAMETHROWER, MOVE_REST, MOVE_SHOCK_WAVE, MOVE_DOUBLE_TEAM}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0A, // MALE TIMID + .nickname = _("TAUROS"), + .friendship = 255 + }, + { + .species = SPECIES_KANGASKHAN, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_FLAMETHROWER, MOVE_DIZZY_PUNCH, MOVE_REST, MOVE_FAKE_OUT}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x02, // FEMALE BRAVE + .nickname = _("KANGASKHAN"), + .friendship = 255 + }, + { + .species = SPECIES_FEAROW, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_DRILL_PECK, MOVE_TRI_ATTACK, MOVE_DOUBLE_EDGE, MOVE_REST}, + .hpEV = 100, + .attackEV = 210, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x94, // MALE CAREFUL + .nickname = _("FEAROW"), + .friendship = 255 + }, + { + .species = SPECIES_TOGETIC, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_FLAMETHROWER, MOVE_LIGHT_SCREEN, MOVE_REST, MOVE_ANCIENT_POWER}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x24, // MALE HASTY + .nickname = _("TOGETIC"), + .friendship = 255 + }, + { + .species = SPECIES_PIDGEOT, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_STEEL_WING, MOVE_FLY, MOVE_MIRROR_MOVE, MOVE_REST}, + .hpEV = 100, + .attackEV = 110, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0D, // FEMALE JOLLY + .nickname = _("PIDGEOT"), + .friendship = 255 + }, + { + .species = SPECIES_URSARING, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_REST, MOVE_SNORE, MOVE_DIG, MOVE_SLASH}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x8A, // MALE JOLLY + .nickname = _("URSARING"), + .friendship = 255 + }, + } + }, + { + .name = _("EMY & ALEK"), + .facilityClass = FACILITY_CLASS_YOUNG_COUPLE_2, + .textColor = 1, + .speechBefore = {EC_WORD_I_AM, EC_WORD_GIDDY, EC_WORD_WITH, EC_WORD_LOVEY_DOVEY, EC_WORD_JOY, EC_WORD_EXCL_EXCL}, + .speechWin = {EC_WORD_SIGH, EC_WORD_ELLIPSIS, EC_WORD_MY, EC_WORD_GIRL, EC_WORD_IS, EC_WORD_CUTE}, + .speechLose = {EC_WORD_WAAAH, EC_WORD_EXCL_EXCL, EC_WORD_YOU, EC_WORD_CAN_T, EC_WORD_BE, EC_WORD_SERIOUS}, + .speechAfter = {EC_WORD_WAIT, EC_WORD_ELLIPSIS, EC_WORD_WHO, EC_WORD_ARE, EC_WORD_YOU, EC_WORD_QUES}, + .mons = { + { + .species = SPECIES_LICKITUNG, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_FLAMETHROWER, MOVE_EARTHQUAKE, MOVE_REST, MOVE_SLEEP_TALK}, + .hpEV = 0, + .attackEV = 100, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 55, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x16, // FEMALE SASSY + .nickname = _("LICKITUNG"), + .friendship = 255 + }, + { + .species = SPECIES_NOCTOWL, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_HYPNOSIS, MOVE_DREAM_EATER, MOVE_REFLECT, MOVE_AERIAL_ACE}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0B, // FEMALE HASTY + .nickname = _("NOCTOWL"), + .friendship = 255 + }, + { + .species = SPECIES_FURRET, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_FLAMETHROWER, MOVE_AMNESIA, MOVE_SHOCK_WAVE, MOVE_SLASH}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x0E, // FEMALE NAIVE + .nickname = _("FURRET"), + .friendship = 255 + }, + { + .species = SPECIES_RATICATE, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_SUPER_FANG, MOVE_QUICK_ATTACK, MOVE_SWAGGER, MOVE_ENDEAVOR}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x8A, // MALE JOLLY + .nickname = _("RATICATE"), + .friendship = 255 + }, + { + .species = SPECIES_WIGGLYTUFF, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_SUNNY_DAY, MOVE_FLAMETHROWER, MOVE_ATTRACT, MOVE_BODY_SLAM}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0B, // FEMALE HASTY + .nickname = _("WIGGLYTUFF"), + .friendship = 255 + }, + { + .species = SPECIES_PORYGON2, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_THUNDERBOLT, MOVE_CONVERSION_2, MOVE_TRI_ATTACK, MOVE_RECOVER}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0A, // GENDERLESS TIMID + .nickname = _("PORYGON2"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00015d3b +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Double_2 = { + .id = 6, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_DOUBLE, + .prize = TTPRIZE_HP_UP, + .trainers = { + { + .name = _("JO & HALEY"), + .facilityClass = FACILITY_CLASS_CRUSH_KIN, + .textColor = 5, + .speechBefore = {EC_WORD_WE_RE, EC_WORD_USING, EC_WORD_THAT, EC_WORD_STRATEGY, EC_WORD_OKAY, EC_WORD_QUES}, + .speechWin = {EC_WORD_YAY, EC_WORD_WE, EC_WORD_WON, EC_WORD_EXCL, EC_WORD_SORRY, EC_WORD_EXCL}, + .speechLose = {EC_WORD_AWW, EC_WORD_EXCL, EC_WORD_THAT_WAS, EC_WORD_REALLY, EC_WORD_TERRIBLE, EC_WORD_EXCL}, + .speechAfter = {EC_WORD_ALL, EC_WORD_I, EC_WORD_DO, EC_WORD_IS, EC_WORD_LOSE, EC_WORD_ELLIPSIS}, + .mons = { + { + .species = SPECIES_SNEASEL, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_SHADOW_BALL, MOVE_SUNNY_DAY, MOVE_TAUNT, MOVE_AERIAL_ACE}, + .hpEV = 200, + .attackEV = 0, + .defenseEV = 50, + .speedEV = 210, + .spAttackEV = 0, + .spDefenseEV = 50, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x0D, // FEMALE JOLLY + .nickname = _("SNEASEL"), + .friendship = 255 + }, + { + .species = SPECIES_ALAKAZAM, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_FIRE_PUNCH, MOVE_RECOVER, MOVE_PSYCHIC, MOVE_SUNNY_DAY}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x05, // FEMALE BOLD + .nickname = _("ALAKAZAM"), + .friendship = 255 + }, + { + .species = SPECIES_HITMONTOP, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_MEGA_KICK, MOVE_ENDEAVOR, MOVE_DIG, MOVE_SUNNY_DAY}, + .hpEV = 100, + .attackEV = 210, + .defenseEV = 0, + .speedEV = 200, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x08, // MALE IMPISH + .nickname = _("HITMONTOP"), + .friendship = 255 + }, + { + .species = SPECIES_GIRAFARIG, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_LIGHT_SCREEN, MOVE_SUNNY_DAY, MOVE_SHADOW_BALL, MOVE_PSYBEAM}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x0A, // FEMALE TIMID + .nickname = _("GIRAFARIG"), + .friendship = 255 + }, + { + .species = SPECIES_XATU, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_SUNNY_DAY, MOVE_DRILL_PECK, MOVE_CONFUSE_RAY, MOVE_PSYCHIC}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x14, // FEMALE CALM + .nickname = _("XATU"), + .friendship = 255 + }, + { + .species = SPECIES_MR_MIME, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_REFLECT, MOVE_SUNNY_DAY, MOVE_PSYCHIC, MOVE_SHOCK_WAVE}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 200, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x05, // FEMALE BOLD + .nickname = _("MR. MIME"), + .friendship = 255 + }, + } + }, + { + .name = _("JO & HALEY"), + .facilityClass = FACILITY_CLASS_CRUSH_KIN, + .textColor = 5, + .speechBefore = {EC_WORD_YOU, EC_WORD_YOU, EC_WORD_YOU, EC_WORD_BETTER, EC_WORD_NOT, EC_WORD_WIN}, + .speechWin = {EC_WORD_YOU_RE, EC_WORD_NOT, EC_WORD_JOKING, EC_WORD_QUES, EC_WORD_WE, EC_WORD_WON}, + .speechLose = {EC_WORD_WIMPY, EC_WORD_ELLIPSIS, EC_WORD_WE, EC_WORD_WERE, EC_WORD_WEAK, EC_WORD_ELLIPSIS}, + .speechAfter = {EC_WORD_HAHAHA, EC_WORD_ELLIPSIS, EC_WORD_WE_RE, EC_WORD_TOTALLY, EC_WORD_USELESS, EC_WORD_ELLIPSIS}, + .mons = { + { + .species = SPECIES_HYPNO, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_FIRE_PUNCH, MOVE_HYPNOSIS, MOVE_PSYCHIC, MOVE_NIGHTMARE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x87, // MALE TIMID + .nickname = _("HYPNO"), + .friendship = 255 + }, + { + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_FIRE_PUNCH, MOVE_THUNDER_PUNCH, MOVE_ICE_PUNCH, MOVE_DETECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0F, // MALE MODEST + .nickname = _("HITMONCHAN"), + .friendship = 255 + }, + { + .species = SPECIES_MACHAMP, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_FLAMETHROWER, MOVE_BRICK_BREAK, MOVE_SCARY_FACE, MOVE_DIG}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x43, // MALE QUIET + .nickname = _("MACHAMP"), + .friendship = 255 + }, + { + .species = SPECIES_HOUNDOOM, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_ROAR, MOVE_FLAMETHROWER, MOVE_BITE, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x87, // MALE TIMID + .nickname = _("HOUNDOOM"), + .friendship = 255 + }, + { + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_OVERHEAT, MOVE_SWAGGER, MOVE_SEISMIC_TOSS, MOVE_DOUBLE_TEAM}, + .hpEV = 100, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 110, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x8C, // MALE MODEST + .nickname = _("PRIMEAPE"), + .friendship = 255 + }, + { + .species = SPECIES_HERACROSS, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_MEGAHORN, MOVE_EARTHQUAKE, MOVE_COUNTER, MOVE_LEER}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 200, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x85, // MALE IMPISH + .nickname = _("HERACROSS"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x000160b1 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Knockout_1 = { + .id = 7, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_KNOCKOUT, + .prize = TTPRIZE_METAL_COAT, + .trainers = { + { + .name = _("JORDY"), + .facilityClass = FACILITY_CLASS_BIKER, + .textColor = 3, + .speechBefore = {EC_WORD_DON_T, EC_WORD_MAKE, EC_WORD_ME, EC_WORD_GIGGLE, EC_WORD_YOU, EC_WORD_PUSHOVER}, + .speechWin = {EC_WORD_WHAT, EC_WORD_A_LITTLE, EC_WORD_PUSHOVER, EC_WORD_YOU, EC_WORD_ARE, EC_WORD_EXCL}, + .speechLose = {EC_WORD_YOU, EC_WORD_WERE, EC_WORD_READY, EC_WORD_TO, EC_WORD_ROCK, EC_WORD_EXCL}, + .speechAfter = {EC_WORD_DARN, EC_WORD_EXCL, EC_WORD_I, EC_WORD_DON_T, EC_WORD_GET, EC_WORD_IT}, + .mons = { + { + .species = SPECIES_MAGBY, + .heldItem = ITEM_LAX_INCENSE, + .moves = {MOVE_SMOKESCREEN, MOVE_CONFUSE_RAY, MOVE_FLAMETHROWER, MOVE_SCREECH}, + .hpEV = 210, + .attackEV = 30, + .defenseEV = 30, + .speedEV = 0, + .spAttackEV = 210, + .spDefenseEV = 30, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x43, // MALE QUIET + .nickname = _("MAGBY"), + .friendship = 0 + }, + { + .species = SPECIES_CLEFFA, + .heldItem = ITEM_LAX_INCENSE, + .moves = {MOVE_ATTRACT, MOVE_CHARM, MOVE_SECRET_POWER, MOVE_FLASH}, + .hpEV = 210, + .attackEV = 210, + .defenseEV = 30, + .speedEV = 0, + .spAttackEV = 30, + .spDefenseEV = 30, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0xCA, // MALE BRAVE + .nickname = _("CLEFFA"), + .friendship = 255 + }, + { + .species = SPECIES_IGGLYBUFF, + .heldItem = ITEM_LAX_INCENSE, + .moves = {MOVE_SING, MOVE_HIDDEN_POWER, MOVE_CHARM, MOVE_DOUBLE_TEAM}, + .hpEV = 210, + .attackEV = 0, + .defenseEV = 45, + .speedEV = 210, + .spAttackEV = 0, + .spDefenseEV = 45, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0xD2, // MALE TIMID + .nickname = _("IGGLYBUFF"), + .friendship = 255 + }, + { + .species = SPECIES_SMOOCHUM, + .heldItem = ITEM_LAX_INCENSE, + .moves = {MOVE_FAKE_TEARS, MOVE_PSYCHIC, MOVE_MEAN_LOOK, MOVE_SING}, + .hpEV = 210, + .attackEV = 0, + .defenseEV = 45, + .speedEV = 0, + .spAttackEV = 210, + .spDefenseEV = 45, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x11, // FEMALE QUIET + .nickname = _("SMOOCHUM"), + .friendship = 255 + }, + { + .species = SPECIES_TOGEPI, + .heldItem = ITEM_LAX_INCENSE, + .moves = {MOVE_SWEET_KISS, MOVE_YAWN, MOVE_ANCIENT_POWER, MOVE_DOUBLE_TEAM}, + .hpEV = 210, + .attackEV = 210, + .defenseEV = 45, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 45, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x34, // MALE BRAVE + .nickname = _("TOGEPI"), + .friendship = 0 + }, + { + .species = SPECIES_PICHU, + .heldItem = ITEM_LAX_INCENSE, + .moves = {MOVE_THUNDER_WAVE, MOVE_SHOCK_WAVE, MOVE_SWEET_KISS, MOVE_FLASH}, + .hpEV = 210, + .attackEV = 0, + .defenseEV = 45, + .speedEV = 0, + .spAttackEV = 210, + .spDefenseEV = 45, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x8E, // MALE QUIET + .nickname = _("PICHU"), + .friendship = 0 + }, + } + }, + { + .name = _("ERNEST"), + .facilityClass = FACILITY_CLASS_BIKER, + .textColor = 1, + .speechBefore = {EC_WORD_IT_S, EC_WORD_SLEEP, EC_WORD_TIME, EC_WORD_FOR, EC_WORD_CHILDREN, EC_WORD_EXCL}, + .speechWin = {EC_WORD_NOT, EC_WORD_GUTSY, EC_WORD_ENOUGH, 0xFFFF, 0xFFFF, 0xFFFF}, + .speechLose = {EC_WORD_WHY, EC_WORD_DID, EC_WORD_YOU, EC_WORD_CRUSH, EC_WORD_ME, EC_WORD_QUES}, + .speechAfter = {EC_WORD_I_AM, EC_WORD_BEAT, EC_WORD_I, EC_WORD_NEED, EC_WORD_A, EC_WORD_NAP}, + .mons = { + { + .species = SPECIES_CLEFFA, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_SWEET_KISS, MOVE_FRUSTRATION, MOVE_SING, MOVE_ATTRACT}, + .hpEV = 210, + .attackEV = 210, + .defenseEV = 45, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 45, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0xCA, // MALE BRAVE + .nickname = _("CLEFFA"), + .friendship = 0 + }, + { + .species = SPECIES_MAGBY, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_FRUSTRATION, MOVE_CONFUSE_RAY, MOVE_FLAMETHROWER, MOVE_TOXIC}, + .hpEV = 90, + .attackEV = 210, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 210, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x4D, // MALE BRAVE + .nickname = _("MAGBY"), + .friendship = 0 + }, + { + .species = SPECIES_TOGEPI, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_FRUSTRATION, MOVE_DOUBLE_TEAM, MOVE_TOXIC, MOVE_SWEET_KISS}, + .hpEV = 210, + .attackEV = 210, + .defenseEV = 45, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 45, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x34, // MALE BRAVE + .nickname = _("TOGEPI"), + .friendship = 0 + }, + { + .species = SPECIES_SMOOCHUM, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_MEAN_LOOK, MOVE_PERISH_SONG, MOVE_TOXIC, MOVE_FLASH}, + .hpEV = 90, + .attackEV = 0, + .defenseEV = 210, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 210, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x16, // FEMALE SASSY + .nickname = _("SMOOCHUM"), + .friendship = 0 + }, + { + .species = SPECIES_IGGLYBUFF, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_DOUBLE_TEAM, MOVE_SWEET_KISS, MOVE_SEISMIC_TOSS, MOVE_FLASH}, + .hpEV = 210, + .attackEV = 0, + .defenseEV = 45, + .speedEV = 210, + .spAttackEV = 0, + .spDefenseEV = 45, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0A, // FEMALE TIMID + .nickname = _("IGGLYBUFF"), + .friendship = 0 + }, + { + .species = SPECIES_PICHU, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_TAIL_WHIP, MOVE_FRUSTRATION, MOVE_ATTRACT, MOVE_THUNDER_WAVE}, + .hpEV = 90, + .attackEV = 210, + .defenseEV = 0, + .speedEV = 210, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("PICHU"), + .friendship = 0 + }, + } + }, + { + .name = _("GABRIEL"), + .facilityClass = FACILITY_CLASS_CUE_BALL, + .textColor = 1, + .speechBefore = {EC_WORD_YAHOO, EC_WORD_EXCL, EC_WORD_HERE_I_COME, EC_WORD_TO, EC_WORD_SWARM, EC_WORD_YOU}, + .speechWin = {EC_WORD_I_AM, EC_WORD_INVINCIBLE, EC_WORD_YOU, EC_WORD_GOT, EC_WORD_THAT, EC_WORD_QUES}, + .speechLose = {EC_WORD_WHAT, EC_WORD_WAS, EC_WORD_THAT, EC_WORD_QUES, 0xFFFF, 0xFFFF}, + .speechAfter = {EC_WORD_I_AM, EC_WORD_GOING, EC_WORD_TO, EC_WORD_WIN, EC_WORD_NEXT, EC_WORD_TIME}, + .mons = { + { + .species = SPECIES_PICHU, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_THUNDER_WAVE, MOVE_FRUSTRATION, MOVE_THUNDERBOLT, MOVE_ATTRACT}, + .hpEV = 90, + .attackEV = 210, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 210, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x81, // MALE NAUGHTY + .nickname = _("PICHU"), + .friendship = 0 + }, + { + .species = SPECIES_TOGEPI, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_ATTRACT, MOVE_FRUSTRATION, MOVE_TOXIC, MOVE_SUBSTITUTE}, + .hpEV = 210, + .attackEV = 210, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 90, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x33, // MALE LONELY + .nickname = _("TOGEPI"), + .friendship = 0 + }, + { + .species = SPECIES_CLEFFA, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_ENCORE, MOVE_TOXIC, MOVE_DOUBLE_TEAM, MOVE_FLASH}, + .hpEV = 210, + .attackEV = 0, + .defenseEV = 150, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 150, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0xCF, // MALE RELAXED + .nickname = _("CLEFFA"), + .friendship = 0 + }, + { + .species = SPECIES_IGGLYBUFF, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_ATTRACT, MOVE_SUBSTITUTE, MOVE_SING, MOVE_PERISH_SONG}, + .hpEV = 210, + .attackEV = 0, + .defenseEV = 210, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 90, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0xCF, // MALE RELAXED + .nickname = _("IGGLYBUFF"), + .friendship = 0 + }, + { + .species = SPECIES_SMOOCHUM, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_SWEET_KISS, MOVE_PERISH_SONG, MOVE_TOXIC, MOVE_ATTRACT}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 200, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x16, // FEMALE SASSY + .nickname = _("SMOOCHUM"), + .friendship = 0 + }, + { + .species = SPECIES_MAGBY, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_LEER, MOVE_FRUSTRATION, MOVE_SUBSTITUTE, MOVE_FLAMETHROWER}, + .hpEV = 90, + .attackEV = 210, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 210, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x4D, // MALE BRAVE + .nickname = _("MAGBY"), + .friendship = 0 + }, + } + }, + }, + .checksum = 0x00017a4a +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Knockout_2 = { + .id = 8, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_KNOCKOUT, + .prize = TTPRIZE_UP_GRADE, + .trainers = { + { + .name = _("MIKE"), + .facilityClass = FACILITY_CLASS_HIKER_2, + .textColor = 5, + .speechBefore = {EC_WORD_MY, EC_WORD_POKEMON, EC_WORD_ARE, EC_WORD_FULL, EC_WORD_OF, EC_WORD_POWER}, + .speechWin = {EC_WORD_WHAT_S_UP_QUES, EC_WORD_WHERE, EC_WORD_IS, EC_WORD_YOUR, EC_WORD_POWER, EC_WORD_QUES}, + .speechLose = {EC_WORD_YOU, EC_WORD_GOT, EC_WORD_ME, EC_WORD_WITH, EC_WORD_YOUR, EC_MOVE2(FAKE_OUT)}, + .speechAfter = {EC_WORD_OH_YEAH, EC_WORD_EXCL, EC_WORD_THAT_S, EC_WORD_PRETTY, EC_WORD_EXCELLENT, EC_WORD_EXCL}, + .mons = { + { + .species = SPECIES_PINSIR, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_GUILLOTINE, MOVE_BRICK_BREAK, MOVE_DIG, MOVE_REVENGE}, + .hpEV = 100, + .attackEV = 210, + .defenseEV = 0, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("PINSIR"), + .friendship = 255 + }, + { + .species = SPECIES_CHARIZARD, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_DRAGON_CLAW, MOVE_METAL_CLAW, MOVE_AERIAL_ACE, MOVE_OUTRAGE}, + .hpEV = 200, + .attackEV = 200, + .defenseEV = 0, + .speedEV = 110, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x35, // MALE ADAMANT + .nickname = _("CHARIZARD"), + .friendship = 255 + }, + { + .species = SPECIES_RHYDON, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_MEGAHORN, MOVE_HORN_DRILL, MOVE_CRUSH_CLAW, MOVE_BRICK_BREAK}, + .hpEV = 100, + .attackEV = 210, + .defenseEV = 200, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x09, // FEMALE LAX + .nickname = _("RHYDON"), + .friendship = 255 + }, + { + .species = SPECIES_ARCANINE, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_EXTREME_SPEED, MOVE_IRON_TAIL, MOVE_AERIAL_ACE, MOVE_DIG}, + .hpEV = 110, + .attackEV = 200, + .defenseEV = 0, + .speedEV = 200, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x3F, // MALE JOLLY + .nickname = _("ARCANINE"), + .friendship = 255 + }, + { + .species = SPECIES_GOLEM, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_DOUBLE_EDGE, MOVE_ROLLOUT, MOVE_BRICK_BREAK, MOVE_DIG}, + .hpEV = 100, + .attackEV = 210, + .defenseEV = 200, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x02, // FEMALE BRAVE + .nickname = _("GOLEM"), + .friendship = 255 + }, + { + .species = SPECIES_HOUNDOOM, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_CRUNCH, MOVE_REVERSAL, MOVE_DOUBLE_EDGE, MOVE_COUNTER}, + .hpEV = 200, + .attackEV = 110, + .defenseEV = 200, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 1, + .personality = 0x08, // FEMALE IMPISH + .nickname = _("HOUNDOOM"), + .friendship = 255 + }, + } + }, + { + .name = _("REBECCA"), + .facilityClass = FACILITY_CLASS_CRUSH_GIRL, + .textColor = 5, + .speechBefore = {EC_WORD_I, EC_WORD_WILL, EC_WORD_WIN, EC_WORD_EXCL_EXCL, 0xFFFF, 0xFFFF}, + .speechWin = {EC_WORD_IT_S, EC_WORD_TOO, EC_WORD_BAD, EC_WORD_BUT, EC_WORD_I_AM, EC_WORD_OVERWHELMING}, + .speechLose = {EC_WORD_ARRGH, EC_WORD_EXCL_EXCL, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, + .speechAfter = {EC_WORD_YOU, EC_WORD_ANGER, EC_WORD_ME, EC_WORD_BUT, EC_WORD_YOU_RE, EC_WORD_TOUGH}, + .mons = { + { + .species = SPECIES_SANDSLASH, + .heldItem = ITEM_SILK_SCARF, + .moves = {MOVE_CRUSH_CLAW, MOVE_DIG, MOVE_DOUBLE_EDGE, MOVE_AERIAL_ACE}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x0D, // FEMALE JOLLY + .nickname = _("SANDSLASH"), + .friendship = 255 + }, + { + .species = SPECIES_DRAGONAIR, + .heldItem = ITEM_SILK_SCARF, + .moves = {MOVE_OUTRAGE, MOVE_IRON_TAIL, MOVE_DOUBLE_EDGE, MOVE_SLAM}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x03, // FEMALE ADAMANT + .nickname = _("DRAGONAIR"), + .friendship = 255 + }, + { + .species = SPECIES_RAPIDASH, + .heldItem = ITEM_SILK_SCARF, + .moves = {MOVE_BOUNCE, MOVE_IRON_TAIL, MOVE_THRASH, MOVE_DOUBLE_EDGE}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 1, + .personality = 0x94, // MALE CAREFUL + .nickname = _("RAPIDASH"), + .friendship = 255 + }, + { + .species = SPECIES_FLAREON, + .heldItem = ITEM_SILK_SCARF, + .moves = {MOVE_IRON_TAIL, MOVE_FLAIL, MOVE_BITE, MOVE_DOUBLE_EDGE}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x21, // MALE IMPISH + .nickname = _("FLAREON"), + .friendship = 255 + }, + { + .species = SPECIES_NIDOQUEEN, + .heldItem = ITEM_SILK_SCARF, + .moves = {MOVE_SUPERPOWER, MOVE_AERIAL_ACE, MOVE_BRICK_BREAK, MOVE_COUNTER}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x17, // FEMALE CAREFUL + .nickname = _("NIDOQUEEN"), + .friendship = 255 + }, + { + .species = SPECIES_PERSIAN, + .heldItem = ITEM_SILK_SCARF, + .moves = {MOVE_RETURN, MOVE_AERIAL_ACE, MOVE_IRON_TAIL, MOVE_DIG}, + .hpEV = 110, + .attackEV = 200, + .defenseEV = 0, + .speedEV = 200, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("PERSIAN"), + .friendship = 255 + }, + } + }, + { + .name = _("NICOLAS"), + .facilityClass = FACILITY_CLASS_BLACK_BELT_2, + .textColor = 5, + .speechBefore = {EC_WORD_THIS, EC_WORD_IS, EC_WORD_WHERE, EC_WORD_YOU, EC_WORD_STOP, EC_WORD_EXCL}, + .speechWin = {EC_WORD_YOU_RE, EC_WORD_TOO_WEAK, EC_WORD_TO, EC_WORD_EVER, EC_WORD_BEAT, EC_WORD_ME}, + .speechLose = {EC_WORD_WHY, EC_WORD_COULDN_T, EC_WORD_I, EC_WORD_BEAT, EC_WORD_YOU, EC_WORD_QUES}, + .speechAfter = {EC_WORD_I, EC_WORD_HAVE, EC_WORD_TO, EC_WORD_TRAIN, EC_WORD_SOME, EC_WORD_MORE}, + .mons = { + { + .species = SPECIES_HITMONLEE, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_MEGA_KICK, MOVE_REVERSAL, MOVE_FOCUS_PUNCH, MOVE_BRICK_BREAK}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x08, // MALE IMPISH + .nickname = _("HITMONLEE"), + .friendship = 255 + }, + { + .species = SPECIES_SCYTHER, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_SLASH, MOVE_REVERSAL, MOVE_STEEL_WING, MOVE_AERIAL_ACE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x17, // FEMALE CAREFUL + .nickname = _("SCYTHER"), + .friendship = 255 + }, + { + .species = SPECIES_MAGMAR, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_FIRE_PUNCH, MOVE_THUNDER_PUNCH, MOVE_BRICK_BREAK, MOVE_IRON_TAIL}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x53, // MALE IMPISH + .nickname = _("MAGMAR"), + .friendship = 255 + }, + { + .species = SPECIES_MACHAMP, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_DYNAMIC_PUNCH, MOVE_DIG, MOVE_CROSS_CHOP, MOVE_REVENGE}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x3F, // MALE JOLLY + .nickname = _("MACHAMP"), + .friendship = 255 + }, + { + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_THRASH, MOVE_CROSS_CHOP, MOVE_IRON_TAIL, MOVE_AERIAL_ACE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 110, + .spAttackEV = 0, + .spDefenseEV = 200, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x08, // FEMALE IMPISH + .nickname = _("PRIMEAPE"), + .friendship = 255 + }, + { + .species = SPECIES_POLIWRATH, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_BODY_SLAM, MOVE_DIG, MOVE_MEGA_KICK, MOVE_COUNTER}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x0D, // FEMALE JOLLY + .nickname = _("POLIWRATH"), + .friendship = 255 + }, + } + }, + }, + .checksum = 0x00016f05 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Single_5 = { + .id = 9, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_SINGLE, + .prize = TTPRIZE_HP_UP, + .trainers = { + { + .name = _("JOEY"), + .facilityClass = FACILITY_CLASS_CAMPER_2, + .textColor = 1, + .speechBefore = {EC_WORD_MY, EC_WORD_POKEMON, EC_WORD_ARE, EC_WORD_SCARY, EC_WORD_STRONG, EC_WORD_EXCL}, + .speechWin = {EC_WORD_WERE, EC_WORD_MY, EC_WORD_POKEMON, EC_WORD_TOO, EC_WORD_MUCH, EC_WORD_QUES}, + .speechLose = {EC_WORD_YOUR, EC_WORD_POKEMON, EC_WORD_ARE, EC_WORD_WAY, EC_WORD_TOO_STRONG, EC_WORD_EXCL}, + .speechAfter = {EC_WORD_THE, EC_WORD_WAY, EC_WORD_POKEMON, EC_WORD_MATCH_UP, EC_WORD_IS, EC_WORD_IMPORTANT}, + .mons = { + { + .species = SPECIES_MURKROW, + .heldItem = ITEM_BLACK_GLASSES, + .moves = {MOVE_FAINT_ATTACK, MOVE_AERIAL_ACE, MOVE_SHADOW_BALL, MOVE_CONFUSE_RAY}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x89, // MALE SERIOUS + .nickname = _("MURKROW"), + .friendship = 255 + }, + { + .species = SPECIES_TAUROS, + .heldItem = ITEM_SILK_SCARF, + .moves = {MOVE_EARTHQUAKE, MOVE_BODY_SLAM, MOVE_ROCK_TOMB, MOVE_PURSUIT}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0C, // MALE SERIOUS + .nickname = _("TAUROS"), + .friendship = 255 + }, + { + .species = SPECIES_SLOWBRO, + .heldItem = ITEM_MYSTIC_WATER, + .moves = {MOVE_AMNESIA, MOVE_PSYCHIC, MOVE_SURF, MOVE_ICE_BEAM}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x89, // MALE SERIOUS + .nickname = _("SLOWBRO"), + .friendship = 255 + }, + { + .species = SPECIES_ARBOK, + .heldItem = ITEM_POISON_BARB, + .moves = {MOVE_IRON_TAIL, MOVE_SLUDGE_BOMB, MOVE_ROCK_SLIDE, MOVE_TOXIC}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x89, // MALE SERIOUS + .nickname = _("ARBOK"), + .friendship = 255 + }, + { + .species = SPECIES_NIDOKING, + .heldItem = ITEM_SOFT_SAND, + .moves = {MOVE_EARTHQUAKE, MOVE_MEGAHORN, MOVE_SLUDGE_BOMB, MOVE_ROCK_SLIDE}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0C, // MALE SERIOUS + .nickname = _("NIDOKING"), + .friendship = 255 + }, + { + .species = SPECIES_RAPIDASH, + .heldItem = ITEM_CHARCOAL, + .moves = {MOVE_FLAMETHROWER, MOVE_BOUNCE, MOVE_QUICK_ATTACK, MOVE_DOUBLE_KICK}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x89, // MALE SERIOUS + .nickname = _("RAPIDASH"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00016417 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Single_8 = { + .id = 10, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_SINGLE, + .prize = TTPRIZE_METAL_COAT, + .trainers = { + { + .name = _("LILY"), + .facilityClass = FACILITY_CLASS_PKMN_BREEDER_3, + .textColor = 1, + .speechBefore = {EC_WORD_I, EC_WORD_WANT, EC_WORD_SOMETHING, EC_WORD_IN, EC_MOVE(RETURN), EC_WORD_EXCL}, + .speechWin = {EC_WORD_I, EC_WORD_BELIEVE, EC_WORD_IN, EC_WORD_MY, EC_WORD_POKEMON, EC_WORD_EXCL}, + .speechLose = {EC_WORD_I, EC_WORD_NEED, EC_WORD_SOMETHING, EC_WORD_IN, EC_MOVE(RETURN), EC_WORD_ELLIPSIS}, + .speechAfter = {EC_WORD_MY, EC_WORD_POKEMON, EC_WORD_HAVE, EC_WORD_MY, EC_WORD_TRUST, EC_WORD_FOREVER}, + .mons = { + { + .species = SPECIES_CLEFAIRY, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_CHARM, MOVE_METRONOME, MOVE_RETURN, MOVE_REST}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("CLEFAIRY"), + .friendship = 255 + }, + { + .species = SPECIES_TOGEPI, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_CHARM, MOVE_METRONOME, MOVE_RETURN, MOVE_REST}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("TOGEPI"), + .friendship = 255 + }, + { + .species = SPECIES_MEOWTH, + .heldItem = ITEM_SILK_SCARF, + .moves = {MOVE_CHARM, MOVE_ASSIST, MOVE_RETURN, MOVE_REST}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x89, // MALE SERIOUS + .nickname = _("MEOWTH"), + .friendship = 255 + }, + { + .species = SPECIES_JIGGLYPUFF, + .heldItem = ITEM_SILK_SCARF, + .moves = {MOVE_CHARM, MOVE_ROLLOUT, MOVE_RETURN, MOVE_REST}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("JIGGLYPUFF"), + .friendship = 255 + }, + { + .species = SPECIES_SNORLAX, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_CHARM, MOVE_ROLLOUT, MOVE_RETURN, MOVE_REST}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x25, // MALE SERIOUS + .nickname = _("SNORLAX"), + .friendship = 255 + }, + { + .species = SPECIES_SNUBBULL, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_CHARM, MOVE_LICK, MOVE_RETURN, MOVE_REST}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("SNUBBULL"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00016cb7 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Single_2 = { + .id = 11, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_SINGLE, + .prize = TTPRIZE_UP_GRADE, + .trainers = { + { + .name = _("BRANDON"), + .facilityClass = FACILITY_CLASS_BUG_CATCHER_2, + .textColor = 1, + .speechBefore = {EC_WORD_POISON, EC_WORD_IS, EC_WORD_JUST, EC_WORD_SO, EC_WORD_AWFUL, EC_WORD_ISN_T_IT_QUES}, + .speechWin = {EC_WORD_SEE, EC_WORD_QUES, EC_WORD_ISN_T, EC_WORD_POISON, EC_WORD_TERRIBLE, EC_WORD_QUES}, + .speechLose = {EC_WORD_HUH_QUES, EC_WORD_OUR, EC_WORD_POISON, EC_WORD_DIDN_T, EC_WORD_WORK, EC_WORD_QUES}, + .speechAfter = {EC_WORD_POISON, EC_WORD_IS, EC_WORD_A, EC_WORD_TERRIBLE, EC_MOVE(TORMENT), EC_WORD_ISN_T_IT_QUES}, + .mons = { + { + .species = SPECIES_BUTTERFREE, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_SILVER_WIND, MOVE_SLEEP_POWDER, MOVE_PSYCHIC, MOVE_SUPERSONIC}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x8A, // MALE JOLLY + .nickname = _("BUTTERFREE"), + .friendship = 255 + }, + { + .species = SPECIES_BEEDRILL, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_SLUDGE_BOMB, MOVE_TWINEEDLE, MOVE_DOUBLE_TEAM, MOVE_AERIAL_ACE}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x8A, // MALE JOLLY + .nickname = _("BEEDRILL"), + .friendship = 255 + }, + { + .species = SPECIES_PARASECT, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_GIGA_DRAIN, MOVE_LIGHT_SCREEN, MOVE_STUN_SPORE, MOVE_SLASH}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x8A, // MALE JOLLY + .nickname = _("PARASECT"), + .friendship = 255 + }, + { + .species = SPECIES_YANMA, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_HYPNOSIS, MOVE_SONIC_BOOM, MOVE_QUICK_ATTACK, MOVE_AERIAL_ACE}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 1, + .personality = 0x8A, // MALE JOLLY + .nickname = _("YANMA"), + .friendship = 255 + }, + { + .species = SPECIES_SHUCKLE, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_TOXIC, MOVE_ROCK_TOMB, MOVE_PROTECT, MOVE_REST}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x8A, // MALE JOLLY + .nickname = _("SHUCKLE"), + .friendship = 255 + }, + { + .species = SPECIES_FORRETRESS, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_TOXIC, MOVE_GIGA_DRAIN, MOVE_PROTECT, MOVE_SANDSTORM}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x8A, // MALE JOLLY + .nickname = _("FORRETRESS"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00016e1f +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Double_3 = { + .id = 12, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_DOUBLE, + .prize = TTPRIZE_IRON, + .trainers = { + { + .name = _("RIC & RENE"), + .facilityClass = FACILITY_CLASS_CRUSH_KIN, + .textColor = 5, + .speechBefore = {EC_WORD_MY, EC_WORD_BIG, EC_WORD_BROTHER, EC_WORD_IS, EC_WORD_REALLY, EC_WORD_AWESOME}, + .speechWin = {EC_WORD_MY, EC_WORD_BIG, EC_WORD_BROTHER, EC_WORD_IS, EC_WORD_TOO, EC_WORD_AWESOME}, + .speechLose = {EC_WORD_MY, EC_WORD_BIG, EC_WORD_BROTHER, EC_WORD_ISN_T, EC_WORD_AWESOME, EC_WORD_QUES}, + .speechAfter = {EC_WORD_BIG, EC_WORD_BROTHER, EC_WORD_FIGHT, EC_WORD_EXCL, 0xFFFF, 0xFFFF}, + .mons = { + { + .species = SPECIES_HITMONLEE, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_ROCK_TOMB, MOVE_HI_JUMP_KICK, MOVE_BULK_UP, MOVE_PROTECT}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x02, // MALE BRAVE + .nickname = _("HITMONLEE"), + .friendship = 255 + }, + { + .species = SPECIES_RHYDON, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_MEGAHORN, MOVE_ROCK_BLAST, MOVE_BRICK_BREAK, MOVE_PROTECT}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x7F, // MALE BRAVE + .nickname = _("RHYDON"), + .friendship = 255 + }, + { + .species = SPECIES_GOLEM, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_BRICK_BREAK, MOVE_ROCK_BLAST, MOVE_DIG, MOVE_PROTECT}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x02, // FEMALE BRAVE + .nickname = _("GOLEM"), + .friendship = 255 + }, + { + .species = SPECIES_MAGMAR, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_FIRE_PUNCH, MOVE_BRICK_BREAK, MOVE_CONFUSE_RAY, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x4F, // MALE NAUGHTY + .nickname = _("MAGMAR"), + .friendship = 255 + }, + { + .species = SPECIES_HERACROSS, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_MEGAHORN, MOVE_BRICK_BREAK, MOVE_ROCK_TOMB, MOVE_PROTECT}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x7F, // MALE BRAVE + .nickname = _("HERACROSS"), + .friendship = 255 + }, + { + .species = SPECIES_POLIWRATH, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_FOCUS_PUNCH, MOVE_SURF, MOVE_BULK_UP, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x97, // MALE LONELY + .nickname = _("POLIWRATH"), + .friendship = 255 + }, + } + }, + { + .name = _("RIC & RENE"), + .facilityClass = FACILITY_CLASS_CRUSH_KIN, + .textColor = 5, + .speechBefore = {EC_WORD_I_AM, EC_WORD_REALLY, EC_WORD_AWESOME, EC_WORD_EXCL, 0xFFFF, 0xFFFF}, + .speechWin = {EC_WORD_I_AM, EC_WORD_TOO, EC_WORD_AWESOME, EC_WORD_EXCL, 0xFFFF, 0xFFFF}, + .speechLose = {EC_WORD_HUH_QUES, 0xFFFF, EC_WORD_I_AM, EC_WORD_NOT_VERY, EC_WORD_AWESOME, EC_WORD_QUES}, + .speechAfter = {EC_WORD_I, EC_WORD_WILL, EC_WORD_DO, EC_WORD_MY, EC_WORD_BEST, EC_WORD_EXCL}, + .mons = { + { + .species = SPECIES_MACHAMP, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_CROSS_CHOP, MOVE_SEISMIC_TOSS, MOVE_ROCK_TOMB, MOVE_PROTECT}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x4E, // MALE ADAMANT + .nickname = _("MACHAMP"), + .friendship = 255 + }, + { + .species = SPECIES_PINSIR, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_ROCK_TOMB, MOVE_SEISMIC_TOSS, MOVE_SUBMISSION, MOVE_PROTECT}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("PINSIR"), + .friendship = 255 + }, + { + .species = SPECIES_MAROWAK, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_BRICK_BREAK, MOVE_BONEMERANG, MOVE_AERIAL_ACE, MOVE_PROTECT}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x03, // FEMALE ADAMANT + .nickname = _("MAROWAK"), + .friendship = 255 + }, + { + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_MACH_PUNCH, MOVE_THUNDER_PUNCH, MOVE_DOUBLE_TEAM, MOVE_PROTECT}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x03, // MALE ADAMANT + .nickname = _("HITMONCHAN"), + .friendship = 255 + }, + { + .species = SPECIES_ELECTABUZZ, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_THUNDER_PUNCH, MOVE_BRICK_BREAK, MOVE_THUNDER_WAVE, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x4F, // MALE NAUGHTY + .nickname = _("ELECTABUZZ"), + .friendship = 255 + }, + { + .species = SPECIES_POLIWRATH, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_FOCUS_PUNCH, MOVE_SURF, MOVE_BULK_UP, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x97, // MALE LONELY + .nickname = _("POLIWRATH"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x000166b4 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Double_1 = { + .id = 13, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_DOUBLE, + .prize = TTPRIZE_DRAGON_SCALE, + .trainers = { + { + .name = _("JEN & KIRA"), + .facilityClass = FACILITY_CLASS_TWINS_2, + .textColor = 5, + .speechBefore = {EC_WORD_I_AM, EC_WORD_GOING, EC_WORD_TO, EC_WORD_TRY, EC_WORD_HARD, EC_WORD_EXCL}, + .speechWin = {EC_WORD_EHEHE, EC_WORD_YAY, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, + .speechLose = {EC_WORD_WAAAH, EC_WORD_EXCL, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, + .speechAfter = {EC_WORD_I, EC_WORD_WILL, EC_WORD_TRY, EC_WORD_TO, EC_WORD_GET, EC_WORD_BETTER}, + .mons = { + { + .species = SPECIES_JOLTEON, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_QUICK_ATTACK, MOVE_THUNDERBOLT, MOVE_DOUBLE_KICK, MOVE_PIN_MISSILE}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x29, // MALE MILD + .nickname = _("JOLTEON"), + .friendship = 255 + }, + { + .species = SPECIES_ESPEON, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_QUICK_ATTACK, MOVE_PSYCHIC, MOVE_SHADOW_BALL, MOVE_BITE}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x29, // MALE MILD + .nickname = _("ESPEON"), + .friendship = 255 + }, + { + .species = SPECIES_FLAREON, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_QUICK_ATTACK, MOVE_FLAMETHROWER, MOVE_SHADOW_BALL, MOVE_IRON_TAIL}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x33, // MALE LONELY + .nickname = _("FLAREON"), + .friendship = 255 + }, + { + .species = SPECIES_VAPOREON, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_QUICK_ATTACK, MOVE_WATERFALL, MOVE_ICE_BEAM, MOVE_BITE}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x10, // FEMALE MILD + .nickname = _("VAPOREON"), + .friendship = 255 + }, + { + .species = SPECIES_EEVEE, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_QUICK_ATTACK, MOVE_DOUBLE_EDGE, MOVE_BITE, MOVE_IRON_TAIL}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x10, // FEMALE MILD + .nickname = _("EEVEE"), + .friendship = 255 + }, + { + .species = SPECIES_UMBREON, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_QUICK_ATTACK, MOVE_FAINT_ATTACK, MOVE_SHADOW_BALL, MOVE_IRON_TAIL}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x10, // FEMALE MILD + .nickname = _("UMBREON"), + .friendship = 255 + }, + } + }, + { + .name = _("JEN & KIRA"), + .facilityClass = FACILITY_CLASS_TWINS_2, + .textColor = 3, + .speechBefore = {EC_WORD_LET_S, EC_WORD_TRY, EC_WORD_HARD, EC_WORD_EXCL, 0xFFFF, 0xFFFF}, + .speechWin = {EC_WORD_GIGGLE, EC_WORD_ELLIPSIS, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, + .speechLose = {EC_WORD_WAAAH, EC_WORD_EXCL, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, + .speechAfter = {EC_WORD_WE, EC_WORD_HAVE, EC_WORD_TO, EC_WORD_WORK, EC_WORD_BETTER, 0xFFFF}, + .mons = { + { + .species = SPECIES_JOLTEON, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_GROWL, MOVE_TAIL_WHIP, MOVE_HELPING_HAND, MOVE_THUNDERBOLT}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 10 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0A, // FEMALE TIMID + .nickname = _("JOLTEON"), + .friendship = 255 + }, + { + .species = SPECIES_ESPEON, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_LIGHT_SCREEN, MOVE_REFLECT, MOVE_HELPING_HAND, MOVE_PSYCHIC}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 10 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0A, // FEMALE TIMID + .nickname = _("ESPEON"), + .friendship = 255 + }, + { + .species = SPECIES_FLAREON, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_GROWL, MOVE_TAIL_WHIP, MOVE_HELPING_HAND, MOVE_FLAMETHROWER}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 13 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0D, // FEMALE JOLLY + .nickname = _("FLAREON"), + .friendship = 255 + }, + { + .species = SPECIES_VAPOREON, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_GROWL, MOVE_TAIL_WHIP, MOVE_HELPING_HAND, MOVE_SURF}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 35 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x23, // MALE TIMID + .nickname = _("VAPOREON"), + .friendship = 255 + }, + { + .species = SPECIES_EEVEE, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_GROWL, MOVE_TAIL_WHIP, MOVE_HELPING_HAND, MOVE_DOUBLE_EDGE}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 35 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x23, // MALE TIMID + .nickname = _("EEVEE"), + .friendship = 255 + }, + { + .species = SPECIES_UMBREON, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_GROWL, MOVE_TAIL_WHIP, MOVE_HELPING_HAND, MOVE_FAINT_ATTACK}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 35 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x23, // MALE TIMID + .nickname = _("UMBREON"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00017fc2 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Double_4 = { + .id = 14, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_DOUBLE, + .prize = TTPRIZE_MENTAL_HERB, + .trainers = { + { + .name = _("ISAC & MAG"), + .facilityClass = FACILITY_CLASS_COOL_COUPLE, + .textColor = 1, + .speechBefore = {EC_WORD_OUR, EC_MOVE(EARTHQUAKE), EC_WORD_WILL, EC_WORD_MAKE, EC_WORD_YOU, EC_WORD_SHAKY}, + .speechWin = {EC_WORD_FEELING, EC_WORD_SHAKY, EC_WORD_HUH_QUES, 0xFFFF, 0xFFFF, 0xFFFF}, + .speechLose = {EC_WORD_I_AM, EC_WORD_ALL, EC_WORD_SHAKY, EC_WORD_ELLIPSIS, 0xFFFF, 0xFFFF}, + .speechAfter = {EC_WORD_MY, EC_WORD_GIRL, EC_WORD_ISN_T, EC_WORD_SHAKY, EC_WORD_SHE_IS, EC_WORD_LOVEY_DOVEY}, + .mons = { + { + .species = SPECIES_NIDOKING, + .heldItem = ITEM_SOFT_SAND, + .moves = {MOVE_EARTHQUAKE, MOVE_MEGAHORN, MOVE_SHADOW_BALL, MOVE_FIRE_BLAST}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x03, // MALE ADAMANT + .nickname = _("NIDOKING"), + .friendship = 255 + }, + { + .species = SPECIES_GLIGAR, + .heldItem = ITEM_SOFT_SAND, + .moves = {MOVE_EARTHQUAKE, MOVE_QUICK_ATTACK, MOVE_AERIAL_ACE, MOVE_IRON_TAIL}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("GLIGAR"), + .friendship = 255 + }, + { + .species = SPECIES_QUAGSIRE, + .heldItem = ITEM_SOFT_SAND, + .moves = {MOVE_EARTHQUAKE, MOVE_SLUDGE_BOMB, MOVE_BLIZZARD, MOVE_BRICK_BREAK}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("QUAGSIRE"), + .friendship = 0 + }, + { + .species = SPECIES_PILOSWINE, + .heldItem = ITEM_SOFT_SAND, + .moves = {MOVE_EARTHQUAKE, MOVE_BLIZZARD, MOVE_ANCIENT_POWER, MOVE_BODY_SLAM}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("PILOSWINE"), + .friendship = 255 + }, + { + .species = SPECIES_GOLEM, + .heldItem = ITEM_SOFT_SAND, + .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_BLAST, MOVE_BRICK_BREAK, MOVE_EXPLOSION}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x80, // MALE ADAMANT + .nickname = _("GOLEM"), + .friendship = 255 + }, + { + .species = SPECIES_STEELIX, + .heldItem = ITEM_SOFT_SAND, + .moves = {MOVE_EARTHQUAKE, MOVE_IRON_TAIL, MOVE_DRAGON_BREATH, MOVE_DOUBLE_EDGE}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("STEELIX"), + .friendship = 255 + }, + } + }, + { + .name = _("ISAC & MAG"), + .facilityClass = FACILITY_CLASS_COOL_COUPLE, + .textColor = 1, + .speechBefore = {EC_WORD_MY, EC_WORD_POKEMON, EC_WORD_DOESN_T, EC_WORD_GET, EC_WORD_ALL, EC_WORD_SHAKY}, + .speechWin = {EC_WORD_SEE, EC_WORD_QUES, EC_WORD_I, EC_WORD_DIDN_T, EC_WORD_LIE, EC_WORD_EXCL}, + .speechLose = {EC_WORD_HUH_QUES, EC_WORD_YOU, EC_WORD_LEFT, EC_WORD_ME, EC_WORD_FEELING, EC_WORD_SHAKY}, + .speechAfter = {EC_WORD_I_AM, EC_WORD_LOVEY_DOVEY, EC_WORD_FOR, EC_WORD_HIM, EC_WORD_NOT, EC_WORD_SHAKY}, + .mons = { + { + .species = SPECIES_SKARMORY, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_SANDSTORM, MOVE_STEEL_WING, MOVE_AIR_CUTTER, MOVE_SPIKES}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0B, // FEMALE HASTY + .nickname = _("SKARMORY"), + .friendship = 255 + }, + { + .species = SPECIES_MANTINE, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_ICE_BEAM, MOVE_SURF, MOVE_CONFUSE_RAY, MOVE_AERIAL_ACE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x0B, // FEMALE HASTY + .nickname = _("MANTINE"), + .friendship = 255 + }, + { + .species = SPECIES_JUMPLUFF, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_TAIL_WHIP, MOVE_SUNNY_DAY, MOVE_SOLAR_BEAM, MOVE_AERIAL_ACE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0B, // FEMALE HASTY + .nickname = _("JUMPLUFF"), + .friendship = 255 + }, + { + .species = SPECIES_GENGAR, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_SHADOW_BALL, MOVE_SLUDGE_BOMB, MOVE_THUNDERBOLT, MOVE_PSYCHIC}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0B, // FEMALE HASTY + .nickname = _("GENGAR"), + .friendship = 255 + }, + { + .species = SPECIES_CROBAT, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_GIGA_DRAIN, MOVE_POISON_FANG, MOVE_FLY, MOVE_STEEL_WING}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0B, // FEMALE HASTY + .nickname = _("CROBAT"), + .friendship = 255 + }, + { + .species = SPECIES_XATU, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_PSYCHIC, MOVE_CONFUSE_RAY, MOVE_AERIAL_ACE, MOVE_LIGHT_SCREEN}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0B, // FEMALE HASTY + .nickname = _("XATU"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00016bb0 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Knockout_8 = { + .id = 15, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_KNOCKOUT, + .prize = TTPRIZE_BRIGHT_POWDER, + .trainers = { + { + .name = _("CHELSEA"), + .facilityClass = FACILITY_CLASS_PKMN_RANGER_4, + .textColor = 7, + .speechBefore = {EC_WORD_THE, EC_WORD_GREEN, EC_WORD_WORLD, EC_WORD_IS, EC_WORD_IMPORTANT, EC_WORD_ISN_T_IT_QUES}, + .speechWin = {EC_WORD_YOU, EC_WORD_TAKE, EC_WORD_THE, EC_WORD_LOSS, 0xFFFF, 0xFFFF}, + .speechLose = {EC_WORD_BE, EC_WORD_KIND, EC_WORD_TO, EC_WORD_THE, EC_WORD_GREEN, EC_WORD_WORLD}, + .speechAfter = {EC_WORD_DON_T, EC_WORD_EVER, EC_WORD_POISON, EC_WORD_THE, EC_WORD_GREEN, EC_WORD_WORLD}, + .mons = { + { + .species = SPECIES_VILEPLUME, + .heldItem = ITEM_PETAYA_BERRY, + .moves = {MOVE_INGRAIN, MOVE_GIGA_DRAIN, MOVE_SLUDGE_BOMB, MOVE_STUN_SPORE}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x11, // FEMALE QUIET + .nickname = _("VILEPLUME"), + .friendship = 255 + }, + { + .species = SPECIES_STARMIE, + .heldItem = ITEM_PETAYA_BERRY, + .moves = {MOVE_PSYCHIC, MOVE_ICE_BEAM, MOVE_WATERFALL, MOVE_RECOVER}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 1, + .personality = 0x10, // GENDERLESS MILD + .nickname = _("STARMIE"), + .friendship = 255 + }, + { + .species = SPECIES_URSARING, + .heldItem = ITEM_LIECHI_BERRY, + .moves = {MOVE_FAINT_ATTACK, MOVE_BODY_SLAM, MOVE_BRICK_BREAK, MOVE_ROCK_TOMB}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x01, // FEMALE LONELY + .nickname = _("URSARING"), + .friendship = 255 + }, + { + .species = SPECIES_NOCTOWL, + .heldItem = ITEM_LIECHI_BERRY, + .moves = {MOVE_HYPNOSIS, MOVE_DREAM_EATER, MOVE_FAINT_ATTACK, MOVE_AERIAL_ACE}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x01, // FEMALE LONELY + .nickname = _("NOCTOWL"), + .friendship = 255 + }, + { + .species = SPECIES_NINETALES, + .heldItem = ITEM_PETAYA_BERRY, + .moves = {MOVE_GRUDGE, MOVE_OVERHEAT, MOVE_FAINT_ATTACK, MOVE_WILL_O_WISP}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x10, // FEMALE MILD + .nickname = _("NINETALES"), + .friendship = 255 + }, + { + .species = SPECIES_LEDIAN, + .heldItem = ITEM_LIECHI_BERRY, + .moves = {MOVE_SILVER_WIND, MOVE_SWIFT, MOVE_AERIAL_ACE, MOVE_TOXIC}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x01, // FEMALE LONELY + .nickname = _("LEDIAN"), + .friendship = 255 + }, + } + }, + { + .name = _("TRENTON"), + .facilityClass = FACILITY_CLASS_PKMN_RANGER_3, + .textColor = 7, + .speechBefore = {EC_WORD_I, EC_MOVE2(PROTECT), EC_WORD_THE, EC_WORD_GREAT, EC_WORD_GREEN, EC_WORD_WORLD}, + .speechWin = {EC_WORD_TAKE_THAT, EC_WORD_EXCL, EC_WORD_THE, EC_WORD_LOSS, EC_WORD_IS, EC_WORD_YOURS}, + .speechLose = {EC_MOVE2(PROTECT), EC_WORD_THE, EC_WORD_GREEN, EC_WORD_WORLD, 0xFFFF, 0xFFFF}, + .speechAfter = {EC_MOVE2(PROTECT), EC_WORD_AND, EC_WORD_RESUSCITATE, EC_WORD_THE, EC_WORD_GREEN, EC_WORD_WORLD}, + .mons = { + { + .species = SPECIES_GYARADOS, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_EARTHQUAKE, MOVE_WATERFALL, MOVE_BLIZZARD, MOVE_HYPER_BEAM}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x88, // MALE HASTY + .nickname = _("GYARADOS"), + .friendship = 255 + }, + { + .species = SPECIES_VICTREEBEL, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_GIGA_DRAIN, MOVE_SLUDGE_BOMB, MOVE_REFLECT, MOVE_ATTRACT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x8E, // MALE QUIET + .nickname = _("VICTREEBEL"), + .friendship = 255 + }, + { + .species = SPECIES_DONPHAN, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_EARTHQUAKE, MOVE_ANCIENT_POWER, MOVE_IRON_TAIL, MOVE_DOUBLE_EDGE}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x97, // MALE LONELY + .nickname = _("DONPHAN"), + .friendship = 255 + }, + { + .species = SPECIES_FEAROW, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_FAINT_ATTACK, MOVE_DRILL_PECK, MOVE_STEEL_WING, MOVE_DOUBLE_TEAM}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x97, // MALE LONELY + .nickname = _("FEAROW"), + .friendship = 255 + }, + { + .species = SPECIES_ARCANINE, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_EXTREME_SPEED, MOVE_FIRE_BLAST, MOVE_CRUNCH, MOVE_AERIAL_ACE}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x4F, // MALE NAUGHTY + .nickname = _("ARCANINE"), + .friendship = 255 + }, + { + .species = SPECIES_ARIADOS, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_PSYCHIC, MOVE_SLUDGE_BOMB, MOVE_SIGNAL_BEAM, MOVE_TOXIC}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x97, // MALE LONELY + .nickname = _("ARIADOS"), + .friendship = 255 + }, + } + }, + { + .name = _("ALBERT"), + .facilityClass = FACILITY_CLASS_COOLTRAINER_3, + .textColor = 7, + .speechBefore = {EC_WORD_LET_S, EC_WORD_HAVE, EC_WORD_AN, EC_WORD_EXCITING, EC_WORD_TIME, EC_WORD_HERE}, + .speechWin = {EC_WORD_YOU_RE, EC_WORD_TOO_WEAK, EC_WORD_TO, EC_WORD_MAKE, EC_WORD_THINGS, EC_WORD_EXCITING}, + .speechLose = {EC_WORD_YOU_RE, EC_WORD_STRONG, EC_WORD_THAT_WAS, EC_WORD_WILD, EC_WORD_AND, EC_WORD_EXCITING}, + .speechAfter = {EC_WORD_I_AM, EC_WORD_TIRED, EC_WORD_AFTER, EC_WORD_THAT, EC_WORD_EXCITING, EC_WORD_MATCH}, + .mons = { + { + .species = SPECIES_KINGDRA, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_TWISTER, MOVE_OCTAZOOKA, MOVE_AURORA_BEAM, MOVE_RETURN}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x15, // FEMALE GENTLE + .nickname = _("KINGDRA"), + .friendship = 255 + }, + { + .species = SPECIES_GOLEM, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_BRICK_BREAK, MOVE_DOUBLE_EDGE}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 1, + .personality = 0x7F, // MALE BRAVE + .nickname = _("GOLEM"), + .friendship = 255 + }, + { + .species = SPECIES_DRAGONITE, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_THUNDER, MOVE_FIRE_BLAST, MOVE_BLIZZARD, MOVE_DRAGON_CLAW}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x01, // FEMALE LONELY + .nickname = _("DRAGONITE"), + .friendship = 255 + }, + { + .species = SPECIES_TYRANITAR, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_EARTHQUAKE, MOVE_CRUNCH, MOVE_THUNDER, MOVE_FIRE_BLAST}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x97, // MALE LONELY + .nickname = _("TYRANITAR"), + .friendship = 255 + }, + { + .species = SPECIES_AMPHAROS, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_REFLECT, MOVE_THUNDER, MOVE_BRICK_BREAK, MOVE_RETURN}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x13, // FEMALE RASH + .nickname = _("AMPHAROS"), + .friendship = 255 + }, + { + .species = SPECIES_VENUSAUR, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_GIGA_DRAIN, MOVE_LEECH_SEED, MOVE_TOXIC, MOVE_BODY_SLAM}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x2A, // MALE QUIET + .nickname = _("VENUSAUR"), + .friendship = 255 + }, + } + }, + }, + .checksum = 0x0001844c +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Knockout_3 = { + .id = 16, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_KNOCKOUT, + .prize = TTPRIZE_CALCIUM, + .trainers = { + { + .name = _("CAMRYN"), + .facilityClass = FACILITY_CLASS_PICNICKER_2, + .textColor = 1, + .speechBefore = {EC_WORD_LET_S, EC_WORD_BATTLE, EC_WORD_I, EC_WORD_WON_T, EC_WORD_LOSE, EC_WORD_EXCL}, + .speechWin = {EC_WORD_I, EC_WORD_SAID, EC_WORD_THAT, EC_WORD_I, EC_WORD_WOULD, EC_WORD_WIN}, + .speechLose = {EC_WORD_OH_QUES, EC_WORD_ELLIPSIS_ELLIPSIS_ELLIPSIS, EC_WORD_DID, EC_WORD_I, EC_WORD_LOSE, EC_WORD_QUES}, + .speechAfter = {EC_WORD_YOU_RE, EC_WORD_TOO_STRONG, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, + .mons = { + { + .species = SPECIES_MURKROW, + .heldItem = ITEM_BLACK_GLASSES, + .moves = {MOVE_AERIAL_ACE, MOVE_SHADOW_BALL, MOVE_FAINT_ATTACK, MOVE_CONFUSE_RAY}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x89, // MALE SERIOUS + .nickname = _("MURKROW"), + .friendship = 255 + }, + { + .species = SPECIES_RAPIDASH, + .heldItem = ITEM_CHARCOAL, + .moves = {MOVE_BOUNCE, MOVE_FLAMETHROWER, MOVE_QUICK_ATTACK, MOVE_DOUBLE_KICK}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("RAPIDASH"), + .friendship = 255 + }, + { + .species = SPECIES_MILTANK, + .heldItem = ITEM_SILK_SCARF, + .moves = {MOVE_MILK_DRINK, MOVE_BRICK_BREAK, MOVE_BODY_SLAM, MOVE_SHADOW_BALL}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("MILTANK"), + .friendship = 255 + }, + { + .species = SPECIES_GOLDUCK, + .heldItem = ITEM_MYSTIC_WATER, + .moves = {MOVE_HYDRO_PUMP, MOVE_ICE_BEAM, MOVE_CALM_MIND, MOVE_LIGHT_SCREEN}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x89, // MALE SERIOUS + .nickname = _("GOLDUCK"), + .friendship = 255 + }, + { + .species = SPECIES_SANDSLASH, + .heldItem = ITEM_SOFT_SAND, + .moves = {MOVE_SANDSTORM, MOVE_AERIAL_ACE, MOVE_EARTHQUAKE, MOVE_ROCK_TOMB}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x89, // MALE SERIOUS + .nickname = _("SANDSLASH"), + .friendship = 255 + }, + { + .species = SPECIES_NIDOQUEEN, + .heldItem = ITEM_HARD_STONE, + .moves = {MOVE_EARTHQUAKE, MOVE_SUPERPOWER, MOVE_SLUDGE_BOMB, MOVE_ROCK_SLIDE}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("NIDOQUEEN"), + .friendship = 255 + }, + } + }, + { + .name = _("NATALIA"), + .facilityClass = FACILITY_CLASS_AROMA_LADY_2, + .textColor = 1, + .speechBefore = {EC_WORD_THIS, EC_MOVE(SWEET_SCENT), EC_WORD_YOU, EC_WORD_LIKE, EC_WORD_IT, EC_WORD_QUES}, + .speechWin = {EC_WORD_WASN_T, EC_WORD_THAT, EC_WORD_NICE, EC_WORD_QUES, 0xFFFF, 0xFFFF}, + .speechLose = {EC_WORD_THAT, EC_WORD_WASN_T, EC_WORD_GOOD, EC_WORD_QUES, 0xFFFF, 0xFFFF}, + .speechAfter = {EC_WORD_I, EC_MOVE2(REFRESH), EC_WORD_THINGS, EC_WORD_WITH, EC_WORD_REFRESHING, EC_MOVE(AROMATHERAPY)}, + .mons = { + { + .species = SPECIES_BELLOSSOM, + .heldItem = ITEM_PERSIM_BERRY, + .moves = {MOVE_SWEET_SCENT, MOVE_ATTRACT, MOVE_PETAL_DANCE, MOVE_FLAIL}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("BELLOSSOM"), + .friendship = 255 + }, + { + .species = SPECIES_VICTREEBEL, + .heldItem = ITEM_MIRACLE_SEED, + .moves = {MOVE_SWEET_SCENT, MOVE_ATTRACT, MOVE_GIGA_DRAIN, MOVE_SLUDGE_BOMB}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x89, // MALE SERIOUS + .nickname = _("VICTREEBEL"), + .friendship = 255 + }, + { + .species = SPECIES_PARASECT, + .heldItem = ITEM_MIRACLE_SEED, + .moves = {MOVE_SWEET_SCENT, MOVE_ATTRACT, MOVE_GIGA_DRAIN, MOVE_AERIAL_ACE}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x89, // MALE SERIOUS + .nickname = _("PARASECT"), + .friendship = 255 + }, + { + .species = SPECIES_VILEPLUME, + .heldItem = ITEM_PERSIM_BERRY, + .moves = {MOVE_SWEET_SCENT, MOVE_ATTRACT, MOVE_PETAL_DANCE, MOVE_SLUDGE_BOMB}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("VILEPLUME"), + .friendship = 255 + }, + { + .species = SPECIES_VENUSAUR, + .heldItem = ITEM_PERSIM_BERRY, + .moves = {MOVE_SWEET_SCENT, MOVE_ATTRACT, MOVE_PETAL_DANCE, MOVE_SLUDGE_BOMB}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("VENUSAUR"), + .friendship = 255 + }, + { + .species = SPECIES_MEGANIUM, + .heldItem = ITEM_MIRACLE_SEED, + .moves = {MOVE_SWEET_SCENT, MOVE_ATTRACT, MOVE_GIGA_DRAIN, MOVE_BODY_SLAM}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x25, // MALE SERIOUS + .nickname = _("MEGANIUM"), + .friendship = 255 + }, + } + }, + { + .name = _("KATHLEEN"), + .facilityClass = FACILITY_CLASS_COOLTRAINER_4, + .textColor = 7, + .speechBefore = {EC_WORD_TOO, EC_WORD_BAD, EC_WORD_IT_S, EC_WORD_OVER, EC_WORD_FOR, EC_WORD_YOU}, + .speechWin = {EC_WORD_SORRY, EC_WORD_ELLIPSIS, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, + .speechLose = {EC_WORD_THIS, EC_WORD_IS, EC_WORD_HARD, EC_WORD_TO, EC_WORD_BELIEVE, EC_WORD_ELLIPSIS}, + .speechAfter = {EC_WORD_YOU, EC_WORD_HAVE, EC_WORD_PURE_POWER, EC_WORD_THAT, EC_WORD_IS, EC_WORD_NATURAL}, + .mons = { + { + .species = SPECIES_MAROWAK, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_EARTHQUAKE, MOVE_BRICK_BREAK, MOVE_BONEMERANG, MOVE_AERIAL_ACE}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x89, // MALE SERIOUS + .nickname = _("MAROWAK"), + .friendship = 255 + }, + { + .species = SPECIES_LAPRAS, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_SURF, MOVE_BLIZZARD, MOVE_PSYCHIC, MOVE_THUNDER}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("LAPRAS"), + .friendship = 255 + }, + { + .species = SPECIES_ARCANINE, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_EXTREME_SPEED, MOVE_FLAMETHROWER, MOVE_CRUNCH, MOVE_AERIAL_ACE}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x57, // MALE SERIOUS + .nickname = _("ARCANINE"), + .friendship = 255 + }, + { + .species = SPECIES_RAICHU, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_QUICK_ATTACK, MOVE_DOUBLE_TEAM, MOVE_IRON_TAIL}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x89, // MALE SERIOUS + .nickname = _("RAICHU"), + .friendship = 255 + }, + { + .species = SPECIES_TOGETIC, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_ANCIENT_POWER, MOVE_SWEET_KISS, MOVE_PSYCHIC, MOVE_MAGICAL_LEAF}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("TOGETIC"), + .friendship = 255 + }, + { + .species = SPECIES_SNORLAX, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_BODY_SLAM, MOVE_REST, MOVE_SNORE, MOVE_SHADOW_BALL}, + .hpEV = 84, + .attackEV = 84, + .defenseEV = 84, + .speedEV = 84, + .spAttackEV = 84, + .spDefenseEV = 84, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x0C, // FEMALE SERIOUS + .nickname = _("SNORLAX"), + .friendship = 255 + }, + } + }, + }, + .checksum = 0x0001738c +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Single_6 = { + .id = 17, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_SINGLE, + .prize = TTPRIZE_CARBOS, + .trainers = { + { + .name = _("BRADEN"), + .facilityClass = FACILITY_CLASS_SWIMMER_MALE_2, + .textColor = 1, + .speechBefore = {EC_WORD_I_AM, EC_WORD_PRETTY, EC_WORD_HAPPY, EC_WORD_WITH, EC_WORD_MY, EC_WORD_TOUGHNESS}, + .speechWin = {EC_WORD_WROOOAAR_EXCL, 0xFFFF, EC_WORD_SERIOUSLY, EC_WORD_I, EC_WORD_WON, EC_WORD_QUES}, + .speechLose = {EC_WORD_YOU, EC_WORD_SHOCKED, EC_WORD_ME, EC_WORD_OUT, EC_WORD_OF, EC_WORD_HAPPINESS}, + .speechAfter = {EC_WORD_NICE, EC_WORD_WORK, EC_WORD_YOU, EC_WORD_EXCL, EC_WORD_YOU_RE, EC_WORD_FABULOUS}, + .mons = { + { + .species = SPECIES_VAPOREON, + .heldItem = ITEM_CHERI_BERRY, + .moves = {MOVE_SURF, MOVE_ICE_BEAM, MOVE_SHADOW_BALL, MOVE_WISH}, + .hpEV = 100, + .attackEV = 0, + .defenseEV = 110, + .speedEV = 0, + .spAttackEV = 200, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x11, // FEMALE QUIET + .nickname = _("VAPOREON"), + .friendship = 255 + }, + { + .species = SPECIES_SLOWBRO, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_SURF, MOVE_CONFUSION, MOVE_AMNESIA, MOVE_DISABLE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x91, // MALE CALM + .nickname = _("SLOWBRO"), + .friendship = 255 + }, + { + .species = SPECIES_POLITOED, + .heldItem = ITEM_CHESTO_BERRY, + .moves = {MOVE_SURF, MOVE_EARTHQUAKE, MOVE_HYPNOSIS, MOVE_SWAGGER}, + .hpEV = 100, + .attackEV = 100, + .defenseEV = 110, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x96, // MALE HARDY + .nickname = _("POLITOED"), + .friendship = 255 + }, + { + .species = SPECIES_TENTACRUEL, + .heldItem = ITEM_POISON_BARB, + .moves = {MOVE_SURF, MOVE_SLUDGE_BOMB, MOVE_ICE_BEAM, MOVE_MIRROR_COAT}, + .hpEV = 100, + .attackEV = 0, + .defenseEV = 110, + .speedEV = 0, + .spAttackEV = 200, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x00, // FEMALE HARDY + .nickname = _("TENTACRUEL"), + .friendship = 255 + }, + { + .species = SPECIES_RATICATE, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_SUPER_FANG, MOVE_HYPER_FANG, MOVE_THUNDER_WAVE, MOVE_QUICK_ATTACK}, + .hpEV = 110, + .attackEV = 200, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x80, // MALE ADAMANT + .nickname = _("RATICATE"), + .friendship = 255 + }, + { + .species = SPECIES_DUNSPARCE, + .heldItem = ITEM_PERSIM_BERRY, + .moves = {MOVE_WATER_PULSE, MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_YAWN}, + .hpEV = 255, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x7F, // MALE BRAVE + .nickname = _("DUNSPARCE"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00016530 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Mixed_1 = { + .id = 18, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_SINGLE, + .prize = TTPRIZE_KINGS_ROCK, + .trainers = { + { + .name = _("ALLYSON"), + .facilityClass = FACILITY_CLASS_COOLTRAINER_4, + .textColor = 7, + .speechBefore = {EC_WORD_I_AM, EC_WORD_NOT, EC_WORD_ABOUT, EC_WORD_TO, EC_WORD_LOSE, EC_WORD_TODAY}, + .speechWin = {EC_WORD_YES, EC_WORD_EXCL_EXCL, EC_WORD_I, EC_WORD_ADORE, EC_WORD_MYSELF, EC_WORD_TODAY}, + .speechLose = {EC_WORD_I_WAS, EC_WORD_CONFUSED, EC_WORD_ABOUT, EC_WORD_THINGS, EC_WORD_I, EC_WORD_THINK}, + .speechAfter = {EC_WORD_YOU_RE, EC_WORD_TOO, EC_WORD_STRONG, EC_WORD_TODAY, EC_WORD_THAT_S, EC_WORD_ALL}, + .mons = { + { + .species = SPECIES_STARMIE, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_SURF, MOVE_PSYCHIC, MOVE_THUNDER_WAVE, MOVE_RECOVER}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 1, + .personality = 0x0F, // GENDERLESS MODEST + .nickname = _("STARMIE"), + .friendship = 255 + }, + { + .species = SPECIES_BLASTOISE, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_HYDRO_PUMP, MOVE_ICE_BEAM, MOVE_EARTHQUAKE, MOVE_MIRROR_COAT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x32, // MALE HARDY + .nickname = _("BLASTOISE"), + .friendship = 255 + }, + { + .species = SPECIES_KINGDRA, + .heldItem = ITEM_CHESTO_BERRY, + .moves = {MOVE_SURF, MOVE_ICE_BEAM, MOVE_DRAGON_BREATH, MOVE_REST}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x8C, // MALE MODEST + .nickname = _("KINGDRA"), + .friendship = 255 + }, + { + .species = SPECIES_QUAGSIRE, + .heldItem = ITEM_CHESTO_BERRY, + .moves = {MOVE_SURF, MOVE_EARTHQUAKE, MOVE_ICE_BEAM, MOVE_REST}, + .hpEV = 0, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 155, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x16, // FEMALE SASSY + .nickname = _("QUAGSIRE"), + .friendship = 255 + }, + { + .species = SPECIES_LAPRAS, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_SURF, MOVE_ICE_BEAM, MOVE_PSYCHIC, MOVE_ATTRACT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 1, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("LAPRAS"), + .friendship = 255 + }, + { + .species = SPECIES_DRAGONITE, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_SURF, MOVE_ICE_BEAM, MOVE_EARTHQUAKE, MOVE_LIGHT_SCREEN}, + .hpEV = 0, + .attackEV = 100, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 155, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x96, // MALE HARDY + .nickname = _("DRAGONITE"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00016e32 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Single_1 = { + .id = 19, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_SINGLE, + .prize = TTPRIZE_UP_GRADE, + .trainers = { + { + .name = _("ALBERTO"), + .facilityClass = FACILITY_CLASS_SAILOR_2, + .textColor = 5, + .speechBefore = {EC_WORD_LET_S, EC_WORD_GET, EC_WORD_WITH, EC_WORD_IT, EC_WORD_RIGHT, EC_WORD_AWAY}, + .speechWin = {EC_WORD_YO, EC_WORD_EXCL_EXCL, EC_WORD_YOU, EC_WORD_GIVE_UP, EC_WORD_NOW, EC_WORD_EH_QUES}, + .speechLose = {EC_WORD_IT_S, EC_WORD_ALL, EC_WORD_OVER, EC_WORD_ELLIPSIS, EC_WORD_I, EC_WORD_SURRENDER}, + .speechAfter = {EC_WORD_OKAY, EC_WORD_I, EC_WORD_CONCEDE, EC_WORD_ELLIPSIS, EC_WORD_I, EC_WORD_LOST}, + .mons = { + { + .species = SPECIES_FERALIGATR, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_SURF, MOVE_EARTHQUAKE, MOVE_CRUNCH, MOVE_DRAGON_CLAW}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x32, // MALE HARDY + .nickname = _("FERALIGATR"), + .friendship = 255 + }, + { + .species = SPECIES_POLIWRATH, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_SURF, MOVE_EARTHQUAKE, MOVE_MEGA_KICK, MOVE_ROCK_TOMB}, + .hpEV = 100, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 1, + .personality = 0x96, // MALE HARDY + .nickname = _("POLIWRATH"), + .friendship = 255 + }, + { + .species = SPECIES_KANGASKHAN, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_CRUSH_CLAW, MOVE_EARTHQUAKE, MOVE_ROCK_TOMB, MOVE_AERIAL_ACE}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 130, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 125, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x03, // FEMALE ADAMANT + .nickname = _("KANGASKHAN"), + .friendship = 255 + }, + { + .species = SPECIES_MILTANK, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_EARTHQUAKE, MOVE_SHADOW_BALL, MOVE_ROCK_TOMB, MOVE_MILK_DRINK}, + .hpEV = 155, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x03, // FEMALE ADAMANT + .nickname = _("MILTANK"), + .friendship = 255 + }, + { + .species = SPECIES_GOLDUCK, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_CROSS_CHOP, MOVE_SURF, MOVE_ICE_BEAM, MOVE_DISABLE}, + .hpEV = 0, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 210, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 1, + .personality = 0x96, // MALE HARDY + .nickname = _("GOLDUCK"), + .friendship = 255 + }, + { + .species = SPECIES_GRANBULL, + .heldItem = ITEM_LIECHI_BERRY, + .moves = {MOVE_CRUNCH, MOVE_EARTHQUAKE, MOVE_SHADOW_BALL, MOVE_SLUDGE_BOMB}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 130, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 125, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0xCA, // MALE BRAVE + .nickname = _("GRANBULL"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00016890 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Mixed_5 = { + .id = 20, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_DOUBLE, + .prize = TTPRIZE_METAL_COAT, + .trainers = { + { + .name = _("KAT & KIPP"), + .facilityClass = FACILITY_CLASS_SIS_AND_BRO_2, + .textColor = 4, + .speechBefore = {EC_WORD_I_AM, EC_WORD_GOING, EC_WORD_TO, EC_WORD_TRY, EC_WORD_MY, EC_WORD_BEST}, + .speechWin = {EC_WORD_WAY, EC_WORD_TO, EC_WORD_GO, EC_WORD_MY, EC_WORD_AWESOME, EC_WORD_BROTHER}, + .speechLose = {EC_WORD_SIGH, EC_WORD_ELLIPSIS, EC_WORD_THAT_S, EC_WORD_HOW, EC_WORD_IT, EC_WORD_GOES}, + .speechAfter = {EC_WORD_OKAY, EC_WORD_MY, EC_WORD_AWESOME, EC_WORD_BROTHER, EC_WORD_FIGHT, EC_WORD_FIGHT}, + .mons = { + { + .species = SPECIES_SNEASEL, + .heldItem = ITEM_RAWST_BERRY, + .moves = {MOVE_DIG, MOVE_TORMENT, MOVE_REFLECT, MOVE_TAUNT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 155, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x0D, // FEMALE JOLLY + .nickname = _("SNEASEL"), + .friendship = 255 + }, + { + .species = SPECIES_OMASTAR, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_DIVE, MOVE_LEER, MOVE_TICKLE, MOVE_SUPERSONIC}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x2D, // MALE CALM + .nickname = _("OMASTAR"), + .friendship = 255 + }, + { + .species = SPECIES_DEWGONG, + .heldItem = ITEM_PERSIM_BERRY, + .moves = {MOVE_DIVE, MOVE_ENCORE, MOVE_GROWL, MOVE_SAFEGUARD}, + .hpEV = 200, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 210, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x14, // FEMALE CALM + .nickname = _("DEWGONG"), + .friendship = 255 + }, + { + .species = SPECIES_QUAGSIRE, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_DIVE, MOVE_YAWN, MOVE_AMNESIA, MOVE_SAFEGUARD}, + .hpEV = 200, + .attackEV = 0, + .defenseEV = 110, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 200, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x91, // MALE CALM + .nickname = _("QUAGSIRE"), + .friendship = 255 + }, + { + .species = SPECIES_CORSOLA, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_DIG, MOVE_MIRROR_COAT, MOVE_RECOVER, MOVE_CONFUSE_RAY}, + .hpEV = 155, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x17, // FEMALE CAREFUL + .nickname = _("CORSOLA"), + .friendship = 255 + }, + { + .species = SPECIES_SANDSLASH, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_DIG, MOVE_COUNTER, MOVE_DEFENSE_CURL, MOVE_SAND_ATTACK}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x94, // MALE CAREFUL + .nickname = _("SANDSLASH"), + .friendship = 255 + }, + } + }, + { + .name = _("KAT & KIPP"), + .facilityClass = FACILITY_CLASS_SIS_AND_BRO_2, + .textColor = 4, + .speechBefore = {EC_WORD_FUFUFU, EC_WORD_ELLIPSIS, EC_WORD_WE, EC_WORD_NEVER, EC_WORD_LOSE, EC_WORD_EXCL}, + .speechWin = {EC_WORD_FUFUFU, EC_WORD_ELLIPSIS, EC_WORD_WE_RE, EC_WORD_TOO_STRONG, EC_WORD_TO, EC_WORD_LOSE}, + .speechLose = {EC_WORD_WHAT, EC_WORD_HUH_QUES, EC_WORD_ARE, EC_WORD_YOU, EC_WORD_JOKING, EC_WORD_QUES}, + .speechAfter = {EC_WORD_WAAAH, EC_WORD_WAAAH, EC_WORD_OH, EC_WORD_BIG, EC_WORD_SISTER, EC_WORD_EXCL}, + .mons = { + { + .species = SPECIES_FURRET, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_DIG, MOVE_AMNESIA, MOVE_DEFENSE_CURL, MOVE_FOLLOW_ME}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x80, // MALE ADAMANT + .nickname = _("FURRET"), + .friendship = 255 + }, + { + .species = SPECIES_AZUMARILL, + .heldItem = ITEM_WHITE_HERB, + .moves = {MOVE_DIVE, MOVE_LIGHT_SCREEN, MOVE_TAIL_WHIP, MOVE_DEFENSE_CURL}, + .hpEV = 155, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x14, // FEMALE CALM + .nickname = _("AZUMARILL"), + .friendship = 255 + }, + { + .species = SPECIES_KINGLER, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_DIVE, MOVE_HARDEN, MOVE_LEER, MOVE_AMNESIA}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x91, // MALE CALM + .nickname = _("KINGLER"), + .friendship = 255 + }, + { + .species = SPECIES_CLOYSTER, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_DIVE, MOVE_WITHDRAW, MOVE_PROTECT, MOVE_SUPERSONIC}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x14, // FEMALE CALM + .nickname = _("CLOYSTER"), + .friendship = 255 + }, + { + .species = SPECIES_QUAGSIRE, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_DIG, MOVE_YAWN, MOVE_AMNESIA, MOVE_SAFEGUARD}, + .hpEV = 200, + .attackEV = 0, + .defenseEV = 110, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 200, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x94, // MALE CAREFUL + .nickname = _("QUAGSIRE"), + .friendship = 255 + }, + { + .species = SPECIES_KABUTOPS, + .heldItem = ITEM_PECHA_BERRY, + .moves = {MOVE_DIG, MOVE_SAND_ATTACK, MOVE_ENDURE, MOVE_CONFUSE_RAY}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x30, // MALE CAREFUL + .nickname = _("KABUTOPS"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00015d7c +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Double_8 = { + .id = 21, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_DOUBLE, + .prize = TTPRIZE_MENTAL_HERB, + .trainers = { + { + .name = _("GEB&MEGAN"), + .facilityClass = FACILITY_CLASS_COOL_COUPLE, + .textColor = 7, + .speechBefore = {EC_WORD_YOU_RE, EC_WORD_OUR, EC_WORD_OPPONENT, EC_WORD_QUES, EC_WORD_PUSHOVER, EC_WORD_HAHAHA}, + .speechWin = {EC_WORD_HAHAHA, EC_WORD_SORRY, EC_WORD_MY, EC_WORD_FRIEND, EC_WORD_TOUGH, EC_WORD_LOSS}, + .speechLose = {EC_WORD_YOU_RE, EC_WORD_SERIOUS, EC_WORD_AREN_T, EC_WORD_YOU, EC_WORD_FRIEND, EC_WORD_QUES}, + .speechAfter = {EC_WORD_WON_T, EC_WORD_YOU, EC_WORD_GET, EC_WORD_LOST, EC_WORD_PLEASE, EC_WORD_QUES}, + .mons = { + { + .species = SPECIES_POLITOED, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_SURF, MOVE_HYPNOSIS, MOVE_PERISH_SONG, MOVE_SWAGGER}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x8C, // MALE MODEST + .nickname = _("POLITOED"), + .friendship = 255 + }, + { + .species = SPECIES_GYARADOS, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_HYPER_BEAM, MOVE_DRAGON_DANCE, MOVE_THUNDER_WAVE, MOVE_THUNDERBOLT}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x96, // MALE HARDY + .nickname = _("GYARADOS"), + .friendship = 255 + }, + { + .species = SPECIES_LAPRAS, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_SURF, MOVE_PSYCHIC, MOVE_THUNDERBOLT, MOVE_ICE_BEAM}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("LAPRAS"), + .friendship = 255 + }, + { + .species = SPECIES_NIDOQUEEN, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_SURF, MOVE_EARTHQUAKE, MOVE_SUPERPOWER, MOVE_ROCK_SLIDE}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x00, // FEMALE HARDY + .nickname = _("NIDOQUEEN"), + .friendship = 255 + }, + { + .species = SPECIES_JYNX, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_WATER_PULSE, MOVE_REFLECT, MOVE_LIGHT_SCREEN, MOVE_PSYCHIC}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x00, // FEMALE HARDY + .nickname = _("JYNX"), + .friendship = 255 + }, + { + .species = SPECIES_GIRAFARIG, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_LIGHT_SCREEN, MOVE_CRUNCH, MOVE_PSYCHIC, MOVE_REFLECT}, + .hpEV = 210, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x8C, // MALE MODEST + .nickname = _("GIRAFARIG"), + .friendship = 255 + }, + } + }, + { + .name = _("GEB&MEGAN"), + .facilityClass = FACILITY_CLASS_COOL_COUPLE, + .textColor = 7, + .speechBefore = {EC_WORD_YOU_RE, EC_WORD_OUR, EC_WORD_FOE, EC_WORD_QUES, EC_WORD_GIGGLE, EC_WORD_ELLIPSIS}, + .speechWin = {EC_WORD_GIGGLE, EC_WORD_ELLIPSIS, EC_WORD_I_AM, EC_WORD_SO, EC_WORD_SORRY, 0xFFFF}, + .speechLose = {EC_WORD_MY, EC_WORD_WORD, EC_WORD_THIS, EC_WORD_IS, EC_WORD_JUST, EC_WORD_INCREDIBLE}, + .speechAfter = {EC_WORD_WE, EC_WORD_NEED, EC_WORD_TO, EC_WORD_TRAIN, EC_WORD_SOME, EC_WORD_MORE}, + .mons = { + { + .species = SPECIES_MAROWAK, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_AERIAL_ACE, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x94, // MALE CAREFUL + .nickname = _("MAROWAK"), + .friendship = 255 + }, + { + .species = SPECIES_URSARING, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_DOUBLE_EDGE, MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_AERIAL_ACE}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("URSARING"), + .friendship = 255 + }, + { + .species = SPECIES_SLOWKING, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_SURF, MOVE_PSYCHIC, MOVE_ICE_BEAM, MOVE_SHADOW_BALL}, + .hpEV = 0, + .attackEV = 110, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 200, + .spDefenseEV = 200, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x11, // FEMALE QUIET + .nickname = _("SLOWKING"), + .friendship = 255 + }, + { + .species = SPECIES_ALAKAZAM, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_PSYCHIC, MOVE_PROTECT, MOVE_LIGHT_SCREEN, MOVE_REFLECT}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 200, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x41, // MALE MODEST + .nickname = _("ALAKAZAM"), + .friendship = 255 + }, + { + .species = SPECIES_NIDOKING, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_SURF, MOVE_MEGAHORN, MOVE_THUNDERBOLT, MOVE_ICE_BEAM}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x00, // MALE HARDY + .nickname = _("NIDOKING"), + .friendship = 255 + }, + { + .species = SPECIES_RHYDON, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_EARTHQUAKE, MOVE_PROTECT, MOVE_MEGAHORN, MOVE_ROCK_SLIDE}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x93, // MALE SASSY + .nickname = _("RHYDON"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x000160f4 +}; + +static const struct TrainerTowerFloor gUnknown_847FD0C = { + .id = 22, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_DOUBLE, + .prize = TTPRIZE_ZINC, + .trainers = { + { + .name = _("LISA&LEAH"), + .facilityClass = FACILITY_CLASS_TWINS_2, + .textColor = 1, + .speechBefore = {EC_WORD_ABSOLUTELY, EC_WORD_WE_RE, EC_WORD_GOING, EC_WORD_TO, EC_WORD_WIN, EC_WORD_EXCL}, + .speechWin = {EC_WORD_YEAH_YEAH, EC_WORD_EXCL_EXCL, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, + .speechLose = {EC_WORD_AWW, EC_WORD_EXCL, EC_WORD_WAAAH, EC_WORD_EXCL_EXCL, 0xFFFF, 0xFFFF}, + .speechAfter = {EC_WORD_EXCUSE_ME, EC_WORD_BUT, EC_WORD_YOU_RE, EC_WORD_ALL, EC_WORD_TOO_STRONG, 0xFFFF}, + .mons = { + { + .species = SPECIES_POLIWAG, + .heldItem = ITEM_CHERI_BERRY, + .moves = {MOVE_SURF, MOVE_PROTECT, MOVE_TOXIC, MOVE_DOUBLE_TEAM}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x87, // MALE TIMID + .nickname = _("POLIWAG"), + .friendship = 255 + }, + { + .species = SPECIES_SQUIRTLE, + .heldItem = ITEM_MYSTIC_WATER, + .moves = {MOVE_WATER_PULSE, MOVE_PROTECT, MOVE_TOXIC, MOVE_MIRROR_COAT}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x2D, // MALE CALM + .nickname = _("SQUIRTLE"), + .friendship = 255 + }, + { + .species = SPECIES_CHINCHOU, + .heldItem = ITEM_MAGNET, + .moves = {MOVE_SURF, MOVE_THUNDER_WAVE, MOVE_CONFUSE_RAY, MOVE_THUNDERBOLT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("CHINCHOU"), + .friendship = 255 + }, + { + .species = SPECIES_NIDORAN_F, + .heldItem = ITEM_POISON_BARB, + .moves = {MOVE_WATER_PULSE, MOVE_SLUDGE_BOMB, MOVE_CRUNCH, MOVE_DIG}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x00, // FEMALE HARDY + .nickname = _("NIDORAN♀"), + .friendship = 255 + }, + { + .species = SPECIES_CLEFAIRY, + .heldItem = ITEM_WHITE_HERB, + .moves = {MOVE_WATER_PULSE, MOVE_DOUBLE_TEAM, MOVE_SING, MOVE_MINIMIZE}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("CLEFAIRY"), + .friendship = 255 + }, + { + .species = SPECIES_HORSEA, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_SURF, MOVE_SMOKESCREEN, MOVE_ATTRACT, MOVE_DRAGON_RAGE}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x2D, // MALE CALM + .nickname = _("HORSEA"), + .friendship = 255 + }, + } + }, + { + .name = _("LISA&LEAH"), + .facilityClass = FACILITY_CLASS_TWINS_2, + .textColor = 1, + .speechBefore = {EC_WORD_CAN, EC_WORD_WE, EC_WORD_WIN, EC_WORD_QUES, EC_WORD_IT_S, EC_WORD_EXCITING}, + .speechWin = {EC_WORD_YEAH_YEAH, EC_WORD_EXCL_EXCL, EC_WORD_YOU, EC_WORD_MAKE, EC_WORD_ME, EC_WORD_HAPPY}, + .speechLose = {EC_WORD_AWW, EC_WORD_EXCL, EC_WORD_WAAAH, EC_WORD_EXCL_EXCL, 0xFFFF, 0xFFFF}, + .speechAfter = {EC_WORD_YOU, EC_WORD_SHOULD, EC_WORD_NOT, EC_MOVE2(BEAT_UP), EC_WORD_ON, EC_WORD_CHILDREN}, + .mons = { + { + .species = SPECIES_WOOPER, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_SURF, MOVE_EARTHQUAKE, MOVE_YAWN, MOVE_FLASH}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x93, // MALE SASSY + .nickname = _("WOOPER"), + .friendship = 255 + }, + { + .species = SPECIES_PSYDUCK, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_SURF, MOVE_CROSS_CHOP, MOVE_HYPNOSIS, MOVE_DISABLE}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 1, + .personality = 0x96, // MALE HARDY + .nickname = _("PSYDUCK"), + .friendship = 255 + }, + { + .species = SPECIES_SNUBBULL, + .heldItem = ITEM_PECHA_BERRY, + .moves = {MOVE_WATER_PULSE, MOVE_THUNDER_WAVE, MOVE_CRUNCH, MOVE_SHADOW_BALL}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x00, // FEMALE HARDY + .nickname = _("SNUBBULL"), + .friendship = 255 + }, + { + .species = SPECIES_JIGGLYPUFF, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_WATER_PULSE, MOVE_THUNDER_WAVE, MOVE_SING, MOVE_DISABLE}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("JIGGLYPUFF"), + .friendship = 255 + }, + { + .species = SPECIES_NIDORAN_M, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_WATER_PULSE, MOVE_SLUDGE_BOMB, MOVE_HORN_DRILL, MOVE_DIG}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x00, // MALE HARDY + .nickname = _("NIDORAN♂"), + .friendship = 255 + }, + { + .species = SPECIES_TOTODILE, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_SURF, MOVE_PROTECT, MOVE_TOXIC, MOVE_DOUBLE_TEAM}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x2D, // MALE CALM + .nickname = _("TOTODILE"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(15), + }, + .checksum = 0x000197d4 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Knockout_7 = { + .id = 23, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_KNOCKOUT, + .prize = TTPRIZE_PROTEIN, + .trainers = { + { + .name = _("PRISCILLA"), + .facilityClass = FACILITY_CLASS_TUBER_3, + .textColor = 1, + .speechBefore = {EC_WORD_I_AM, EC_WORD_A_LITTLE, EC_WORD_POKEMON, EC_WORD_GIRL, EC_WORD_HERE_I_COME, EC_WORD_EXCL}, + .speechWin = {EC_WORD_WAAAH, EC_WORD_EXCL, EC_WORD_DID, EC_WORD_I, EC_WORD_WIN, EC_WORD_QUES}, + .speechLose = {EC_WORD_OH_DEAR, EC_WORD_ELLIPSIS, EC_WORD_I, EC_WORD_COULDN_T, EC_WORD_WIN, EC_WORD_ELLIPSIS}, + .speechAfter = {EC_WORD_YOU_RE, EC_WORD_A, EC_WORD_NICE, EC_WORD_TRAINER, EC_WORD_THANK_YOU, EC_WORD_EXCL}, + .mons = { + { + .species = SPECIES_GOLDEEN, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_WATER_PULSE, MOVE_MEGAHORN, MOVE_SUPERSONIC, MOVE_ICE_BEAM}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x96, // MALE HARDY + .nickname = _("GOLDEEN"), + .friendship = 0 + }, + { + .species = SPECIES_SEAKING, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_SURF, MOVE_MEGAHORN, MOVE_HORN_DRILL, MOVE_PROTECT}, + .hpEV = 100, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x00, // FEMALE HARDY + .nickname = _("SEAKING"), + .friendship = 0 + }, + { + .species = SPECIES_LANTURN, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_SURF, MOVE_THUNDERBOLT, MOVE_THUNDER_WAVE, MOVE_ICE_BEAM}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 100, + .spDefenseEV = 210, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x8C, // MALE MODEST + .nickname = _("LANTURN"), + .friendship = 0 + }, + { + .species = SPECIES_LANTURN, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_HYDRO_PUMP, MOVE_THUNDER, MOVE_ICE_BEAM, MOVE_RAIN_DANCE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 100, + .spDefenseEV = 210, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("LANTURN"), + .friendship = 0 + }, + { + .species = SPECIES_GOLDEEN, + .heldItem = ITEM_APICOT_BERRY, + .moves = {MOVE_WATER_PULSE, MOVE_DOUBLE_EDGE, MOVE_TOXIC, MOVE_PSYBEAM}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x00, // FEMALE HARDY + .nickname = _("GOLDEEN"), + .friendship = 0 + }, + { + .species = SPECIES_SEAKING, + .heldItem = ITEM_PETAYA_BERRY, + .moves = {MOVE_SURF, MOVE_HYPER_BEAM, MOVE_ICE_BEAM, MOVE_PSYBEAM}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x96, // MALE HARDY + .nickname = _("SEAKING"), + .friendship = 0 + }, + } + }, + { + .name = _("CHARLOTTE"), + .facilityClass = FACILITY_CLASS_LADY_2, + .textColor = 1, + .speechBefore = {EC_WORD_HELLO, EC_WORD_THERE, EC_WORD_I_AM, EC_WORD_A, EC_WORD_POKEMON, EC_WORD_LADY}, + .speechWin = {EC_WORD_OH, EC_WORD_MY, EC_WORD_MY, EC_WORD_ELLIPSIS, EC_WORD_I_AM, EC_WORD_SORRY}, + .speechLose = {EC_WORD_YOU_RE, EC_WORD_BETTER, EC_WORD_THAN, EC_WORD_A, EC_WORD_POKEMON, EC_WORD_LADY}, + .speechAfter = {EC_WORD_HOHOHO, EC_WORD_THANK_YOU, EC_WORD_FOR, EC_WORD_AN, EC_WORD_AMUSING, EC_WORD_BATTLE}, + .mons = { + { + .species = SPECIES_OCTILLERY, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_OCTAZOOKA, MOVE_ICE_BEAM, MOVE_PSYCHIC, MOVE_FLAMETHROWER}, + .hpEV = 55, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("OCTILLERY"), + .friendship = 255 + }, + { + .species = SPECIES_QWILFISH, + .heldItem = ITEM_PERSIM_BERRY, + .moves = {MOVE_SURF, MOVE_TOXIC, MOVE_REVENGE, MOVE_DOUBLE_TEAM}, + .hpEV = 200, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 210, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x14, // FEMALE CALM + .nickname = _("QWILFISH"), + .friendship = 255 + }, + { + .species = SPECIES_REMORAID, + .heldItem = ITEM_PECHA_BERRY, + .moves = {MOVE_SURF, MOVE_PSYCHIC, MOVE_ICE_BEAM, MOVE_THUNDER_WAVE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x96, // MALE HARDY + .nickname = _("REMORAID"), + .friendship = 255 + }, + { + .species = SPECIES_REMORAID, + .heldItem = ITEM_WHITE_HERB, + .moves = {MOVE_WATER_PULSE, MOVE_BLIZZARD, MOVE_FIRE_BLAST, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x00, // FEMALE HARDY + .nickname = _("REMORAID"), + .friendship = 255 + }, + { + .species = SPECIES_OCTILLERY, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_OCTAZOOKA, MOVE_SLUDGE_BOMB, MOVE_THUNDER_WAVE, MOVE_HYPER_BEAM}, + .hpEV = 155, + .attackEV = 100, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x93, // MALE SASSY + .nickname = _("OCTILLERY"), + .friendship = 255 + }, + { + .species = SPECIES_QWILFISH, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_HYDRO_PUMP, MOVE_SLUDGE_BOMB, MOVE_SHADOW_BALL, MOVE_DESTINY_BOND}, + .hpEV = 100, + .attackEV = 100, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 210, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x96, // MALE HARDY + .nickname = _("QWILFISH"), + .friendship = 255 + }, + } + }, + { + .name = _("SHANIA"), + .facilityClass = FACILITY_CLASS_SWIMMER_FEMALE_2, + .textColor = 1, + .speechBefore = {EC_WORD_A, EC_WORD_POKEMON, EC_WORD_HEROINE, EC_WORD_THAT_S, EC_WORD_WHAT, EC_WORD_I_AM}, + .speechWin = {EC_WORD_AHAHA, EC_WORD_NO, EC_WORD_WAY, EC_WORD_YOU_RE, EC_WORD_TOO_WEAK, EC_WORD_SERIOUSLY}, + .speechLose = {EC_WORD_WHY, EC_WORD_QUES_EXCL, EC_WORD_YOU, EC_WORD_SHOULD, EC_WORD_NOT, EC_WORD_LIE}, + .speechAfter = {EC_WORD_NICE, EC_WORD_BATTLE, EC_WORD_THANKS, EC_WORD_FOR, EC_WORD_ENTERTAINING, EC_WORD_ME}, + .mons = { + { + .species = SPECIES_MANTINE, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_DOUBLE_EDGE, MOVE_EARTHQUAKE, MOVE_AERIAL_ACE, MOVE_ROCK_SLIDE}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("MANTINE"), + .friendship = 255 + }, + { + .species = SPECIES_MAGIKARP, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_SPLASH, MOVE_TACKLE, MOVE_NONE, MOVE_NONE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0D, // FEMALE JOLLY + .nickname = _("MAGIKARP"), + .friendship = 255 + }, + { + .species = SPECIES_MANTINE, + .heldItem = ITEM_MENTAL_HERB, + .moves = {MOVE_SURF, MOVE_ICE_BEAM, MOVE_CONFUSE_RAY, MOVE_ATTRACT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("MANTINE"), + .friendship = 255 + }, + { + .species = SPECIES_GYARADOS, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_HYPER_BEAM, MOVE_THUNDER_WAVE, MOVE_EARTHQUAKE, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x03, // FEMALE ADAMANT + .nickname = _("GYARADOS"), + .friendship = 255 + }, + { + .species = SPECIES_MAGIKARP, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_FLAIL, MOVE_TACKLE, MOVE_NONE, MOVE_NONE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x94, // MALE CAREFUL + .nickname = _("MAGIKARP"), + .friendship = 255 + }, + { + .species = SPECIES_GYARADOS, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_DOUBLE_EDGE, MOVE_THUNDER_WAVE, MOVE_EARTHQUAKE, MOVE_DRAGON_DANCE}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("GYARADOS"), + .friendship = 255 + }, + } + }, + }, + .checksum = 0x0001521d +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Knockout_4 = { + .id = 24, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_KNOCKOUT, + .prize = TTPRIZE_DRAGON_SCALE, + .trainers = { + { + .name = _("BRENNAN"), + .facilityClass = FACILITY_CLASS_SAILOR_2, + .textColor = 1, + .speechBefore = {EC_WORD_TAKE, EC_WORD_THINGS, EC_WORD_EASY, EC_WORD_ELLIPSIS, EC_WORD_THAT_S, EC_WORD_IMPORTANT}, + .speechWin = {EC_WORD_YOU, EC_WORD_LOSE, EC_WORD_IF, EC_WORD_YOU, EC_WORD_GIVE_UP, EC_WORD_EXCL}, + .speechLose = {EC_WORD_OOPS, EC_WORD_YOU, EC_WORD_GOT, EC_WORD_AN, EC_WORD_EASY, EC_WORD_WIN}, + .speechAfter = {EC_WORD_I, EC_WORD_DON_T, EC_MOVE(GRUDGE), EC_WORD_YOU, EC_WORD_BUT, EC_WORD_ELLIPSIS}, + .mons = { + { + .species = SPECIES_LAPRAS, + .heldItem = ITEM_CHESTO_BERRY, + .moves = {MOVE_HYDRO_PUMP, MOVE_PSYCHIC, MOVE_ATTRACT, MOVE_REST}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 255, + .otId = 15 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("LAPRAS"), + .friendship = 255 + }, + { + .species = SPECIES_KINGDRA, + .heldItem = ITEM_CHESTO_BERRY, + .moves = {MOVE_HYDRO_PUMP, MOVE_BLIZZARD, MOVE_DRAGON_BREATH, MOVE_REST}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x8C, // MALE MODEST + .nickname = _("KINGDRA"), + .friendship = 255 + }, + { + .species = SPECIES_MACHAMP, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_CROSS_CHOP, MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_HYPER_BEAM}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 130, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 125, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x4E, // MALE ADAMANT + .nickname = _("MACHAMP"), + .friendship = 255 + }, + { + .species = SPECIES_CHANSEY, + .heldItem = ITEM_ORAN_BERRY, + .moves = {MOVE_WATER_PULSE, MOVE_SOFT_BOILED, MOVE_MINIMIZE, MOVE_THUNDER_WAVE}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x05, // FEMALE BOLD + .nickname = _("CHANSEY"), + .friendship = 255 + }, + { + .species = SPECIES_TAUROS, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_DOUBLE_EDGE, MOVE_EARTHQUAKE, MOVE_ROCK_TOMB, MOVE_SWAGGER}, + .hpEV = 110, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x03, // MALE ADAMANT + .nickname = _("TAUROS"), + .friendship = 255 + }, + { + .species = SPECIES_SNORLAX, + .heldItem = ITEM_ORAN_BERRY, + .moves = {MOVE_DOUBLE_EDGE, MOVE_EARTHQUAKE, MOVE_DOUBLE_TEAM, MOVE_REST}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x21, // MALE IMPISH + .nickname = _("SNORLAX"), + .friendship = 255 + }, + } + }, + { + .name = _("KADEN"), + .facilityClass = FACILITY_CLASS_FISHERMAN_2, + .textColor = 1, + .speechBefore = {EC_WORD_MY, EC_WORD_FISHING, EC_WORD_FASHION, EC_WORD_APPEAL, EC_WORD_IS, EC_WORD_FANTASTIC}, + .speechWin = {EC_WORD_MY, EC_WORD_FANTASTIC, EC_WORD_FASHION, EC_WORD_APPEAL, EC_WORD_WINS, EC_WORD_OUT}, + .speechLose = {EC_WORD_UH_OH, EC_WORD_ELLIPSIS, EC_WORD_I, EC_WORD_SEE, EC_WORD_I, EC_WORD_LOST}, + .speechAfter = {EC_WORD_FASHION, EC_WORD_APPEAL, EC_WORD_WON_T, EC_WORD_GET, EC_WORD_ME, EC_WORD_WINS}, + .mons = { + { + .species = SPECIES_CHINCHOU, + .heldItem = ITEM_MAGNET, + .moves = {MOVE_THUNDERBOLT, MOVE_THUNDER_WAVE, MOVE_CONFUSE_RAY, MOVE_PROTECT}, + .hpEV = 100, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x00, // FEMALE HARDY + .nickname = _("CHINCHOU"), + .friendship = 255 + }, + { + .species = SPECIES_DRATINI, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_WATER_PULSE, MOVE_THUNDER_WAVE, MOVE_DRAGON_BREATH, MOVE_PROTECT}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x00, // FEMALE HARDY + .nickname = _("DRATINI"), + .friendship = 255 + }, + { + .species = SPECIES_SLOWPOKE, + .heldItem = ITEM_PECHA_BERRY, + .moves = {MOVE_WATER_PULSE, MOVE_YAWN, MOVE_DISABLE, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x96, // MALE HARDY + .nickname = _("SLOWPOKE"), + .friendship = 255 + }, + { + .species = SPECIES_MAGIKARP, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_SPLASH, MOVE_FLAIL, MOVE_TACKLE, MOVE_NONE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 23 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x17, // FEMALE CAREFUL + .nickname = _("MAGIKARP"), + .friendship = 255 + }, + { + .species = SPECIES_SEAKING, + .heldItem = ITEM_CHERI_BERRY, + .moves = {MOVE_HORN_DRILL, MOVE_MEGAHORN, MOVE_SUPERSONIC, MOVE_AGILITY}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 23 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x17, // FEMALE CAREFUL + .nickname = _("SEAKING"), + .friendship = 255 + }, + { + .species = SPECIES_TENTACRUEL, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_MIRROR_COAT, MOVE_SUPERSONIC, MOVE_PROTECT, MOVE_TOXIC}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x96, // MALE HARDY + .nickname = _("TENTACRUEL"), + .friendship = 255 + }, + } + }, + { + .name = _("EMANUEL"), + .facilityClass = FACILITY_CLASS_GENTLEMAN_2, + .textColor = 1, + .speechBefore = {EC_WORD_HMM, EC_WORD_QUES, EC_WORD_ARE, EC_WORD_YOU, EC_WORD_SKILLED, EC_WORD_QUES}, + .speechWin = {EC_WORD_I, EC_WORD_SEE, EC_WORD_I, EC_WORD_WASN_T, EC_WORD_RIGHT, EC_WORD_ELLIPSIS}, + .speechLose = {EC_WORD_YOU, EC_WORD_TRULY, EC_WORD_ARE, EC_WORD_A, EC_WORD_MASTER, EC_WORD_TRAINER}, + .speechAfter = {EC_WORD_I_AM, EC_WORD_SORRY, EC_WORD_THAT, EC_WORD_I_WAS, EC_WORD_YOUR, EC_WORD_OPPONENT}, + .mons = { + { + .species = SPECIES_VAPOREON, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_SURF, MOVE_ICE_BEAM, MOVE_ATTRACT, MOVE_BITE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x14, // FEMALE CALM + .nickname = _("VAPOREON"), + .friendship = 255 + }, + { + .species = SPECIES_ESPEON, + .heldItem = ITEM_CHESTO_BERRY, + .moves = {MOVE_PSYCHIC, MOVE_BITE, MOVE_REFLECT, MOVE_REST}, + .hpEV = 110, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 200, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("ESPEON"), + .friendship = 255 + }, + { + .species = SPECIES_BLISSEY, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_WATER_PULSE, MOVE_MINIMIZE, MOVE_THUNDER_WAVE, MOVE_PROTECT}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x05, // FEMALE BOLD + .nickname = _("BLISSEY"), + .friendship = 255 + }, + { + .species = SPECIES_STARMIE, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_SURF, MOVE_ICE_BEAM, MOVE_RECOVER, MOVE_PSYCHIC}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 155, + .otId = 20 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x14, // GENDERLESS CALM + .nickname = _("STARMIE"), + .friendship = 255 + }, + { + .species = SPECIES_PERSIAN, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_SLASH, MOVE_SWAGGER, MOVE_PSYCH_UP, MOVE_FAKE_OUT}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 130, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 125, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0D, // FEMALE JOLLY + .nickname = _("PERSIAN"), + .friendship = 255 + }, + { + .species = SPECIES_AZUMARILL, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_SURF, MOVE_ENCORE, MOVE_ATTRACT, MOVE_DIG}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x00, // FEMALE HARDY + .nickname = _("AZUMARILL"), + .friendship = 255 + }, + } + }, + }, + .checksum = 0x0001554b +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Single_3 = { + .id = 25, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_SINGLE, + .prize = TTPRIZE_METAL_COAT, + .trainers = { + { + .name = _("JARRETT"), + .facilityClass = FACILITY_CLASS_JUGGLER, + .textColor = 2, + .speechBefore = {EC_WORD_LET_S, EC_WORD_HAVE, EC_WORD_AN, EC_MOVE2(EXPLOSION), EC_WORD_PARTY, EC_WORD_EXCL}, + .speechWin = {EC_WORD_CONGRATS, EC_WORD_FOR, EC_WORD_YOUR, EC_WORD_LOSS, EC_WORD_PARTY, EC_WORD_KID}, + .speechLose = {EC_WORD_NICE, EC_MOVE(SELF_DESTRUCT), EC_WORD_THERE, EC_WORD_EXCL, EC_WORD_YOU_RE, EC_WORD_PERFECT}, + .speechAfter = {EC_WORD_WANT, EC_WORD_TO, EC_WORD_PARTY, EC_WORD_SOME, EC_WORD_MORE, EC_WORD_QUES}, + .mons = { + { + .species = SPECIES_ELECTRODE, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_EXPLOSION, MOVE_LIGHT_SCREEN, MOVE_SCREECH, MOVE_THUNDERBOLT}, + .hpEV = 10, + .attackEV = 150, + .defenseEV = 100, + .speedEV = 150, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x0D, // GENDERLESS JOLLY + .nickname = _("ELECTRODE"), + .friendship = 255 + }, + { + .species = SPECIES_VOLTORB, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_EXPLOSION, MOVE_FLASH, MOVE_DOUBLE_TEAM, MOVE_THUNDER}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 155, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x0D, // GENDERLESS JOLLY + .nickname = _("VOLTORB"), + .friendship = 255 + }, + { + .species = SPECIES_WEEZING, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_EXPLOSION, MOVE_SLUDGE_BOMB, MOVE_DESTINY_BOND, MOVE_THUNDERBOLT}, + .hpEV = 0, + .attackEV = 200, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("WEEZING"), + .friendship = 255 + }, + { + .species = SPECIES_GOLEM, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_EXPLOSION, MOVE_DOUBLE_EDGE, MOVE_EARTHQUAKE, MOVE_ROCK_TOMB}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 150, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x7F, // MALE BRAVE + .nickname = _("GOLEM"), + .friendship = 255 + }, + { + .species = SPECIES_EXEGGCUTE, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_EXPLOSION, MOVE_STUN_SPORE, MOVE_HYPNOSIS, MOVE_GIGA_DRAIN}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("EXEGGCUTE"), + .friendship = 255 + }, + { + .species = SPECIES_FORRETRESS, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_EXPLOSION, MOVE_GIGA_DRAIN, MOVE_DIG, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 100, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x84, // MALE RELAXED + .nickname = _("FORRETRESS"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00015b6a +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Mixed_3 = { + .id = 26, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_SINGLE, + .prize = TTPRIZE_DRAGON_SCALE, + .trainers = { + { + .name = _("OWEN"), + .facilityClass = FACILITY_CLASS_SUPER_NERD, + .textColor = 2, + .speechBefore = {EC_WORD_HERE_IT_IS, EC_MOVE2(THUNDER_WAVE), EC_WORD_DON_T, EC_MOVE2(WRAP), EC_WORD_ME, EC_WORD_EXCL}, + .speechWin = {EC_WORD_ACCEPT, EC_WORD_MY, EC_MOVE2(PRESENT), EC_WORD_OF, EC_MOVE2(THUNDER_WAVE), EC_WORD_EXCL}, + .speechLose = {EC_MOVE2(WRAP), EC_MOVE(BIND), EC_WORD_ELECTRIC, EC_MOVE2(WHIRLWIND), EC_WORD_SPIRALING, EC_WORD_AROUND}, + .speechAfter = {EC_MOVE2(WHIRLWIND), EC_WORD_SPIRALING, 0xFFFF, 0xFFFF, EC_WORD_SPIRALING, EC_MOVE2(WHIRLWIND)}, + .mons = { + { + .species = SPECIES_MAGNETON, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_PROTECT, MOVE_ZAP_CANNON, MOVE_TOXIC, MOVE_SUPERSONIC}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 125, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 130, + .otId = 10 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x0A, // GENDERLESS TIMID + .nickname = _("MAGNETON"), + .friendship = 255 + }, + { + .species = SPECIES_PIKACHU, + .heldItem = ITEM_LIGHT_BALL, + .moves = {MOVE_THUNDER_WAVE, MOVE_THUNDERBOLT, MOVE_PROTECT, MOVE_DOUBLE_TEAM}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 150, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 105, + .otId = 15 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("PIKACHU"), + .friendship = 255 + }, + { + .species = SPECIES_JOLTEON, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_THUNDER_WAVE, MOVE_THUNDERBOLT, MOVE_DOUBLE_TEAM, MOVE_TOXIC}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x37, // MALE BOLD + .nickname = _("JOLTEON"), + .friendship = 255 + }, + { + .species = SPECIES_BLISSEY, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_THUNDER_WAVE, MOVE_BLIZZARD, MOVE_WATER_PULSE, MOVE_REST}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x05, // FEMALE BOLD + .nickname = _("BLISSEY"), + .friendship = 255 + }, + { + .species = SPECIES_PORYGON2, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_THUNDER_WAVE, MOVE_ZAP_CANNON, MOVE_PSYCHIC, MOVE_RECOVER}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 125, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 130, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x05, // GENDERLESS BOLD + .nickname = _("PORYGON2"), + .friendship = 255 + }, + { + .species = SPECIES_PORYGON, + .heldItem = ITEM_LAX_INCENSE, + .moves = {MOVE_THUNDER_WAVE, MOVE_ZAP_CANNON, MOVE_DOUBLE_TEAM, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 5 | (0 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x05, // GENDERLESS BOLD + .nickname = _("PORYGON"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x000160ec +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Mixed_2 = { + .id = 27, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_SINGLE, + .prize = TTPRIZE_PROTEIN, + .trainers = { + { + .name = _("LORENZO"), + .facilityClass = FACILITY_CLASS_PSYCHIC_3, + .textColor = 1, + .speechBefore = {EC_WORD_THIS, EC_WORD_POWER, EC_WORD_IS, EC_WORD_NOW, EC_WORD_COMPLETE, EC_WORD_EXCL}, + .speechWin = {EC_WORD_NO, EC_WORD_KEEN_EYE, EC_WORD_CAN, EC_WORD_STOP, EC_WORD_MY, EC_WORD_POWER}, + .speechLose = {EC_WORD_HERE_IT_IS, EC_WORD_EXCL, EC_MOVE(KINESIS), EC_WORD_EXCL, EC_WORD_ELLIPSIS, EC_WORD_WHAT}, + .speechAfter = {EC_WORD_I, EC_WORD_WILL, EC_WORD_MAKE, EC_WORD_THE, EC_MOVE(KINESIS), EC_WORD_HALL_OF_FAME}, + .mons = { + { + .species = SPECIES_MR_MIME, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_THUNDERBOLT, MOVE_THUNDER_WAVE, MOVE_LIGHT_SCREEN, MOVE_REFLECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("MR. MIME"), + .friendship = 255 + }, + { + .species = SPECIES_HYPNO, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_THUNDER_PUNCH, MOVE_FIRE_PUNCH, MOVE_ICE_PUNCH, MOVE_PSYCHIC}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 200, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x8C, // MALE MODEST + .nickname = _("HYPNO"), + .friendship = 255 + }, + { + .species = SPECIES_ALAKAZAM, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_THUNDER_PUNCH, MOVE_FIRE_PUNCH, MOVE_ICE_PUNCH, MOVE_PSYCHIC}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 155, + .speedEV = 150, + .spAttackEV = 155, + .spDefenseEV = 50, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("ALAKAZAM"), + .friendship = 255 + }, + { + .species = SPECIES_GENGAR, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_THUNDERBOLT, MOVE_SHADOW_BALL, MOVE_HYPNOSIS, MOVE_TOXIC}, + .hpEV = 0, + .attackEV = 200, + .defenseEV = 0, + .speedEV = 100, + .spAttackEV = 55, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x88, // MALE HASTY + .nickname = _("GENGAR"), + .friendship = 255 + }, + { + .species = SPECIES_GIRAFARIG, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_CRUNCH, MOVE_BODY_SLAM, MOVE_REST}, + .hpEV = 0, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 155, + .spAttackEV = 0, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 1, + .personality = 0x03, // FEMALE ADAMANT + .nickname = _("GIRAFARIG"), + .friendship = 255 + }, + { + .species = SPECIES_STARMIE, + .heldItem = ITEM_APICOT_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_SURF, MOVE_RECOVER, MOVE_ICE_BEAM}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 55, + .speedEV = 250, + .spAttackEV = 150, + .spDefenseEV = 55, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x0A, // GENDERLESS TIMID + .nickname = _("STARMIE"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x0001624b +}; + +static const struct TrainerTowerFloor gUnknown_848144C = { + .id = 28, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_DOUBLE, + .prize = TTPRIZE_SCOPE_LENS, + .trainers = { + { + .name = _("NIA & CARL"), + .facilityClass = FACILITY_CLASS_COOL_COUPLE, + .textColor = 4, + .speechBefore = {EC_WORD_HERE_GOES, EC_WORD_MY, EC_WORD_DIGITAL, EC_WORD_ROMANTIC, EC_WORD_HERO, EC_WORD_STRATEGY}, + .speechWin = {EC_WORD_THAT_S, EC_WORD_THE, EC_WORD_DIGITAL, EC_WORD_HYPER, EC_WORD_MODE, EC_WORD_POWER}, + .speechLose = {EC_WORD_MY, EC_WORD_PERFECT, EC_WORD_STRATEGY, EC_WORD_WAS, EC_MOVE2(BEAT_UP), EC_WORD_QUES}, + .speechAfter = {EC_WORD_MY, EC_WORD_INVINCIBLE, EC_WORD_STRATEGY, EC_WORD_WAS, EC_WORD_DESTROYED, EC_WORD_ELLIPSIS}, + .mons = { + { + .species = SPECIES_MUK, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_THUNDERBOLT, MOVE_SLUDGE_BOMB, MOVE_SHADOW_BALL, MOVE_BODY_SLAM}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 1, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("MUK"), + .friendship = 255 + }, + { + .species = SPECIES_GENGAR, + .heldItem = ITEM_PETAYA_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_CONFUSE_RAY, MOVE_PSYCHIC, MOVE_EXPLOSION}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 155, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x15, // FEMALE GENTLE + .nickname = _("GENGAR"), + .friendship = 255 + }, + { + .species = SPECIES_ALAKAZAM, + .heldItem = ITEM_GANLON_BERRY, + .moves = {MOVE_THUNDER_PUNCH, MOVE_PSYCHIC, MOVE_RECOVER, MOVE_REFLECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x0A, // FEMALE TIMID + .nickname = _("ALAKAZAM"), + .friendship = 255 + }, + { + .species = SPECIES_JOLTEON, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_THUNDERBOLT, MOVE_FLAIL, MOVE_THUNDER_WAVE, MOVE_DOUBLE_TEAM}, + .hpEV = 0, + .attackEV = 50, + .defenseEV = 100, + .speedEV = 160, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x05, // FEMALE BOLD + .nickname = _("JOLTEON"), + .friendship = 255 + }, + { + .species = SPECIES_ELECTRODE, + .heldItem = ITEM_LIECHI_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_EXPLOSION, MOVE_MIRROR_COAT, MOVE_LIGHT_SCREEN}, + .hpEV = 0, + .attackEV = 55, + .defenseEV = 0, + .speedEV = 100, + .spAttackEV = 100, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x14, // GENDERLESS CALM + .nickname = _("ELECTRODE"), + .friendship = 255 + }, + { + .species = SPECIES_RAICHU, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_COUNTER, MOVE_REVERSAL, MOVE_LIGHT_SCREEN}, + .hpEV = 0, + .attackEV = 55, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x02, // FEMALE BRAVE + .nickname = _("RAICHU"), + .friendship = 255 + }, + } + }, + { + .name = _("NIA & CARL"), + .facilityClass = FACILITY_CLASS_COOL_COUPLE, + .textColor = 4, + .speechBefore = {EC_WORD_MASTER, EC_WORD_COMPLETE, EC_WORD_FASHION, EC_WORD_SYSTEM, EC_WORD_START, EC_WORD_EXCL}, + .speechWin = {EC_WORD_THAT_S_IT_EXCL, EC_WORD_THE, EC_WORD_POWER, EC_WORD_OF, EC_WORD_OUR, EC_WORD_SYSTEM}, + .speechLose = {EC_WORD_OKAY, EC_WORD_EXCL, EC_MOVE(THUNDERBOLT), EC_WORD_RUN_AWAY, EC_WORD_SYSTEM, EC_WORD_START}, + .speechAfter = {EC_WORD_GO, EC_WORD_ON, EC_WORD_PLEASE, EC_WORD_EXCL, EC_WORD_TCH, EC_WORD_ELLIPSIS}, + .mons = { + { + .species = SPECIES_KANGASKHAN, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_SHADOW_BALL, MOVE_REVERSAL, MOVE_ENDURE, MOVE_FAKE_OUT}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 105, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 150, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x03, // FEMALE ADAMANT + .nickname = _("KANGASKHAN"), + .friendship = 255 + }, + { + .species = SPECIES_TAUROS, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_DOUBLE_EDGE, MOVE_ROCK_TOMB, MOVE_SURF, MOVE_REST}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x03, // MALE ADAMANT + .nickname = _("TAUROS"), + .friendship = 255 + }, + { + .species = SPECIES_MILTANK, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_BODY_SLAM, MOVE_SHADOW_BALL, MOVE_MILK_DRINK, MOVE_ROCK_TOMB}, + .hpEV = 0, + .attackEV = 155, + .defenseEV = 50, + .speedEV = 250, + .spAttackEV = 0, + .spDefenseEV = 55, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x03, // FEMALE ADAMANT + .nickname = _("MILTANK"), + .friendship = 255 + }, + { + .species = SPECIES_RHYDON, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_THUNDERBOLT, MOVE_MEGAHORN, MOVE_HORN_DRILL, MOVE_ROCK_TOMB}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 1, + .personality = 0x80, // MALE ADAMANT + .nickname = _("RHYDON"), + .friendship = 255 + }, + { + .species = SPECIES_DRAGONITE, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_BLIZZARD, MOVE_SURF, MOVE_OUTRAGE, MOVE_FLAMETHROWER}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 0, + .personality = 0x91, // MALE CALM + .nickname = _("DRAGONITE"), + .friendship = 255 + }, + { + .species = SPECIES_LAPRAS, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_THUNDERBOLT, MOVE_BLIZZARD, MOVE_SURF, MOVE_HORN_DRILL}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 31, + .attackIV = 31, + .defenseIV = 31, + .speedIV = 31, + .spAttackIV = 31, + .spDefenseIV = 31, + .abilityNum = 1, + .personality = 0x91, // MALE CALM + .nickname = _("LAPRAS"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00016360 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Double_7 = { + .id = 29, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_DOUBLE, + .prize = TTPRIZE_CARBOS, + .trainers = { + { + .name = _("AXE & REN"), + .facilityClass = FACILITY_CLASS_SIS_AND_BRO_2, + .textColor = 2, + .speechBefore = {EC_WORD_IT_S, EC_WORD_GOING, EC_WORD_TO, EC_WORD_GET, EC_WORD_AWFULLY, EC_WORD_COLD}, + .speechWin = {EC_WORD_THAT_S, EC_WORD_THAT, EC_WORD_MAN, EC_WORD_I_AM, EC_WORD_COLD, EC_WORD_EXCL}, + .speechLose = {EC_WORD_I, EC_WORD_CAN_T_WIN, EC_WORD_IN, EC_WORD_THIS, EC_MOVE(SHEER_COLD), EC_WORD_ELLIPSIS}, + .speechAfter = {EC_WORD_THIS, EC_MOVE(SHEER_COLD), EC_WORD_HAS, EC_WORD_ME, EC_WORD_FEELING, EC_WORD_SHAKY}, + .mons = { + { + .species = SPECIES_LANTURN, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_RAIN_DANCE, MOVE_SURF, MOVE_THUNDER, MOVE_ICE_BEAM}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0A, // FEMALE TIMID + .nickname = _("LANTURN"), + .friendship = 255 + }, + { + .species = SPECIES_MANTINE, + .heldItem = ITEM_PETAYA_BERRY, + .moves = {MOVE_RAIN_DANCE, MOVE_SURF, MOVE_CONFUSE_RAY, MOVE_ICE_BEAM}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 155, + .spAttackEV = 100, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x14, // FEMALE CALM + .nickname = _("MANTINE"), + .friendship = 255 + }, + { + .species = SPECIES_DEWGONG, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_RAIN_DANCE, MOVE_SURF, MOVE_SHEER_COLD, MOVE_BLIZZARD}, + .hpEV = 0, + .attackEV = 100, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 55, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x11, // FEMALE QUIET + .nickname = _("DEWGONG"), + .friendship = 255 + }, + { + .species = SPECIES_CLOYSTER, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_RAIN_DANCE, MOVE_SURF, MOVE_ICE_BEAM, MOVE_HYPER_BEAM}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x11, // FEMALE QUIET + .nickname = _("CLOYSTER"), + .friendship = 255 + }, + { + .species = SPECIES_TENTACRUEL, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_RAIN_DANCE, MOVE_SURF, MOVE_GIGA_DRAIN, MOVE_SLUDGE_BOMB}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 100, + .speedEV = 100, + .spAttackEV = 255, + .spDefenseEV = 55, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0A, // FEMALE TIMID + .nickname = _("TENTACRUEL"), + .friendship = 255 + }, + { + .species = SPECIES_GYARADOS, + .heldItem = ITEM_LIECHI_BERRY, + .moves = {MOVE_RAIN_DANCE, MOVE_SURF, MOVE_DRAGON_DANCE, MOVE_RETURN}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x03, // FEMALE ADAMANT + .nickname = _("GYARADOS"), + .friendship = 255 + }, + } + }, + { + .name = _("AXE & REN"), + .facilityClass = FACILITY_CLASS_SIS_AND_BRO_2, + .textColor = 2, + .speechBefore = {EC_WORD_OUR, EC_WORD_SWIFT_SWIM, EC_WORD_LEFT, EC_WORD_ME, EC_WORD_FEELING, EC_WORD_COLD}, + .speechWin = {EC_WORD_I, EC_WORD_WON, EC_WORD_BUT, EC_WORD_I_AM, EC_WORD_NOT, EC_WORD_HOT}, + .speechLose = {EC_WORD_I_AM, EC_WORD_HUNGRY, EC_WORD_FOR, EC_WORD_ANY, EC_WORD_HOT, EC_WORD_EATS}, + .speechAfter = {EC_WORD_SISTER, EC_WORD_I, EC_WORD_NEED, EC_WORD_SOMETHING, EC_WORD_HOT, EC_WORD_PLEASE}, + .mons = { + { + .species = SPECIES_ELECTABUZZ, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_THUNDER, MOVE_PSYCHIC, MOVE_CROSS_CHOP, MOVE_LIGHT_SCREEN}, + .hpEV = 0, + .attackEV = 155, + .defenseEV = 155, + .speedEV = 100, + .spAttackEV = 100, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x40, // MALE NAIVE + .nickname = _("ELECTABUZZ"), + .friendship = 255 + }, + { + .species = SPECIES_MAGNETON, + .heldItem = ITEM_PETAYA_BERRY, + .moves = {MOVE_THUNDER, MOVE_SONIC_BOOM, MOVE_METAL_SOUND, MOVE_REFLECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 155, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x0A, // GENDERLESS TIMID + .nickname = _("MAGNETON"), + .friendship = 255 + }, + { + .species = SPECIES_PORYGON, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_THUNDER, MOVE_PSYCHIC, MOVE_BLIZZARD, MOVE_PROTECT}, + .hpEV = 255, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x11, // GENDERLESS QUIET + .nickname = _("PORYGON"), + .friendship = 255 + }, + { + .species = SPECIES_DRAGONAIR, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_THUNDER, MOVE_SURF, MOVE_BLIZZARD, MOVE_OUTRAGE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 50, + .speedEV = 155, + .spAttackEV = 255, + .spDefenseEV = 50, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0A, // FEMALE TIMID + .nickname = _("DRAGONAIR"), + .friendship = 255 + }, + { + .species = SPECIES_PERSIAN, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_THUNDER, MOVE_FAKE_OUT, MOVE_WATER_PULSE, MOVE_RETURN}, + .hpEV = 0, + .attackEV = 155, + .defenseEV = 0, + .speedEV = 200, + .spAttackEV = 155, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0B, // FEMALE HASTY + .nickname = _("PERSIAN"), + .friendship = 255 + }, + { + .species = SPECIES_STARMIE, + .heldItem = ITEM_GANLON_BERRY, + .moves = {MOVE_THUNDER, MOVE_SURF, MOVE_RECOVER, MOVE_REFLECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 95, + .speedEV = 255, + .spAttackEV = 100, + .spDefenseEV = 60, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x05, // GENDERLESS BOLD + .nickname = _("STARMIE"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00015272 +}; + +static const struct TrainerTowerFloor gUnknown_8481C0C = { + .id = 30, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_DOUBLE, + .prize = TTPRIZE_ZINC, + .trainers = { + { + .name = _("KATI & GEB"), + .facilityClass = FACILITY_CLASS_YOUNG_COUPLE_2, + .textColor = 2, + .speechBefore = {EC_WORD_WELCOME, EC_WORD_TO, EC_WORD_OUR, EC_WORD_LOVEY_DOVEY, EC_MOVE2(THUNDER_WAVE), EC_MOVE(SANDSTORM)}, + .speechWin = {EC_WORD_LALALA, EC_WORD_LALALA, EC_WORD_OUR, EC_WORD_LOVEY_DOVEY, EC_WORD_LALALA, EC_WORD_LIFE}, + .speechLose = {EC_WORD_I, EC_WORD_NEED, EC_WORD_TO, EC_WORD_LOSE, EC_WORD_MY, EC_MOVE2(FRUSTRATION)}, + .speechAfter = {EC_WORD_YOU_RE, EC_WORD_JUST, EC_WORD_A_LITTLE, EC_WORD_KID, EC_WORD_AHAHA, EC_WORD_EXCL}, + .mons = { + { + .species = SPECIES_FLAAFFY, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_ATTRACT, MOVE_PROTECT, MOVE_THUNDERBOLT, MOVE_REFLECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x84, // MALE RELAXED + .nickname = _("FLAAFFY"), + .friendship = 255 + }, + { + .species = SPECIES_QUAGSIRE, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_ATTRACT, MOVE_SURF, MOVE_AMNESIA, MOVE_BLIZZARD}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x93, // MALE SASSY + .nickname = _("QUAGSIRE"), + .friendship = 255 + }, + { + .species = SPECIES_PIKACHU, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_ATTRACT, MOVE_REVERSAL, MOVE_THUNDERBOLT, MOVE_IRON_TAIL}, + .hpEV = 0, + .attackEV = 155, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x8A, // MALE JOLLY + .nickname = _("PIKACHU"), + .friendship = 255 + }, + { + .species = SPECIES_ELECTABUZZ, + .heldItem = ITEM_LIECHI_BERRY, + .moves = {MOVE_ATTRACT, MOVE_COUNTER, MOVE_ICE_PUNCH, MOVE_BODY_SLAM}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 150, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 105, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x46, // MALE CALM + .nickname = _("ELECTABUZZ"), + .friendship = 255 + }, + { + .species = SPECIES_TOGETIC, + .heldItem = ITEM_KINGS_ROCK, + .moves = {MOVE_ATTRACT, MOVE_BLIZZARD, MOVE_ANCIENT_POWER, MOVE_WATER_PULSE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x2D, // MALE CALM + .nickname = _("TOGETIC"), + .friendship = 255 + }, + { + .species = SPECIES_GOLDUCK, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_ATTRACT, MOVE_SURF, MOVE_DIG, MOVE_CROSS_CHOP}, + .hpEV = 0, + .attackEV = 155, + .defenseEV = 50, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 50, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x80, // MALE ADAMANT + .nickname = _("GOLDUCK"), + .friendship = 255 + }, + } + }, + { + .name = _("KATI & GEB"), + .facilityClass = FACILITY_CLASS_YOUNG_COUPLE_2, + .textColor = 2, + .speechBefore = {EC_WORD_I_AM, EC_WORD_PLUS, EC_WORD_YOU_RE, EC_WORD_MINUS, EC_WORD_LOVEY_DOVEY, EC_WORD_MAGNET_PULL}, + .speechWin = {EC_WORD_DON_T, EC_WORD_STOP, EC_WORD_OUR, EC_WORD_LOVEY_DOVEY, EC_WORD_LOCOMOTIVE, EC_WORD_EXCL}, + .speechLose = {EC_WORD_HIS, EC_WORD_CRY, EC_WORD_HAS, EC_WORD_CUTE_CHARM, EC_WORD_TOO, EC_WORD_EXCL}, + .speechAfter = {EC_WORD_YOU, EC_WORD_HAVE, EC_WORD_TIME, EC_WORD_TO, EC_WORD_TALK, EC_WORD_QUES}, + .mons = { + { + .species = SPECIES_PICHU, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_ATTRACT, MOVE_PROTECT, MOVE_SWEET_KISS, MOVE_REVERSAL}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x03, // FEMALE ADAMANT + .nickname = _("PICHU"), + .friendship = 255 + }, + { + .species = SPECIES_ELEKID, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_ATTRACT, MOVE_PROTECT, MOVE_DOUBLE_TEAM, MOVE_FOCUS_PUNCH}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 130, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 125, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x02, // FEMALE BRAVE + .nickname = _("ELEKID"), + .friendship = 255 + }, + { + .species = SPECIES_TOGEPI, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_ATTRACT, MOVE_PROTECT, MOVE_YAWN, MOVE_WATER_PULSE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("TOGEPI"), + .friendship = 255 + }, + { + .species = SPECIES_PSYDUCK, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_ATTRACT, MOVE_PROTECT, MOVE_DIG, MOVE_DIVE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x16, // FEMALE SASSY + .nickname = _("PSYDUCK"), + .friendship = 255 + }, + { + .species = SPECIES_MAREEP, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_ATTRACT, MOVE_PROTECT, MOVE_LIGHT_SCREEN, MOVE_THUNDERBOLT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 0, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("MAREEP"), + .friendship = 255 + }, + { + .species = SPECIES_WOOPER, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_ATTRACT, MOVE_PROTECT, MOVE_SURF, MOVE_YAWN}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 10, + .attackIV = 10, + .defenseIV = 10, + .speedIV = 10, + .spAttackIV = 10, + .spDefenseIV = 10, + .abilityNum = 1, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("WOOPER"), + .friendship = 255 + }, + } + }, + DUMMY_TOWER_TEAM(0), + }, + .checksum = 0x00015966 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Knockout_6 = { + .id = 31, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_KNOCKOUT, + .prize = TTPRIZE_WHITE_HERB, + .trainers = { + { + .name = _("BEN"), + .facilityClass = FACILITY_CLASS_ROCKER, + .textColor = 1, + .speechBefore = {EC_WORD_LALALA, EC_WORD_LET_S, EC_MOVE(SING), EC_WORD_ABOUT, EC_WORD_ELECTRIC, EC_WORD_POWER}, + .speechWin = {EC_WORD_STATIC, EC_WORD_IS, EC_WORD_ELECTRIC, EC_WORD_YES, EC_WORD_IT, EC_WORD_IS}, + .speechLose = {EC_WORD_ELECTRIC, EC_WORD_ABOUT, EC_WORD_MY, EC_WORD_DIGITAL, EC_WORD_TELEVISION, EC_WORD_I_AM}, + .speechAfter = {EC_WORD_ELECTRIC, EC_WORD_EXCL, EC_WORD_IT_S, EC_WORD_A, EC_WORD_NATURAL, EC_WORD_POWER}, + .mons = { + { + .species = SPECIES_ELECTRODE, + .heldItem = ITEM_LIECHI_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_MIRROR_COAT, MOVE_EXPLOSION, MOVE_THUNDER_WAVE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 55, + .speedEV = 255, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x14, // GENDERLESS CALM + .nickname = _("ELECTRODE"), + .friendship = 255 + }, + { + .species = SPECIES_ELECTABUZZ, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_THUNDERBOLT, MOVE_FIRE_PUNCH, MOVE_PSYCHIC, MOVE_ICE_PUNCH}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 155, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0F, // FEMALE MODEST + .nickname = _("ELECTABUZZ"), + .friendship = 255 + }, + { + .species = SPECIES_LANTURN, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_THUNDERBOLT, MOVE_DOUBLE_EDGE, MOVE_ICE_BEAM, MOVE_HYDRO_PUMP}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 125, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 130, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x8E, // MALE QUIET + .nickname = _("LANTURN"), + .friendship = 255 + }, + { + .species = SPECIES_MAGNETON, + .heldItem = ITEM_LIECHI_BERRY, + .moves = {MOVE_ZAP_CANNON, MOVE_HYPER_BEAM, MOVE_LOCK_ON, MOVE_SUPERSONIC}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 55, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x14, // GENDERLESS CALM + .nickname = _("MAGNETON"), + .friendship = 255 + }, + { + .species = SPECIES_RAICHU, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_DOUBLE_EDGE, MOVE_MEGA_KICK, MOVE_REVERSAL, MOVE_BODY_SLAM}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 80, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 75, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x8A, // MALE JOLLY + .nickname = _("RAICHU"), + .friendship = 255 + }, + { + .species = SPECIES_AMPHAROS, + .heldItem = ITEM_SHELL_BELL, + .moves = {MOVE_THUNDERBOLT, MOVE_MEGA_KICK, MOVE_COUNTER, MOVE_BODY_SLAM}, + .hpEV = 0, + .attackEV = 200, + .defenseEV = 150, + .speedEV = 0, + .spAttackEV = 10, + .spDefenseEV = 150, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("AMPHAROS"), + .friendship = 255 + }, + } + }, + { + .name = _("CAMDEN"), + .facilityClass = FACILITY_CLASS_ENGINEER, + .textColor = 1, + .speechBefore = {EC_WORD_LALALA, EC_WORD_LET_S, EC_MOVE(SING), EC_WORD_ABOUT, EC_WORD_ELECTRIC, EC_WORD_POWER}, + .speechWin = {EC_WORD_A, EC_MOVE(THUNDERBOLT), EC_WORD_IS, EC_WORD_ELECTRIC, EC_WORD_TOO, EC_WORD_EXCL}, + .speechLose = {EC_WORD_ELECTRIC, EC_WORD_EXCL, EC_WORD_IT_S, EC_WORD_ABOUT, EC_WORD_WIRELESS, EC_WORD_LINK}, + .speechAfter = {EC_WORD_ELECTRIC, EC_WORD_EXCL, EC_WORD_IT_S, EC_WORD_A, EC_WORD_TREASURE, EC_WORD_EXCL}, + .mons = { + { + .species = SPECIES_GRANBULL, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_THUNDERBOLT, MOVE_CRUNCH, MOVE_EARTHQUAKE, MOVE_ROCK_TOMB}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 55, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x02, // FEMALE BRAVE + .nickname = _("GRANBULL"), + .friendship = 255 + }, + { + .species = SPECIES_PERSIAN, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_THUNDERBOLT, MOVE_WATER_PULSE, MOVE_HYPNOSIS, MOVE_SLASH}, + .hpEV = 0, + .attackEV = 100, + .defenseEV = 55, + .speedEV = 255, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("PERSIAN"), + .friendship = 255 + }, + { + .species = SPECIES_LICKITUNG, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_PROTECT, MOVE_SURF, MOVE_EARTHQUAKE, MOVE_SHADOW_BALL}, + .hpEV = 200, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 55, + .spDefenseEV = 0, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x02, // FEMALE BRAVE + .nickname = _("LICKITUNG"), + .friendship = 255 + }, + { + .species = SPECIES_RATICATE, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_HYPER_FANG, MOVE_SUPER_FANG, MOVE_REVERSAL}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 100, + .speedEV = 50, + .spAttackEV = 0, + .spDefenseEV = 105, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x94, // MALE CAREFUL + .nickname = _("RATICATE"), + .friendship = 255 + }, + { + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_SCOPE_LENS, + .moves = {MOVE_THUNDERBOLT, MOVE_CROSS_CHOP, MOVE_EARTHQUAKE, MOVE_ROCK_TOMB}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 130, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 125, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x02, // FEMALE BRAVE + .nickname = _("PRIMEAPE"), + .friendship = 255 + }, + { + .species = SPECIES_KANGASKHAN, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_SURF, MOVE_CRUSH_CLAW, MOVE_REST}, + .hpEV = 0, + .attackEV = 100, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x11, // FEMALE QUIET + .nickname = _("KANGASKHAN"), + .friendship = 255 + }, + } + }, + { + .name = _("ZACKERY"), + .facilityClass = FACILITY_CLASS_SCIENTIST, + .textColor = 1, + .speechBefore = {EC_WORD_LALALA, EC_WORD_LET_S, EC_MOVE(SING), EC_WORD_ABOUT, EC_WORD_ELECTRIC, EC_WORD_POWER}, + .speechWin = {EC_MOVE2(THUNDER_SHOCK), EC_WORD_IS, EC_WORD_ELECTRIC, EC_WORD_YOU, EC_WORD_KNOW, EC_WORD_QUES}, + .speechLose = {EC_WORD_ELECTRIC, EC_WORD_EXCL, EC_MOVE2(FLASH), EC_MOVE2(FLASH), EC_MOVE2(FLASH), EC_WORD_EXCL_EXCL}, + .speechAfter = {EC_WORD_ALL, EC_WORD_TOGETHER, EC_WORD_NOW, EC_WORD_EXCL, EC_MOVE(SPARK), EC_MOVE(SPARK)}, + .mons = { + { + .species = SPECIES_WEEZING, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_THUNDERBOLT, MOVE_SLUDGE_BOMB, MOVE_FLAMETHROWER, MOVE_SHADOW_BALL}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 0, + .speedEV = 0, + .spAttackEV = 155, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x02, // FEMALE BRAVE + .nickname = _("WEEZING"), + .friendship = 255 + }, + { + .species = SPECIES_MUK, + .heldItem = ITEM_LEFTOVERS, + .moves = {MOVE_THUNDERBOLT, MOVE_SLUDGE_BOMB, MOVE_GIGA_DRAIN, MOVE_CURSE}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 150, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 105, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 1, + .personality = 0x84, // MALE RELAXED + .nickname = _("MUK"), + .friendship = 255 + }, + { + .species = SPECIES_GENGAR, + .heldItem = ITEM_PETAYA_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_HYPNOSIS, MOVE_DREAM_EATER, MOVE_WILL_O_WISP}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 250, + .spAttackEV = 155, + .spDefenseEV = 105, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0A, // FEMALE TIMID + .nickname = _("GENGAR"), + .friendship = 255 + }, + { + .species = SPECIES_MISDREAVUS, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_PSYCHIC, MOVE_GRUDGE, MOVE_CONFUSE_RAY, MOVE_DESTINY_BOND}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 0, + .speedEV = 150, + .spAttackEV = 105, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x0A, // FEMALE TIMID + .nickname = _("MISDREAVUS"), + .friendship = 255 + }, + { + .species = SPECIES_CROBAT, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_SLUDGE_BOMB, MOVE_CONFUSE_RAY, MOVE_GIGA_DRAIN, MOVE_TOXIC}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 110, + .spAttackEV = 0, + .spDefenseEV = 200, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x87, // MALE TIMID + .nickname = _("CROBAT"), + .friendship = 255 + }, + { + .species = SPECIES_HAUNTER, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_DESTINY_BOND, MOVE_HYPNOSIS, MOVE_CONFUSE_RAY, MOVE_TOXIC}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 155, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 20, + .attackIV = 20, + .defenseIV = 20, + .speedIV = 20, + .spAttackIV = 20, + .spDefenseIV = 20, + .abilityNum = 0, + .personality = 0x91, // MALE CALM + .nickname = _("HAUNTER"), + .friendship = 255 + }, + } + }, + }, + .checksum = 0x00014f49 +}; + +static const struct TrainerTowerFloor sTrainerTowerFloor_Knockout_5 = { + .id = 32, + .floorIdx = MAX_TRAINER_TOWER_FLOORS, + .challengeType = CHALLENGE_TYPE_KNOCKOUT, + .prize = TTPRIZE_UP_GRADE, + .trainers = { + { + .name = _("MAURA"), + .facilityClass = FACILITY_CLASS_BEAUTY_2, + .textColor = 2, + .speechBefore = {EC_WORD_I_AM, EC_WORD_THE, EC_WORD_GROUP, EC_WORD_LEADER, EC_WORD_EXCL, 0xFFFF}, + .speechWin = {EC_WORD_WHAT, EC_WORD_AM, EC_WORD_I, EC_WORD_LEADER, EC_WORD_OF, EC_WORD_QUES}, + .speechLose = {EC_WORD_I_AM, EC_WORD_NO, EC_WORD_LEADER, EC_WORD_IT_S, EC_WORD_A_LITTLE, EC_WORD_LIE}, + .speechAfter = {EC_WORD_HEY, EC_WORD_EXCL, EC_WORD_THE, EC_WORD_GROUND, EC_WORD_IS, EC_WORD_SLIMY}, + .mons = { + { + .species = SPECIES_PICHU, + .heldItem = ITEM_FOCUS_BAND, + .moves = {MOVE_THUNDER_SHOCK, MOVE_THUNDER_WAVE, MOVE_SWEET_KISS, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x05, // FEMALE BOLD + .nickname = _("PICHU"), + .friendship = 255 + }, + { + .species = SPECIES_MAREEP, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_THUNDER_SHOCK, MOVE_CHARGE, MOVE_PROTECT, MOVE_RETURN}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("MAREEP"), + .friendship = 255 + }, + { + .species = SPECIES_IGGLYBUFF, + .heldItem = ITEM_QUICK_CLAW, + .moves = {MOVE_SING, MOVE_SWEET_KISS, MOVE_PRESENT, MOVE_PROTECT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("IGGLYBUFF"), + .friendship = 255 + }, + { + .species = SPECIES_CLEFFA, + .heldItem = ITEM_LAX_INCENSE, + .moves = {MOVE_SING, MOVE_SWEET_KISS, MOVE_ENCORE, MOVE_METRONOME}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x16, // FEMALE SASSY + .nickname = _("CLEFFA"), + .friendship = 255 + }, + { + .species = SPECIES_NIDORAN_F, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_CRUNCH, MOVE_DIG, MOVE_FLATTER, MOVE_ATTRACT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x16, // FEMALE SASSY + .nickname = _("NIDORAN♀"), + .friendship = 255 + }, + { + .species = SPECIES_NIDORAN_M, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_HORN_DRILL, MOVE_SLUDGE_BOMB, MOVE_FLATTER, MOVE_ATTRACT}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 255, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 255, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x07, // MALE RELAXED + .nickname = _("NIDORAN♂"), + .friendship = 255 + }, + } + }, + { + .name = _("MIKAELA"), + .facilityClass = FACILITY_CLASS_LASS_2, + .textColor = 1, + .speechBefore = {EC_WORD_I_AM, EC_WORD_REALLY, EC_WORD_THE, EC_WORD_NO_1, EC_WORD_TRAINER, EC_WORD_HERE}, + .speechWin = {EC_WORD_NEVER, EC_WORD_SAID, EC_WORD_WHAT, EC_WORD_I_AM, EC_WORD_NO_1, EC_WORD_AT}, + .speechLose = {EC_WORD_NEXT, EC_WORD_TIME, EC_WORD_I, EC_WORD_WILL, EC_WORD_BE, EC_WORD_OVERWHELMING}, + .speechAfter = {EC_WORD_YOU, EC_MOVE2(SPIT_UP), EC_WORD_ME, EC_WORD_AS_IF, EC_WORD_I_AM, EC_WORD_NOTHING}, + .mons = { + { + .species = SPECIES_NIDORINO, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_SHOCK_WAVE, MOVE_HORN_DRILL, MOVE_ICE_BEAM, MOVE_IRON_TAIL}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x07, // MALE RELAXED + .nickname = _("NIDORINO"), + .friendship = 255 + }, + { + .species = SPECIES_NIDORINA, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_SHOCK_WAVE, MOVE_CRUNCH, MOVE_BODY_SLAM, MOVE_COUNTER}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x16, // FEMALE SASSY + .nickname = _("NIDORINA"), + .friendship = 255 + }, + { + .species = SPECIES_PIKACHU, + .heldItem = ITEM_LIGHT_BALL, + .moves = {MOVE_SHOCK_WAVE, MOVE_THUNDER_WAVE, MOVE_COUNTER, MOVE_BODY_SLAM}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 200, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 55, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x11, // FEMALE QUIET + .nickname = _("PIKACHU"), + .friendship = 255 + }, + { + .species = SPECIES_FLAAFFY, + .heldItem = ITEM_BRIGHT_POWDER, + .moves = {MOVE_SHOCK_WAVE, MOVE_DOUBLE_TEAM, MOVE_SEISMIC_TOSS, MOVE_BODY_SLAM}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 150, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("FLAAFFY"), + .friendship = 255 + }, + { + .species = SPECIES_JIGGLYPUFF, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_SHOCK_WAVE, MOVE_SHADOW_BALL, MOVE_FOCUS_PUNCH, MOVE_BODY_SLAM}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 150, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 105, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x16, // FEMALE SASSY + .nickname = _("JIGGLYPUFF"), + .friendship = 255 + }, + { + .species = SPECIES_CLEFAIRY, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_SHOCK_WAVE, MOVE_METEOR_MASH, MOVE_MOONLIGHT, MOVE_BODY_SLAM}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 155, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("CLEFAIRY"), + .friendship = 255 + }, + } + }, + { + .name = _("FLINT"), + .facilityClass = FACILITY_CLASS_ENGINEER, + .textColor = 4, + .speechBefore = {EC_WORD_I_AM, EC_WORD_THE, EC_MOVE2(MILK_DRINK), EC_WORD_WORLD, EC_WORD_LEADER, EC_WORD_EXCL}, + .speechWin = {EC_WORD_I_VE, EC_WORD_WON, EC_WORD_THIS, EC_MOVE2(MILK_DRINK), EC_WORD_MATCH, EC_WORD_EXCL}, + .speechLose = {EC_WORD_I, EC_WORD_CAN_T, EC_WORD_DRINK, EC_WORD_ANY, EC_WORD_MORE, EC_WORD_DRINKS}, + .speechAfter = {EC_WORD_WHOAH, EC_WORD_EXCL, EC_WORD_I_AM, EC_WORD_DROOLING, EC_WORD_ALL, EC_WORD_OVER}, + .mons = { + { + .species = SPECIES_WIGGLYTUFF, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_THUNDERBOLT, MOVE_PSYCHIC, MOVE_WATER_PULSE, MOVE_FLAMETHROWER}, + .hpEV = 0, + .attackEV = 0, + .defenseEV = 155, + .speedEV = 0, + .spAttackEV = 255, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0xCF, // MALE RELAXED + .nickname = _("WIGGLYTUFF"), + .friendship = 255 + }, + { + .species = SPECIES_CLEFABLE, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_SOFT_BOILED, MOVE_METEOR_MASH, MOVE_DOUBLE_EDGE}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 100, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 150, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0xCF, // MALE RELAXED + .nickname = _("CLEFABLE"), + .friendship = 255 + }, + { + .species = SPECIES_NIDOQUEEN, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_THUNDERBOLT, MOVE_CRUNCH, MOVE_SUPERPOWER, MOVE_SURF}, + .hpEV = 0, + .attackEV = 200, + .defenseEV = 110, + .speedEV = 0, + .spAttackEV = 100, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x07, // FEMALE RELAXED + .nickname = _("NIDOQUEEN"), + .friendship = 255 + }, + { + .species = SPECIES_NIDOKING, + .heldItem = ITEM_CHOICE_BAND, + .moves = {MOVE_THUNDERBOLT, MOVE_HYPER_BEAM, MOVE_MEGAHORN, MOVE_SHADOW_BALL}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 150, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 100, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x02, // MALE BRAVE + .nickname = _("NIDOKING"), + .friendship = 255 + }, + { + .species = SPECIES_RAICHU, + .heldItem = ITEM_SALAC_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_REVERSAL, MOVE_IRON_TAIL, MOVE_DOUBLE_EDGE}, + .hpEV = 0, + .attackEV = 155, + .defenseEV = 150, + .speedEV = 100, + .spAttackEV = 0, + .spDefenseEV = 105, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("RAICHU"), + .friendship = 255 + }, + { + .species = SPECIES_AMPHAROS, + .heldItem = ITEM_LUM_BERRY, + .moves = {MOVE_THUNDERBOLT, MOVE_REST, MOVE_BODY_SLAM, MOVE_IRON_TAIL}, + .hpEV = 0, + .attackEV = 255, + .defenseEV = 150, + .speedEV = 0, + .spAttackEV = 0, + .spDefenseEV = 105, + .otId = 0 | (4096 << 16), + .hpIV = 15, + .attackIV = 15, + .defenseIV = 15, + .speedIV = 15, + .spAttackIV = 15, + .spDefenseIV = 15, + .abilityNum = 0, + .personality = 0x80, // MALE ADAMANT + .nickname = _("AMPHAROS"), + .friendship = 255 + }, + } + }, + }, + .checksum = 0x00016b80 +}; + +const struct EReaderTrainerTowerSetSubstruct gTrainerTowerLocalHeader = { + .numFloors = MAX_TRAINER_TOWER_FLOORS, + .id = 1 +}; + +const struct TrainerTowerFloor *const gTrainerTowerFloors[NUM_TOWER_CHALLENGE_TYPES][MAX_TRAINER_TOWER_FLOORS] = { + [CHALLENGE_TYPE_SINGLE] = { + &sTrainerTowerFloor_Single_1, + &sTrainerTowerFloor_Single_2, + &sTrainerTowerFloor_Single_3, + &sTrainerTowerFloor_Single_4, + &sTrainerTowerFloor_Single_5, + &sTrainerTowerFloor_Single_6, + &sTrainerTowerFloor_Single_7, + &sTrainerTowerFloor_Single_8 + }, + [CHALLENGE_TYPE_DOUBLE] = { + &sTrainerTowerFloor_Double_1, + &sTrainerTowerFloor_Double_2, + &sTrainerTowerFloor_Double_3, + &sTrainerTowerFloor_Double_4, + &sTrainerTowerFloor_Double_5, + &sTrainerTowerFloor_Double_6, + &sTrainerTowerFloor_Double_7, + &sTrainerTowerFloor_Double_8 + }, + [CHALLENGE_TYPE_KNOCKOUT] = { + &sTrainerTowerFloor_Knockout_1, + &sTrainerTowerFloor_Knockout_2, + &sTrainerTowerFloor_Knockout_3, + &sTrainerTowerFloor_Knockout_4, + &sTrainerTowerFloor_Knockout_5, + &sTrainerTowerFloor_Knockout_6, + &sTrainerTowerFloor_Knockout_7, + &sTrainerTowerFloor_Knockout_8 + }, + [CHALLENGE_TYPE_MIXED] = { + &sTrainerTowerFloor_Mixed_1, + &sTrainerTowerFloor_Mixed_2, + &sTrainerTowerFloor_Mixed_3, + &sTrainerTowerFloor_Double_8, + &sTrainerTowerFloor_Mixed_5, + &sTrainerTowerFloor_Knockout_8, + &sTrainerTowerFloor_Double_3, + &sTrainerTowerFloor_Knockout_2 + } +}; diff --git a/src/water.c b/src/water.c index 5f7fa4dc6..eb7c13c8f 100644 --- a/src/water.c +++ b/src/water.c @@ -56,7 +56,7 @@ static void CreateWaterSportDroplet(struct Task*); static void CreateWaterPulseRingBubbles(struct Sprite*, s32, s32); // Both unused? Comment copied from pokeemerald -static const u8 gUnknown_83E44F4[] = INCBIN_U8("graphics/battle_anims/unk_83E4874.4bpp"); +static const u8 gUnknown_83E44F4[] = INCBIN_U8("graphics/battle_anims/unk_83E44F4.4bpp"); static const u8 gUnknown_83E4874[] = INCBIN_U8("graphics/battle_anims/unk_83E4874.bin"); static const union AnimCmd sAnim_RainDrop[] = |