mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 17:29:30 +02:00
Remove redundant files
This commit is contained in:
parent
24907cc862
commit
ae680822cc
@ -103,22 +103,6 @@ export function newDocument(name: string = "Untitled Run " + (new Date().getUTCM
|
|||||||
export function importDocument(drpd: string): DRPD {
|
export function importDocument(drpd: string): DRPD {
|
||||||
return JSON.parse(drpd) as DRPD;
|
return JSON.parse(drpd) as DRPD;
|
||||||
}
|
}
|
||||||
export function importPokemon(pokemon: any): PokeData {
|
|
||||||
return {
|
|
||||||
id: pokemon.id,
|
|
||||||
name: pokemon.name,
|
|
||||||
ability: pokemon.ability,
|
|
||||||
isHiddenAbility: pokemon.isHiddenAbility,
|
|
||||||
passiveAbility: pokemon.passiveAbility,
|
|
||||||
nature: importNature(pokemon.nature),
|
|
||||||
gender: pokemon.gender,
|
|
||||||
rarity: pokemon.rarity,
|
|
||||||
captured: pokemon.captured,
|
|
||||||
level: pokemon.level,
|
|
||||||
items: pokemon.items.map(itm => importItem(itm)),
|
|
||||||
ivs: importIVs(pokemon.ivs)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export function exportPokemon(pokemon: Pokemon, encounterRarity?: string): PokeData {
|
export function exportPokemon(pokemon: Pokemon, encounterRarity?: string): PokeData {
|
||||||
return {
|
return {
|
||||||
id: pokemon.species.speciesId,
|
id: pokemon.species.speciesId,
|
||||||
@ -135,13 +119,6 @@ export function exportPokemon(pokemon: Pokemon, encounterRarity?: string): PokeD
|
|||||||
ivs: exportIVs(pokemon.ivs)
|
ivs: exportIVs(pokemon.ivs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export function importNature(nature: any): NatureData {
|
|
||||||
return {
|
|
||||||
name: nature.name,
|
|
||||||
increased: nature.increased,
|
|
||||||
decreased: nature.decreased
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export function exportNature(nature: Nature): NatureData {
|
export function exportNature(nature: Nature): NatureData {
|
||||||
return {
|
return {
|
||||||
name: getNatureName(nature),
|
name: getNatureName(nature),
|
||||||
@ -149,13 +126,6 @@ export function exportNature(nature: Nature): NatureData {
|
|||||||
decreased: getNatureDecrease(nature),
|
decreased: getNatureDecrease(nature),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export function importItem(item: any): ItemData {
|
|
||||||
return {
|
|
||||||
id: item.id,
|
|
||||||
name: item.name,
|
|
||||||
quantity: item.quantity
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export function exportItem(item: PokemonHeldItemModifier): ItemData {
|
export function exportItem(item: PokemonHeldItemModifier): ItemData {
|
||||||
return {
|
return {
|
||||||
id: item.type.id,
|
id: item.type.id,
|
||||||
@ -163,16 +133,6 @@ export function exportItem(item: PokemonHeldItemModifier): ItemData {
|
|||||||
quantity: item.getStackCount()
|
quantity: item.getStackCount()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export function importIVs(ivs: any): IVData {
|
|
||||||
return {
|
|
||||||
hp: ivs[0],
|
|
||||||
atk: ivs[1],
|
|
||||||
def: ivs[2],
|
|
||||||
spatk: ivs[3],
|
|
||||||
spdef: ivs[4],
|
|
||||||
speed: ivs[5]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export function exportIVs(ivs: integer[]): IVData {
|
export function exportIVs(ivs: integer[]): IVData {
|
||||||
return {
|
return {
|
||||||
hp: ivs[0],
|
hp: ivs[0],
|
||||||
|
Loading…
Reference in New Issue
Block a user