Commit Graph

36 Commits

Author SHA1 Message Date
Guangcong Luo
4c0699abc6 Implement inputLog
A battle's inputLog is now stored separately from the output log. It's
not an exact log of inputs, but rather just a collection of the inputs
that resulted in the battle: a default choice expands to the choice
that was actually used, and the starting seed is logged whether or not
it was explicitly passed into the battle stream.

Fixes #4348

Fixes #3201
2018-01-28 21:23:06 -06:00
The Immortal
e8d8a6f115 Random Battle: Improve Slaking 2018-01-21 23:52:51 +08:00
The Immortal
97e83422bb Random Battle updates 2018-01-17 21:36:38 +08:00
LegoFigure11
2133190898 BSSF: Fix Aron (#4344)
Update Aron set and fix clause to allow it to be generated
2018-01-16 16:17:15 +08:00
Kevin Lau
10b062955e Random Battle: Add more Knock Off (#4246) 2018-01-12 01:16:43 +08:00
The Immortal
68ca4d5b0f Random Battle updates 2018-01-10 16:44:28 +08:00
The Immortal
7f752b3d5d Random Battle: Add custom level for Dugtrio 2017-12-19 11:53:24 +08:00
Guangcong Luo
193e948592 Move crashlogger.js -> lib/crashlogger.js 2017-12-16 15:40:45 -06:00
The Immortal
d3b5f1cdcd Random Battle: Fix Scald/Hydro Pump check 2017-12-14 18:57:37 +08:00
The Immortal
1114121ac5 Random Battle: Improvements 2017-12-13 05:43:28 +08:00
The Immortal
783b0b0553 Random Battle updates 2017-12-05 02:37:09 +08:00
Guangcong Luo
9bdf674d5f Refactor more tables to arrays
See #4079

Now we're just missing oldgens.
2017-11-30 19:40:16 -06:00
The Immortal
752e006727 Random Battle updates 2017-11-27 22:47:49 +08:00
urkerab
b18d004959 Allow other legal forms in Challenge Cup (#4188) 2017-11-27 17:12:13 +08:00
urkerab
e9303b1d1a Use this when it's a Dex (#4152) 2017-11-16 16:57:08 -06:00
Guangcong Luo
246dfa1da3 Refactor in-object-literal to array-includes (#4079)
Previously, if we wanted to test if A was either 'B' or 'C', we would use
the pattern:

    A in {B:1, C:1}

I actually don't know how common this pattern is; I just started using
it because I was tired of typing `A === 'B' || A === 'C'` all the time.
I never really liked it, though; the `:1` part made it kind of
blatantly a hack.

I did some testing and `['B', 'C'].includes(A)` is overall faster.

(A switch statement is around 20x faster still, but who wants to type
that much code?)

Anyway, the new standard is

    ['B', 'C'].includes(A)

Something something progress!
2017-10-23 09:19:15 -05:00
The Immortal
792f7e0162 Random Battle updates 2017-10-20 13:29:40 +04:00
The Immortal
58e3cf35db Random Battle: Update Groudon 2017-09-27 14:23:31 +04:00
The Immortal
465232da65 Random Battle updates 2017-09-26 22:22:25 +04:00
urkerab
34eade2e87 Simplify artificial replication of Item Clause (#4018) 2017-09-24 23:40:06 -05:00
LegoFigure11
ca0ed8c8de BSS Factory: Major updates (#4015) 2017-09-25 04:47:29 +08:00
The Immortal
68f636d2b2 Random Battle: Minor fixes
Closes #3976
2017-09-11 10:30:16 +04:00
The Immortal
5e7d460149 More Random Battle updates 2017-09-10 01:08:51 +04:00
The Immortal
e778ee0332 Random Battle: Improve Abilities 2017-09-09 16:07:52 +04:00
The Immortal
8eecbdb899 Random Battle updates 2017-09-09 01:59:11 +04:00
MacChaeger
0bd4924ed2 Random Battle: Improve ability selection (#3951)
If both options for the ability would be rejected, default to the better one instead of the worse one.
2017-09-08 17:09:29 +04:00
The Immortal
3f4ac3a44d Random Doubles: Minor changes 2017-09-06 23:31:00 +04:00
The Immortal
68599fac72 Random Battle: Improvements 2017-09-06 23:00:40 +04:00
MacChaeger
6c51031bf3 Randubs: Minimize unused attacking stats (#3945)
* Randubs: Minimize unused attacking stats

This is mostly for Celesteela and Guzzlord so that Beast Boost doesn't increase a useless stat.

* Fix typo

* Fix weirder typo
2017-09-03 12:42:15 +04:00
MacChaeger
7b82cc9549 Randbats: Celesteela doesn't learn Rock Polish (#3930) 2017-08-30 15:49:49 +04:00
The Immortal
b62d9cb8f9 Random Battle updates 2017-08-22 00:39:17 +04:00
HoeenHero
67cf1e2453 Fix monotype randbats (#3836) 2017-07-27 17:57:36 -04:00
Guangcong Luo
bbf7bc98d2 Fix random battle sets
(There were doubles sets in singles games)
2017-07-27 17:49:38 -04:00
Kevin Lau
f519d444f6 Random Doubles: Implement EV fixing for Belly Drum, etc. (#3834)
Copied over from the Random Singles code, minus the Stealth Rocks check.
2017-07-27 03:34:28 -04:00
Guangcong Luo
0ba508bbd3 Support ./pokemon-showdown generate-team
I might regret supporting this syntax, but it's now possible to make
PS generate teams on the commandline using:

./pokemon-showdown generate-team [optional format name] [optional seed]

The output will be in packed team format (which can be pasted into
a teambuilder import box).

The seed-passing should make it significantly more straightforward to
debug team generation weirdness.
2017-07-25 02:59:59 -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