Commit Graph

13010 Commits

Author SHA1 Message Date
Guangcong Luo
85beaccb0c Test-case for TypeScript bug 2017-05-08 21:46:02 -05:00
Guangcong Luo
5266c7c90f Fix tsconfig lib
It's now more precise about what modern ES features we want in PS.
2017-05-08 21:09:57 -05:00
Charlie Kobayashi
d1e9a5cdcd Modjoin: escape HTML for banner display (#3510) 2017-05-08 19:34:32 -05:00
Guangcong Luo
a75282ea97 Fix crash in /weakness 2017-05-08 19:06:54 -05:00
The Immortal
6292479f6a Add 1v1 suspect test 2017-05-08 18:34:13 +04:00
Guangcong Luo
22186f1903 Improve TypeScript typing
sim/dex.js and sim/prng.js are now valid strict TypeScript! Also they
have slightly less "any" use than before.
2017-05-08 02:58:55 -05:00
Charlie Kobayashi
1c96b80694 Scavengers: add new mode, and statistic logging (#3507)
* Scavengers: add new mode, and statistic logging

* Use single quotes for keywords
2017-05-08 01:06:47 -05:00
panpawn
ffec6037c1 Roomsettings: Make UNO and Hangman text uniform (#3511)
Based on how we do stretching/capitals with the "off" language for being disabled, these should probably use that, too.

Also, "enable" and "enabled" were inconsistent, so this changes that, too.
2017-05-08 00:17:36 -05:00
asgdf
127fb33002 Add cooldown to re-enabling timer after disabling it (#3503)
Each player has their own cooldown. The point is to prevent spamming timer
on/off to timerstall indefinitely.
2017-05-07 16:31:36 -05:00
Charlie Kobayashi
770d4d94fe Poll: Fix display (#3506)
- make all poll options align left
2017-05-07 16:30:34 -05:00
CheeseMuffin
fc4ca40ef8 Refactor Jeopardy (#3468) 2017-05-07 04:37:30 -05:00
Quinton Lee
fa1b45f7ab Support supplementary rulesets in battles (#3330) 2017-05-05 20:13:08 -05:00
Guangcong Luo
9e180e4fc1 Remove MockBattle
No MockBattle feature needs to be kept out of sim/...
2017-05-05 16:57:18 -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
fcccc2cff0 Rename Battle#on to Battle#onEvent
Battle will soon be a Node.js Stream, which has an .on() function,
which Battle#on would conflict with.

PS events aren't Node events, so naming a PS event function .on()
was kind of misleading anyway.
2017-05-05 16:48:38 -05:00
Guangcong Luo
5ed4bfe3d1 More TypeScript refactoring
prng.js is now validated by TypeScript. battle-engine is too huge and
tsc bugs out on it, but it needs to be split into a number of smaller
files anyway.
2017-05-05 16:48:38 -05:00
Marty-D
9948a0123f Add new event Pokemon 2017-05-05 11:23:58 -04:00
Spandan Punwatkar
5fcca90040 Update Last Will (#3504)
* Update Last Will

* Update formats.js

* Update formats.js
2017-05-05 13:07:31 +04:00
MacChaeger
7a1d06f626 Update Random Doubles Battle (#3498)
* Update Random Doubles Battle (part 1)

* Update Random Doubles Battle (part 2)

* Update Random Double Battle (part 3)

* Fix Syntax (#26)

* Fix move id typos

* Improve movepools
2017-05-05 11:52:55 +04:00
urkerab
13e7d1b464 Transplant some of ROM's code for Cross Evolution (#3501) 2017-05-04 13:55:07 +04: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
Spandan Punwatkar
c201e22841 Update formats.js (#3500) 2017-05-03 15:24:52 -07:00
The Immortal
a9d095da15 Monotype: Ban Medichamite 2017-05-03 23:51:48 +04:00
Bär Halberkamp
e33d81b39f Wifi: Improve API for GTS Giveaways 2017-05-03 18:13:41 +02:00
Bär Halberkamp
767cd57a03 Wifi: /left also displays last winners 2017-05-03 18:13:41 +02:00
urkerab
c26adcf30d Fix for Heal Bell as a Last Will (#3499) 2017-05-03 16:25:14 +04:00
Teremiare
ef0658d1f4 Change chat filter bypassing (#3485) 2017-05-03 03:41:30 -07:00
The Immortal
7b190ed7fa Remove Monotype suspect 2017-05-03 13:59:52 +04:00
Marty-D
508081ee32 Add new event Pokemon 2017-05-02 11:26:33 -04:00
The Immortal
a8b5f629df Release Hoenn Cap Pikachu 2017-05-02 19:17:00 +04:00
The Immortal
a017b74285 Random Battle updates 2017-05-02 13:45:09 +04:00
MacChaeger
8b4c53e185 Update Cross Evolution (#3497)
* Cross Evolution: Only alter stats once

* Fix Arceus/Silvally related crash
2017-05-02 10:39:48 +04:00
MacChaeger
3a055502d7 Change Last Will hint to be clearer (#3496) 2017-05-01 23:45:33 -04:00
urkerab
e00c777158 Use Transformed species for Z-Move checks (#3495) 2017-05-01 23:43:15 -04:00
Marty-D
ab89834912 Fix lack of Inverse format 2017-05-01 23:36:47 -04:00
Spandan Punwatkar
5bc465cab3 Fix Last Will Bug (#3494)
* Update formats.js

* Update formats.js
2017-05-01 19:59:25 +04:00
The Immortal
55d050be78 Add new RoA Spotlight 2017-05-01 19:39:18 +04:00
Spandan Punwatkar
7e4adeeebc Add new OMs of the Month (#3493) 2017-05-01 19:26:30 +04:00
Guangcong Luo
705818f44e Fix crash in /lockdown 2017-05-01 04:59:08 -04:00
Hidden50
44ba2f2c5f Fix /timer: Only let players and auth turn on the timer (#3492) 2017-04-30 18:04:53 -07:00
MacChaeger
48a66adb03 Battle Bond isn't event-only in AAA (#3491) 2017-04-30 00:47:06 -07:00
Quinton Lee
bce279eeb0 Fix validation of multiple moves in /dexsearch 2017-04-29 11:49:20 -05:00
MacChaeger
e2c07a6c6f Fix Perish Song + Soundproof (#3487) 2017-04-29 09:48:45 -04:00
Bär Halberkamp
8cb162baf8 Wifi: improve GTS GA ending window 2017-04-28 20:33:22 +02:00
Bär Halberkamp
31622af0d3 Wifi: fix an absolutely baffling typo 2017-04-28 20:32:09 +02:00
Bär Halberkamp
cf86ae56d4 Wifi: more self-importance (the credits weren't really accurate) 2017-04-28 20:32:09 +02:00
Marty-D
8ab09a4aed Remove Laser Focus tag on end 2017-04-28 12:46:03 -04:00
Guangcong Luo
3f06e82b4d Revert "Fix crash with lack of destroy() function"
Apparently I was wrong about the cause of that crash...

This reverts commit 5588b391b9.
2017-04-28 00:32:41 -07:00
Guangcong Luo
18061c5190 Suppress crash in room-battle
Also something I need to investigate further when I have time.
2017-04-28 03:26:57 -04:00
Guangcong Luo
223ccfd54b Sync datacenters 2017-04-28 03:26:24 -04:00