Groundwork for James Bottle Caps

Currently, he doesn't deduct a Bottle Cap and he only fills out Attack and Defence. DVs are stored as a 16-bit address, so I need to find a way to make `a` work with it...
This commit is contained in:
Llinos Evans 2023-05-11 08:43:19 +01:00
parent 76fc5f737e
commit 9bc7505195
12 changed files with 148 additions and 47 deletions

View file

@ -93,7 +93,7 @@ ItemUsePtrTable:
dw UnusableItem ; LIFT_KEY
dw UnusableItem ; EXP_ALL
dw ItemUseEvoStone ; was OLD_ROD, now CANDY_SACK
dw ItemUseGoodRod ; GOOD_ROD
dw UnusableItem ; was GOOD_ROD, now BOTTLE_CAP
dw ItemUseSuperRod ; SUPER_ROD
dw ItemUsePPUp ; PP_UP (real one)
dw ItemUsePPRestore ; ETHER
@ -1862,40 +1862,41 @@ CoinCaseNumCoinsText:
text_far _CoinCaseNumCoinsText
text_end
ItemUseOldRod:
call FishingInit
jp c, ItemUseNotTime
lb bc, 5, MAGIKARP
ld a, $1 ; set bite
jr RodResponse
; The Rods have been replaced with the Candy Sack and Bottle Cap, respectively.
;ItemUseOldRod:
; call FishingInit
; jp c, ItemUseNotTime
; lb bc, 5, MAGIKARP
; ld a, $1 ; set bite
; jr RodResponse
ItemUseGoodRod:
call FishingInit
jp c, ItemUseNotTime
.RandomLoop
call Random
srl a
jr c, .SetBite
and %11
cp 2
jr nc, .RandomLoop
; choose which monster appears
ld hl, GoodRodMons
add a
ld c, a
ld b, 0
add hl, bc
ld b, [hl]
inc hl
ld c, [hl]
and a
.SetBite
ld a, 0
rla
xor 1
jr RodResponse
;ItemUseGoodRod:
; call FishingInit
; jp c, ItemUseNotTime
;.RandomLoop
; call Random
; srl a
; jr c, .SetBite
; and %11
; cp 2
; jr nc, .RandomLoop
; ; choose which monster appears
; ld hl, GoodRodMons
; add a
; ld c, a
; ld b, 0
; add hl, bc
; ld b, [hl]
; inc hl
; ld c, [hl]
; and a
;.SetBite
; ld a, 0
; rla
; xor 1
; jr RodResponse
INCLUDE "data/wild/good_rod.asm"
;INCLUDE "data/wild/good_rod.asm"
ItemUseSuperRod:
call FishingInit