More labels in LoadEnemyMon

This commit is contained in:
yenatch 2013-04-29 15:42:31 -04:00
parent f2185cd0e4
commit 620d5c09c7
3 changed files with 34 additions and 23 deletions

View File

@ -2339,6 +2339,7 @@ EVOLVE_TRADE EQU 3
EVOLVE_HAPPINESS EQU 4 EVOLVE_HAPPINESS EQU 4
EVOLVE_STAT EQU 5 EVOLVE_STAT EQU 5
BASE_HAPPINESS EQU 70
; happiness evolution triggers ; happiness evolution triggers
HAPPINESS_TO_EVOLVE EQU 220 HAPPINESS_TO_EVOLVE EQU 220
TR_ANYTIME EQU 1 TR_ANYTIME EQU 1

View File

@ -3549,7 +3549,7 @@ GetBaseData: ; 3856
.end .end
; Replace Pokedex # with species ; Replace Pokedex # with species
ld a, [CurSpecies] ld a, [CurSpecies]
ld [CurBaseData], a ld [BaseDexNo], a
pop af pop af
rst Bankswitch rst Bankswitch
@ -6716,7 +6716,7 @@ LoadEnemyMon: ; 3e8eb
; Clear the whole EnemyMon struct ; Clear the whole EnemyMon struct
xor a xor a
ld hl, EnemyMonSpecies ld hl, EnemyMonSpecies
ld bc, $0027 ld bc, EnemyMonEnd - EnemyMon
call ByteFill call ByteFill
; We don't need to be here if we're in a link battle ; We don't need to be here if we're in a link battle
@ -6760,7 +6760,7 @@ LoadEnemyMon: ; 3e8eb
; Used for Ho-Oh, Lugia and Snorlax encounters ; Used for Ho-Oh, Lugia and Snorlax encounters
ld a, [BattleType] ld a, [BattleType]
cp BATTLETYPE_FORCEITEM cp BATTLETYPE_FORCEITEM
ld a, [$d241] ; BufferMonItem1 ld a, [BaseItems]
jr z, .UpdateItem jr z, .UpdateItem
; Failing that, it's all up to chance ; Failing that, it's all up to chance
@ -6795,7 +6795,7 @@ LoadEnemyMon: ; 3e8eb
jr z, .InitDVs jr z, .InitDVs
; ???? ; ????
ld a, [$c671] ld a, [EnemySubStatus5]
bit 3, a bit 3, a
jr z, .InitDVs jr z, .InitDVs
@ -6982,7 +6982,7 @@ LoadEnemyMon: ; 3e8eb
.Happiness .Happiness
; Set happiness ; Set happiness
ld a, 70 ; BASE_HAPPINESS ld a, BASE_HAPPINESS
ld [EnemyMonHappiness], a ld [EnemyMonHappiness], a
; Set level ; Set level
ld a, [CurPartyLevel] ld a, [CurPartyLevel]
@ -7077,8 +7077,8 @@ LoadEnemyMon: ; 3e8eb
.Moves .Moves
; ???? ; ????
ld hl, $d23d ld hl, BaseType1
ld de, $d224 ld de, EnemyMonType1
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
inc de inc de
@ -7137,24 +7137,24 @@ LoadEnemyMon: ; 3e8eb
call CopyBytes call CopyBytes
.Finish .Finish
; ???? ; Only the first five base stats are copied...
ld hl, $d237 ld hl, BaseStats
ld de, $d226 ld de, EnemyMonBaseStats
ld b, 5 ; # bytes to copy ld b, BaseSpecialDefense - BaseStats
; Copy $d237-a to $d226-9
.loop .loop
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
inc de inc de
dec b dec b
jr nz, .loop jr nz, .loop
; Copy $d23f to $d22a
ld a, [$d23f] ld a, [BaseCatchRate]
ld [de], a ld [de], a
inc de inc de
; Copy $d240 to $d22b
ld a, [$d240] ld a, [BaseExp]
ld [de], a ld [de], a
; copy TempEnemyMonSpecies to $d265 ; copy TempEnemyMonSpecies to $d265
ld a, [TempEnemyMonSpecies] ld a, [TempEnemyMonSpecies]
ld [$d265], a ld [$d265], a
@ -8963,7 +8963,7 @@ GetGender: ; 50bdd
push bc push bc
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
dec a dec a
ld hl, BaseData + 13 ; BASE_GENDER ld hl, BaseData + BaseGender - CurBaseData
ld bc, BaseData1 - BaseData ld bc, BaseData1 - BaseData
call AddNTimes call AddNTimes
pop bc pop bc

View File

@ -1043,17 +1043,16 @@ MagikarpLength: ; d1ea
Buffer2: ; d1eb Buffer2: ; d1eb
ds 1 ds 1
SECTION "prng2",BSS[$d1fa] SECTION "BattleMons2",BSS[$d1fa]
LinkBattleRNs: ; d1fa LinkBattleRNs: ; d1fa
ds 10 ds 10
SECTION "BattleMons2",BSS[$d204]
TempEnemyMonSpecies: ; d204 TempEnemyMonSpecies: ; d204
ds 1 ds 1
TempBattleMonSpecies: ; d205 TempBattleMonSpecies: ; d205
ds 1 ds 1
EnemyMon:
EnemyMonSpecies: ; d206 EnemyMonSpecies: ; d206
ds 1 ds 1
EnemyMonItem: ; d207 EnemyMonItem: ; d207
@ -1121,8 +1120,16 @@ EnemyMonType1: ; d224
EnemyMonType2: ; d225 EnemyMonType2: ; d225
ds 1 ds 1
EnemyMonBaseStats: ; d226
ds 5
EnemyMonCatchRate: ; d22b
ds 1
EnemyMonBaseExp: ; d22c
ds 1
EnemyMonEnd
SECTION "Battle",BSS[$d22d]
IsInBattle: ; d22d IsInBattle: ; d22d
; 0: overworld ; 0: overworld
@ -1182,7 +1189,10 @@ BaseSpecialAttack: ; d23b
BaseSpecialDefense: ; d23c BaseSpecialDefense: ; d23c
ds 1 ds 1
BaseType: ; d23d BaseType: ; d23d
ds 2 BaseType1: ; d23d
ds 1
BaseType2: ; d23e
ds 1
BaseCatchRate: ; d23f BaseCatchRate: ; d23f
ds 1 ds 1
BaseExp: ; d240 BaseExp: ; d240