Commit Graph

72 Commits

Author SHA1 Message Date
Shashwat Chandra
33c7330ea5 Add lowers filter for /movesearch (#3811) 2017-07-26 15:09:12 -04:00
asgdf
e9e66afa0c Fix priority shorthand parameter in movesearch (#3828)
'priority+' now includes priority +1, and 'priority-' includes -1
2017-07-24 15:33:27 -07:00
Guangcong Luo
2b1d7b2cc3 Properly fix crash in /learn 2017-07-20 16:33:40 -05:00
urkerab
147639c8b7 LC search should only use the banlist, not the LC Uber tier (#3756) 2017-07-09 20:37:10 +04:00
jumbowhales
6c6e9177b9 datasearch, add is as an itemsearch alias (#3743)
there's already ds and ms
2017-07-07 15:46:05 +09:00
Guangcong Luo
95e8bebeaf Revert "ProcessManager: refactor, fix memory leak, use Typescript (#3706)"
This reverts commit c9b93d3529.
2017-07-02 08:11:18 -04:00
Ben Davies
c9b93d3529 ProcessManager: refactor, fix memory leak, use Typescript (#3706)
- spawning and setting up child processes is now handled by
ProcessManager#constructor rather than needing to be done manually for
each module that uses ProcessManager
- direct references to ProcessManager in ProcessWrapper were removed to
prevent dead ProcessWrapper instances from being leaked when hotpatching
- process-manager.js and verifier.js now use Typescript
2017-06-30 09:09:13 +09:00
Bär Halberkamp
961ffc3f9b Upgrade eslint to 4.x (#3657) 2017-06-18 22:37:43 -07:00
Guangcong Luo
47a35b7b45 Refactor dexsearch
- Icons and names now both show up, margins tweaked to look good
- Results are now clickable
2017-06-18 21:56:34 -04:00
Bär Halberkamp
b678247ba6 Datasearch: get rid of commas in between icons 2017-06-18 17:26:00 -04:00
Bär Halberkamp
92aa82794d Add usage of <psicon> (#3653)
* Add support for <psicon> to parseText

* Utilize <psicon> in giveaways

* Utilize <psicon> in /dexsearch and /itemsearch
2017-06-17 17:48:47 -07:00
asgdf
8299bcc2bf Fix inequality operators in /ms to not include equal values (#3648) 2017-06-16 15:39:52 -05:00
CheeseMuffin
83e9bda113 Fix typo in randmove (#3636) 2017-06-14 12:57:08 -05:00
CheeseMuffin
422cc57459 Add randmove command (#3599) 2017-06-13 21:36:15 -05:00
urkerab
276c4ad116 Dexsearch should use exact inequalities instead of fudging the comparison value (#3582) 2017-06-06 09:16:03 -05:00
urkerab
a4bbede19b Dexsearch should use the Gen 7 LC banlist (#3586) 2017-06-06 02:24:18 +04:00
CheeseMuffin
0d62603397 Dexsearch: Add height (#3580) 2017-06-05 11:55:29 -05:00
Guangcong Luo
6dd58b40d3 Refactor simulator into new sim/ directory
This is a surprisingly minor refactor considering how many files it
touches, but most of this is only renames.

In terms of file renames:
- `tools.js` is now `sim/dex.js`
- `battle-engine.js` is now `sim/index.js` and its three classes are
  in `sim/battle.js`, `sim/side.js`, and `sim/pokemon.js`
- `prng.js` is now `sim/prng.js`

In terms of variable renames:
- `Tools` is now `Dex`
- `BattleEngine` is now `Sim`
- `BattleEngine.Battle` is now `Sim.Battle`
- `BattleEngine.BattleSide` is now `Sim.Side`
- `BattleEngine.BattlePokemon` is now `Sim.Pokemon`
2017-05-05 16:48:38 -05:00
Guangcong Luo
3716f360ff TypeScript!
Currently TypeScript is validating tools.js and is not particularly
strict about anything and we use 'any' a lot and it's not part of
'npm test' yet, but everything has to start somewhere!

tools.js has also been refactored majorly to use accessors rather
than loader functions. This basically means you don't need to do
Tools.includeData() or anything like that anymore. The new system is
also easier to make TypeScript-compatible.

See #3278
2017-05-03 16:19:49 -07:00
Quinton Lee
bce279eeb0 Fix validation of multiple moves in /dexsearch 2017-04-29 11:49:20 -05:00
Charlie Kobayashi
140909817b Movesearch: add gen into help entry (#3431)
Brought up by user ``Eeveelution Army`` on PS
2017-04-05 11:34:29 -04:00
Spandan Punwatkar
5b811f02cc Add weight as a parameter for dexsearch (#3352) 2017-03-11 15:52:46 -06:00
CheeseMuffin
1ec567ec6e Movesearch: Add Generations (#3337) 2017-03-05 19:18:49 -05:00
Guangcong Luo
313cd36337 Fix display bug in !learn 2017-02-23 14:43:47 -06:00
Guangcong Luo
427ff5061e Support virtual console moves in !learn 2017-02-23 14:41:24 -06:00
Spandan
7e5bb56a13 Fix Error in Z-Status move search (#3109) 2017-01-24 02:59:14 -05:00
Spandan
8bbd449dd2 movesearch: Add support for Z-status effects (#3105) 2017-01-22 05:03:30 -05:00
panpawn
670a499c2b Datasearch: Standardize help commands formatting (#3046) 2016-12-23 01:26:51 -08:00
Guangcong Luo
aeff92aac9 Fix other crash in dexsearch
Or is this movesearch? idk but it should probably be fixed some better
way, this is just a hack.
2016-12-20 03:54:21 -05:00
asgdf
eb8d2ab14a Fix crash in /dexsearch (#3030) 2016-12-15 20:40:42 -08:00
panpawn
9bf747f1e4 Datasearch: Replace deprecated font tags (#3025) 2016-12-14 21:05:06 -08:00
asgdf
97135a5897 Support egg groups as parameters in /dexsearch (#3023) 2016-12-14 12:56:55 -08:00
panpawn
51c6567975 Standardize using <br /> instead of variations (#3009)
Across PS, in most places we use <br /> - however, in some other places we used <br> and in some <br/>.  This standardizes that to simply be <br />, since that's what we use in the majority of places.
2016-12-11 04:34:07 -05:00
asgdf
6622c2d4ee Expand help entry for /learn (#3002)
Also remove /g6learn, which is now made redundant by /learn
pentagon,gen6,... and didn't work anymore anyway.
2016-12-07 10:40:00 -06:00
Guangcong Luo
ddc7e0412e Clarify /learn message for gen 6-7 egg moves 2016-12-07 05:20:22 -05:00
Guangcong Luo
6969290d67 Support passing format name to /learn 2016-12-06 20:31:32 -06:00
Guangcong Luo
0ed2071217 Improve /learn
It now accepts a generation parameter, as well as "pentagon", as
options before the pokemon species.

In addition to making it easier to remember the syntax and supporting
pentagon checks, this also allows /learnall to be used in past gens.

e.g.

`/learn pentagon, mence, dd`

will show:

> In Gen 7, Salamence can learn Dragon Dance only when obtained from:
> gen 7 egg: axew, dragonair, dragonite, dratini, ...

`/learn gen3, mence, dd`

will show:

> In Gen 3, Salamence can learn Dragon Dance only when obtained from:
> gen 3 egg: altaria, charmander, dragonair, dragonite, ...
> gen 3 event: 1 salamence
2016-12-06 19:33:51 -06:00
asgdf
1d6ac79158 Fix /ds not working for gen 7 mons with 2+ moves as argument (#2944) 2016-11-27 23:54:02 -06:00
urkerab
9f371b2953 Add Shore Up to the list of recovery moves searched by /dexsearch (#2939) 2016-11-23 22:37:46 -05:00
urkerab
27f0b82592 Actually make /oraslearn work (#2911) 2016-11-19 13:49:15 -06:00
urkerab
5e9d04e0aa Change default /learn gen and add /oraslearn (#2902) 2016-11-18 09:16:29 -06:00
HoeenCoder
cf1f723fa6 A few fixes (#2893) 2016-11-17 13:39:40 -06:00
Ivo Julca
4fa6c5499b Build: Fix issues reported by the latest Eslint version 2016-11-17 14:27:39 -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
sirDonovan
fafb2c1099 Fix crashes in datasearch commands
Loading data on the main process was accidentally removed in
64fa2b9801
2016-10-02 15:08:03 -05:00
Guangcong Luo
d6f5404e7e Rename CommandParser to Chat
We had a lot of discussion in Dev and a somewhat-close poll, but in
the end "Chat" was a better name than "Messages", and also has the
advantage of being shorter (which is nice for Chat.html and
Chat.plural which should be short).
2016-09-30 18:31:15 -07:00
Guangcong Luo
da1b318707 Move text processing from Tools to CommandParser
The following functions have been renamed:

- Tools.html to CommandParser.html
- Tools.plural to CommandParser.plural
- Tools.escapeHTML to CommandParser.escapeHTML
- Tools.toDurationString to CommandParser.toDurationString
- Tools.toTimeStamp to CommandParser.toTimestamp
  (notice the lowercase 's')

This is in preparation for a rename of Tools to Dex (by removing the
non-dex-related functions) and a rename of CommandParser to either
Messages or Chat.
2016-09-30 18:04:13 -07:00
Guangcong Luo
3c5525c8b0 Fix more crashes in PM refactor 2016-09-25 16:22:28 -04:00
Guangcong Luo
5a16c884da Fix a variety of bugs in PM commands
Most of these were introduced in the PM refactor, but an honorable
mention goes to the global command regex.
2016-09-25 14:12:43 -04:00
Guangcong Luo
6b4eaf9422 REALLY support commands in PMs
These changes were supposed to be in de524c1a26 but got lost in my
Git stash...

Once again, this is very experimental code; please don't base any
serious changes on it.
2016-09-17 01:16:56 -07:00