Gen 3 introduced Dive, a field move that can reach the seafloor, as HM08. Fully implementing Dive is fairly complicated: its in-battle effect is similar to Dig and Fly but not exactly the same, and its field effect requires a lot of changes. (The code for this feature was adapted from [Pokémon Orange](https://github.com/PiaCarrot/pokeorange/).) [Here](https://github.com/Rangi42/pokecrystal/commit/c21561ea717feef9b2eb3785c2ea112cd0d19ba0) are all the changes needed to implement Dive, applied to a copy of pokecrystal. You can `clone` [Rangi42/pokecrystal](https://github.com/Rangi42/pokecrystal/tree/dive) and `checkout` the `dive` branch to test it for yourself. ![Screenshot](screenshots/dive.png) ## TOC TODO ## 1. Start to prepare the Dive move - constants/move_constants.asm - data/moves/names.asm - data/moves/descriptions.asm - data/moves/moves.asm - data/pokemon/evos_attacks.asm ## 2. Create the Dive move animation - constants/battle_anim_constants.asm - data/battle_anims/objects.asm - data/moves/animations.asm ## 3. Using Dive hides the Pokémon underwater - constants/battle_constants.asm - wram.asm - engine/battle/core.asm - engine/battle/effect_commands.asm - engine/battle_anims/bg_effects.asm - engine/battle/ai/scoring.asm ## 4. Surf and Whirlpool do double damage to underwater Pokémon - constants/move_effect_constants.asm - data/moves/moves.asm (again) - data/moves/effects_pointers.asm - data/moves/effects.asm - macros/scripts/battle_commands.asm - data/battle/effect_command_pointers.asm - engine/battle/effect_commands.asm (again) - engine/battle/ai/scoring.asm (again) ## 5. Prepare the HM08 item - constants/item_constants.asm - data/items/names.asm - data/items/attributes.asm - data/moves/tmhm_moves.asm - home/hm_moves.asm - data/pokemon/base_stats/\*.asm ## 6. Define collision types for Dive water - constants/collision_constants.asm - data/collision_permissions.asm - engine/overworld/tile_events.asm ## 7. Start to prepare the Dive field move effect - constants/menu_constants.asm - data/mon_menu.asm - engine/menus/start_menu.asm ## 8. Define a utility function to check for Dive water - home/map_objects.asm ## 9. Define text related to using Dive - data/text/common_2.asm ## 10. Define the `divemap` and `divewarp` event commands - wram.asm - macros/scripts/events.asm - engine/overworld/scripting.asm - home/flag.asm - engine/overworld/warp_connection.asm ## 11. Finish the Dive field move effect - engine/events/overworld.asm ## 12. Press A on Dive water to use Dive - engine/overworld/events.asm ## 13. Design a sprite for swimming underwater - gfx/sprites/dive.png - constants/sprite_constants.asm - data/sprites/sprites.asm - gfx/sprites.asm ## 14. Use the sprite for the player when underwater - constants/wram_constants.asm - data/sprites/player_sprites.asm - engine/events/overworld.asm (again) - engine/overworld/map_setup.asm - engine/overworld/player_movement.asm ## 15. Start creating a unique tileset for underwater maps - constants/tileset_constants.asm - gfx/tilesets/underwater.png - gfx/tilesets/underwater_palette_map.asm - data/tilesets/underwater_metatiles.bin - data/tilesets/underwater_collision.asm - data/tilesets.asm - gfx/tileset_palette_maps.asm - gfx/tilesets.asm ## 16. Can't Fly while underwater - engine/events/overworld.asm (again) ## 17. Animate underwater seaweed and bubbles - gfx/tilesets/bubble/1.png - gfx/tilesets/bubble/2.png - gfx/tilesets/bubble/3.png - gfx/tilesets/bubble/4.png - gfx/tilesets/bubble/5.png - gfx/tilesets/seaweed/1.png - gfx/tilesets/seaweed/2.png - engine/tilesets/tileset_anims.asm ## 17. Use special palettes for underwater tiles and sprites - gfx/tilesets/underwater.pal - gfx/tilesets/underwater_sprites.pal - engine/tilesets/tileset_palettes.asm - engine/gfx/color.asm ## 18. Fix bugs that affect the Dive features - engine/overworld/overworld.asm - home/map.asm ## 19. Receive HM08 Dive and explain it - constants/event_flags.asm - maps/CeruleanGym.asm ## 20. Add deep water to an overworld tileset - gfx/tilesets/johto.png - gfx/tilesets/johto_palette_map.asm - data/tilesets/johto_collision.asm - data/tilesets/johto_metatiles.bin - gfx/tilesets/water/deep-water.png - engine/tilesets/tileset_anims.asm (again) ## 21. Add a map with Dive spots - maps/Route41.blk - maps/Route41.asm - maps/Route41Underwater.blk - maps/Route41Underwater.asm - constants/event_flags.asm (again) - constants/map_constants.asm - data/maps/maps.asm - data/maps/attributes.asm - data/wild/johto_grass.asm - data/maps/blocks.asm - data/maps/scripts.asm - data/maps/roofs.asm - data/maps/outdoor_sprites.asm