Finish adding gen2

This commit is contained in:
zontreck 2025-03-24 01:56:39 -07:00
parent 99452498a2
commit 32ae4f3e41
54 changed files with 274 additions and 22 deletions

BIN
assets/sprites/blissey.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/sprites/celebi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
assets/sprites/corsola.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

BIN
assets/sprites/delibird.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/sprites/donphan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/sprites/elekid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
assets/sprites/entei.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
assets/sprites/gligar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
assets/sprites/granbull.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/sprites/hooh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
assets/sprites/houndoom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/sprites/houndour.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
assets/sprites/kingdra.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/sprites/larvitar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

BIN
assets/sprites/lugia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/sprites/magby.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
assets/sprites/magcargo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/sprites/mantine.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
assets/sprites/miltank.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/sprites/phanpy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
assets/sprites/pineco.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/sprites/porygon2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
assets/sprites/pupitar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/sprites/qwilfish.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/sprites/raikou.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
assets/sprites/remoraid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
assets/sprites/scizor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/sprites/shuckle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

BIN
assets/sprites/skarmory.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
assets/sprites/slugma.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
assets/sprites/smeargle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/sprites/smoochum.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
assets/sprites/sneasel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/sprites/snubbull.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/sprites/stantler.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
assets/sprites/steelix.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/sprites/suicune.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
assets/sprites/swinub.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/sprites/tyrogue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
assets/sprites/ursaring.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -1,7 +1,7 @@
import 'dart:io';
class Constants {
static const VERSION = "1.0.032425+0033";
static const VERSION = "1.0.032425+0156";
static bool get isMobile => Platform.isAndroid || Platform.isIOS;
}

View file

