Wild Pokemon functions and data

Replaced encounter rates with percent values
Added new constants denoting the number of wild Pokemon in the grass and water wild constructs
Annotated and relabeled the encounter generating functions
Renamed a WRAM address associaed with the temporary storage of the wild Pokemon's species
Moved spawn constants to constants/map_constants.asm for use anywhere in the disassembly
This commit is contained in:
PikalaxALT 2015-07-23 03:41:52 -04:00
parent 4c480a23dc
commit 185b0a1c86
20 changed files with 2839 additions and 2787 deletions

View File

@ -8441,7 +8441,7 @@ Function3f54e: ; 3f54e
ld a, [OtherTrainerClass]
and a
jr nz, .asm_3f55a
ld a, [wd22e]
ld a, [TempWildMonSpecies]
ld [CurPartySpecies], a
.asm_3f55a
@ -8658,7 +8658,7 @@ Function3f6d0: ; 3f6d0
ld [IsInBattle], a
ld [BattleType], a
ld [AttackMissed], a
ld [wd22e], a
ld [TempWildMonSpecies], a
ld [OtherTrainerClass], a
ld [wd266], a
ld [wd267], a

View File

@ -753,3 +753,41 @@ OW_RIGHT EQU $c
const SIGNPOST_IFNOTSET
const SIGNPOST_ITEM
const SIGNPOST_COPY
; I'm relocating spawn constants here, so that they can be used anywhere in the disassembly.
const_value = -1
const SPAWN_N_A
const SPAWN_HOME
const SPAWN_DEBUG
const SPAWN_PALLET
const SPAWN_VIRIDIAN
const SPAWN_PEWTER
const SPAWN_CERULEAN
const SPAWN_ROCK_TUNNEL
const SPAWN_VERMILION
const SPAWN_LAVENDER
const SPAWN_SAFFRON
const SPAWN_CELADON
const SPAWN_FUCHSIA
const SPAWN_CINNABAR
const SPAWN_INDIGO
const SPAWN_NEW_BARK
const SPAWN_CHERRYGROVE
const SPAWN_VIOLET
const SPAWN_UNION_CAVE
const SPAWN_AZALEA
const SPAWN_CIANWOOD
const SPAWN_GOLDENROD
const SPAWN_OLIVINE
const SPAWN_ECRUTEAK
const SPAWN_MAHOGANY
const SPAWN_LAKE
const SPAWN_BLACKTHORN
const SPAWN_MT_SILVER
const SPAWN_FAST_SHIP
NUM_SPAWNS EQU const_value

View File

@ -93,3 +93,9 @@ const_value SET 1
const ATK_GT_DEF
const ATK_LT_DEF
const ATK_EQ_DEF
NUM_GRASSMON EQU 7
NUM_WATERMON EQU 3
GRASS_WILDDATA_LENGTH EQU (NUM_GRASSMON * 2 + 1) * 3 + 2
WATER_WILDDATA_LENGTH EQU (NUM_WATERMON * 2 + 1) * 1 + 2

View File

