BATTLEACTION constants

This commit is contained in:
PikalaxALT 2015-11-06 09:04:27 -05:00
parent 5eed48f05d
commit f0830f084f
8 changed files with 233 additions and 204 deletions

View File

@ -707,6 +707,7 @@ AI_Switch: ; 3846c
xor a
ld [hBattleTurn], a
callab PursuitSwitch
push af
ld a, [CurOTMon]
ld hl, OTPartyMon1Status
@ -718,9 +719,11 @@ AI_Switch: ; 3846c
ld bc, $0004
call CopyBytes
pop af
jr c, .skiptext
ld hl, TextJump_EnemyWithdrew
call PrintText
.skiptext
ld a, $1
ld [wd264], a

File diff suppressed because it is too large Load Diff

View File

@ -344,3 +344,27 @@ SUBSTATUS_CURLED EQU 0
const ENEMY_COUNTER_MOVE
const PLAYER_LAST_MOVE
const ENEMY_LAST_MOVE
; wBattleAction
const_def
const BATTLEACTION_MOVE1
const BATTLEACTION_MOVE2
const BATTLEACTION_MOVE3
const BATTLEACTION_MOVE4
const BATTLEACTION_SWITCH1
const BATTLEACTION_SWITCH2
const BATTLEACTION_SWITCH3
const BATTLEACTION_SWITCH4
const BATTLEACTION_SWITCH5
const BATTLEACTION_SWITCH6
const BATTLEACTION_A
const BATTLEACTION_B
const BATTLEACTION_C
const BATTLEACTION_D
const BATTLEACTION_E
const BATTLEACTION_FORFEIT
const_def
const WIN
const LOSE
const DRAW

View File

@ -137,7 +137,7 @@ Init:: ; 17d
ld [rLCDC], a
ld a, -1
ld [$ffcb], a
ld [hLinkPlayerNumber], a
callba Function9890

View File

@ -14,7 +14,7 @@ Serial:: ; 6ef
bit 0, a
jr nz, .asm_721
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
inc a ; is it equal to -1?
jr z, .asm_726
@ -24,7 +24,7 @@ Serial:: ; 6ef
ld a, [hSerialSend]
ld [rSB], a
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $2
jr z, .asm_752
@ -51,7 +51,7 @@ Serial:: ; 6ef
.asm_730
ld [hSerialReceive], a
ld [$ffcb], a
ld [hLinkPlayerNumber], a
cp $2
jr z, .asm_74f
@ -128,7 +128,7 @@ Function75f:: ; 75f
Function78a:: ; 78a
xor a
ld [$ffca], a
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $2
jr nz, .asm_79b
ld a, $1
@ -140,7 +140,7 @@ Function78a:: ; 78a
ld a, [$ffca]
and a
jr nz, .asm_7e5
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $1
jr nz, .asm_7c0
call Function82b
@ -172,7 +172,7 @@ Function78a:: ; 78a
dec a
ld [wcf5d + 1], a
jr nz, .asm_79b
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $1
jr z, .asm_7e5
ld a, $ff
@ -349,7 +349,7 @@ Function8c1:: ; 8c1
ld a, [wcf56]
add b
ld [hSerialSend], a
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $2
jr nz, .asm_8ee
ld a, $1
@ -380,7 +380,7 @@ Function8f3:: ; 8f3
Function908:: ; 908
xor a
ld [hSerialSend], a
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $2
ret nz
ld a, $1

View File

@ -70,6 +70,8 @@ hMoneyTemp EQU $ffc3
hLCDStatCustom EQU $ffc6
hLinkPlayerNumber EQU $ffcb
hSerialSend EQU $ffcd
hSerialReceive EQU $ffce

View File

@ -25212,7 +25212,7 @@ Function2805d: ; 2805d
xor a
ld [wcf56], a
call Function87d
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $2
jr nz, .asm_28091
ld c, $3
@ -25338,7 +25338,7 @@ Function2805d: ; 2805d
ld [wd103], a
ld de, MUSIC_NONE
call PlayMusic
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $2
ld c, 66
call z, DelayFrames
@ -25355,7 +25355,7 @@ Function28177: ; 28177
ld a, [ScriptVar]
and a
jp z, Function283b2
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $2
jr nz, .asm_281ae
ld c, $3
@ -25580,7 +25580,7 @@ Function28177: ; 28177
ld [wd103], a
ld de, MUSIC_NONE
call PlayMusic
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $2
ld c, 66
call z, DelayFrames
@ -26319,7 +26319,7 @@ Function2879e: ; 2879e
; 287ab
Function287ab: ; 287ab
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $2
ret z
ld hl, EnemyMonSpecies
@ -27061,7 +27061,7 @@ Function28b87: ; 28b87
call LoadFontsBattleExtra
ld b, $8
call GetSGBLayout
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $1
jr z, .asm_28de4
predef Function28f24
@ -28855,7 +28855,7 @@ Special_AbortLink: ; 29c92
ld c, $3
call DelayFrames
ld a, -1
ld [$ffcb], a
ld [hLinkPlayerNumber], a
xor a
ld [rSB], a
ld [hSerialReceive], a
@ -28881,7 +28881,7 @@ Special_AbortLink: ; 29c92
ld c, $3
call DelayFrames
ld a, -1
ld [$ffcb], a
ld [hLinkPlayerNumber], a
ld a, [rIF]
push af
xor a
@ -28950,13 +28950,13 @@ Special_WaitForLinkedFriend: ; 29d11
ld a, $ff
ld [wcf5b], a
.asm_29d39
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $2
jr z, .asm_29d79
cp $1
jr z, .asm_29d79
ld a, -1
ld [$ffcb], a
ld [hLinkPlayerNumber], a
ld a, $2
ld [rSB], a
xor a
@ -29232,7 +29232,7 @@ Function29f04: ; 29f04
ld c, $3
call DelayFrames
ld a, -1
ld [$ffcb], a
ld [hLinkPlayerNumber], a
ld a, $2
ld [rSB], a
xor a
@ -29271,7 +29271,7 @@ Function29f17: ; 29f17
; 29f47
Special_CableClubCheckWhichChris: ; 29f47
ld a, [$ffcb]
ld a, [hLinkPlayerNumber]
cp $1
ld a, $1
jr z, .yes

View File

@ -4005,7 +4005,7 @@ Function1019ee: ; 1019ee
ld a, $1
.asm_101a1e
ld [$ffcb], a
ld [hLinkPlayerNumber], a
ret
; 101a21
@ -4024,7 +4024,7 @@ Function101a21: ; 101a21
xor a
ld [wc2d7], a
ld a, $ff
ld [$ffcb], a
ld [hLinkPlayerNumber], a
pop af
ld [Options], a
ret