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

@ -2899,6 +2899,10 @@ PrintMenuItem:
hlcoord 1, 9
ld de, TypeText
call PlaceString
hlcoord 1, 11
ld a, "<BOLD_P>"
ld [hli], a
ld [hl], "<BOLD_P>"
hlcoord 7, 11
ld [hl], "/"
hlcoord 5, 9

View file

@ -1,14 +1,15 @@
SaveTrainerName::
ld hl, TrainerNamePointers
ld a, [wTrainerClass]
dec a
ld c, a
ld b, 0
add hl, bc
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
; ld hl, TrainerNamePointers
; ld a, [wTrainerClass]
; dec a
; ld c, a
; ld b, 0
; add hl, bc
; add hl, bc
; ld a, [hli]
; ld h, [hl]
; ld l, a
ld hl, wTrainerName
ld de, wcd6d
.CopyCharacter
ld a, [hli]
@ -18,4 +19,6 @@ SaveTrainerName::
jr nz, .CopyCharacter
ret
INCLUDE "data/trainers/name_pointers.asm"
; INCLUDE "data/trainers/name_pointers.asm"
; https://github.com/pret/pokered/wiki/Remove-Redundant-TrainerNamePointers
; name_pointers is redundant when hacking the international releases ~ PvK

View file

@ -320,6 +320,7 @@ TrainerAI:
jp hl
INCLUDE "data/trainers/ai_pointers.asm"
; when there's a +1 on the gym/e4 it's referring to the number of items to use - PvK
JugglerAI:
cp 25 percent + 1
@ -334,7 +335,7 @@ BlackbeltAI:
GiovanniAI:
cp 25 percent + 1
ret nc
jp AIUseGuardSpec
jp AIUseXAttack ; Used to use a Guard Spec. This will make the item use have a proper impact - healing doesn't feel right for a trainer fixated on strength.
CooltrainerMAI:
cp 25 percent + 1
@ -342,8 +343,7 @@ CooltrainerMAI:
jp AIUseXAttack
CooltrainerFAI:
; The intended 25% chance to consider switching will not apply.
; Uncomment the line below to fix this.
; The intended 25% chance to consider switching applies, this fixes a bug.
cp 25 percent + 1
ret nc ; fixes the bug
ld a, 10
@ -362,14 +362,20 @@ BrockAI:
jp AIUseFullHeal
MistyAI:
; cp 25 percent + 1
; ret nc
; jp AIUseXDefend old Misty AI
cp 25 percent + 1
ret nc
jp AIUseXDefend
ld a, 10
call AICheckIfHPBelowFraction
ret nc
jp AIUsePotion ; Replicates Starmie using Recover, but in a more balanced manner. Unlike other trainers that heal, Misty will do this 26% of the time instead of 51%.
LtSurgeAI:
cp 25 percent + 1
ret nc
jp AIUseXSpeed
jp AIUseXSpecial ; Used to be an X Speed. His party is already fast, so this seems far more appropriate.
ErikaAI:
cp 50 percent + 1
@ -380,9 +386,15 @@ ErikaAI:
jp AIUseSuperPotion
KogaAI:
cp 25 percent + 1
; cp 25 percent + 1
; ret nc
; jp AIUseXAttack old AI
cp 50 percent + 1
ret nc
jp AIUseXAttack
ld a, 10
call AICheckIfHPBelowFraction
ret nc
jp AIUseSuperPotion ; Koga is weird - I don't think anything fits. X Attack is certainly not the move though...
BlaineAI:
cp 25 percent + 1
@ -390,7 +402,7 @@ BlaineAI:
ld a, 10
call AICheckIfHPBelowFraction
ret nc ; this fixes the super potion thing - PvK
jp AIUseSuperPotion
jp AIUseHyperPotion ; Instead of a Super Potion though, let's give him this. More impactful for the sixth gym while staying true to the meme that everyone knows Gen 1 Blaine for.
SabrinaAI:
cp 25 percent + 1
@ -416,36 +428,55 @@ Rival3AI:
ret nc
jp AIUseFullRestore
; Elite Four members will use an associated X Item or a Full Restore.
LoreleiAI:
cp 15 percent + 1
ret nc
jp AIUseXSpecial
cp 50 percent + 1
ret nc
ld a, 5
call AICheckIfHPBelowFraction
ret nc
jp AIUseSuperPotion
jp AIUseFullRestore
BrunoAI:
cp 25 percent + 1
;cp 25 percent + 1
;ret nc
; jp AIUseXDefend old ai...???
cp 15 percent + 1
ret nc
jp AIUseXDefend
jp AIUseXAttack
cp 50 percent + 1
ret nc
ld a, 5
call AICheckIfHPBelowFraction
ret nc
jp AIUseFullRestore
AgathaAI:
cp 8 percent
jp c, AISwitchIfEnoughMons
cp 15 percent + 1
ret nc
jp AIUseXAccuracy ; hahahahahahahaha
cp 50 percent + 1
ret nc
ld a, 4
call AICheckIfHPBelowFraction
ret nc
jp AIUseSuperPotion
jp AIUseFullRestore
LanceAI:
cp 15 percent + 1
ret nc
jp AIUseXSpecial
cp 50 percent + 1
ret nc
ld a, 5
call AICheckIfHPBelowFraction
ret nc
jp AIUseHyperPotion
jp AIUseFullRestore
GenericAI:
and a ; clear carry
@ -703,7 +734,8 @@ AIUseXSpeed:
AIUseXSpecial:
ld b, $D
ld a, X_SPECIAL
; fallthrough
jr AIIncreaseStat ; this wasn't here before but it seems that this never actually happened??
;; fallthrough
AIIncreaseStat:
ld [wAIItem], a