Commit Graph

109 Commits

Author SHA1 Message Date
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
Guangcong Luo
68e81c8c72 Rename hasSTAB to forceSTAB
This better describes what it actually means.
2018-10-28 05:27:22 -05:00
bgsamm
b5022361fb Add King's Rock flags for Gens 2-4 (#4916) 2018-10-22 21:28:32 -05:00
HoeenHero
0a7ebcd076
Super Staff Bros Brawl (#4915)
Was a major project, credit also goes to @CheeseMuffin @KrisXV @ImLycan @MacChaeger @TheTiksiBranch and @Volco for helping to code this format!
2018-10-20 13:53:30 -04:00
Guangcong Luo
f008188b9f UnknownEffect Moves are always ActiveMoves 2018-10-10 18:52:21 -05:00
Guangcong Luo
affcad7873 Improve documentation of isZ vs isZPowered
move.zPowered is renamed move.isZPowered. It's now documented in JSDoc
exactly how it differs from move.isZ.

This commit includes several minor refactors to Z-move mechanics,
including a bug fix: Z-boosted called Weather Ball is now correctly
typed.
2018-10-10 18:44:05 -05:00
Guangcong Luo
ecb27edb4d
Introduce ActiveMove; make some types read-only (#4902)
The types Template, Move, Ability, and Item are now read-only. This
should guard against accidental writing to types that shouldn't be
written to.

A new type, ActiveMove, has been introduced. Like it sounds, it's
used for moves that are currently actively being used. A lot of
attributes that are only relevant to active moves, such as
`hasBounced`, are now only available on ActiveMove, not on Move.
ActiveMoves are mutable, unlike Moves.

getMoveCopy has been renamed getActiveMove, to better reflect its
role. `isCopy` has been deprecated, and distinguishing Moves from
ActiveMoves is now done by `typeof move.hit === 'number'` where
necessary.

ActiveMoves now internally track which hit of a multihit move
they're on, in move.hit, so move.hit doesn't need to be manually
incremented by Triple Kick and Parental Bond anymore.

move.hasParentalBond has been replaced by a more generic
move.multihitType.
2018-10-10 16:04:35 -05:00
Quinton Lee
94016f6218 Update Typescript to 3.1 (#4879) 2018-10-05 04:02:54 -05:00
The Immortal
d80c813118 Update Random Battle 2018-09-24 17:10:17 +04:00
Marty-D
952ccb2d80 Correct Soul-Heart activation order 2018-09-13 11:34:30 -04:00
MacChaeger
82c792f82c Update to TypeScript 3.0.1 (#4710) 2018-08-07 03:27:28 +09:00