From ca5b7a9cbf4af53de6dfcb6721ba3e7efcd258b7 Mon Sep 17 00:00:00 2001 From: Andrew Ekstedt Date: Tue, 6 Dec 2011 20:26:31 -0800 Subject: [PATCH] Add B/W encounter methods and conditions Spots: it might seem like they should be conditions, but in practice they behave more like methods. Specifically, conditions typically make only minor changes to an encounter list. Spots change everything. So spots are added as methods, with each type of spot as a separate method. Not exactly ideal, but this causes the least fuss. Seasons work fine as conditions. Well, as well as time-of-day. --- .../data/csv/encounter_condition_prose.csv | 1 + .../csv/encounter_condition_value_prose.csv | 4 ++++ .../data/csv/encounter_condition_values.csv | 4 ++++ pokedex/data/csv/encounter_conditions.csv | 1 + pokedex/data/csv/encounter_method_prose.csv | 6 +++++ pokedex/data/csv/encounter_methods.csv | 22 ++++++++++++------- pokedex/db/tables.py | 2 ++ 7 files changed, 32 insertions(+), 8 deletions(-) diff --git a/pokedex/data/csv/encounter_condition_prose.csv b/pokedex/data/csv/encounter_condition_prose.csv index c6ee690..bcfceba 100644 --- a/pokedex/data/csv/encounter_condition_prose.csv +++ b/pokedex/data/csv/encounter_condition_prose.csv @@ -4,3 +4,4 @@ encounter_condition_id,local_language_id,name 3,9,PokeRadar 4,9,Gen 3 game in slot 2 5,9,Radio +6,9,Season diff --git a/pokedex/data/csv/encounter_condition_value_prose.csv b/pokedex/data/csv/encounter_condition_value_prose.csv index 146b2c5..5fd4543 100644 --- a/pokedex/data/csv/encounter_condition_value_prose.csv +++ b/pokedex/data/csv/encounter_condition_value_prose.csv @@ -15,3 +15,7 @@ encounter_condition_value_id,local_language_id,name 14,9,Radio off 15,9,Hoenn radio 16,9,Sinnoh radio +17,9,During Spring +18,9,During Summer +19,9,During Autumn +20,9,During Winter diff --git a/pokedex/data/csv/encounter_condition_values.csv b/pokedex/data/csv/encounter_condition_values.csv index 9db234a..bf00b4b 100644 --- a/pokedex/data/csv/encounter_condition_values.csv +++ b/pokedex/data/csv/encounter_condition_values.csv @@ -15,3 +15,7 @@ id,encounter_condition_id,identifier,is_default 14,5,radio-off,1 15,5,radio-hoenn,0 16,5,radio-sinnoh,0 +17,6,season-spring,0 +18,6,season-summer,0 +19,6,season-autumn,0 +20,6,season-winter,0 diff --git a/pokedex/data/csv/encounter_conditions.csv b/pokedex/data/csv/encounter_conditions.csv index 29a7d40..f4f38c9 100644 --- a/pokedex/data/csv/encounter_conditions.csv +++ b/pokedex/data/csv/encounter_conditions.csv @@ -4,3 +4,4 @@ id,identifier 3,radar 4,slot2 5,radio +6,season diff --git a/pokedex/data/csv/encounter_method_prose.csv b/pokedex/data/csv/encounter_method_prose.csv index 026db38..5f253df 100644 --- a/pokedex/data/csv/encounter_method_prose.csv +++ b/pokedex/data/csv/encounter_method_prose.csv @@ -6,3 +6,9 @@ encounter_method_id,local_language_id,name 5,9,Surfing 6,9,Smashing rocks 7,9,Headbutting trees +8,9,Walking in dark grass +9,9,Walking in rustling grass +10,9,Walking in dust clouds +11,9,Walking in bridge shadows +12,9,Fishing in dark spots +13,9,Surfing in dark spots diff --git a/pokedex/data/csv/encounter_methods.csv b/pokedex/data/csv/encounter_methods.csv index 268d0fd..b32bff4 100644 --- a/pokedex/data/csv/encounter_methods.csv +++ b/pokedex/data/csv/encounter_methods.csv @@ -1,8 +1,14 @@ -id,identifier -1,walk -2,old-rod -3,good-rod -4,super-rod -5,surf -6,rock-smash -7,headbutt +id,identifier,order +1,walk,1 +2,old-rod,6 +3,good-rod,7 +4,super-rod,8 +5,surf,10 +6,rock-smash,12 +7,headbutt,13 +8,dark-grass,5 +9,grass-spots,2 +10,cave-spots,3 +11,bridge-spots,4 +12,super-rod-spots,9 +13,surf-spots,11 diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 522405c..ad02a4b 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -779,6 +779,8 @@ class EncounterMethod(TableBase): info=dict(description="A unique ID for the method")) identifier = Column(Unicode(16), nullable=False, unique=True, info=dict(description="An identifier", format='identifier')) + order = Column(Integer, unique=True, nullable=False, + info=dict(description="A good column for sorting on")) create_translation_table('encounter_method_prose', EncounterMethod, 'prose', name = Column(Unicode(64), nullable=False, index=True,