aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRangi42 <remy.oukaour+rangi42@gmail.com>2023-11-21 20:33:03 -0500
committerRangi42 <remy.oukaour+rangi42@gmail.com>2023-11-21 20:33:03 -0500
commit0a616ae5606031ce27b4c987ae0e1d9da511cec9 (patch)
tree203b3022c575f1ef382bf80fe1f738b4bb8f1daa
parentRename two unused items as `ITEM_XX` like pokecrystal (diff)
downloadpokeyellow-0a616ae5606031ce27b4c987ae0e1d9da511cec9.tar.gz
pokeyellow-0a616ae5606031ce27b4c987ae0e1d9da511cec9.tar.xz
pokeyellow-0a616ae5606031ce27b4c987ae0e1d9da511cec9.zip
Get rid of wEvosMoves, MAX_EVOLUTIONS, and EVOLUTION_SIZE
Fixes #430
-rw-r--r--constants/pokemon_data_constants.asm3
-rw-r--r--data/pokemon/evos_moves.asm11
-rw-r--r--engine/menus/party_menu.asm10
-rw-r--r--ram/wram.asm4
4 files changed, 14 insertions, 14 deletions
diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm
index 3c594ae1..5cc2d344 100644
--- a/constants/pokemon_data_constants.asm
+++ b/constants/pokemon_data_constants.asm
@@ -83,9 +83,6 @@ DEF HOF_TEAM_CAPACITY EQU 50
const EVOLVE_ITEM ; 2
const EVOLVE_TRADE ; 3
-DEF MAX_EVOLUTIONS EQU 3
-DEF EVOLUTION_SIZE EQU 4
-
; wMonHGrowthRate values
; GrowthRateTable indexes (see data/growth_rates.asm)
diff --git a/data/pokemon/evos_moves.asm b/data/pokemon/evos_moves.asm
index a555579e..d900dde6 100644
--- a/data/pokemon/evos_moves.asm
+++ b/data/pokemon/evos_moves.asm
@@ -1,5 +1,12 @@
-; See constants/pokemon_data_constants.asm
-; The max number of evolutions per monster is MAX_EVOLUTIONS
+; Evos+moves data structure:
+; - Evolution methods:
+; * db EVOLVE_LEVEL, level, species
+; * db EVOLVE_ITEM, used item, min level (1), species
+; * db EVOLVE_TRADE, min level (1), species
+; - db 0 ; no more evolutions
+; - Learnset (in increasing level order):
+; * db level, move
+; - db 0 ; no more level-up moves
EvosMovesPointerTable:
table_width 2, EvosMovesPointerTable
diff --git a/engine/menus/party_menu.asm b/engine/menus/party_menu.asm
index 5a473ccf..46b828eb 100644
--- a/engine/menus/party_menu.asm
+++ b/engine/menus/party_menu.asm
@@ -121,19 +121,19 @@ RedrawPartyMenu_::
rl b
ld c, a
add hl, bc
- ld de, wEvosMoves
+ ld de, wcd6d
ld a, BANK(EvosMovesPointerTable)
ld bc, 2
call FarCopyData
- ld hl, wEvosMoves
+ ld hl, wcd6d
ld a, [hli]
ld h, [hl]
ld l, a
- ld de, wEvosMoves
+ ld de, wcd6d
ld a, BANK(EvosMovesPointerTable)
- ld bc, wEvosMovesEnd - wEvosMoves
+ ld bc, 4 * 3 + 1 ; enough for Eevee's three 4-byte evolutions and 0 terminator
call FarCopyData
- ld hl, wEvosMoves
+ ld hl, wcd6d
ld de, .notAbleToEvolveText
; loop through the pokemon's evolution entries
.checkEvolutionsLoop
diff --git a/ram/wram.asm b/ram/wram.asm
index 32749db3..82a5f14c 100644
--- a/ram/wram.asm
+++ b/ram/wram.asm
@@ -887,10 +887,6 @@ UNION
wcd6d:: ds NAME_BUFFER_LENGTH ; buffer for various data
NEXTU
-wEvosMoves:: ds MAX_EVOLUTIONS * EVOLUTION_SIZE + 1
-wEvosMovesEnd::
-
-NEXTU
ds 4
; temp variable used to print a move's current PP on the status screen
wStatusScreenCurrentPP:: db