Commit Graph

16 Commits

Author SHA1 Message Date
Guangcong Luo
e716e9edc7 Implement Ultra Burst 2017-11-17 00:01:09 -06:00
Guangcong Luo
b9ea17e014 TypeScript: Correctly mark args as optional 2017-11-12 01:57:53 -06:00
Quinton Lee
a0b8228592 TypeScript: Improve Sim typing (#4069)
Also improves intellisense for Visual Studio and Visual Studio Code.
2017-10-20 07:53:26 -05:00
Guangcong Luo
6b870967e0 Fix bug in support for >10 pokemon in Team Preview 2017-09-09 20:31:54 -04:00
Guangcong Luo
737d9dbba0 Support more than 10 Pokemon in Team Preview 2017-09-09 20:19:24 -04:00
Guangcong Luo
066d970b54 Fix >6-pokemon Custom Games 2017-09-09 19:41:55 -04:00
Guangcong Luo
b42a322ecb Support over 6 Pokemon in Custom Game 2017-09-09 18:25:26 -04:00
urkerab
bd6743bbe7 Reveal own Ability in Gen 7 (#3969) 2017-09-06 23:21:19 -04:00
Guangcong Luo
18d656519c Fix chooseMove again 2017-08-09 21:52:30 -05:00
Guangcong Luo
29bfa41f79 Fix crash in autoChoose 2017-08-09 20:28:25 -05:00
Guangcong Luo
4df6548cf4 Fix bugs in VGC auto-move resolver 2017-08-02 07:02:32 -04:00
Guangcong Luo
3b4d8b3ff0 Split random-teams.js out of scripts.js
Random team generation scripts are no longer in scripts.js, but instead
in a new file random-teams.js.

The scripts are now also no longer run from inside battles, but in a
new team generator object. This makes it easier for external scripts
to generate random teams by running Dex.generateTeam(format).
2017-07-25 02:59:59 -04:00
Quinton Lee
ec10d30996 eslint: Lint sim/ directory (#3670) 2017-06-21 20:00:17 -07:00
Guangcong Luo
109b2cfe1d Slightly refactor teamsize 2017-05-18 05:38:14 -05:00
Guangcong Luo
22186f1903 Improve TypeScript typing
sim/dex.js and sim/prng.js are now valid strict TypeScript! Also they
have slightly less "any" use than before.
2017-05-08 02:58:55 -05:00
Guangcong Luo
6dd58b40d3 Refactor simulator into new sim/ directory
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`
2017-05-05 16:48:38 -05:00