Commit Graph

286 Commits

Author SHA1 Message Date
iforgetwhyimhere
a7f286ee0d
Add "Same Letter Clause" (#11767)
* Add "Same Letter Rule"

* cleanup

* indentation

* ^

Co-authored-by: Slayer95 <ivojulca@hotmail.com>

* change slc desc

* clarify rejection message

---------

Co-authored-by: Slayer95 <ivojulca@hotmail.com>
2026-02-14 20:09:56 -07:00
André Bastos Dias
737a8095ac
Add Full Arceus Clause (#11725)
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
* Enable Arceus EV Limit Mod

* English

* Add comment with implementation location

* Add Full Arceus Clause

* Add event for clause

* Move comment

* Lint

* Simplify assignments

* Revert Melmetal changes

* Revert "Revert Melmetal changes"

This reverts commit 8c4a04e67c.

* Reapply "Revert Melmetal changes"

This reverts commit 7553972011.

* Add explanation comment

* Remove test

* Comment
2026-02-08 10:24:39 -07:00
André Bastos Dias
117cb69c89
Expand Arceus EV Limit to all level 100 events (#11724) 2026-01-26 09:24:43 -06:00
André Bastos Dias
684150d9d7
Implement Mega Stones as {key: value} pairs (#11684)
* Implement Mega Stones as pairs {key: value}

* Fix Mega Evolution check

* Add constructor guards to Dex getters

* Update config/formats.ts

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2026-01-08 14:59:22 -07:00
Kris Johnson
30ff784f2c
Z-A: Add DLC Pokemon (#11613)
* Z-A: Add DLC Pokemon

* za ou learnsets

* zaou changes

* skip test 4 now

* dfadasas
2025-12-12 00:04:05 -07:00
Karthik Bandagonda
4425ec2719
Add onChooseTeam event for formats (#11476)
* Add onChooseTeam event for formats

* Fix VGC 2010 autochoose

* Use custom validation instead of Limit One Restricted

* cleaner code

* clean up chooseTeam code
2025-10-06 02:20:44 -06:00
Kris Johnson
f52bc482bb
Add Terastal Crescendo online competition (#11471)
* Add Terastal Crescendo online competition

* Fix build
2025-10-01 21:13:50 -06:00
Kris Johnson
f20c0403bc
Add Same Color Clause
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-09-13 19:27:04 -06:00
pyuk-bot
da359b0d8f
Add "Rebalance Levels" rule for random formats (#11422)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-09-03 13:07:19 -06:00
shrianshChari
de10d91321
ADV: Add Speed Pass Clause (#11424)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
* ADV: Ban the combination of Baton Pass and Speed-boosting

https://www.smogon.com/forums/threads/speedpass-in-adv-ou.3769223/page-3#post-10692421

* Satisfy linter

* guh

* Create Speed Pass Clause

* do it to ou

* Apply suggestions from code review

* Update test

* ugh

* ughhhhhhh

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2025-09-02 21:59:44 -06:00
Karthik99999
fde7a7962a Add VGC 2023 Reg C as challengeable format 2025-08-31 23:59:21 -07:00
Kris Johnson
8797d4628c Remove inactive ladders 2025-08-31 23:57:15 -06:00
Kris Johnson
b106dde6c0 Fix build 2025-08-11 14:12:34 -06:00
Kris Johnson
5e2fb9b0a0 ADV OU: Add Accuracy Trap Clause 2025-08-11 14:11:00 -06:00
André Bastos Dias
e473be87d1
Refactor Let's Go Normal Rules (#11324)
* Allow AVs should take happiness into account

* Default happiness is already set in pokemon.ts

* Default happiness in the validator

natureModify only receives the set, not the actual Pokemon :/

* Implement Let's Go Normal Rules

* Fixes

* Remove EV limit

* Remove condition

* Add EV Limit = 0

Avoid "Pokemon has exactly 0 EVs - did you forget to EV it?"

* Final fix

* Happiness is fixed to 70

* Revert changes

* Rename Let's Go to LGPE

* Re-add comment
2025-08-04 20:48:27 -06:00
Kris Johnson
d24a41bcca Add No Freeze Mod
Requested by goldmason for use in old generation custom formats
2025-08-01 07:39:03 -06:00
Slayer95
2b32c8f57c
Send teampreview request after Tera Type info (#11238)
Refs #8546
2025-07-11 01:33:12 -06:00
André Bastos Dias
9bcca73a33
Modify HP after forme regression (#11261)
* Modify HP after forme regression

* Clip negative HP

* Change method name

* Don't reveal illusion

Should be redundant

* Move message timing

* Fix dynamax

* Clip HP for possible OMs

* Check using baseMaxHp

* Conditions.........

* Use ternary operation

* Fix comment
2025-07-11 01:32:43 -06:00
Kris Johnson
4edd58a832 Fix Baton Pass Trap Clause validation 2025-07-06 11:15:18 -06:00
Sergio
2ce41f17f3
Fix typos in Alola and Unova Dex rulesets (#11248)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-07-05 08:28:12 -05:00
André Bastos Dias
ac19dbb9e5
Move the gender logic to the validator (#11198)
* Move the gender logic to the validator

* Modify test seed

* Modify seed for other test

* Fix for RandBats

* Remove gender enforcement

* Revert "Remove gender enforcement"

This reverts commit c9c66a3725.

* Allow choosing genderless Pokemon

Without this, genders will always default to '' and never to 'N'
2025-07-01 01:26:42 -06:00
Karthik Bandagonda
d3d834c91a
Allow Picked Team Size to be used without Team Preview (#11224)
* Add Pick Team rule

* Make Team Preview and Pick Team mutually exclusive

* Automatically apply rule if Picked Team Size exists without preview

* Remove mutually exclusive part

* Move teamsize to start action
2025-07-01 01:20:57 -06:00
Leonard Craft III
6e41ce15e3 Add Nickname Clause to Standard Draft
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-06-29 22:42:46 -05:00
skymin3
edd2068e23
Add Acupressure to Evasion Moves Clause (#11181)
https://www.smogon.com/forums/threads/include-acupressure-in-evasion-clause.3738246/post-10583328
2025-06-06 16:56:58 -07:00
Guangcong Luo
80996b1a3b Allow multiple empty moveslots 2025-06-02 08:43:32 -07:00
Dieter Reinert
2815ce3d62
Info commands: Fix crash when using /data with Tier Shift Mod (#11149)
* Info commands: Fix crash when using /data with Tier Shift Mod

Fixes a crash that occurred when using the `/data` command (or its aliases like `/dt`) with a format that includes the "Tier Shift Mod" rule.

### The Bug
When users tried to view Pokémon data in a format with Tier Shift Mod, the command would crash with:
```TS
TypeError: Cannot read properties of undefined (reading 'has')
at Object.onModifySpecies (/home/ps/main/data/rulesets.ts:2260:45)```


### Root Cause
The info command was calling `format.onModifySpecies` with a mock Battle context that was missing the `ruleTable` property. The Tier Shift Mod's `onModifySpecies` function needs to check `this.ruleTable.has("standardnatdex")` to determine whether to use National Dex tiers.

### The Fix
Added the missing `ruleTable` property to the mock Battle context in `server/chat-commands/info.ts`. The mock context now includes:
- `dex`
- `clampIntRange`
- `toID`
- `ruleTable` (newly added)

This ensures that any format modifier that needs to access the rule table won't crash when called from the data command.

* Use optional chaning instead of constructing a full rule table.

* Fix: formatting

* More formatting

* formatting due to merge

* Update data/rulesets.ts

* ESLint: Resolve "Type boolean trivially inferred from a boolean literal, remove type annotation"

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2025-06-02 01:20:34 -06:00
Kris Johnson
64b80ca9f5 Add June 2025 rotational formats 2025-06-01 01:51:17 -06:00
Lucas
fc3ab2cf61
Add rule to automatically display Pokemon information (#11122)
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-19 10:53:43 -07:00
Guangcong Luo
417a9183f8 Revert "Add rule to automatically display Pokemon information (#11097)"
You can't import chat from rulesets.

This reverts commit c4e1a4b154.
2025-05-18 14:44:13 -07:00
Lucas
c4e1a4b154
Add rule to automatically display Pokemon information (#11097)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
Pet Mods requested a Data Mod that automatically shows information for formats that have many custom changes (currently CCAPM2024 Random Battle).
2025-05-18 08:17:13 -07:00
Kris Johnson
671f4edfad Update [Gen 3] Draft ruleset 2025-05-01 16:15:44 -06:00
HiZo
6668106730
Godly Gift Mod: Don't automatically assume Zygarde-Complete is a god (#11063)
* Godly Gift Mod: Don't automatically assume Zygarde-Complete is a god

* Also add a validation check here

* Add suggestion from code review

* oops
2025-04-30 23:32:28 -06:00
Sergio Garcia
fc23103de1
Fix random typos (#11020)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-04-13 23:59:36 -07:00
Chessking345
40f4915925
Add LGPE Starter Formes support for select formats (#11018)
* Add LGPE Starter formes to Hackmons Forme Legality

* Add LGPE Starter formes to Formemons
Add LGPE Starter formes learnset in SV

* Floette-Eternal SV learnset
2025-04-07 21:13:30 -06:00
Guangcong Luo
ae22234ed0 Add Guaranteed Secondary Mod
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
This is currently for tests, but does have the side effect of plausibly
being fun as an actual mod to add to games.
2025-03-13 15:34:47 -07:00
Yoshiblaze
917bb0dd32
Add New Pet Mod of the Season (Bad 'n Boosted) (#10947)
* Add Bad 'n Boosted

* Add Mod Folder for Bad 'n Boosted so /dt works with it

* Fix indents

* Fix indents

* Remove Little Colosseum

* Change Bad 'n Boosted to a mod rather than a folder

* Apply suggestions from code review

* Update config/formats.ts

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2025-03-09 11:59:50 -06:00
Vertigo
ef4029ce57
Add boosting effects to Baton Pass Stat Clause (#10948) 2025-03-09 11:44:15 -06:00
Guangcong Luo
d9557375a0
Introduce "NatDex Mod" (#10939)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
"Standard NatDex" is very weird compared to how OMs usually work.

See "TierShift Mod" and "Godly Gift Mod". NatDex now gets its own mod,
which can be mixed into any other format, instead of needing to start
with NatDex.

This would make Min Source Gen overriding annoying, so it now defaults
to the current gen in Gen 9+, if Obtainable is set and +Past isn't. So
now you don't need to manually set Min Source Gen to enforce Obtainable
in Gen 9.
2025-03-06 03:40:36 -08:00
Guangcong Luo
0cb51158aa
Make "All Pokemon" rules more convenient (#10932)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
* Make "All Pokemon" rules more convenient

Previously, "+All Pokemon" did nothing except override "-All Pokemon",
which switched from a default-allow to default-deny system.

They still do that, but they now also override all previous pokemon
bans/unbans. This makes it easier to replace a banlist/whitelist
from an inherited ruleset without needing to reverse every previous
ban/unban.

This also adds an error if you use `+All Pokemon` in a ruleset where
it doesn't do anything.

Fixes #10772
2025-03-02 14:47:30 -08:00
Guangcong Luo
78439b4a02
Update to ESLint 9 (#10926)
ESLint has a whole new config format, so I figure it's a good time to
make the config system saner.

- First, we no longer have separate eslint-no-types configs. Lint
  performance shouldn't be enough of a problem to justify the
  relevant maintenance complexity.

- Second, our base config should work out-of-the-box now. `npx eslint`
  will work as expected, without any CLI flags. You should still use
  `npm run lint` which adds the `--cached` flag for performance.

- Third, whatever updates I did fixed style linting, which apparently
  has been bugged for quite some time, considering all the obvious
  mixed-tabs-and-spaces issues I found in the upgrade.

Also here are some changes to our style rules. In particular:

- Curly brackets (for objects etc) now have spaces inside them. Sorry
  for the huge change. ESLint doesn't support our old style, and most
  projects use Prettier style, so we might as well match them in this way.
  See https://github.com/eslint-stylistic/eslint-stylistic/issues/415

- String + number concatenation is no longer allowed. We now
  consistently use template strings for this.
2025-02-25 20:03:46 -08:00
HiZo
d5c4fb5730
Remove Crazyhouse Rule (#10841)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
* Remove Crazyhouse

Causes too many problems/crashes when mashed up.

* lint
2025-01-27 17:50:29 -07:00
Mia
d3e60b31f7
Sim: Use a CSPRNG (#10806)
* Sim: Use a CSPRNG

* Add test

* fix test prng

* move prng test to others

* fix slight hack

* tf?

* Fuck this

* fucking lol

* fix crap

* i'm going to kill someone

* i hate state

* fix test

* Good work genius

* typo

* Fix exportinputlog

* Refactor for inputlog backwards compatibility

This is a pretty major refactor which is mostly unrelated to the
feature, but it does make the code a lot simpler.

* Readability pass

* Readability (again)

* Remove sodium-native dependency

* Refactor to serialize seeds in hex strings

(Also removes the Buffer dependency from PRNG, and slightly improves
comments.)

* Apparently << is 32-bit signed

* Readability

---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-01-11 13:56:34 -06:00
Karthik Bandagonda
8f2e1cb0d2
Always show OTS to spectators (#10767)
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
2024-12-18 23:45:43 -06:00
Kris Johnson
2b03102954 Mix and Mega: Make Aggronite great again 2024-12-12 11:07:52 -07:00
Kris Johnson
068890e5c2 Add December 2024 OMotM/LCotM 2024-12-01 09:37:48 -07:00
TwiSteorra
bbea81daa8
Update Sketch Post-Gen 7 Moves rule description (#10709)
https://www.smogon.com/forums/threads/sketch-post-gen-7-moves-rule-has-outdated-description.3755629/
2024-11-30 10:30:16 -07:00
urkerab
a08348ed43
Fix ability selection for Fervent Impersonation (#10712) 2024-11-30 10:29:57 -07:00
urkerab
92a3264e77
Improve signature of getValidationSpecies (#10711) 2024-11-30 10:29:47 -07:00
Karthik Bandagonda
a893791792
Fix interaction between Mega Rayquaza/Terastal Clauses (#9936) 2024-11-18 15:32:46 -07:00
urkerab
ae14c6f90c
Allow Tera Shell to work in Inverse battles (#10599)
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
2024-10-04 19:48:36 -05:00