#!/usr/bin/env perl -w # # battle # 2023-01-11 John Simpson # # For Pokemon Scarlet/Violet, tell you which Pokemon types you should or # shouldn't use when battling another Pokemon. # # Last updated 2023-01-12 # ############################################################################### # # The MIT License (MIT) # # Copyright © 2023 John Simpson # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ############################################################################### require 5.005 ; use strict ; use Getopt::Std ; use Term::ReadLine ; ######################################## # Global variables my %pokemon = () ; # name => type (or "type,type") my %pm_num = () ; # num => name my %pmname_name = () ; # name => original name my %pmnum_name = () ; # name => number my %b_mult = () ; # "attack:defend" => multiplier my @types = () ; # order in which type names will be shown my %tname = () ; # type => 1 my %opt = () ; # getopts my $debug_battles = 0 ; # -d my $debug_data = 0 ; # -D my $mono = 0 ; # -m ############################################################################### # # usage sub usage(;$) { my $msg = ( shift || '' ) ; print < ) { ######################################## # If this is a "type,xxx" line, remember the type if ( $line =~ m|^type,(\S+)| ) { my $t = $1 ; push( @types , $t ) ; $tname{$t} = 1 ; } ######################################## # If this is a "num,name,type,[type]" line, remember the pokemon elsif ( $line =~ m|^(\d+),(.+?),(\S+)| ) { my ( $num , $name , $t ) = ( $1 , $2 , $3 ) ; ######################################## # Names used internally are lowercase letters only my $oname = $name ; $name = lc( $name ) ; $name =~ s|[^a-z]||g ; ######################################## # Remember the original names and numbers my $nnn = sprintf( '%03d' , $num ) ; $pm_num{$nnn} = $name ; $pmname_name{$name} = $oname ; $pmnum_name{$name} = $num ; ######################################## # type names are also lowercase only $t = lc( $t ) ; ######################################## # Make sure the type(s) are valid (no typos in data) $debug_data && print "pokemon: num=$num name='$name' t='$t'\n" ; if ( $t =~ m|^(.+?),(\S+)| ) { my ( $t1 , $t2 ) = ( $1 , $2 ) ; unless ( exists $tname{$t1} && exists $tname{$t2} ) { die "ERROR: invalid pokemon type '$t'\n$line" ; } } elsif ( $t =~ m|^(.+?),| ) { $t = $1 ; unless ( exists $tname{$t} ) { die "ERROR: invalid pokemon type '$t'\n$line" ; } } else { die "ERROR: unable to parse pokemon line\n$line" ; } ######################################## # Remember this pokemon's type $pokemon{$name} = $t ; } ######################################## # If this is a battle line, remember the multiplier # for that combination of attacker and defender elsif ( $line =~ m|^(.+?),(.+?),([\d\.]+)| ) { my ( $atk , $def , $mult ) = ( $1 , $2 , $3 ) ; $atk = lc( $atk ) ; $def = lc( $def ) ; unless ( exists $tname{$atk} ) { die "ERROR: invalid attacker type '$atk'\n$line" ; } unless ( exists $tname{$def} ) { die "ERROR: invalid defender type '$def'\n$line" ; } $b_mult{"$atk:$def"} = $mult ; } } } ############################################################################### # # Calculate a single battle. # # Note that this function supports "type,type" for both the attacker and # the defender, even though the script doesn't currently have a way to # specify an attacker - only "try all 18 types as attackers". Hrmmmm... sub battle($$) { my $atk = shift ; my $def = shift ; $debug_battles && print "BATTLE $atk => $def\n" ; my $rv = 1 ; for my $a ( split( /,/ , $atk ) ) { for my $d ( split( /,/ , $def ) ) { $debug_battles && printf " %-8s => %-8s %4.2f" , $a , $d , $rv ; my $m = $b_mult{"$a:$d"} ; $rv *= $m ; $debug_battles && printf " * %4.2f = %4.2f\n" , $m , $rv ; } } $debug_battles && printf " result %4.2f\n" , $rv ; return $rv ; } ############################################################################### # # Try all attacker types against a target type (or "type,type") sub try_battles($) { my $ttype = shift ; my %result = () ; # score => "attacker attacker ..." ######################################## # Calculate all possible attackers' multipliers for my $attacker ( @types ) { my $score = sprintf( '%4.2f' , battle( $attacker , $ttype ) ) ; $result{$score} .= " $attacker" ; } ######################################## # Show the results for my $score ( reverse sort keys %result ) { printf " %4.2f%s\n" , $score , $result{$score} ; } } ############################################################################### # # Handle a command sub handle($) { my $target = shift ; ######################################## # Clean up the entry my $ltarget = lc( $target ) ; $ltarget =~ s|[^a-z]||g ; ######################################## # Figure out what type(s) we're being asked about my $ttype = '' ; if ( exists( $pokemon{$ltarget} ) ) { $ttype = $pokemon{$ltarget} ; } elsif ( exists( $tname{$ltarget} ) ) { $ttype = $ltarget ; } elsif ( $target =~ m|^\d+$| ) { my $n = $target ; $n =~ s|^0+|| ; my $num = sprintf( '%03d' , $n ) ; if ( exists $pm_num{$num} ) { $target = $pm_num{$num} ; $ttype = $pokemon{$target} ; } } else { print "ERROR: '$ltarget' is not recognized as a Pokemon name or type\n" ; return 1 ; } ######################################## # Do the deed my $tname = $target ; my $num = 'type' ; if ( exists $pmname_name{$target} ) { $tname = $pmname_name{$target} ; $num = sprintf( '%03d' , $pmnum_name{$target} ) ; } print "Target $num '$tname' has type '$ttype'\n" ; try_battles( $ttype ) ; return 0 ; } ############################################################################### ############################################################################### ############################################################################### # # Parse command line getopts( 'hdDm' , \%opt ) ; $opt{'h'} && usage() ; $debug_battles = ( $opt{'d'} ? 1 : 0 ) ; $debug_data = ( $opt{'D'} ? 1 : 0 ) ; $mono = ( $opt{'m'} ? 1 : 0 ) ; ######################################## # Read the data from below read_data() ; ######################################## # If there's anything on the command line, handle it my $input = join( ' ' , @ARGV ) ; if ( $input ne '' ) { my $rv = handle( $input ) ; exit $rv ; } ######################################## # Nothing on the command line, use readline to accept and process commands my $term = new Term::ReadLine( 'battle' ) ; $term->ornaments( 0 ) ; my $prompt = ( $mono ? '' : "\033[0;1;37;44m" ) . 'battle>' . ( $mono ? '' : "\033[0m" ) . ' ' ; while ( defined( my $input = $term->readline( $prompt ) ) ) { $input =~ s|^\s+|| ; $input =~ s|\s+$|| ; last if ( $input eq 'q' ) ; last if ( $input eq 'quit' ) ; last if ( $input eq 'exit' ) ; handle( $input ) ; } print "finished\n" ; exit 0 ; ############################################################################### ############################################################################### ############################################################################### __DATA__ ######################################## # Pokemon types. The order in which they are listed here is the order # in which any output of type names will be shown. # # Note: these "type,xxx" lines MUST come before any other data. type,normal type,fire type,water type,electric type,grass type,ice type,fighting type,poison type,ground type,flying type,psychic type,bug type,rock type,ghost type,dragon type,dark type,steel type,fairy ######################################## # Pokemon data # Num,Name,Type,[Type] 1,Sprigatito,grass, 2,Floragato,grass, 3,Meowscarada,grass,dark 4,Fuecoco,fire, 5,Crocalor,fire, 6,Skeledirge,fire,ghost 7,Quaxly,water, 8,Quaxwell,water, 9,Quaquaval,water,fighting 10,Lechonk,normal, 11,Oinkologne,normal, 12,Tarountula,bug, 13,Spidops,bug, 14,Nymble,bug, 15,Lokix,bug,dark 16,Hoppip,grass,flying 17,Skiploom,grass,flying 18,Jumpluff,grass,flying 19,Fletchling,normal,flying 20,Fletchinder,fire,flying 21,Talonflame,fire,flying 22,Pawmi,electric, 23,Pawmo,electric,fighting 24,Pawmot,electric,fighting 25,Houndour,dark,fire 26,Houndoom,dark,fire 27,Yungoos,normal, 28,Gumshoos,normal, 29,Skwovet,normal, 30,Greedent,normal, 31,Sunkern,grass, 32,Sunflora,grass, 33,Kricketot,bug, 34,Kricketune,bug, 35,Scatterbug,bug, 36,Spewpa,bug, 37,Vivillon,bug,flying 38,Combee,bug,flying 39,Vespiquen,bug,flying 40,Rookidee,flying, 41,Corvisquire,flying, 42,Corviknight,flying,steel 43,Happiny,normal, 44,Chansey,normal, 45,Blissey,normal, 46,Azurill,normal,fairy 47,Marill,water,fairy 48,Azumarill,water,fairy 49,Surskit,bug,water 50,Masquerain,bug,flying 51,Buizel,water, 52,Floatzel,water, 53,Wooper,poison,ground 54,Clodsire,poison,ground 55,Psyduck,water, 56,Golduck,water, 57,Chewtle,water, 58,Drednaw,water,rock 59,Igglybuff,normal,fairy 60,Jigglypuff,normal,fairy 61,Wigglytuff,normal,fairy 62,Ralts,psychic,fairy 63,Kirlia,psychic,fairy 64,Gardevoir,psychic,fairy 65,Gallade,psychic,fighting 66,Drowzee,psychic, 67,Hypno,psychic, 68,Gastly,ghost,poison 69,Haunter,ghost,poison 70,Gengar,ghost,poison 71,Tandemaus,normal, 72,Maushold,normal, 73,Pichu,electric, 74,Pikachu,electric, 75,Raichu,electric, 76,Fidough,fairy, 77,Dachsbun,fairy, 78,Slakoth,normal, 79,Vigoroth,normal, 80,Slaking,normal, 81,Bounsweet,grass, 82,Steenee,grass, 83,Tsareena,grass, 84,Smoliv,grass,normal 85,Dolliv,grass,normal 86,Arboliva,grass,normal 87,Bonsly,rock, 88,Sudowoodo,rock, 89,Rockruff,rock, 90,Lycanroc,rock, 91,Rolycoly,rock, 92,Carkol,rock,fire 93,Coalossal,rock,fire 94,Shinx,electric, 95,Luxio,electric, 96,Luxray,electric, 97,Starly,normal,flying 98,Staravia,normal,flying 99,Staraptor,normal,flying 100,Oricorio,fire,flying 101,Mareep,electric, 102,Flaaffy,electric, 103,Ampharos,electric, 104,Petilil,grass, 105,Lilligant,grass, 106,Shroomish,grass, 107,Breloom,grass,fighting 108,Applin,grass,dragon 109,Flapple,grass,dragon 110,Appletun,grass,dragon 111,Spoink,psychic, 112,Grumpig,psychic, 113,Squawkabilly,normal,flying 114,Misdreavus,ghost, 115,Mismagius,ghost, 116,Makuhita,fighting, 117,Hariyama,fighting, 118,Crabrawler,fighting, 119,Crabominable,fighting,ice 120,Salandit,poison,fire 121,Salazzle,poison,fire 122,Phanpy,ground, 123,Donphan,ground, 124,Cufant,steel, 125,Copperajah,steel, 126,Gible,dragon,ground 127,Gabite,dragon,ground 128,Garchomp,dragon,ground 129,Nacli,rock, 130,Naclstack,rock, 131,Garganacl,rock, 132,Wingull,water,flying 133,Pelipper,water,flying 134,Magikarp,water, 135,Gyarados,water,flying 136,Arrokuda,water, 137,Barraskewda,water, 138,Basculin,water, 139,Gulpin,poison, 140,Swalot,poison, 141,Meowth,normal, 142,Persian,normal, 143,Drifloon,ghost,flying 144,Drifblim,ghost,flying 145,Flabébé,fairy, 146,Floette,fairy, 147,Florges,fairy, 148,Diglett,ground, 149,Dugtrio,ground, 150,Torkoal,fire, 151,Numel,fire,ground 152,Camerupt,fire,ground 153,Bronzor,steel,psychic 154,Bronzong,steel,psychic 155,Axew,dragon, 156,Fraxure,dragon, 157,Haxorus,dragon, 158,Mankey,fighting, 159,Primeape,fighting, 160,Annihilape,fighting,ghost 161,Meditite,fighting,psychic 162,Medicham,fighting,psychic 163,Riolu,fighting, 164,Lucario,fighting,steel 165,Charcadet,fire, 166,Armarouge,fire,psychic 167,Ceruledge,fire,ghost 168,Barboach,water,ground 169,Whiscash,water,ground 170,Tadbulb,electric, 171,Bellibolt,electric, 172,Goomy,dragon, 173,Sliggoo,dragon, 174,Goodra,dragon, 175,Croagunk,poison,fighting 176,Toxicroak,poison,fighting 177,Wattrel,electric,flying 178,Kilowattrel,electric,flying 179,Eevee,normal, 180,Vaporeon,water, 181,Jolteon,electric, 182,Flareon,fire, 183,Espeon,psychic, 184,Umbreon,dark, 185,Leafeon,grass, 186,Glaceon,ice, 187,Sylveon,fairy, 188,Dunsparce,normal, 189,Dudunsparce,normal, 190,Deerling,normal,grass 191,Sawsbuck,normal,grass 192,Girafarig,normal,psychic 193,Farigiraf,normal,psychic 194,Grimer,poison, 195,Muk,poison, 196,Maschiff,dark, 197,Mabosstiff,dark, 198,Toxel,electric,poison 199,Toxtricity,electric,poison 200,Dedenne,electric,fairy 201,Pachirisu,electric, 202,Shroodle,poison,normal 203,Grafaiai,poison,normal 204,Stantler,normal, 205,Foongus,grass,poison 206,Amoonguss,grass,poison 207,Voltorb,electric, 208,Electrode,electric, 209,Magnemite,electric,steel 210,Magneton,electric,steel 211,Magnezone,electric,steel 212,Ditto,normal, 213,Growlithe,fire, 214,Arcanine,fire, 215,Teddiursa,normal, 216,Ursaring,normal, 217,Zangoose,normal, 218,Seviper,poison, 219,Swablu,normal,flying 220,Altaria,dragon,flying 221,Skiddo,grass, 222,Gogoat,grass, 223,Tauros,fighting, 224,Litleo,fire,normal 225,Pyroar,fire,normal 226,Stunky,poison,dark 227,Skuntank,poison,dark 228,Zorua,dark, 229,Zoroark,dark, 230,Sneasel,dark,ice 231,Weavile,dark,ice 232,Murkrow,dark,flying 233,Honchkrow,dark,flying 234,Gothita,psychic, 235,Gothorita,psychic, 236,Gothitelle,psychic, 237,Sinistea,ghost, 238,Polteageist,ghost, 239,Mimikyu,ghost,fairy 240,Klefki,steel,fairy 241,Indeedee,psychic,normal 242,Bramblin,grass,ghost 243,Brambleghast,grass,ghost 244,Toedscool,ground,grass 245,Toedscruel,ground,grass 246,Tropius,grass,flying 247,Fomantis,grass, 248,Lurantis,grass, 249,Klawf,rock, 250,Capsakid,grass, 251,Scovillain,grass,fire 252,Cacnea,grass, 253,Cacturne,grass,dark 254,Rellor,bug, 255,Rabsca,bug,psychic 256,Venonat,bug,poison 257,Venomoth,bug,poison 258,Pineco,bug, 259,Forretress,bug,steel 260,Scyther,bug,flying 261,Scizor,bug,steel 262,Heracross,bug,fighting 263,Flittle,psychic, 264,Espathra,psychic, 265,Hippopotas,ground, 266,Hippowdon,ground, 267,Sandile,ground,dark 268,Krokorok,ground,dark 269,Krookodile,ground,dark 270,Silicobra,ground, 271,Sandaconda,ground, 272,Mudbray,ground, 273,Mudsdale,ground, 274,Larvesta,bug,fire 275,Volcarona,bug,fire 276,Bagon,dragon, 277,Shelgon,dragon, 278,Salamence,dragon,flying 279,Tinkatink,fairy,steel 280,Tinkatuff,fairy,steel 281,Tinkaton,fairy,steel 282,Hatenna,psychic, 283,Hattrem,psychic, 284,Hatterene,psychic,fairy 285,Impidimp,dark,fairy 286,Morgrem,dark,fairy 287,Grimmsnarl,dark,fairy 288,Wiglett,water, 289,Wugtrio,water, 290,Bombirdier,flying,dark 291,Finizen,water, 292,Palafin,water, 293,Varoom,steel,poison 294,Revavroom,steel,poison 295,Cyclizar,dragon,normal 296,Orthworm,steel, 297,Sableye,dark,ghost 298,Shuppet,ghost, 299,Banette,ghost, 300,Falinks,fighting, 301,Hawlucha,fighting,flying 302,Spiritomb,ghost,dark 303,Noibat,flying,dragon 304,Noivern,flying,dragon 305,Dreepy,dragon,ghost 306,Drakloak,dragon,ghost 307,Dragapult,dragon,ghost 308,Glimmet,rock,poison 309,Glimmora,rock,poison 310,Rotom,electric,ghost 311,Greavard,ghost, 312,Houndstone,ghost, 313,Oranguru,normal,psychic 314,Passimian,fighting, 315,Komala,normal, 316,Larvitar,rock,ground 317,Pupitar,rock,ground 318,Tyranitar,rock,dark 319,Stonjourner,rock, 320,Eiscue,ice, 321,Pincurchin,electric, 322,Sandygast,ghost,ground 323,Palossand,ghost,ground 324,Slowpoke,water,psychic 325,Slowbro,water,psychic 326,Slowking,water,psychic 327,Shellos,water, 328,Gastrodon,water,ground 329,Shellder,water, 330,Cloyster,water,ice 331,Qwilfish,water,poison 332,Luvdisc,water, 333,Finneon,water, 334,Lumineon,water, 335,Bruxish,water,psychic 336,Alomomola,water, 337,Skrelp,poison,water 338,Dragalge,poison,dragon 339,Clauncher,water, 340,Clawitzer,water, 341,Tynamo,electric, 342,Eelektrik,electric, 343,Eelektross,electric, 344,Mareanie,poison,water 345,Toxapex,poison,water 346,Flamigo,flying,fighting 347,Dratini,dragon, 348,Dragonair,dragon, 349,Dragonite,dragon,flying 350,Snom,ice,bug 351,Frosmoth,ice,bug 352,Snover,grass,ice 353,Abomasnow,grass,ice 354,Delibird,ice,flying 355,Cubchoo,ice, 356,Beartic,ice, 357,Snorunt,ice, 358,Glalie,ice, 359,Froslass,ice,ghost 360,Cryogonal,ice, 361,Cetoddle,ice, 362,Cetitan,ice, 363,Bergmite,ice, 364,Avalugg,ice, 365,Rufflet,normal,flying 366,Braviary,normal,flying 367,Pawniard,dark,steel 368,Bisharp,dark,steel 369,Kingambit,dark,steel 370,Deino,dark,dragon 371,Zweilous,dark,dragon 372,Hydreigon,dark,dragon 373,Veluza,water,psychic 374,Dondozo,water, 375,Tatsugiri,dragon,water 376,Great Tusk,ground,fighting 377,Scream Tail,fairy,psychic 378,Brute Bonnet,grass,dark 379,Flutter Mane,ghost,fairy 380,Slither Wing,bug,fighting 381,Sandy Shocks,electric,ground 382,Iron Treads,ground,steel 383,Iron Bundle,ice,water 384,Iron Hands,fighting,electric 385,Iron Jugulis,dark,flying 386,Iron Moth,fire,poison 387,Iron Thorns,rock,electric 388,Frigibax,dragon,ice 389,Arctibax,dragon,ice 390,Baxcalibur,dragon,ice 391,Gimmighoul,ghost, 392,Gholdengo,steel,ghost 393,Wo-Chien,dark,grass 394,Chien-Pao,dark,ice 395,Ting-Lu,dark,ground 396,Chi-Yu,dark,fire 397,Roaring Moon,dragon,dark 398,Iron Valiant,fairy,fighting 399,Koraidon,fighting,dragon 400,Miraidon,electric,dragon ######################################## # Battle data # Attacker,Defender,Multiplier Normal,Normal,1 Fire,Normal,1 Water,Normal,1 Electric,Normal,1 Grass,Normal,1 Ice,Normal,1 Fighting,Normal,2 Poison,Normal,1 Ground,Normal,1 Flying,Normal,1 Psychic,Normal,1 Bug,Normal,1 Rock,Normal,1 Ghost,Normal,0 Dragon,Normal,1 Dark,Normal,1 Steel,Normal,1 Fairy,Normal,1 Normal,Fire,1 Fire,Fire,0.5 Water,Fire,2 Electric,Fire,1 Grass,Fire,0.5 Ice,Fire,0.5 Fighting,Fire,1 Poison,Fire,1 Ground,Fire,2 Flying,Fire,1 Psychic,Fire,1 Bug,Fire,0.5 Rock,Fire,2 Ghost,Fire,1 Dragon,Fire,1 Dark,Fire,1 Steel,Fire,0.5 Fairy,Fire,0.5 Normal,Water,1 Fire,Water,0.5 Water,Water,0.5 Electric,Water,2 Grass,Water,2 Ice,Water,0.5 Fighting,Water,1 Poison,Water,1 Ground,Water,1 Flying,Water,1 Psychic,Water,1 Bug,Water,1 Rock,Water,1 Ghost,Water,1 Dragon,Water,1 Dark,Water,1 Steel,Water,0.5 Fairy,Water,1 Normal,Electric,1 Fire,Electric,1 Water,Electric,1 Electric,Electric,0.5 Grass,Electric,1 Ice,Electric,1 Fighting,Electric,1 Poison,Electric,1 Ground,Electric,2 Flying,Electric,0.5 Psychic,Electric,1 Bug,Electric,1 Rock,Electric,1 Ghost,Electric,1 Dragon,Electric,1 Dark,Electric,1 Steel,Electric,0.5 Fairy,Electric,1 Normal,Grass,1 Fire,Grass,2 Water,Grass,0.5 Electric,Grass,0.5 Grass,Grass,0.5 Ice,Grass,2 Fighting,Grass,1 Poison,Grass,2 Ground,Grass,0.5 Flying,Grass,2 Psychic,Grass,1 Bug,Grass,2 Rock,Grass,1 Ghost,Grass,1 Dragon,Grass,1 Dark,Grass,1 Steel,Grass,1 Fairy,Grass,1 Normal,Ice,1 Fire,Ice,2 Water,Ice,1 Electric,Ice,1 Grass,Ice,1 Ice,Ice,0.5 Fighting,Ice,2 Poison,Ice,1 Ground,Ice,1 Flying,Ice,1 Psychic,Ice,1 Bug,Ice,1 Rock,Ice,2 Ghost,Ice,1 Dragon,Ice,1 Dark,Ice,1 Steel,Ice,2 Fairy,Ice,1 Normal,Fighting,1 Fire,Fighting,1 Water,Fighting,1 Electric,Fighting,1 Grass,Fighting,1 Ice,Fighting,1 Fighting,Fighting,1 Poison,Fighting,1 Ground,Fighting,1 Flying,Fighting,2 Psychic,Fighting,2 Bug,Fighting,0.5 Rock,Fighting,0.5 Ghost,Fighting,1 Dragon,Fighting,1 Dark,Fighting,0.5 Steel,Fighting,1 Fairy,Fighting,2 Normal,Poison,1 Fire,Poison,1 Water,Poison,1 Electric,Poison,1 Grass,Poison,0.5 Ice,Poison,1 Fighting,Poison,0.5 Poison,Poison,0.5 Ground,Poison,2 Flying,Poison,1 Psychic,Poison,2 Bug,Poison,0.5 Rock,Poison,1 Ghost,Poison,1 Dragon,Poison,1 Dark,Poison,1 Steel,Poison,1 Fairy,Poison,0.5 Normal,Ground,1 Fire,Ground,1 Water,Ground,2 Electric,Ground,0 Grass,Ground,2 Ice,Ground,2 Fighting,Ground,1 Poison,Ground,0.5 Ground,Ground,1 Flying,Ground,1 Psychic,Ground,1 Bug,Ground,1 Rock,Ground,0.5 Ghost,Ground,1 Dragon,Ground,1 Dark,Ground,1 Steel,Ground,1 Fairy,Ground,1 Normal,Flying,1 Fire,Flying,1 Water,Flying,1 Electric,Flying,2 Grass,Flying,0.5 Ice,Flying,2 Fighting,Flying,0.5 Poison,Flying,1 Ground,Flying,0 Flying,Flying,1 Psychic,Flying,1 Bug,Flying,0.5 Rock,Flying,2 Ghost,Flying,1 Dragon,Flying,1 Dark,Flying,1 Steel,Flying,1 Fairy,Flying,1 Normal,Psychic,1 Fire,Psychic,1 Water,Psychic,1 Electric,Psychic,1 Grass,Psychic,1 Ice,Psychic,1 Fighting,Psychic,0.5 Poison,Psychic,1 Ground,Psychic,1 Flying,Psychic,1 Psychic,Psychic,0.5 Bug,Psychic,2 Rock,Psychic,1 Ghost,Psychic,2 Dragon,Psychic,1 Dark,Psychic,2 Steel,Psychic,1 Fairy,Psychic,1 Normal,Bug,1 Fire,Bug,2 Water,Bug,1 Electric,Bug,1 Grass,Bug,0.5 Ice,Bug,1 Fighting,Bug,0.5 Poison,Bug,1 Ground,Bug,0.5 Flying,Bug,2 Psychic,Bug,1 Bug,Bug,1 Rock,Bug,2 Ghost,Bug,1 Dragon,Bug,1 Dark,Bug,1 Steel,Bug,1 Fairy,Bug,1 Normal,Rock,0.5 Fire,Rock,0.5 Water,Rock,2 Electric,Rock,1 Grass,Rock,2 Ice,Rock,1 Fighting,Rock,2 Poison,Rock,0.5 Ground,Rock,2 Flying,Rock,0.5 Psychic,Rock,1 Bug,Rock,1 Rock,Rock,1 Ghost,Rock,1 Dragon,Rock,1 Dark,Rock,1 Steel,Rock,2 Fairy,Rock,1 Normal,Ghost,0 Fire,Ghost,1 Water,Ghost,1 Electric,Ghost,1 Grass,Ghost,1 Ice,Ghost,1 Fighting,Ghost,0 Poison,Ghost,0.5 Ground,Ghost,1 Flying,Ghost,1 Psychic,Ghost,1 Bug,Ghost,0.5 Rock,Ghost,1 Ghost,Ghost,2 Dragon,Ghost,1 Dark,Ghost,2 Steel,Ghost,1 Fairy,Ghost,1 Normal,Dragon,1 Fire,Dragon,0.5 Water,Dragon,0.5 Electric,Dragon,0.5 Grass,Dragon,0.5 Ice,Dragon,2 Fighting,Dragon,1 Poison,Dragon,1 Ground,Dragon,1 Flying,Dragon,1 Psychic,Dragon,1 Bug,Dragon,1 Rock,Dragon,1 Ghost,Dragon,1 Dragon,Dragon,2 Dark,Dragon,1 Steel,Dragon,1 Fairy,Dragon,2 Normal,Dark,1 Fire,Dark,1 Water,Dark,1 Electric,Dark,1 Grass,Dark,1 Ice,Dark,1 Fighting,Dark,2 Poison,Dark,1 Ground,Dark,1 Flying,Dark,1 Psychic,Dark,0 Bug,Dark,2 Rock,Dark,1 Ghost,Dark,0.5 Dragon,Dark,1 Dark,Dark,0.5 Steel,Dark,1 Fairy,Dark,2 Normal,Steel,0.5 Fire,Steel,2 Water,Steel,1 Electric,Steel,1 Grass,Steel,0.5 Ice,Steel,0.5 Fighting,Steel,2 Poison,Steel,0 Ground,Steel,2 Flying,Steel,0.5 Psychic,Steel,0.5 Bug,Steel,0.5 Rock,Steel,0.5 Ghost,Steel,1 Dragon,Steel,0.5 Dark,Steel,1 Steel,Steel,0.5 Fairy,Steel,0.5 Normal,Fairy,1 Fire,Fairy,1 Water,Fairy,1 Electric,Fairy,1 Grass,Fairy,1 Ice,Fairy,1 Fighting,Fairy,0.5 Poison,Fairy,2 Ground,Fairy,1 Flying,Fairy,1 Psychic,Fairy,1 Bug,Fairy,0.5 Rock,Fairy,1 Ghost,Fairy,1 Dragon,Fairy,0 Dark,Fairy,0.5 Steel,Fairy,2 Fairy,Fairy,1