diff options
Diffstat (limited to 'engine/items/super_rod.asm')
-rw-r--r-- | engine/items/super_rod.asm | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/engine/items/super_rod.asm b/engine/items/super_rod.asm new file mode 100644 index 00000000..db82f5fb --- /dev/null +++ b/engine/items/super_rod.asm @@ -0,0 +1,41 @@ +ReadSuperRodData: + ld a, [wCurMap] + ld c, a + ld hl, SuperRodFishingSlots +.loop + ld a, [hli] + cp $ff + jr z, .notfound + cp c + jr z, .found + ld de, $8 + add hl, de + jr .loop +.found + call GenerateRandomFishingEncounter + ret +.notfound + ld de, $0 + ret + +GenerateRandomFishingEncounter: + call Random + cp $66 + jr c, .asm_f5ed6 + inc hl + inc hl + cp $b2 + jr c, .asm_f5ed6 + inc hl + inc hl + cp $e5 + jr c, .asm_f5ed6 + inc hl + inc hl +.asm_f5ed6 + ld e, [hl] + inc hl + ld d, [hl] + ret + +INCLUDE "data/wild/super_rod.asm" |