Commit Graph

10662 Commits

Author SHA1 Message Date
Ivo Julca
7ac62d3cdb Refactor Verifier to use the PM API 2016-03-23 02:44:29 -05:00
Ivo Julca
ce1fd87efd Split process manager class to its own file 2016-03-23 02:44:20 -05:00
Ivo Julca
a8b76becdb TCG TableTop: Minor refactor to take advantage of arrow functions 2016-03-22 21:37:35 -05:00
Ivo Julca
3cd1217f18 TheStudio: replace usage of toArrayOfArrays by Array.from 2016-03-22 21:20:10 -05:00
Guangcong Luo
982b6eb8eb Fix style error 2016-03-21 14:08:24 -05:00
Guangcong Luo
52cc7f2e37 Remove Object.values external dependency
An external dependency is kind of overkill when the only
implementation we need is three lines.

This also lets us write a more performant implementation that
omits the parts irrelevant to us.
2016-03-21 10:15:55 -05:00
Ivo Julca
3a8e58c966 Revert "Forcibly replace Object.values implementation from Sugar.js"
This reverts commit 3cce56f as it is no longer needed.
2016-03-21 02:22:01 -05:00
Ivo Julca
275f5cefe9 Fix support of non-multiprocess team validator 2016-03-21 02:18:25 -05:00
The Immortal
03565b3f65 Add event Ho-Oh 2016-03-20 18:34:17 +04:00
Guangcong Luo
d59f3d1aab Merge pull request #2450 from bumbadadabum/mafia3
Dexsearch: Broadcast a message returned with parse: as well
2016-03-19 22:48:55 -05:00
Bär Halberkamp
365462a85c Dexsearch: Correctly broadcast dexsearches 2016-03-20 04:43:42 +01:00
Guangcong Luo
39b0052ca1 Merge pull request #2451 from panpawn/patch-98
hotpatch: update staff room faster
2016-03-19 21:12:16 -05:00
panpawn
ca2aa46868 hotpatch: update staff room faster 2016-03-19 19:28:44 -04:00
The Immortal
a8776fdb45 Random Battle: Prevent Psychic and Psyshock together 2016-03-19 07:07:22 +04:00
Marty-D
324c3768bd Add Mareep event 2016-03-18 12:23:34 -04:00
Marty-D
3237960fad Add Bestow Pikachu and update Gen 6 events 2016-03-17 23:28:57 -04:00
Marty-D
b1a8f8ed32 Update Barrier Dragonite event 2016-03-17 13:46:33 -04:00
Marty-D
4c2bc7585f Merge pull request #2449 from ascriptmaster/move-fixes
Normalize overwrites moves that change type
2016-03-16 23:38:03 -04:00
Kevin Lau
bfac338ddb Normalize doesn't affect moves that change type
The ModifyMove singleEvent for moves always runs before the
larger event that triggers an ability's event handler and
take precedence over Normalize, so we code exceptions in
Normalize to not change the type in those situations.

Conveniently, all the moves that change type right now are
defaulted to Normal-type, and since Normalize technically
won't change the type of any Normal-type move, we're using
that as the guideline for our exception.
2016-03-16 10:54:47 -07:00
Guangcong Luo
9db904f691 Fix crash in dexsearch 2016-03-16 11:40:42 -04:00
Guangcong Luo
47c122d411 Fix hotpatching dexsearch
This is kind of a bad workaround; I'll think of a better one later,
possibly involving the PM pattern we're using in TeamValidator.
2016-03-16 11:37:46 -04:00
Guangcong Luo
eae332864f Fix crash in dexsearch crashlogger 2016-03-16 11:36:51 -04:00
Guangcong Luo
b374f357f1 Fix bug in validator 2016-03-16 10:17:22 -05:00
Guangcong Luo
a125a3ed7b Remove sugar-deprecated 2016-03-16 09:51:23 -05:00
Guangcong Luo
a4ef6a0680 Fix infinite loop in Gen 3-4 Beat Up 2016-03-16 09:44:46 -05:00
Guangcong Luo
044f4f84e9 Fix crash in dexsearch 2016-03-16 09:44:14 -05:00
Guangcong Luo
e87fd32550 Refactor TeamValidator
The callback code in TeamValidator and the functions that use it have
been refactored to use Promises.

