Merge pull request #17 from thornAvery/master

Bug Fixes
This commit is contained in:
Llinos Evans 2023-09-23 01:23:57 +01:00 committed by GitHub
commit 85b4d39146
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 27 additions and 5 deletions

View file

@ -12,3 +12,8 @@ WaterTilesets:
db CITRINE
db CELESTE
db -1 ; end
NonShoreTilesets:
db GYM
db SHIP_PORT
db -1 ; end

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -25,6 +25,8 @@ LoadSAV:
ld a, $1 ; bad checksum
.goodsum
ld [wSaveFileStatus], a
ld a, 1
ld [wOptionsInitialized], a
ret
FileDataDestroyedText:

View file

@ -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

View file

@ -203,6 +203,7 @@ ENDU
SECTION "Overworld Map", WRAM0
UNION
wTempLevel::
wOverworldMap:: ds 1300
wOverworldMapEnd::