Commit graph

1198 commits

Author SHA1 Message Date
Andrew Ekstedt
8161bd84e4 gift-pokemon: fix Cosplay Pikachu and Sinnoh starter gift locations
Cosplay Pikachu was listed as being encountered in contest-hall, but
that's a Sinnoh location. In OR/AS, the contest halls are not a
first-class location but rather just treated as part of the town or city
they are in. Cosplay Pikachu is given to the player after they
participate in their first contest, so its location can be any of the
four cities with a contest hall.

The Sinnoh starter that the player obtains in OR/AS is on Hoenn Route
101, not Sinnoh Route 201 (probably a copy/paste error).

Add a test to make sure that encounter regions always match the
region(s) that their game takes place in.
2019-07-12 18:48:07 -07:00
Andrew Ekstedt
53e0fc0085 gift-encounters: fix Yellow gift pokemon
They were being interpreted as being in Y instead.
2018-11-03 17:19:19 -07:00
Andrew Ekstedt
14bcc8f2bf Rerun gift encounters script 2018-10-27 15:19:59 -07:00
Andrew Ekstedt
ada0e9c545 Set rarity for gift encounter slots 2018-10-27 15:19:59 -07:00
Jonathan Rubin
4155bc4459 gift pokemon CSV updates - 3rd time is the charm
use `pokedex dump` to apply CSV changes
2018-10-06 14:38:06 -04:00
Jonathan Rubin
10db4d9d23 gift-pokemon: Rerun with changes
Using the following steps:
* Unroll the previous commit with bulk CSV changes (b7500e92f0)
* remove and re-initialize the database
* follow the steps in that commit
* Only select location_area_prose in English
    (there's a bunch of czech translations tracked separately in pokedex/data/csv/translations/cs.csv)
2018-09-22 21:45:34 -04:00
Jonathan Rubin
305d4f5d0e gift-pokemon: Quoting on location_area_prose
This change implies no functionality, but it was easiest to just
make it - sqlite insists on quoting spaces, though it's not needed.

Not rolling it back, since theoretically someone could run into the
same thing again in the future.
2018-09-22 21:38:39 -04:00
Jonathan Rubin
203b903999 gift-pokemon: Add encounter_method_prose 2018-09-22 13:27:39 -04:00
Jonathan Rubin
618aa0064b gift-pokemon: separate gift-egg method
This allows us to indicate eggs by the method,
rather than by the level
(which will now merely reflect the hatch level in that generation)
2018-09-19 13:58:25 -04:00
Jonathan Rubin
b7500e92f0 gift-pokemon: CSV file updates
From sqlite:
.headers on
.mode csv
.output $filename
select * from $table
Then remove all the dumb carriage returns in vim
2018-09-19 13:58:25 -04:00
Jonathan Rubin
8694c8464a gift-pokemon: Document empty encounter_slots
I'm going to record gift-pokemon as having no encounter slot, which I
believe is correct by-and-large (since you always get the same mon).

There are a few randomized gift pokemon which do have some type
of encounter slot (eg. Crystal's Odd Egg). Those aren't tracked (yet).
2018-09-19 13:58:25 -04:00
Jonathan Rubin
731cd771d4 gift-pokemon: Add gift encounter method 2018-09-19 13:58:07 -04:00
Andrew Ekstedt
083e43bb93 Add S/M locations
This commit adds Sun & Moon location names from the text dump, for all
official languages: the usual ja, en, fr, it, de, es, ko, and now
zh-Hans (simplified Chinese) and zh-Hant (traditional Chinese).

Fixes #230
Updates #198
2018-09-15 20:01:08 -07:00
Andrew Ekstedt
6d4d129c84 Add subtitle field to Location
Starting in Gen VI, locations have been able to have an optional
subtitle. In-game, the subtitle is displayed on a second line under the
main name.

In X/Y this is used to give some locations an alternate,
flavorful name; for example, Kalos Route 2 is also known as Avance
Trail. In S/M this is mainly used to divide some large locations like
Hau'oli City into separate sections: e.g., the Beachfront, the Shopping
District, and the Marina.

This commit just adds the column; there are no data changes.

I suppose we'll need to go back and re-rip X/Y location names now.
2018-09-15 20:01:08 -07:00
Andrew Ekstedt
f2d03da177 Add OR/AS locations
This commit adds OR/AS location names from the text dump, for all
official languages (ja, en, fr, it, de, ko).

It also updates the names of any pre-existing locations from R/S/E to
use the names from OR/AS. Mostly this only affects the French
translations, which i think were added manually.

"Inside of Truck" was renamed to "???" in all languages, which is dumb,
but whatever.

"Team Magma Hideout" is in fact a different location from the
already-existing "Magma Hideout" - Magma Hideout was from Emerald and
resided in Jagged Pass, while Team Aqua Hideout and Team Magma Hideout
are located outside Lilycove City.

Kalos locations are untouched. I assume they didn't change, but didn't
verify this.

Updates #141
2018-09-15 14:56:53 -07:00
thechief389
f413bf82f0 Fix error when no arguments are specified (#240)
Also, introduce a metavar for the command subparser, since it's currently a bit verbose.
2018-08-22 23:34:27 -07:00
skylar
d17a772b4f Resolve some Python 3 encoding issues on Windows (#244)
When you open a file in Python 3, it defaults to using the system charset to encode the file, which is typically UTF-8 on linux systems (good) but Windows-1251 on Windows (bad).

We need to add explicit encoding=utf-8 arguments to open() calls when we open CSV files for reading or writing. To complicate matters, the csv module works only with byte strings in Python 2, and only with unicode strings in Python 3, so we can't just blindly use `io.open` everywhere.
2018-08-22 23:01:58 -07:00
Andrew Ekstedt
ffb0638ef5 Unbreak SaveFilePokemon slightly
The schema has changed a little in the past, uh, seven years.

Works well enough to parse and display one of my pokemon in the gts
plugin.

Updates veekun/spline-pokedex#72
2018-06-26 23:53:59 -07:00
Dan Keenan
57915f656b Fix TMs 93-100 refer to the wrong item in OR/AS
Fixes #206
2018-04-24 23:02:17 -07:00
Andrew Ekstedt
0c61702213 pass an explicit bind to table.create()
This isn't really necessary, since pokedex.db.connect sets
metadata.bind, but it's better to be explicit.
2018-03-30 15:07:10 -07:00
Andrew Ekstedt
417bd1afa2 fix pypy build
PyPy (>= 3.6) was consistently erroring out during `pokedex load`,
with the error

    OperationalError: (_sqlite3.OperationalError) cannot commit transaction - SQL statements in progress (Background on this error at: http://sqlalche.me/e/e3q8)

It turns out PyPy was not garbage collecting something, causing a
database cursor to be left open. See the giant comment block for
details.
2018-03-30 15:06:34 -07:00
Andrew Ekstedt
56cf0fd29d Squash a bunch of "non-unicode bind param" warnings 2018-03-30 12:14:55 -07:00
Andrew Ekstedt
e1bbe78b72 fix test suite under SQLAlchemy 1.2.x
* SQLAlchemy 1.0 introduced "baked queries" - a way to construct Query
 objects so that they can be cached and reused.

 * SQLAlchemy 1.2 changed lazyloaded columns to use baked queries under the
 hood.

 * Our MultilangQuery class attempts to set _default_language_id right
 before the query is executed by overriding the __iter__ method.

 * Baked queries bypass the __iter__ method and call a lower-level
 method, _execute_and_instances, directly.

 * This caused problems where _default_language_id wouldn't get set
 correctly on lazyloaded columns.

 * To fix, make MultilangQuery override the _execute_and_instances
 method instead of __iter__.

 * This is really just a stopgap: the root cause is that query params
 are not preserved across lazyloads.

Tested with SQLAlchemy 0.9.7, 1.1.18, and 1.2.5.

Updates #236.
2018-03-30 12:01:21 -07:00
Eevee (Lexy Munroe)
a6b7b426c2 Remove some extraneous form names that broke lookup 2017-11-27 09:58:23 -08:00
Eevee (Lexy Munroe)
74e22520db Update Pokémon order 2017-11-25 14:11:46 -08:00
Eevee (Lexy Munroe)
1c982d748f Fix crash when looking up Salazzle 2017-11-25 14:07:25 -08:00
Eevee (Lexy Munroe)
591be9ab8b Populate pokemon_form_generations for USUM 2017-11-25 13:28:36 -08:00
Eevee (Lexy Munroe)
82679b70ea Add Pokémon form names and a couple minor tidbits 2017-11-25 12:07:12 -08:00
Eevee (Lexy Munroe)
45f43231e3 Add Ultra Sun/Ultra Moon data, more or less 2017-11-25 11:30:23 -08:00
Eevee (Lexy Munroe)
73f388ed69 Fix tests, since Farfetch’d got a name change 2017-09-04 10:04:23 -07:00
Eevee (Lexy Munroe)
bf6b2bc646 Populate pokemon_form_generations 2017-09-04 09:04:56 -07:00
Eevee (Lexy Munroe)
a273273823 Updated order columns, identifier Battle Bond Greninja, populated is_battle_only 2017-09-04 03:54:02 -07:00
Eevee (Lexy Munroe)
c3e4f61894 Added SUMO ability effects. 2017-09-02 02:07:16 -07:00
Eevee (Lexy Munroe)
1ef14370f1 Fill in some missing bits and add item effects. 2017-08-29 19:33:20 -07:00
Eevee (Lexy Munroe)
0b81ea0c79 Add SUMO items and Pokémon 2017-08-22 16:23:49 -07:00
Eevee (Lexy Munroe)
7b9aa7de46 Fill in effects for new SUMO moves and a few old XY moves 2017-07-13 21:38:26 -07:00
Eevee (Lexy Munroe)
15c2cb486b Add SUMO moves 2017-07-11 17:27:54 -07:00
Eevee (Lexy Munroe)
3b49944b06 Add a new SUMO ailment; fix gen 6 effect ids to match the games 2017-06-26 21:05:58 -07:00
Eevee (Lexy Munroe)
2af13f4f15 Fix references to "ja" (which is now ja-Hrkt) 2017-06-18 00:15:05 -07:00
Eevee (Lexy Munroe)
329dc81a11 Add SUMO abilities 2017-06-17 23:18:03 -07:00
Eevee (Lexy Munroe)
a33678d8c7 Add Sun/Moon 2017-06-17 23:18:03 -07:00
Eevee (Lexy Munroe)
c3d1b323ac Use script suffixes in lang identifiers; add simplified Chinese 2017-06-17 23:18:03 -07:00
John T. Wodder II
c3f566b2c9 Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
Andrew Ekstedt
82335886e1 Merge pull request #196 from GreatWizard/patch-1
Update item_pocket_names with french
2016-11-20 10:57:15 -08:00
Andrew Ekstedt
5e2d073297 Merge pull request #195 from AlexanderZon/patch-2
Update pokemon_move_method_prose.csv Spanish
2016-11-20 10:56:47 -08:00
Andrew Ekstedt
704566cdaa Merge pull request #194 from AlexanderZon/patch-1
Update move_damage_class_prose.csv Spanish
2016-11-20 10:56:15 -08:00
Andrew Ekstedt
dfd13b8f95 Merge pull request #193 from phmatray/master
Add identifiers to item_fling_effects.csv
2016-11-20 10:55:41 -08:00
Develrox
362a9f4e79 corrected a typo 2016-11-20 10:53:25 -08:00
Guillaume Gérard
251f9194fd Update item_pocket_names with french 2016-11-18 23:52:04 +01:00
Alexis Montenegro
05ff52c009 Update pokemon_move_method_prose.csv Spanish
Spanish Translations
2016-11-10 17:28:27 -04:00