You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
evolution prerequisites and no more incbins in item effects
This commit is contained in:
@@ -474,7 +474,7 @@ ParkBall: ; e8a2
|
|||||||
|
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
|
||||||
ld hl, $6deb
|
ld hl, UnknownText_0xedeb
|
||||||
call PrintText
|
call PrintText
|
||||||
|
|
||||||
call Function4b6
|
call Function4b6
|
||||||
@@ -486,7 +486,7 @@ ParkBall: ; e8a2
|
|||||||
jr .asm_ebe2
|
jr .asm_ebe2
|
||||||
|
|
||||||
.asm_ebd9
|
.asm_ebd9
|
||||||
ld hl, $6dc9
|
ld hl, UnknownText_0xedc9
|
||||||
|
|
||||||
.asm_ebdc
|
.asm_ebdc
|
||||||
call PrintText
|
call PrintText
|
||||||
@@ -701,41 +701,39 @@ Function_0xecdd: ; ecdd
|
|||||||
ld a, [TempEnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
dec a
|
dec a
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, $0
|
ld b, 0
|
||||||
ld hl, $65b1
|
ld hl, EvosAttacksPointers
|
||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, $10
|
ld a, BANK(EvosAttacksPointers)
|
||||||
call GetFarHalfword
|
call GetFarHalfword
|
||||||
|
|
||||||
pop bc
|
pop bc
|
||||||
push bc
|
|
||||||
ld a, $10
|
|
||||||
call GetFarByte
|
|
||||||
|
|
||||||
cp $2
|
push bc
|
||||||
|
ld a, BANK(EvosAttacks)
|
||||||
|
call GetFarByte
|
||||||
|
cp EVOLVE_ITEM
|
||||||
pop bc
|
pop bc
|
||||||
ret nz
|
ret nz
|
||||||
inc hl
|
|
||||||
inc hl
|
|
||||||
inc hl
|
|
||||||
push bc
|
|
||||||
ld a, $10
|
|
||||||
call GetFarByte
|
|
||||||
|
|
||||||
cp $a
|
inc hl
|
||||||
|
inc hl
|
||||||
|
inc hl
|
||||||
|
|
||||||
|
push bc
|
||||||
|
ld a, BANK(EvosAttacks)
|
||||||
|
call GetFarByte
|
||||||
|
cp MOON_STONE + 2 ; BURN_HEAL
|
||||||
pop bc
|
pop bc
|
||||||
ret nz
|
ret nz
|
||||||
sla b
|
|
||||||
jr c, .asm_ed0f
|
|
||||||
|
|
||||||
sla b
|
sla b
|
||||||
jr nc, .asm_ed11
|
jr c, .max
|
||||||
|
sla b
|
||||||
.asm_ed0f
|
jr nc, .done
|
||||||
|
.max
|
||||||
ld b, $ff
|
ld b, $ff
|
||||||
|
.done
|
||||||
.asm_ed11
|
|
||||||
ret
|
ret
|
||||||
; ed12
|
; ed12
|
||||||
|
|
||||||
@@ -1200,16 +1198,16 @@ RareCandy: ; ef14
|
|||||||
call Predef
|
call Predef
|
||||||
|
|
||||||
ld hl, $c4a9
|
ld hl, $c4a9
|
||||||
ld b, $a
|
ld b, 10
|
||||||
ld c, $9
|
ld c, 9
|
||||||
call $0fe8
|
call TextBox
|
||||||
|
|
||||||
ld hl, $c4bf
|
ld hl, $c4bf
|
||||||
ld bc, $0004
|
ld bc, $0004
|
||||||
ld a, $28
|
ld a, $28
|
||||||
call Predef
|
call Predef
|
||||||
|
|
||||||
call $0a80
|
call Functiona80
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
@@ -2019,7 +2017,7 @@ Functionf419: ; f419 (3:7419)
|
|||||||
ret
|
ret
|
||||||
.asm_f440
|
.asm_f440
|
||||||
push bc
|
push bc
|
||||||
ld hl, $744a
|
ld hl, UnknownText_0xf44a
|
||||||
call Function1d67
|
call Function1d67
|
||||||
pop bc
|
pop bc
|
||||||
jr Functionf419
|
jr Functionf419
|
||||||
|
169
main.asm
169
main.asm
@@ -40721,28 +40721,35 @@ Function421e6: ; 421e6
|
|||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
ld hl, PartyCount
|
ld hl, PartyCount
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
asm_421f5
|
|
||||||
|
Function421f5: ; 421f5
|
||||||
ld hl, CurPartyMon
|
ld hl, CurPartyMon
|
||||||
inc [hl]
|
inc [hl]
|
||||||
|
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $ff
|
cp $ff
|
||||||
jp z, Function423ff
|
jp z, Function423ff
|
||||||
|
|
||||||
ld [MagikarpLength], a
|
ld [MagikarpLength], a
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld hl, EvolvableFlags
|
ld hl, EvolvableFlags
|
||||||
ld b, $2
|
ld b, 2
|
||||||
call Function42577
|
call Function42577
|
||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
jp z, asm_421f5
|
jp z, Function421f5
|
||||||
|
|
||||||
ld a, [MagikarpLength]
|
ld a, [MagikarpLength]
|
||||||
dec a
|
dec a
|
||||||
ld b, $0
|
ld b, 0
|
||||||
ld c, a
|
ld c, a
|
||||||
ld hl, EvosAttacksPointers
|
ld hl, EvosAttacksPointers
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@@ -40750,100 +40757,127 @@ asm_421f5
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
xor a
|
xor a
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
ld a, $1f
|
ld a, $1f
|
||||||
call Predef
|
call Predef
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
.asm_42230
|
.asm_42230
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
and a
|
and a
|
||||||
jr z, asm_421f5
|
jr z, Function421f5
|
||||||
|
|
||||||
ld b, a
|
ld b, a
|
||||||
cp $3
|
|
||||||
jr z, .asm_422ae
|
cp EVOLVE_TRADE
|
||||||
|
jr z, .trade
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
and a
|
and a
|
||||||
jp nz, .asm_423f9
|
jp nz, .asm_423f9
|
||||||
|
|
||||||
ld a, b
|
ld a, b
|
||||||
cp $2
|
cp EVOLVE_ITEM
|
||||||
jp z, .asm_422d5
|
jp z, .item
|
||||||
|
|
||||||
ld a, [$d1e9]
|
ld a, [$d1e9]
|
||||||
and a
|
and a
|
||||||
jp nz, .asm_423f9
|
jp nz, .asm_423f9
|
||||||
|
|
||||||
ld a, b
|
ld a, b
|
||||||
cp $1
|
cp EVOLVE_LEVEL
|
||||||
jp z, .asm_422ee
|
jp z, .level
|
||||||
cp $4
|
|
||||||
jr z, .asm_42283
|
cp EVOLVE_HAPPINESS
|
||||||
|
jr z, .happiness
|
||||||
|
|
||||||
|
|
||||||
|
; EVOLVE_STAT
|
||||||
ld a, [TempMonLevel]
|
ld a, [TempMonLevel]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jp c, .asm_423f8
|
jp c, .asm_423f8
|
||||||
|
|
||||||
call Function42461
|
call Function42461
|
||||||
jp z, .asm_423f8
|
jp z, .asm_423f8
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
ld de, TempMonAtk
|
ld de, TempMonAtk
|
||||||
ld hl, TempMonDef
|
ld hl, TempMonDef
|
||||||
ld c, $2
|
ld c, 2
|
||||||
call StringCmp
|
call StringCmp
|
||||||
ld a, $3
|
ld a, ATK_EQ_DEF
|
||||||
jr z, .asm_4227a
|
jr z, .asm_4227a
|
||||||
ld a, $2
|
ld a, ATK_LT_DEF
|
||||||
jr c, .asm_4227a
|
jr c, .asm_4227a
|
||||||
ld a, $1
|
ld a, ATK_GT_DEF
|
||||||
|
|
||||||
.asm_4227a
|
.asm_4227a
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
inc hl
|
inc hl
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jp nz, .asm_423f9
|
jp nz, .asm_423f9
|
||||||
|
|
||||||
inc hl
|
inc hl
|
||||||
jr .asm_422fd
|
jr .asm_422fd
|
||||||
|
|
||||||
.asm_42283
|
|
||||||
|
.happiness
|
||||||
ld a, [TempMonHappiness]
|
ld a, [TempMonHappiness]
|
||||||
cp $dc
|
cp 220
|
||||||
jp c, .asm_423f9
|
jp c, .asm_423f9
|
||||||
|
|
||||||
call Function42461
|
call Function42461
|
||||||
jp z, .asm_423f9
|
jp z, .asm_423f9
|
||||||
|
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $1
|
cp TR_ANYTIME
|
||||||
jr z, .asm_422fd
|
jr z, .asm_422fd
|
||||||
cp $2
|
cp TR_MORNDAY
|
||||||
jr z, .asm_422a4
|
jr z, .asm_422a4
|
||||||
|
|
||||||
|
; TR_NITE
|
||||||
ld a, [TimeOfDay]
|
ld a, [TimeOfDay]
|
||||||
cp $2
|
cp NITE
|
||||||
jp nz, .asm_423fa
|
jp nz, .asm_423fa
|
||||||
jr .asm_422fd
|
jr .asm_422fd
|
||||||
|
|
||||||
.asm_422a4
|
.asm_422a4
|
||||||
ld a, [TimeOfDay]
|
ld a, [TimeOfDay]
|
||||||
cp $2
|
cp NITE
|
||||||
jp z, .asm_423fa
|
jp z, .asm_423fa
|
||||||
jr .asm_422fd
|
jr .asm_422fd
|
||||||
|
|
||||||
.asm_422ae
|
|
||||||
|
.trade
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
and a
|
and a
|
||||||
jp z, .asm_423f9
|
jp z, .asm_423f9
|
||||||
|
|
||||||
call Function42461
|
call Function42461
|
||||||
jp z, .asm_423f9
|
jp z, .asm_423f9
|
||||||
|
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
inc a
|
inc a
|
||||||
jr z, .asm_422fd
|
jr z, .asm_422fd
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
cp $1
|
cp $1
|
||||||
jp z, .asm_423fa
|
jp z, .asm_423fa
|
||||||
|
|
||||||
ld a, [TempMonItem]
|
ld a, [TempMonItem]
|
||||||
cp b
|
cp b
|
||||||
jp nz, .asm_423fa
|
jp nz, .asm_423fa
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [TempMonItem], a
|
ld [TempMonItem], a
|
||||||
jr .asm_422fd
|
jr .asm_422fd
|
||||||
|
|
||||||
.asm_422d5
|
|
||||||
|
.item
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
@@ -40858,7 +40892,8 @@ asm_421f5
|
|||||||
jp nz, .asm_423fa
|
jp nz, .asm_423fa
|
||||||
jr .asm_422fd
|
jr .asm_422fd
|
||||||
|
|
||||||
.asm_422ee
|
|
||||||
|
.level
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [TempMonLevel]
|
ld a, [TempMonLevel]
|
||||||
@@ -40872,61 +40907,77 @@ asm_421f5
|
|||||||
ld [CurPartyLevel], a
|
ld [CurPartyLevel], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [$d268], a
|
ld [$d268], a
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
|
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [Buffer2], a
|
ld [Buffer2], a
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld hl, PartyMon1Nickname
|
ld hl, PartyMon1Nickname
|
||||||
call GetNick
|
call GetNick
|
||||||
call CopyName1
|
call CopyName1
|
||||||
ld hl, $6482
|
ld hl, UnknownText_0x42482
|
||||||
call PrintText
|
call PrintText
|
||||||
ld c, $32
|
|
||||||
|
ld c, 50
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld hl, TileMap
|
ld hl, TileMap
|
||||||
ld bc, $0c14
|
lb bc, 12, 20
|
||||||
call ClearBox
|
call ClearBox
|
||||||
|
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
|
|
||||||
callba EvolutionAnimation
|
callba EvolutionAnimation
|
||||||
|
|
||||||
push af
|
push af
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
pop af
|
pop af
|
||||||
jp c, Function42454
|
jp c, Function42454
|
||||||
ld hl, $6473
|
|
||||||
|
ld hl, UnknownText_0x42473
|
||||||
call PrintText
|
call PrintText
|
||||||
|
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [CurSpecies], a
|
ld [CurSpecies], a
|
||||||
ld [TempMonSpecies], a
|
ld [TempMonSpecies], a
|
||||||
ld [Buffer2], a
|
ld [Buffer2], a
|
||||||
ld [$d265], a
|
ld [$d265], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
ld hl, $6478
|
ld hl, UnknownText_0x42478
|
||||||
call PrintTextBoxText
|
call PrintTextBoxText
|
||||||
callba Function106094
|
callba Function106094
|
||||||
|
|
||||||
ld de, MUSIC_NONE
|
ld de, MUSIC_NONE
|
||||||
call PlayMusic
|
call PlayMusic
|
||||||
ld de, SFX_CAUGHT_MON
|
ld de, SFX_CAUGHT_MON
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld c, $28
|
|
||||||
|
ld c, 40
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call Function42414
|
call Function42414
|
||||||
call GetBaseData
|
call GetBaseData
|
||||||
|
|
||||||
ld hl, $d118
|
ld hl, $d118
|
||||||
ld de, TempMonMaxHP
|
ld de, TempMonMaxHP
|
||||||
ld b, $1
|
ld b, $1
|
||||||
ld a, $c
|
ld a, PREDEF_FILLSTATS
|
||||||
call Predef
|
call Predef
|
||||||
|
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld hl, PartyMon1Species
|
ld hl, PartyMons
|
||||||
ld bc, $0030
|
ld bc, PartyMon2 - PartyMon1
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld e, l
|
ld e, l
|
||||||
ld d, h
|
ld d, h
|
||||||
@@ -40949,9 +41000,11 @@ asm_421f5
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
adc b
|
adc b
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld hl, TempMonSpecies
|
ld hl, TempMonSpecies
|
||||||
ld bc, $0030
|
ld bc, $0030
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld a, [CurSpecies]
|
ld a, [CurSpecies]
|
||||||
ld [$d265], a
|
ld [$d265], a
|
||||||
xor a
|
xor a
|
||||||
@@ -40960,11 +41013,13 @@ asm_421f5
|
|||||||
ld a, [$d265]
|
ld a, [$d265]
|
||||||
dec a
|
dec a
|
||||||
call SetSeenAndCaughtMon
|
call SetSeenAndCaughtMon
|
||||||
|
|
||||||
ld a, [$d265]
|
ld a, [$d265]
|
||||||
cp $c9
|
cp UNOWN
|
||||||
jr nz, .asm_423ec
|
jr nz, .asm_423ec
|
||||||
|
|
||||||
ld hl, TempMonDVs
|
ld hl, TempMonDVs
|
||||||
ld a, $2d
|
ld a, PREDEF_GET_UNOWN_LETTER
|
||||||
call Predef
|
call Predef
|
||||||
callab Functionfba18
|
callab Functionfba18
|
||||||
|
|
||||||
@@ -40976,7 +41031,7 @@ asm_421f5
|
|||||||
push hl
|
push hl
|
||||||
ld l, e
|
ld l, e
|
||||||
ld h, d
|
ld h, d
|
||||||
jp asm_421f5
|
jp Function421f5
|
||||||
; 423f8
|
; 423f8
|
||||||
|
|
||||||
.asm_423f8
|
.asm_423f8
|
||||||
@@ -40988,7 +41043,7 @@ asm_421f5
|
|||||||
jp .asm_42230
|
jp .asm_42230
|
||||||
; 423fe
|
; 423fe
|
||||||
|
|
||||||
INCBIN "baserom.gbc",$423fe,$423ff - $423fe
|
INCBIN "baserom.gbc", $423fe, $423ff - $423fe
|
||||||
|
|
||||||
|
|
||||||
Function423ff: ; 423ff
|
Function423ff: ; 423ff
|
||||||
@@ -41023,7 +41078,7 @@ Function42414: ; 42414
|
|||||||
cp [hl]
|
cp [hl]
|
||||||
inc hl
|
inc hl
|
||||||
ret nz
|
ret nz
|
||||||
cp $50
|
cp "@"
|
||||||
jr nz, .asm_4242b
|
jr nz, .asm_4242b
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld bc, $000b
|
ld bc, $000b
|
||||||
@@ -41040,26 +41095,48 @@ Function42414: ; 42414
|
|||||||
; 42454
|
; 42454
|
||||||
|
|
||||||
Function42454: ; 42454
|
Function42454: ; 42454
|
||||||
ld hl, $647d
|
ld hl, UnknownText_0x4247d
|
||||||
call PrintText
|
call PrintText
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
pop hl
|
pop hl
|
||||||
jp asm_421f5
|
jp Function421f5
|
||||||
; 42461
|
; 42461
|
||||||
|
|
||||||
Function42461: ; 42461
|
Function42461: ; 42461
|
||||||
push hl
|
push hl
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld hl, PartyMon1Item
|
ld hl, PartyMon1Item
|
||||||
ld bc, $0030
|
ld bc, PartyMon2 - PartyMon1
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $70
|
cp EVERSTONE
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
; 42473
|
; 42473
|
||||||
|
|
||||||
INCBIN "baserom.gbc",$42473,$42487 - $42473
|
UnknownText_0x42473: ; 0x42473
|
||||||
|
; Congratulations! Your @ @
|
||||||
|
text_jump UnknownText_0x1c4b92
|
||||||
|
db "@"
|
||||||
|
; 0x42478
|
||||||
|
|
||||||
|
UnknownText_0x42478: ; 0x42478
|
||||||
|
; evolved into @ !
|
||||||
|
text_jump UnknownText_0x1c4baf
|
||||||
|
db "@"
|
||||||
|
; 0x4247d
|
||||||
|
|
||||||
|
UnknownText_0x4247d: ; 0x4247d
|
||||||
|
; Huh? @ stopped evolving!
|
||||||
|
text_jump UnknownText_0x1c4bc5
|
||||||
|
db "@"
|
||||||
|
; 0x42482
|
||||||
|
|
||||||
|
UnknownText_0x42482: ; 0x42482
|
||||||
|
; What? @ is evolving!
|
||||||
|
text_jump UnknownText_0x1c4be3
|
||||||
|
db "@"
|
||||||
|
; 0x42487
|
||||||
|
|
||||||
|
|
||||||
Function42487: ; 42487
|
Function42487: ; 42487
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
EvosAttacks:
|
||||||
|
|
||||||
BulbasaurEvosAttacks:
|
BulbasaurEvosAttacks:
|
||||||
db EVOLVE_LEVEL,16,IVYSAUR
|
db EVOLVE_LEVEL,16,IVYSAUR
|
||||||
db 0 ; no more evolutions
|
db 0 ; no more evolutions
|
||||||
|
Reference in New Issue
Block a user