From 2a549be331375f8560a1a560bc0f42fbbd759144 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Fri, 18 Oct 2024 18:40:26 -0700 Subject: [PATCH] just some testing/planning/etc --- .github/workflows/tests.yml | 2 + src/data/pokemon-data-structures.ts | 115 ++++++++++++++++++++++++ src/data/pokemon/example.json | 67 ++++++++++++++ src/data/pokemon/generation-1.json | 68 ++++++++++++++ src/data/pokemon/generation-4.json | 132 ++++++++++++++++++++++++++++ src/data/pokemon/generation-6.json | 44 ++++++++++ 6 files changed, 428 insertions(+) create mode 100644 src/data/pokemon-data-structures.ts create mode 100644 src/data/pokemon/example.json create mode 100644 src/data/pokemon/generation-1.json create mode 100644 src/data/pokemon/generation-4.json create mode 100644 src/data/pokemon/generation-6.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d30d8adba385..8e4e27cbe93f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,6 +17,7 @@ on: jobs: pre-test: name: Run Pre-test + if: false runs-on: ubuntu-latest steps: - name: Check out Git repository @@ -37,6 +38,7 @@ jobs: run-tests: name: Run Tests + if: false needs: [pre-test] strategy: matrix: diff --git a/src/data/pokemon-data-structures.ts b/src/data/pokemon-data-structures.ts new file mode 100644 index 000000000000..e83b6924383e --- /dev/null +++ b/src/data/pokemon-data-structures.ts @@ -0,0 +1,115 @@ +import { GrowthRate } from "#app/data/exp"; +import { Gender } from "#app/data/gender"; +import { PokemonForm } from "#app/data/pokemon-species"; +import { Type } from "#app/data/type"; +import { Abilities } from "#enums/abilities"; +import { Biome } from "#enums/biome"; +import { Moves } from "#enums/moves"; +import { Nature } from "#enums/nature"; +import { Species } from "#enums/species"; +import { TimeOfDay } from "#enums/time-of-day"; +import { WeatherType } from "#enums/weather-type"; + +// #region stuff to create/modify +export enum LegendType { + NONE, + SUBLEGENDARY, + LEGENDARY, + MYTHICAL +} + +// formerly PartyMemberStrength, renamed for clarity +export enum EnemyPartyMemberStrength { + WEAKEST, + WEAKER, + WEAK, + AVERAGE, + STRONG, + STRONGER, +} + +/** + * change to linear evolution delay chance (ie: Bulbasaur evolves at 16 normally, + * with medium delay it would have a 10% chance to be ivysaur + * starting at lv17, 20% at lv18, ... and 100% chance to be ivysaur at lv26). + * + * higher "EnemyPartyMemberStrength" values would reduce the delay? + * or use a separate delay value for trainers? + * + * increase # of enum members? + * + * rename from `SpeciesWildEvolutionDelay` + */ +export enum EnemyEvolutionDelay { + NONE, + SHORT, // 5 + MEDIUM, // 10 + LONG, // 15 + VERY_LONG, // 20 + NEVER, +} +// #endregion + +// #region just collecting/connecting information together, exact data structures tbd +interface EvolutionConditions { + level?: number; + item?: any; // gimmighoul goes here...? + move?: Moves | Moves[]; + moveOfType?: Type; // onix -> steelix needs steel type move, ... + timeOfDay?: TimeOfDay | TimeOfDay[]; + gender?: Gender; + //spaceInParty?: boolean; // for shedinja; could be handled by the evolution function instead since you can't go "nincada -> shedinja" directly + caughtPokemon?: unknown; // "mantyke -> mantine" (needs caught remoraid), ... + typeInParty?: Type | Type[]; // currently only "pancham -> pangoro", kinda awkward + activeWeather?: WeatherType | WeatherType[]; + nature?: Nature | Nature[]; + // "tandemaus -> maushold (form)" and "dunsparce -> dudunsparce (form)" uses rng... handle with evolution function? + friendship?: number; + biome?: Biome | Biome[]; +} + +class PokemonEvolution { + preEvolution?: { + id: Species; + formKey?: string | null; // `null` = target pokemon has no forms but current does; `undefined` = use same form key + }; + evolution: { + id: Species; + conditions: EvolutionConditions; + formKey?: string | null; // same as above + expectedEnemyEvolveLevel?: number; // used if the pokemon doesn't evolve by level, as a baseline + }; + enemyDelay: EnemyEvolutionDelay = EnemyEvolutionDelay.NONE; +} + +export class PokemonSpeciesData { + id: Species; + name: string; + generation: number; // if we're separating pokemon by generation (ie: `generation-1.json`, ...), do we need to specify this as part of the pokemon object in the json file itself? + legendType: LegendType = LegendType.NONE; + speciesText: string; + type1: number; + type2?: number; + height: number; + weight: number; + ability1: Abilities; + ability2: Abilities = Abilities.NONE; + abilityHidden: Abilities = Abilities.NONE; + baseHP: number; + baseAtk: number; + baseDef: number; + baseSpatk: number; + baseSpdef: number; + baseSpd: number; + catchRate: number; + baseFriendship: number; + baseExp: number; + growthRate: GrowthRate; + malePercent?: number; // `undefined` = genderless + genderDiffs: boolean = false; + canChangeForm: boolean = false; + forms: PokemonForm[] = []; + evolutions?: PokemonEvolution[]; + isStarterSelectable: boolean = false; +} +// #endregion diff --git a/src/data/pokemon/example.json b/src/data/pokemon/example.json new file mode 100644 index 000000000000..4019a1bfb005 --- /dev/null +++ b/src/data/pokemon/example.json @@ -0,0 +1,67 @@ +{ + "pokemon": { + "id": 0, + "name": "Pokemon Name", + "generation": 0, + "legendType": "Mythical", + "speciesText": "Example Pokémon", + "type1": "Normal", + "type2": "Normal", + "height": 12, + "weight": 34, + "ability1": "Some Ability", + "ability2": "Another Ability", + "abilityHidden": "Third Ability", + "baseHP": 10, + "baseAtk": 20, + "baseDef": 30, + "baseSpatk": 40, + "baseSpdef": 50, + "baseSpd": 60, + "catchRate": 255, + "baseFriendship": 50, + "baseExp": 50, + "growthRate": "Medium Fast", + "malePercent": 50, + "genderDiffs": true, + "canChangeForm": true, + "forms": ["one", "two", "three"], + "evolutions": { + "from": { + "name": "unevolvedpokemon", + "form": "form-name" + }, + "to": { + "evolvedspecies": { + "conditions": { + "item": "Linking Cord", + "move": "Extreme Speed", + "moveOfType": "Normal", + "timeOfDay": ["Dawn", "Dusk"], + "gender": "Female", + "caughtPokemon": "arceus", + "typeInParty": "Normal", + "activeWeather": ["Snow", "Hail"], + "nature": ["Hardy", "Serious"], + "friendship": 200, + "biome": ["Island", "Lake", "Sea"] + }, + "form": "another-form-name", + "expectedEnemyEvolveLevel": 25 + }, + "alternatespecies": { + "conditions": { + "level": 20 + }, + "form": null + } + } + }, + "isStarterSelectable": true + }, + "pokemon_one": { + "formName": "First Form", + "baseAtk": 40, + "baseSpatk": 20 + } +} \ No newline at end of file diff --git a/src/data/pokemon/generation-1.json b/src/data/pokemon/generation-1.json new file mode 100644 index 000000000000..228881d404c7 --- /dev/null +++ b/src/data/pokemon/generation-1.json @@ -0,0 +1,68 @@ +{ + "bulbasaur": { + "id": 1, + "name": "Bulbasaur", + "generation": 1, + "speciesText": "Seed Pokémon", + "type1": "Grass", + "type2": "Poison", + "height": 0.7, + "weight": 6.9, + "ability1": "Overgrow", + "abilityHidden": "Chlorophyll", + "baseHP": 45, + "baseAtk": 49, + "baseDef": 49, + "baseSpatk": 65, + "baseSpdef": 65, + "baseSpd": 45, + "catchRate": 45, + "baseFriendship": 50, + "baseExp": 64, + "growthRate": "Medium Slow", + "malePercent": 87.5, + "evolutions": { + "to": { + "ivysaur": { + "conditions": { + "level": 16 + } + } + } + }, + "isStarterSelectable": true + }, + "ivysaur": { + "id": 2, + "name": "Ivysaur", + "generation": 1, + "speciesText": "Seed Pokémon", + "type1": "Grass", + "type2": "Poison", + "height": 1, + "weight": 13, + "ability1": "Overgrow", + "abilityHidden": "Chlorophyll", + "baseHP": 60, + "baseAtk": 62, + "baseDef": 63, + "baseSpatk": 80, + "baseSpdef": 80, + "baseSpd": 60, + "catchRate": 45, + "baseFriendship": 50, + "baseExp": 142, + "growthRate": "Medium Slow", + "malePercent": 87.5, + "evolutions": { + "from": "ivysaur", + "to": { + "venasaur": { + "conditions": { + "level": 32 + } + } + } + } + } +} \ No newline at end of file diff --git a/src/data/pokemon/generation-4.json b/src/data/pokemon/generation-4.json new file mode 100644 index 000000000000..0bbe5064e05c --- /dev/null +++ b/src/data/pokemon/generation-4.json @@ -0,0 +1,132 @@ +{ + "burmy": { + "id": 412, + "name": "Burmy", + "generation": 4, + "speciesText": "Bagworm Pokémon", + "type1": "Bug", + "height": 0.2, + "weight": 3.4, + "ability1": "Shed Skin", + "abilityHidden": "Overcoat", + "baseHP": 40, + "baseAtk": 29, + "baseDef": 45, + "baseSpatk": 29, + "baseSpdef": 45, + "baseSpd": 36, + "catchRate": 120, + "baseFriendship": 70, + "baseExp": 45, + "growthRate": "Medium Fast", + "malePercent": 50, + "genderDiffs": true, + "canChangeForm": true, + "forms": ["plant", "sandy", "trash"], + "evolutions": { + "to": { + "wormadam": { + "conditions": { + "level": 20, + "gender": "Female" + } + }, + "mothim": { + "conditions": { + "level": 20, + "gender": "Male" + }, + "form": null + } + } + }, + "isStarterSelectable": true + }, + "burmy_plant": { + "formName": "Plant Cloak" + }, + "burmy_sandy": { + "formName": "Sandy Cloak" + }, + "burmy_trash": { + "formName": "Trash Cloak" + }, + + "wormadam": { + "id": 413, + "name": "Wormadam", + "generation": 4, + "speciesText": "Bagworm Pokémon", + "type1": "Bug", + "type2": "Grass", + "height": 0.5, + "weight": 6.5, + "ability1": "Anticipation", + "abilityHidden": "Overcoat", + "baseHP": 60, + "baseAtk": 59, + "baseDef": 85, + "baseSpatk": 79, + "baseSpdef": 105, + "baseSpd": 36, + "catchRate": 45, + "baseFriendship": 70, + "baseExp": 148, + "growthRate": "Medium Fast", + "malePercent": 0, + "forms": ["plant", "sandy", "trash"], + "evolutions": { + "from": "burmy" + } + }, + "wormadam_plant": { + "formName":"Plant Cloak" + }, + "wormadam_sandy": { + "formName": "Sandy Cloak", + "type2": "Ground", + "baseAtk": 79, + "baseDef": 105, + "baseSpatk": 59, + "baseSpdef": 85 + }, + "wormadam_trash": { + "formName": "Trash Cloak", + "type2": "Steel", + "baseAtk": 69, + "baseDef": 95, + "baseSpatk": 69, + "baseSpdef": 95 + }, + + "mothim": { + "id": 414, + "name": "Mothim", + "generation": 4, + "legendType": "None", + "speciesText": "Moth Pokémon", + "type1": "Bug", + "type2": "Flying", + "height": 0.9, + "weight": 23.3, + "ability1": "Swarm", + "ability2": "None", + "abilityHidden": "Tinted Lens", + "baseHP": 60, + "baseAtk": 59, + "baseDef": 85, + "baseSpatk": 79, + "baseSpdef": 105, + "baseSpd": 36, + "catchRate": 45, + "baseFriendship": 70, + "baseExp": 148, + "growthRate": "Medium Fast", + "malePercent": 0, + "evolutions": { + "from": { + "burmy": ["plant", "sandy", "trash"] + } + } + } +} \ No newline at end of file diff --git a/src/data/pokemon/generation-6.json b/src/data/pokemon/generation-6.json new file mode 100644 index 000000000000..874c4ae7ee5d --- /dev/null +++ b/src/data/pokemon/generation-6.json @@ -0,0 +1,44 @@ +{ + "scatterbug": { + "id": 664, + "name": "Scatterbug", + "generation": 6, + "speciesText": "Scatterdust Pokémon", + "type1": "Bug", + "height": 0.3, + "weight": 2.5, + "ability1": "Shield Dust", + "ability2": "Compound Eyes", + "abilityHidden": "Friend Guard", + "baseHP": 38, + "baseAtk": 35, + "baseDef": 40, + "baseSpatk": 27, + "baseSpdef": 25, + "baseSpd": 35, + "catchRate": 255, + "baseFriendship": 70, + "baseExp": 40, + "growthRate": "Medium Fast", + "malePercent": 50, + "forms": ["meadow", "icy-snow", "..."], + "evolutions": { + "to": { + "spewpa": { + "conditions": { + "level": 9 + } + } + } + }, + "isStarterSelectable": true + }, + "scatterbug_meadow": { + "formName": "Meadow Pattern", + "spriteFormKey": "" + }, + "scatterbug_icy-snow": { + "formName": "Icy Snow Pattern", + "spriteFormKey": "" + } +} \ No newline at end of file