Bump deps and add new dex data
This commit is contained in:
parent
fa6eaae876
commit
2309942e7e
8 changed files with 152 additions and 27 deletions
|
@ -1,7 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
class Constants {
|
||||
static const VERSION = "1.0.032825+2029";
|
||||
static const VERSION = "1.0.052825+1401";
|
||||
|
||||
//static bool get isMobile => Platform.isAndroid || Platform.isIOS;
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ enum GameRoute {
|
|||
RT44,
|
||||
RT45,
|
||||
RT46,
|
||||
RT111,
|
||||
RT113,
|
||||
RT204,
|
||||
ViridianForest(commonName: "Viridian Forest"),
|
||||
AzaleaTown(commonName: "Azalea Town"),
|
||||
|
@ -92,6 +94,8 @@ enum GameRoute {
|
|||
PowerPlant(commonName: "Power Plant"),
|
||||
CeladonCity(commonName: "Celadon City"),
|
||||
SafariZone(commonName: "Safari Zone"),
|
||||
MtMoon(commonName: "Mt. Moon"),
|
||||
MirageTower(commonName: "Mirage Tower"),
|
||||
|
||||
// The following mark the pokemon as not usually obtainable
|
||||
TradeOrMigrate(commonName: "Trade or Migrate from another game"),
|
||||
|
@ -104,10 +108,11 @@ enum GameRoute {
|
|||
|
||||
@override
|
||||
String toString() {
|
||||
if (commonName == "")
|
||||
if (commonName == "") {
|
||||
return name;
|
||||
else
|
||||
} else {
|
||||
return commonName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,10 +158,11 @@ enum Game {
|
|||
|
||||
@override
|
||||
String toString() {
|
||||
if (commonName != "")
|
||||
if (commonName != "") {
|
||||
return commonName;
|
||||
else
|
||||
} else {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:libacflutter/Constants.dart';
|
||||
import 'package:pokedex/Session.dart';
|
||||
|
||||
class FilterPage extends StatefulWidget {
|
||||
const FilterPage({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return _filterPage();
|
||||
|
|
|
@ -1221,6 +1221,55 @@ class Gen1Locations {
|
|||
],
|
||||
),
|
||||
];
|
||||
static const List<Location> Sandshrew = [
|
||||
Location(Game.Red, [GameRoute.TradeOrMigrate], Generation.One),
|
||||
Location(Game.Blue, [
|
||||
GameRoute.RT4,
|
||||
GameRoute.RT8,
|
||||
GameRoute.RT9,
|
||||
GameRoute.RT10,
|
||||
GameRoute.RT11,
|
||||
GameRoute.RT23,
|
||||
], Generation.One),
|
||||
Location(Game.Yellow, [
|
||||
GameRoute.RT3,
|
||||
GameRoute.RT4,
|
||||
GameRoute.MtMoon,
|
||||
], Generation.One),
|
||||
Location(Game.Gold, [
|
||||
GameRoute.MtMoon,
|
||||
GameRoute.UnionCave,
|
||||
], Generation.Two),
|
||||
Location(Game.Silver, [
|
||||
GameRoute.GoldenrodCity,
|
||||
GameRoute.UnionCave,
|
||||
], Generation.Two),
|
||||
Location(Game.Crystal, [
|
||||
GameRoute.RT3,
|
||||
GameRoute.RT4,
|
||||
GameRoute.MtMoon,
|
||||
GameRoute.UnionCave,
|
||||
], Generation.Two),
|
||||
Location(
|
||||
Game.Ruby,
|
||||
[GameRoute.RT111, GameRoute.RT113],
|
||||
Generation.Three,
|
||||
additionalGames: [Game.Sapphire],
|
||||
),
|
||||
Location(Game.FireRed, [GameRoute.TradeOrMigrate], Generation.Three),
|
||||
Location(Game.LeafGreen, [
|
||||
GameRoute.RT4,
|
||||
GameRoute.RT8,
|
||||
GameRoute.RT9,
|
||||
GameRoute.RT10,
|
||||
GameRoute.RT11,
|
||||
GameRoute.RT23,
|
||||
], Generation.Three),
|
||||
Location(Game.Emerald, [
|
||||
GameRoute.RT111,
|
||||
GameRoute.MirageTower,
|
||||
], Generation.Three),
|
||||
];
|
||||
}
|
||||
|
||||
class Gen1DexData {
|
||||
|
@ -2502,4 +2551,63 @@ class Gen1DexData {
|
|||
Generation.Three,
|
||||
),
|
||||
];
|
||||
static const List<DexEntry> Sandshrew = [
|
||||
DexEntry(
|
||||
Game.Red,
|
||||
"Burrows deep underground in arid locations far from water. It only emerges to hunt for food.",
|
||||
Generation.One,
|
||||
additionalGames: [Game.Blue],
|
||||
),
|
||||
DexEntry(
|
||||
Game.Yellow,
|
||||
"Its body is dry. When it gets cold at night, its hide is said to become coated with a fine dew.",
|
||||
Generation.One,
|
||||
),
|
||||
DexEntry(
|
||||
Game.Gold,
|
||||
"If it fell from a great height, this POKéMON could save itself by rolling into a ball and bouncing.",
|
||||
Generation.Two,
|
||||
),
|
||||
DexEntry(
|
||||
Game.Silver,
|
||||
"Disliking water, it lives in deep burrows in arid areas. It can roll itself instantly into a ball.",
|
||||
Generation.Two,
|
||||
),
|
||||
DexEntry(
|
||||
Game.Crystal,
|
||||
" It prefers dry, sandy places because it uses the sand to protect itself when threatened.",
|
||||
Generation.Two,
|
||||
),
|
||||
DexEntry(
|
||||
Game.Ruby,
|
||||
"SANDSHREW’s body is configured to absorb water without waste, enabling it to survive in an arid desert. This POKéMON curls up to protect itself from its enemies.",
|
||||
Generation.Three,
|
||||
),
|
||||
DexEntry(
|
||||
Game.Sapphire,
|
||||
"SANDSHREW has a very dry hide that is extremely tough. The POKéMON can roll into a ball that repels any attack. At night, it burrows into the desert sand to sleep.",
|
||||
Generation.Three,
|
||||
),
|
||||
DexEntry(
|
||||
Game.FireRed,
|
||||
"It burrows and lives underground. If threatened, it curls itself up into a ball for protection.",
|
||||
Generation.Three,
|
||||
),
|
||||
DexEntry(
|
||||
Game.LeafGreen,
|
||||
"Burrows deep underground in arid locations far from water. It only emerges to hunt for prey.",
|
||||
Generation.Three,
|
||||
),
|
||||
DexEntry(
|
||||
Game.Emerald,
|
||||
"When it curls up in a ball, it can make any attack bounce off harmlessly. Its hide has turned tough and solid as a result of living in the desert.",
|
||||
Generation.Three,
|
||||
),
|
||||
DexEntry(
|
||||
Game.Diamond,
|
||||
"To protect itself from attackers, it curls up into a ball. It lives in arid regions with minimal rainfall.",
|
||||
Generation.Four,
|
||||
additionalGames: [Game.Pearl, Game.Platinum],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// ignore_for_file: constant_identifier_names
|
||||
|
||||
import 'package:pokedex/Consts.dart';
|
||||
import 'package:pokedex/Session.dart';
|
||||
import 'package:pokedex/dexMisc.dart';
|
||||
import 'package:pokedex/generations/Gen1Data.dart';
|
||||
|
@ -102,6 +101,8 @@ enum Pokemon {
|
|||
SingleEvolution(2, 16),
|
||||
locations: Gen1Locations.Bulbasaur,
|
||||
dexEntries: Gen1DexData.Bulbasaur,
|
||||
dexID:
|
||||
1, // Temporarily added to prevent dexID from being cleaned up by dart fix.
|
||||
),
|
||||
Ivysaur(
|
||||
2,
|
||||
|
@ -321,7 +322,14 @@ enum Pokemon {
|
|||
locations: Gen1Locations.Raichu,
|
||||
dexEntries: Gen1DexData.Raichu,
|
||||
),
|
||||
Sandshrew(27, Generation.One, [Type.Ground], SingleEvolution(28, 22)),
|
||||
Sandshrew(
|
||||
27,
|
||||
Generation.One,
|
||||
[Type.Ground],
|
||||
SingleEvolution(28, 22),
|
||||
locations: Gen1Locations.Sandshrew,
|
||||
dexEntries: Gen1DexData.Sandshrew,
|
||||
),
|
||||
Sandslash(28, Generation.One, [Type.Ground], null, previousPokemon: 27),
|
||||
NidoranF(29, Generation.One, [Type.Poison], SingleEvolution(30, 16)),
|
||||
Nidorina(
|
||||
|
@ -1685,19 +1693,19 @@ enum Pokemon {
|
|||
this.generation,
|
||||
this.types,
|
||||
this.evolution, {
|
||||
this.dexID = -1,
|
||||
this.properName = "",
|
||||
this.previousPokemon = -1,
|
||||
this.extraVariants = const [],
|
||||
this.locations = const [],
|
||||
this.dexEntries = const [],
|
||||
this.dexID = -1,
|
||||
});
|
||||
|
||||
String get pokemonName => properName == "" ? name : properName;
|
||||
int get pokeDexID => dexID == -1 ? id : dexID;
|
||||
|
||||
String toDexPath() {
|
||||
if (this.id == Pokemon.Unown.id) return SessionData.getRandomUnownSprite();
|
||||
if (id == Pokemon.Unown.id) return SessionData.getRandomUnownSprite();
|
||||
return 'assets/sprites/${printName().replaceAll("♀", "-f").replaceAll("♂", "-m").toLowerCase()}.png';
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:pokedex/Session.dart';
|
||||
import 'package:pokedex/pokemon.dart';
|
||||
|
||||
|
@ -86,7 +85,7 @@ class PokemonHelpers {
|
|||
int i = 0;
|
||||
int row = 3;
|
||||
for (var variant in pokemon.extraVariants) {
|
||||
tmpRow.add(Image.asset("assets/sprites/${variant}.png"));
|
||||
tmpRow.add(Image.asset("assets/sprites/$variant.png"));
|
||||
|
||||
i++;
|
||||
if (i >= row) {
|
||||
|
@ -347,10 +346,10 @@ class BranchedEvolution extends Evolution {
|
|||
String _prntEV(List<EvolutionCondition> conds, int level) {
|
||||
String sRet = "";
|
||||
if (level != -1) {
|
||||
sRet += "Level ${level}";
|
||||
sRet += "Level $level";
|
||||
}
|
||||
for (var condition in conds) {
|
||||
sRet += condition.name + " ";
|
||||
sRet += "${condition.name} ";
|
||||
}
|
||||
return sRet;
|
||||
}
|
||||
|
@ -369,7 +368,7 @@ class BranchedEvolution extends Evolution {
|
|||
continue;
|
||||
}
|
||||
|
||||
Pokemon _pkmn = Pokemon.values.where((x) => x.id == pkmn).first;
|
||||
Pokemon cpkmn = Pokemon.values.where((x) => x.id == pkmn).first;
|
||||
|
||||
cardRow.add(
|
||||
Column(
|
||||
|
@ -390,9 +389,9 @@ class BranchedEvolution extends Evolution {
|
|||
style: TextStyle(fontSize: 16),
|
||||
),
|
||||
|
||||
Image.asset(_pkmn.toDexPath(), width: 64, height: 64),
|
||||
Text(_pkmn.pokemonName, style: TextStyle(fontSize: 24)),
|
||||
PokemonHelpers.getTypeWidgets(_pkmn),
|
||||
Image.asset(cpkmn.toDexPath(), width: 64, height: 64),
|
||||
Text(cpkmn.pokemonName, style: TextStyle(fontSize: 24)),
|
||||
PokemonHelpers.getTypeWidgets(cpkmn),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -15,6 +15,8 @@ Future<int> main(List<String> args) async {
|
|||
}
|
||||
|
||||
class CompletedGenerator extends StatefulWidget {
|
||||
const CompletedGenerator({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return _completedGen();
|
||||
|
@ -29,6 +31,8 @@ class _completedGen extends State<CompletedGenerator> {
|
|||
}
|
||||
|
||||
class MainGen extends StatefulWidget {
|
||||
const MainGen({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return _main();
|
||||
|
@ -42,7 +46,7 @@ class _main extends State<MainGen> {
|
|||
Generation gen = Generation.One;
|
||||
StringBuilder sb = StringBuilder();
|
||||
int index = 0;
|
||||
Generation? currentGen = null;
|
||||
Generation? currentGen;
|
||||
int maxTasks = 5;
|
||||
|
||||
int state = 0;
|
||||
|
@ -211,12 +215,12 @@ class _main extends State<MainGen> {
|
|||
style: TextStyle(fontSize: 24),
|
||||
),
|
||||
SizedBox(height: 50),
|
||||
Text("Status: ${statusMessage}", style: TextStyle(fontSize: 24)),
|
||||
Text("Status: $statusMessage", style: TextStyle(fontSize: 24)),
|
||||
Text(
|
||||
"Progress: ${progress * 100}%",
|
||||
style: TextStyle(fontSize: 24),
|
||||
),
|
||||
Text("Task ${state}/${maxTasks}", style: TextStyle(fontSize: 24)),
|
||||
Text("Task $state/$maxTasks", style: TextStyle(fontSize: 24)),
|
||||
LinearProgressIndicator(value: progress, minHeight: 30),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -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.032825+2029
|
||||
version: 1.0.052825+1401
|
||||
|
||||
environment:
|
||||
sdk: ^3.7.0
|
||||
|
@ -36,10 +36,11 @@ dependencies:
|
|||
cupertino_icons: ^1.0.8
|
||||
libac_dart:
|
||||
hosted: https://git.zontreck.com/api/packages/Packages/pub/
|
||||
version: 1.4.20325+1215
|
||||
version: ^1.4.052725+1339
|
||||
libacflutter:
|
||||
hosted: https://git.zontreck.com/api/packages/Packages/pub/
|
||||
version: 1.0.31525+0222
|
||||
version: ^1.0.052725+1354
|
||||
ota_update: ^7.0.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -50,7 +51,7 @@ dev_dependencies:
|
|||
# activated in the `analysis_options.yaml` file located at the root of your
|
||||
# package. See that file for information about deactivating specific lint
|
||||
# rules and activating additional ones.
|
||||
flutter_lints: ^5.0.0
|
||||
flutter_lints: ^6.0.0
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue