mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
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:
parent
a3f3763f4d
commit
a85c26b7d3
41 changed files with 317 additions and 277 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -22,13 +22,16 @@ KabutopsFossilText::
|
|||
text_far _KabutopsFossilText
|
||||
text_end
|
||||
|
||||
ScarletBook::
|
||||
ScarletBookScream::
|
||||
ld a, SCREAM_TAIL
|
||||
ld [wcf91], a
|
||||
call PlayCry
|
||||
call DisplayMonFrontSpriteInBox
|
||||
call EnableAutoTextBoxDrawing
|
||||
tx_pre ScarletBook1
|
||||
ret
|
||||
|
||||
ScarletBookSandy::
|
||||
ld a, SANDY_SHOCKS
|
||||
ld [wcf91], a
|
||||
call PlayCry
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ ItemUsePtrTable:
|
|||
dw ItemUsePokeflute ; POKE_FLUTE
|
||||
dw UnusableItem ; LIFT_KEY
|
||||
dw UnusableItem ; EXP_ALL
|
||||
dw ItemUseOldRod ; OLD_ROD
|
||||
dw ItemUseEvoStone ; was OLD_ROD, now CANDY_SACK
|
||||
dw ItemUseGoodRod ; GOOD_ROD
|
||||
dw ItemUseSuperRod ; SUPER_ROD
|
||||
dw ItemUsePPUp ; PP_UP (real one)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -97,10 +97,10 @@ StatusScreen:
|
|||
ld hl, vChars2 tile $76
|
||||
lb bc, BANK(BattleHudTiles3), 2
|
||||
call CopyVideoDataDouble ; ─ ┘
|
||||
ld de, PTile
|
||||
ld hl, vChars2 tile $72
|
||||
lb bc, BANK(PTile), 1
|
||||
call CopyVideoDataDouble ; bold P (for PP)
|
||||
;ld de, PTile
|
||||
;ld hl, vChars2 tile $72
|
||||
;lb bc, BANK(PTile), 1
|
||||
;call CopyVideoDataDouble ; bold P (for PP) - no longer needed
|
||||
ldh a, [hTileAnimations]
|
||||
push af
|
||||
xor a
|
||||
|
|
@ -244,7 +244,7 @@ DrawLineBox:
|
|||
ld [hl], $6f ; ← (halfarrow ending)
|
||||
ret
|
||||
|
||||
PTile: INCBIN "gfx/font/P.1bpp"
|
||||
;PTile: INCBIN "gfx/font/P.1bpp" lol
|
||||
|
||||
PrintStatsBox:
|
||||
ld a, d
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue