Bump deps and add new dex data

This commit is contained in:
zontreck 2025-05-28 14:01:54 -07:00
parent fa6eaae876
commit 2309942e7e
8 changed files with 152 additions and 27 deletions

View file

@ -1,7 +1,5 @@
import 'dart:io';
class Constants { class Constants {
static const VERSION = "1.0.032825+2029"; static const VERSION = "1.0.052825+1401";
//static bool get isMobile => Platform.isAndroid || Platform.isIOS; //static bool get isMobile => Platform.isAndroid || Platform.isIOS;
} }

View file

@ -44,6 +44,8 @@ enum GameRoute {
RT44, RT44,
RT45, RT45,
RT46, RT46,
RT111,
RT113,
RT204, RT204,
ViridianForest(commonName: "Viridian Forest"), ViridianForest(commonName: "Viridian Forest"),
AzaleaTown(commonName: "Azalea Town"), AzaleaTown(commonName: "Azalea Town"),
@ -92,6 +94,8 @@ enum GameRoute {
PowerPlant(commonName: "Power Plant"), PowerPlant(commonName: "Power Plant"),
CeladonCity(commonName: "Celadon City"), CeladonCity(commonName: "Celadon City"),
SafariZone(commonName: "Safari Zone"), SafariZone(commonName: "Safari Zone"),
MtMoon(commonName: "Mt. Moon"),
MirageTower(commonName: "Mirage Tower"),
// The following mark the pokemon as not usually obtainable // The following mark the pokemon as not usually obtainable
TradeOrMigrate(commonName: "Trade or Migrate from another game"), TradeOrMigrate(commonName: "Trade or Migrate from another game"),
@ -104,10 +108,11 @@ enum GameRoute {
@override @override
String toString() { String toString() {
if (commonName == "") if (commonName == "") {
return name; return name;
else } else {
return commonName; return commonName;
}
} }
} }
@ -153,10 +158,11 @@ enum Game {
@override @override
String toString() { String toString() {
if (commonName != "") if (commonName != "") {
return commonName; return commonName;
else } else {
return name; return name;
}
} }
} }

View file

