blob: 201a3713021e393fa2ae890a64ee8e5622b7c765 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
_CheckPokerus:
; Return carry if a monster in your party has Pokerus
; Get number of monsters to iterate over
ld a, [wPartyCount]
and a
jr z, .NoPokerus
ld b, a
; Check each monster in the party for Pokerus
ld hl, wPartyMon1PokerusStatus
ld de, PARTYMON_STRUCT_LENGTH
.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
|