forked from pagefaultgames/pokerogue
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
428 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.