pokemon-showdown/sim/index.js
Quinton Lee 0c94145c40 Fix remaining custom format issues (#3910)
Rules for custom formats are once again sanitized and can be passed
around more easily by attaching them to the format's id.

Fixes:
- "Rule:" being required to add or remove a rule
- ruleset changes not being shown in battles
- the display of custom rules being affected by user input
- custom formats being broken by /hotpatch formats
2017-08-23 22:27:09 -07:00

29 lines
699 B
JavaScript

/**
* Simulator process
* Pokemon Showdown - http://pokemonshowdown.com/
*
* This file is where the battle simulation itself happens.
*
* The most important part of the simulation happens in runEvent -
* see that function's definition for details.
*
* @license MIT license
*/
'use strict';
const Dex = require('./dex');
global.toId = Dex.getId;
const Battle = require('./battle');
const Side = require('./side');
const Pokemon = require('./pokemon');
const PRNG = require('./prng');
exports.construct = function (format, rated, send, prng) {
return new Battle(format, rated, send, prng);
};
exports.Pokemon = Pokemon;
exports.Side = Side;
exports.Battle = Battle;
exports.PRNG = PRNG;