Commit Graph

57 Commits

Author SHA1 Message Date
Ivo Julca
8c393d7c7b Ban tradebacks in Gen 1 standard ruleset 2014-09-11 14:38:34 -05:00
The Immortal
cad7227583 Update learnset checker
Modify 574c452892 to only add the id if
the Pokemon has a prevo. Alphabet Cup was removed in an earlier commit.
2014-09-11 23:01:00 +04:00
Ivo Julca
c4b3d29805 Support tradeback moves in Gen 1 set validator
- Revert removal of prevo references in old gens' dex. It turns out it would only have made this messier.
- Add egg groups back to Gen 1 dex.
2014-09-10 16:23:23 -05:00
The Immortal
574c452892 Update learnset checker
This fixes incompatibilities that occur because of a baby Pokemon and
its evolution learning different egg moves. For example: Azumarill with
Encore and Perish Song. Only Azurill learns Encore, and only Marill
learns Perish Song.

This fix only affects gen 6, specifically Pentagon only formats like
VGC, so the bug still exists in gen 5 and below.
2014-09-10 19:52:00 +04:00
The Immortal
30182459bc Update formats
- Removed OM: Alphabet Cup
- Added OM: Mediocremons
- Fixed Fairy Face-Off
2014-08-30 13:48:42 +04:00
Ivo Julca
5e47021789 Implement new Monotype bans
Also, validateTeam now gets passed the list of stuff contained in the team as an extra parameter.
2014-08-28 02:00:23 -05:00
The Immortal
1a580bfa58 Update team-validator.js
Meant to do this in f882c0e193
2014-08-21 22:39:32 +04:00
Pikachuun
fa620a99d5 Enforce the 510 EV limit
By moving the EV block from team-validator.js to rulesets.js’s Pokemon ruleset, the 510 EV limit is enforced in Balanced Hackmons. The other block regarding abilities is still in team-validator.
2014-08-17 12:49:14 -04:00
V4Victini
c217afcdbe In Gen 6, no Pokemon can battle with >510 EVs 2014-08-17 01:52:39 -04:00
Guangcong Luo
af2026436a More style fixes and Gulpfile updates
JSHint is now a fair bit stricter, and is now correctly checking
files in `mods/`.

The code has been fixed to match the new stricter standards.

JSHint has now caught its second actual bug: Gen 5 Pinap Berry
was Ice instead of Grass.
2014-08-10 20:43:53 -04:00
Guangcong Luo
12b673bb49 Fix style errors; update gulpfile
I used a hack to make the multiple declaration errors go away,
so all that remained in jsHint were actual errors, which I've
now mostly fixed.

