diff options
| author | xCrystal <rgr.crystal@gmail.com> | 2016-09-18 13:52:19 +0200 | 
|---|---|---|
| committer | xCrystal <rgr.crystal@gmail.com> | 2016-09-18 13:52:19 +0200 | 
| commit | a80ff2b50facaa2df80fe4e65c5f4206a32dee69 (patch) | |
| tree | c61dedfc489c5b8f95e0a9e8b6d75f0ea83f3b8e /src | |
| parent | 8e75b3110d58a796eaaac6c292ad9f8b5dfd1a26 (diff) | |
duelist type constants
Diffstat (limited to 'src')
| -rw-r--r-- | src/constants/duel_constants.asm | 7 | ||||
| -rwxr-xr-x | src/engine/bank1.asm | 7 | ||||
| -rwxr-xr-x | src/engine/home.asm | 10 | 
3 files changed, 15 insertions, 9 deletions
| diff --git a/src/constants/duel_constants.asm b/src/constants/duel_constants.asm index 658798f..104799d 100644 --- a/src/constants/duel_constants.asm +++ b/src/constants/duel_constants.asm @@ -42,8 +42,13 @@ CARD_LOCATION_BENCH_3      EQU $13  CARD_LOCATION_BENCH_4      EQU $14  CARD_LOCATION_BENCH_5      EQU $15 +;;; duelist types +DUELIST_TYPE_PLAYER   EQU $00 +DUELIST_TYPE_LINK_OPP EQU $01 +DUELIST_TYPE_AI_OPP   EQU $80 +  ;;; constant values -DUEL_MAX_POKEMON_IN_PLAY EQU $06 +MAX_POKEMON_IN_PLAY EQU $06  ;;; status conditions  ; two statuses can be combined if they are identified by a different nybble diff --git a/src/engine/bank1.asm b/src/engine/bank1.asm index 6dd1c80..5e4f366 100755 --- a/src/engine/bank1.asm +++ b/src/engine/bank1.asm @@ -255,7 +255,7 @@ HandleTurn: ; 4225 (1:4225)  	ldh [hTempCardNumber], a  	call AddCardToHand  	ld a, [wcc0d] -	cp $00 +	cp DUELIST_TYPE_PLAYER  	jr z, Func_4262  	call SwapTurn  	call Func_34e2 @@ -274,10 +274,11 @@ Func_4268:  Func_426d:  	call $4f9d  	ld a, [wcc0d] -	cp a, $00 +	cp a, DUELIST_TYPE_PLAYER  	jr z, PrintDuelMenu -	cp a, $01 +	cp a, DUELIST_TYPE_LINK_OPP  	jp z, $6911 +	; DUELIST_TYPE_AI_OPP  	xor a  	ld [wVBlankCtr], a  	ld [wcbf9], a diff --git a/src/engine/home.asm b/src/engine/home.asm index 5c687db..71a3008 100755 --- a/src/engine/home.asm +++ b/src/engine/home.asm @@ -2122,7 +2122,7 @@ Func_0f58: ; 0f58 (0:0f58)  .asm_f60  	ld a, DUELVARS_DUELIST_TYPE  	call GetTurnDuelistVariable -	or a +	or a ; cp DUELIST_TYPE_PLAYER  	jr z, .asm_f70  	ld hl, $cbe2  	ld de, wRNG1 @@ -2142,7 +2142,7 @@ Func_0f7f: ; 0f7f (0:0f7f)  	ld [$ff9e], a  	ld a, DUELVARS_DUELIST_TYPE  	call GetNonTurnDuelistVariable -	cp $1 +	cp DUELIST_TYPE_LINK_OPP  	jr nz, .asm_f98  	ld hl, $ff9e  	ld bc, $000a @@ -2501,9 +2501,9 @@ INCBIN "baserom.gbc",$13a2,$1485 - $13a2  Func_1485: ; 1485 (0:1485)  	push af -	ld a, $ff & wPlayerNumberOfPokemonInPlay +	ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY  	call GetTurnDuelistVariable -	cp DUEL_MAX_POKEMON_IN_PLAY +	cp MAX_POKEMON_IN_PLAY  	jr nc, .tooManyPokemonInPlay  	inc [hl]  	ld e, a @@ -5083,7 +5083,7 @@ LoadOpponentDeck: ; 2b78 (0:2b78)  	ld a, DUELVARS_DUELIST_TYPE  	call GetTurnDuelistVariable  	ld a, [wOpponentDeckId] -	or $80 +	or DUELIST_TYPE_AI_OPP  	ld [hl], a  	ret | 
