You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
i have a clue what most of this does
This commit is contained in:
@@ -3363,6 +3363,7 @@ SPECIAL_MONCHECK EQU $0097
|
|||||||
|
|
||||||
|
|
||||||
; predefs
|
; predefs
|
||||||
|
PREDEF_FLAG EQU $03
|
||||||
PREDEF_FILLPP EQU $05
|
PREDEF_FILLPP EQU $05
|
||||||
PREDEF_ADDPARTYMON EQU $06
|
PREDEF_ADDPARTYMON EQU $06
|
||||||
PREDEF_FILLSTATS EQU $0C
|
PREDEF_FILLSTATS EQU $0C
|
||||||
|
111
main.asm
111
main.asm
@@ -3220,7 +3220,7 @@ GetName: ; 33c3
|
|||||||
|
|
||||||
ld a, [$cf60]
|
ld a, [$cf60]
|
||||||
ld [$d265], a
|
ld [$d265], a
|
||||||
call $343b
|
call GetPokemonName
|
||||||
ld hl, $000b
|
ld hl, $000b
|
||||||
add hl, de
|
add hl, de
|
||||||
ld e, l
|
ld e, l
|
||||||
@@ -7155,34 +7155,36 @@ LoadEnemyMon: ; 3e8eb
|
|||||||
ld a, [BaseExp]
|
ld a, [BaseExp]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
; copy TempEnemyMonSpecies to $d265
|
|
||||||
ld a, [TempEnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
ld [$d265], a
|
ld [$d265], a
|
||||||
; ????
|
|
||||||
call $343b
|
call GetPokemonName
|
||||||
; If wild, we're done
|
|
||||||
|
; Did we catch it?
|
||||||
ld a, [IsInBattle]
|
ld a, [IsInBattle]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
; Update enemy nick
|
; Update enemy nick
|
||||||
ld hl, StringBuffer1
|
ld hl, StringBuffer1
|
||||||
ld de, EnemyMonNick
|
ld de, EnemyMonNick
|
||||||
ld bc, PKMN_NAME_LENGTH
|
ld bc, PKMN_NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
; ????
|
|
||||||
|
; Caught this mon
|
||||||
ld a, [TempEnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
dec a
|
dec a
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, $01
|
ld b, 1 ; set
|
||||||
ld hl, $deb9
|
ld hl, PokedexCaught
|
||||||
ld a, $03 ; PREDEF_
|
ld a, PREDEF_FLAG
|
||||||
call Predef
|
call Predef
|
||||||
; Fill EnemyMon stats
|
|
||||||
ld hl, EnemyMonAtk
|
ld hl, EnemyMonStats
|
||||||
ld de, $c6c1
|
ld de, $c6c1
|
||||||
ld bc, 2*(NUM_STATS-1) ; 2 bytes for each non-HP stat
|
ld bc, EnemyMonStatsEnd - EnemyMonStats
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
; We're done
|
|
||||||
ret
|
ret
|
||||||
; 3eb38
|
; 3eb38
|
||||||
|
|
||||||
@@ -7430,85 +7432,104 @@ GetRoamMonDVs: ; 3fa19
|
|||||||
|
|
||||||
INCBIN "baserom.gbc", $3fa31, $3fc8b - $3fa31
|
INCBIN "baserom.gbc", $3fa31, $3fc8b - $3fa31
|
||||||
|
|
||||||
; I have no clue what most of this does
|
|
||||||
|
|
||||||
BattleStartMessage:
|
BattleStartMessage ; 3fc8b
|
||||||
ld a, [$d22d]
|
ld a, [IsInBattle]
|
||||||
dec a
|
dec a
|
||||||
jr z, .asm_3fcaa ; 0x3fc8f $19
|
jr z, .asm_3fcaa
|
||||||
ld de, $005e
|
|
||||||
call $3c23
|
ld de, $5e
|
||||||
|
call StartSFX
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld c, $14
|
|
||||||
call $0468
|
ld c, 20
|
||||||
|
call DelayFrames
|
||||||
|
|
||||||
ld a, $e
|
ld a, $e
|
||||||
ld hl, $5939
|
ld hl, $5939
|
||||||
rst FarCall
|
rst FarCall
|
||||||
ld hl, $47a9
|
|
||||||
jr .asm_3fd0e ; 0x3fca8 $64
|
ld hl, WantsToBattleText
|
||||||
|
jr .asm_3fd0e
|
||||||
|
|
||||||
.asm_3fcaa
|
.asm_3fcaa
|
||||||
call $5a79
|
call $5a79
|
||||||
jr nc, .asm_3fcc2 ; 0x3fcad $13
|
jr nc, .asm_3fcc2
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [$cfca], a
|
ld [$cfca], a
|
||||||
ld a, $1
|
ld a, 1
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
ld a, $1
|
ld a, 1
|
||||||
ld [$c689], a
|
ld [$c689], a
|
||||||
ld de, $0101
|
ld de, $0101
|
||||||
call $6e17
|
call $6e17
|
||||||
|
|
||||||
.asm_3fcc2
|
.asm_3fcc2
|
||||||
ld a, $f
|
ld a, $f
|
||||||
ld hl, $6b38
|
ld hl, $6b38
|
||||||
rst FarCall
|
rst FarCall
|
||||||
jr c, .messageSelection ; 0x3fcc8 $21
|
jr c, .asm_3fceb
|
||||||
|
|
||||||
ld a, $13
|
ld a, $13
|
||||||
ld hl, $6a44
|
ld hl, $6a44
|
||||||
rst FarCall
|
rst FarCall
|
||||||
jr c, .asm_3fce0 ; 0x3fcd0 $e
|
jr c, .asm_3fce0
|
||||||
ld hl, $c4ac
|
|
||||||
|
hlcoord 12, 0
|
||||||
ld d, $0
|
ld d, $0
|
||||||
ld e, $1
|
ld e, $1
|
||||||
ld a, $47
|
ld a, $47
|
||||||
call $2d83
|
call Predef
|
||||||
jr .messageSelection ; 0x3fcde $b
|
jr .asm_3fceb
|
||||||
|
|
||||||
.asm_3fce0
|
.asm_3fce0
|
||||||
ld a, $f
|
ld a, $0f
|
||||||
ld [$c2bd], a
|
ld [CryTracks], a
|
||||||
ld a, [$d204]
|
ld a, [TempEnemyMonSpecies]
|
||||||
call $37b6
|
call $37b6
|
||||||
.messageSelection
|
|
||||||
ld a, [$d230]
|
.asm_3fceb
|
||||||
cp $4
|
ld a, [BattleType]
|
||||||
jr nz, .asm_3fcfd ; 0x3fcf0 $b
|
cp BATTLETYPE_FISH
|
||||||
|
jr nz, .asm_3fcfd
|
||||||
|
|
||||||
ld a, $41
|
ld a, $41
|
||||||
ld hl, $6086
|
ld hl, $6086
|
||||||
rst FarCall
|
rst FarCall
|
||||||
|
|
||||||
ld hl, HookedPokemonAttackedText
|
ld hl, HookedPokemonAttackedText
|
||||||
jr .asm_3fd0e ; 0x3fcfb $11
|
jr .asm_3fd0e
|
||||||
|
|
||||||
.asm_3fcfd
|
.asm_3fcfd
|
||||||
ld hl, PokemonFellFromTreeText
|
ld hl, PokemonFellFromTreeText
|
||||||
cp $8
|
cp BATTLETYPE_TREE
|
||||||
jr z, .asm_3fd0e ; 0x3fd02 $a
|
jr z, .asm_3fd0e
|
||||||
ld hl, WildPokemonAppearedText2
|
ld hl, WildPokemonAppearedText2
|
||||||
cp $b
|
cp $b
|
||||||
jr z, .asm_3fd0e ; 0x3fd09 $3
|
jr z, .asm_3fd0e
|
||||||
ld hl, WildPokemonAppearedText
|
ld hl, WildPokemonAppearedText
|
||||||
|
|
||||||
.asm_3fd0e
|
.asm_3fd0e
|
||||||
push hl
|
push hl
|
||||||
ld a, $b
|
ld a, $b
|
||||||
ld hl, $4000
|
ld hl, $4000
|
||||||
rst FarCall
|
rst FarCall
|
||||||
|
|
||||||
pop hl
|
pop hl
|
||||||
call $3ad5
|
call FarBattleTextBox
|
||||||
|
|
||||||
call $7830
|
call $7830
|
||||||
|
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld c, $2
|
ld c, $2
|
||||||
ld a, $13
|
ld a, $13
|
||||||
ld hl, $6a0a
|
ld hl, $6a0a
|
||||||
rst FarCall
|
rst FarCall
|
||||||
|
|
||||||
ret
|
ret
|
||||||
; 0x3fd26
|
; 3fd26
|
||||||
|
|
||||||
|
|
||||||
dw $0000 ; padding
|
dw $0000 ; padding
|
||||||
@@ -9359,7 +9380,7 @@ WildPokemonAppearedText2: ; 0x80793
|
|||||||
db "appeared!", $58
|
db "appeared!", $58
|
||||||
; 0x807a9
|
; 0x807a9
|
||||||
|
|
||||||
BattleText_0x807a9: ; 0x807a9
|
WantsToBattleText: ; 0x807a9
|
||||||
db $0, $3f, $4f
|
db $0, $3f, $4f
|
||||||
db "wants to battle!", $58
|
db "wants to battle!", $58
|
||||||
; 0x807bd
|
; 0x807bd
|
||||||
|
2
wram.asm
2
wram.asm
@@ -1104,6 +1104,7 @@ EnemyMonMaxHPHi: ; d218
|
|||||||
EnemyMonMaxHPLo: ; d219
|
EnemyMonMaxHPLo: ; d219
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
|
EnemyMonStats:
|
||||||
EnemyMonAtk: ; d21a
|
EnemyMonAtk: ; d21a
|
||||||
ds 2
|
ds 2
|
||||||
EnemyMonDef: ; d21c
|
EnemyMonDef: ; d21c
|
||||||
@@ -1114,6 +1115,7 @@ EnemyMonSpclAtk: ; d220
|
|||||||
ds 2
|
ds 2
|
||||||
EnemyMonSpclDef: ; d222
|
EnemyMonSpclDef: ; d222
|
||||||
ds 2
|
ds 2
|
||||||
|
EnemyMonStatsEnd
|
||||||
|
|
||||||
EnemyMonType1: ; d224
|
EnemyMonType1: ; d224
|
||||||
ds 1
|
ds 1
|
||||||
|
Reference in New Issue
Block a user