@ -52,7 +52,7 @@ enum Type {
Grass(Color.fromARGB(255, 0, 255, 0), Colors.black),
Ice(Color.fromARGB(255, 0, 255, 255), Colors.black),
Fighting(Color.fromARGB(255, 255, 0, 0), Color.fromARGB(255, 255, 255, 255)),
Poison(Color.fromARGB(255, 128, 0, 128), Colors.black),
Poison(Color.fromARGB(255, 128, 0, 128), Color.fromARGB(255, 255, 255, 255)),
Ground(Color.fromARGB(255, 128, 126, 0), Colors.black),
Flying(Color.fromARGB(255, 128, 128, 255), Colors.black),
Psychic(Color.fromARGB(255, 255, 0, 255), Color.fromARGB(255, 255, 255, 255)),
@ -60,7 +60,7 @@ enum Type {
Rock(Color.fromARGB(255, 128, 128, 128), Colors.black),
Ghost(Color.fromARGB(255, 128, 0, 128), Colors.black),
Dragon(Color.fromARGB(255, 85, 0, 102), Color.fromARGB(255, 255, 255, 255)),
Dark(Color.fromARGB(255, 51, 51, 51), Colors.black),
Dark(Color.fromARGB(255, 51, 51, 51), Color.fromARGB(255, 255, 255, 255)),
Steel(Color.fromARGB(255, 192, 192, 192), Colors.black),
Fairy(Color.fromARGB(255, 255, 102, 255), Colors.black);
@ -89,6 +89,10 @@ enum EvolutionCondition {
Galar,
OutsideGalar,
SunStone,
MetalCoat,
BlackAugurite,
DragonScale,
Upgrade,
}
abstract class Evolution {
@ -125,11 +129,10 @@ class SingleEvolution extends Evolution {
@override
Widget getEvolution() {
Pokemon pkmn = Pokemon.values.where((x) => x.id == to).first;
if (pkmn.id >= SessionData.highestGenID() + 1) {
if (to >= SessionData.highestGenID() + 1) {
return Column();
}
Pokemon pkmn = Pokemon.values.where((x) => x.id == to).first;
var arrow = Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -197,12 +200,14 @@ class BranchedEvolution extends Evolution {
for (var pkmn in alternates) {
int index = alternates.indexOf(pkmn);
Pokemon _pkmn = Pokemon.values.where((x) => x.id == pkmn).first;
if (_pkmn.id >= SessionData.highestGenID() + 1) {
if (pkmn >= SessionData.highestGenID() + 1) {
print("Index too high");
continue;
}
Pokemon _pkmn = Pokemon.values.where((x) => x.id == pkmn).first;
arrows.add(
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -692,7 +697,20 @@ enum Pokemon {
null,
previousPokemon: 93,
),
Onix(95, Generation.One, [Type.Rock, Type.Ground], null),
Onix(
95,
Generation.One,
[Type.Rock, Type.Ground],
SingleEvolution(
208,
-1,
condition: [
EvolutionCondition.Trading,
EvolutionCondition.Holding,
EvolutionCondition.MetalCoat,
],
),
),
Drowzee(96, Generation.One, [Type.Psychic], SingleEvolution(97, 26)),
Hypno(97, Generation.One, [Type.Psychic], null, previousPokemon: 96),
Krabby(98, Generation.One, [Type.Water], SingleEvolution(99, 28)),
@ -719,8 +737,8 @@ enum Pokemon {
SingleEvolution(105, 28, condition: [EvolutionCondition.OutsideAlola]),
),
Marowak(105, Generation.One, [Type.Ground], null, previousPokemon: 104),
Hitmonlee(106, Generation.One, [Type.Fighting], null),
Hitmonchan(107, Generation.One, [Type.Fighting], null),
Hitmonlee(106, Generation.One, [Type.Fighting], null, previousPokemon: 236),
Hitmonchan(107, Generation.One, [Type.Fighting], null, previousPokemon: 236),
Lickitung(108, Generation.One, [Type.Normal], null),
Koffing(
109,
@ -740,11 +758,30 @@ enum Pokemon {
null,
previousPokemon: 111,
),
Chansey(113, Generation.One, [Type.Normal], null),
Chansey(
113,
Generation.One,
[Type.Normal],
SingleEvolution(242, -1, condition: [EvolutionCondition.HighFriendship]),
),
Tangela(114, Generation.One, [Type.Grass], null),
Kangaskhan(115, Generation.One, [Type.Normal], null),
Horsea(116, Generation.One, [Type.Water], SingleEvolution(117, 32)),
Seadra(117, Generation.One, [Type.Water], null, previousPokemon: 116),
Seadra(
117,
Generation.One,
[Type.Water],
SingleEvolution(
230,
-1,
condition: [
EvolutionCondition.Trading,
EvolutionCondition.Holding,
EvolutionCondition.DragonScale,
],
),
previousPokemon: 116,
),
Goldeen(118, Generation.One, [Type.Water], SingleEvolution(119, 33)),
Seaking(119, Generation.One, [Type.Water], null, previousPokemon: 118),
Staryu(
@ -762,10 +799,28 @@ enum Pokemon {
properName: "Mr. Mime",
previousPokemon: 120,
),
Scyther(123, Generation.One, [Type.Bug, Type.Flying], null),
Jynx(124, Generation.One, [Type.Ice, Type.Psychic], null),
Electabuzz(125, Generation.One, [Type.Electric], null),
Magmar(126, Generation.One, [Type.Fire], null),
Scyther(
123,
Generation.One,
[Type.Bug, Type.Flying],
BranchedEvolution([212, 900], [-1, -1], [
[
EvolutionCondition.Trading,
EvolutionCondition.Holding,
EvolutionCondition.MetalCoat,
],
[EvolutionCondition.BlackAugurite],
]),
),
Jynx(
124,
Generation.One,
[Type.Ice, Type.Psychic],
null,
previousPokemon: 238,
),
Electabuzz(125, Generation.One, [Type.Electric], null, previousPokemon: 239),
Magmar(126, Generation.One, [Type.Fire], null, previousPokemon: 240),
Pinsir(127, Generation.One, [Type.Bug], null),
Tauros(128, Generation.One, [Type.Normal], null),
Magikarp(129, Generation.One, [Type.Water], SingleEvolution(130, 20)),
@ -793,7 +848,20 @@ enum Pokemon {
Vaporeon(134, Generation.One, [Type.Water], null, previousPokemon: 133),
Jolteon(135, Generation.One, [Type.Electric], null, previousPokemon: 133),
Flareon(136, Generation.One, [Type.Fire], null, previousPokemon: 133),
Porygon(137, Generation.One, [Type.Normal], null),
Porygon(
137,
Generation.One,
[Type.Normal],
SingleEvolution(
233,
-1,
condition: [
EvolutionCondition.Trading,
EvolutionCondition.Holding,
EvolutionCondition.Upgrade,
],
),
),
Omanyte(138, Generation.One, [
Type.Rock,
Type.Water,
@ -1032,7 +1100,138 @@ 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),
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)),
Forretress(
205,
Generation.Two,
[Type.Bug, Type.Steel],
null,
previousPokemon: 204,
),
Dunsparce(206, Generation.Two, [Type.Normal], null),
Gligar(207, Generation.Two, [Type.Ground, Type.Flying], null),
Steelix(
208,
Generation.Two,
[Type.Steel, Type.Ground],
null,
previousPokemon: 95,
),
Snubbull(209, Generation.Two, [Type.Fairy], SingleEvolution(210, 23)),
Granbull(210, Generation.Two, [Type.Fairy], null, previousPokemon: 209),
Qwilfish(211, Generation.Two, [Type.Dark, Type.Poison], null),
Scizor(
212,
Generation.Two,
[Type.Bug, Type.Steel],
null,
previousPokemon: 123,
),
Shuckle(213, Generation.Two, [Type.Bug, Type.Rock], null),
Heracross(214, Generation.Two, [Type.Bug, Type.Fighting], null),
Sneasel(215, Generation.Two, [Type.Dark, Type.Ice], null),
Teddiursa(216, Generation.Two, [Type.Normal], SingleEvolution(217, 30)),
Ursaring(217, Generation.Two, [Type.Normal], null, previousPokemon: 216),
Slugma(218, Generation.Two, [Type.Fire], SingleEvolution(219, 38)),
Magcargo(219, Generation.Two, [Type.Fire], null, previousPokemon: 218),
Swinub(220, Generation.Two, [
Type.Ice,
Type.Ground,
], SingleEvolution(221, 33)),
Piloswine(
221,
Generation.Two,
[Type.Ice, Type.Ground],
null,
previousPokemon: 220,
),
Corsola(222, Generation.Two, [Type.Ghost], null),
Remoraid(223, Generation.Two, [Type.Water], SingleEvolution(224, 25)),
Octillery(224, Generation.Two, [Type.Water], null, previousPokemon: 223),
Delibird(225, Generation.Two, [Type.Ice, Type.Flying], null),
Mantine(
226,
Generation.Two,
[Type.Water, Type.Flying],
null,
previousPokemon: 458,
),
Skarmory(227, Generation.Two, [Type.Steel, Type.Flying], null),
Houndour(228, Generation.Two, [
Type.Dark,
Type.Fire,
], SingleEvolution(229, 24)),
Houndoom(
229,
Generation.Two,
[Type.Dark, Type.Fire],
null,
previousPokemon: 228,
),
Kingdra(
230,
Generation.Two,
[Type.Water, Type.Dragon],
null,
previousPokemon: 117,
),
Phanpy(231, Generation.Two, [Type.Ground], SingleEvolution(232, 25)),
Donphan(232, Generation.Two, [Type.Ground], null, previousPokemon: 231),
Porygon2(233, Generation.Two, [Type.Normal], null, previousPokemon: 137),
Stantler(234, Generation.Two, [Type.Normal], null),
Smeargle(235, Generation.Two, [Type.Normal], null),
Tyrogue(
236,
Generation.Two,
[Type.Fighting],
BranchedEvolution([106, 107, 237], [20, 20, 20], [
[EvolutionCondition.AttackGreaterThanDefense],
[EvolutionCondition.AttackLessThanDefense],
[EvolutionCondition.AttackEqualDefense],
]),
),
Hitmontop(237, Generation.Two, [Type.Fighting], null, previousPokemon: 236),
Smoochum(238, Generation.Two, [
Type.Ice,
Type.Psychic,
], SingleEvolution(124, 30)),
Elekid(239, Generation.Two, [Type.Electric], SingleEvolution(125, 30)),
Magby(240, Generation.Two, [Type.Fire], SingleEvolution(126, 30)),
Miltank(241, Generation.Two, [Type.Normal], null),
Blissey(242, Generation.Two, [Type.Normal], null, previousPokemon: 113),
Raikou(243, Generation.Two, [Type.Electric], null),
Entei(244, Generation.Two, [Type.Fire], null),
Suicune(245, Generation.Two, [Type.Water], null),
Larvitar(246, Generation.Two, [
Type.Rock,
Type.Ground,
], SingleEvolution(247, 30)),
Pupitar(
247,
Generation.Two,
[Type.Rock, Type.Ground],
SingleEvolution(248, 55),
previousPokemon: 246,
),
Tyranitar(
248,
Generation.Two,
[Type.Rock, Type.Dark],
null,
previousPokemon: 247,
),
Lugia(249, Generation.Two, [Type.Psychic, Type.Flying], null),
Hooh(
250,
Generation.Two,
[Type.Fire, Type.Flying],
null,
properName: "Ho-Oh",
),
Celebi(251, Generation.Two, [Type.Psychic, Type.Grass], null);
final int id;
final String properName;
@ -1127,10 +1326,12 @@ enum Pokemon {
//print("Branching Evolution identified");
// Handle branched evolutions. Refactor below to accomodate a list of pokemon.
for (var ev in (evolution! as BranchedEvolution).alternates) {
if (!(ev >= SessionData.highestGenID())) {
var pokemon = Pokemon.values.where((x) => x.id == ev).first;
if (pokemon.id <= SessionData.highestGenID()) Evs.add(pokemon);
}
}
}
List<Widget> sprites = [];

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
# 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.032425+0033
version: 1.0.032425+0156
environment:
sdk: ^3.7.0
@ -297,6 +297,57 @@ flutter:
- assets/sprites/unown-z.png
- assets/sprites/unown-em.png
- assets/sprites/unown-qm.png
- assets/sprites/wobbuffet.png
- assets/sprites/girafarig.png
- assets/sprites/pineco.png
- assets/sprites/forretress.png
- assets/sprites/dunsparce.png
- assets/sprites/gligar.png
- assets/sprites/steelix.png
- assets/sprites/snubbull.png
- assets/sprites/granbull.png
- assets/sprites/qwilfish.png
- assets/sprites/scizor.png
- assets/sprites/shuckle.png
- assets/sprites/heracross.png
- assets/sprites/sneasel.png
- assets/sprites/teddiursa.png
- assets/sprites/ursaring.png
- assets/sprites/slugma.png
- assets/sprites/magcargo.png
- assets/sprites/swinub.png
- assets/sprites/piloswine.png
- assets/sprites/corsola.png
- assets/sprites/corsola-galarian.png
- assets/sprites/remoraid.png
- assets/sprites/octillery.png
- assets/sprites/delibird.png
- assets/sprites/mantine.png
- assets/sprites/skarmory.png
- assets/sprites/houndour.png
- assets/sprites/houndoom.png
- assets/sprites/kingdra.png
- assets/sprites/phanpy.png
- assets/sprites/donphan.png
- assets/sprites/porygon2.png
- assets/sprites/stantler.png
- assets/sprites/smeargle.png
- assets/sprites/tyrogue.png
- assets/sprites/hitmontop.png
- assets/sprites/smoochum.png
- assets/sprites/elekid.png
- assets/sprites/magby.png
- assets/sprites/miltank.png
- assets/sprites/blissey.png
- assets/sprites/raikou.png
- assets/sprites/entei.png
- assets/sprites/suicune.png
- assets/sprites/larvitar.png
- assets/sprites/pupitar.png
- assets/sprites/tyranitar.png
- assets/sprites/lugia.png
- assets/sprites/hooh.png
- assets/sprites/celebi.png
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/to/resolution-aware-images