@ -233,193 +233,193 @@ FishGroup1:
FishGroup1_Old: ; 924e3
db $b3, MAGIKARP, 10
db $d9, MAGIKARP, 10
db $ff, KRABBY, 10
db -1, KRABBY, 10
FishGroup1_Good: ; 924ec
db $59, MAGIKARP, 20
db $b2, KRABBY, 20
db $e6, KRABBY, 20
db $ff, $0, 0
db -1, $0, 0
FishGroup1_Super: ; 924f8
db $66, KRABBY, 40
db $b2, $0, 1
db $e6, KRABBY, 40
db $ff, KINGLER, 40
db -1, KINGLER, 40
FishGroup2:
FishGroup2_Old: ; 92504
db $b3, MAGIKARP, 10
db $d9, MAGIKARP, 10
db $ff, TENTACOOL, 10
db -1, TENTACOOL, 10
FishGroup2_Good: ; 9250d
db $59, MAGIKARP, 20
db $b2, TENTACOOL, 20
db $e6, CHINCHOU, 20
db $ff, $0, 2
db -1, $0, 2
FishGroup2_Super: ; 92519
db $66, CHINCHOU, 40
db $b2, $0, 3
db $e6, TENTACRUEL, 40
db $ff, LANTURN, 40
db -1, LANTURN, 40
FishGroup3:
FishGroup3_Old: ; 92525
db $b3, MAGIKARP, 10
db $d9, MAGIKARP, 10
db $ff, GOLDEEN, 10
db -1, GOLDEEN, 10
FishGroup3_Good: ; 9252e
db $59, MAGIKARP, 20
db $b2, GOLDEEN, 20
db $e6, GOLDEEN, 20
db $ff, $0, 4
db -1, $0, 4
FishGroup3_Super: ; 9253a
db $66, GOLDEEN, 40
db $b2, $0, 5
db $e6, MAGIKARP, 40
db $ff, SEAKING, 40
db -1, SEAKING, 40
FishGroup4:
FishGroup4_Old: ; 92546
db $b3, MAGIKARP, 10
db $d9, MAGIKARP, 10
db $ff, POLIWAG, 10
db -1, POLIWAG, 10
FishGroup4_Good: ; 9254f
db $59, MAGIKARP, 20
db $b2, POLIWAG, 20
db $e6, POLIWAG, 20
db $ff, $0, 6
db -1, $0, 6
FishGroup4_Super: ; 9255b
db $66, POLIWAG, 40
db $b2, $0, 7
db $e6, MAGIKARP, 40
db $ff, POLIWAG, 40
db -1, POLIWAG, 40
FishGroup5:
FishGroup5_Old: ; 92567
db $b3, MAGIKARP, 10
db $d9, MAGIKARP, 10
db $ff, MAGIKARP, 10
db -1, MAGIKARP, 10
FishGroup5_Good: ; 92570
db $59, MAGIKARP, 20
db $b2, MAGIKARP, 20
db $e6, MAGIKARP, 20
db $ff, $0, 8
db -1, $0, 8
FishGroup5_Super: ; 9257c
db $66, MAGIKARP, 40
db $b2, $0, 9
db $e6, MAGIKARP, 40
db $ff, DRAGONAIR, 40
db -1, DRAGONAIR, 40
FishGroup6:
FishGroup6_Old: ; 92588
db $b3, MAGIKARP, 5
db $d9, MAGIKARP, 5
db $ff, QWILFISH, 5
db -1, QWILFISH, 5
FishGroup6_Good: ; 92591
db $59, MAGIKARP, 20
db $b2, QWILFISH, 20
db $e6, QWILFISH, 20
db $ff, $0, 10
db -1, $0, 10
FishGroup6_Super: ; 9259d
db $66, QWILFISH, 40
db $b2, $0, 11
db $e6, QWILFISH, 40
db $ff, QWILFISH, 40
db -1, QWILFISH, 40
FishGroup7:
FishGroup7_Old: ; 925a9
db $b3, MAGIKARP, 10
db $d9, MAGIKARP, 10
db $ff, REMORAID, 10
db -1, REMORAID, 10
FishGroup7_Good: ; 925b2
db $59, MAGIKARP, 20
db $b2, REMORAID, 20
db $e6, REMORAID, 20
db $ff, $0, 12
db -1, $0, 12
FishGroup7_Super: ; 925be
db $66, REMORAID, 40
db $b2, $0, 13
db $e6, REMORAID, 40
db $ff, REMORAID, 40
db -1, REMORAID, 40
FishGroup8:
FishGroup8_Old: ; 925ca
db $b3, MAGIKARP, 10
db $d9, MAGIKARP, 10
db $ff, MAGIKARP, 10
db -1, MAGIKARP, 10
FishGroup8_Good: ; 925d3
db $59, MAGIKARP, 20
db $b2, MAGIKARP, 20
db $e6, MAGIKARP, 20
db $ff, $0, 14
db -1, $0, 14
FishGroup8_Super: ; 925df
db $66, MAGIKARP, 40
db $b2, $0, 15
db $e6, MAGIKARP, 40
db $ff, MAGIKARP, 40
db -1, MAGIKARP, 40
FishGroup9:
FishGroup9_Old: ; 925eb
db $b3, MAGIKARP, 10
db $d9, MAGIKARP, 10
db $ff, MAGIKARP, 10
db -1, MAGIKARP, 10
FishGroup9_Good: ; 925f4
db $59, MAGIKARP, 10
db $b2, MAGIKARP, 10
db $e6, MAGIKARP, 10
db $ff, $0, 16
db -1, $0, 16
FishGroup9_Super: ; 92600
db $66, MAGIKARP, 10
db $b2, $0, 17
db $e6, MAGIKARP, 10
db $ff, DRAGONAIR, 10
db -1, DRAGONAIR, 10
FishGroup10:
FishGroup10_Old: ; 9260c
db $b3, MAGIKARP, 10
db $d9, MAGIKARP, 10
db $ff, KRABBY, 10
db -1, KRABBY, 10
FishGroup10_Good: ; 92615
db $59, MAGIKARP, 20
db $b2, KRABBY, 20
db $e6, KRABBY, 20
db $ff, $0, 18
db -1, $0, 18
FishGroup10_Super: ; 92621
db $66, KRABBY, 40
db $b2, $0, 19
db $e6, KINGLER, 40
db $ff, SEADRA, 40
db -1, SEADRA, 40
FishGroup11:
FishGroup11_Old: ; 9262d
db $b3, MAGIKARP, 10
db $d9, MAGIKARP, 10
db $ff, TENTACOOL, 10
db -1, TENTACOOL, 10
FishGroup11_Good: ; 92636
db $59, MAGIKARP, 20
db $b2, TENTACOOL, 20
db $e6, TENTACOOL, 20
db $ff, $0, 20
db -1, $0, 20
FishGroup11_Super: ; 92642
db $66, TENTACOOL, 40
db $b2, $0, 21
db $e6, MAGIKARP, 40
db $ff, QWILFISH, 40
db -1, QWILFISH, 40
FishGroup12:
FishGroup12_Old: ; 9264e
db $b3, MAGIKARP, 10
db $d9, MAGIKARP, 10
db $ff, POLIWAG, 10
db -1, POLIWAG, 10
FishGroup12_Good: ; 92657
db $59, MAGIKARP, 20
db $b2, POLIWAG, 20
db $e6, POLIWAG, 20
db $ff, $0, 6
db -1, $0, 6
FishGroup12_Super: ; 92663
db $66, POLIWAG, 40
db $b2, $0, 7
db $e6, MAGIKARP, 40
db $ff, REMORAID, 40
db -1, REMORAID, 40
; 9266f

File diff suppressed because it is too large Load Diff

View File

