LOTS of things

- Replaces the Old Rod with the Candy Sack, an item to evolve Meltan into Melmetal. Meltan and Melmetal aren't in yet.
- Improves Gym Leader and Elite Four AI by a lot. They still use items, they're just better. Fixes XSpecial use while we're at it; before, it didn't actually increase the stat...
- The Scarlet Book now takes up both shelves, one section for each Paradox Pokemon. I also moved the bookshelf so it looks nicer.
- Text in Celadon University has been reduced significantly, taking up less memory and being a bit more RBY-like. It has also been made more accurate (thanks to Daiginjo for translating my booklet!)
- The Magikarp researcher in Celadon University now gives TM Dragon Rage (no longer unused!)
- Added a guard for Mt. Moon Crater.
- Removed TrainerNamePointers, Blank Leader Name Code, and Dakutens/Hakutens using a guide published by YakiNeen.
- PP no longer uses a shitty graphic and is instead properly implemented into the font, optimising the status screen. Also displays in-battle which is kinda cool.
- Lorelei, Bruno, and Agatha now play the Gym Leader theme, not just Lance.

Still unsure how to fix Celadon University's trainers, all I know is a lot of the information should be taken from the Oak fight I did. The code is radically different and doesn't call trainer headers at all. You'll likely want to start from scratch.

The Mt. Moon Crater Guard's text is a little wonky, not sure what's up there. May have been from the way I accessed Mt. Moon in testing. Anyway, if you want to mess around feel free.
This commit is contained in:
May Evans 2023-02-19 06:25:33 +00:00
parent a3f3763f4d
commit a85c26b7d3
41 changed files with 317 additions and 277 deletions

View file

@ -4,6 +4,7 @@ DrawBadges:
; In Japanese versions, names are displayed above faces.
; Instead of removing relevant code, the name graphics were erased.
; KEP removes the code as well to optimise memory.
; Tile ids for face/badge graphics.
ld de, wBadgeOrFaceTiles
@ -41,7 +42,7 @@ DrawBadges:
ld hl, wBadgeNumberTile
ld a, $d8 ; [1]
ld [hli], a
ld [hl], $60 ; First name
; ld [hl], $60 ; First name, unneeded
hlcoord 2, 11
ld de, wTempObtainedBadgesBooleans
@ -64,20 +65,24 @@ DrawBadges:
ld [hli], a
inc a
ld [wBadgeNumberTile], a
; Names aren't printed if the badge is owned.
ld a, [de]
and a
ld a, [wBadgeNameTile]
jr nz, .SkipName
call .PlaceTiles
jr .PlaceBadge
.SkipName
inc a
inc a
inc hl
; Names aren't printed if the badge is owned. - unnecessary code
; ld a, [de]
; and a
; ld a, [wBadgeNameTile]
; jr nz, .SkipName
; call .PlaceTiles
; jr .PlaceBadge
;
;.SkipName
; inc a
; inc a
; inc hl
.PlaceBadge
ld [wBadgeNameTile], a
ld de, SCREEN_WIDTH - 1

View file

@ -231,13 +231,13 @@ DisplayNamingScreen:
ld a, [hl]
ld [wNamingScreenLetter], a
call CalcStringLength
ld a, [wNamingScreenLetter]
cp "゙"
ld de, Dakutens
jr z, .dakutensAndHandakutens
cp "゚"
ld de, Handakutens
jr z, .dakutensAndHandakutens
;ld a, [wNamingScreenLetter]
;cp "゙"
;ld de, Dakutens
;jr z, .dakutensAndHandakutens
;cp "゚"
;ld de, Handakutens
;jr z, .dakutensAndHandakutens | japanese: not needed in the international releases
ld a, [wNamingScreenType]
cp NAME_MON_SCREEN
jr nc, .checkMonNameLength
@ -251,12 +251,12 @@ DisplayNamingScreen:
jr c, .addLetter
ret
.dakutensAndHandakutens
push hl
call DakutensAndHandakutens
pop hl
ret nc
dec hl
;.dakutensAndHandakutens | japanese, not needed
; push hl
; call DakutensAndHandakutens
; pop hl
; ret nc
; dec hl
.addLetter
ld a, [wNamingScreenLetter]
ld [hli], a
@ -420,21 +420,21 @@ PrintNicknameAndUnderscores:
ld [hl], $77 ; raised underscore tile id
ret
DakutensAndHandakutens:
push de
call CalcStringLength
dec hl
ld a, [hl]
pop hl
ld de, $2
call IsInArray
ret nc
inc hl
ld a, [hl]
ld [wNamingScreenLetter], a
ret
;DakutensAndHandakutens: | japanese - not needed
; push de
; call CalcStringLength
; dec hl
; ld a, [hl]
; pop hl
; ld de, $2
; call IsInArray
; ret nc
; inc hl
; ld a, [hl]
; ld [wNamingScreenLetter], a
; ret
INCLUDE "data/text/dakutens.asm"
; INCLUDE "data/text/dakutens.asm" | deleting
; calculates the length of the string at wStringBuffer and stores it in c
CalcStringLength:

View file

@ -500,9 +500,12 @@ DrawTrainerInfo:
ld bc, 8 tiles
push bc
call TrainerInfo_FarCopyData
ld hl, BlankLeaderNames
ld de, vChars2 tile $60
ld bc, $17 tiles
;ld hl, BlankLeaderNames - unnecessary code
;ld de, vChars2 tile $60
;ld bc, $17 tiles
ld hl, CircleTile ; better code here to line 508
ld de, vChars2 tile $76
ld bc, 1 tiles
call TrainerInfo_FarCopyData
pop bc
ld hl, BadgeNumbersTileGraphics ; badge number tile patterns