Commit Graph

111 Commits

Author SHA1 Message Date
Kris Johnson
a284cb25e8 Add Re-Evolution command and rule 2022-06-22 13:06:51 -06:00
May Evans
c1e9b00d98
Gen 1 UU: Ban Agility + Partial Trapping (#8817)
* Add APT Clause

Considers Bind and Clamp: despite them not being legal combinations even in Tradebacks on any Pokemon, there could be a hackmons tier or something that desires this. Future-proofing and in the spirit of the ban.

* Instate APT Clause

https://www.smogon.com/forums/threads/rby-uu-agility-partial-trapping-apt-voting.3703325/post-9249504

* yeah

* yeah lets actually call it that JENKINS

* JENKIIIINS
2022-06-19 21:44:29 -06:00
Karthik
49149ea8fb
Properly handle Zacian/Zamazenta Crowned forms (#8753) 2022-05-09 14:23:15 -05:00
Hisuian Zoroark
98db5b1d64
Crazyhouse: Temporarily restrict to singles, improve description (#8746) 2022-05-01 14:01:33 -06:00
Hisuian Zoroark
e5568e5bff
Add Crazyhouse Rule (#8708)
* Add Crazyhouse Rule

* Make Pokemon import top-level, correct HP in post.

* Remove unnecessary code, improve comment
2022-04-28 18:50:48 -06:00
Mia
3c86fbcb84 Add Dark Void to the Gravity Sleep Clause
Oversight
2022-04-04 14:59:37 -05:00
Kris Johnson
347715a12d Add March 2022 OMotM and RoA Spotlight 2022-03-01 00:46:09 -07:00
Kris Johnson
de51227922 Add Random Battle Mayhem 2022-02-08 21:16:39 -07:00
Leonard Craft III
a6d321e5d1
Fix Bird-type crashes (#8639)
* Fix crash with Bird type in Revelationmons Mod

* Fix Wild Magic Surge and Bird type
2022-01-24 19:07:37 -07:00
Marty
781d40a1d7 Gen 3 Ubers: Limit to one Baton Passer
https://www.smogon.com/forums/posts/9065997/
2022-01-01 18:02:18 -05:00
Marty
6f528817b7 Gen 3 OU: Implement One Boost Passer Clause
https://www.smogon.com/forums/posts/9057309/
2021-12-20 17:36:11 -05:00
WeWuzNidokangz
e6477a8b17
Fix BDSP interaction with STABmons Move Legality (#8532) 2021-11-19 09:59:07 -07:00
Kris Johnson
67702ac7fc Add November 2021 OMotM, LCotM, and RoA Spotlight 2021-11-01 00:43:23 -06:00
Kris Johnson
9367b079c0 Clean up Other Metagames formats 2021-10-29 23:49:16 -06:00
Kris Johnson
fa741a6760 ORAS Monotype: Update legality 2021-10-11 09:48:54 -06:00
En Passant
21dfd5470d
Add "Sketch Gen 8 Moves" rule (#8431) 2021-10-09 19:05:05 -07:00
Karthik
be5f737037
Add VGC 2013, VGC 2015, cleanup VGC 2017 mod (#8486) 2021-10-07 20:43:38 -04:00
Kris Johnson
9afff7c222 Let Picked Team Size Work with Team Type Preview 2021-10-05 14:48:28 -06:00
Kris Johnson
0aa3877f3f Add October 2021 OMotM and RoA Spotlight 2021-10-01 14:12:53 -06:00
Kris Johnson
a9cff320d8 Don't enforce capitalization on Force Monotype 2021-09-14 23:26:28 -06:00
Kris Johnson
c2f5ccc106 Update /battlerules 2021-09-14 23:24:46 -06:00
Kris Johnson
c3ad27289d Fix legality in STABmons and Alphabet Cup 2021-08-03 19:18:13 -06:00
Kris Johnson
cf7df087e6 Add August 2021 OMotM and RoA Spotlight 2021-07-31 22:46:25 -06:00
Karthik
b83e5088c2
Implement new STABmons policy (#8415)
* Implement new STABmons policy

* Use const

* Use push instead of concat

* Run generation loop for all the code

* Small changes

* Update data/rulesets.ts

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* fix lint issues

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2021-07-31 21:13:37 -06:00
Kris Johnson
598ac409e8 Rename Let's Go! mod to 'gen7letsgo' 2021-07-06 23:07:51 -06:00
Kris Johnson
9e217d34c2 Add July 2021 OMotM, LCotM, and RoA Spotlight 2021-07-01 10:47:55 -06:00
Kris Johnson
876c86d236 Change type declaration formatting for Maps/Sets 2021-06-29 22:47:28 -06:00
WeWuzNidokangz
0d96865c69
Fix crashes in Chimera 1v1 rule interactions (#8356) 2021-06-06 08:31:19 -07:00
Kris Johnson
790993c5d2 Add June 2021 OMotM, LCotM, and RoA Spotlight 2021-06-01 02:16:11 -06:00
Guangcong Luo
9c98ae5c87 Rules: Split "EV Limit" out from "Obtainable Misc"
"EV Limit = 510" is now its own rule which can be changed separately
from the rest of Obtainable Misc.

The rest of Obtainable Misc doesn't seem useful to break up, so I
haven't bothered.
2021-05-23 15:14:00 -07:00
Kris Johnson
77b7120b06
Update to Sw/Sh 1.3.2 mechanics (#8296) 2021-05-12 14:14:58 -04:00
Guangcong Luo
7e965b41a7 Revert timing for adding rules to field in #8274
It turns out rules need to be added before sides are initialized,
so that they can hook `ModifySpecies` during side initialization.

The proper way to fix this is pretty complex so this is just a hack.
2021-05-11 23:02:01 -07:00
Mia
f4c6e8f690 Formats: Fix undefined toID call 2021-05-11 08:23:40 -05:00
Guangcong Luo
638c1e3ae8 Add "Max Move Count" value rule
Also stop enforcing 4 moves limit and 6 pokemon limit in `-Nonstandard`,
for the same reason we stopped enforcing the level 100 limit; any format
that explicitly wants it higher should automatically override it.
2021-05-07 02:16:24 -07:00
Guangcong Luo
0adb8d1b00 Add Unova Dex rules 2021-05-07 00:37:22 -07:00
Karthik
367b4e7c2d
Implement Zacian/Zamazenta/Xerneas forme leak (#8261) 2021-05-06 19:24:59 -07:00
Guangcong Luo
36295dc27a
Simplify Team Preview events (#8274)
In format events:

`onFieldTeamPreview` has been renamed back to `onTeamPreview`. It's now
a custom event (like `onBegin`), rather than a field event.

Team Preview data has been entirely moved from `onBegin` into
`onTeamPreview`.

`onFieldStart` for formats/rules now happens after Team Preview, rather
than before. Use `onBegin` for things that happen before Team Preview.
2021-05-06 18:53:58 -07:00
Mia
34d6480837 Re-add Cancel Mod to Flat Rules 2021-05-06 09:28:56 -05:00
Guangcong Luo
55980d416c
Support value rules (#8267)
`teamLength`, `maxLevel`, `cupLevelLimit`, and `minSourceGen` no longer
exist as properties of `Format`. Instead, they're value rules that
become properties of `RuleTable`, and can be specified as custom rules
and inherited through rulesets like anything else.

See the PR for a full reckoning of changes:

https://github.com/smogon/pokemon-showdown/pull/8267
2021-05-06 01:16:16 -07:00
Distrib
cc2fb4a596
Add No Switch rule (#8241) 2021-05-03 16:09:09 -07:00
Marty-D
5b0391e91b
Fix build 2021-04-30 10:57:53 -04:00
Kris Johnson
5b8dfc7d8e [Gen 1] Japanese OU: Allow Japanese event moves 2021-04-30 01:55:06 -06:00
Kris Johnson
246b667c03 Add [Gen 1] Japanese OU 2021-04-27 20:48:48 -06:00
Guangcong Luo
f9fdc73133
Support per-pokemon Residual handlers in Side/Field conditions (#8222)
For side conditions, `onStart`/`onRestart`/`onResidual`/`onEnd`
have been renamed `onSideStart`/`onSideRestart`/`onSideResidual`/`onSideEnd`,
with the `onResidualOrder` properties renamed `onSideResidualOrder`.

For field conditions, `onStart`/`onRestart`/`onResidual`/`onEnd`
have been renamed `onFieldStart`/`onFieldRestart`/`onFieldResidual`/`onFieldEnd`,
with the `onResidualOrder` properties renamed `onFieldResidualOrder`.

(The `onField` and `onSide` part helps make it clear to the type system
that the first argument is a Field or Side, not a Pokemon.)

Side and field conditions can now use `onResidual` to tick separately
on each pokemon in Speed order. `onResidualOrder` (the per-pokemon
tick) can be timed separate from `onSideResidualOrder` (the
per-condition tick), allowing conditions to end at a different priority
than they tick per-pokemon.

Relatedly, `onTeamPreview` and `onStart` in formats now need to be
`onFieldTeamPreview` and `onFieldStart`.

Unrelatedly, `effectData` has been renamed `effectState`, and the
corresponding state containers (`pokemon.statusData`,
`pokemon.speciesData`, `pokemon.itemData`, `pokemon.abilityData`,
`field.weatherData`, `field.terrainData`) have been similarly renamed. I
renamed the types a while ago, but I was holding off renaming the fields
because it would be a breaking change. But this is a breaking change
anyway, so we might as well do it now.

Note: `onResidual` will tick even on `onSideEnd` turns, although
`onSideResidual` won't. When refactoring weather, remember to
check `this.state.duration` so you don't deal weather damage on the
ending turn.

Intended as a better fix for #8216
2021-04-25 10:55:54 -07:00
Kris Johnson
5cd1d060ab Rulesets: Add Nintendo Cup 2000 Move Legality 2021-04-24 01:11:45 -06:00
InAShellnut
9ab4c86fe3
Add Stadium 2, Nintendo Cup 1997, and Nintendo Cup 2000 (#8195)
An implementation of Nintendo Cup 1997, Nintendo Cup 2000, and Pokemon Stadium 2, for Pokemon Showdown. The only thing which has not been implemented was showing the exact health of both Pokemon in Pokemon Stadium 2, however implementing that requires changes to the showdown client. The Nintendo Cup 1997 code was done by Enigami, and the rest was by myself (Shellnuts).

This should fulfill the requirements asked by the following accepted suggestions:
https://www.smogon.com/forums/threads/please-add-a-pok%C3%A9mon-stadium-2-simulator-in-showdown.3679486/
https://www.smogon.com/forums/threads/add-nintendo-cup-1997-and-2000-as-challenge-only-formats.3653454/
2021-04-22 00:54:14 -07:00
Leonard Craft III
d858bbda30
Validator: Disallow duplicate moves (#8191) 2021-04-09 20:59:20 -07:00
Guangcong Luo
13189fdb02
Update Dex API (#8181)
This is the change that renames:

- `Dex.getMove` -> `Dex.moves.get`
- `Dex.getAbility` -> `Dex.abilities.get`
- `Dex.getItem` -> `Dex.items.get`
- `Dex.getSpecies` -> `Dex.species.get`
- `Dex.getEffect` -> `Dex.conditions.get`
- `Dex.getNature` -> `Dex.natures.get`
- `Dex.getType` -> `Dex.types.get`
- `Dex.getFormat` -> `Dex.formats.get`

In addition, some other APIs have been updated:

- `getByID` methods have also been added to every other table.
- `Dex.moves.all()` now gets an array of all moves
  - Plus equivalent methods for `abilities`, `items`, `species`, `formats`, `natures`, `types`
  - Note: there's no `Dex.conditions.all()`
- new API: `Dex.stats` for naming/iterating stats
- `Dex.getEffectByID` -> `Dex.conditions.getByID`
- `Dex.getType` -> `Dex.types.get`
- `Dex.data.Formats` -> `Dex.data.Rulesets`
- `Dex.formats` -> now an array `Dex.formats.all()`
- `Dex.getRuleTable` -> `Dex.formats.getRuleTable`
- `Dex.validateFormat` -> `Dex.formats.validate`

Team functions have been split off into a new `sim/teams` package:

- `Dex.packTeam` -> `Teams.pack`
- `Dex.fastUnpackTeam` -> `Teams.unpack`
- `Dex.generateTeam` -> `Teams.generate`
- `Dex.stringifyTeam` -> `Teams.export`

`Teams.export` has also been rewritten to better match how it works in client.

This implements #8178
2021-04-08 03:00:37 -07:00
Marty-D
6c07717703 Remove Spikemuth Cup 2021-04-05 13:25:47 -04:00
Spandan Punwatkar
b77d6cb20f
Add simulator support for multi battle (#7929)
This doesn't include matchmaking support (which had to be removed
for reworking), but it includes everything else.

Co-authored-by: Spandamn <spandan.punwatkar@gmail.com>
Co-authored-by: MacChaeger <msaimrkon@gmail.com>
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2021-03-31 22:22:25 -07:00