aboutsummaryrefslogtreecommitdiffstats
path: root/engine/items/super_rod.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-11-04 20:11:52 -0500
committerGitHub <noreply@github.com>2020-11-04 20:11:52 -0500
commited03fc4f4a3287a01647e528abba27aac1937de0 (patch)
tree32fef70a31af3a0b5ad2b0d34042c312574fb42d /engine/items/super_rod.asm
parentMerge branch 'master' of https://github.com/pret/pokered (diff)
parentStart reorganizing pokeyellow (diff)
downloadpokeyellow-ed03fc4f4a3287a01647e528abba27aac1937de0.tar.gz
pokeyellow-ed03fc4f4a3287a01647e528abba27aac1937de0.tar.xz
pokeyellow-ed03fc4f4a3287a01647e528abba27aac1937de0.zip
Merge pull request #59 from Rangi42/master
Start reorganizing pokeyellow
Diffstat (limited to 'engine/items/super_rod.asm')
-rw-r--r--engine/items/super_rod.asm41
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"