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_STAT EQU 5
BASE_HAPPINESS EQU 70
; happiness evolution triggers
HAPPINESS_TO_EVOLVE EQU 220
TR_ANYTIME EQU 1

View File

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

View File

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