- encounter_type_id -> encounter_terrain_id
- Added a version_id column. Previous rates were from Diamond and
HeartGold; these have been copied to Pearl & Platinum and SoulSilver,
respectively, which i assume is accurate. RBY rates need to be added.
Language codes are ISO 639-1; country codes are ISO 3166-1 alpha-2.
The country codes are important to keep for flags and stuff, I guess,
but reporting the language code as a short form for the language is
more correct.
Gonna see if I can do that, I guess. I added the language codes mostly
just because I was adding languages.
Every flavor page should work with no missing sprites. Save perhaps for
Unown, because I honestly don't have them.
Every sprite exists as ###-form.png. There is also still a ###.png,
containing a reasonable default form, so people who don't give a crap
about this mess can just use the numbered sprites. Beta forms should
now all be ###-beta.png.
Form groups now have a notion of "in-battle", which is used to hide
overworld sprites when appropriate.
Form sprites have a first-class sense of being a default or not, too.
Deoxys is... well, let's not talk about Deoxys. Deoxys is fixed.
Conditions are now condition values; condition groups are conditions.
Types are now terrain. Slots are first-class things.
Encounters' condition values and slots' conditions have been broken off
into their own tables, as HG/SS has several slots affected by multiple
conditions.
Also fixed roomaji conversion to not die spectacularly when given
hiragana. For some reason I let it know about hiragana soukuon and
youon, but nothing else, so it gets totally confused.
Curse's type_id was 0, which is bogus; this has been fixed by creating a
real ????? type.
Fourth-gen moves all had zero as a contest effect id, which was also
bogus.
Pokémon 494 and 495 were junk and have been scrapped entirely.
pokemon_form_groups's description column was too short.
pokedex's connect() now takes kwargs passed to sessionmaker().
A more major change: some tables, like pokemon, are self-referential and
contain rows that refer to rows later in the table (for example, Pikachu
evolves from Pichu, which has a higher id). At the moment such a row is
loaded, the foreign key is thus bogus. I solved this by turning on
autocommit and wrapping add() in a try block, then attempting to readd
every failed row again after the rest of the table is finished. Slows
the import down a bit, but makes it work perfectly with foreign key
checks on.
Types, abilities, egg groups, and stats for Shaymin, Giratina, and Rotom forms.
Updated height and weight for Shaymin and Giratina forms.
Added Giratina's form descriptions and updated Shaymin's to mention link
battles and freezing.
Finally! Location order is the same as from the old dex, which was
something like the game but ultimately arbitrary, so it's not any better
now.
This takes a very different approach to storage, rather than copying the
game exactly and trying to fix everything in code. Comments coming
shortly so other people can actually make use of this.