diff --git a/pokedex/data/csv/pokemon_form_generations.csv b/pokedex/data/csv/pokemon_form_generations.csv new file mode 100644 index 0000000..f9adc46 --- /dev/null +++ b/pokedex/data/csv/pokemon_form_generations.csv @@ -0,0 +1,2130 @@ +pokemon_form_id,generation_id,game_index +1,1,0 +1,2,0 +1,3,0 +1,4,0 +1,5,0 +2,1,0 +2,2,0 +2,3,0 +2,4,0 +2,5,0 +3,1,0 +3,2,0 +3,3,0 +3,4,0 +3,5,0 +4,1,0 +4,2,0 +4,3,0 +4,4,0 +4,5,0 +5,1,0 +5,2,0 +5,3,0 +5,4,0 +5,5,0 +6,1,0 +6,2,0 +6,3,0 +6,4,0 +6,5,0 +7,1,0 +7,2,0 +7,3,0 +7,4,0 +7,5,0 +8,1,0 +8,2,0 +8,3,0 +8,4,0 +8,5,0 +9,1,0 +9,2,0 +9,3,0 +9,4,0 +9,5,0 +10,1,0 +10,2,0 +10,3,0 +10,4,0 +10,5,0 +11,1,0 +11,2,0 +11,3,0 +11,4,0 +11,5,0 +12,1,0 +12,2,0 +12,3,0 +12,4,0 +12,5,0 +13,1,0 +13,2,0 +13,3,0 +13,4,0 +13,5,0 +14,1,0 +14,2,0 +14,3,0 +14,4,0 +14,5,0 +15,1,0 +15,2,0 +15,3,0 +15,4,0 +15,5,0 +16,1,0 +16,2,0 +16,3,0 +16,4,0 +16,5,0 +17,1,0 +17,2,0 +17,3,0 +17,4,0 +17,5,0 +18,1,0 +18,2,0 +18,3,0 +18,4,0 +18,5,0 +19,1,0 +19,2,0 +19,3,0 +19,4,0 +19,5,0 +20,1,0 +20,2,0 +20,3,0 +20,4,0 +20,5,0 +21,1,0 +21,2,0 +21,3,0 +21,4,0 +21,5,0 +22,1,0 +22,2,0 +22,3,0 +22,4,0 +22,5,0 +23,1,0 +23,2,0 +23,3,0 +23,4,0 +23,5,0 +24,1,0 +24,2,0 +24,3,0 +24,4,0 +24,5,0 +25,1,0 +25,2,0 +25,3,0 +25,4,0 +25,5,0 +26,1,0 +26,2,0 +26,3,0 +26,4,0 +26,5,0 +27,1,0 +27,2,0 +27,3,0 +27,4,0 +27,5,0 +28,1,0 +28,2,0 +28,3,0 +28,4,0 +28,5,0 +29,1,0 +29,2,0 +29,3,0 +29,4,0 +29,5,0 +30,1,0 +30,2,0 +30,3,0 +30,4,0 +30,5,0 +31,1,0 +31,2,0 +31,3,0 +31,4,0 +31,5,0 +32,1,0 +32,2,0 +32,3,0 +32,4,0 +32,5,0 +33,1,0 +33,2,0 +33,3,0 +33,4,0 +33,5,0 +34,1,0 +34,2,0 +34,3,0 +34,4,0 +34,5,0 +35,1,0 +35,2,0 +35,3,0 +35,4,0 +35,5,0 +36,1,0 +36,2,0 +36,3,0 +36,4,0 +36,5,0 +37,1,0 +37,2,0 +37,3,0 +37,4,0 +37,5,0 +38,1,0 +38,2,0 +38,3,0 +38,4,0 +38,5,0 +39,1,0 +39,2,0 +39,3,0 +39,4,0 +39,5,0 +40,1,0 +40,2,0 +40,3,0 +40,4,0 +40,5,0 +41,1,0 +41,2,0 +41,3,0 +41,4,0 +41,5,0 +42,1,0 +42,2,0 +42,3,0 +42,4,0 +42,5,0 +43,1,0 +43,2,0 +43,3,0 +43,4,0 +43,5,0 +44,1,0 +44,2,0 +44,3,0 +44,4,0 +44,5,0 +45,1,0 +45,2,0 +45,3,0 +45,4,0 +45,5,0 +46,1,0 +46,2,0 +46,3,0 +46,4,0 +46,5,0 +47,1,0 +47,2,0 +47,3,0 +47,4,0 +47,5,0 +48,1,0 +48,2,0 +48,3,0 +48,4,0 +48,5,0 +49,1,0 +49,2,0 +49,3,0 +49,4,0 +49,5,0 +50,1,0 +50,2,0 +50,3,0 +50,4,0 +50,5,0 +51,1,0 +51,2,0 +51,3,0 +51,4,0 +51,5,0 +52,1,0 +52,2,0 +52,3,0 +52,4,0 +52,5,0 +53,1,0 +53,2,0 +53,3,0 +53,4,0 +53,5,0 +54,1,0 +54,2,0 +54,3,0 +54,4,0 +54,5,0 +55,1,0 +55,2,0 +55,3,0 +55,4,0 +55,5,0 +56,1,0 +56,2,0 +56,3,0 +56,4,0 +56,5,0 +57,1,0 +57,2,0 +57,3,0 +57,4,0 +57,5,0 +58,1,0 +58,2,0 +58,3,0 +58,4,0 +58,5,0 +59,1,0 +59,2,0 +59,3,0 +59,4,0 +59,5,0 +60,1,0 +60,2,0 +60,3,0 +60,4,0 +60,5,0 +61,1,0 +61,2,0 +61,3,0 +61,4,0 +61,5,0 +62,1,0 +62,2,0 +62,3,0 +62,4,0 +62,5,0 +63,1,0 +63,2,0 +63,3,0 +63,4,0 +63,5,0 +64,1,0 +64,2,0 +64,3,0 +64,4,0 +64,5,0 +65,1,0 +65,2,0 +65,3,0 +65,4,0 +65,5,0 +66,1,0 +66,2,0 +66,3,0 +66,4,0 +66,5,0 +67,1,0 +67,2,0 +67,3,0 +67,4,0 +67,5,0 +68,1,0 +68,2,0 +68,3,0 +68,4,0 +68,5,0 +69,1,0 +69,2,0 +69,3,0 +69,4,0 +69,5,0 +70,1,0 +70,2,0 +70,3,0 +70,4,0 +70,5,0 +71,1,0 +71,2,0 +71,3,0 +71,4,0 +71,5,0 +72,1,0 +72,2,0 +72,3,0 +72,4,0 +72,5,0 +73,1,0 +73,2,0 +73,3,0 +73,4,0 +73,5,0 +74,1,0 +74,2,0 +74,3,0 +74,4,0 +74,5,0 +75,1,0 +75,2,0 +75,3,0 +75,4,0 +75,5,0 +76,1,0 +76,2,0 +76,3,0 +76,4,0 +76,5,0 +77,1,0 +77,2,0 +77,3,0 +77,4,0 +77,5,0 +78,1,0 +78,2,0 +78,3,0 +78,4,0 +78,5,0 +79,1,0 +79,2,0 +79,3,0 +79,4,0 +79,5,0 +80,1,0 +80,2,0 +80,3,0 +80,4,0 +80,5,0 +81,1,0 +81,2,0 +81,3,0 +81,4,0 +81,5,0 +82,1,0 +82,2,0 +82,3,0 +82,4,0 +82,5,0 +83,1,0 +83,2,0 +83,3,0 +83,4,0 +83,5,0 +84,1,0 +84,2,0 +84,3,0 +84,4,0 +84,5,0 +85,1,0 +85,2,0 +85,3,0 +85,4,0 +85,5,0 +86,1,0 +86,2,0 +86,3,0 +86,4,0 +86,5,0 +87,1,0 +87,2,0 +87,3,0 +87,4,0 +87,5,0 +88,1,0 +88,2,0 +88,3,0 +88,4,0 +88,5,0 +89,1,0 +89,2,0 +89,3,0 +89,4,0 +89,5,0 +90,1,0 +90,2,0 +90,3,0 +90,4,0 +90,5,0 +91,1,0 +91,2,0 +91,3,0 +91,4,0 +91,5,0 +92,1,0 +92,2,0 +92,3,0 +92,4,0 +92,5,0 +93,1,0 +93,2,0 +93,3,0 +93,4,0 +93,5,0 +94,1,0 +94,2,0 +94,3,0 +94,4,0 +94,5,0 +95,1,0 +95,2,0 +95,3,0 +95,4,0 +95,5,0 +96,1,0 +96,2,0 +96,3,0 +96,4,0 +96,5,0 +97,1,0 +97,2,0 +97,3,0 +97,4,0 +97,5,0 +98,1,0 +98,2,0 +98,3,0 +98,4,0 +98,5,0 +99,1,0 +99,2,0 +99,3,0 +99,4,0 +99,5,0 +100,1,0 +100,2,0 +100,3,0 +100,4,0 +100,5,0 +101,1,0 +101,2,0 +101,3,0 +101,4,0 +101,5,0 +102,1,0 +102,2,0 +102,3,0 +102,4,0 +102,5,0 +103,1,0 +103,2,0 +103,3,0 +103,4,0 +103,5,0 +104,1,0 +104,2,0 +104,3,0 +104,4,0 +104,5,0 +105,1,0 +105,2,0 +105,3,0 +105,4,0 +105,5,0 +106,1,0 +106,2,0 +106,3,0 +106,4,0 +106,5,0 +107,1,0 +107,2,0 +107,3,0 +107,4,0 +107,5,0 +108,1,0 +108,2,0 +108,3,0 +108,4,0 +108,5,0 +109,1,0 +109,2,0 +109,3,0 +109,4,0 +109,5,0 +110,1,0 +110,2,0 +110,3,0 +110,4,0 +110,5,0 +111,1,0 +111,2,0 +111,3,0 +111,4,0 +111,5,0 +112,1,0 +112,2,0 +112,3,0 +112,4,0 +112,5,0 +113,1,0 +113,2,0 +113,3,0 +113,4,0 +113,5,0 +114,1,0 +114,2,0 +114,3,0 +114,4,0 +114,5,0 +115,1,0 +115,2,0 +115,3,0 +115,4,0 +115,5,0 +116,1,0 +116,2,0 +116,3,0 +116,4,0 +116,5,0 +117,1,0 +117,2,0 +117,3,0 +117,4,0 +117,5,0 +118,1,0 +118,2,0 +118,3,0 +118,4,0 +118,5,0 +119,1,0 +119,2,0 +119,3,0 +119,4,0 +119,5,0 +120,1,0 +120,2,0 +120,3,0 +120,4,0 +120,5,0 +121,1,0 +121,2,0 +121,3,0 +121,4,0 +121,5,0 +122,1,0 +122,2,0 +122,3,0 +122,4,0 +122,5,0 +123,1,0 +123,2,0 +123,3,0 +123,4,0 +123,5,0 +124,1,0 +124,2,0 +124,3,0 +124,4,0 +124,5,0 +125,1,0 +125,2,0 +125,3,0 +125,4,0 +125,5,0 +126,1,0 +126,2,0 +126,3,0 +126,4,0 +126,5,0 +127,1,0 +127,2,0 +127,3,0 +127,4,0 +127,5,0 +128,1,0 +128,2,0 +128,3,0 +128,4,0 +128,5,0 +129,1,0 +129,2,0 +129,3,0 +129,4,0 +129,5,0 +130,1,0 +130,2,0 +130,3,0 +130,4,0 +130,5,0 +131,1,0 +131,2,0 +131,3,0 +131,4,0 +131,5,0 +132,1,0 +132,2,0 +132,3,0 +132,4,0 +132,5,0 +133,1,0 +133,2,0 +133,3,0 +133,4,0 +133,5,0 +134,1,0 +134,2,0 +134,3,0 +134,4,0 +134,5,0 +135,1,0 +135,2,0 +135,3,0 +135,4,0 +135,5,0 +136,1,0 +136,2,0 +136,3,0 +136,4,0 +136,5,0 +137,1,0 +137,2,0 +137,3,0 +137,4,0 +137,5,0 +138,1,0 +138,2,0 +138,3,0 +138,4,0 +138,5,0 +139,1,0 +139,2,0 +139,3,0 +139,4,0 +139,5,0 +140,1,0 +140,2,0 +140,3,0 +140,4,0 +140,5,0 +141,1,0 +141,2,0 +141,3,0 +141,4,0 +141,5,0 +142,1,0 +142,2,0 +142,3,0 +142,4,0 +142,5,0 +143,1,0 +143,2,0 +143,3,0 +143,4,0 +143,5,0 +144,1,0 +144,2,0 +144,3,0 +144,4,0 +144,5,0 +145,1,0 +145,2,0 +145,3,0 +145,4,0 +145,5,0 +146,1,0 +146,2,0 +146,3,0 +146,4,0 +146,5,0 +147,1,0 +147,2,0 +147,3,0 +147,4,0 +147,5,0 +148,1,0 +148,2,0 +148,3,0 +148,4,0 +148,5,0 +149,1,0 +149,2,0 +149,3,0 +149,4,0 +149,5,0 +150,1,0 +150,2,0 +150,3,0 +150,4,0 +150,5,0 +151,1,0 +151,2,0 +151,3,0 +151,4,0 +151,5,0 +152,2,0 +152,3,0 +152,4,0 +152,5,0 +153,2,0 +153,3,0 +153,4,0 +153,5,0 +154,2,0 +154,3,0 +154,4,0 +154,5,0 +155,2,0 +155,3,0 +155,4,0 +155,5,0 +156,2,0 +156,3,0 +156,4,0 +156,5,0 +157,2,0 +157,3,0 +157,4,0 +157,5,0 +158,2,0 +158,3,0 +158,4,0 +158,5,0 +159,2,0 +159,3,0 +159,4,0 +159,5,0 +160,2,0 +160,3,0 +160,4,0 +160,5,0 +161,2,0 +161,3,0 +161,4,0 +161,5,0 +162,2,0 +162,3,0 +162,4,0 +162,5,0 +163,2,0 +163,3,0 +163,4,0 +163,5,0 +164,2,0 +164,3,0 +164,4,0 +164,5,0 +165,2,0 +165,3,0 +165,4,0 +165,5,0 +166,2,0 +166,3,0 +166,4,0 +166,5,0 +167,2,0 +167,3,0 +167,4,0 +167,5,0 +168,2,0 +168,3,0 +168,4,0 +168,5,0 +169,2,0 +169,3,0 +169,4,0 +169,5,0 +170,2,0 +170,3,0 +170,4,0 +170,5,0 +171,2,0 +171,3,0 +171,4,0 +171,5,0 +172,2,0 +172,3,0 +172,4,0 +172,5,0 +173,2,0 +173,3,0 +173,4,0 +173,5,0 +174,2,0 +174,3,0 +174,4,0 +174,5,0 +175,2,0 +175,3,0 +175,4,0 +175,5,0 +176,2,0 +176,3,0 +176,4,0 +176,5,0 +177,2,0 +177,3,0 +177,4,0 +177,5,0 +178,2,0 +178,3,0 +178,4,0 +178,5,0 +179,2,0 +179,3,0 +179,4,0 +179,5,0 +180,2,0 +180,3,0 +180,4,0 +180,5,0 +181,2,0 +181,3,0 +181,4,0 +181,5,0 +182,2,0 +182,3,0 +182,4,0 +182,5,0 +183,2,0 +183,3,0 +183,4,0 +183,5,0 +184,2,0 +184,3,0 +184,4,0 +184,5,0 +185,2,0 +185,3,0 +185,4,0 +185,5,0 +186,2,0 +186,3,0 +186,4,0 +186,5,0 +187,2,0 +187,3,0 +187,4,0 +187,5,0 +188,2,0 +188,3,0 +188,4,0 +188,5,0 +189,2,0 +189,3,0 +189,4,0 +189,5,0 +190,2,0 +190,3,0 +190,4,0 +190,5,0 +191,2,0 +191,3,0 +191,4,0 +191,5,0 +192,2,0 +192,3,0 +192,4,0 +192,5,0 +193,2,0 +193,3,0 +193,4,0 +193,5,0 +194,2,0 +194,3,0 +194,4,0 +194,5,0 +195,2,0 +195,3,0 +195,4,0 +195,5,0 +196,2,0 +196,3,0 +196,4,0 +196,5,0 +197,2,0 +197,3,0 +197,4,0 +197,5,0 +198,2,0 +198,3,0 +198,4,0 +198,5,0 +199,2,0 +199,3,0 +199,4,0 +199,5,0 +200,2,0 +200,3,0 +200,4,0 +200,5,0 +201,2,0 +201,3,0 +201,4,0 +201,5,0 +202,2,0 +202,3,0 +202,4,0 +202,5,0 +203,2,0 +203,3,0 +203,4,0 +203,5,0 +204,2,0 +204,3,0 +204,4,0 +204,5,0 +205,2,0 +205,3,0 +205,4,0 +205,5,0 +206,2,0 +206,3,0 +206,4,0 +206,5,0 +207,2,0 +207,3,0 +207,4,0 +207,5,0 +208,2,0 +208,3,0 +208,4,0 +208,5,0 +209,2,0 +209,3,0 +209,4,0 +209,5,0 +210,2,0 +210,3,0 +210,4,0 +210,5,0 +211,2,0 +211,3,0 +211,4,0 +211,5,0 +212,2,0 +212,3,0 +212,4,0 +212,5,0 +213,2,0 +213,3,0 +213,4,0 +213,5,0 +214,2,0 +214,3,0 +214,4,0 +214,5,0 +215,2,0 +215,3,0 +215,4,0 +215,5,0 +216,2,0 +216,3,0 +216,4,0 +216,5,0 +217,2,0 +217,3,0 +217,4,0 +217,5,0 +218,2,0 +218,3,0 +218,4,0 +218,5,0 +219,2,0 +219,3,0 +219,4,0 +219,5,0 +220,2,0 +220,3,0 +220,4,0 +220,5,0 +221,2,0 +221,3,0 +221,4,0 +221,5,0 +222,2,0 +222,3,0 +222,4,0 +222,5,0 +223,2,0 +223,3,0 +223,4,0 +223,5,0 +224,2,0 +224,3,0 +224,4,0 +224,5,0 +225,2,0 +225,3,0 +225,4,0 +225,5,0 +226,2,0 +226,3,0 +226,4,0 +226,5,0 +227,2,0 +227,3,0 +227,4,0 +227,5,0 +228,2,0 +228,3,0 +228,4,0 +228,5,0 +229,2,0 +229,3,0 +229,4,0 +229,5,0 +230,2,0 +230,3,0 +230,4,0 +230,5,0 +231,2,0 +231,3,0 +231,4,0 +231,5,0 +232,2,0 +232,3,0 +232,4,0 +232,5,0 +233,2,0 +233,3,0 +233,4,0 +233,5,0 +234,2,0 +234,3,0 +234,4,0 +234,5,0 +235,2,0 +235,3,0 +235,4,0 +235,5,0 +236,2,0 +236,3,0 +236,4,0 +236,5,0 +237,2,0 +237,3,0 +237,4,0 +237,5,0 +238,2,0 +238,3,0 +238,4,0 +238,5,0 +239,2,0 +239,3,0 +239,4,0 +239,5,0 +240,2,0 +240,3,0 +240,4,0 +240,5,0 +241,2,0 +241,3,0 +241,4,0 +241,5,0 +242,2,0 +242,3,0 +242,4,0 +242,5,0 +243,2,0 +243,3,0 +243,4,0 +243,5,0 +244,2,0 +244,3,0 +244,4,0 +244,5,0 +245,2,0 +245,3,0 +245,4,0 +245,5,0 +246,2,0 +246,3,0 +246,4,0 +246,5,0 +247,2,0 +247,3,0 +247,4,0 +247,5,0 +248,2,0 +248,3,0 +248,4,0 +248,5,0 +249,2,0 +249,3,0 +249,4,0 +249,5,0 +250,2,0 +250,3,0 +250,4,0 +250,5,0 +251,2,0 +251,3,0 +251,4,0 +251,5,0 +252,3,0 +252,4,0 +252,5,0 +253,3,0 +253,4,0 +253,5,0 +254,3,0 +254,4,0 +254,5,0 +255,3,0 +255,4,0 +255,5,0 +256,3,0 +256,4,0 +256,5,0 +257,3,0 +257,4,0 +257,5,0 +258,3,0 +258,4,0 +258,5,0 +259,3,0 +259,4,0 +259,5,0 +260,3,0 +260,4,0 +260,5,0 +261,3,0 +261,4,0 +261,5,0 +262,3,0 +262,4,0 +262,5,0 +263,3,0 +263,4,0 +263,5,0 +264,3,0 +264,4,0 +264,5,0 +265,3,0 +265,4,0 +265,5,0 +266,3,0 +266,4,0 +266,5,0 +267,3,0 +267,4,0 +267,5,0 +268,3,0 +268,4,0 +268,5,0 +269,3,0 +269,4,0 +269,5,0 +270,3,0 +270,4,0 +270,5,0 +271,3,0 +271,4,0 +271,5,0 +272,3,0 +272,4,0 +272,5,0 +273,3,0 +273,4,0 +273,5,0 +274,3,0 +274,4,0 +274,5,0 +275,3,0 +275,4,0 +275,5,0 +276,3,0 +276,4,0 +276,5,0 +277,3,0 +277,4,0 +277,5,0 +278,3,0 +278,4,0 +278,5,0 +279,3,0 +279,4,0 +279,5,0 +280,3,0 +280,4,0 +280,5,0 +281,3,0 +281,4,0 +281,5,0 +282,3,0 +282,4,0 +282,5,0 +283,3,0 +283,4,0 +283,5,0 +284,3,0 +284,4,0 +284,5,0 +285,3,0 +285,4,0 +285,5,0 +286,3,0 +286,4,0 +286,5,0 +287,3,0 +287,4,0 +287,5,0 +288,3,0 +288,4,0 +288,5,0 +289,3,0 +289,4,0 +289,5,0 +290,3,0 +290,4,0 +290,5,0 +291,3,0 +291,4,0 +291,5,0 +292,3,0 +292,4,0 +292,5,0 +293,3,0 +293,4,0 +293,5,0 +294,3,0 +294,4,0 +294,5,0 +295,3,0 +295,4,0 +295,5,0 +296,3,0 +296,4,0 +296,5,0 +297,3,0 +297,4,0 +297,5,0 +298,3,0 +298,4,0 +298,5,0 +299,3,0 +299,4,0 +299,5,0 +300,3,0 +300,4,0 +300,5,0 +301,3,0 +301,4,0 +301,5,0 +302,3,0 +302,4,0 +302,5,0 +303,3,0 +303,4,0 +303,5,0 +304,3,0 +304,4,0 +304,5,0 +305,3,0 +305,4,0 +305,5,0 +306,3,0 +306,4,0 +306,5,0 +307,3,0 +307,4,0 +307,5,0 +308,3,0 +308,4,0 +308,5,0 +309,3,0 +309,4,0 +309,5,0 +310,3,0 +310,4,0 +310,5,0 +311,3,0 +311,4,0 +311,5,0 +312,3,0 +312,4,0 +312,5,0 +313,3,0 +313,4,0 +313,5,0 +314,3,0 +314,4,0 +314,5,0 +315,3,0 +315,4,0 +315,5,0 +316,3,0 +316,4,0 +316,5,0 +317,3,0 +317,4,0 +317,5,0 +318,3,0 +318,4,0 +318,5,0 +319,3,0 +319,4,0 +319,5,0 +320,3,0 +320,4,0 +320,5,0 +321,3,0 +321,4,0 +321,5,0 +322,3,0 +322,4,0 +322,5,0 +323,3,0 +323,4,0 +323,5,0 +324,3,0 +324,4,0 +324,5,0 +325,3,0 +325,4,0 +325,5,0 +326,3,0 +326,4,0 +326,5,0 +327,3,0 +327,4,0 +327,5,0 +328,3,0 +328,4,0 +328,5,0 +329,3,0 +329,4,0 +329,5,0 +330,3,0 +330,4,0 +330,5,0 +331,3,0 +331,4,0 +331,5,0 +332,3,0 +332,4,0 +332,5,0 +333,3,0 +333,4,0 +333,5,0 +334,3,0 +334,4,0 +334,5,0 +335,3,0 +335,4,0 +335,5,0 +336,3,0 +336,4,0 +336,5,0 +337,3,0 +337,4,0 +337,5,0 +338,3,0 +338,4,0 +338,5,0 +339,3,0 +339,4,0 +339,5,0 +340,3,0 +340,4,0 +340,5,0 +341,3,0 +341,4,0 +341,5,0 +342,3,0 +342,4,0 +342,5,0 +343,3,0 +343,4,0 +343,5,0 +344,3,0 +344,4,0 +344,5,0 +345,3,0 +345,4,0 +345,5,0 +346,3,0 +346,4,0 +346,5,0 +347,3,0 +347,4,0 +347,5,0 +348,3,0 +348,4,0 +348,5,0 +349,3,0 +349,4,0 +349,5,0 +350,3,0 +350,4,0 +350,5,0 +351,3,0 +351,4,0 +351,5,0 +352,3,0 +352,4,0 +352,5,0 +353,3,0 +353,4,0 +353,5,0 +354,3,0 +354,4,0 +354,5,0 +355,3,0 +355,4,0 +355,5,0 +356,3,0 +356,4,0 +356,5,0 +357,3,0 +357,4,0 +357,5,0 +358,3,0 +358,4,0 +358,5,0 +359,3,0 +359,4,0 +359,5,0 +360,3,0 +360,4,0 +360,5,0 +361,3,0 +361,4,0 +361,5,0 +362,3,0 +362,4,0 +362,5,0 +363,3,0 +363,4,0 +363,5,0 +364,3,0 +364,4,0 +364,5,0 +365,3,0 +365,4,0 +365,5,0 +366,3,0 +366,4,0 +366,5,0 +367,3,0 +367,4,0 +367,5,0 +368,3,0 +368,4,0 +368,5,0 +369,3,0 +369,4,0 +369,5,0 +370,3,0 +370,4,0 +370,5,0 +371,3,0 +371,4,0 +371,5,0 +372,3,0 +372,4,0 +372,5,0 +373,3,0 +373,4,0 +373,5,0 +374,3,0 +374,4,0 +374,5,0 +375,3,0 +375,4,0 +375,5,0 +376,3,0 +376,4,0 +376,5,0 +377,3,0 +377,4,0 +377,5,0 +378,3,0 +378,4,0 +378,5,0 +379,3,0 +379,4,0 +379,5,0 +380,3,0 +380,4,0 +380,5,0 +381,3,0 +381,4,0 +381,5,0 +382,3,0 +382,4,0 +382,5,0 +383,3,0 +383,4,0 +383,5,0 +384,3,0 +384,4,0 +384,5,0 +385,3,0 +385,4,0 +385,5,0 +386,3,0 +386,4,0 +386,5,0 +387,4,0 +387,5,0 +388,4,0 +388,5,0 +389,4,0 +389,5,0 +390,4,0 +390,5,0 +391,4,0 +391,5,0 +392,4,0 +392,5,0 +393,4,0 +393,5,0 +394,4,0 +394,5,0 +395,4,0 +395,5,0 +396,4,0 +396,5,0 +397,4,0 +397,5,0 +398,4,0 +398,5,0 +399,4,0 +399,5,0 +400,4,0 +400,5,0 +401,4,0 +401,5,0 +402,4,0 +402,5,0 +403,4,0 +403,5,0 +404,4,0 +404,5,0 +405,4,0 +405,5,0 +406,4,0 +406,5,0 +407,4,0 +407,5,0 +408,4,0 +408,5,0 +409,4,0 +409,5,0 +410,4,0 +410,5,0 +411,4,0 +411,5,0 +412,4,0 +412,5,0 +413,4,0 +413,5,0 +414,4,0 +414,5,0 +415,4,0 +415,5,0 +416,4,0 +416,5,0 +417,4,0 +417,5,0 +418,4,0 +418,5,0 +419,4,0 +419,5,0 +420,4,0 +420,5,0 +421,4,0 +421,5,0 +422,4,0 +422,5,0 +423,4,0 +423,5,0 +424,4,0 +424,5,0 +425,4,0 +425,5,0 +426,4,0 +426,5,0 +427,4,0 +427,5,0 +428,4,0 +428,5,0 +429,4,0 +429,5,0 +430,4,0 +430,5,0 +431,4,0 +431,5,0 +432,4,0 +432,5,0 +433,4,0 +433,5,0 +434,4,0 +434,5,0 +435,4,0 +435,5,0 +436,4,0 +436,5,0 +437,4,0 +437,5,0 +438,4,0 +438,5,0 +439,4,0 +439,5,0 +440,4,0 +440,5,0 +441,4,0 +441,5,0 +442,4,0 +442,5,0 +443,4,0 +443,5,0 +444,4,0 +444,5,0 +445,4,0 +445,5,0 +446,4,0 +446,5,0 +447,4,0 +447,5,0 +448,4,0 +448,5,0 +449,4,0 +449,5,0 +450,4,0 +450,5,0 +451,4,0 +451,5,0 +452,4,0 +452,5,0 +453,4,0 +453,5,0 +454,4,0 +454,5,0 +455,4,0 +455,5,0 +456,4,0 +456,5,0 +457,4,0 +457,5,0 +458,4,0 +458,5,0 +459,4,0 +459,5,0 +460,4,0 +460,5,0 +461,4,0 +461,5,0 +462,4,0 +462,5,0 +463,4,0 +463,5,0 +464,4,0 +464,5,0 +465,4,0 +465,5,0 +466,4,0 +466,5,0 +467,4,0 +467,5,0 +468,4,0 +468,5,0 +469,4,0 +469,5,0 +470,4,0 +470,5,0 +471,4,0 +471,5,0 +472,4,0 +472,5,0 +473,4,0 +473,5,0 +474,4,0 +474,5,0 +475,4,0 +475,5,0 +476,4,0 +476,5,0 +477,4,0 +477,5,0 +478,4,0 +478,5,0 +479,4,0 +479,5,0 +480,4,0 +480,5,0 +481,4,0 +481,5,0 +482,4,0 +482,5,0 +483,4,0 +483,5,0 +484,4,0 +484,5,0 +485,4,0 +485,5,0 +486,4,0 +486,5,0 +487,4,0 +487,5,0 +488,4,0 +488,5,0 +489,4,0 +489,5,0 +490,4,0 +490,5,0 +491,4,0 +491,5,0 +492,4,0 +492,5,0 +493,4,0 +493,5,0 +494,5,0 +495,5,0 +496,5,0 +497,5,0 +498,5,0 +499,5,0 +500,5,0 +501,5,0 +502,5,0 +503,5,0 +504,5,0 +505,5,0 +506,5,0 +507,5,0 +508,5,0 +509,5,0 +510,5,0 +511,5,0 +512,5,0 +513,5,0 +514,5,0 +515,5,0 +516,5,0 +517,5,0 +518,5,0 +519,5,0 +520,5,0 +521,5,0 +522,5,0 +523,5,0 +524,5,0 +525,5,0 +526,5,0 +527,5,0 +528,5,0 +529,5,0 +530,5,0 +531,5,0 +532,5,0 +533,5,0 +534,5,0 +535,5,0 +536,5,0 +537,5,0 +538,5,0 +539,5,0 +540,5,0 +541,5,0 +542,5,0 +543,5,0 +544,5,0 +545,5,0 +546,5,0 +547,5,0 +548,5,0 +549,5,0 +550,5,0 +551,5,0 +552,5,0 +553,5,0 +554,5,0 +555,5,0 +556,5,0 +557,5,0 +558,5,0 +559,5,0 +560,5,0 +561,5,0 +562,5,0 +563,5,0 +564,5,0 +565,5,0 +566,5,0 +567,5,0 +568,5,0 +569,5,0 +570,5,0 +571,5,0 +572,5,0 +573,5,0 +574,5,0 +575,5,0 +576,5,0 +577,5,0 +578,5,0 +579,5,0 +580,5,0 +581,5,0 +582,5,0 +583,5,0 +584,5,0 +585,5,0 +586,5,0 +587,5,0 +588,5,0 +589,5,0 +590,5,0 +591,5,0 +592,5,0 +593,5,0 +594,5,0 +595,5,0 +596,5,0 +597,5,0 +598,5,0 +599,5,0 +600,5,0 +601,5,0 +602,5,0 +603,5,0 +604,5,0 +605,5,0 +606,5,0 +607,5,0 +608,5,0 +609,5,0 +610,5,0 +611,5,0 +612,5,0 +613,5,0 +614,5,0 +615,5,0 +616,5,0 +617,5,0 +618,5,0 +619,5,0 +620,5,0 +621,5,0 +622,5,0 +623,5,0 +624,5,0 +625,5,0 +626,5,0 +627,5,0 +628,5,0 +629,5,0 +630,5,0 +631,5,0 +632,5,0 +633,5,0 +634,5,0 +635,5,0 +636,5,0 +637,5,0 +638,5,0 +639,5,0 +640,5,0 +641,5,0 +642,5,0 +643,5,0 +644,5,0 +645,5,0 +646,5,0 +647,5,0 +648,5,0 +649,5,0 +650,2,1 +650,3,1 +650,4,1 +650,5,1 +651,2,2 +651,3,2 +651,4,2 +651,5,2 +652,2,3 +652,3,3 +652,4,3 +652,5,3 +653,2,4 +653,3,4 +653,4,4 +653,5,4 +654,2,5 +654,3,5 +654,4,5 +654,5,5 +655,2,6 +655,3,6 +655,4,6 +655,5,6 +656,2,7 +656,3,7 +656,4,7 +656,5,7 +657,2,8 +657,3,8 +657,4,8 +657,5,8 +658,2,9 +658,3,9 +658,4,9 +658,5,9 +659,2,10 +659,3,10 +659,4,10 +659,5,10 +660,2,11 +660,3,11 +660,4,11 +660,5,11 +661,2,12 +661,3,12 +661,4,12 +661,5,12 +662,2,13 +662,3,13 +662,4,13 +662,5,13 +663,2,14 +663,3,14 +663,4,14 +663,5,14 +664,2,15 +664,3,15 +664,4,15 +664,5,15 +665,2,16 +665,3,16 +665,4,16 +665,5,16 +666,2,17 +666,3,17 +666,4,17 +666,5,17 +667,2,18 +667,3,18 +667,4,18 +667,5,18 +668,2,19 +668,3,19 +668,4,19 +668,5,19 +669,2,20 +669,3,20 +669,4,20 +669,5,20 +670,2,21 +670,3,21 +670,4,21 +670,5,21 +671,2,22 +671,3,22 +671,4,22 +671,5,22 +672,2,23 +672,3,23 +672,4,23 +672,5,23 +673,2,24 +673,3,24 +673,4,24 +673,5,24 +674,2,25 +674,3,25 +674,4,25 +674,5,25 +675,3,26 +675,4,26 +675,5,26 +676,3,27 +676,4,27 +676,5,27 +677,3,1 +677,4,1 +677,5,1 +678,3,2 +678,4,2 +678,5,2 +679,3,3 +679,4,3 +679,5,3 +680,3,0 +680,4,1 +680,5,1 +681,3,0 +681,4,2 +681,5,2 +682,3,0 +682,4,3 +682,5,3 +683,4,1 +683,5,1 +684,4,2 +684,5,2 +685,4,1 +685,5,1 +686,4,2 +686,5,2 +687,4,1 +687,5,1 +688,4,1 +688,5,1 +689,4,1 +689,5,1 +690,4,6 +690,5,6 +691,4,17 +691,5,16 +692,4,16 +692,5,15 +693,4,13 +693,5,12 +694,4,1 +694,5,1 +695,4,10 +695,5,9 +696,4,2 +696,5,2 +697,4,7 +697,5,7 +698,4,12 +698,5,11 +699,4,4 +699,5,4 +700,4,15 +700,5,14 +701,4,3 +701,5,3 +702,4,14 +702,5,13 +703,4,5 +703,5,5 +704,4,8 +704,5,8 +705,4,11 +705,5,10 +706,4,9 +707,4,1 +707,5,1 +708,4,2 +708,5,2 +709,4,3 +709,5,3 +710,4,4 +710,5,4 +711,4,5 +711,5,5 +712,4,1 +712,5,1 +713,4,1 +713,5,1 +714,4,1 +715,5,1 +716,5,1 +717,5,1 +718,5,2 +719,5,3 +720,5,1 +721,5,2 +722,5,3 +723,5,1 +724,5,1 +725,5,2 +726,5,3 +727,5,4 diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index c3b92ae..ce62dd2 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -1249,6 +1249,16 @@ create_translation_table('pokemon_form_names', PokemonForm, 'names', info=dict(description=u"The full pokémon name, e.g. 'Sky Shaymin', for pokémon with different forms", format='plaintext', official=True)), ) +class PokemonFormGeneration(TableBase): + u"""Links Pokémon forms to the generations they exist in""" + __tablename__ = 'pokemon_form_generations' + pokemon_form_id = Column(Integer, ForeignKey('pokemon_forms.id'), primary_key=True, nullable=False, autoincrement=False, + info=dict(description=u'The ID of the Pokémon form.')) + generation_id = Column(Integer, ForeignKey('generations.id'), primary_key=True, nullable=False, autoincrement=False, + info=dict(description=u'The ID of the generation.')) + game_index = Column(Integer, nullable=False, + info=dict(description=u'The internal ID the games use for this form.')) + class PokemonFormPokeathlonStat(TableBase): u"""A Pokémon form's performance in one Pokéathlon stat.""" __tablename__ = 'pokemon_form_pokeathlon_stats' @@ -1978,6 +1988,13 @@ PokemonForm.pokeathlon_stats = relationship(PokemonFormPokeathlonStat, PokemonFormPokeathlonStat.pokeathlon_stat = relationship(PokeathlonStat, innerjoin=True, lazy='joined') +PokemonFormGeneration.form = relationship(PokemonForm, + backref=backref('pokemon_form_generations', + order_by=PokemonFormGeneration.generation_id)) +PokemonFormGeneration.generation = relationship(Generation, + backref=backref('pokemon_form_generations', + order_by=PokemonFormGeneration.game_index)) + PokemonItem.item = relationship(Item, innerjoin=True, lazy='joined', backref='pokemon') diff --git a/scripts/fill-pokemon_form_generations.py b/scripts/fill-pokemon_form_generations.py new file mode 100644 index 0000000..02e4fb7 --- /dev/null +++ b/scripts/fill-pokemon_form_generations.py @@ -0,0 +1,143 @@ +# Encoding: UTF-8 +"""Fill the pokemon_form_generations table + +This is an unmaintained one-shot script, only included in the repo for reference. + + +""" + + +from sqlalchemy.sql import exists, func +from sqlalchemy.orm import lazyload, eagerload, eagerload_all +from sqlalchemy import and_, or_, not_ + +from pokedex.db import connect, tables, load + +session = connect() + +session.query(tables.PokemonFormGeneration).delete() + +generations = list(session.query(tables.Generation).order_by( + tables.Generation.id)) + +q = session.query(tables.PokemonForm) +q = q.options(eagerload_all('pokemon', 'species')) +q = q.order_by(tables.PokemonForm.order) + +form_orders = dict( + unown=list('abcdefghijklmnopqrstuvwxyz') + ['exclamation', 'question'], + + deoxys=['normal', 'attack', 'defense', 'speed'], + + burmy=['plant', 'sandy', 'trash'], + wormadam=['plant', 'sandy', 'trash'], + + shellos=['west', 'east'], + gastrodon=['west', 'east'], + + rotom=[None, 'heat', 'wash', 'frost', 'fan', 'mow'], + + giratina=['altered', 'origin'], + + shaymin=['land', 'sky'], + + castform=[None, 'sunny', 'rainy', 'snowy'], + basculin=['red-striped', 'blue-striped'], + darmanitan=['standard', 'zen'], + deerling=['spring', 'summer', 'autumn', 'winter'], + sawsbuck=['spring', 'summer', 'autumn', 'winter'], + meloetta=['aria', 'pirouette'], + genesect=[None, 'douse', 'shock', 'burn', 'chill'], + cherrim=['overcast', 'sunshine'], +) + +arceus = {4: '''normal fighting flying poison ground rock bug ghost steel + unknown fire water grass electric psychic ice dragon dark'''.split()} +arceus[5] = list(arceus[4]) +arceus[5].remove('unknown') + +for form in q: + species_ident = form.species.identifier + form_ident = form.form_identifier + is_default = form.is_default and form.pokemon.is_default + print form_ident, species_ident + for gen in generations: + game_index = None + if gen.id >= form.version_group.generation_id: + if gen.id < 4: + # forms not really implemented yet + if species_ident == 'pichu': + if is_default: + game_index = 0 + else: + continue + elif species_ident in ('unown', 'castform'): + lst = form_orders[species_ident] + game_index = lst.index(form_ident) + elif species_ident == 'deoxys': + game_index = 0 + elif is_default: + game_index = 0 + else: + try: + lst = form_orders[species_ident] + except KeyError: + if species_ident == 'pichu' and form_ident == 'spiky-eared': + if gen.id == 4: + game_index = 1 + else: + continue + elif species_ident == 'cherrim': + if gen.id < 5: + if is_default: + game_index = 0 + else: + continue + else: + lst = ['overcast', 'sunshine'] + game_index = lst.index(form_ident) + elif species_ident == 'castform': + if gen.id < 5: + if is_default: + game_index = 0 + else: + continue + else: + lst = [None, 'sunny', 'rainy', 'snowy'] + game_index = lst.index(form_ident) + elif species_ident == 'arceus': + if gen.id >= 5 and form_ident == 'unknown': + continue + else: + lst = arceus[gen.id] + game_index = lst.index(form_ident) + elif form.is_default and form.pokemon.is_default: + game_index = 0 + else: + raise AssertionError() + else: + game_index = lst.index(form_ident) + obj = tables.PokemonFormGeneration(form=form, generation=gen, + game_index=game_index) + session.add(obj) + +q = session.query(tables.PokemonFormGeneration) +for species in session.query(tables.PokemonSpecies).options( + eagerload_all('forms', 'pokemon_form_generations')): + if len(species.forms) > 1: + print species.name + for gen in generations: + if len(species.forms) == 1: + pfg = q.get((species.forms[0].id, gen.id)) + assert pfg is None or pfg.game_index == 0 + continue + forms = [(q.get((f.id, gen.id)), f) for f in species.forms if q.get((f.id, gen.id))] + forms = [(pfg.game_index, f) for pfg, f in forms if pfg] + if forms: + forms.sort() + pl = ["%s=%s" % (gi, f.form_identifier) for gi, f in forms] + print ' ', gen.id, ' '.join(pl) + +load.dump(session, tables=['pokemon_form_generations']) +print "Dumped to CSV, rolling back transaction" +session.rollback()