mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-11-16 18:16:49 +13:00
$FFF3 checks whose turn it is.
hg-commit-id: e2038c0cb5f9
This commit is contained in:
parent
0af6c061fe
commit
3678f9bfb9
|
|
@ -166,6 +166,8 @@ W_NUMINBOX EQU $DA80
|
||||||
H_RAND1 EQU $FFD3
|
H_RAND1 EQU $FFD3
|
||||||
H_RAND2 EQU $FFD4
|
H_RAND2 EQU $FFD4
|
||||||
|
|
||||||
|
H_WHOSETURN EQU $FFF3 ; 0 on player’s turn, 1 on enemy’s turn
|
||||||
|
|
||||||
; hardware registers, from the pandocs http://nocash.emubase.de/pandocs.htm
|
; hardware registers, from the pandocs http://nocash.emubase.de/pandocs.htm
|
||||||
rDIV EQU $FF04
|
rDIV EQU $FF04
|
||||||
rBGP EQU $FF47
|
rBGP EQU $FF47
|
||||||
|
|
|
||||||
24
pokered.asm
24
pokered.asm
|
|
@ -662,11 +662,11 @@ Char4A: ; PKMN
|
||||||
|
|
||||||
Char59:
|
Char59:
|
||||||
; depending on whose turn it is, print
|
; depending on whose turn it is, print
|
||||||
; player active monster’s name
|
|
||||||
; or
|
|
||||||
; enemy active monster’s name, prefixed with “Enemy ”
|
; enemy active monster’s name, prefixed with “Enemy ”
|
||||||
; (XXX what is the purpose of this vs. Char5A)
|
; or
|
||||||
ld a,[$FFF3]
|
; player active monster’s name
|
||||||
|
; (like Char5A but flipped)
|
||||||
|
ld a,[H_WHOSETURN]
|
||||||
xor 1
|
xor 1
|
||||||
jr MonsterNameCharsCommon
|
jr MonsterNameCharsCommon
|
||||||
|
|
||||||
|
|
@ -675,7 +675,7 @@ Char5A:
|
||||||
; player active monster’s name
|
; player active monster’s name
|
||||||
; or
|
; or
|
||||||
; enemy active monster’s name, prefixed with “Enemy ”
|
; enemy active monster’s name, prefixed with “Enemy ”
|
||||||
ld a,[$FFF3]
|
ld a,[H_WHOSETURN]
|
||||||
MonsterNameCharsCommon:
|
MonsterNameCharsCommon:
|
||||||
push de
|
push de
|
||||||
and a
|
and a
|
||||||
|
|
@ -10222,17 +10222,17 @@ Function5811: ; 5811
|
||||||
; print the ghost battle messages
|
; print the ghost battle messages
|
||||||
call $583A
|
call $583A
|
||||||
ret nz
|
ret nz
|
||||||
ld a,[$FFF3]
|
ld a,[H_WHOSETURN]
|
||||||
and a
|
and a
|
||||||
jr nz,.next\@
|
jr nz,.Ghost\@
|
||||||
ld a,[W_CURMONSTATUS]
|
ld a,[W_CURMONSTATUS] ; player’s turn
|
||||||
and a,SLP | FRZ
|
and a,SLP | FRZ
|
||||||
ret nz
|
ret nz
|
||||||
ld hl,ScaredText
|
ld hl,ScaredText
|
||||||
call PrintText
|
call PrintText
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
.next\@
|
.Ghost\@ ; ghost’s turn
|
||||||
ld hl,GetOutText
|
ld hl,GetOutText
|
||||||
call PrintText
|
call PrintText
|
||||||
xor a
|
xor a
|
||||||
|
|
@ -13539,10 +13539,12 @@ AttackAnimation: ; 4D5E
|
||||||
|
|
||||||
ShareAttackAnimations: ; 4DA6
|
ShareAttackAnimations: ; 4DA6
|
||||||
; some moves just reuse animations from status conditions
|
; some moves just reuse animations from status conditions
|
||||||
ld a,[$FFF3]
|
ld a,[H_WHOSETURN]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
|
; opponent’s turn
|
||||||
|
|
||||||
ld a,[$D07C]
|
ld a,[$D07C]
|
||||||
|
|
||||||
cp a,AMNESIA
|
cp a,AMNESIA
|
||||||
|
|
@ -13655,7 +13657,7 @@ Func586F: ; 586F
|
||||||
ld b,a
|
ld b,a
|
||||||
call IsCryMove
|
call IsCryMove
|
||||||
jr nc,.NotCryMove
|
jr nc,.NotCryMove
|
||||||
ld a,[$FFF3]
|
ld a,[H_WHOSETURN]
|
||||||
and a
|
and a
|
||||||
jr nz,.next\@
|
jr nz,.next\@
|
||||||
ld a,[$D014] ; get number of current monster
|
ld a,[$D014] ; get number of current monster
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue