Skip to content
Merged
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
1 change: 1 addition & 0 deletions data/v2/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,7 @@ def csv_record_to_objects(info):
symbol=info[2],
data_type=info[3],
version_group_id=int(info[4]),
source=info[5],
)

build_generic((EvolutionVariable,), "evolution_variables.csv", csv_record_to_objects)
Expand Down
4 changes: 4 additions & 0 deletions data/v2/csv/evolution_variable_prose.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ evolution_variable_id,local_language_id,name,description
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,5,Sens de Rotation,"Le sens dans lequel Crèmy est tourné pour le faire évoluer, introduit dans Pokémon Épée et Bouclier : 0 pour le sens horaire, 1 pour le sens antihoraire. Avec la durée de rotation et le moment de la journée, il détermine la Crème que reçoit le Charmilly obtenu."
3,9,Spin Direction,"The direction in which Milcery is spun to evolve it, introduced in Pokémon Sword and Shield: 0 for clockwise, 1 for counter-clockwise. Together with the spin duration and the time of day, it determines which Cream the resulting Alcremie receives."
4,5,Durée de Rotation,"La durée en secondes de la rotation effectuée pour faire évoluer Crèmy, introduite dans Pokémon Épée et Bouclier. Avec le sens de rotation et le moment de la journée, elle détermine la Crème que reçoit le Charmilly obtenu."
4,9,Spin Duration,"The length in seconds of the spin performed to evolve Milcery, introduced in Pokémon Sword and Shield. Together with the spin direction and the time of day, it determines which Cream the resulting Alcremie receives."
8 changes: 5 additions & 3 deletions data/v2/csv/evolution_variables.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id,identifier,symbol,data_type,version_group_id
1,encryption-constant,EC,uint32,15
2,personality-value,PID,uint32,5
id,identifier,symbol,data_type,version_group_id,source
1,encryption-constant,EC,uint32,15,pokemon
2,personality-value,PID,uint32,5,pokemon
3,spin-direction,SPIN_DIR,uint8,20,player-input
4,spin-duration,SPIN_SEC,uint8,20,player-input
64 changes: 63 additions & 1 deletion data/v2/csv/pokemon_evolution.csv
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ id,evolved_species_id,evolution_trigger_id,version_group_id,is_default,trigger_i
438,858,1,20,1,,42,,,,,,,,,,,,,,0,0,0,0,,,,,,,,,,
439,860,1,20,1,,32,,,,,,,,,,,,,,0,0,0,0,,,,,,,,,,
440,861,1,20,1,,42,,,,,,,,,,,,,,0,0,0,0,,,,,,,,,,
441,869,5,20,1,,,,,,,,,,,,,,,,0,0,0,0,,,,,,,,,,
441,869,5,20,1,,,,,1167,day,,,,,,,,,,0,0,0,0,,,869,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
442,873,1,20,1,,,,,,night,,,160,,,,,,,0,0,0,0,,,,,,,,,,
443,879,1,20,1,,34,,,,,,,,,,,,,,0,0,0,0,,,,,,,,,,
444,886,1,20,1,,50,,,,,,,,,,,,,,0,0,0,0,,,,,,,,,,
Expand Down Expand Up @@ -613,3 +613,65 @@ id,evolved_species_id,evolution_trigger_id,version_group_id,is_default,trigger_i
617,666,1,15,1,,12,,,,,,,,,,,,,,0,0,0,0,,10306,10102,,,,,,,
618,666,1,15,1,,12,,,,,,,,,,,,,,0,0,0,0,,10307,10161,,,,,,,
619,666,1,15,1,,12,,,,,,,,,,,,,,0,0,0,0,,10308,10162,,,,,,,
620,869,5,20,1,,,,,1167,day,,,,,,,,,,0,0,0,0,,,10346,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
621,869,5,20,1,,,,,1167,night,,,,,,,,,,0,0,0,0,,,10347,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
622,869,5,20,1,,,,,1167,night,,,,,,,,,,0,0,0,0,,,10348,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
623,869,5,20,1,,,,,1167,night,,,,,,,,,,0,0,0,0,,,10349,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
624,869,5,20,1,,,,,1167,night,,,,,,,,,,0,0,0,0,,,10350,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
625,869,5,20,1,,,,,1167,day,,,,,,,,,,0,0,0,0,,,10351,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
626,869,5,20,1,,,,,1167,day,,,,,,,,,,0,0,0,0,,,10352,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
627,869,5,20,1,,,,,1167,dusk,,,,,,,,,,0,0,0,0,,,10353,,,,,,SPIN_SEC 10 >=,
628,869,5,20,1,,,,,1169,day,,,,,,,,,,0,0,0,0,,,10449,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
629,869,5,20,1,,,,,1169,day,,,,,,,,,,0,0,0,0,,,10450,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
630,869,5,20,1,,,,,1169,night,,,,,,,,,,0,0,0,0,,,10451,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
631,869,5,20,1,,,,,1169,night,,,,,,,,,,0,0,0,0,,,10452,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
632,869,5,20,1,,,,,1169,night,,,,,,,,,,0,0,0,0,,,10453,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
633,869,5,20,1,,,,,1169,night,,,,,,,,,,0,0,0,0,,,10454,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
634,869,5,20,1,,,,,1169,day,,,,,,,,,,0,0,0,0,,,10455,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
635,869,5,20,1,,,,,1169,day,,,,,,,,,,0,0,0,0,,,10456,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
636,869,5,20,1,,,,,1169,dusk,,,,,,,,,,0,0,0,0,,,10457,,,,,,SPIN_SEC 10 >=,
637,869,5,20,1,,,,,1168,day,,,,,,,,,,0,0,0,0,,,10458,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
638,869,5,20,1,,,,,1168,day,,,,,,,,,,0,0,0,0,,,10459,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
639,869,5,20,1,,,,,1168,night,,,,,,,,,,0,0,0,0,,,10460,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
640,869,5,20,1,,,,,1168,night,,,,,,,,,,0,0,0,0,,,10461,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
641,869,5,20,1,,,,,1168,night,,,,,,,,,,0,0,0,0,,,10462,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
642,869,5,20,1,,,,,1168,night,,,,,,,,,,0,0,0,0,,,10463,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
643,869,5,20,1,,,,,1168,day,,,,,,,,,,0,0,0,0,,,10464,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
644,869,5,20,1,,,,,1168,day,,,,,,,,,,0,0,0,0,,,10465,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
645,869,5,20,1,,,,,1168,dusk,,,,,,,,,,0,0,0,0,,,10466,,,,,,SPIN_SEC 10 >=,
646,869,5,20,1,,,,,1172,day,,,,,,,,,,0,0,0,0,,,10467,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
647,869,5,20,1,,,,,1172,day,,,,,,,,,,0,0,0,0,,,10468,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
648,869,5,20,1,,,,,1172,night,,,,,,,,,,0,0,0,0,,,10469,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
649,869,5,20,1,,,,,1172,night,,,,,,,,,,0,0,0,0,,,10470,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
650,869,5,20,1,,,,,1172,night,,,,,,,,,,0,0,0,0,,,10471,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
651,869,5,20,1,,,,,1172,night,,,,,,,,,,0,0,0,0,,,10472,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
652,869,5,20,1,,,,,1172,day,,,,,,,,,,0,0,0,0,,,10473,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
653,869,5,20,1,,,,,1172,day,,,,,,,,,,0,0,0,0,,,10474,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
654,869,5,20,1,,,,,1172,dusk,,,,,,,,,,0,0,0,0,,,10475,,,,,,SPIN_SEC 10 >=,
655,869,5,20,1,,,,,1170,day,,,,,,,,,,0,0,0,0,,,10476,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
656,869,5,20,1,,,,,1170,day,,,,,,,,,,0,0,0,0,,,10477,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
657,869,5,20,1,,,,,1170,night,,,,,,,,,,0,0,0,0,,,10478,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
658,869,5,20,1,,,,,1170,night,,,,,,,,,,0,0,0,0,,,10479,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
659,869,5,20,1,,,,,1170,night,,,,,,,,,,0,0,0,0,,,10480,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
660,869,5,20,1,,,,,1170,night,,,,,,,,,,0,0,0,0,,,10481,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
661,869,5,20,1,,,,,1170,day,,,,,,,,,,0,0,0,0,,,10482,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
662,869,5,20,1,,,,,1170,day,,,,,,,,,,0,0,0,0,,,10483,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
663,869,5,20,1,,,,,1170,dusk,,,,,,,,,,0,0,0,0,,,10484,,,,,,SPIN_SEC 10 >=,
664,869,5,20,1,,,,,1171,day,,,,,,,,,,0,0,0,0,,,10485,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
665,869,5,20,1,,,,,1171,day,,,,,,,,,,0,0,0,0,,,10486,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
666,869,5,20,1,,,,,1171,night,,,,,,,,,,0,0,0,0,,,10487,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
667,869,5,20,1,,,,,1171,night,,,,,,,,,,0,0,0,0,,,10488,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
668,869,5,20,1,,,,,1171,night,,,,,,,,,,0,0,0,0,,,10489,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
669,869,5,20,1,,,,,1171,night,,,,,,,,,,0,0,0,0,,,10490,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
670,869,5,20,1,,,,,1171,day,,,,,,,,,,0,0,0,0,,,10491,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
671,869,5,20,1,,,,,1171,day,,,,,,,,,,0,0,0,0,,,10492,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
672,869,5,20,1,,,,,1171,dusk,,,,,,,,,,0,0,0,0,,,10493,,,,,,SPIN_SEC 10 >=,
673,869,5,20,1,,,,,1173,day,,,,,,,,,,0,0,0,0,,,10494,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
674,869,5,20,1,,,,,1173,day,,,,,,,,,,0,0,0,0,,,10495,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
675,869,5,20,1,,,,,1173,night,,,,,,,,,,0,0,0,0,,,10496,,,,,,SPIN_DIR 0 == SPIN_SEC 5 < &&,
676,869,5,20,1,,,,,1173,night,,,,,,,,,,0,0,0,0,,,10497,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
677,869,5,20,1,,,,,1173,night,,,,,,,,,,0,0,0,0,,,10498,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
678,869,5,20,1,,,,,1173,night,,,,,,,,,,0,0,0,0,,,10499,,,,,,SPIN_DIR 1 == SPIN_SEC 5 < &&,
679,869,5,20,1,,,,,1173,day,,,,,,,,,,0,0,0,0,,,10500,,,,,,SPIN_DIR 1 == SPIN_SEC 5 >= &&,
680,869,5,20,1,,,,,1173,day,,,,,,,,,,0,0,0,0,,,10501,,,,,,SPIN_DIR 0 == SPIN_SEC 5 >= &&,
681,869,5,20,1,,,,,1173,dusk,,,,,,,,,,0,0,0,0,,,10502,,,,,,SPIN_SEC 10 >=,
6 changes: 6 additions & 0 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4003,6 +4003,12 @@ components:
data_type:
type: string
maxLength: 20
source:
type: string
description: 'Where the value comes from: ''pokemon'' for data stored on
the Pokemon (e.g. EC, PID), ''player-input'' for an action taken by the
player while evolving (e.g. SPIN_DIR, SPIN_SEC)'
maxLength: 20
version_group:
$ref: '#/components/schemas/VersionGroupSummary'
names:
Expand Down
21 changes: 21 additions & 0 deletions pokemon_v2/migrations/0037_evolutionvariable_source.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 5.2.10 on 2026-09-24 19:01

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("pokemon_v2", "0036_pokemonevolution_condition_expression_and_more"),
]

