Use PartyMon labels in GetPartyParamLocation arguments.
This commit is contained in:
@@ -7366,7 +7366,7 @@ Function3ee3b: ; 3ee3b
|
|||||||
.asm_3ee89
|
.asm_3ee89
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
ld a, $1c
|
ld a, PartyMon1PokerusStatus - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
@@ -7673,7 +7673,7 @@ Function3ee3b: ; 3ee3b
|
|||||||
cp b
|
cp b
|
||||||
jr z, .asm_3f0d1
|
jr z, .asm_3f0d1
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
ld a, $0
|
ld a, PartyMon1Species - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
|
@@ -1380,7 +1380,7 @@ RareCandy: ; ef14
|
|||||||
callba Function50e47
|
callba Function50e47
|
||||||
|
|
||||||
pop de
|
pop de
|
||||||
ld a, $8
|
ld a, PartyMon1Exp - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
|
|
||||||
ld a, [hMultiplicand]
|
ld a, [hMultiplicand]
|
||||||
@@ -1390,7 +1390,7 @@ RareCandy: ; ef14
|
|||||||
ld a, [$ffb6]
|
ld a, [$ffb6]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld a, $24
|
ld a, PartyMon1MaxHP - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
@@ -1398,7 +1398,7 @@ RareCandy: ; ef14
|
|||||||
push bc
|
push bc
|
||||||
call Functionee8c
|
call Functionee8c
|
||||||
|
|
||||||
ld a, $25
|
ld a, PartyMon1MaxHP + 1 - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
|
|
||||||
pop bc
|
pop bc
|
||||||
@@ -1498,7 +1498,7 @@ Functionefda: ; efda (3:6fda)
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ret z
|
ret z
|
||||||
call Functionf058
|
call Functionf058
|
||||||
ld a, $20
|
ld a, PartyMon1Status - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and c
|
and c
|
||||||
@@ -1537,7 +1537,7 @@ Functionf009: ; f009 (3:7009)
|
|||||||
Functionf01e: ; f01e (3:701e)
|
Functionf01e: ; f01e (3:701e)
|
||||||
call Functionf2a6
|
call Functionf2a6
|
||||||
ret nc
|
ret nc
|
||||||
ld a, $22
|
ld a, PartyMon1HP - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [BattleMonHP], a
|
ld [BattleMonHP], a
|
||||||
@@ -1955,7 +1955,7 @@ Functionf2ba: ; f2ba (3:72ba)
|
|||||||
Functionf2c3: ; f2c3 (3:72c3)
|
Functionf2c3: ; f2c3 (3:72c3)
|
||||||
call Functionf36f
|
call Functionf36f
|
||||||
asm_f2c6: ; f2c6 (3:72c6)
|
asm_f2c6: ; f2c6 (3:72c6)
|
||||||
ld a, $22
|
ld a, PartyMon1HP - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
inc hl
|
inc hl
|
||||||
@@ -1963,7 +1963,7 @@ asm_f2c6: ; f2c6 (3:72c6)
|
|||||||
jp Functionf328
|
jp Functionf328
|
||||||
|
|
||||||
Functionf2d1: ; f2d1 (3:72d1)
|
Functionf2d1: ; f2d1 (3:72d1)
|
||||||
ld a, $23
|
ld a, PartyMon1HP + 1 - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
add e
|
add e
|
||||||
@@ -1973,11 +1973,11 @@ Functionf2d1: ; f2d1 (3:72d1)
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
jr c, .asm_f2f5
|
jr c, .asm_f2f5
|
||||||
call Functionf328
|
call Functionf328
|
||||||
ld a, $23
|
ld a, PartyMon1HP + 1 - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld a, $25
|
ld a, PartyMon1MaxHP + 1 - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
sub [hl]
|
sub [hl]
|
||||||
@@ -1992,7 +1992,7 @@ Functionf2d1: ; f2d1 (3:72d1)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functionf2f9: ; f2f9 (3:72f9)
|
Functionf2f9: ; f2f9 (3:72f9)
|
||||||
ld a, $23
|
ld a, PartyMon1HP + 1 - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
sub e
|
sub e
|
||||||
@@ -2030,7 +2030,7 @@ Functionf31b: ; f31b (3:731b)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functionf328: ; f328 (3:7328)
|
Functionf328: ; f328 (3:7328)
|
||||||
ld a, $22
|
ld a, PartyMon1HP - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wd1ef], a
|
ld [wd1ef], a
|
||||||
@@ -2056,7 +2056,7 @@ Functionf33f: ; f33f
|
|||||||
; f348
|
; f348
|
||||||
|
|
||||||
Functionf348: ; f348 (3:7348)
|
Functionf348: ; f348 (3:7348)
|
||||||
ld a, $22
|
ld a, PartyMon1HP - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wd1ed], a
|
ld [wd1ed], a
|
||||||
@@ -2073,7 +2073,7 @@ Functionf356: ; f356 (3:7356)
|
|||||||
|
|
||||||
Functionf35f: ; f35f (3:735f)
|
Functionf35f: ; f35f (3:735f)
|
||||||
push hl
|
push hl
|
||||||
ld a, $24
|
ld a, PartyMon1MaxHP - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [Buffer2], a
|
ld [Buffer2], a
|
||||||
|
59
main.asm
59
main.asm
@@ -13615,26 +13615,26 @@ Functione039: ; e039
|
|||||||
; e134
|
; e134
|
||||||
|
|
||||||
Functione134: ; e134
|
Functione134: ; e134
|
||||||
ld a, $1f
|
ld a, PartyMon1Level - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [$001f], a ; wow
|
ld [PartyMon1Level - PartyMon1], a ; wow
|
||||||
ld a, $0
|
ld a, PartyMon1Species - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [CurSpecies], a
|
ld [CurSpecies], a
|
||||||
call GetBaseData
|
call GetBaseData
|
||||||
ld a, $24
|
ld a, PartyMon1MaxHP - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
push de
|
push de
|
||||||
ld a, $a
|
ld a, PartyMon1Exp + 2 - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld b, $1
|
ld b, $1
|
||||||
call Functione167
|
call Functione167
|
||||||
pop de
|
pop de
|
||||||
ld a, $22
|
ld a, PartyMon1HP - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
@@ -20301,7 +20301,7 @@ UnknownText_0x12f00: ; 0x12f00
|
|||||||
; 0x12f05
|
; 0x12f05
|
||||||
|
|
||||||
Function12f05: ; 12f05
|
Function12f05: ; 12f05
|
||||||
ld a, $24
|
ld a, PartyMon1MaxHP - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [hProduct], a
|
ld [hProduct], a
|
||||||
@@ -20311,7 +20311,7 @@ Function12f05: ; 12f05
|
|||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
ld b, $2
|
ld b, $2
|
||||||
call Divide
|
call Divide
|
||||||
ld a, $23
|
ld a, PartyMon1HP + 1 - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [$ffb6]
|
ld a, [$ffb6]
|
||||||
sub [hl]
|
sub [hl]
|
||||||
@@ -33120,11 +33120,11 @@ Function24dd4: ; 24dd4
|
|||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_24e03
|
jr nz, .asm_24e03
|
||||||
ld a, $2
|
ld a, PartyMon1Moves - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld c, $4
|
ld c, NUM_MOVES
|
||||||
.asm_24ded
|
.asm_24ded
|
||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
@@ -33155,7 +33155,7 @@ Function24dd4: ; 24dd4
|
|||||||
and a
|
and a
|
||||||
jr nz, .asm_24e2f
|
jr nz, .asm_24e2f
|
||||||
push hl
|
push hl
|
||||||
ld a, $1
|
ld a, PartyMon1Item - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
callba ItemIsMail
|
callba ItemIsMail
|
||||||
@@ -37974,17 +37974,17 @@ Function28b87: ; 28b87
|
|||||||
ld b, $1
|
ld b, $1
|
||||||
pop af
|
pop af
|
||||||
ld c, a
|
ld c, a
|
||||||
cp $97
|
cp MEW
|
||||||
jr z, .asm_28e49
|
jr z, .asm_28e49
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
cp $97
|
cp MEW
|
||||||
jr z, .asm_28e49
|
jr z, .asm_28e49
|
||||||
ld b, $2
|
ld b, $2
|
||||||
ld a, c
|
ld a, c
|
||||||
cp $fb
|
cp CELEBI
|
||||||
jr z, .asm_28e49
|
jr z, .asm_28e49
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
cp $fb
|
cp CELEBI
|
||||||
jr z, .asm_28e49
|
jr z, .asm_28e49
|
||||||
ld b, $0
|
ld b, $0
|
||||||
|
|
||||||
@@ -47620,7 +47620,7 @@ INCLUDE "data/pokedex/entry_pointers.asm"
|
|||||||
|
|
||||||
|
|
||||||
Function4456e: ; 4456e
|
Function4456e: ; 4456e
|
||||||
ld a, $1
|
ld a, PartyMon1Item - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
callba ItemIsMail
|
callba ItemIsMail
|
||||||
@@ -47646,7 +47646,7 @@ Function4456e: ; 4456e
|
|||||||
xor a
|
xor a
|
||||||
ld bc, $002f
|
ld bc, $002f
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld a, $1
|
ld a, PartyMon1Item - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld [hl], $0
|
ld [hl], $0
|
||||||
ld hl, $a834
|
ld hl, $a834
|
||||||
@@ -58745,34 +58745,39 @@ Function505da:: ; 505da
|
|||||||
; 5062e
|
; 5062e
|
||||||
|
|
||||||
Function5062e: ; 5062e
|
Function5062e: ; 5062e
|
||||||
ld a, $20
|
ld a, PartyMon1Status - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $8
|
and 1 << PSN
|
||||||
ret z
|
ret z
|
||||||
ld a, $22
|
|
||||||
|
ld a, PartyMon1HP - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
|
|
||||||
or c
|
or c
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
dec bc
|
dec bc
|
||||||
ld [hl], c
|
ld [hl], c
|
||||||
dec hl
|
dec hl
|
||||||
ld [hl], b
|
ld [hl], b
|
||||||
|
|
||||||
ld a, b
|
ld a, b
|
||||||
or c
|
or c
|
||||||
jr nz, .asm_50654
|
jr nz, .not_fainted
|
||||||
ld a, $20
|
|
||||||
|
ld a, PartyMon1Status - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld [hl], $0
|
ld [hl], 0
|
||||||
ld c, $2
|
ld c, 2
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_50654
|
.not_fainted
|
||||||
ld c, $1
|
ld c, 1
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 50658
|
; 50658
|
||||||
@@ -70785,7 +70790,7 @@ Function8adef: ; 8adef
|
|||||||
dec a
|
dec a
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
push bc
|
push bc
|
||||||
ld a, $1
|
ld a, PartyMon1Item - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
pop bc
|
pop bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
|
Reference in New Issue
Block a user