@ -1,231 +1,231 @@
; Johto Pokémon in water
db GROUP_RUINS_OF_ALPH_OUTSIDE, MAP_RUINS_OF_ALPH_OUTSIDE
db $05 ; encounter rate
db 15,WOOPER
db 20,QUAGSIRE
db 15,QUAGSIRE
map RUINS_OF_ALPH_OUTSIDE
db 2 percent ; encounter rate
db 15, WOOPER
db 20, QUAGSIRE
db 15, QUAGSIRE
db GROUP_UNION_CAVE_1F, MAP_UNION_CAVE_1F
db $05 ; encounter rate
db 15,WOOPER
db 20,QUAGSIRE
db 15,QUAGSIRE
map UNION_CAVE_1F
db 2 percent ; encounter rate
db 15, WOOPER
db 20, QUAGSIRE
db 15, QUAGSIRE
db GROUP_UNION_CAVE_B1F, MAP_UNION_CAVE_B1F
db $05 ; encounter rate
db 15,WOOPER
db 20,QUAGSIRE
db 15,QUAGSIRE
map UNION_CAVE_B1F
db 2 percent ; encounter rate
db 15, WOOPER
db 20, QUAGSIRE
db 15, QUAGSIRE
db GROUP_UNION_CAVE_B2F, MAP_UNION_CAVE_B2F
db $0a ; encounter rate
db 15,TENTACOOL
db 20,QUAGSIRE
db 20,TENTACRUEL
map UNION_CAVE_B2F
db 4 percent ; encounter rate
db 15, TENTACOOL
db 20, QUAGSIRE
db 20, TENTACRUEL
db GROUP_SLOWPOKE_WELL_B1F, MAP_SLOWPOKE_WELL_B1F
db $05 ; encounter rate
db 15,SLOWPOKE
db 20,SLOWPOKE
db 10,SLOWPOKE
map SLOWPOKE_WELL_B1F
db 2 percent ; encounter rate
db 15, SLOWPOKE
db 20, SLOWPOKE
db 10, SLOWPOKE
db GROUP_SLOWPOKE_WELL_B2F, MAP_SLOWPOKE_WELL_B2F
db $05 ; encounter rate
db 15,SLOWPOKE
db 20,SLOWPOKE
db 20,SLOWBRO
map SLOWPOKE_WELL_B2F
db 2 percent ; encounter rate
db 15, SLOWPOKE
db 20, SLOWPOKE
db 20, SLOWBRO
db GROUP_ILEX_FOREST, MAP_ILEX_FOREST
db $05 ; encounter rate
db 15,PSYDUCK
db 10,PSYDUCK
db 15,GOLDUCK
map ILEX_FOREST
db 2 percent ; encounter rate
db 15, PSYDUCK
db 10, PSYDUCK
db 15, GOLDUCK
db GROUP_MOUNT_MORTAR_1F_OUTSIDE, MAP_MOUNT_MORTAR_1F_OUTSIDE
db $0a ; encounter rate
db 15,GOLDEEN
db 20,MARILL
db 20,SEAKING
map MOUNT_MORTAR_1F_OUTSIDE
db 4 percent ; encounter rate
db 15, GOLDEEN
db 20, MARILL
db 20, SEAKING
db GROUP_MOUNT_MORTAR_2F_INSIDE, MAP_MOUNT_MORTAR_2F_INSIDE
db $05 ; encounter rate
db 20,GOLDEEN
db 25,MARILL
db 25,SEAKING
map MOUNT_MORTAR_2F_INSIDE
db 2 percent ; encounter rate
db 20, GOLDEEN
db 25, MARILL
db 25, SEAKING
db GROUP_MOUNT_MORTAR_B1F, MAP_MOUNT_MORTAR_B1F
db $05 ; encounter rate
db 15,GOLDEEN
db 20,MARILL
db 20,SEAKING
map MOUNT_MORTAR_B1F
db 2 percent ; encounter rate
db 15, GOLDEEN
db 20, MARILL
db 20, SEAKING
db GROUP_WHIRL_ISLAND_SW, MAP_WHIRL_ISLAND_SW
db $0a ; encounter rate
db 20,TENTACOOL
db 15,HORSEA
db 20,TENTACRUEL
map WHIRL_ISLAND_SW
db 4 percent ; encounter rate
db 20, TENTACOOL
db 15, HORSEA
db 20, TENTACRUEL
db GROUP_WHIRL_ISLAND_B2F, MAP_WHIRL_ISLAND_B2F
db $0a ; encounter rate
db 15,HORSEA
db 20,HORSEA
db 20,TENTACRUEL
map WHIRL_ISLAND_B2F
db 4 percent ; encounter rate
db 15, HORSEA
db 20, HORSEA
db 20, TENTACRUEL
db GROUP_WHIRL_ISLAND_LUGIA_CHAMBER, MAP_WHIRL_ISLAND_LUGIA_CHAMBER
db $0a ; encounter rate
db 20,HORSEA
db 20,TENTACRUEL
db 20,SEADRA
map WHIRL_ISLAND_LUGIA_CHAMBER
db 4 percent ; encounter rate
db 20, HORSEA
db 20, TENTACRUEL
db 20, SEADRA
db GROUP_SILVER_CAVE_ROOM_2, MAP_SILVER_CAVE_ROOM_2
db $05 ; encounter rate
db 35,SEAKING
db 35,GOLDUCK
db 35,GOLDEEN
map SILVER_CAVE_ROOM_2
db 2 percent ; encounter rate
db 35, SEAKING
db 35, GOLDUCK
db 35, GOLDEEN
db GROUP_DARK_CAVE_VIOLET_ENTRANCE, MAP_DARK_CAVE_VIOLET_ENTRANCE
db $05 ; encounter rate
db 15,MAGIKARP
db 10,MAGIKARP
db 5,MAGIKARP
map DARK_CAVE_VIOLET_ENTRANCE
db 2 percent ; encounter rate
db 15, MAGIKARP
db 10, MAGIKARP
db 5, MAGIKARP
db GROUP_DARK_CAVE_BLACKTHORN_ENTRANCE, MAP_DARK_CAVE_BLACKTHORN_ENTRANCE
db $05 ; encounter rate
db 15,MAGIKARP
db 10,MAGIKARP
db 5,MAGIKARP
map DARK_CAVE_BLACKTHORN_ENTRANCE
db 2 percent ; encounter rate
db 15, MAGIKARP
db 10, MAGIKARP
db 5, MAGIKARP
db GROUP_DRAGONS_DEN_B1F, MAP_DRAGONS_DEN_B1F
db $0a ; encounter rate
db 15,MAGIKARP
db 10,MAGIKARP
db 10,DRATINI
map DRAGONS_DEN_B1F
db 4 percent ; encounter rate
db 15, MAGIKARP
db 10, MAGIKARP
db 10, DRATINI
db GROUP_OLIVINE_PORT, MAP_OLIVINE_PORT
db $05 ; encounter rate
db 20,TENTACOOL
db 15,TENTACOOL
db 20,TENTACRUEL
map OLIVINE_PORT
db 2 percent ; encounter rate
db 20, TENTACOOL
db 15, TENTACOOL
db 20, TENTACRUEL
db GROUP_ROUTE_30, MAP_ROUTE_30
db $05 ; encounter rate
db 20,POLIWAG
db 15,POLIWAG
db 20,POLIWHIRL
map ROUTE_30
db 2 percent ; encounter rate
db 20, POLIWAG
db 15, POLIWAG
db 20, POLIWHIRL
db GROUP_ROUTE_31, MAP_ROUTE_31
db $05 ; encounter rate
db 20,POLIWAG
db 15,POLIWAG
db 20,POLIWHIRL
map ROUTE_31
db 2 percent ; encounter rate
db 20, POLIWAG
db 15, POLIWAG
db 20, POLIWHIRL
db GROUP_ROUTE_32, MAP_ROUTE_32
db $0f ; encounter rate
db 15,TENTACOOL
db 20,QUAGSIRE
db 20,TENTACRUEL
map ROUTE_32
db 6 percent ; encounter rate
db 15, TENTACOOL
db 20, QUAGSIRE
db 20, TENTACRUEL
db GROUP_ROUTE_34, MAP_ROUTE_34
db $0f ; encounter rate
db 20,TENTACOOL
db 15,TENTACOOL
db 20,TENTACRUEL
map ROUTE_34
db 6 percent ; encounter rate
db 20, TENTACOOL
db 15, TENTACOOL
db 20, TENTACRUEL
db GROUP_ROUTE_35, MAP_ROUTE_35
db $0a ; encounter rate
db 20,PSYDUCK
db 15,PSYDUCK
db 20,GOLDUCK
map ROUTE_35
db 4 percent ; encounter rate
db 20, PSYDUCK
db 15, PSYDUCK
db 20, GOLDUCK
db GROUP_ROUTE_40, MAP_ROUTE_40
db $0f ; encounter rate
db 20,TENTACOOL
db 15,TENTACOOL
db 20,TENTACRUEL
map ROUTE_40
db 6 percent ; encounter rate
db 20, TENTACOOL
db 15, TENTACOOL
db 20, TENTACRUEL
db GROUP_ROUTE_41, MAP_ROUTE_41
db $0f ; encounter rate
db 20,TENTACOOL
db 20,TENTACRUEL
db 20,MANTINE
map ROUTE_41
db 6 percent ; encounter rate
db 20, TENTACOOL
db 20, TENTACRUEL
db 20, MANTINE
db GROUP_ROUTE_42, MAP_ROUTE_42
db $0a ; encounter rate
db 20,GOLDEEN
db 15,GOLDEEN
db 20,SEAKING
map ROUTE_42
db 4 percent ; encounter rate
db 20, GOLDEEN
db 15, GOLDEEN
db 20, SEAKING
db GROUP_ROUTE_43, MAP_ROUTE_43
db $05 ; encounter rate
db 20,MAGIKARP
db 15,MAGIKARP
db 10,MAGIKARP
map ROUTE_43
db 2 percent ; encounter rate
db 20, MAGIKARP
db 15, MAGIKARP
db 10, MAGIKARP
db GROUP_ROUTE_44, MAP_ROUTE_44
db $05 ; encounter rate
db 25,POLIWAG
db 20,POLIWAG
db 25,POLIWHIRL
map ROUTE_44
db 2 percent ; encounter rate
db 25, POLIWAG
db 20, POLIWAG
db 25, POLIWHIRL
db GROUP_ROUTE_45, MAP_ROUTE_45
db $05 ; encounter rate
db 20,MAGIKARP
db 15,MAGIKARP
db 5,MAGIKARP
map ROUTE_45
db 2 percent ; encounter rate
db 20, MAGIKARP
db 15, MAGIKARP
db 5, MAGIKARP
db GROUP_NEW_BARK_TOWN, MAP_NEW_BARK_TOWN
db $0f ; encounter rate
db 20,TENTACOOL
db 15,TENTACOOL
db 20,TENTACRUEL
map NEW_BARK_TOWN
db 6 percent ; encounter rate
db 20, TENTACOOL
db 15, TENTACOOL
db 20, TENTACRUEL
db GROUP_CHERRYGROVE_CITY, MAP_CHERRYGROVE_CITY
db $0f ; encounter rate
db 20,TENTACOOL
db 15,TENTACOOL
db 20,TENTACRUEL
map CHERRYGROVE_CITY
db 6 percent ; encounter rate
db 20, TENTACOOL
db 15, TENTACOOL
db 20, TENTACRUEL
db GROUP_VIOLET_CITY, MAP_VIOLET_CITY
db $05 ; encounter rate
db 20,POLIWAG
db 15,POLIWAG
db 20,POLIWHIRL
map VIOLET_CITY
db 2 percent ; encounter rate
db 20, POLIWAG
db 15, POLIWAG
db 20, POLIWHIRL
db GROUP_CIANWOOD_CITY, MAP_CIANWOOD_CITY
db $0f ; encounter rate
db 20,TENTACOOL
db 15,TENTACOOL
db 20,TENTACRUEL
map CIANWOOD_CITY
db 6 percent ; encounter rate
db 20, TENTACOOL
db 15, TENTACOOL
db 20, TENTACRUEL
db GROUP_OLIVINE_CITY, MAP_OLIVINE_CITY
db $0f ; encounter rate
db 20,TENTACOOL
db 15,TENTACOOL
db 20,TENTACRUEL
map OLIVINE_CITY
db 6 percent ; encounter rate
db 20, TENTACOOL
db 15, TENTACOOL
db 20, TENTACRUEL
db GROUP_ECRUTEAK_CITY, MAP_ECRUTEAK_CITY
db $05 ; encounter rate
db 20,POLIWAG
db 15,POLIWAG
db 20,POLIWHIRL
map ECRUTEAK_CITY
db 2 percent ; encounter rate
db 20, POLIWAG
db 15, POLIWAG
db 20, POLIWHIRL
db GROUP_LAKE_OF_RAGE, MAP_LAKE_OF_RAGE
db $0f ; encounter rate
db 15,MAGIKARP
db 10,MAGIKARP
db 15,GYARADOS
map LAKE_OF_RAGE
db 6 percent ; encounter rate
db 15, MAGIKARP
db 10, MAGIKARP
db 15, GYARADOS
db GROUP_BLACKTHORN_CITY, MAP_BLACKTHORN_CITY
db $0a ; encounter rate
db 15,MAGIKARP
db 10,MAGIKARP
db 5,MAGIKARP
map BLACKTHORN_CITY
db 4 percent ; encounter rate
db 15, MAGIKARP
db 10, MAGIKARP
db 5, MAGIKARP
db GROUP_SILVER_CAVE_OUTSIDE, MAP_SILVER_CAVE_OUTSIDE
db $05 ; encounter rate
db 35,POLIWHIRL
db 40,POLIWHIRL
db 35,POLIWAG
map SILVER_CAVE_OUTSIDE
db 2 percent ; encounter rate
db 35, POLIWHIRL
db 40, POLIWHIRL
db 35, POLIWAG
db $ff ; end
db -1 ; end

