summaryrefslogtreecommitdiff
path: root/engine/items
diff options
context:
space:
mode:
Diffstat (limited to 'engine/items')
-rwxr-xr-xengine/items/item_effects.asm4
-rw-r--r--engine/items/super_rod.asm41
2 files changed, 43 insertions, 2 deletions
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm
index b1b458ab..d4c3ae18 100755
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -1037,7 +1037,7 @@ ItemUseMedicine:
push hl
push de
push bc
- callfar Func_2fd6a
+ callfar RespawnOverworldPikachu
pop bc
pop de
pop hl
@@ -1542,7 +1542,7 @@ ItemUseMedicine:
push af
ld a, [wUsedItemOnWhichPokemon]
ld [wWhichPokemon], a
- callfar Func_2fd6a ; evolve pokemon, if appropriate
+ callfar RespawnOverworldPikachu ; evolve pokemon, if appropriate
pop af
ld [wWhichPokemon], a
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"