Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 49 additions & 18 deletions data/v2/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,35 @@ def csv_record_to_objects(info):

build_generic((EvolutionTriggerName,), "evolution_trigger_prose.csv", csv_record_to_objects)

def csv_record_to_objects(info):
yield EvolutionVariable(
id=int(info[0]),
name=info[1],
symbol=info[2],
data_type=info[3],
version_group_id=int(info[4]),
)

build_generic((EvolutionVariable,), "evolution_variables.csv", csv_record_to_objects)

def csv_record_to_objects(info):
yield EvolutionVariableName(
evolution_variable_id=int(info[0]),
language_id=int(info[1]),
name=info[2],
)
yield EvolutionVariableDescription(
evolution_variable_id=int(info[0]),
language_id=int(info[1]),
description=info[3],
)

build_generic(
(EvolutionVariableName, EvolutionVariableDescription),
"evolution_variable_prose.csv",
csv_record_to_objects,
)


#############
# POKEDEX #
Expand Down Expand Up @@ -1793,6 +1822,22 @@ def csv_record_to_objects(info):

build_generic((PokemonEggGroup,), "pokemon_egg_groups.csv", csv_record_to_objects)

def csv_record_to_objects(info):
yield PokemonForm(
id=int(info[0]),
name=info[1],
form_name=info[2],
pokemon_id=int(info[3]),
version_group_id=int(info[4]),
is_default=bool(int(info[5])),
is_battle_only=bool(int(info[6])),
is_mega=bool(int(info[7])),
form_order=int(info[8]),
order=int(info[9]),
)

build_generic((PokemonForm,), "pokemon_forms.csv", csv_record_to_objects)

def csv_record_to_objects(info):
yield PokemonEvolution(
id=int(info[0]),
Expand Down Expand Up @@ -1820,32 +1865,18 @@ def csv_record_to_objects(info):
needs_multiplayer=bool(int(info[22])),
near_special_rock=bool(int(info[23])),
region_id=int(info[24]) if info[24] != "" else None,
base_form_id=int(info[25]) if info[25] != "" else None,
evolved_form_id=int(info[26]) if info[26] != "" else None,
required_pokemon_form_id=int(info[25]) if info[25] != "" else None,
evolved_pokemon_form_id=int(info[26]) if info[26] != "" else None,
Comment thread
FallenDeity marked this conversation as resolved.
used_move_id=int(info[27]) if info[27] != "" else None,
min_move_count=int(info[28]) if info[28] != "" else None,
min_steps=int(info[29]) if info[29] != "" else None,
min_damage_taken=int(info[30]) if info[30] != "" else None,
nature_bitmask=int(info[31]) if info[31] != "" else None,
condition_expression=info[32],
)

build_generic((PokemonEvolution,), "pokemon_evolution.csv", csv_record_to_objects)

def csv_record_to_objects(info):
yield PokemonForm(
id=int(info[0]),
name=info[1],
form_name=info[2],
pokemon_id=int(info[3]),
version_group_id=int(info[4]),
is_default=bool(int(info[5])),
is_battle_only=bool(int(info[6])),
is_mega=bool(int(info[7])),
form_order=int(info[8]),
order=int(info[9]),
)

build_generic((PokemonForm,), "pokemon_forms.csv", csv_record_to_objects)

def try_form_image_names(path, info, extension):
form_identifier = info[2]
pokemon_id = info[3]
Expand Down
8 changes: 6 additions & 2 deletions data/v2/csv/evolution_trigger_prose.csv
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ evolution_trigger_id,local_language_id,name
8,9,Land three critical hits in a battle
9,5,Aller quelque part après avoir encaissé des dommages
9,9,Go somewhere after taking damage
10,5,Autre
10,9,Other
10,5,Montée de niveau en combat
10,9,Level up in battle
11,5,Utiliser une capacité sous style agile
11,9,Use move in agile style
12,5,Utiliser une capacité sous style puissant
Expand All @@ -35,3 +35,7 @@ evolution_trigger_id,local_language_id,name
15,9,Defeat three Bisharp that hold a Leader's Crest
16,5,Collectionner 999 Pièces Mordudor
16,9,Collect 999 Gimmighoul Coins
17,5,Donner 400 Bonbons Meltan dans Pokémon GO
17,9,Feed 400 Meltan Candies in Pokémon GO
18,5,Non classé
18,9,Unclassified
4 changes: 3 additions & 1 deletion data/v2/csv/evolution_triggers.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ id,identifier
7,tower-of-waters
8,three-critical-hits
9,take-damage
10,other
10,in-battle-level-up
Comment thread
FallenDeity marked this conversation as resolved.
11,agile-style-move
12,strong-style-move
13,recoil-damage
14,use-move
15,three-defeated-bisharp
16,gimmighoul-coins
17,meltan-candies
Comment thread
FallenDeity marked this conversation as resolved.
18,unclassified
5 changes: 5 additions & 0 deletions data/v2/csv/evolution_variable_prose.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
evolution_variable_id,local_language_id,name,description
1,5,Constante de Chiffrement,"Un entier non signé de 32 bits introduit en 6e génération, généré en même temps que la valeur de personnalité. Il est utilisé pour déterminer les variations de forme et d'évolution (comme Insolourdo, Compagnol et Chenipotte), les motifs de Spinda, le départage des caractéristiques et la structuration des données du Pokémon."
1,9,Encryption Constant,"An unsigned 32-bit integer introduced in Generation VI that is generated alongside a Pokémon's personality value. It is used to calculate internal form variations (such as Dudunsparce, Maushold, and Wurmple), determine Spinda spot patterns, break ties in characteristic calculations, and structure Pokémon data."
2,5,Valeur de Personnalité,"Un entier non signé de 32 bits généré lors de la création d'un Pokémon. Introduite en 3e génération, cette valeur détermine plusieurs attributs intrinsèques, tels que la Nature (en 3G et 4G), le sexe, le talent, le caractère chromatique (Shiny), les motifs de Spinda ou encore la branche d'évolution de certains Pokémon (comme Chenipotte)."
2,9,Personality Value,"An unsigned 32-bit integer generated when a Pokémon is first created by the game. Introduced in Generation III, it dictates various internal characteristics of a Pokémon, including its Nature (in Gens III–IV), gender, ability, shininess, Unown letter, Spinda spots, and evolution branch (such as Wurmple)."
3 changes: 3 additions & 0 deletions data/v2/csv/evolution_variables.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,identifier,symbol,data_type,version_group_id
1,encryption-constant,EC,uint32,15
2,personality-value,PID,uint32,5
Loading
Loading