File diff suppressed because it is too large Load Diff

View File

@ -1,147 +1,147 @@
; Kanto Pokémon in water
db GROUP_TOHJO_FALLS, MAP_TOHJO_FALLS
db $0a ; encounter rate
db 20,GOLDEEN
db 20,SLOWPOKE
db 20,SEAKING
map TOHJO_FALLS
db 4 percent ; encounter rate
db 20, GOLDEEN
db 20, SLOWPOKE
db 20, SEAKING
db GROUP_VERMILION_PORT, MAP_VERMILION_PORT
db $05 ; encounter rate
db 35,TENTACOOL
db 30,TENTACOOL
db 35,TENTACRUEL
map VERMILION_PORT
db 2 percent ; encounter rate
db 35, TENTACOOL
db 30, TENTACOOL
db 35, TENTACRUEL
db GROUP_ROUTE_4, MAP_ROUTE_4
db $0a ; encounter rate
db 10,GOLDEEN
db 5,GOLDEEN
db 10,SEAKING
map ROUTE_4
db 4 percent ; encounter rate
db 10, GOLDEEN
db 5, GOLDEEN
db 10, SEAKING
db GROUP_ROUTE_6, MAP_ROUTE_6
db $05 ; encounter rate
db 10,PSYDUCK
db 5,PSYDUCK
db 10,GOLDUCK
map ROUTE_6
db 2 percent ; encounter rate
db 10, PSYDUCK
db 5, PSYDUCK
db 10, GOLDUCK
db GROUP_ROUTE_9, MAP_ROUTE_9
db $0a ; encounter rate
db 15,GOLDEEN
db 10,GOLDEEN
db 15,SEAKING
map ROUTE_9
db 4 percent ; encounter rate
db 15, GOLDEEN
db 10, GOLDEEN
db 15, SEAKING
db GROUP_ROUTE_10_NORTH, MAP_ROUTE_10_NORTH
db $0a ; encounter rate
db 15,GOLDEEN
db 10,GOLDEEN
db 15,SEAKING
map ROUTE_10_NORTH
db 4 percent ; encounter rate
db 15, GOLDEEN
db 10, GOLDEEN
db 15, SEAKING
db GROUP_ROUTE_12, MAP_ROUTE_12
db $0f ; encounter rate
db 25,TENTACOOL
db 25,QUAGSIRE
db 25,TENTACRUEL
map ROUTE_12
db 6 percent ; encounter rate
db 25, TENTACOOL
db 25, QUAGSIRE
db 25, TENTACRUEL
db GROUP_ROUTE_13, MAP_ROUTE_13
db $0f ; encounter rate
db 25,TENTACOOL
db 25,QUAGSIRE
db 25,TENTACRUEL
map ROUTE_13
db 6 percent ; encounter rate
db 25, TENTACOOL
db 25, QUAGSIRE
db 25, TENTACRUEL
db GROUP_ROUTE_19, MAP_ROUTE_19
db $0f ; encounter rate
db 35,TENTACOOL
db 30,TENTACOOL
db 35,TENTACRUEL
map ROUTE_19
db 6 percent ; encounter rate
db 35, TENTACOOL
db 30, TENTACOOL
db 35, TENTACRUEL
db GROUP_ROUTE_20, MAP_ROUTE_20
db $0f ; encounter rate
db 35,TENTACOOL
db 30,TENTACOOL
db 35,TENTACRUEL
map ROUTE_20
db 6 percent ; encounter rate
db 35, TENTACOOL
db 30, TENTACOOL
db 35, TENTACRUEL
db GROUP_ROUTE_21, MAP_ROUTE_21
db $0f ; encounter rate
db 35,TENTACOOL
db 30,TENTACOOL
db 35,TENTACRUEL
map ROUTE_21
db 6 percent ; encounter rate
db 35, TENTACOOL
db 30, TENTACOOL
db 35, TENTACRUEL
db GROUP_ROUTE_22, MAP_ROUTE_22
db $05 ; encounter rate
db 10,POLIWAG
db 5,POLIWAG
db 10,POLIWHIRL
map ROUTE_22
db 2 percent ; encounter rate
db 10, POLIWAG
db 5, POLIWAG
db 10, POLIWHIRL
db GROUP_ROUTE_24, MAP_ROUTE_24
db $0a ; encounter rate
db 10,GOLDEEN
db 5,GOLDEEN
db 10,SEAKING
map ROUTE_24
db 4 percent ; encounter rate
db 10, GOLDEEN
db 5, GOLDEEN
db 10, SEAKING
db GROUP_ROUTE_25, MAP_ROUTE_25
db $0a ; encounter rate
db 10,GOLDEEN
db 5,GOLDEEN
db 10,SEAKING
map ROUTE_25
db 4 percent ; encounter rate
db 10, GOLDEEN
db 5, GOLDEEN
db 10, SEAKING
db GROUP_ROUTE_26, MAP_ROUTE_26
db $0f ; encounter rate
db 30,TENTACOOL
db 25,TENTACOOL
db 30,TENTACRUEL
map ROUTE_26
db 6 percent ; encounter rate
db 30, TENTACOOL
db 25, TENTACOOL
db 30, TENTACRUEL
db GROUP_ROUTE_27, MAP_ROUTE_27
db $0f ; encounter rate
db 20,TENTACOOL
db 15,TENTACOOL
db 20,TENTACRUEL
map ROUTE_27
db 6 percent ; encounter rate
db 20, TENTACOOL
db 15, TENTACOOL
db 20, TENTACRUEL
db GROUP_ROUTE_28, MAP_ROUTE_28
db $05 ; encounter rate
db 40,POLIWAG
db 35,POLIWAG
db 40,POLIWHIRL
map ROUTE_28
db 2 percent ; encounter rate
db 40, POLIWAG
db 35, POLIWAG
db 40, POLIWHIRL
db GROUP_PALLET_TOWN, MAP_PALLET_TOWN
db $0f ; encounter rate
db 35,TENTACOOL
db 30,TENTACOOL
db 35,TENTACRUEL
map PALLET_TOWN
db 6 percent ; encounter rate
db 35, TENTACOOL
db 30, TENTACOOL
db 35, TENTACRUEL
db GROUP_VIRIDIAN_CITY, MAP_VIRIDIAN_CITY
db $05 ; encounter rate
db 10,POLIWAG
db 5,POLIWAG
db 10,POLIWHIRL
map VIRIDIAN_CITY
db 2 percent ; encounter rate
db 10, POLIWAG
db 5, POLIWAG
db 10, POLIWHIRL
db GROUP_CERULEAN_CITY, MAP_CERULEAN_CITY
db $0a ; encounter rate
db 10,GOLDEEN
db 5,GOLDEEN
db 10,SEAKING
map CERULEAN_CITY
db 4 percent ; encounter rate
db 10, GOLDEEN
db 5, GOLDEEN
db 10, SEAKING
db GROUP_VERMILION_CITY, MAP_VERMILION_CITY
db $0f ; encounter rate
db 35,TENTACOOL
db 30,TENTACOOL
db 35,TENTACRUEL
map VERMILION_CITY
db 6 percent ; encounter rate
db 35, TENTACOOL
db 30, TENTACOOL
db 35, TENTACRUEL
db GROUP_CELADON_CITY, MAP_CELADON_CITY
db $05 ; encounter rate
db 20,GRIMER
db 15,GRIMER
db 15,MUK
map CELADON_CITY
db 2 percent ; encounter rate
db 20, GRIMER
db 15, GRIMER
db 15, MUK
db GROUP_FUCHSIA_CITY, MAP_FUCHSIA_CITY
db $05 ; encounter rate
db 20,MAGIKARP
db 15,MAGIKARP
db 10,MAGIKARP
map FUCHSIA_CITY
db 2 percent ; encounter rate
db 20, MAGIKARP
db 15, MAGIKARP
db 10, MAGIKARP
db GROUP_CINNABAR_ISLAND, MAP_CINNABAR_ISLAND
db $0f ; encounter rate
db 35,TENTACOOL
db 30,TENTACOOL
db 35,TENTACRUEL
map CINNABAR_ISLAND
db 6 percent ; encounter rate
db 35, TENTACOOL
db 30, TENTACOOL
db 35, TENTACRUEL
db $ff ; end
db -1 ; end

