diff options
| author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-11-04 20:11:52 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-04 20:11:52 -0500 |
| commit | ed03fc4f4a3287a01647e528abba27aac1937de0 (patch) | |
| tree | 32fef70a31af3a0b5ad2b0d34042c312574fb42d /engine/items | |
| parent | 87131eaa1ba5dc898e64c7415b5bce61c6aa146d (diff) | |
| parent | aae999f72bd81a3156c7e00da4ebf499f52da5a6 (diff) | |
Merge pull request #59 from Rangi42/master
Start reorganizing pokeyellow
Diffstat (limited to 'engine/items')
| -rwxr-xr-x | engine/items/item_effects.asm | 4 | ||||
| -rw-r--r-- | engine/items/super_rod.asm | 41 |
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" |
