You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
add pokerus check
This commit is contained in:
31
main.asm
31
main.asm
@@ -18653,7 +18653,36 @@ TileTypeTable: ; 4ce1f
|
|||||||
db $00, $00, $00, $00, $00, $00, $00, $0f
|
db $00, $00, $00, $00, $00, $00, $00, $0f
|
||||||
; 4cf1f
|
; 4cf1f
|
||||||
|
|
||||||
INCBIN "baserom.gbc",$4cf1f,$50000 - $4cf1f
|
INCBIN "baserom.gbc",$4cf1f,$4d860 - $4cf1f
|
||||||
|
|
||||||
|
CheckPokerus: ; 4d860
|
||||||
|
; Return carry if a monster in your party has Pokerus
|
||||||
|
|
||||||
|
; Get number of monsters to iterate over
|
||||||
|
ld a, [PartyCount]
|
||||||
|
and a
|
||||||
|
jr z, .NoPokerus
|
||||||
|
ld b, a
|
||||||
|
; Check each monster in the party for Pokerus
|
||||||
|
ld hl, PartyMon1PokerusStatus
|
||||||
|
ld de, PartyMon2 - PartyMon1
|
||||||
|
.Check
|
||||||
|
ld a, [hl]
|
||||||
|
and $0f ; only the bottom nybble is used
|
||||||
|
jr nz, .HasPokerus
|
||||||
|
; Next PartyMon
|
||||||
|
add hl, de
|
||||||
|
dec b
|
||||||
|
jr nz, .Check
|
||||||
|
.NoPokerus
|
||||||
|
and a
|
||||||
|
ret
|
||||||
|
.HasPokerus
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
; 4d87a
|
||||||
|
|
||||||
|
INCBIN "baserom.gbc",$4d87a,$50000 - $4d87a
|
||||||
|
|
||||||
SECTION "bank14",DATA,BANK[$14]
|
SECTION "bank14",DATA,BANK[$14]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user