This is a surprisingly minor refactor considering how many files it
touches, but most of this is only renames.
In terms of file renames:
- `tools.js` is now `sim/dex.js`
- `battle-engine.js` is now `sim/index.js` and its three classes are
in `sim/battle.js`, `sim/side.js`, and `sim/pokemon.js`
- `prng.js` is now `sim/prng.js`
In terms of variable renames:
- `Tools` is now `Dex`
- `BattleEngine` is now `Sim`
- `BattleEngine.Battle` is now `Sim.Battle`
- `BattleEngine.BattleSide` is now `Sim.Side`
- `BattleEngine.BattlePokemon` is now `Sim.Pokemon`
Currently TypeScript is validating tools.js and is not particularly
strict about anything and we use 'any' a lot and it's not part of
'npm test' yet, but everything has to start somewhere!
tools.js has also been refactored majorly to use accessors rather
than loader functions. This basically means you don't need to do
Tools.includeData() or anything like that anymore. The new system is
also easier to make TypeScript-compatible.
See #3278
Specifically, user groups are now in /checkpunishment, which has been
renamed /offlinewhois. It doesn't actually function as an offline /whois
since it still requires auth.
Maybe making it not require auth should be a project to put in Ideas.
Across PS, in most places we use <br /> - however, in some other places we used <br> and in some <br/>. This standardizes that to simply be <br />, since that's what we use in the majority of places.
* Added third type to /weakness
In case of Trick-or-Treat or Forest's Curse, a pokémon can have three types. I updated the /weakness command to reflect that.
* Fixed Travis' warning and error
simulator.js doesn't actually contain the simulator, but is really just
an implementation of battles in the RoomGame interface.
Renames:
`Simulator.Battle` -> `Rooms.RoomBattle`
`Simulator.BattlePlayer` -> `Rooms.RoomBattlePlayer`
`Simulator.SimulatorManager` -> `Rooms.SimulatorManager`
`Simulator.SimulatorProcess` -> `Rooms.SimulatorProcess`
`Simulator.create` -> no longer exists, use `new Rooms.RoomBattle(...)`