Commit Graph

92 Commits

Author SHA1 Message Date
Ivo Julca
ed0f8ed614 Fix mutation of Shaymin typing in STABmons set validation 2015-07-26 01:32:37 -05:00
The Immortal
9981743363 Fix event Pokemon bug in validateSet
Any Pokemon with only one Ability in Gen 3 can get the new Gen 4 one by
evolving. Such as, Extreme Speed Zigzagoon has Pickup only in Gen 3 but
its evolution, Linoone, can have either Pickup or Gluttony in Gen 4 or
higher.
2015-07-19 23:07:49 +04:00
Guangcong Luo
caddeb6ac4 Baton Pass Clause update
We now ban boosting both Speed and non-Speed with Baton Pass.
To make this simpler, we introduce changeSet as separate from
validateSet, which allows us to pass setHas to validateSet
2015-07-13 04:18:28 -04:00
Ivo Julca
9cec432a99 Fix toId on numbers 2015-07-07 12:06:23 -05:00
Ivo Julca
e92bb1b07f Rename globals toName|toString to Tools.[getName|getString] 2015-07-06 00:34:44 -05:00
Guangcong Luo
aa2dad529d Add crash guard to team validator
Team validator crashes no longer stop battles from being created
until the next restart.

In theory, at least.
2015-06-23 23:14:58 -04:00
Ivo Julca
f18eef39ca Fix Travis build 2015-06-12 03:41:22 -05:00
Joimer
5409b3b99b Avoid team validator crash
Until I find the team that is causing this, I cannot do more.
2015-06-05 19:21:00 +02:00
Guangcong Luo
de9c3847fd Nicknames are not subject to namefilter 2015-05-27 14:40:07 -04:00
Joimer
4f2ee6a749 Gen 2: Fix crash in team validator 2015-05-25 00:33:58 +02:00
Juanma Serrano
d3ec7c55cc Gen 2: Fix problem in learnset check with Sketch 2015-05-22 11:04:58 +02:00
Ivo Julca
db4eec3e2a Fix support for Node 0.12
Update the detection of legacy engines, as Node 0.12 has native Map support enabled by default
2015-05-21 18:10:56 -05:00
Ivo Julca
723f4b5a4b Fix support for Node 0.10-0.12
Some child processes now use ES6 methods, so we got to make sure they are available with `es6-shim`
2015-05-21 01:07:08 -05:00
SolarisFox
29b961ff69 Style fix: indexOf() comparisons 2015-05-18 15:55:57 -07:00
Juanma Serrano
c3a28abc61 Gen 2: Proper chain breeding learnset check
This is quite complex.
In gen 2, the egg moves pass through father and species through mother.
Therefore, we must check that:
1. Two egg moves come from the same father or are learned in another way.
2. If two egg moves come from the same father, check if the father can learn those two as well.
Also, we must keep track of the state of egg and machine moves in the learnset in order to properly reject them when the problem is found.

Related commits: 17e8515486 and 33cc1e09eb
2015-05-13 16:45:23 +02:00
Juanma Serrano
33cc1e09eb Gen 2: Fix learnset check with event moves
Gen 2-only event moves are mutually exclusive with Gen 1-only moves.
Related commit: 17e8515486
2015-05-13 14:43:37 +02:00
Juanma Serrano
17e8515486 Gen 2: Learnset fixes with Gen 1 TM tradeback
Fix 6e2ce27684 missed the bigger picture and c41e7813f7 didn't account for the special Gen 1 - Gen 2 case.
On Gen 2, you may learn egg moves that do not exist in gen 1.
Those moves make that Pokémon incompatible with Gen 1 only TMs.
However, other than that, Gen 2 mons can breed in Gen 2, tradeback to Gen 1, and acquire TMs.

This is part 1 of Gen 2 learnset fix, next one being gen 2 egg incompatibilities between them.
2015-05-13 14:11:49 +02:00
Ivo Julca
4222ffb5df Dependant support: make sure that relative paths are resolved properly 2015-05-11 15:38:18 -05:00
Marty-D
15caa1a323 Gen II: Sketch cannot copy certain moves
It also doesn't do anything in Link Battles.
2015-05-06 13:40:26 -04:00
Juanma Serrano
6e2ce27684 Gen 2: Fix critical learnset check issues
Gen 2 does not accept any Pokémon from future generations.
This fix makes it so egg breeding moves in gen 2 can only happen in gen 2.
2015-04-23 14:05:10 +02:00
Morfent
ce1724e179 Replace all s.substr(x, 1) with s.charAt(x) 2015-04-06 21:20:43 -03:00
Joimer
6ef22b432b Fix crash in team validator
This commit fixs a specific case crash on team validator that will crash all the validation process.
2015-02-22 13:20:40 +01:00
The Immortal
9742ecf62f Fix learnset bug
This fixes the weird case of hidden ability Staraptor in gen 5 being
disallowed egg moves because Starly doesn't have a hidden ability in gen
5. Non-hidden ability Starly can actually evolve into hidden ability
Staravia/Staraptor.
2015-02-22 15:37:05 +04:00
The Immortal
1ed994df8d Fix Shaymin in STABmons
It can get Flying moves from Shaymin-Sky.
2015-02-10 03:22:45 +04:00
Guangcong Luo
23c67c9140 Quit PS child processes when parent quits
Previously, child processes would stick around in certain cases.

Fixes #1507.
2015-02-05 01:16:47 -06:00
The Immortal
591ad5285a Fix Defog and Whirlpool being transferrable together
Defog can only be transferred from HGSS and Whirlpool can only be
transferred from DPP. This means they cannot be transferred together.
2015-02-01 01:23:19 +04:00
The Immortal
29d17ebe53 Update STABmons
Chatter is banned from anything that doesn't learn it normally.
2015-01-31 23:48:44 +04:00
Joimer
c7e9ffd3a7 Implement learn command for past gens 2015-01-26 21:31:34 +01:00
The Immortal
e00ad7bdc2 Combine Shaymin and Shaymin-Sky learnsets
They are freely switchable formes, just like Deoxys.
2015-01-17 01:54:22 +04:00
Juanma Serrano
3bd4c0649e Gens 1 & 2: On Tradeback, allow Egg moves from gen 2 with gen 1 moves 2015-01-09 10:30:11 +01:00
Juanma Serrano
5a7c3e103b Gen 2: Allow event tradebacks on gen 2
With this change, you can use something as Lovely Kiss Snorlax with Double-Edge.
You could get the lovely kiss Snorlax from event, trade it to Gen 1 as lovely kiss existed, teach it Double-Edge through TM and trade it back to Gen 2.
Tested that it doesn't break gens 3-6 with Charmander with howl and body slam (gen 4 event, gen 3 TM).
2014-12-23 11:02:33 +01:00
小太
6138ab9e0b Add REPL sockets 2014-12-14 23:11:13 +11:00
Marty-D
31e5f39c59 Cosplay Pikachu can't learn Pikachu's moves. 2014-12-09 10:09:11 -05:00
The Immortal
767634ae4e Modify unreleased item banning
They are banned if Unreleased is part of the banlist, rather than
Illegal.
2014-10-22 01:38:57 +04:00
小太
5027be79fb Add jscs as a style checker, and add some extra jshint options 2014-09-29 18:38:01 +10:00
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