operations = [
migrations.AddField(
model_name="evolutionvariable",
name="source",
field=models.CharField(
default="pokemon",
help_text="Where the value comes from: 'pokemon' for data stored on the Pokemon (e.g. EC, PID), 'player-input' for an action taken by the player while evolving (e.g. SPIN_DIR, SPIN_SEC)",
max_length=20,
),
),
]
7 changes: 7 additions & 0 deletions pokemon_v2/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,13 @@ class EvolutionVariable(HasName, HasVersionGroup):
symbol = models.CharField(max_length=10)
data_type = models.CharField(max_length=20, default="uint32")

source = models.CharField(
max_length=20,
default="pokemon",
help_text="Where the value comes from: 'pokemon' for data stored on the Pokemon (e.g. EC, PID), "
"'player-input' for an action taken by the player while evolving (e.g. SPIN_DIR, SPIN_SEC)",
)


class EvolutionVariableName(HasEvolutionVariable, IsName):
pass
Expand Down
2 changes: 1 addition & 1 deletion pokemon_v2/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3238,7 +3238,7 @@ class EvolutionVariableDetailSerializer(serializers.HyperlinkedModelSerializer[E

class Meta:
model = EvolutionVariable
fields = ("id", "name", "symbol", "data_type", "version_group", "names", "descriptions")
fields = ("id", "name", "symbol", "data_type", "source", "version_group", "names", "descriptions")


class PokemonSpeciesDescriptionSerializer(serializers.ModelSerializer[PokemonSpeciesDescription]):
Expand Down
Loading