diff --git a/data/tilesets/water_tilesets.asm b/data/tilesets/water_tilesets.asm index 6bf891c1..c5f0b6c0 100644 --- a/data/tilesets/water_tilesets.asm +++ b/data/tilesets/water_tilesets.asm @@ -12,3 +12,8 @@ WaterTilesets: db CITRINE db CELESTE db -1 ; end + +NonShoreTilesets: + db GYM + db SHIP_PORT + db -1 ; end diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm index fcbabf01..77a9728e 100644 --- a/engine/battle/experience.asm +++ b/engine/battle/experience.asm @@ -174,6 +174,7 @@ GainExperience: farcall CalcLevelFromExperience pop hl ld a, [hl] ; current level + ld [wTempLevel], a cp d jp z, .nextMon ; if level didn't change, go to next mon ld a, [wCurEnemyLVL] @@ -269,7 +270,20 @@ GainExperience: ld [wMonDataLocation], a ld a, [wd0b5] ld [wd11e], a + ld a, [wCurEnemyLVL] + ld c, a + ld a, [wTempLevel] + ld b, a +.level_loop + inc b + ld a, b + ld [wCurEnemyLVL], a + push bc predef LearnMoveFromLevelUp + pop bc + ld a, b + cp c + jr nz, .level_loop ld hl, wCanEvolveFlags ld a, [wWhichPokemon] ld c, a diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 6f78ff14..8b5c7e4e 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -2942,9 +2942,11 @@ IsNextTileShoreOrWater: call IsInArray jr nc, .notShoreOrWater ld a, [wCurMapTileset] - cp SHIP_PORT ; Vermilion Dock tileset + ld hl, NonShoreTilesets + ld de, 1 + call IsInArray ; check if shore tiles should be skipped ld a, [wTileInFrontOfPlayer] ; tile in front of player - jr z, .skipShoreTiles ; if it's the Vermilion Dock tileset + jr c, .skipShoreTiles ; if it's the Vermilion Dock tileset cp $48 ; eastern shore tile in Safari Zone jr z, .shoreOrWater cp $32 ; usual eastern shore tile diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index f0962bd4..b907afe3 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -681,7 +681,7 @@ SetCursorPositionsFromOptions: ; 00: X coordinate of menu cursor ; 01: delay after printing a letter (in frames) TextSpeedOptionData: - db 14, TEXT_DELAY_SLOW + db 15, TEXT_DELAY_SLOW db 9, TEXT_DELAY_MEDIUM db 1, TEXT_DELAY_FAST db 9, -1 ; end (default X coordinate) diff --git a/engine/menus/save.asm b/engine/menus/save.asm index 788ecf1c..6823da53 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -25,6 +25,8 @@ LoadSAV: ld a, $1 ; bad checksum .goodsum ld [wSaveFileStatus], a + ld a, 1 + ld [wOptionsInitialized], a ret FileDataDestroyedText: diff --git a/engine/movie/oak_speech/init_player_data.asm b/engine/movie/oak_speech/init_player_data.asm index 44869d44..94921276 100644 --- a/engine/movie/oak_speech/init_player_data.asm +++ b/engine/movie/oak_speech/init_player_data.asm @@ -35,8 +35,6 @@ DEF START_MONEY EQU $3000 ld hl, wObtainedBadges ld [hli], a - ld [hl], a - ld hl, wPlayerCoins ld [hli], a ld [hl], a diff --git a/ram/wram.asm b/ram/wram.asm index c55592af..ff6a5452 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -203,6 +203,7 @@ ENDU SECTION "Overworld Map", WRAM0 UNION +wTempLevel:: wOverworldMap:: ds 1300 wOverworldMapEnd::