View File

@ -1,59 +1,59 @@
; swarms in grass
; Dunsparce swarm
db GROUP_DARK_CAVE_VIOLET_ENTRANCE, MAP_DARK_CAVE_VIOLET_ENTRANCE
db $0a,$0a,$0a ; encounter rates: morn/day/nite
map DARK_CAVE_VIOLET_ENTRANCE
db 4 percent, 4 percent, 4 percent ; encounter rates: morn/day/nite
; morn
db 3,GEODUDE
db 3,DUNSPARCE
db 2,ZUBAT
db 2,GEODUDE
db 2,DUNSPARCE
db 4,DUNSPARCE
db 4,DUNSPARCE
db 3, GEODUDE
db 3, DUNSPARCE
db 2, ZUBAT
db 2, GEODUDE
db 2, DUNSPARCE
db 4, DUNSPARCE
db 4, DUNSPARCE
; day
db 3,GEODUDE
db 3,DUNSPARCE
db 2,ZUBAT
db 2,GEODUDE
db 2,DUNSPARCE
db 4,DUNSPARCE
db 4,DUNSPARCE
db 3, GEODUDE
db 3, DUNSPARCE
db 2, ZUBAT
db 2, GEODUDE
db 2, DUNSPARCE
db 4, DUNSPARCE
db 4, DUNSPARCE
; nite
db 3,GEODUDE
db 3,DUNSPARCE
db 2,ZUBAT
db 2,GEODUDE
db 2,DUNSPARCE
db 4,DUNSPARCE
db 4,DUNSPARCE
db 3, GEODUDE
db 3, DUNSPARCE
db 2, ZUBAT
db 2, GEODUDE
db 2, DUNSPARCE
db 4, DUNSPARCE
db 4, DUNSPARCE
; Yanma swarm
db GROUP_ROUTE_35, MAP_ROUTE_35
db $19,$19,$19 ; encounter rates: morn/day/nite
map ROUTE_35
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 12,NIDORAN_M
db 12,NIDORAN_F
db 12,YANMA
db 14,YANMA
db 14,PIDGEY
db 10,DITTO
db 10,DITTO
db 12, NIDORAN_M
db 12, NIDORAN_F
db 12, YANMA
db 14, YANMA
db 14, PIDGEY
db 10, DITTO
db 10, DITTO
; day
db 12,NIDORAN_M
db 12,NIDORAN_F
db 12,YANMA
db 14,YANMA
db 14,PIDGEY
db 10,DITTO
db 10,DITTO
db 12, NIDORAN_M
db 12, NIDORAN_F
db 12, YANMA
db 14, YANMA
db 14, PIDGEY
db 10, DITTO
db 10, DITTO
; nite
db 12,NIDORAN_M
db 12,NIDORAN_F
db 12,YANMA
db 14,YANMA
db 14,HOOTHOOT
db 10,DITTO
db 10,DITTO
db 12, NIDORAN_M
db 12, NIDORAN_F
db 12, YANMA
db 14, YANMA
db 14, HOOTHOOT
db 10, DITTO
db 10, DITTO
db $ff ; end
db -1 ; end

