Add more entries
+ Add a texture variation system.
BIN
assets/sprites/castform.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
assets/sprites/castform_rainy.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
assets/sprites/castform_snowy.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
assets/sprites/castform_sunny.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/sprites/feebas.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
assets/sprites/kecleon.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
assets/sprites/milotic.png
Normal file
After Width: | Height: | Size: 15 KiB |
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -177,9 +177,7 @@ class _DexEntryState extends State<DexEntry> {
|
|||
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<DexEntry> {
|
|||
),
|
||||
],
|
||||
),
|
||||
if (_pkmn.extraVariants.isNotEmpty)
|
||||
Text("Extra Variations: ", style: TextStyle(fontSize: 24)),
|
||||
if (_pkmn.extraVariants.isNotEmpty) _pkmn.getVariations(),
|
||||
|
||||
SizedBox(height: 32),
|
||||
if (Constants.isMobile)
|
||||
SingleChildScrollView(
|
||||
|
|
|
@ -54,6 +54,13 @@ class SessionData {
|
|||
}
|
||||
|
||||
static Widget PrintUnown() {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: getUnownList(),
|
||||
);
|
||||
}
|
||||
|
||||
static List<Widget> getUnownList() {
|
||||
List<Widget> widgets = [];
|
||||
List<Widget> 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() {
|
||||
|
|
|
@ -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<String> 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<Widget> variants = [];
|
||||
if (id == Pokemon.Unown.id)
|
||||
variants = SessionData.getUnownList();
|
||||
else {
|
||||
List<Widget> 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<Widget> getEvolutions(int subID) {
|
||||
//print("SUBID ${subID}");
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|