Pretty much all signatures have been changed, for instance:

    TeamValidator.validateTeamSync(format, team)
    -> TeamValidator(format).validateTeam(team)

    TeamValidator.validateTeam(format, team, callback)
    -> TeamValidator(format).prepTeam(team) // returns a Promise

Validators are no longer cached since they're really lightweight. They
contain a format and a Tools instance, and Tools instances are already
cached in Tools anyway. This saves a tiny bit of RAM in exchange for a
tiny bit of CPU time, but more importantly makes the code more
readable.

I'm introducing a new pattern/API for managing the parts of code with
child processes - their process managers are now at .PM and are now
opt-in, so you can use them synchronously without needing to spawn
any processes.

Fixes #2448
2016-03-16 09:43:59 -05:00
Guangcong Luo
c02fe82cd5 Merge pull request #2446 from bumbadadabum/mafia3
Requested code improvements
2016-03-16 07:52:02 -05:00
Bär Halberkamp
4ca5c1d2c8 Remove /mtg and allow /ygo in all rooms
The only wiki we could use sucks, and I'd rather only have a good command usable everywhere
2016-03-16 02:10:23 +01:00
Guangcong Luo
19a3bf307b Export CommandContext from command-parser 2016-03-15 18:19:20 -04:00
Guangcong Luo
b5e6742757 Enable repl.js by default 2016-03-15 18:19:20 -04:00
Guangcong Luo
8ccca9fd09 Fix autojoin for staffAutojoin rooms
All users with roomauth will now autojoin staffAutojoin rooms.
2016-03-15 18:19:20 -04:00
The Immortal
d49ca20a90 Add event Dragonite 2016-03-16 00:53:41 +04:00
The Immortal
ccebdfc1bf Remove Kanto Classic 2016-03-16 00:48:08 +04:00
Bär Halberkamp
bc00dab2f2 Convert dexsearch.js to be multiprocess 2016-03-15 19:47:18 +01:00
Guangcong Luo
ff230ea56e Merge pull request #2447 from QuiteQuiet/targets
Modify target sent when redirected
2016-03-15 13:36:32 -05:00
Quite Quiet
79747aa8b4 Modify target sent when redirected 2016-03-15 09:21:56 +01:00
Bär Halberkamp
8da2cf61fe Convert ladders-remote to the ES6 class syntax 2016-03-14 11:57:08 +01:00
Guangcong Luo
7c6113def8 Refactor verifier.js for Promises 2016-03-13 19:30:30 -05:00
Kevin Lau
e4cc3ef8b3 Merge pull request #2445 from TheFenderStory/patch-1
Require sugar-deprecated instead of sugar
2016-03-13 17:00:27 -07:00
Jared Grady
60ff1f3c9e Require sugar-deprecated instead of sugar 2016-03-13 16:40:56 -07:00
The Immortal
5b912f4eeb Add NU suspect test 2016-03-12 17:20:45 +04:00
Guangcong Luo
447aed29ca Fix style error 2016-03-12 05:32:24 -06:00
Guangcong Luo
97b89cc4ac Refactor CommandContext to ES6 classes
Context in command-parser.js has been renamed CommandContext and
refactored to use ES6 classes. Its also subsumed the canTalk
function. Future iterations will probably put the parse function
inside it as well.
2016-03-12 06:22:59 -05:00
Guangcong Luo
118eb8301f Merge pull request #2443 from BlazingAura/patch-1
Invite to private room crashes.
2016-03-12 02:25:54 -06:00
BlazingAura
097b6683b1 Invite to private room crashes. 2016-03-12 13:18:15 +05:00
Ivo Julca
75b632fed0 Fix crashes in dexsearch 2016-03-11 07:54:28 -05:00
Ivo Julca
3cce56f6d2 Forcibly replace Object.values implementation from Sugar.js 2016-03-10 17:18:53 -05:00
Marty-D
9d496e00dc Gen IV: Fix Focus Sash properly 2016-03-10 12:29:39 -05:00
Marty-D
f567c1ec90 Gen IV: Fix Toxic Spikes interaction with Safeguard 2016-03-10 11:25:44 -05:00