summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2015-03-08 11:12:26 -0700
committerMarcus Huderle <huderlem@gmail.com>2015-03-08 11:12:26 -0700
commit0c7e49017dc1efefbb609dded2e3a49e0b2bc8c5 (patch)
tree31d7aa70cd1c3c74f2201ea2efff3ce426c99618
parent02982dc38e6019441364b7984bfcf08eef6bcfd9 (diff)
Evolution lines.
-rwxr-xr-xconstants.asm1
-rwxr-xr-xconstants/evolution_line_constants.asm81
-rwxr-xr-xdata/evolution_lines.asm81
-rwxr-xr-xmain.asm19
4 files changed, 176 insertions, 6 deletions
diff --git a/constants.asm b/constants.asm
index baa0cbf..5b5b700 100755
--- a/constants.asm
+++ b/constants.asm
@@ -1,6 +1,7 @@
INCLUDE "hram.asm"
INCLUDE "vram.asm"
+INCLUDE "constants/evolution_line_constants.asm"
INCLUDE "constants/joy_constants.asm"
INCLUDE "constants/map_constants.asm"
INCLUDE "constants/pokemon_constants.asm"
diff --git a/constants/evolution_line_constants.asm b/constants/evolution_line_constants.asm
new file mode 100755
index 0000000..dea3519
--- /dev/null
+++ b/constants/evolution_line_constants.asm
@@ -0,0 +1,81 @@
+const_value = 0
+
+ const EVOLINE_BULBASAUR ; $0
+ const EVOLINE_CHARMANDER ; $1
+ const EVOLINE_SQUIRTLE ; $2
+ const EVOLINE_CATERPIE ; $3
+ const EVOLINE_WEEDLE ; $4
+ const EVOLINE_PIDGEY ; $5
+ const EVOLINE_RATTATA ; $6
+ const EVOLINE_SPEAROW ; $7
+ const EVOLINE_EKANS ; $8
+ const EVOLINE_PIKACHU ; $9
+ const EVOLINE_SANDSHREW ; $a
+ const EVOLINE_NIDORAN_F ; $b
+ const EVOLINE_NIDORAN_M ; $c
+ const EVOLINE_CLEFAIRY ; $d
+ const EVOLINE_VULPIX ; $e
+ const EVOLINE_JIGGLYPUFF ; $f
+ const EVOLINE_ZUBAT ; $10
+ const EVOLINE_ODDISH ; $11
+ const EVOLINE_PARAS ; $12
+ const EVOLINE_VENONAT ; $13
+ const EVOLINE_DIGLETT ; $14
+ const EVOLINE_MEOWTH ; $15
+ const EVOLINE_PSYDUCK ; $16
+ const EVOLINE_MANKEY ; $17
+ const EVOLINE_GROWLITHE ; $18
+ const EVOLINE_POLIWAG ; $19
+ const EVOLINE_ABRA ; $1a
+ const EVOLINE_MACHOP ; $1b
+ const EVOLINE_BELLSPROUT ; $1c
+ const EVOLINE_TENTACOOL ; $1d
+ const EVOLINE_GEODUDE ; $1e
+ const EVOLINE_PONYTA ; $1f
+ const EVOLINE_SLOWPOKE ; $20
+ const EVOLINE_MAGNEMITE ; $21
+ const EVOLINE_FARFETCH_D ; $22
+ const EVOLINE_DODUO ; $23
+ const EVOLINE_SEEL ; $24
+ const EVOLINE_GRIMER ; $25
+ const EVOLINE_SHELLDER ; $26
+ const EVOLINE_GASTLY ; $27
+ const EVOLINE_ONIX ; $28
+ const EVOLINE_DROWZEE ; $29
+ const EVOLINE_KRABBY ; $2a
+ const EVOLINE_VOLTORB ; $2b
+ const EVOLINE_EXEGGCUTE ; $2c
+ const EVOLINE_CUBONE ; $2d
+ const EVOLINE_HITMONLEE ; $2e
+ const EVOLINE_HITMONCHAN ; $2f
+ const EVOLINE_LICKITUNG ; $30
+ const EVOLINE_KOFFING ; $31
+ const EVOLINE_RHYHORN ; $32
+ const EVOLINE_CHANSEY ; $33
+ const EVOLINE_TANGELA ; $34
+ const EVOLINE_KANGASKHAN ; $35
+ const EVOLINE_HORSEA ; $36
+ const EVOLINE_GOLDEEN ; $37
+ const EVOLINE_STARYU ; $38
+ const EVOLINE_MR_MIME ; $39
+ const EVOLINE_SCYTHER ; $3a
+ const EVOLINE_JYNX ; $3b
+ const EVOLINE_ELECTABUZZ ; $3c
+ const EVOLINE_MAGMAR ; $3d
+ const EVOLINE_PINSIR ; $3e
+ const EVOLINE_TAUROS ; $3f
+ const EVOLINE_MAGIKARP ; $40
+ const EVOLINE_LAPRAS ; $41
+ const EVOLINE_DITTO ; $42
+ const EVOLINE_EEVEE ; $43
+ const EVOLINE_PORYGON ; $44
+ const EVOLINE_OMANYTE ; $45
+ const EVOLINE_KABUTO ; $46
+ const EVOLINE_AERODACTYL ; $47
+ const EVOLINE_SNORLAX ; $48
+ const EVOLINE_ARTICUNO ; $49
+ const EVOLINE_ZAPDOS ; $4a
+ const EVOLINE_MOLTRES ; $4b
+ const EVOLINE_DRATINI ; $4c
+ const EVOLINE_MEWTWO ; $4d
+ const EVOLINE_MEW ; $4e
diff --git a/data/evolution_lines.asm b/data/evolution_lines.asm
new file mode 100755
index 0000000..8dc55c2
--- /dev/null
+++ b/data/evolution_lines.asm
@@ -0,0 +1,81 @@
+EvolutionLineIds: ; 0x1161d
+; Each byte corresponds to a mon in the PokeDex.
+ db EVOLINE_BULBASAUR, EVOLINE_BULBASAUR, EVOLINE_BULBASAUR
+ db EVOLINE_CHARMANDER, EVOLINE_CHARMANDER, EVOLINE_CHARMANDER
+ db EVOLINE_SQUIRTLE, EVOLINE_SQUIRTLE, EVOLINE_SQUIRTLE
+ db EVOLINE_CATERPIE, EVOLINE_CATERPIE, EVOLINE_CATERPIE
+ db EVOLINE_WEEDLE, EVOLINE_WEEDLE, EVOLINE_WEEDLE
+ db EVOLINE_PIDGEY, EVOLINE_PIDGEY, EVOLINE_PIDGEY
+ db EVOLINE_RATTATA, EVOLINE_RATTATA
+ db EVOLINE_SPEAROW, EVOLINE_SPEAROW
+ db EVOLINE_EKANS, EVOLINE_EKANS
+ db EVOLINE_PIKACHU, EVOLINE_PIKACHU
+ db EVOLINE_SANDSHREW, EVOLINE_SANDSHREW
+ db EVOLINE_NIDORAN_F, EVOLINE_NIDORAN_F, EVOLINE_NIDORAN_F
+ db EVOLINE_NIDORAN_M, EVOLINE_NIDORAN_M, EVOLINE_NIDORAN_M
+ db EVOLINE_CLEFAIRY, EVOLINE_CLEFAIRY
+ db EVOLINE_VULPIX, EVOLINE_VULPIX
+ db EVOLINE_JIGGLYPUFF, EVOLINE_JIGGLYPUFF
+ db EVOLINE_ZUBAT, EVOLINE_ZUBAT
+ db EVOLINE_ODDISH, EVOLINE_ODDISH, EVOLINE_ODDISH
+ db EVOLINE_PARAS,EVOLINE_PARAS
+ db EVOLINE_VENONAT,EVOLINE_VENONAT
+ db EVOLINE_DIGLETT, EVOLINE_DIGLETT
+ db EVOLINE_MEOWTH, EVOLINE_MEOWTH
+ db EVOLINE_PSYDUCK, EVOLINE_PSYDUCK
+ db EVOLINE_MANKEY, EVOLINE_MANKEY
+ db EVOLINE_GROWLITHE, EVOLINE_GROWLITHE
+ db EVOLINE_POLIWAG, EVOLINE_POLIWAG, EVOLINE_POLIWAG
+ db EVOLINE_ABRA, EVOLINE_ABRA, EVOLINE_ABRA
+ db EVOLINE_MACHOP, EVOLINE_MACHOP, EVOLINE_MACHOP
+ db EVOLINE_BELLSPROUT, EVOLINE_BELLSPROUT, EVOLINE_BELLSPROUT
+ db EVOLINE_TENTACOOL, EVOLINE_TENTACOOL
+ db EVOLINE_GEODUDE, EVOLINE_GEODUDE, EVOLINE_GEODUDE
+ db EVOLINE_PONYTA, EVOLINE_PONYTA
+ db EVOLINE_SLOWPOKE, EVOLINE_SLOWPOKE
+ db EVOLINE_MAGNEMITE, EVOLINE_MAGNEMITE
+ db EVOLINE_FARFETCH_D
+ db EVOLINE_DODUO, EVOLINE_DODUO
+ db EVOLINE_SEEL, EVOLINE_SEEL
+ db EVOLINE_GRIMER, EVOLINE_GRIMER
+ db EVOLINE_SHELLDER, EVOLINE_SHELLDER
+ db EVOLINE_GASTLY, EVOLINE_GASTLY, EVOLINE_GASTLY
+ db EVOLINE_ONIX
+ db EVOLINE_DROWZEE, EVOLINE_DROWZEE
+ db EVOLINE_KRABBY, EVOLINE_KRABBY
+ db EVOLINE_VOLTORB, EVOLINE_VOLTORB
+ db EVOLINE_EXEGGCUTE, EVOLINE_EXEGGCUTE
+ db EVOLINE_CUBONE, EVOLINE_CUBONE
+ db EVOLINE_HITMONLEE
+ db EVOLINE_HITMONCHAN
+ db EVOLINE_LICKITUNG
+ db EVOLINE_KOFFING, EVOLINE_KOFFING
+ db EVOLINE_RHYHORN, EVOLINE_RHYHORN
+ db EVOLINE_CHANSEY
+ db EVOLINE_TANGELA
+ db EVOLINE_KANGASKHAN
+ db EVOLINE_HORSEA, EVOLINE_HORSEA
+ db EVOLINE_GOLDEEN, EVOLINE_GOLDEEN
+ db EVOLINE_STARYU, EVOLINE_STARYU
+ db EVOLINE_MR_MIME
+ db EVOLINE_SCYTHER
+ db EVOLINE_JYNX
+ db EVOLINE_ELECTABUZZ
+ db EVOLINE_MAGMAR
+ db EVOLINE_PINSIR
+ db EVOLINE_TAUROS
+ db EVOLINE_MAGIKARP, EVOLINE_MAGIKARP
+ db EVOLINE_LAPRAS
+ db EVOLINE_DITTO
+ db EVOLINE_EEVEE, EVOLINE_EEVEE, EVOLINE_EEVEE, EVOLINE_EEVEE
+ db EVOLINE_PORYGON
+ db EVOLINE_OMANYTE, EVOLINE_OMANYTE
+ db EVOLINE_KABUTO, EVOLINE_KABUTO
+ db EVOLINE_AERODACTYL
+ db EVOLINE_SNORLAX
+ db EVOLINE_ARTICUNO
+ db EVOLINE_ZAPDOS
+ db EVOLINE_MOLTRES
+ db EVOLINE_DRATINI, EVOLINE_DRATINI, EVOLINE_DRATINI
+ db EVOLINE_MEWTWO
+ db EVOLINE_MEW
diff --git a/main.asm b/main.asm
index ff38d2a..7cd9115 100755
--- a/main.asm
+++ b/main.asm
@@ -5536,24 +5536,24 @@ Func_1003f: ; 0x1003f
ld c, a
ld b, $0
add hl, bc
- ld a, [$d55b]
+ ld a, [$d55b] ; this probably gets set to $08 when the rare mons should be used.
sla a
ld c, a
add hl, bc
- ld a, [hl]
+ ld a, [hl] ; a contains mon id
dec a
ld [$d579], a
ld a, [$d579]
ld c, a
ld b, $0
- ld hl, $561d
+ ld hl, EvolutionLineIds
add hl, bc
ld c, [hl]
ld h, b
ld l, c
add hl, bc
- add hl, bc
- ld bc, $7685
+ add hl, bc ; multiply the evolution line id by 3
+ ld bc, Data_13685
add hl, bc
ld a, [hli]
ld [$d5c1], a
@@ -5723,7 +5723,14 @@ WildMonPointers: ; 0x112c0
INCLUDE "data/red_wild_mons.asm"
INCLUDE "data/blue_wild_mons.asm"
-INCBIN "baserom.gbc",$115ce,$14000 - $115ce
+INCBIN "baserom.gbc",$115ce,$1161d - $115ce
+
+INCLUDE "data/evolution_lines.asm"
+
+INCBIN "baserom.gbc",$116b4,$13685 - $116b4
+
+Data_13685: ; 0x13685
+ db $12, $12, $10, $10, $10, $10, $12, $12, $0E, $14, $14, $12, $14, $14, $10, $0A, $0A, $0E, $11, $13, $10, $0B, $0B, $10, $12, $12, $0E, $12, $14, $0E, $10, $12, $10, $11, $12, $0E, $11, $12, $0E, $12, $13, $10, $11, $11, $10, $12, $12, $10, $08, $08, $10, $10, $10, $10, $10, $10, $10, $11, $11, $0E, $10, $10, $0E, $14, $14, $0E, $30, $30, $10, $12, $12, $10, $12, $12, $10, $10, $10, $10, $10, $10, $10, $12, $14, $10, $10, $12, $10, $0C, $0C, $12, $12, $14, $0C, $12, $14, $0E, $30, $30, $10, $14, $14, $10, $12, $12, $0E, $12, $12, $0E, $14, $14, $0E, $12, $12, $10, $14, $14, $0E, $10, $10, $0E, $12, $12, $10, $14, $14, $10, $14, $12, $10, $02, $02, $10, $12, $12, $10, $12, $12, $10, $14, $10, $10, $14, $10, $10, $14, $12, $10, $11, $11, $10, $14, $14, $10, $12, $12, $10, $10, $10, $10, $12, $12, $10, $0F, $0F, $0E, $12, $12, $0E, $23, $23, $10, $13, $13, $10, $13, $13, $10, $12, $12, $10, $12, $14, $10, $14, $14, $0E, $12, $12, $0E, $12, $14, $10, $18, $18, $0C, $16, $16, $0C, $14, $14, $10, $12, $12, $10, $10, $10, $0E, $12, $12, $0E, $12, $12, $0E, $0C, $0C, $12, $26, $36, $12, $13, $13, $10, $13, $13, $10, $13, $13, $10, $12, $12, $0E, $14, $14, $0E, $14, $14, $0E
SECTION "bank5", ROMX, BANK[$5]