View File

@ -2,4 +2,4 @@
; No swarms encountered while surfing in Crystal
db $ff ; end
db -1 ; end

View File

@ -105,7 +105,7 @@ Function97cc0:: ; 97cc0
ld hl, StatusFlags2
bit 2, [hl]
jr nz, .asm_97cdb
callba Function2a0e7
callba TryWildEncounter
jr nz, .asm_97ce2
jr .asm_97ce6
@ -167,10 +167,10 @@ Function97cfd:: ; 97cfd
; 97d23
Function97d23: ; 97d23
call Function97d64
call TryWildEncounter_BugContest
ret nc
call Function97d31
callba Function2a1df
callba CheckRepelEffect
ret
; 97d31
@ -196,7 +196,7 @@ Function97d31:: ; 97d31
; Species
ld a, [hli]
ld [wd22e], a
ld [TempWildMonSpecies], a
; Min level
ld a, [hli]
@ -228,16 +228,16 @@ Function97d31:: ; 97d31
ret
; 97d64
Function97d64: ; 97d64
TryWildEncounter_BugContest: ; 97d64
ld a, [StandingTile]
call Function188e
call CheckSuperTallGrassTile
ld b, $66
jr z, .asm_97d70
ld b, $33
.asm_97d70
callba Function2a124
callba Function2a138
callba ApplyMusicEffectOnEncounterRate
callba ApplyCleanseTagEffectOnEncounterRate
call Random
ld a, [hRandomAdd]
cp b

