diff --git a/constants/map_constants.asm b/constants/map_constants.asm index ff5836c..1ef29b3 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -700,6 +700,7 @@ ENDM newgroup SUNGLOW_CITY ; 40 map_const ROUTE_57, 10, 27 ; 1 map_const SUNGLOW_CITY, 10, 9 ; 2 + map_const SUNGLOW_WELL, 10, 9 ; 2 endgroup newgroup BLUE_FOREST ; 41 diff --git a/data/maps/attributes.asm b/data/maps/attributes.asm index 864f502..5d097ce 100644 --- a/data/maps/attributes.asm +++ b/data/maps/attributes.asm @@ -926,6 +926,8 @@ ENDM map_attributes SunglowCity, SUNGLOW_CITY, $03, SOUTH ; this is missing a route connection connection south, Route57, ROUTE_57, 0 + + map_attributes SunglowWell, SUNGLOW_WELL, $03, SOUTH ; this is missing a route connection map_attributes BlueForest, BLUE_FOREST, $00, 0 ; this is on its own for now. add connections later. diff --git a/data/maps/blocks.asm b/data/maps/blocks.asm index 792e764..8490a4e 100644 --- a/data/maps/blocks.asm +++ b/data/maps/blocks.asm @@ -1342,6 +1342,9 @@ Route57_Blocks: SunglowCity_Blocks: INCBIN "maps/SunglowCity.ablk" +SunglowWell_Blocks: + INCBIN "maps/SunglowWell.ablk" + AventurineCity_Blocks: INCBIN "maps/AventurineCity.ablk" diff --git a/data/maps/maps.asm b/data/maps/maps.asm index 8ad4194..951682a 100644 --- a/data/maps/maps.asm +++ b/data/maps/maps.asm @@ -769,6 +769,7 @@ MapGroup_SunglowCity: table_width MAP_LENGTH, MapGroup_SunglowCity map Route57, TILESET_NIHON_BIRDON, ROUTE, LANDMARK_ROUTE_57, MUSIC_MOBILE_ADAPTER_MENU, FALSE, PALETTE_AUTO, FISHGROUP_SHORE map SunglowCity, TILESET_NIHON_BIRDON, TOWN, LANDMARK_SUNGLOW_CITY, MUSIC_MOBILE_ADAPTER_MENU, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map SunglowWell, TILESET_UNDERWATER, ROUTE, LANDMARK_SUNGLOW_CITY, MUSIC_MOBILE_ADAPTER, FALSE, PALETTE_AUTO, FISHGROUP_SHORE assert_table_length NUM_SUNGLOW_CITY_MAPS MapGroup_BlueForest: diff --git a/data/maps/scripts.asm b/data/maps/scripts.asm index 6d535a7..78a49df 100644 --- a/data/maps/scripts.asm +++ b/data/maps/scripts.asm @@ -655,4 +655,5 @@ INCLUDE "maps/Route52.asm" INCLUDE "maps/RuddyTown.asm" INCLUDE "maps/Route57.asm" INCLUDE "maps/SunglowCity.asm" -INCLUDE "maps/AventurineCity.asm" \ No newline at end of file +INCLUDE "maps/AventurineCity.asm" +INCLUDE "maps/SunglowWell.asm" \ No newline at end of file diff --git a/data/moves/animations.asm b/data/moves/animations.asm index 5448e16..1918087 100644 --- a/data/moves/animations.asm +++ b/data/moves/animations.asm @@ -5060,12 +5060,12 @@ BattleAnim_WaterSport: anim_2gfx ANIM_GFX_SAND, ANIM_GFX_WATER anim_if_param_equal $0, .hit anim_if_param_equal $2, .fail - anim_call BattleAnim_FollowPlayerHead_0 + anim_call BattleAnim_TargetObj_2Row anim_bgeffect ANIM_BG_DIG, $0, $1, $1 - anim_obj ANIM_OBJ_DIVE_2, 72, 104, $0 + anim_obj ANIM_OBJ_WATER_SPORT_2, 72, 104, $0 anim_sound 0, 0, SFX_BUBBLEBEAM .loop - anim_obj ANIM_OBJ_DIVE_1, 56, 104, $0 + anim_obj ANIM_OBJ_WATER_SPORT_1, 56, 104, $0 anim_wait 16 anim_loop 6, .loop anim_wait 32 @@ -5075,7 +5075,7 @@ BattleAnim_WaterSport: anim_call BattleAnim_ShowMon_0 anim_ret .hit - anim_bgeffect ANIM_BG_30, $0, $0, $0 + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $0, $0, $0 anim_sound 0, 1, SFX_HYDRO_PUMP anim_obj ANIM_OBJ_HYDRO_PUMP, 124, 72, $0 anim_obj ANIM_OBJ_HYDRO_PUMP, 140, 72, $0 diff --git a/data/tilesets/nihon_birdon_attributes.bin b/data/tilesets/nihon_birdon_attributes.bin index eff6609..11bd571 100644 Binary files a/data/tilesets/nihon_birdon_attributes.bin and b/data/tilesets/nihon_birdon_attributes.bin differ diff --git a/data/tilesets/nihon_birdon_collision.asm b/data/tilesets/nihon_birdon_collision.asm index a7bd552..874d272 100644 --- a/data/tilesets/nihon_birdon_collision.asm +++ b/data/tilesets/nihon_birdon_collision.asm @@ -34,11 +34,11 @@ tilecoll WALL, WALL, DOOR, WALL ; 21 tilecoll WALL, WALL, WALL, WALL ; 22 tilecoll WALL, WALL, WALL, WALL ; 23 - tilecoll WALL, WALL, WALL, WALL ; 24 + tilecoll WALL, WALL, WALL, DIVE_DOWN ; 24 tilecoll WALL, WALL, WALL, WALL ; 25 tilecoll WALL, DOOR, FLOOR, FLOOR ; 26 tilecoll WALL, WALL, FLOOR, FLOOR ; 27 - tilecoll WALL, WALL, FLOOR, FLOOR ; 28 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 28 tilecoll WALL, WALL, FLOOR, FLOOR ; 29 tilecoll WALL, WALL, WALL, WALL ; 2a tilecoll WALL, WALL, WALL, WALL ; 2b diff --git a/data/tilesets/nihon_birdon_metatiles.bin b/data/tilesets/nihon_birdon_metatiles.bin index 7b12316..c11090c 100644 Binary files a/data/tilesets/nihon_birdon_metatiles.bin and b/data/tilesets/nihon_birdon_metatiles.bin differ diff --git a/data/tilesets/underwater_attributes.bin b/data/tilesets/underwater_attributes.bin index e69de29..b3a3a6e 100644 Binary files a/data/tilesets/underwater_attributes.bin and b/data/tilesets/underwater_attributes.bin differ diff --git a/data/tilesets/underwater_collision.asm b/data/tilesets/underwater_collision.asm index e69de29..ee623ca 100644 --- a/data/tilesets/underwater_collision.asm +++ b/data/tilesets/underwater_collision.asm @@ -0,0 +1,32 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll WALL, WALL, WALL, WALL ; 02 + tilecoll WALL, WALL, WALL, WALL ; 03 + tilecoll DIVE_UP, DIVE_UP, DIVE_UP, DIVE_UP ; 04 + tilecoll WALL, WALL, WALL, WALL ; 05 + tilecoll WALL, WALL, WALL, WALL ; 06 + tilecoll WALL, WALL, WALL, WALL ; 07 + tilecoll FLOOR, FLOOR, FLOOR, DIVE_UP ; 08 + tilecoll WALL, WALL, WALL, WALL ; 09 + tilecoll WALL, WALL, WALL, WALL ; 0a + tilecoll WALL, WALL, WALL, WALL ; 0b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c + tilecoll WALL, WALL, WALL, WALL ; 0d + tilecoll WALL, WALL, WALL, WALL ; 0e + tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12 + tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 13 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 14 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 15 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 16 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 17 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 18 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 19 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1a + tilecoll WALL, WALL, WALL, WALL ; 1b + tilecoll WALL, WALL, WALL, WALL ; 1c + tilecoll WALL, WALL, WALL, WALL ; 1d + tilecoll WALL, WALL, WALL, WALL ; 1e + tilecoll WALL, WALL, WALL, WALL ; 1f diff --git a/data/tilesets/underwater_metatiles.bin b/data/tilesets/underwater_metatiles.bin index e69de29..3bd5329 100644 Binary files a/data/tilesets/underwater_metatiles.bin and b/data/tilesets/underwater_metatiles.bin differ diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index 570d664..eef790f 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -6121,7 +6121,13 @@ BattleCommand_DoubleUndergroundDamage: call GetBattleVar bit SUBSTATUS_UNDERGROUND, a ret z + jr DoubleDamage +BattleCommand_DoubleUnderwaterDamage: +; doubleunderwaterdamage + ld a, BATTLE_VARS_SUBSTATUS4_OPP + call GetBattleVar + bit SUBSTATUS_UNDERWATER, a ; fallthrough DoubleDamage: @@ -6136,6 +6142,10 @@ DoubleDamage: ld [hl], a .quit ret + +BattleCommand_Unused3C: +BattleCommand_Unused5D: ; Just stuffing these here for now because I'm unsure of if I can just axe them from the effect command pointers?? Probably can but :V + ret INCLUDE "engine/battle/move_effects/mimic.asm" diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 795466e..2985906 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -2115,7 +2115,7 @@ WaterSportFunction: .FailWaterSport: ld hl, CantWaterSportText - call MenuTextBoxBackup + call MenuTextboxBackup ld a, $80 ret @@ -2176,7 +2176,7 @@ CanWaterSportText: AskWaterSportScript: opentext - copybytetovar wPlayerStandingTile + copybytetovar wPlayerTile ifequal COLL_DIVE_UP, .up writetext AskWaterSportDownText jump .continue diff --git a/engine/tilesets/tileset_anims.asm b/engine/tilesets/tileset_anims.asm index 296eb45..e8fb4ff 100644 --- a/engine/tilesets/tileset_anims.asm +++ b/engine/tilesets/tileset_anims.asm @@ -78,7 +78,7 @@ TilesetForestAnim: TilesetJohtoAnim: dw vTiles2 tile $14, AnimateWaterTile - dw NULL, WaitTileAnimation + dw vTiles2 tile $5b, AnimateDeepWaterTile dw NULL, WaitTileAnimation dw NULL, AnimateWaterPalette dw NULL, WaitTileAnimation @@ -237,7 +237,6 @@ TilesetTowerAnim: dw NULL, DoneTileAnimation TilesetNihon1Anim: -TilesetNihonBirdonAnim: TilesetNihonFontAnim: TilesetNihonHighTechAnim: TilesetNihonOldAnim: @@ -255,6 +254,19 @@ TilesetNihonWhiteCityAnim: dw NULL, WaitTileAnimation dw NULL, StandingTileFrame8 dw NULL, DoneTileAnimation + +TilesetNihonBirdonAnim: + dw vTiles2 tile $14, AnimateWaterTile + dw NULL, WaitTileAnimation + dw vTiles2 tile $60, AnimateDeepWaterTile + dw NULL, WaitTileAnimation + dw NULL, AnimateWaterPalette + dw NULL, WaitTileAnimation + dw NULL, AnimateFlowerTile + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, StandingTileFrame8 + dw NULL, DoneTileAnimation TilesetForestKantoAnim: dw NULL, WaitTileAnimation diff --git a/engine/tilesets/tileset_palettes.asm b/engine/tilesets/tileset_palettes.asm index f3d028a..e7410e4 100644 --- a/engine/tilesets/tileset_palettes.asm +++ b/engine/tilesets/tileset_palettes.asm @@ -78,6 +78,11 @@ LoadSpecialMapPalette: scf ret +.underwater + call LoadUnderwaterPalette + scf + ret + .do_nothing and a ret @@ -228,6 +233,38 @@ LoadDesertPalette: ret INCLUDE "gfx/tilesets/desert.pal" + +LoadUnderwaterPalette: + ld a, [wTimeOfDay] + and $7 + cp NITE_F + jr z, .nite + cp DAY_F + jr z, .day + scf +;morn + ld a, BANK(wBGPals1) + ld de, wBGPals1 + ld hl, UnderwaterMornPalette + ld bc, 8 palettes + jp FarCopyWRAM + ret +.day + ld a, BANK(wBGPals1) + ld de, wBGPals1 + ld hl, UnderwaterDayPalette + ld bc, 8 palettes + jp FarCopyWRAM + ret +.nite + ld a, BANK(wBGPals1) + ld de, wBGPals1 + ld hl, UnderwaterNitePalette + ld bc, 8 palettes + jp FarCopyWRAM + ret + +INCLUDE "gfx/tilesets/underwater.pal" LoadSpecialMapObjectPalette: diff --git a/gfx/tilesets/nihon_birdon.png b/gfx/tilesets/nihon_birdon.png index 4074ac8..6f2a98d 100644 Binary files a/gfx/tilesets/nihon_birdon.png and b/gfx/tilesets/nihon_birdon.png differ diff --git a/gfx/tilesets/underwater.pal b/gfx/tilesets/underwater.pal new file mode 100644 index 0000000..aa5a0a3 --- /dev/null +++ b/gfx/tilesets/underwater.pal @@ -0,0 +1,30 @@ +UnderwaterMornPalette: + RGB 31,31,07, 19,18,23, 13,10,13, 03,07,10 ; gray + RGB 31,31,07, 25,16,16, 22,06,14, 03,07,10 ; red + RGB 19,18,23, 09,18,12, 05,11,05, 03,07,10 ; green + RGB 31,31,07, 13,17,31, 05,10,27, 03,07,10 ; water (just blue) + RGB 31,31,07, 12,24,11, 18,13,05, 03,07,10 ; yellow + RGB 31,31,07, 19,17,12, 14,08,11, 03,07,10 ; brown + RGB 31,31,07, 15,31,31, 05,17,31, 03,07,10 ; roof + RGB 31,31,16, 31,31,16, 14,09,00, 00,00,00 ; text + +UnderwaterDayPalette: + RGB 18,28,27, 19,18,23, 13,10,13, 03,07,10 ; gray + RGB 18,28,27, 25,16,16, 22,06,14, 03,07,10 ; red + RGB 19,18,23, 09,18,12, 05,11,05, 03,07,10 ; green + RGB 18,28,27, 13,17,31, 05,10,27, 03,07,10 ; water (just blue) + RGB 18,28,27, 12,24,11, 18,13,05, 03,07,10 ; yellow + RGB 18,28,27, 19,17,12, 14,08,11, 03,07,10 ; brown + RGB 18,28,27, 15,31,31, 05,17,31, 03,07,10 ; roof + RGB 31,31,16, 31,31,16, 14,09,00, 00,00,00 ; text + +UnderwaterNitePalette: + RGB 12,14,22, 10,10,13, 03,07,10, 00,00,00 ; gray + RGB 12,14,22, 14,06,14, 03,07,10, 00,00,00 ; red + RGB 10,10,13, 05,11,05, 03,07,10, 00,00,00 ; green + RGB 12,14,22, 05,10,22, 03,07,10, 00,00,00 ; water (just blue) + RGB 12,14,22, 13,13,05, 03,07,10, 00,00,00 ; yellow + RGB 12,14,22, 14,08,11, 03,07,10, 00,00,00 ; brown + RGB 12,14,22, 10,12,15, 03,07,10, 00,00,00 ; roof + RGB 31,31,16, 31,31,16, 14,09,00, 00,00,00 ; text + \ No newline at end of file diff --git a/gfx/tilesets/underwater.png b/gfx/tilesets/underwater.png index a8278a6..bd8cb2f 100644 Binary files a/gfx/tilesets/underwater.png and b/gfx/tilesets/underwater.png differ diff --git a/maps/DebugRoom.asm b/maps/DebugRoom.asm index 03e5f74..f8a404b 100644 --- a/maps/DebugRoom.asm +++ b/maps/DebugRoom.asm @@ -8,12 +8,12 @@ DebugRoom_MapScripts: DebugPokemon1Script: opentext - getmonname STRING_BUFFER_3, MACHAMP + getmonname STRING_BUFFER_3, AZUMARILL writetext ReceivedDebugPokemonText playsound SFX_CAUGHT_MON waitsfx promptbutton - givepoke MACHAMP, 65, TM_ROCK_SMASH + givepoke AZUMARILL, 4, HM_WATER_SPORT closetext end diff --git a/maps/SunglowCity.asm b/maps/SunglowCity.asm index 51180ee..021e890 100644 --- a/maps/SunglowCity.asm +++ b/maps/SunglowCity.asm @@ -5,11 +5,16 @@ SunglowCity_MapScripts: def_callbacks callback MAPCALLBACK_NEWMAP, .Flypoint + callback MAPCALLBACK_NEWMAP, .DiveMap .Flypoint: setflag ENGINE_FLYPOINT_SUNGLOW_CITY return +.DiveMap: + divemap SUNGLOW_WELL + return + SunglowCity_MapEvents: db 0, 0 ; filler diff --git a/maps/SunglowWell.ablk b/maps/SunglowWell.ablk new file mode 100644 index 0000000..60a77d5 --- /dev/null +++ b/maps/SunglowWell.ablk @@ -0,0 +1,9 @@ + + + + + + +          +  + \ No newline at end of file diff --git a/maps/SunglowWell.asm b/maps/SunglowWell.asm new file mode 100644 index 0000000..7c3946c --- /dev/null +++ b/maps/SunglowWell.asm @@ -0,0 +1,18 @@ + object_const_def + +SunglowWell_MapScripts: + def_scene_scripts + + def_callbacks + +SunglowWell_MapEvents: + db 0, 0 ; filler + + def_warp_events + + def_coord_events + + def_bg_events + + def_object_events +