@ -1,9 +1,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:libacflutter/Constants.dart'; import 'package:libacflutter/Constants.dart';
import 'package:pokedex/Session.dart'; import 'package:pokedex/Session.dart';
class FilterPage extends StatefulWidget { class FilterPage extends StatefulWidget {
const FilterPage({super.key});
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _filterPage(); return _filterPage();

View file

@ -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 { class Gen1DexData {
@ -2502,4 +2551,63 @@ class Gen1DexData {
Generation.Three, 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,
"SANDSHREWs 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],
),
];
} }

View file

@ -1,6 +1,5 @@
// ignore_for_file: constant_identifier_names // ignore_for_file: constant_identifier_names
import 'package:pokedex/Consts.dart';
import 'package:pokedex/Session.dart'; import 'package:pokedex/Session.dart';
import 'package:pokedex/dexMisc.dart'; import 'package:pokedex/dexMisc.dart';
import 'package:pokedex/generations/Gen1Data.dart'; import 'package:pokedex/generations/Gen1Data.dart';
@ -102,6 +101,8 @@ enum Pokemon {
SingleEvolution(2, 16), SingleEvolution(2, 16),
locations: Gen1Locations.Bulbasaur, locations: Gen1Locations.Bulbasaur,
dexEntries: Gen1DexData.Bulbasaur, dexEntries: Gen1DexData.Bulbasaur,
dexID:
1, // Temporarily added to prevent dexID from being cleaned up by dart fix.
), ),
Ivysaur( Ivysaur(
2, 2,
@ -321,7 +322,14 @@ enum Pokemon {
locations: Gen1Locations.Raichu, locations: Gen1Locations.Raichu,
dexEntries: Gen1DexData.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), Sandslash(28, Generation.One, [Type.Ground], null, previousPokemon: 27),
NidoranF(29, Generation.One, [Type.Poison], SingleEvolution(30, 16)), NidoranF(29, Generation.One, [Type.Poison], SingleEvolution(30, 16)),
Nidorina( Nidorina(
@ -1685,19 +1693,19 @@ enum Pokemon {
this.generation, this.generation,
this.types, this.types,
this.evolution, { this.evolution, {
this.dexID = -1,
this.properName = "", this.properName = "",
this.previousPokemon = -1, this.previousPokemon = -1,
this.extraVariants = const [], this.extraVariants = const [],
this.locations = const [], this.locations = const [],
this.dexEntries = const [], this.dexEntries = const [],
this.dexID = -1,
}); });
String get pokemonName => properName == "" ? name : properName; String get pokemonName => properName == "" ? name : properName;
int get pokeDexID => dexID == -1 ? id : dexID; int get pokeDexID => dexID == -1 ? id : dexID;
String toDexPath() { 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'; return 'assets/sprites/${printName().replaceAll("", "-f").replaceAll("", "-m").toLowerCase()}.png';
} }

View file

@ -1,5 +1,4 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:pokedex/Session.dart'; import 'package:pokedex/Session.dart';
import 'package:pokedex/pokemon.dart'; import 'package:pokedex/pokemon.dart';
@ -86,7 +85,7 @@ class PokemonHelpers {
int i = 0; int i = 0;
int row = 3; int row = 3;
for (var variant in pokemon.extraVariants) { for (var variant in pokemon.extraVariants) {
tmpRow.add(Image.asset("assets/sprites/${variant}.png")); tmpRow.add(Image.asset("assets/sprites/$variant.png"));
i++; i++;
if (i >= row) { if (i >= row) {
@ -347,10 +346,10 @@ class BranchedEvolution extends Evolution {
String _prntEV(List<EvolutionCondition> conds, int level) { String _prntEV(List<EvolutionCondition> conds, int level) {
String sRet = ""; String sRet = "";
if (level != -1) { if (level != -1) {
sRet += "Level ${level}"; sRet += "Level $level";
} }
for (var condition in conds) { for (var condition in conds) {
sRet += condition.name + " "; sRet += "${condition.name} ";
} }
return sRet; return sRet;
} }
@ -369,7 +368,7 @@ class BranchedEvolution extends Evolution {
continue; continue;
} }
Pokemon _pkmn = Pokemon.values.where((x) => x.id == pkmn).first; Pokemon cpkmn = Pokemon.values.where((x) => x.id == pkmn).first;
cardRow.add( cardRow.add(
Column( Column(
@ -390,9 +389,9 @@ class BranchedEvolution extends Evolution {
style: TextStyle(fontSize: 16), style: TextStyle(fontSize: 16),
), ),
Image.asset(_pkmn.toDexPath(), width: 64, height: 64), Image.asset(cpkmn.toDexPath(), width: 64, height: 64),
Text(_pkmn.pokemonName, style: TextStyle(fontSize: 24)), Text(cpkmn.pokemonName, style: TextStyle(fontSize: 24)),
PokemonHelpers.getTypeWidgets(_pkmn), PokemonHelpers.getTypeWidgets(cpkmn),
], ],
), ),
), ),

View file

@ -15,6 +15,8 @@ Future<int> main(List<String> args) async {
} }
class CompletedGenerator extends StatefulWidget { class CompletedGenerator extends StatefulWidget {
const CompletedGenerator({super.key});
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _completedGen(); return _completedGen();
@ -29,6 +31,8 @@ class _completedGen extends State<CompletedGenerator> {
} }
class MainGen extends StatefulWidget { class MainGen extends StatefulWidget {
const MainGen({super.key});
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _main(); return _main();
@ -42,7 +46,7 @@ class _main extends State<MainGen> {
Generation gen = Generation.One; Generation gen = Generation.One;
StringBuilder sb = StringBuilder(); StringBuilder sb = StringBuilder();
int index = 0; int index = 0;
Generation? currentGen = null; Generation? currentGen;
int maxTasks = 5; int maxTasks = 5;
int state = 0; int state = 0;
@ -211,12 +215,12 @@ class _main extends State<MainGen> {
style: TextStyle(fontSize: 24), style: TextStyle(fontSize: 24),
), ),
SizedBox(height: 50), SizedBox(height: 50),
Text("Status: ${statusMessage}", style: TextStyle(fontSize: 24)), Text("Status: $statusMessage", style: TextStyle(fontSize: 24)),
Text( Text(
"Progress: ${progress * 100}%", "Progress: ${progress * 100}%",
style: TextStyle(fontSize: 24), 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), LinearProgressIndicator(value: progress, minHeight: 30),
], ],
), ),

View file

@ -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 # 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 # 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. # 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: environment:
sdk: ^3.7.0 sdk: ^3.7.0
@ -36,10 +36,11 @@ dependencies:
cupertino_icons: ^1.0.8 cupertino_icons: ^1.0.8
libac_dart: libac_dart:
hosted: https://git.zontreck.com/api/packages/Packages/pub/ hosted: https://git.zontreck.com/api/packages/Packages/pub/
version: 1.4.20325+1215 version: ^1.4.052725+1339
libacflutter: libacflutter:
hosted: https://git.zontreck.com/api/packages/Packages/pub/ 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: dev_dependencies:
flutter_test: flutter_test:
@ -50,7 +51,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your # activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint # package. See that file for information about deactivating specific lint
# rules and activating additional ones. # 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 # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec