mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
recomment battle vars
This commit is contained in:
parent
d2dc732600
commit
57736ce19c
184
main.asm
184
main.asm
@ -2226,18 +2226,17 @@ _GetBattleVar: ; 39e7
|
|||||||
; There are 21 variable pairs.
|
; There are 21 variable pairs.
|
||||||
|
|
||||||
push bc
|
push bc
|
||||||
|
|
||||||
; get var pair
|
|
||||||
ld hl, .battlevarpairs
|
ld hl, .battlevarpairs
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
|
|
||||||
; Enemy turn uses the second byte instead.
|
; Enemy turn uses the second byte instead.
|
||||||
; This lets battle variable calls be side-neutral.
|
; This lets battle variable calls be side-neutral.
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
@ -2246,17 +2245,15 @@ _GetBattleVar: ; 39e7
|
|||||||
inc hl
|
inc hl
|
||||||
|
|
||||||
.getvar
|
.getvar
|
||||||
; get var id
|
; var id
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
|
|
||||||
; seek
|
|
||||||
ld hl, .vars
|
ld hl, .vars
|
||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
|
||||||
; get var address
|
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
@ -2268,111 +2265,76 @@ _GetBattleVar: ; 39e7
|
|||||||
|
|
||||||
|
|
||||||
.battlevarpairs
|
.battlevarpairs
|
||||||
dw .substatus1 ; 0
|
dw .substatus1, .substatus2, .substatus3, .substatus4, .substatus5
|
||||||
dw .substatus2 ; 1
|
dw .substatus1opp, .substatus2opp, .substatus3opp, .substatus4opp, .substatus5opp
|
||||||
dw .substatus3 ; 2
|
dw .status, .statusopp, .animation, .effect, .power, .type
|
||||||
dw .substatus4 ; 3
|
dw .curmove, .lastcounter, .lastcounteropp, .lastmove, .lastmoveopp
|
||||||
dw .substatus5 ; 4
|
|
||||||
dw .substatus1opp ; 5
|
|
||||||
dw .substatus2opp ; 6
|
|
||||||
dw .substatus3opp ; 7
|
|
||||||
dw .substatus4opp ; 8
|
|
||||||
dw .substatus5opp ; 9
|
|
||||||
dw .status ; a
|
|
||||||
dw .statusopp ; b
|
|
||||||
dw .animation ; c
|
|
||||||
dw .effect ; d
|
|
||||||
dw .power ; e
|
|
||||||
dw .type ; f
|
|
||||||
dw .curmove ; 10
|
|
||||||
dw .lastcountermove ; 11
|
|
||||||
dw .lastcountermoveopp ; 12
|
|
||||||
dw .lastmove ; 13
|
|
||||||
dw .lastmoveopp ; 14
|
|
||||||
|
|
||||||
; player enemy
|
|
||||||
.substatus1
|
PLAYER_SUBSTATUS_1 EQU 0
|
||||||
db $00, $01 ; PLAYER_SUBSTATUS1, ENEMY_SUBSTATUS1
|
ENEMY_SUBSTATUS_1 EQU 1
|
||||||
.substatus1opp
|
PLAYER_SUBSTATUS_2 EQU 2
|
||||||
db $01, $00 ; ENEMY_SUBSTATUS1, PLAYER_SUBSTATUS1
|
ENEMY_SUBSTATUS_2 EQU 3
|
||||||
.substatus2
|
PLAYER_SUBSTATUS_3 EQU 4
|
||||||
db $02, $03 ; PLAYER_SUBSTATUS2, ENEMY_SUBSTATUS2
|
ENEMY_SUBSTATUS_3 EQU 5
|
||||||
.substatus2opp
|
PLAYER_SUBSTATUS_4 EQU 6
|
||||||
db $03, $02 ; ENEMY_SUBSTATUS2, PLAYER_SUBSTATUS2
|
ENEMY_SUBSTATUS_4 EQU 7
|
||||||
.substatus3
|
PLAYER_SUBSTATUS_5 EQU 8
|
||||||
db $04, $05 ; PLAYER_SUBSTATUS3, ENEMY_SUBSTATUS3
|
ENEMY_SUBSTATUS_5 EQU 9
|
||||||
.substatus3opp
|
PLAYER_STATUS EQU 10
|
||||||
db $05, $04 ; ENEMY_SUBSTATUS3, PLAYER_SUBSTATUS3
|
ENEMY_STATUS EQU 11
|
||||||
.substatus4
|
PLAYER_MOVE_ANIMATION EQU 12
|
||||||
db $06, $07 ; PLAYER_SUBSTATUS4, ENEMY_SUBSTATUS4
|
ENEMY_MOVE_ANIMATION EQU 13
|
||||||
.substatus4opp
|
PLAYER_MOVE_EFFECT EQU 14
|
||||||
db $07, $06 ; ENEMY_SUBSTATUS4, PLAYER_SUBSTATUS4
|
ENEMY_MOVE_EFFECT EQU 15
|
||||||
.substatus5
|
PLAYER_MOVE_POWER EQU 16
|
||||||
db $08, $09 ; PLAYER_SUBSTATUS5, ENEMY_SUBSTATUS5
|
ENEMY_MOVE_POWER EQU 17
|
||||||
.substatus5opp
|
PLAYER_MOVE_TYPE EQU 18
|
||||||
db $09, $08 ; ENEMY_SUBSTATUS5, PLAYER_SUBSTATUS5
|
ENEMY_MOVE_TYPE EQU 19
|
||||||
.status
|
PLAYER_CUR_MOVE EQU 20
|
||||||
db $0a, $0b ; PLAYER_STATUS, ENEMY_STATUS
|
ENEMY_CUR_MOVE EQU 21
|
||||||
.statusopp
|
PLAYER_COUNTER_MOVE EQU 22
|
||||||
db $0b, $0a ; ENEMY_STATUS, PLAYER_STATUS
|
ENEMY_COUNTER_MOVE EQU 23
|
||||||
.animation
|
PLAYER_LAST_MOVE EQU 24
|
||||||
db $0c, $0d ; PLAYER_MOVE_ANIMATION, ENEMY_MOVE_ANIMATION
|
ENEMY_LAST_MOVE EQU 25
|
||||||
.effect
|
|
||||||
db $0e, $0f ; PLAYER_MOVE_EFFECT, ENEMY_MOVE_EFFECT
|
; player enemy
|
||||||
.power
|
.substatus1 db PLAYER_SUBSTATUS_1, ENEMY_SUBSTATUS_1
|
||||||
db $10, $11 ; PLAYER_MOVE_POWER, ENEMY_MOVE_POWER
|
.substatus1opp db ENEMY_SUBSTATUS_1, PLAYER_SUBSTATUS_1
|
||||||
.type
|
.substatus2 db PLAYER_SUBSTATUS_2, ENEMY_SUBSTATUS_2
|
||||||
db $12, $13 ; PLAYER_MOVE_TYPE, ENEMY_MOVE_TYPE
|
.substatus2opp db ENEMY_SUBSTATUS_2, PLAYER_SUBSTATUS_2
|
||||||
.curmove
|
.substatus3 db PLAYER_SUBSTATUS_3, ENEMY_SUBSTATUS_3
|
||||||
db $14, $15 ; PLAYER_CUR_MOVE, ENEMY_CUR_MOVE
|
.substatus3opp db ENEMY_SUBSTATUS_3, PLAYER_SUBSTATUS_3
|
||||||
.lastcountermove
|
.substatus4 db PLAYER_SUBSTATUS_4, ENEMY_SUBSTATUS_4
|
||||||
db $16, $17 ; ENEMY_LAST_COUNTER_MOVE, PLAYER_LAST_COUNTER_MOVE
|
.substatus4opp db ENEMY_SUBSTATUS_4, PLAYER_SUBSTATUS_4
|
||||||
.lastcountermoveopp
|
.substatus5 db PLAYER_SUBSTATUS_5, ENEMY_SUBSTATUS_5
|
||||||
db $17, $16 ; PLAYER_LAST_COUNTER_MOVE, ENEMY_LAST_COUNTER_MOVE
|
.substatus5opp db ENEMY_SUBSTATUS_5, PLAYER_SUBSTATUS_5
|
||||||
.lastmove
|
.status db PLAYER_STATUS, ENEMY_STATUS
|
||||||
db $18, $19 ; PLAYER_LAST_MOVE, ENEMY_LAST_MOVE
|
.statusopp db ENEMY_STATUS, PLAYER_STATUS
|
||||||
.lastmoveopp
|
.animation db PLAYER_MOVE_ANIMATION, ENEMY_MOVE_ANIMATION
|
||||||
db $19, $18 ; ENEMY_LAST_MOVE, PLAYER_LAST_MOVE
|
.effect db PLAYER_MOVE_EFFECT, ENEMY_MOVE_EFFECT
|
||||||
|
.power db PLAYER_MOVE_POWER, ENEMY_MOVE_POWER
|
||||||
|
.type db PLAYER_MOVE_TYPE, ENEMY_MOVE_TYPE
|
||||||
|
.curmove db PLAYER_CUR_MOVE, ENEMY_CUR_MOVE
|
||||||
|
.lastcounter db PLAYER_COUNTER_MOVE, ENEMY_COUNTER_MOVE
|
||||||
|
.lastcounteropp db ENEMY_COUNTER_MOVE, PLAYER_COUNTER_MOVE
|
||||||
|
.lastmove db PLAYER_LAST_MOVE, ENEMY_LAST_MOVE
|
||||||
|
.lastmoveopp db ENEMY_LAST_MOVE, PLAYER_LAST_MOVE
|
||||||
|
|
||||||
.vars
|
.vars
|
||||||
dw PlayerSubStatus1
|
dw PlayerSubStatus1, EnemySubStatus1
|
||||||
dw EnemySubStatus1
|
dw PlayerSubStatus2, EnemySubStatus2
|
||||||
|
dw PlayerSubStatus3, EnemySubStatus3
|
||||||
dw PlayerSubStatus2
|
dw PlayerSubStatus4, EnemySubStatus4
|
||||||
dw EnemySubStatus2
|
dw PlayerSubStatus5, EnemySubStatus5
|
||||||
|
dw BattleMonStatus, EnemyMonStatus
|
||||||
dw PlayerSubStatus3
|
dw PlayerMoveAnimation, EnemyMoveAnimation
|
||||||
dw EnemySubStatus3
|
dw PlayerMoveEffect, EnemyMoveEffect
|
||||||
|
dw PlayerMovePower, EnemyMovePower
|
||||||
dw PlayerSubStatus4
|
dw PlayerMoveType, EnemyMoveType
|
||||||
dw EnemySubStatus4
|
dw CurPlayerMove, CurEnemyMove
|
||||||
|
dw LastEnemyCounterMove, LastPlayerCounterMove
|
||||||
dw PlayerSubStatus5
|
dw LastPlayerMove, LastEnemyMove
|
||||||
dw EnemySubStatus5
|
|
||||||
|
|
||||||
dw BattleMonStatus
|
|
||||||
dw EnemyMonStatus
|
|
||||||
|
|
||||||
dw PlayerMoveAnimation
|
|
||||||
dw EnemyMoveAnimation
|
|
||||||
|
|
||||||
dw PlayerMoveEffect
|
|
||||||
dw EnemyMoveEffect
|
|
||||||
|
|
||||||
dw PlayerMovePower
|
|
||||||
dw EnemyMovePower
|
|
||||||
|
|
||||||
dw PlayerMoveType
|
|
||||||
dw EnemyMoveType
|
|
||||||
|
|
||||||
dw CurPlayerMove
|
|
||||||
dw CurEnemyMove
|
|
||||||
|
|
||||||
dw LastEnemyCounterMove
|
|
||||||
dw LastPlayerCounterMove
|
|
||||||
|
|
||||||
dw LastPlayerMove
|
|
||||||
dw LastEnemyMove
|
|
||||||
; 3a90
|
; 3a90
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user