View File

@ -626,7 +626,7 @@ Function463f: ; 463f
; 4661
Function4661: ; 4661
call Function188e
call CheckSuperTallGrassTile
jr z, .set
call Function1875
jr c, .reset

View File

@ -439,7 +439,7 @@ Function1551a: ; 1551a (5:551a)
ret
Function1554e: ; 1554e (5:554e)
call Function1852
call CheckOnWater
jr nz, .ret_nc
ld a, [PlayerState]
cp PLAYER_SURF

View File

@ -727,7 +727,7 @@ Function5412: ; 5412
ld hl, OBJECT_STANDING_TILE
add hl, bc
ld a, [hl]
call Function188e
call CheckSuperTallGrassTile
jr z, .asm_542d
call Function1875

View File

@ -218,16 +218,16 @@ endr
ld c, [hl]
push bc
ld hl, WildMons1
ld hl, JohtoGrassWildMons
.greater_than_10
ld a, BANK(WildMons1)
ld a, BANK(JohtoGrassWildMons)
call GetFarByte
cp -1
jr z, .done2
inc hl
cp b
jr nz, .next
ld a, BANK(WildMons1)
ld a, BANK(JohtoGrassWildMons)
call GetFarByte
cp c
jr z, .done
@ -263,7 +263,7 @@ rept 2
add hl, de
endr
inc hl
ld a, BANK(WildMons1)
ld a, BANK(JohtoGrassWildMons)
call GetFarByte
ld [wd265], a
ld [CurPartySpecies], a

