Commit Graph

119 Commits

Author SHA1 Message Date
Ivo Julca
f4f75ea2d0 Add missing types for CriticalHit event handlers 2019-04-13 01:40:42 -05:00
Guangcong Luo
a33fc11d26 Refactor Actions, RandomTeamsTypes to namespace
They were previously some weird interface where their actual types
were properties. I guess whoever wrote this was unaware that TypeScript
namespaces were designed for this exact use-case.
2019-04-10 19:58:56 +09:30
Kirk Scheibelhut
32a457c808
Add a smoke test runner to dev-tools (#5405) 2019-04-07 08:34:43 -07:00
Kirk Scheibelhut
a8b9bed753 End streams in dev-tools/harness.js 2019-04-06 21:16:28 -07:00
Guangcong Luo
4c47af28aa Refactor moveHitData
This is actually three refactors:

- swap around thing:slot for slot:thing in MoveHitData
- add Pokemon#getSlot
- remove the ActiveMove class; it's back to being an interface
2019-04-06 19:10:45 +08:00
Kirk Scheibelhut
0efd71dfef Move Data.ActiveMove methods to Pokemon (#5416)
See #5415 for context - having these methods is unsafe and leads
to crashes because not all ActiveMoves are created through the
Data.ActiveMove constructor. Instead of Pokemon, these could
alternatively be static methods on ActiveMove (or the ActiveMove
class could be completely abolished and reverted back to an
interface), but #5415 will deal with ActiveMove long term, this just
fixes the crashes.
2019-04-06 13:14:50 +08:00
MacChaeger
d3f1161b62 Fix Weakness Policy and Clangorous Soulblaze in doubles (#5389) 2019-04-04 18:51:27 +08:00
Kirk Scheibelhut
ece322801d Introduce dev-tools/harness.js for testing/benchmarking (#5370) 2019-04-04 00:47:47 +08:00
Slayer95
628f32e8fb Stricter type definitions for dex data (#5375)
BattleStatuses switched to PureEffectData
2019-03-30 22:31:04 +08:00
Alexander B
57701a5f04 Refactor OMs to use "m" property of Pokemon (#4957) 2019-03-28 22:28:35 +08:00
MacChaeger
9a7ce3dedf Put side conditions on p1 and p2 in multi battles (#5341) 2019-03-27 11:00:36 +08:00
MacChaeger
860900ac57 Fix AfterDamage event running on secondary effects (#5350) 2019-03-26 15:29:46 +09:00
Kirk Scheibelhut
9f5a727ad1 Pull Field out of Battle (#5333) 2019-03-23 02:52:12 +09:00
Kirk Scheibelhut
03b2c92cb1 Make isNonstandard specify reason for non-standardness (#5330) 2019-03-22 01:49:22 +09:00
Kirk Scheibelhut
4be90a0a28 Cleanup sim/battle.ts (#5325) 2019-03-22 01:25:12 +09:00
MacChaeger
6ac8266696 Support 4 player battles (#5266) 2019-03-18 13:37:27 +09:00
MacChaeger
6c486409f4 Fix spread move effect order (#5216) 2019-03-17 23:30:08 +09:00
Marty-D
9315b8d4d8 Gen II: Cap stat boosting properly 2019-03-16 17:49:25 -04:00
Slayer95
7a7ad8453d Fix regressions in team generators (#5302) 2019-03-12 18:44:38 -07:00
Kirk Scheibelhut
e9ccc7ecd6 Fix Stadium mod's stat modification logic (#5301) 2019-03-12 13:52:32 -07:00
Kirk Scheibelhut
a8903d2563 Cleanup stat naming and types (storedStats, StatNameExceptHP) (#5274) 2019-03-09 09:53:11 -06:00
JetOU
85533ee3a0 Change forEach to for...of (#5269) 2019-03-08 11:24:58 -06:00
Kirk Scheibelhut
247bb559d6 Fix minor Typescript bugs in dex-data.ts (#5255) 2019-03-06 07:12:26 -06:00
Kirk Scheibelhut
5410514b3c Refactor sim/dex-data.ts to minimize @ts-ignore (#5214) 2019-03-02 15:03:43 -06:00
Kirk Scheibelhut
6e122d5d74 Refactor lib/ to be native Typescript (#5217) 2019-03-02 11:12:24 -06:00
MacChaeger
16d078265b Run onModifyTemplate on rulesets (#5207) 2019-02-26 19:23:27 -06:00
Kirk Scheibelhut
b09fd63377 Refactor sim/ to be native Typescript (#5210) 2019-02-26 11:03:30 -06:00
MacChaeger
d764c52887 Don't add inactive rules as pseudoweathers (#5206) 2019-02-25 01:11:46 -06:00
Guangcong Luo
46134ce5f6 Improve data representation of evo method 2019-02-19 23:42:06 -06:00
Jacob McLemore
bad622e1cd Add evolution method information (#5179) 2019-02-19 23:04:20 -06:00
HoeenHero
9c9004cacf Fix "Fix terrain seed activation timing (#5163)"
Shouldn't of reverted this so quickly. Credit to the code goes to @MacChaeger
2019-02-16 20:31:07 -05:00
HoeenHero
f8a1612906
Revert "Fix terrain seed activation timing (#5163)" (#5173)
This reverts commit 250955ee68.
2019-02-16 19:46:53 -05:00
MacChaeger
250955ee68 Fix terrain seed activation timing (#5163) 2019-02-16 19:30:00 -05:00
Russell Jones
fdcfcb02db Revamp evolution tables (#4997) 2019-02-14 23:51:17 -06:00
Bär Halberkamp
5fb8b5e954
Add a PageContext for HTML pages and expand html page functionality (#5160) 2019-02-12 19:00:14 +01:00
Guangcong Luo
0349fd2ed0 Use declare let instead of let in globals.ts 2019-02-06 10:49:12 -06:00
Guangcong Luo
70b3e9a525 Rename channel -> room, subchannel -> channel
"channel" is just a fancy way of saying "room, but in sockets".
Renaming them like this should make it clearer exactly what's going
on in sockets.
2019-02-05 16:55:37 -06:00
Guangcong Luo
ffdcff3abc TypeScript globals
A few globals: Monitor, LoginServer, etc weren't being correctly
TypeScripted. This should change that.
2019-02-04 18:04:13 -06:00
Guangcong Luo
f3e45fbb72 Move server code to server/
Also move mods/ to data/mods/

This makes PS more monorepo-like. The intent is to further separate
the sim and the server code, but without fully committing to splitting
the repository itself.

We now support `./pokemon-showdown start` in addition to
`./pokemon-showdown`. I'm not clear which I want to be the default
yet.
2019-02-03 16:07:06 -06:00
Guangcong Luo
bfc3c9bb6c Make it harder to timerstall
This commit is aimed at a particular kind of timerstalling: starting a
new game while letting the timer run out on your current game, instead
of just forfeiting.

Now you can't search for more battles if it's your turn to move, or if
your opponent takes less than 10 seconds to move (including animation).

1v1 and Metronome Battles asked for exemptions, and they've received
them.
2019-02-02 20:21:35 -06:00
urkerab
5863284eaa Fix some OMotM crashes (#5132) 2019-02-01 19:48:13 -06:00
Guangcong Luo
8d57bd1b8c Remove useless param from pokemon.transformInto
Introduced in 743c85127c
2019-02-01 15:10:46 -06:00
MacChaeger
cf7670f0b2 Gen 1: Paralysis should not reapply stat drop because of a failed move (#5123) 2019-01-26 01:30:58 -06:00
Guangcong Luo
8e33fd4315 Battle timer: Changes to timerstalling
- Total time is now capped at starting total time.
- We now support a grace period between timer activation and when total
  time starts ticking down. This is used to implement VGC's Team Preview
  timer, as well as the 60 second grace period in normal games.
- We no longer clamp down on games over 400 turns.
- Starting time in the ladder is decreased to 150 seconds.

VGC's timer has also been tweaked in other ways.

These are the changes documented in Policy Review:

https://www.smogon.com/forums/threads/ps-timer-updates.3646406/
2019-01-26 00:33:32 -06:00
MacChaeger
2a60ad7589 Fix stomping tantrum vs. only Protect (#5081) 2019-01-15 22:03:54 -06:00
Guangcong Luo
877c9feeeb Fix onEffectiveness event signature
I fixed `onAfterSubDamage` in the previous commit, but this one I left
for later.
2018-12-08 22:52:59 -06:00
Guangcong Luo
13614b9890 Update for TypeScript 3.2
TypeScript 3.2 unearthed a metric fuckton of bugs, making this change
take effectively forever.
2018-12-08 21:39:38 -06:00
Kris Johnson
5b2d76d75d Add Pokemon Let's Go! (#4967) 2018-11-19 16:19:19 -06:00
Alexander B
5fe80694a7 Fortemons: Fix several moves (#4952)
* Fortemons: Various fixes

* Fortemons: Fix crit ratio

* Fortemons: Implement Knock Off forte
2018-11-05 15:55:33 +04:00
Guangcong Luo
1de5e74a9a Move zBrokeProtect to ActiveMove 2018-10-28 05:27:22 -05:00