All this linting ended up uncovering one actual bug: Uproar's
message not showing. It's a very minor bug in a move no one uses,
so I'm going to fold it into this commit.
2014-08-10 18:06:44 -04:00
Guangcong Luo
f031f6943c Better error messages for event moves 2014-08-09 23:56:05 -04:00
Ivo Julca
9bf6091d79 Fix crash in 41daa79 2014-08-01 15:33:05 -05:00
Ivo Julca
41daa79c61 Implement August OM 2014-07-31 13:39:01 -05:00
The Immortal
9b44d4b237 Update team-validator.js
- Fixed crash introduced in 99fad48d59
- Only females can pass down the hidden ability before gen 6
- Nidoran-M line and Volbeat are male only but can have a female parent
(Nidoran-F and Illumise, respectively)
2014-07-27 13:51:37 +04:00
The Immortal
99fad48d59 Update team-validator.js 2014-07-26 17:25:18 +04:00
The Immortal
f882c0e193 Fix bug in checkLearnset 2014-07-19 22:26:23 +04:00
小太
09e0503b25 Remove trailing whitespace 2014-07-05 19:02:39 +10:00
Slayer95
52926acfe2 Set lower limit for team length in non singles battles 2014-06-14 19:26:25 -05:00
Guangcong Luo
7dd4d368db Fix race condition in team validator
Would lead to the wrong kinds of teams sometimes.
2014-05-24 02:50:43 -04:00
V4Victini
5e312a279d Label and ban unreleased moves
This will stop Smeargle from bringing these moves into its formats.
Especially relevant in VGC.
2014-04-22 15:02:27 -04:00
小太
5c8fc7b982 Space after function for anonymous functions 2014-04-22 01:58:16 +10:00
小太
6fb3bc332a Spaces around operators and === instead of == 2014-04-22 01:56:11 +10:00
Slayer95
05e7060474 Deprecate 'toUserid' global
Replaced by 'toId'.
2014-04-18 16:49:16 -05:00
Slayer95
4c18aa60f1 Remove global 'fs' 2014-04-17 14:37:32 -05:00
Slayer95
75559362b4 Rename global config to Config 2014-04-17 01:12:28 -04:00
Guangcong Luo
dfae5d02c3 Don't check evo level in hackmons/custom 2014-04-17 00:10:01 -04:00
Guangcong Luo
c42a2f2aa7 Use fewer trys
I read something that says that V8 doesn't optimize any code inside
try-blocks. I hope this means that this change will lead to better-
performing code, but I suspect the difference will be relatively
small.
2014-04-10 19:04:24 -04:00
V4Victini
2ebf841dd9 Fix set.forcedLevel
Changes set.level to set.forcedLevel after validation
2014-04-01 14:26:22 -04:00
TalkTakesTime
d64efc661f Correct Alphabet Cup learnset checker 2014-03-10 12:56:53 +13:00
Guangcong Luo
15b0397143 Make team unpacker less susceptible to DoS 2014-03-09 15:04:40 -04:00
Guangcong Luo
d59dd83045 Comment out some debug code 2014-03-05 23:50:25 -05:00
Guangcong Luo
e2b57563a6 Optimized team sending
Teams are now sent using our new packTeam/unpackTeam code, rather
than JSON. This compresses teams from an average of 2000 bytes to
an average of 500 bytes.
2014-03-05 23:30:16 -05:00
TalkTakesTime
2eab090759 Correct implementation of Alphabet Cup 2014-03-04 23:25:01 +13:00
The Immortal
1e93b9aaee Update learnset checker
This prevents a number of illegal combinations with hidden abilities by
checking if the Pokemon does have a hidden ability in the gen of a
source.
incompatibleHidden is used so that the compatibility error is shown to
the user, rather than the "can't learn" message.
2014-02-16 20:37:17 +04:00
V4Victini
1c23a4677f Revert "Update set validator"
This reverts commit 4352ff7e51.
2014-02-15 21:13:02 -05:00
The Immortal
4352ff7e51 Update set validator
This fixes Kecleon with Protean and tutor + egg moves being incorrectly
legal
2014-02-15 01:06:01 +04:00
The Immortal
edb49ec395 Update set validator
Scolipede with Quick Feet transferred to XY gains Speed Boost, and
should be legal with previous gen tutor moves
2014-02-11 13:16:09 +04:00
Tyler Stark
bff353cc58 Second Pass at cleaning up the code. These are pretty safe edits that include adding 0 to decimal values, fixing variables that are declared multiple times, and removing duplicate keys 2014-02-09 23:38:57 -06:00
Tyler Stark
afb3dc0c09 First pass at code quality: adding semicolons. 2014-02-09 20:35:42 -06:00
Guangcong Luo
e4e740d9fd Simplify code for combo bans 2014-02-02 20:21:54 -05:00
Guangcong Luo
9050bb4a25 Don't tier formes separately unless required
If a Pokemon has no tier listed, it will be considered to be tiered
identically to its base forme, and affected by bans of its base
forme.

This applies to Keldeo, Meloetta, and Genesect formes.
2014-01-27 21:44:54 -05:00
Guangcong Luo
ff9671bb0a Fix bug disallowing itemless mons 2014-01-23 22:05:21 -08:00
Guangcong Luo
c76e3f69a9 Cleanup for validator optimization 2014-01-23 21:56:53 -08:00
Guangcong Luo
d2bd9fe943 Make sure names can't be blank
This is sort of a hack; will do this properly later
2014-01-23 21:35:26 -08:00
Guangcong Luo
1b0b3ec63b Optimize team validator
The main process no longer does any JSON parsing/stringifying of
teams. The communication protocol with validator processes has
been changed from JSON to a string protocol delimited by pipes.

A variety of more minor optimizations have also been done.
2014-01-23 21:35:26 -08:00
Slayer95
36afb34017 Improve error message on invalid item 2014-01-23 19:20:42 -05:00
Slayer95
0e4d154f54 Fix validator allowing fake items 2014-01-23 18:08:06 -05:00
Guangcong Luo
9f8c4c9328 More accurate crash logging in validator processes 2014-01-19 20:44:51 -08:00
The Immortal
7468bbb8c5 Fix major bug with total EVs 2014-01-14 22:47:53 +04:00