You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Fix snake_case filenames
Renamed a bunch of files, most of them one-off functions, to better fit the general snake_case naming scheme. Also renamed some awfully long filenames.
This commit is contained in:
62
engine/battle_anims/pokeball_wobble.asm
Normal file
62
engine/battle_anims/pokeball_wobble.asm
Normal file
@@ -0,0 +1,62 @@
|
||||
GetPokeBallWobble: ; f971 (3:7971)
|
||||
; Returns whether a Poke Ball will wobble in the catch animation.
|
||||
; Whether a Pokemon is caught is determined beforehand.
|
||||
|
||||
push de
|
||||
|
||||
ld a, [rSVBK]
|
||||
ld d, a
|
||||
push de
|
||||
|
||||
ld a, BANK(wBuffer2)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld a, [wBuffer2]
|
||||
inc a
|
||||
ld [wBuffer2], a
|
||||
|
||||
; Wobble up to 3 times.
|
||||
cp 3 + 1
|
||||
jr z, .finished
|
||||
|
||||
ld a, [wWildMon]
|
||||
and a
|
||||
ld c, 0 ; next
|
||||
jr nz, .done
|
||||
|
||||
ld hl, WobbleProbabilities
|
||||
ld a, [wBuffer1]
|
||||
ld b, a
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp b
|
||||
jr nc, .checkwobble
|
||||
inc hl
|
||||
jr .loop
|
||||
|
||||
.checkwobble
|
||||
ld b, [hl]
|
||||
call Random
|
||||
cp b
|
||||
ld c, 0 ; next
|
||||
jr c, .done
|
||||
ld c, 2 ; escaped
|
||||
jr .done
|
||||
|
||||
.finished
|
||||
ld a, [wWildMon]
|
||||
and a
|
||||
ld c, 1 ; caught
|
||||
jr nz, .done
|
||||
ld c, 2 ; escaped
|
||||
|
||||
.done
|
||||
pop de
|
||||
ld e, a
|
||||
ld a, d
|
||||
ld [rSVBK], a
|
||||
ld a, e
|
||||
pop de
|
||||
ret
|
||||
|
||||
INCLUDE "data/battle/wobble_probabilities.asm"
|
||||
Reference in New Issue
Block a user