* 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>
* 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
* 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
* 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'
* 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
* 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>
* 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
* 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>
"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.
* 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
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.
* 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>