diff --git a/assets/sprites/castform.png b/assets/sprites/castform.png new file mode 100644 index 0000000..c501198 Binary files /dev/null and b/assets/sprites/castform.png differ diff --git a/assets/sprites/castform_rainy.png b/assets/sprites/castform_rainy.png new file mode 100644 index 0000000..b5785e8 Binary files /dev/null and b/assets/sprites/castform_rainy.png differ diff --git a/assets/sprites/castform_snowy.png b/assets/sprites/castform_snowy.png new file mode 100644 index 0000000..79bc9d6 Binary files /dev/null and b/assets/sprites/castform_snowy.png differ diff --git a/assets/sprites/castform_sunny.png b/assets/sprites/castform_sunny.png new file mode 100644 index 0000000..edcb4ca Binary files /dev/null and b/assets/sprites/castform_sunny.png differ diff --git a/assets/sprites/feebas.png b/assets/sprites/feebas.png new file mode 100644 index 0000000..0b600b4 Binary files /dev/null and b/assets/sprites/feebas.png differ diff --git a/assets/sprites/kecleon.png b/assets/sprites/kecleon.png new file mode 100644 index 0000000..7381d12 Binary files /dev/null and b/assets/sprites/kecleon.png differ diff --git a/assets/sprites/milotic.png b/assets/sprites/milotic.png new file mode 100644 index 0000000..f4a417b Binary files /dev/null and b/assets/sprites/milotic.png differ diff --git a/lib/Consts.dart b/lib/Consts.dart index f2c8876..cc335cf 100644 --- a/lib/Consts.dart +++ b/lib/Consts.dart @@ -1,7 +1,7 @@ import 'dart:io'; class Constants { - static const VERSION = "1.0.032525+1924"; + static const VERSION = "1.0.032525+1952"; static bool get isMobile => Platform.isAndroid || Platform.isIOS; } diff --git a/lib/MainApp.dart b/lib/MainApp.dart index f1b0fe3..23412c7 100644 --- a/lib/MainApp.dart +++ b/lib/MainApp.dart @@ -177,9 +177,7 @@ class _DexEntryState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (_pkmn.id != Pokemon.Unown.id) - Center(child: Image.asset(_pkmn.toDexPath())), - if (_pkmn.id == Pokemon.Unown.id) SessionData.PrintUnown(), + Center(child: Image.asset(_pkmn.toDexPath())), Center( child: Text( "ID: ${_pkmn.pokeDexID}", @@ -202,6 +200,10 @@ class _DexEntryState extends State { ), ], ), + if (_pkmn.extraVariants.isNotEmpty) + Text("Extra Variations: ", style: TextStyle(fontSize: 24)), + if (_pkmn.extraVariants.isNotEmpty) _pkmn.getVariations(), + SizedBox(height: 32), if (Constants.isMobile) SingleChildScrollView( diff --git a/lib/Session.dart b/lib/Session.dart index 335425d..b2e1d3d 100644 --- a/lib/Session.dart +++ b/lib/Session.dart @@ -54,6 +54,13 @@ class SessionData { } static Widget PrintUnown() { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: getUnownList(), + ); + } + + static List getUnownList() { List widgets = []; List tmpWidgets = []; @@ -80,10 +87,7 @@ class SessionData { Row(crossAxisAlignment: CrossAxisAlignment.start, children: tmpWidgets), ); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: widgets, - ); + return widgets; } static int highestGenID() { diff --git a/lib/pokemon.dart b/lib/pokemon.dart index 6560a1a..d50bac3 100644 --- a/lib/pokemon.dart +++ b/lib/pokemon.dart @@ -98,6 +98,9 @@ enum EvolutionCondition { EmptySlot, PokeballInBag, ShinyStone, + PrismScale, + Or, + MaxBeauty, } abstract class Evolution { @@ -1114,7 +1117,7 @@ enum Pokemon { previousPokemon: 79, ), Misdreavus(200, Generation.Two, [Type.Ghost], null), - Unown(201, Generation.Two, [Type.Psychic], null), + Unown(201, Generation.Two, [Type.Psychic], null, extraVariants: ["abc"]), Wobbuffet(202, Generation.Two, [Type.Psychic], null), Girafarig(203, Generation.Two, [Type.Normal, Type.Psychic], null), Pineco(204, Generation.Two, [Type.Bug], SingleEvolution(205, 31)), @@ -1638,7 +1641,32 @@ enum Pokemon { [Type.Rock, Type.Bug], null, previousPokemon: 347, - ); + ), + Feebas( + 349, + Generation.Three, + [Type.Water], + SingleEvolution( + 350, + -1, + condition: [ + EvolutionCondition.Trading, + EvolutionCondition.Holding, + EvolutionCondition.PrismScale, + EvolutionCondition.Or, + EvolutionCondition.MaxBeauty, + ], + ), + ), + Milotic(350, Generation.Three, [Type.Water], null, previousPokemon: 349), + Castform( + 351, + Generation.Three, + [Type.Normal], + null, + extraVariants: ["castform_rainy", "castform_snowy", "castform_sunny"], + ), + Kecleon(352, Generation.Three, [Type.Normal], null); final int id; final String properName; @@ -1647,6 +1675,7 @@ enum Pokemon { final Evolution? evolution; final int dexID; final int previousPokemon; + final List extraVariants; bool get hasEvolutions => evolution != null; const Pokemon( this.id, @@ -1656,6 +1685,7 @@ enum Pokemon { this.dexID = -1, this.properName = "", this.previousPokemon = -1, + this.extraVariants = const [], }); String get pokemonName => properName == "" ? name : properName; @@ -1702,6 +1732,31 @@ enum Pokemon { return sRet; } + Widget getVariations() { + List variants = []; + if (id == Pokemon.Unown.id) + variants = SessionData.getUnownList(); + else { + List tmpRow = []; + int i = 0; + int row = Constants.isMobile ? 3 : 4; + for (var variant in extraVariants) { + tmpRow.add(Image.asset("assets/sprites/${variant}.png")); + + i++; + if (i >= row) { + variants.add(Row(children: tmpRow)); + tmpRow = []; + i = 0; + } + } + + if (tmpRow.isNotEmpty) variants.add(Row(children: tmpRow)); + } + + return Column(children: variants); + } + List getEvolutions(int subID) { //print("SUBID ${subID}"); diff --git a/pubspec.yaml b/pubspec.yaml index 2229dbe..be50991 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.032525+1924 +version: 1.0.032525+1952 environment: sdk: ^3.7.0 @@ -447,6 +447,13 @@ flutter: - assets/sprites/cradily.png - assets/sprites/anorith.png - assets/sprites/armaldo.png + - assets/sprites/feebas.png + - assets/sprites/milotic.png + - assets/sprites/castform.png + - assets/sprites/castform_rainy.png + - assets/sprites/castform_snowy.png + - assets/sprites/castform_sunny.png + - assets/sprites/kecleon.png # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/to/resolution-aware-images