View File

@ -1470,7 +1470,7 @@ Script_loadpikachudata: ; 0x973f0
; script command 0x5a
ld a, PIKACHU
ld [wd22e], a
ld [TempWildMonSpecies], a
ld a, 5
ld [CurPartyLevel], a
ret
@ -1505,7 +1505,7 @@ Script_loadpokedata: ; 0x97412
ld a, $80
ld [wd459], a
call GetScriptByte
ld [wd22e], a
ld [TempWildMonSpecies], a
call GetScriptByte
ld [CurPartyLevel], a
ret

View File

@ -4,46 +4,42 @@ SpawnPoints: ; 0x152ab
const_def
spawn: MACRO
; name, map, y, x
\1\@ EQUS "SPAWN_\1"
const \1\@
map \2
db \3, \4
; map, y, x
map \1
db \2, \3
ENDM
spawn HOME, KRISS_HOUSE_2F, 3, 3
spawn DEBUG, VIRIDIAN_POKECENTER_1F, 5, 3
spawn KRISS_HOUSE_2F, 3, 3
spawn VIRIDIAN_POKECENTER_1F, 5, 3
spawn PALLET, PALLET_TOWN, 5, 6
spawn VIRIDIAN, VIRIDIAN_CITY, 23, 26
spawn PEWTER, PEWTER_CITY, 13, 26
spawn CERULEAN, CERULEAN_CITY, 19, 22
spawn ROCK_TUNNEL, ROUTE_10_NORTH, 11, 2
spawn VERMILION, VERMILION_CITY, 9, 6
spawn LAVENDER, LAVENDER_TOWN, 5, 6
spawn SAFFRON, SAFFRON_CITY, 9, 30
spawn CELADON, CELADON_CITY, 29, 10
spawn FUCHSIA, FUCHSIA_CITY, 19, 28
spawn CINNABAR, CINNABAR_ISLAND, 11, 12
spawn INDIGO, ROUTE_23, 9, 6
spawn PALLET_TOWN, 5, 6
spawn VIRIDIAN_CITY, 23, 26
spawn PEWTER_CITY, 13, 26
spawn CERULEAN_CITY, 19, 22
spawn ROUTE_10_NORTH, 11, 2
spawn VERMILION_CITY, 9, 6
spawn LAVENDER_TOWN, 5, 6
spawn SAFFRON_CITY, 9, 30
spawn CELADON_CITY, 29, 10
spawn FUCHSIA_CITY, 19, 28
spawn CINNABAR_ISLAND, 11, 12
spawn ROUTE_23, 9, 6
spawn NEW_BARK, NEW_BARK_TOWN, 13, 6
spawn CHERRYGROVE, CHERRYGROVE_CITY, 29, 4
spawn VIOLET, VIOLET_CITY, 31, 26
spawn UNION_CAVE, ROUTE_32, 11, 74
spawn AZALEA, AZALEA_TOWN, 15, 10
spawn CIANWOOD, CIANWOOD_CITY, 23, 44
spawn GOLDENROD, GOLDENROD_CITY, 15, 28
spawn OLIVINE, OLIVINE_CITY, 13, 22
spawn ECRUTEAK, ECRUTEAK_CITY, 23, 28
spawn MAHOGANY, MAHOGANY_TOWN, 15, 14
spawn LAKE, LAKE_OF_RAGE, 21, 29
spawn BLACKTHORN, BLACKTHORN_CITY, 21, 30
spawn MT_SILVER, SILVER_CAVE_OUTSIDE, 23, 20
spawn FAST_SHIP, FAST_SHIP_CABINS_SW_SSW_NW, 6, 2
NUM_SPAWNS EQU const_value
const_value = -1
spawn N_A, N_A, -1, -1
spawn NEW_BARK_TOWN, 13, 6
spawn CHERRYGROVE_CITY, 29, 4
spawn VIOLET_CITY, 31, 26
spawn ROUTE_32, 11, 74
spawn AZALEA_TOWN, 15, 10
spawn CIANWOOD_CITY, 23, 44
spawn GOLDENROD_CITY, 15, 28
spawn OLIVINE_CITY, 13, 22
spawn ECRUTEAK_CITY, 23, 28
spawn MAHOGANY_TOWN, 15, 14
spawn LAKE_OF_RAGE, 21, 29
spawn BLACKTHORN_CITY, 21, 30
spawn SILVER_CAVE_OUTSIDE, 23, 20
spawn FAST_SHIP_CABINS_SW_SSW_NW, 6, 2
spawn N_A, -1, -1

View File

@ -84,7 +84,7 @@ Function184a:: ; 184a
ret
; 1852
Function1852:: ; 1852
CheckOnWater:: ; 1852
ld a, [StandingTile]
call GetTileCollision
sub 1
@ -147,7 +147,7 @@ Function1875:: ; 1875
ret
; 188e
Function188e:: ; 188e
CheckSuperTallGrassTile:: ; 188e
cp $14
ret z
cp $1c

488
main.asm

File diff suppressed because it is too large Load Diff

View File

@ -1711,7 +1711,7 @@ IsInBattle:: ; d22d
; 2: trainer battle
ds 1
wd22e:: ds 1
TempWildMonSpecies:: ds 1
OtherTrainerClass:: ; d22f
; class (Youngster, Bug Catcher, etc.) of opposing trainer
; 0 if opponent is a wild Pokémon, not a trainer