Commit Graph

23714 Commits

Author SHA1 Message Date
Guangcong Luo
b9e532426a Hardcode VC Entei/Raikou/Suicune validation 2017-12-10 20:03:21 -05:00
Guangcong Luo
d5cee90d81 Refactor matchmakingOK
Now that Ladders.match handles the rated setting, matchmakingOK only
needs to return a boolean.

Fixes #4233
2017-12-10 20:03:21 -05:00
HoeenHero
85dffeb84f Make some ticket commands global (#4234) 2017-12-10 18:03:52 -06:00
MacChaeger
d2a419d2be Update Stomping Tantrum's description (#4231) 2017-12-10 16:18:53 -05:00
Marty-D
439e9654de
Add Z-Moves bypassing protection message 2017-12-10 16:03:43 -05:00
Guangcong Luo
958c5087fc Revert "Protect should not affect Clangorous Soulblaze's other target (#4230)"
This reverts commit e8a7fa98d5.
2017-12-10 02:26:29 -05:00
Guangcong Luo
793009cd1b Add diagnostic for slow battles 2017-12-10 02:01:19 -05:00
Guangcong Luo
7d9fff71bd Improve custom format performance
It turns out, battle.getFormat() is run once per invocation of
battle.runEvent(), which is a lot.

Especially with the new rule validator.

...It's cached now.
2017-12-10 02:01:19 -05:00
Guangcong Luo
140437ff38 Fix misc ladder bugs 2017-12-10 00:03:01 -06:00
Guangcong Luo
9983645173 Fix typo in remote ladder code 2017-12-10 00:37:08 -05:00
urkerab
2336bd7573 Make Leftovers/Black Sludge recovery happen during Grassy Terrain recovery (#3970) 2017-12-09 23:27:35 -06:00
Guangcong Luo
1a68294d6a Fix VC Celebi check
I messed up the capitalization, but more importantly Marty apparently
already implemented this another way.
2017-12-09 23:19:01 -06:00
Guangcong Luo
42d72e373a Refactor challenging
Challenges now also happen in ladders.js, which is a bit of a misnomer
now. Maybe that'll be fixed one day.

In any case, this makes users.js 10% smaller! The challenge code is
also now overall significantly more modern.
2017-12-09 23:15:49 -06:00
Guangcong Luo
235feed85e Fix searching for battles 2017-12-09 22:18:23 -06:00
Guangcong Luo
fb5f919d35 Reloading Dex no longer locks up the server
I actually refactored Dex to lazy load around a year ago, and the
fruits of my effort is fruiting!
2017-12-09 21:32:47 -06:00
Guangcong Luo
b3d78d9222 Restrict uploading debug log replay
Previously, the conditions for when a replay should contain a full
debug log were a bit too open. It's now significantly more restricted.
2017-12-09 21:31:14 -06:00
Guangcong Luo
52f34f42f5 Improve VC move validator 2017-12-09 21:11:20 -06:00
urkerab
e8a7fa98d5 Protect should not affect Clangorous Soulblaze's other target (#4230) 2017-12-09 21:09:11 -06:00
Guangcong Luo
20e136c823
Help ticket system (#4199) 2017-12-09 21:07:58 -06:00
Guangcong Luo
6cd98de40f Fix misc issues with formatid validation 2017-12-09 16:04:09 -06:00
Guangcong Luo
7e02b57016 Refactor Matchmaker to subclass Ladder
As expected, this resulted in zero API changes. (Aside from a minor
test change.)
2017-12-09 15:45:10 -06:00
Guangcong Luo
799a6a1e44 Improve Matchmaker API
Ladder is now a subclass of Matchmaker, and all the APIs previously
attached to Matchmaker are now directly available in Ladder.

In addition, all functions that take a formatid are now of the form
`Ladders(formatid).function(other arguments)`

TODO: Reverse polarity; it makes more sense for Matchmaker to be
a subclass of Ladder. Fortunately, this wouldn't involve API changes.
2017-12-09 15:04:29 -06:00
Guangcong Luo
e75eb1336a Fix "can't rename" message
Fixes #4229
2017-12-09 11:18:43 -06:00
Spandan Punwatkar
a1270cac7a Fix Ability Aliases (#4228) 2017-12-09 01:48:05 -06:00
Guangcong Luo
e0490ef41f Mark custom rules as non-searchable
This is just a safety precaution that may simplify some future code; we
don't currently allow custom rules in the matchmaker at all.
2017-12-09 00:25:16 -06:00
Guangcong Luo
04475b5264 Refactor ladders/tournaments for async/await 2017-12-09 00:15:40 -06:00
Guangcong Luo
0a5cf06151 Slightly refactor tournament challenging 2017-12-08 23:47:21 -06:00
Guangcong Luo
d83513c6e4 Refactor challenges 2017-12-08 23:42:11 -06:00
Guangcong Luo
0298c4324b Refactor Ladders.Search -> Ladders.BattleReady
The intent is for it to be used for challenges and tournament
ready-states, too.
2017-12-08 22:44:44 -06:00
Guangcong Luo
5260bf6ac3 Fix unreleased template checking
The old code, for allowing unreleased pokemon if they were obtainable
by breeding, was a workaround for a very specific case which as far
as I can tell is no longer necessary.

In the future, a template should just not be marked as unreleased if
it's available by breeding.
2017-12-08 22:41:53 -06:00
Guangcong Luo
5d11ec89f1 Fix base-pokemon banning 2017-12-08 22:27:30 -06:00
Guangcong Luo
b14463d632 Ensure SpA and SpD match in Gen 1
I'm not entirely sure why we're maintaining the separation of SpA and
SpD, except for better support of possible OMs or custom games where
they could be different, I guess.

There are probably game mechanics that would be better supported if we
actually just unified SpA and SpD.
2017-12-08 21:17:39 -06:00
Guangcong Luo
0613939874 Refactor tournament rule validation
It was happening in two different places. It's been consolidated now.
2017-12-08 21:04:05 -06:00
Kris Johnson
e221fc6336 Fix specifying formats in /smogdex (#4224) 2017-12-08 16:34:14 -06:00
Kris Johnson
37b84a021d Datasearch: Fix zboosts and add protect flag (#4225) 2017-12-08 16:03:32 -06:00
Spandan Punwatkar
7c7fba18b9 OMotM: Add Sleep Clause (#4226) 2017-12-08 16:01:47 -06:00
Lionyx
f82f078cf8 Update /roomhelp (#4227)
Some verbs were third-person and other were not, some lines had a capital letter at their beginning and some other didn't... This unifies it so that they all look the same~
2017-12-08 16:01:16 -06:00
Marty-D
7411ba63d9
Fix another crash in Partners in Crime 2017-12-08 12:45:51 -05:00
Marty-D
6df282e0d4
Fix crash in Partners in Crime 2017-12-08 11:41:49 -05:00
Charlie Kobayashi
6fe28c1cf5 Scavengers: allow all finishers to view hunt (#4218) 2017-12-08 22:06:15 +08:00
Guangcong Luo
5ab1444bdd Validate tournament custom rules 2017-12-07 22:07:12 -06:00
Guangcong Luo
bb598ed6c2 Add rule validator for format rules 2017-12-07 22:07:12 -06:00
Guangcong Luo
3bdf679965 Spell Wobbuffet correctly 2017-12-07 22:07:12 -06:00
MacChaeger
0d10cfcf03 Add test for Recharge -> Stomping Tantrum (#4223) 2017-12-07 22:58:50 -05:00
MacChaeger
801883c53a Implement Stomping Tantrum (#4175) 2017-12-07 18:36:19 -06:00
Quinton Lee
b13098a684 Formatter: fix linking text followed by > (#4222) 2017-12-07 16:13:35 -06:00
urkerab
0aef595177 Fix this unnecessary reference to battle (#4221) 2017-12-07 14:29:11 -06:00
MacChaeger
8dbe0ca7fe Partners in Crime: Fix Skill Swap (#4216) 2017-12-08 00:46:39 +08:00
Kris Johnson
5d9a6468c5 Add Mix and Mega suspect test (#4219) 2017-12-07 16:08:55 +08:00
Guangcong Luo
53ee56ff3b Fix Mega Rayquaza mega evolution 2017-12-06 20:09:13 -06:00