mirror of
https://github.com/thornAvery/jep-hack.git
synced 2026-02-06 16:15:24 +13:00
Breakable rocks now have items, add Club Fossil
This commit is contained in:
parent
275d86288c
commit
91e1763395
9 changed files with 76 additions and 14 deletions
|
|
@ -81,3 +81,39 @@ CheckForHiddenItems:
|
|||
call GetFarByte
|
||||
inc hl
|
||||
ret
|
||||
|
||||
; from https://github.com/pret/pokecrystal/wiki/Smashing-rocks-has-a-chance-to-contain-items
|
||||
RockItemEncounter:
|
||||
ld hl, .RockItems
|
||||
call Random
|
||||
.loop
|
||||
sub [hl]
|
||||
jr c, .ok
|
||||
inc hl
|
||||
inc hl
|
||||
jr .loop
|
||||
|
||||
.ok
|
||||
ld a, [hli]
|
||||
inc a
|
||||
jr z, .done
|
||||
ld a, [hli]
|
||||
.done
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
.RockItems:
|
||||
db 1, MAX_REVIVE
|
||||
db 2, DOME_FOSSIL
|
||||
db 2, HELIX_FOSSIL
|
||||
db 2, WING_FOSSIL
|
||||
db 2, OLD_AMBER
|
||||
db 2, CLUB_FOSSIL
|
||||
db 4, STAR_PIECE
|
||||
db 10, BIG_PEARL
|
||||
db 18, ETHER
|
||||
db 24, HARD_STONE
|
||||
db 24, SOFT_SAND
|
||||
db 48, PEARL
|
||||
db 64, BRICK_PIECE
|
||||
db -1
|
||||
|
|
|
|||
|
|
@ -1374,11 +1374,19 @@ RockSmashScript:
|
|||
|
||||
callasm RockMonEncounter
|
||||
readmem wTempWildMonSpecies
|
||||
iffalse .done
|
||||
iffalse .no_battle
|
||||
randomwildmon
|
||||
startbattle
|
||||
reloadmapafterbattle
|
||||
.done
|
||||
end
|
||||
; from https://github.com/pret/pokecrystal/wiki/Smashing-rocks-has-a-chance-to-contain-items
|
||||
.no_battle
|
||||
callasm RockItemEncounter
|
||||
iffalse .no_item
|
||||
opentext
|
||||
verbosegiveitem ITEM_FROM_MEM
|
||||
closetext
|
||||
.no_item
|
||||
end
|
||||
|
||||
MovementData_RockSmash:
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ ItemEffects:
|
|||
dw EvoStoneEffect ; BLK_AUGURITE
|
||||
dw NoEffect ; LEFTOVERS
|
||||
dw EvoStoneEffect ; PEAT_BLOCK
|
||||
dw NoEffect ; ITEM_94
|
||||
dw NoEffect ; CLUB_FOSSIL, was ITEM_94
|
||||
dw NoEffect ; ITEM_95
|
||||
dw RestorePPEffect ; MYSTERYBERRY
|
||||
dw NoEffect ; DRAGON_SCALE
|
||||
|
|
@ -203,10 +203,10 @@ ItemEffects:
|
|||
dw NoEffect ; BLUESKY_MAIL
|
||||
dw NoEffect ; MUSIC_MAIL
|
||||
dw NoEffect ; MIRAGE_MAIL
|
||||
dw NoEffect ; ITEM_BE
|
||||
dw NoEffect ; ITEM_DC
|
||||
dw NoEffect ; ITEM_C3
|
||||
dw NoEffect ; ITEM_FA
|
||||
dw NoEffect ; OLD_AMBER
|
||||
dw NoEffect ; DOME_FOSSIL
|
||||
dw NoEffect ; HELIX_FOSSIL
|
||||
dw NoEffect ; WING_FOSSIL
|
||||
assert_table_length NUM_ITEMS
|
||||
; The items past ITEM_B3 do not have effect entries:
|
||||
; They all have the ITEMMENU_NOUSE attribute so they can't be used anyway.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue