0.6.4 • Published 2 years ago

@nxpkmn/randoms v0.6.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@nxpkmn/randoms

Test Status License npm version

An automatically generated extraction of a subset of Pokémon Showdown's "Random Battle" generation logic for use with @nxpkmn/sim.

Installation

$ npm install @nxpkmn/randoms

Usage

To generate a random team, get a TeamGenerator for a supported format and call getTeam:

import {TeamGenerators} from '@nxpkmn/randoms';

const generator = TeamGenerators.getTeamGenerator('gen8randombattle');
const team = generator.getTeam();

@nxpkmn/randoms is commonly used with @nxpkmn/sim to set the TeamGenerator factory on its Teams so that Teams.generate will work:

import {Teams} from '@nxpkmn/sim';
import {TeamGenerators} from '@nxpkmn/randoms';

Teams.setGeneratorFactory(TeamGenerators);
const team = Teams.generate('gen1randombattle');

Browser

The recommended way of using @nxpkmn/randoms in a web browser is to configure your bundler (Webpack, Rollup, Parcel, etc) to minimize it and package it with the rest of your application.

License

Substantial amounts of the code in this package have been either derived or generated from portions of Pokémon Showdown code which are distributed under the MIT License.

0.6.4

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago