Name and comment the trainer party reader.
Reads the contents of trainers/trainers.asm.
This commit is contained in:
@@ -8485,14 +8485,15 @@ Function3f594: ; 3f594
|
|||||||
xor a
|
xor a
|
||||||
ld [TempEnemyMonSpecies], a
|
ld [TempEnemyMonSpecies], a
|
||||||
callab Function3957b
|
callab Function3957b
|
||||||
callab Function39771
|
callab ReadTrainerParty
|
||||||
|
|
||||||
ld a, [TrainerClass]
|
ld a, [TrainerClass]
|
||||||
cp $9
|
cp RIVAL1
|
||||||
jr nz, .asm_3f5b8
|
jr nz, .ok
|
||||||
xor a
|
xor a
|
||||||
ld [OTPartyMon1Item], a
|
ld [OTPartyMon1Item], a
|
||||||
|
.ok
|
||||||
|
|
||||||
.asm_3f5b8
|
|
||||||
ld de, VTiles2
|
ld de, VTiles2
|
||||||
callab Function5120d
|
callab Function5120d
|
||||||
xor a
|
xor a
|
||||||
@@ -8500,13 +8501,14 @@ Function3f594: ; 3f594
|
|||||||
dec a
|
dec a
|
||||||
ld [$c6e6], a
|
ld [$c6e6], a
|
||||||
hlcoord 12, 0
|
hlcoord 12, 0
|
||||||
ld bc, $0707
|
lb bc, 7, 7
|
||||||
ld a, $13
|
ld a, PREDEF_FILL_BOX
|
||||||
call Predef
|
call Predef
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [CurOTMon], a
|
ld [CurOTMon], a
|
||||||
ld a, $2
|
ld a, TRAINER_BATTLE
|
||||||
ld [IsInBattle], a
|
ld [IsInBattle], a
|
||||||
|
|
||||||
call IsJohtoGymLeader
|
call IsJohtoGymLeader
|
||||||
jr nc, .asm_3f606
|
jr nc, .asm_3f606
|
||||||
xor a
|
xor a
|
||||||
@@ -8515,14 +8517,13 @@ Function3f594: ; 3f594
|
|||||||
ld b, a
|
ld b, a
|
||||||
.asm_3f5ea
|
.asm_3f5ea
|
||||||
push bc
|
push bc
|
||||||
ld a, $22
|
ld a, PartyMon1HP - PartyMon1
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
jr z, .asm_3f5fc
|
jr z, .asm_3f5fc
|
||||||
ld c, $4
|
ld c, $4
|
||||||
callab ChangeHappiness
|
callab ChangeHappiness
|
||||||
|
|
||||||
.asm_3f5fc
|
.asm_3f5fc
|
||||||
pop bc
|
pop bc
|
||||||
dec b
|
dec b
|
||||||
@@ -8530,7 +8531,6 @@ Function3f594: ; 3f594
|
|||||||
ld hl, CurPartyMon
|
ld hl, CurPartyMon
|
||||||
inc [hl]
|
inc [hl]
|
||||||
jr .asm_3f5ea
|
jr .asm_3f5ea
|
||||||
|
|
||||||
.asm_3f606
|
.asm_3f606
|
||||||
ret
|
ret
|
||||||
; 3f607
|
; 3f607
|
||||||
@@ -8568,8 +8568,8 @@ Function3f607: ; 3f607
|
|||||||
ld [TrainerClass], a
|
ld [TrainerClass], a
|
||||||
ld [$ffad], a
|
ld [$ffad], a
|
||||||
hlcoord 12, 0
|
hlcoord 12, 0
|
||||||
ld bc, $0707
|
lb bc, 7, 7
|
||||||
ld a, $13
|
ld a, PREDEF_FILL_BOX
|
||||||
call Predef
|
call Predef
|
||||||
ret
|
ret
|
||||||
; 3f662
|
; 3f662
|
||||||
|
294
main.asm
294
main.asm
@@ -36688,7 +36688,7 @@ Function28177: ; 28177
|
|||||||
or $3
|
or $3
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld hl, $d26b
|
ld hl, $d26b
|
||||||
ld de, $c656
|
ld de, OTName
|
||||||
ld bc, $000b
|
ld bc, $000b
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call Function222a
|
call Function222a
|
||||||
@@ -43539,19 +43539,20 @@ INCLUDE "battle/ai/scoring.asm"
|
|||||||
Function3952d: ; 3952d
|
Function3952d: ; 3952d
|
||||||
ld hl, RivalName
|
ld hl, RivalName
|
||||||
ld a, c
|
ld a, c
|
||||||
cp $9
|
cp RIVAL1
|
||||||
jr z, .asm_39544
|
jr z, .rival
|
||||||
|
|
||||||
ld [CurSpecies], a
|
ld [CurSpecies], a
|
||||||
ld a, $7
|
ld a, TRAINER_NAME
|
||||||
ld [$cf61], a
|
ld [$cf61], a
|
||||||
call GetName
|
call GetName
|
||||||
ld de, StringBuffer1
|
ld de, StringBuffer1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_39544
|
.rival
|
||||||
ld de, StringBuffer1
|
ld de, StringBuffer1
|
||||||
push de
|
push de
|
||||||
ld bc, $000b
|
ld bc, NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop de
|
pop de
|
||||||
ret
|
ret
|
||||||
@@ -43561,20 +43562,22 @@ Function39550: ; 39550
|
|||||||
ld hl, $d26b
|
ld hl, $d26b
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_3956f
|
jr nz, .ok
|
||||||
|
|
||||||
ld hl, RivalName
|
ld hl, RivalName
|
||||||
ld a, c
|
ld a, c
|
||||||
cp $9
|
cp RIVAL1
|
||||||
jr z, .asm_3956f
|
jr z, .ok
|
||||||
|
|
||||||
ld [CurSpecies], a
|
ld [CurSpecies], a
|
||||||
ld a, $7
|
ld a, TRAINER_NAME
|
||||||
ld [$cf61], a
|
ld [$cf61], a
|
||||||
call GetName
|
call GetName
|
||||||
ld hl, StringBuffer1
|
ld hl, StringBuffer1
|
||||||
|
|
||||||
.asm_3956f
|
.ok
|
||||||
ld bc, $000d
|
ld bc, $000d
|
||||||
ld de, $c656
|
ld de, OTName
|
||||||
push de
|
push de
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop de
|
pop de
|
||||||
@@ -43604,122 +43607,134 @@ Function3957b: ; 3957b
|
|||||||
INCLUDE "trainers/attributes.asm"
|
INCLUDE "trainers/attributes.asm"
|
||||||
|
|
||||||
|
|
||||||
Function39771: ; 39771
|
ReadTrainerParty: ; 39771
|
||||||
ld a, [$cfc0]
|
ld a, [$cfc0]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld hl, OTPartyCount
|
ld hl, OTPartyCount
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec a
|
dec a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld hl, OTPartyMon1Species
|
|
||||||
ld bc, $0120
|
ld hl, OTPartyMons
|
||||||
|
ld bc, OTPartyMonsEnd - OTPartyMons
|
||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld a, [OtherTrainerClass]
|
|
||||||
cp $c
|
|
||||||
jr nz, .asm_3979e
|
|
||||||
ld a, [OtherTrainerID]
|
|
||||||
cp $2
|
|
||||||
jr z, .asm_397d3
|
|
||||||
ld a, [OtherTrainerClass]
|
|
||||||
|
|
||||||
.asm_3979e
|
ld a, [OtherTrainerClass]
|
||||||
|
cp CAL
|
||||||
|
jr nz, .not_cal2
|
||||||
|
ld a, [OtherTrainerID]
|
||||||
|
cp CAL2
|
||||||
|
jr z, .cal2
|
||||||
|
ld a, [OtherTrainerClass]
|
||||||
|
.not_cal2
|
||||||
|
|
||||||
dec a
|
dec a
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, $0
|
ld b, 0
|
||||||
ld hl, TrainerGroups
|
ld hl, TrainerGroups
|
||||||
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
|
||||||
|
|
||||||
ld a, [OtherTrainerID]
|
ld a, [OtherTrainerID]
|
||||||
ld b, a
|
ld b, a
|
||||||
.asm_397ae
|
.skip_trainer
|
||||||
dec b
|
dec b
|
||||||
jr z, .asm_397b8
|
jr z, .got_trainer
|
||||||
.asm_397b1
|
.next
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $ff
|
cp $ff
|
||||||
jr nz, .asm_397b1
|
jr nz, .next
|
||||||
jr .asm_397ae
|
jr .skip_trainer
|
||||||
|
.got_trainer
|
||||||
|
|
||||||
.asm_397b8
|
.skip_name
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $50
|
cp "@"
|
||||||
jr nz, .asm_397b8
|
jr nz, .skip_name
|
||||||
|
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, $0
|
ld b, 0
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld hl, Jumptable_397e3
|
ld hl, TrainerTypes
|
||||||
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
|
||||||
ld bc, .asm_397d0
|
ld bc, .done
|
||||||
push bc
|
push bc
|
||||||
jp [hl]
|
jp [hl]
|
||||||
|
|
||||||
.asm_397d0
|
.done
|
||||||
jp Function3991b
|
jp Function3991b
|
||||||
|
|
||||||
.asm_397d3
|
.cal2
|
||||||
ld a, $0
|
ld a, $0
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld de, $ac0a
|
ld de, $ac0a
|
||||||
call Function39806
|
call TrainerType2
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
jr .asm_397d0
|
jr .done
|
||||||
; 397e3
|
; 397e3
|
||||||
|
|
||||||
Jumptable_397e3: ; 397e3
|
TrainerTypes: ; 397e3
|
||||||
dw Function397eb
|
dw TrainerType1 ; level, species
|
||||||
dw Function39806
|
dw TrainerType2 ; level, species, moves
|
||||||
dw Function39871
|
dw TrainerType3 ; level, species, item
|
||||||
dw Function3989d
|
dw TrainerType4 ; level, species, item, moves
|
||||||
; 397eb
|
; 397eb
|
||||||
|
|
||||||
Function397eb: ; 397eb
|
TrainerType1: ; 397eb
|
||||||
|
; normal (level, species)
|
||||||
ld h, d
|
ld h, d
|
||||||
ld l, e
|
ld l, e
|
||||||
.asm_397ed
|
.loop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $ff
|
cp $ff
|
||||||
ret z
|
ret z
|
||||||
ld [CurPartyLevel], a ; $d143
|
|
||||||
ld a, [hli]
|
|
||||||
ld [CurPartySpecies], a ; $d108
|
|
||||||
ld a, $1
|
|
||||||
ld [MonType], a ; $cf5f
|
|
||||||
push hl
|
|
||||||
ld a, $6
|
|
||||||
call Predef
|
|
||||||
pop hl
|
|
||||||
jr .asm_397ed
|
|
||||||
; 39806
|
|
||||||
|
|
||||||
Function39806: ; 39806
|
|
||||||
ld h, d
|
|
||||||
ld l, e
|
|
||||||
.asm_39808
|
|
||||||
ld a, [hli]
|
|
||||||
cp $ff
|
|
||||||
ret z
|
|
||||||
ld [CurPartyLevel], a
|
ld [CurPartyLevel], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
ld a, OTPARTYMON
|
ld a, OTPARTYMON
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
push hl
|
push hl
|
||||||
ld a, $6
|
ld a, PREDEF_ADDPARTYMON
|
||||||
|
call Predef
|
||||||
|
pop hl
|
||||||
|
jr .loop
|
||||||
|
; 39806
|
||||||
|
|
||||||
|
TrainerType2: ; 39806
|
||||||
|
; moves
|
||||||
|
ld h, d
|
||||||
|
ld l, e
|
||||||
|
.loop
|
||||||
|
ld a, [hli]
|
||||||
|
cp $ff
|
||||||
|
ret z
|
||||||
|
|
||||||
|
ld [CurPartyLevel], a
|
||||||
|
ld a, [hli]
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
ld a, OTPARTYMON
|
||||||
|
ld [MonType], a
|
||||||
|
|
||||||
|
push hl
|
||||||
|
ld a, PREDEF_ADDPARTYMON
|
||||||
call Predef
|
call Predef
|
||||||
ld a, [OTPartyCount]
|
ld a, [OTPartyCount]
|
||||||
dec a
|
dec a
|
||||||
@@ -43729,14 +43744,17 @@ Function39806: ; 39806
|
|||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
ld b, NUM_MOVES
|
ld b, NUM_MOVES
|
||||||
.asm_39830
|
.copy_moves
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_39830
|
jr nz, .copy_moves
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
|
|
||||||
ld a, [OTPartyCount]
|
ld a, [OTPartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld hl, OTPartyMon1Species
|
ld hl, OTPartyMon1Species
|
||||||
@@ -43744,17 +43762,19 @@ Function39806: ; 39806
|
|||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld hl, $0017
|
ld hl, OTPartyMon1PP - OTPartyMon1
|
||||||
add hl, de
|
add hl, de
|
||||||
push hl
|
push hl
|
||||||
ld hl, $0002
|
ld hl, OTPartyMon1Moves - OTPartyMon1
|
||||||
add hl, de
|
add hl, de
|
||||||
pop de
|
pop de
|
||||||
ld b, $4
|
|
||||||
.asm_39852
|
ld b, NUM_MOVES
|
||||||
|
.copy_pp
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3986e
|
jr z, .copied_pp
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
dec a
|
dec a
|
||||||
@@ -43765,104 +43785,119 @@ Function39806: ; 39806
|
|||||||
call GetFarByte
|
call GetFarByte
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_39852
|
jr nz, .copy_pp
|
||||||
|
.copied_pp
|
||||||
|
|
||||||
.asm_3986e
|
|
||||||
pop hl
|
pop hl
|
||||||
jr .asm_39808
|
jr .loop
|
||||||
; 39871
|
; 39871
|
||||||
|
|
||||||
Function39871: ; 39871
|
TrainerType3: ; 39871
|
||||||
|
; item
|
||||||
ld h, d
|
ld h, d
|
||||||
ld l, e
|
ld l, e
|
||||||
.asm_39873
|
.loop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $ff
|
cp $ff
|
||||||
ret z
|
ret z
|
||||||
ld [CurPartyLevel], a ; $d143
|
|
||||||
ld a, [hli]
|
|
||||||
ld [CurPartySpecies], a ; $d108
|
|
||||||
ld a, $1
|
|
||||||
ld [MonType], a ; $cf5f
|
|
||||||
push hl
|
|
||||||
ld a, $6
|
|
||||||
call Predef
|
|
||||||
ld a, [OTPartyCount] ; $d280
|
|
||||||
dec a
|
|
||||||
ld hl, OTPartyMon1Item ; $d289
|
|
||||||
ld bc, $30
|
|
||||||
call AddNTimes
|
|
||||||
ld d, h
|
|
||||||
ld e, l
|
|
||||||
pop hl
|
|
||||||
ld a, [hli]
|
|
||||||
ld [de], a
|
|
||||||
jr .asm_39873
|
|
||||||
; 3989d (e:589d)
|
|
||||||
|
|
||||||
Function3989d: ; 3989d
|
|
||||||
ld h, d
|
|
||||||
ld l, e
|
|
||||||
.asm_3989f
|
|
||||||
ld a, [hli]
|
|
||||||
cp $ff
|
|
||||||
ret z
|
|
||||||
ld [CurPartyLevel], a
|
ld [CurPartyLevel], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
ld a, $1
|
ld a, OTPARTYMON
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
push hl
|
push hl
|
||||||
ld a, $6
|
ld a, PREDEF_ADDPARTYMON
|
||||||
call Predef
|
call Predef
|
||||||
ld a, [OTPartyCount]
|
ld a, [OTPartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld hl, $d289
|
ld hl, OTPartyMon1Item
|
||||||
ld bc, PartyMon2 - PartyMon1
|
ld bc, OTPartyMon2 - OTPartyMon1
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
|
jr .loop
|
||||||
|
; 3989d (e:589d)
|
||||||
|
|
||||||
|
TrainerType4: ; 3989d
|
||||||
|
; item + moves
|
||||||
|
ld h, d
|
||||||
|
ld l, e
|
||||||
|
.loop
|
||||||
|
ld a, [hli]
|
||||||
|
cp $ff
|
||||||
|
ret z
|
||||||
|
|
||||||
|
ld [CurPartyLevel], a
|
||||||
|
ld a, [hli]
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
|
||||||
|
ld a, OTPARTYMON
|
||||||
|
ld [MonType], a
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
|
ld a, PREDEF_ADDPARTYMON
|
||||||
|
call Predef
|
||||||
ld a, [OTPartyCount]
|
ld a, [OTPartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld hl, $d28a
|
ld hl, OTPartyMon1Item
|
||||||
ld bc, PartyMon2 - PartyMon1
|
ld bc, OTPartyMon2 - OTPartyMon1
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
pop hl
|
pop hl
|
||||||
ld b, $4
|
|
||||||
.asm_398da
|
ld a, [hli]
|
||||||
|
ld [de], a
|
||||||
|
|
||||||
|
push hl
|
||||||
|
ld a, [OTPartyCount]
|
||||||
|
dec a
|
||||||
|
ld hl, OTPartyMon1Moves
|
||||||
|
ld bc, OTPartyMon2 - OTPartyMon1
|
||||||
|
call AddNTimes
|
||||||
|
ld d, h
|
||||||
|
ld e, l
|
||||||
|
pop hl
|
||||||
|
|
||||||
|
ld b, NUM_MOVES
|
||||||
|
.copy_moves
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_398da
|
jr nz, .copy_moves
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
|
|
||||||
ld a, [OTPartyCount]
|
ld a, [OTPartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld hl, OTPartyMon1
|
ld hl, OTPartyMon1
|
||||||
ld bc, PartyMon2 - PartyMon1
|
ld bc, OTPartyMon2 - OTPartyMon1
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld hl, $0017
|
ld hl, OTPartyMon1PP - OTPartyMon1
|
||||||
add hl, de
|
add hl, de
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
ld hl, $0002
|
ld hl, OTPartyMon1Moves - OTPartyMon1
|
||||||
add hl, de
|
add hl, de
|
||||||
pop de
|
pop de
|
||||||
ld b, $4
|
|
||||||
.asm_398fc
|
ld b, NUM_MOVES
|
||||||
|
.copy_pp
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_39918
|
jr z, .copied_pp
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
dec a
|
dec a
|
||||||
@@ -43873,34 +43908,34 @@ Function3989d: ; 3989d
|
|||||||
call GetFarByte
|
call GetFarByte
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_398fc
|
jr nz, .copy_pp
|
||||||
|
.copied_pp
|
||||||
|
|
||||||
.asm_39918
|
|
||||||
pop hl
|
pop hl
|
||||||
jr .asm_3989f
|
jr .loop
|
||||||
; 3991b
|
; 3991b
|
||||||
|
|
||||||
; known jump sources: 397d0 (e:57d0)
|
|
||||||
Function3991b: ; 3991b (e:591b)
|
Function3991b: ; 3991b (e:591b)
|
||||||
ld hl, $ffb3
|
ld hl, $ffb3
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [$c652]
|
ld a, [$c652] ; base reward
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [CurPartyLevel] ; $d143
|
ld a, [CurPartyLevel]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld hl, $c686
|
ld hl, $c686
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [$FF00+$b5]
|
ld a, [$ffb5]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [$FF00+$b6]
|
ld a, [$ffb6]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@@ -43918,14 +43953,16 @@ Function39939:: ; 39939
|
|||||||
|
|
||||||
Function3994c:: ; 3994c
|
Function3994c:: ; 3994c
|
||||||
ld a, c
|
ld a, c
|
||||||
cp $c
|
cp CAL
|
||||||
jr nz, .asm_3996d
|
jr nz, .asm_3996d
|
||||||
|
|
||||||
ld a, $0
|
ld a, $0
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [$abfd]
|
ld a, [$abfd]
|
||||||
and a
|
and a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
jr z, .asm_3996d
|
jr z, .asm_3996d
|
||||||
|
|
||||||
ld a, $0
|
ld a, $0
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, $abfe
|
ld hl, $abfe
|
||||||
@@ -43947,6 +43984,7 @@ Function3994c:: ; 3994c
|
|||||||
.asm_3997a
|
.asm_3997a
|
||||||
dec b
|
dec b
|
||||||
jr z, Function39984
|
jr z, Function39984
|
||||||
|
|
||||||
.asm_3997d
|
.asm_3997d
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $ff
|
cp $ff
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
; Type
|
; Type
|
||||||
; 0: Level, species
|
; 0: Level, species
|
||||||
; 1: Level, species, moves
|
; 1: Level, species, moves
|
||||||
; 2: Level, sepcies, item
|
; 2: Level, species, item
|
||||||
; 3: Level, species, item, moves
|
; 3: Level, species, item, moves
|
||||||
; Party
|
; Party
|
||||||
; Up to six monsters following the data type
|
; Up to six monsters following the data type
|
||||||
|
2
wram.asm
2
wram.asm
@@ -1170,12 +1170,14 @@ OTPartyCount:: ds 1 ; d280
|
|||||||
OTPartySpecies:: ds PARTY_LENGTH ; d281
|
OTPartySpecies:: ds PARTY_LENGTH ; d281
|
||||||
OTPartyEnd:: ds 1
|
OTPartyEnd:: ds 1
|
||||||
|
|
||||||
|
OTPartyMons::
|
||||||
OTPartyMon1:: party_struct OTPartyMon1 ; d288
|
OTPartyMon1:: party_struct OTPartyMon1 ; d288
|
||||||
OTPartyMon2:: party_struct OTPartyMon2 ; d2b8
|
OTPartyMon2:: party_struct OTPartyMon2 ; d2b8
|
||||||
OTPartyMon3:: party_struct OTPartyMon3 ; d2e8
|
OTPartyMon3:: party_struct OTPartyMon3 ; d2e8
|
||||||
OTPartyMon4:: party_struct OTPartyMon4 ; d318
|
OTPartyMon4:: party_struct OTPartyMon4 ; d318
|
||||||
OTPartyMon5:: party_struct OTPartyMon5 ; d348
|
OTPartyMon5:: party_struct OTPartyMon5 ; d348
|
||||||
OTPartyMon6:: party_struct OTPartyMon6 ; d378
|
OTPartyMon6:: party_struct OTPartyMon6 ; d378
|
||||||
|
OTPartyMonsEnd::
|
||||||
|
|
||||||
OTPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d3a8
|
OTPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d3a8
|
||||||
OTPartyMonNicknames:: ds PKMN_NAME_LENGTH * PARTY_LENGTH ; d3ea
|
OTPartyMonNicknames:: ds PKMN_NAME_LENGTH * PARTY_LENGTH ; d3ea
|
||||||
|
Reference in New Issue
Block a user