Commit Graph

217 Commits

Author SHA1 Message Date
Guangcong Luo
29b8101cdb Validator: Massively improve event compatibility errors
Event-only Pokemon now receive detailed event compatibility
error messages, like we do for event moves.

Event move/ability information is now fixed, so the validator now
explicitly specifies whether it's a move or ability that a move is
incompatible with.

Related: We no longer warn about event IV compatibility for level 100
Pokemon in Gen 7.
2016-11-29 23:41:32 -06:00
Guangcong Luo
d45414f2ec Fix Battle Bond Greninja
This introduces a new ability slot 'S' which corresponds to Battle
Bond only.

There's also a little bit of a hack to consider Battle Bond Greninja
Ash-Greninja for the purposes of move and event validation.
2016-11-29 23:17:20 -06:00
The Immortal
a7df69ed5a Greninja is not available in SM
Ash-Greninja is.
2016-11-29 17:25:45 +04:00
The Immortal
1993d54e8b Ash-Greninja is a separate Pokemon
It is a separate Pokemon in-game. It can’t learn egg moves, can’t be
bred, and can only have Battle Bond.
2016-11-27 21:49:26 +04:00
The Immortal
ef946414e8 Remove Pumpkaboo-Super learnset
This is unneeded because they are just level up moves. Having this
means adding exceptions in multiple places.
2016-11-26 14:08:51 +04:00
Guangcong Luo
d2010d6865 Fix validator forme inheritance
Alolan formes were inheriting moves from their base formes, which they
aren't supposed to do.

