Skip to content

Commit

Permalink
just some testing/planning/etc
Browse files Browse the repository at this point in the history
  • Loading branch information
DayKev committed Nov 13, 2024
1 parent 5c70ab2 commit 2cd8478
Show file tree
Hide file tree
Showing 5 changed files with 427 additions and 0 deletions.
116 changes: 116 additions & 0 deletions src/data/pokemon-data-structures.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
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`
*/
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;
move?: Moves | Moves[];
moveOfType?: Type; // onix -> steelix, ...
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[]; // pancham -> pangoro
activeWeather?: WeatherType | WeatherType[];
nature?: Nature | Nature[];
// "tandemaus -> maushold (form)" and "dunsparce -> dudunsparce (form)" uses rng... handle with evolution function?
friendship?: number;
biome?: Biome | Biome[];
// gimmighoul... :pikastare:
}

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
67 changes: 67 additions & 0 deletions src/data/pokemon/example.json
Original file line number Diff line number Diff line change
@@ -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
}
}
68 changes: 68 additions & 0 deletions src/data/pokemon/generation-1.json
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
}
}
132 changes: 132 additions & 0 deletions src/data/pokemon/generation-4.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}
}
}
Loading

0 comments on commit 2cd8478

Please sign in to comment.