Skip to content

Commit

Permalink
DVs are still needed for color variation
Browse files Browse the repository at this point in the history
This commit and the previous fix Rangi42#133
  • Loading branch information
roukaour committed Dec 22, 2017
1 parent fa85bd3 commit 1476338
Showing 1 changed file with 36 additions and 24 deletions.
60 changes: 36 additions & 24 deletions engine/billspc.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1149,32 +1149,36 @@ BillsPC_LoadMonStats: ; e2b6d (38:6b6d)
ld a, [hl]
ld [TempMonItem], a
pop hl
; personality
; DVs and personality (DVs for color variation)
push hl
ld bc, sBoxMon1Personality - sBox
ld bc, sBoxMon1DVs - sBox
add hl, bc
ld bc, BOXMON_STRUCT_LENGTH
ld a, e
call AddNTimes
ld bc, TempMonDVs
rept 4
ld a, [hli]
ld [TempMonPersonality], a
ld [bc], a
inc bc
endr
ld a, [hl]
ld [TempMonPersonality + 1], a
ld [bc], a
pop hl
; moves (for Pikachu forms)
ld bc, sBoxMon1Moves - sBox
add hl, bc
ld bc, BOXMON_STRUCT_LENGTH
ld a, e
call AddNTimes
ld de, TempMonMoves
ld bc, TempMonMoves
rept NUM_MOVES +- 1
ld a, [hli]
ld [de], a
inc de
ld [bc], a
inc bc
endr
ld a, [hl]
ld [de], a
ld [bc], a
jp CloseSRAM

.party
Expand All @@ -1192,28 +1196,32 @@ endr
call AddNTimes
ld a, [hl]
ld [TempMonItem], a
; personality
ld hl, PartyMon1Personality
; DVs and personality (DVs for color variation)
ld hl, PartyMon1DVs
ld bc, PARTYMON_STRUCT_LENGTH
ld a, e
call AddNTimes
ld bc, TempMonDVs
rept 4
ld a, [hli]
ld [TempMonPersonality], a
ld [bc], a
inc bc
endr
ld a, [hl]
ld [TempMonPersonality + 1], a
ld [bc], a
; moves (for Pikachu forms)
ld hl, PartyMon1Item
ld bc, PARTYMON_STRUCT_LENGTH
ld a, e
call AddNTimes
ld de, TempMonMoves
ld bc, TempMonMoves
rept NUM_MOVES +- 1
ld a, [hli]
ld [de], a
inc de
ld [bc], a
inc bc
endr
ld a, [hl]
ld [de], a
ld [bc], a
ret

.sBox
Expand All @@ -1233,28 +1241,32 @@ endr
call AddNTimes
ld a, [hl]
ld [TempMonItem], a
; personality
ld hl, sBoxMon1Personality
; DVs and personality (DVs for color variation)
ld hl, sBoxMon1DVs
ld bc, BOXMON_STRUCT_LENGTH
ld a, e
call AddNTimes
ld bc, TempMonDVs
rept 4
ld a, [hli]
ld [TempMonPersonality], a
ld [bc], a
inc bc
endr
ld a, [hl]
ld [TempMonPersonality + 1], a
ld [bc], a
; moves (for Pikachu forms)
ld hl, sBoxMon1Moves
ld bc, BOXMON_STRUCT_LENGTH
ld a, e
call AddNTimes
ld de, TempMonMoves
ld bc, TempMonMoves
rept NUM_MOVES +- 1
ld a, [hli]
ld [de], a
inc de
ld [bc], a
inc bc
endr
ld a, [hl]
ld [de], a
ld [bc], a
jp CloseSRAM

BillsPC_RefreshTextboxes: ; e2c2c (38:6c2c)
Expand Down

0 comments on commit 1476338

Please sign in to comment.