base stat labels + GetCurNick

This commit is contained in:
yenatch 2013-04-29 14:04:25 -04:00
parent c80b2e376e
commit 652d26bb05
2 changed files with 60 additions and 22 deletions

View File

@ -3506,11 +3506,8 @@ GetBaseStats: ; 3856
push bc
push de
push hl
; Save bank
ld a, [hROMBank]
push af
; Bankswitch
ld a, BANK(BaseStats)
rst Bankswitch
@ -3534,12 +3531,12 @@ GetBaseStats: ; 3856
ld de, $7d9c
; Sprite dimensions
ld b, $55
ld hl, $d247
ld b, $55 ; 5x5
ld hl, BasePicSize
ld [hl], b
; ????
ld hl, $d248
ld hl, BasePadding
ld [hl], e
inc hl
ld [hl], d
@ -3554,42 +3551,41 @@ GetBaseStats: ; 3856
ld a, [CurSpecies]
ld [CurBaseStats], a
; Restore bank
pop af
rst Bankswitch
pop hl
pop de
pop bc
ret
; 389c
INCBIN "baserom.gbc", $389c, $38a2 - $389c
GetCurNick; 389c
ld a, [CurPartyMon]
ld hl, PartyMonNicknames
GetNick: ; 38a2
; get the nickname of a partymon
; write nick to StringBuffer1
; input: a = which mon (0-5)
; Get nickname a from list hl.
push hl
push bc
; skip [a] nicks
call SkipNames
ld de, StringBuffer1
; write nick
push de
ld bc, PKMN_NAME_LENGTH
call CopyBytes
; error-check
pop de
callab CheckNickErrors
; we're done
pop bc
pop hl
ret
; 38bb
PrintBCDNumber: ; 38bb
; function to print a BCD (Binary-coded decimal) number
; de = address of BCD number
@ -6775,16 +6771,16 @@ LoadEnemyMon: ; 3e8eb
; 25% chance of getting an item
call FarBattleRNG
cp a, $c0 ; $c0/$100 = 75%
cp a, $c0
ld a, NO_ITEM
jr c, .UpdateItem
; From there, an 8% chance for Item2
call FarBattleRNG
cp a, $14 ; 8% of 25% = 2% Item2
ld a, [$d241] ; BaseStatsItem1
cp a, $14 ; 8% of 25% = 2% Item2
ld a, [BaseItems]
jr nc, .UpdateItem
ld a, [$d242] ; BaseStatsItem2
ld a, [BaseItems+1]
.UpdateItem

View File

@ -1166,11 +1166,52 @@ UnownLetter: ; d234
ds 1
CurBaseStats: ; d236
ds 32
BaseDexNo: ; d236
ds 1
BaseHP: ; d237
ds 1
BaseAttack: ; d238
ds 1
BaseDefense: ; d239
ds 1
BaseSpeed: ; d23a
ds 1
BaseSpecialAttack: ; d23b
ds 1
BaseSpecialDefense: ; d23c
ds 1
BaseType: ; d23d
ds 2
BaseCatchRate: ; d23f
ds 1
BaseExp: ; d240
ds 1
BaseItems: ; d241
ds 2
BaseGender: ; d243
ds 1
BaseUnknown1: ; d244
ds 1
BaseEggSteps: ; d245
ds 1
BaseUnknown2: ; d246
ds 1
BasePicSize: ; d247
ds 1
BasePadding: ; d248
ds 4
BaseGrowthRate: ; d24c
ds 1
BaseEggGroups: ; d24d
ds 1
BaseTMHM: ; d24e
ds 8
CurDamage: ; d256
ds 2
SECTION "TimeOfDay",BSS[$d269]
TimeOfDay: ; d269
@ -1620,6 +1661,7 @@ PartyMon5OT: ; de2b
PartyMon6OT: ; de36
ds 11
PartyMonNicknames:
PartyMon1Nickname: ; de41
ds 11
PartyMon2Nickname: ; de4c