It turns out only two Pokemon with learnsets inherit from their base
forme, Rotom and Pumpkaboo (there's a Pumpkaboo forme with event moves).

This is the whitelist the client teambuilder uses, and the server is now
using it as well.
2016-11-25 23:28:19 -05:00
The Immortal
9e58b646f6 Implement gen 7 move relearner mechanics 2016-11-24 12:05:55 +04:00
The Immortal
e2926179e8 Fix Battle Bond Greninja having past gen moves
If we’re not going to make it a separate form then this is necessary.
2016-11-21 16:19:29 +04:00
Guangcong Luo
f432a1f472 Fix crash in rulesets 2016-11-19 23:09:15 -05:00
Guangcong Luo
fff2df4dcb Fix gen 7 released/unreleased check 2016-11-19 02:26:42 -05:00
Guangcong Luo
611853919f Add Gen 7 OU and VGC betas 2016-11-18 13:18:21 -05:00
Guangcong Luo
be9d2ee94a Support Gen 7 Pentagon 2016-11-18 13:18:21 -05:00
The Immortal
fd64cf055c Update checkLearnset for gen 7 2016-11-17 11:06:13 -06:00
Marty-D
1d9feb363e Implement remaining Z-Moves
- Implement their tentative interaction with protection moves
- Make them unsketchable
2016-11-17 11:06:13 -06:00
McLemore
f223d5bf7d Team Validation: Validate Natures (#2853)
Simplify "if" statement

Fix "set.nature.name.exists" always returns undefined

Add '.name' and modify 'if' statement

Simplify 'if' statement
2016-10-24 11:20:50 -05:00
Guangcong Luo
2604780ec5 Refactor Tools
Tools will be renamed to Dex soon, which is why the code inside Tools
is calling itself "Dex" now, but right now we're just refactoring its
internal code and not officially renaming it yet.

In the meantime, Tools is now an ES6 Class.

A long-standing bug in learnset loading order (the one
test/chat-plugins/datasearch.js tests for) has finally been fixed, so
Tools.includeMods() is no longer necessary to accurately access modded
data.

Tools.mod has been split into Tools.mod(modid) and
Tools.format(format). The issue of Tools.mod being ambiguous about
whether it's passed a mod or a format hasn't been a _bug_ for a while,
but this is still more readable.

Other renames include:

Tools#isLoaded -> Tools#dataLoaded
Tools.includeMods() -> Tools.includeModData()
Tools.preloadMods() -> Tools.includeMods()
Tools.preloadedMods -> Tools.modsLoaded
Tools.moddedTools -> Tools.dexes

Do not just rename your calls of Tools.includeMods() to
Tools.includeModData(). With the learnset loading bug fixed, there's
no reason to use it unless you need direct access to
Tools.dexes[...].data for some reason (you don't, just use
Tools.mod(...).data)
2016-10-21 13:23:21 -05:00
urkerab
f898660dde Allow formats to unban inherited formats or rulesets (#2844)
* Revert "Fix 056e1a0b2309751071b13d233a131fc595bc82fd"

This reverts commit fb4066d476.

* Revert "Allow formats to override inherited formats or rulesets (#2547)"

This reverts commit 056e1a0b23.

* Allow formats to unban inherited formats or rulesets
2016-10-18 09:28:08 -05:00
QuiteQuiet
e69fba2690 Team Validator: Validate Happiness when set (#2839) 2016-10-12 09:40:16 -07:00
sirDonovan
db7ac77297 Validator: use unbanlists for supplementary unbans 2016-10-05 18:55:11 -05:00
sirDonovan
fb4066d476 Fix 056e1a0b23
It broke tier validation and didn't work correctly due to a typo.
2016-10-05 18:17:56 -05:00
urkerab
056e1a0b23 Allow formats to override inherited formats or rulesets (#2547) 2016-10-05 14:38:49 -07:00
The Immortal
2b8f343909 STABmons: Ban Acupressure 2016-10-05 05:52:57 +04:00
The Immortal
0f157be311 Better validator fix 2016-10-02 22:35:22 +04:00
Quinton Lee
9719852a49 Fix crash in validator 2016-10-02 13:09:33 -05:00
Quinton Lee
827e969991 Tournaments: implement banlist feature (#2799)
Tournament creators can now specify a supplementary banlist.

Also fixes a related validator bug.
2016-09-30 00:44:21 -07:00
Quinton Lee
dce63c36d7 Validator: support supplementary banlists (#2794) 2016-09-29 00:41:06 -07:00
Quinton Lee
85a10e5f63 Validator: fix typoes in ban reasons 2016-09-28 17:24:07 -05:00
urkerab
e853a61d58 Validate the template later once we know the real species (#2786) 2016-09-27 23:53:40 -07:00
urkerab
1a191a696a Allow the banlist to specify a numeric limit of team properties (#2773) 2016-09-24 12:35:57 -07:00
Ivo Julca
22dc7befc0
Refactor validator to use template strings 2016-09-19 12:05:40 -05:00
urkerab
b507af3cc4 Report complex bans using the original text (#2528) 2016-09-15 17:02:12 -07:00
Ben Davies
d9c6fe54b2 ProcessManager: subclass to extend ProcessManager, unit tests setup (#2739)
Before, an options object containing properties and values to be used
was how decorated instances of the class would be created. This meant
the constructor could assign anything you feel like to `this`. Rather
than that, the constructor now assigns a strict set of values, and
methods are redefined in subclasses.

Basic unit tests were added to test if they could be written for after
the final refactor to fix the other memory leak here.
2016-09-09 15:51:49 -05:00
urkerab
c6e84562f7 teamHas should keep count of how many of each property the team has (#2735) 2016-09-05 04:27:11 -05:00
Marty-D
8fc3aff490 Validator: Add Hidden Ability condition for Florges line
Only Blue, Red, and Yellow Floette can be found in the Friend Safari, so Orange and White are currently unable to have Symbiosis.
This is done here since there's no reason to add teambuilder slots for them when they won't be tiered separately anyway.
2016-09-03 17:39:44 -04:00
Taylor Everding
1a1f64fe95 Remove .js extension from requires (#2725) 2016-08-30 00:04:40 -05:00
Quinton Lee
1daec1a8f4 Hide nicknames of Pokemon used by locked users (#2639) 2016-07-24 02:28:12 -06:00
Marty-D
3129669c1b Team Validator: Fix crash 2016-06-26 22:52:41 -04:00
The Immortal
192e7dc939 Fix crash with data searching commands 2016-05-26 07:01:56 +04:00
The Immortal
48b405b971 Fix event-only moves with illegal abilities 2016-05-26 05:41:34 +04:00
Marty-D
58c722d67d Validator: Fix legendary IV check 2016-05-22 08:40:58 -04:00
Marty-D
1aadbf46a0 Support a specific number of perfect IVs for event Pokemon 2016-05-21 12:46:34 -04:00
QuiteQuiet
0627c2a12d Support event Vivillons in team-validator (#2560) 2016-05-13 08:43:11 -04:00
Guangcong Luo
37f880e9fc Suppress constructor errors
Unless we want to change the syntax for data tables like pokedex.js,
'constructor' will always exist as a table key.

These changes represent the bare minimum to prevent this from
causing too-weird behavior.
2016-05-11 05:07:02 -04:00
The Immortal
289f267f7a Fix Kyurem formes 2016-05-10 15:44:54 +04:00
Guangcong Luo
fefb6f76bb Suppress crash in validator
This is a quick fix for the crash in validator, which seems to be
affecting Kyurem-Black/Kyurem-White event moves.
2016-05-10 05:39:05 -04:00
The Immortal
5db51a7091 Add in-game event data
And flag those as event only. This provides a more accurate database,
and some other flags are no longer needed.
2016-05-10 04:48:14 +04:00
The Immortal
0a5dfd649e Set possible shiny events
This prevents having duplicate events for cases where it’s possible to
obtain both shiny and non-shiny.
2016-05-08 02:29:02 +04:00
QuiteQuiet
63955aabd8 Add support for alternative models (#2539)
* Add aliases for alternate sprites

* Add support for alternate models for Pokemon
2016-05-04 11:20:50 -07:00
Guangcong Luo
4a995350bb Shim Array#includes
This also refactors everything to use Array#includes except data
and mods, which are large enough that I'll refactor them later
probably.
2016-05-04 02:55:18 -07:00
Guangcong Luo
5670e45017 Properly fix Mega validation 2016-05-03 16:32:55 -04:00