@pokecord/core
Version:
Pokécord core
30 lines (27 loc) • 905 B
JavaScript
/**
* Returns pokemon data structure
* @param {string} name The pokémon name
* @param {string} iv The ivs of a pokemon, split by ';' hpiv;atkiv;defiv;sp.atkiv;sp.defiv;speed
* @param {number} ivPercentage The total percentage of the ivs
* @param {number} lvl The level of the pokémon
* @param {string} nature The nature of the pokémon
* @param {number} globalid The global dex number for the pokémon
* @param {number} pokemonId The pokémon number
* @param {number} owner The owner's user id
* @returns {object} Pokémon data object
*/
function PokemonStructure(name, iv, ivPercentage, lvl, xp, nature, globalid, pokemonId, owner){
const structure = {
name: name,
iv: iv,
ivPercentage: ivPercentage,
lvl: lvl,
xp: xp,
nature: nature,
globalid: globalid,
pokemonId: pokemonId,
owner: owner
}
return structure;
}
module.exports = PokemonStructure;