-
Notifications
You must be signed in to change notification settings - Fork 319
Closed
Description
pokeyellow/engine/pikachu/pikachu_status.asm
Lines 139 to 179 in cf5a7f0
| CheckPikachuFaintedOrStatused:: | |
| ; function to test if Pikachu is alive? | |
| xor a | |
| ld [wWhichPokemon], a | |
| ld hl, wPartyCount | |
| .loop | |
| inc hl | |
| ld a, [hl] | |
| cp $ff | |
| jr z, .dead_or_not_in_party | |
| push hl | |
| call IsThisPartymonStarterPikachu_Party | |
| pop hl | |
| jr nc, .next | |
| ld a, [wWhichPokemon] | |
| ld hl, wPartyMon1HP | |
| ld bc, wPartyMon2 - wPartyMon1 | |
| call AddNTimes | |
| ld a, [hli] | |
| or [hl] | |
| ld d, a | |
| inc hl | |
| inc hl | |
| ld a, [hl] ; status | |
| and a | |
| jr nz, .alive | |
| jr .dead_or_not_in_party | |
| .next | |
| ld a, [wWhichPokemon] | |
| inc a | |
| ld [wWhichPokemon], a | |
| jr .loop | |
| .alive | |
| scf | |
| ret | |
| .dead_or_not_in_party | |
| and a | |
| ret |
From a glance, it seems that the two labels are wrong: At lines 162-164, a nonzero value of a means there is a status ailment, and 0 means no status ailment. The bitwise OR of the two HP bytes is also stored in d, but I don't know if it is ever used.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels