Commit Graph

1074 Commits

Author SHA1 Message Date
Annika
b026776c01
Fix BDSP crash 2021-11-18 22:13:11 -08:00
Charlie Kobayashi
b12a73d609
Fix typo (#8531) 2021-11-18 23:01:20 -07:00
Annika
5c9cda960d
Random Battles: Add BDSP movesets 2021-11-18 21:17:26 -08:00
Kris Johnson
ff4b7bed31
Add BDSP data and formats (#8530) 2021-11-18 18:00:10 -06:00
sexy90gxebattlefactoryplayer
84fe802b50
Battle Factory: Force Prankster on Liepard set with Copycat (#8525) 2021-11-16 12:17:24 -08:00
EvGym
5d8117302c
Refactor overriding stats used for damaging moves (#8373) 2021-11-08 13:48:26 -08:00
Kris Johnson
9140510dfa SSB: Change quotes to use |c:| 2021-11-07 19:55:01 -07:00
Annika
f7cdeb5b20 November 2021 Random Battles updates
[Gen 8] Random Battle levels were nerfed or buffed for winrates greater than 7 or less than -7 deviations from the mean respectively.

[Gen 8] Random Doubles Battle levels were nerfed or buffed for winrates greater than 4 or less than -4 deviations from the mean respectively.
2021-11-07 18:40:58 -08:00
Leonard Craft III
7cf60606c5
Fix paralysis modifier application (#8478) 2021-11-06 15:52:39 -04:00
Karthik
6c5af39ee6
Cleanup Let's Go mod (#8519) 2021-11-05 19:09:30 -07:00
Karthik
c9c34a2357
Gen 1 Random Battle: Fix Monotype (#8516) 2021-11-03 21:25:14 -07:00
Guangcong Luo
d0ea290992 Rename pokemon to source in getDamage
This has been split off from #8373 to improve diff readability.
2021-11-02 18:05:53 -04:00
Leonard Craft III
10b0c72140 Gens 7-8: Correct allyanim flags 2021-10-30 14:33:52 -05:00
Leonard Craft III
4771a9db55 Gens I-II: Remove unneeded checks for spread moves 2021-10-28 18:52:28 -05:00
Karthik
100e511b07
Gen IV: Fix client messages for spread move miss (#8507) 2021-10-28 18:49:00 -05:00
Marty-D
675b393796 Gen II-IV: Hide Beat Up message
As per https://www.smogon.com/forums/posts/8992145/
2021-10-26 18:47:32 -04:00
Annika
ceda8e1beb Improve grammar for Bide's debug hint in Gen 1
Fixes #8497
2021-10-24 00:11:56 -07:00
sexy90gxebattlefactoryplayer
02173dce01
Battle Factory: Give Passimian Defiant (#8493) 2021-10-11 12:25:33 -07:00
Annika
5d90cc66f4 Add [Gen 7] Monotype Battle Factory
Also removes Monotype teams from regular Battle Factory, as per https://www.smogon.com/forums/threads/monotype-in-gen-7-battle-factory-and-going-forward.3688757/#post-9001460
2021-10-10 20:27:17 -07:00
Annika
d3a2911c27 Random Battles: Use correct Dex APIs 2021-10-08 19:50:52 -07:00
Karthik
be5f737037
Add VGC 2013, VGC 2015, cleanup VGC 2017 mod (#8486) 2021-10-07 20:43:38 -04:00
Leonard Craft III
fc910b46b1 LGPE: Correct weight mechanics 2021-10-02 22:37:17 -05:00
Karthik
e12c372e54
Add mods for old VGC formats (#8474) 2021-09-30 10:55:45 -04:00
Leonard Craft III
25910ed66d
Fix timing of freeze thaws (#8453) 2021-09-29 20:29:26 -04:00
ACakeWearingAHat
fc1c3e17c5
Random Battles updates (#8473) 2021-09-19 15:50:11 -07:00
May Evans
3676ba36bf
Stadium OU: Move Poliwrath to StUU (#8475) 2021-09-19 10:52:42 -04:00
Karthik
7f14b41c6f
Gen I-II: Fix Mist & Haze behavior (#8472) 2021-09-19 10:29:48 -04:00
Karthik
d99779ba8a
Gen III-IV: Fix interaction between Liquid Ooze / Dream Eater (#8467) 2021-09-19 10:28:22 -04:00
Karthik
c0541c7747
Fix Powder revealing target of a failed fire move (#8468) 2021-09-11 16:57:08 -05:00
May Evans
992280b9a3
Gen 1: Implement Stadium tiers (#8460) 2021-09-08 19:20:58 -04:00
May Evans
af1eeae7e8
Gen 1: Fix minimum level encounters (#8456) 2021-09-08 18:18:02 -04:00
Annika
1fc5e3a787 Random Battles updates 2021-09-06 20:46:44 -07:00
Karthik
4f791ef852
Gen III-IV: Fix Uproar duration (#8450) 2021-09-05 12:46:11 -04:00
pacmanboss256
23b35498f6
Rename the "mystery" and "authentic" move flags (#8445)
* mystery -> allyanim
* authentic -> bypasssub
2021-08-30 23:07:50 -07:00
TheSupervillain
e710b8cf5c
Gen 2 Stadium: Fix crash (#8401) 2021-08-26 12:20:59 -04:00
Marty-D
5281f3bac3
Gen III: Fix Beat Up fix 2021-08-15 09:35:34 -04:00
Marty-D
2b6424f2e8
Gen II: Fix Beat Up category also 2021-08-14 16:25:17 -04:00
Marty-D
6e25dc78cd
Gen III: Fix Beat Up category 2021-08-14 15:24:08 -04:00
Marty-D
7d02028ebe Gen IV: Correct Light Ball modifier
A discovery 15 years late!
2021-08-07 15:10:28 -04:00
May Evans
9e8b905779
Gen 1: Move Aerodactyl and Dewgong to UU (#8421)
The new RBY UU Viability Rankings were produced yesterday night, and these Pokemon moved up. The 2-revision policy for OU does not apply here. 

Update can be found here: 
https://www.smogon.com/forums/threads/rby-uu-viability-rankings.3647713/post-8935573
2021-08-03 10:33:46 -06:00
Annika
3aa9934e65 Random Battles updates 2021-08-02 14:20:38 -07:00
InAShellnut
8faa194521
Stadium 2: Fix Destiny Bond, Perish Song, and recoil (#8398)
Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

Bugs documented here: https://www.smogon.com/forums/threads/pok%C3%A9mon-stadium-2-simulators-bugs-glitches-and-other-mistakes.3685286/
2021-07-17 16:08:53 -04:00
Marty-D
c93111e81c
Gen II: Correct Unown formes
Thanks, pre!
2021-07-17 13:40:39 -04:00
Karthik
c32d9aecfe
Stadium 2: Send -unboost for stat drops (#8403) 2021-07-17 13:37:39 -04:00
Karthik
a36b74dbd1
Gen 3: Type boosting items should boost the attacking stat (#8402) 2021-07-17 13:36:56 -04:00
Marty-D
010dbd6e59
Fix Nintendo Cup 2000 Move Legality
Closes #8397
2021-07-14 20:32:56 -04:00
Annika
c134195915
Use ts-node instead of Sucrase (#8369) 2021-07-09 19:59:22 -07:00
Marty-D
6a833db4f6 Gen III-IV: Fix Choice lock timing 2021-07-08 15:46:02 -04:00
Marty-D
410ef7ca70
Gen IV: Hide Mail on Team Preview
https://www.smogon.com/forums/threads/team-preview-information-before-gen-5.3687366/
2021-07-07 19:31:10 -04:00
Kris Johnson
598ac409e8 Rename Let's Go! mod to 'gen7letsgo' 2021-07-06 23:07:51 -06:00
Kris Johnson
eb2247a58d Change LCotM to Pure Hackmons 2021-07-06 23:04:07 -06:00
Marty-D
217979d2e5
Gen 5 OU: Drop Infernape into OU by technicality
https://www.smogon.com/forums/posts/8906068/
2021-07-03 14:24:43 -04:00
Annika
82d21aa33c Random Battles: Fix Venusaur bug in Gen 5 2021-07-02 19:49:43 -07:00
Annika
33e82d85d5 Random Battles update 2021-07-01 16:33:40 -07:00
Kris Johnson
ca37942f5c SSB: Fix infinite loop with Shared Power 2021-07-01 12:39:44 -06:00
Kris Johnson
9e217d34c2 Add July 2021 OMotM, LCotM, and RoA Spotlight 2021-07-01 10:47:55 -06:00
Karthik
cbec7757dd
Gen 5: Blue Basculin should be able to have Reckless (#8377) 2021-06-29 10:30:14 -04:00
Marty-D
965eaff862
Gen 7 UU: Ban Quagsire
https://www.smogon.com/forums/posts/8900000/
2021-06-27 18:22:35 -04:00
Marty-D
43713804b9 Gen II-IV: Fix Destiny Bond handling during Pursuit
Thanks, xzern and SuperEpicAmpharos!

Also noticed the Pursuit switch accuracy check wasn't overridden in Gen 2 yet so I threw that in too.
2021-06-24 12:05:11 -04:00
Marty-D
a5929b3076 Gen III: Make Follow Me a slot condition
Thanks, xzern!
2021-06-23 11:32:43 -04:00
Kris Johnson
a1ec8acea4 CAP: Nerf Chromera and Buff Voodoom 2021-06-12 22:52:49 -06:00
Karthik
9e19fea383
Gen 5: Reveal Mail in Team Preview (#8363) 2021-06-12 18:02:36 -07:00
Adam Tran
be2210f881
Fix Future Sight Life Orb interactions (#8357) 2021-06-08 11:48:10 -04:00
Kris Johnson
32de43c7ce SSB: Remove quadrophenic 2021-06-08 00:10:14 -06:00
Annika
6363a1854c Random Battles: Don't allow unreleased HAs 2021-06-07 18:45:22 -07:00
Marty-D
b830ceb818 Gen II, III: Implement Quick Claw properly 2021-06-07 12:26:50 -04:00
Annika
c55658ce06 Random Battles: Fix 3-move Pokemon 2021-06-05 20:33:44 -07:00
Annika
d8988bb250 Random Battles: Fix double-Hidden Power bug 2021-06-05 12:24:08 -07:00
Instruct
da8c1580ea
Gen 5: Refactor to use unreleasedHidden (#8349) 2021-06-05 09:00:15 -07:00
Annika
8a6bb51c23 Random Battles update 2021-06-01 16:22:57 -07:00
Leonard Craft III
4543abfb9c Fix more regressions from residual factor 2021-05-27 17:38:59 -05:00
Annika
77acf7831d Random Battles: Properly level (OU) mons in Gen 1 2021-05-27 10:37:20 -07:00
Annika
c1c1f8976d Random Battles: Fix Hidden Power bug in Gen 6 2021-05-27 10:18:04 -07:00
Instruct
d50c77fb4d
SSB: Bugfixes and Cosmetic Updates (#8318) 2021-05-26 14:23:09 -07:00
May Evans
2d28dc4966
Gen 1: Move Victreebel and Lapras to OU by technicality (#8336) 2021-05-25 21:38:41 -07:00
Karthik
7988f15526
Gen 3: Always break the opponent's screens with Brick Break (#8325) 2021-05-25 15:39:40 -04:00
pacmanboss256
91f86530c5
Fix Gen 3 Weather Ball and Gen 4 Trick (#8314) 2021-05-24 15:07:37 -04:00
Annika
a77db612c8 Random Battles updates 2021-05-23 16:11:54 -07:00
Leonard Craft III
d946308900
Fix the order of many end-turn resolution effects (#8307)
Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>
2021-05-17 11:53:52 -04:00
Kris Johnson
961842b869
Gen 6: Move Conkeldurr to UUBL 2021-05-16 12:42:36 -06:00
pacmanboss256
4186ef5f4f
Refactor Mold Breaker effect (#8291) 2021-05-14 08:32:41 -04:00
Guangcong Luo
509d0abad4 Refactor out some Object.keys invocations
If you need values, you should be using `Object.values` or
`Object.entries` directly.
2021-05-13 23:02:04 -07:00
Annika
08c60c7caa Random Battles: Fix 5-Pokémon Gen 1 teams 2021-05-12 18:57:45 -07:00
Annika
d55b9d559f Randbats: Prevent Gen 1 crash with Force Monotype 2021-05-12 14:44:39 -07:00
Annika
2fef5e9ca6 Random Battles: Debug Gen 1 team size 2021-05-12 14:42:19 -07:00
Annika
e2d468b6b1 Random Battles: Bugfixes 2021-05-12 14:42:19 -07:00
Kris Johnson
77b7120b06
Update to Sw/Sh 1.3.2 mechanics (#8296) 2021-05-12 14:14:58 -04:00
Annika
62571c4907
Validator: Improve Gen 1 level validation (#8294) 2021-05-12 02:59:12 -07: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
Annika
071e21da5c
Random Battles: Refactor to use Sets and Multisets more (#8292) 2021-05-11 09:16:28 -07:00
Annika
0b438673a6 Fix BSS Factory item generation 2021-05-09 13:00:36 -07:00
Annika
15e6f9406f
Random Battles: Remove Normalium Z Porygon-Z 2021-05-08 18:13:19 -07:00
pyuk-bot
a76052af54
Scale team limits in Random Battles to maxTeamSize (#8281) 2021-05-07 23:52:20 -07:00
Annika
5d177a8384 Random Battles: Remove wrongly-implemented rules 2021-05-07 10:19:45 -07:00
Annika
0b4c904331 Random Battles: Fix crash 2021-05-06 23:27:48 -07:00
Annika
2b3741ec2f Random Battles: Support more Value Rules
Specifically, randomized formats will now support Max Team Size, Min Source Gen, Adjust Level, Adjust Level Down, and Force Monotype.

This fixes the issue with randomly-generated Multi Battle teams containing six Pokémon, instead of three as desired.
2021-05-06 22:45:08 -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
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
Leonard Craft III
771c60d4b9
Improve self-hit confusion damage (#8264) 2021-05-04 13:44:13 -04:00
Karthik
ee5928622f
Gen VII: Backport Psychic Terrain priority hint (#8262) 2021-05-02 19:36:52 -05:00
Kris Johnson
497d3a6972 Add May 2021's OMotM, LCotM, and RoA Spotlight 2021-05-01 01:21:59 -06:00
Instruct
df2cb402b4
SSB: Fix fart's signature move from refactor (#8245) 2021-04-30 21:39:39 -07:00
Kris Johnson
5b8dfc7d8e [Gen 1] Japanese OU: Allow Japanese event moves 2021-04-30 01:55:06 -06:00
May Evans
d2f9d52403
Gen 1: Fix Japanese OU and Tradebacks OU legality (#8242)
* [Gen 1] OU Standard rules, fix validator rule name

erm...

* Fix [Gen 1] Japanese OU & Tradebacks OU

- [Gen 1] Japanese OU shouldn't use the Nintendo Cup 1997 Legality unless you want it to be "RG OU" or something. If so, the name should be changed for accuracy.
- [Gen 1] Tradebacks OU shouldn't complex ban those combinations, the Stadium 2 relearner fixes them all.

* I really did do that huh
2021-04-30 01:44:56 -06:00
Kris Johnson
246b667c03 Add [Gen 1] Japanese OU 2021-04-27 20:48:48 -06:00
Kris Johnson
dc57eb71dc Gen 1: Move Raichu to NUBL 2021-04-27 20:33:48 -06:00
pyuk-bot
fa974427ef
Migrate terrains from onTerrain to onResidual (#8232) 2021-04-25 13:00:37 -07:00
Guangcong Luo
f513c619b0 Fix bugs from Residual refactor 2021-04-25 12:14:03 -07:00
Instruct
a84ab6cc04
SSB: Refactor Ic3peak's echoed voice modifier (#8231) 2021-04-25 11:35:39 -07: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
pyuk-bot
66c547432b
Fix Parental Bond to modify damage, not base power (#8226) 2021-04-25 12:06:27 -04:00
urkerab
9a18ada1f9
Grassy Terrain should only weaken moves against grounded targets (#8224) 2021-04-24 18:04:31 -05:00
Guangcong Luo
486f292904
Refactor everything to use Utils.sortBy (#8220)
A few uses of `array.sort()` have been left alone:

- sorting in `data/` because they aren't supposed to import anything

- `set-importer` because I still have no clue what that's for and what
  dependencies it is/isn't allowed to have

- `sort()` with no arguments used as a lexical sort (at which point
  `sortBy` offers no benefits)

All other cases have been replaced with `Utils.sortBy`, which should
be a massive increase in readability.

Sort orders should be much more readable now, without needing to puzzle
through sign issues. The order is always low-to-high, A-to-Z,
true-to-false.
2021-04-23 22:41:00 -07:00
Kris Johnson
a1bdafbfe8
Add room sections (#8205) 2021-04-23 22:39:56 -07: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
Instruct
7f856ac3a4
SSB4: Support Same Type Clause (#8210) 2021-04-21 09:02:54 -07:00
Karthik
8963e4ace4
Gen 1: Don't allow Pokemon to recharge if frozen (#8211) 2021-04-19 12:45:44 -04:00
pyuk-bot
3639079d1f
Protective Pads should not apply to Gulp Missile (#8207)
Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com>
2021-04-19 12:39:33 -04:00
Kris Johnson
d0fd8ac8e0 Fix build 2021-04-16 21:47:38 -06:00
Kris Johnson
284b8f2df0 Shared Power: Fix bug 2021-04-15 18:58:07 -06:00
Kris Johnson
568e99b0e5 Shared Power: Fix more abilities 2021-04-15 16:33:13 -06:00
Kris Johnson
fc60b76c48 Add new Pet Mod of the Season 2021-04-13 20:55:47 -06:00
Marty-D
57049728e2
Gen I: Remove superfluous inheritance 2021-04-12 11:05:10 -04:00
Marty-D
94840470c3 Make sure Bide actually ends 2021-04-12 10:52:46 -04:00
Annika
3ca947225f Random Battles updates 2021-04-09 17:13:18 -07:00
Annika
2baca9339d Random Battles: Fix STAB in 4-player battles 2021-04-09 16:23:23 -07:00
Guangcong Luo
5233559183 Refactor Dex types 2021-04-08 07:08:56 -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
Kris Johnson
418b5dcbe8 Rename Gen 7 Mix and Mega's mod 2021-04-06 17:43:59 -06:00
pyuk-bot
ab722b5b73
Fix repeat mega evolution in Megas For All (#8177) 2021-04-04 18:29:14 -04:00
Kris Johnson
10eb793c92
Pokebilities: Fix various ability interactions 2021-04-03 01:40:35 -06:00
Kris Johnson
1462dafbc4 Gen 1: Move Poliwrath to NUBL 2021-04-02 00:02:48 -06:00
Instruct
c61999b5b7
SSB4: Clean up files to remove AFD stuff (#8160)
* Update random-teams.ts

* bye bye

* a
2021-04-01 23:40:25 -06:00
Kris Johnson
ebf13740f4 Shared Power: Fix Trace and Mirror Armor 2021-04-01 19:42:32 -06:00
Kris Johnson
876b09b010 OMotM/LCotM: Update bans/fix bugs 2021-04-01 17:25:41 -06:00
Guangcong Luo
929963261d Fix crash in Mix and Mega 2021-04-01 08:25:33 -04:00
Guangcong Luo
44ef998ecc Implement free-for-all
This involves a huge refactor for how battles are constructed, but
it's totally worth it.

Currently, tournaments, challenges, and laddering are unsupported; only
unrated searches work. But it does work, and it's beautiful.
2021-04-01 04:44:16 -07:00
Kris Johnson
931b6caf8f Add April 2021 OMotM/RoA Spotlights 2021-04-01 03:52:36 -06:00
Guangcong Luo
622645cd04 Fix crash in addSideCondition 2021-03-31 22:38:24 -07: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
Guangcong Luo
3b5e8cbfc2
Refactor for multi battles (#8152) 2021-03-31 20:27:07 -07:00
HoeenHero
4d29897b42 SSB: Simplify line missed during review 2021-03-31 23:25:47 -04:00
Instruct
1f7bf2deed
Add Super Staff Bros 4 Wii U (April Fools' prank) (#8148)
* Add new SSB meta

* Update random-teams.ts

* Fix issues

* Complete the meta

* Fix links

* fix

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

* Update data/mods/ssb/random-teams.ts

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

* Update data/mods/ssb/random-teams.ts

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

* Update data/mods/ssb/random-teams.ts

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

* Update data/mods/ssb/random-teams.ts

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

* review

* Update data/mods/ssb/moves.ts

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

* Update data/mods/ssb/random-teams.ts

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

* Update data/mods/ssb/moves.ts

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

* Update data/mods/ssb/moves.ts

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

* Update data/mods/ssb/moves.ts

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

* Update data/mods/ssb/moves.ts

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

* Update data/mods/ssb/moves.ts

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

* Update data/mods/ssb/moves.ts

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

* Update data/mods/ssb/moves.ts

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

* Update data/mods/ssb/moves.ts

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

* simplify code

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2021-03-31 20:21:43 -07:00
Instruct
ea9ea5c16f
SSB: Small tweaks (#8143)
* SSB: Small tweaks

Boat's move should bypass mbounce. Perish gets meme text.

* uwu

* Cake should no longer get refresh

* Thanks Freudian Slip
2021-03-30 12:31:21 -06:00
Guangcong Luo
d18c0a4e1f Refactor more things to use pokemon.allies/foes
(This will make multi battles easier to implement.)
2021-03-28 20:06:18 -07:00
Guangcong Luo
ed454ef76a
Refactor scripts to battle-actions (#8138)
This introduces a new class, BattleActions, available as `battle.actions`,
moving all functions from `data/scripts.ts` to `sim/battle-actions.ts`.

This makes it so that "go to definition" will now work correctly for
functions previously in scripts; we no longer need UnimplementedError,
and there's now a clean conceptual separation between `battle` and
`battle-actions` (whereas the previous distinction between `battle` and
`scripts` was basically nonexistent).

This will be a difficult migration if you maintain a fork with custom
scripted mods. I'm sorry! Migration instructions are here:

https://github.com/smogon/pokemon-showdown/pull/8138
2021-03-28 12:01:38 -07:00
Annika
9e7074572e Random Battles update 2021-03-26 15:45:59 -07:00
Guangcong Luo
619a1e228d
Stadium: Apply BRN Atk drop once instead of 5x (#8139) 2021-03-25 23:38:55 -07:00
Annika
0c2563ddc2
SSB: Give Lilypad Overflow 62 BP
Requested by instruct.
2021-03-24 23:11:56 -07:00
Instruct
fb471f8569
SSB: Fix description of Lilypad Overflow (#8137) 2021-03-23 17:05:01 -07:00
HematiteH2O
409d5acfef
Megas for All: Minor Ability polish (#8136)
* Megas for All: Minor Ability polish

* Attribute Arena Rock to the proper source
* Don't always animate delayed moves when the user is KOed
* Add visual indicator of which Pokémon currently has Gravitational Pull
* Damage the correct Pokémon with Stealth Rock and G-Max Steelsurge through Gravitational Pull

* Megas for All: Minor Ability polish

* Don't animate delayed moves through Long Whip unless the user is active - it gets very weird if it tries when the user is absent, because most of the animations bring back the user and then it just hangs out indefinitely behind the other Pokémon and... it's very funny but also not correct
2021-03-23 15:00:27 -06:00
Kris Johnson
5e6c259dec
Gen 3/4: Remove HAs in getSpecies (#8134) 2021-03-23 10:19:50 -07:00
HematiteH2O
654a106df4
Megas for All: Slates 30 and 31, balance/bugfixes (#8114)
* Megas for All: Slate 30 and balance/bugfixes

Adding all four new Abilities from Slate 30 (Pool Floaties, Red Licorice, Stygian Shades and Long Whip), but also fixing issues with various other Abilities, including minor balance changes to Savage, Heavenly Techniques, Body of Water and Forgery, and bugfixes to Forgery (again), Seismic Scream and Settle.

* Megas for All: Slate 30 ability (Long Whip)

This is so convoluted, but it has to be able to stack with itself as many as five times over, so I hope this is okay. Let me know if there's a way to streamline this! (and same for Settle, for that matter)

* Megas for All: Slate 30

* Megas for All: Add slate 30 stones

* Megas for All: Update Court Change

* Megas for All: Add slate 30 Mega Evolutions

* Megas for All: Slate 30 and balance changes

Forgery can no longer fake a Z-Crystal, so the entire section dedicated to making that work is no longer necessary. However, there's a new form of non-groundedness that needs to be added (the new 'poolfloaties' volatile), and I also modified the damage section slightly because Settle and Body of Water have some weird interactions, and this was the best way I could find to handle them with perfect accuracy. (For reference, Settle is meant to use the user's physical Attack stat without actually becoming a physical move for any other intents or purposes, while Body of Water is now about halfway to the Body Press effect but keeps the user's offensive stat changes rather than its defensive ones.)

* Megas for All: Add two new move modifiers

* Megas for All: Add missing trailing comma

* Megas for All: Improve Red Licorice ability

* Update abilities.ts

Okay I do think this was at least part of the problem so I'm gonna address that first

* Update scripts.ts

* Megas for All: Fix Cinccino and Falinks

Just fixing two minor errors that came up since the last time I touched this patch

* Update data/mods/megasforall/abilities.ts

Co-authored-by: Annika <annika0uwu@gmail.com>

* Megas for All: Define bladeMoves only once

(okay I was so tired when I worked on this code and I'm actually very embarrassed to see that there are three of these in quick succession and I only changed two of them ._.
so uh! clearly Annika's suggestion not to define it three separate times in the first place is the right call XP)

* Update data/mods/megasforall/abilities.ts

Co-authored-by: Annika <annika0uwu@gmail.com>

* Update scripts.ts

* Megas for All: Abilities for slate 31 and bugfixes

* Revise some shortDescs so they can fit better
* Accommodate for Illusion in some messages (previously, they gave away the Pokémon's real name)
* Revise Forgery (again) - it can no longer copy Mega Stones, and it no longer wears off when the user is hit
* Improve the functionality of Clairvoyance (for consistency with Future Sight and other delayed moves)
* Preserve type change indicators for SOS and Stance Change (established convention is for every Mega in the mod to have these regardless of whether it has changed type, but they disappear when changing form)
* Make sure Sticky Gel doesn't ignite more than once at a time (has been happening)
* Add an activation message to Stygian Shades to reduce confusion
* Overhaul Long Whip (now compatible with the varying base powers of Triple Axel and Triple Kick; now decides accuracy at the start and guarantees that every subsequent hit will land; now persists after the source faints and behaves more similarly to other delayed moves)
* Add new Abilities from slate 31, the very over-the-top complicated Gravitational Pull and the refreshingly simple Chakra Lock

* Megas for All: Improve functionality of Long Whip

* Megas for All: Slate 31

* Megas for All: Slate 31 stones

* Megas for All: Slate 31 compatibility

Modify all entry hazards to account for Gravitational Pull and Triple Axel and Triple Kick to account for Long Whip

* Megas for All: Add slate 31 forms

Add Mega Torterra, Mega Infernape and Mega Empoleon and revise Mega Zoroark's stats

* Megas for All: Slate 31 moves and balance changes

* Megas for All: Minor Ability corrections

* Megas for All: longWhipBoost

* Update moves.ts

* Megas for All: Fix Long Whip

* Megas for All: Fix Alchemist

SHOOT sorry I skipped over this
Meant to do it in the same commit
That was just a copying error

* Apply suggestions from code review

Aaaaa thank you so much! ;u;

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

* Megas for All: Condense Long Whip conditions

WOW this saves so much space I never knew you could do that

* Update conditions.ts

Co-authored-by: Annika <annika0uwu@gmail.com>
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2021-03-23 02:34:41 -06:00
Instruct
6c5a97e342
SSB4: Bugfixes and Balance changes (#8109) 2021-03-22 22:06:59 -04:00
ACakeWearingAHat
00bd42826f
Random Battles: Updates to Gen 5 (#8127) 2021-03-20 17:31:36 -07:00
Kris Johnson
3f5ef2e510 Add more Retro OMs 2021-03-19 19:58:18 -06:00
Annika
ff56f7e503 Random Battles update 2021-03-19 18:28:08 -07:00
Marty-D
1240cb6195
Gen II: Fix Mean Look and Spider Web flags 2021-03-19 18:02:01 -04:00
Annika
8a587b1746 Random Battles: Allow 1 Ditto per game in Gen 1/2 2021-03-18 16:35:01 -07:00
Annika
c7fd226253 Random Battles: Remove extraneous break statements 2021-03-16 17:23:27 -07:00
Instruct
8105b4121a
SSB: Remove Easter Egg (#8121) 2021-03-16 04:37:29 -07:00
Annika
04f2e7d588 Random Battles update
https://www.smogon.com/forums/threads/random-battles-changelog.3678462/#post-8779954
2021-03-11 11:17:15 -08:00
Annika
8e6c54e676 Random Battles: Scale levels for NUBL in Gen 1 2021-03-10 09:23:13 -08:00
Mia
4f710d3ce8 Remove random Monitor.slow() from random-teams 2021-03-10 08:41:27 -06:00
Annika
550a4df374
Random Battles: Refactor Gen 5-7 (#8106) 2021-03-09 19:49:47 -08:00
Annika
c8351c79e3 Random Battles: Add level scale for Gen 1 NU 2021-03-08 18:23:45 -08:00
Kris Johnson
3fbaa90ddd Add Gen 1 NU 2021-03-08 17:21:37 -07:00
ACakeWearingAHat
46733b2fd5
Gen 3 Random Battle updates (#8102) 2021-03-06 14:59:51 -08:00
Marty-D
e92bc94685 Gen IV: Fix Rough Skin
Little overzealous with the copypasting last time...
2021-03-06 14:33:57 -05:00
ACakeWearingAHat
d0eeeac7f0
Random Battles: Improve documentation (#8096) 2021-03-05 14:18:00 -08:00
Kris Johnson
56bff1708c Fix typo 2021-03-03 14:31:41 -07:00
Annika
13a870a4a3
Random Battles: Refactor Generation 4 (#8087) 2021-03-03 13:16:50 -08:00
Kris Johnson
cf44322310 Gen 1 Hackmons Cup: Fix mbstmin, add level cap 2021-03-03 13:37:58 -07:00
Kris Johnson
df6e109991 Megas for All: Fix crash 2021-03-03 12:54:10 -07:00
HematiteH2O
fcdfbca875
Megas for All: Slate 29 and ability fixes (#8089)
* Megas for All: Fix three abilities

This changes Blackmail primarily just to be more realistic, but there are also more important bugfixes to Forgery and Masquerade.

The previous version of Masquerade would activate the acquired Ability twice if, as in the case of Intimidate, it was supposed to activate on entry. This is because the Ability was replaced while the Pokémon was still starting, so it activated once when it was acquired (as it would by Skill Swap) and again as the Pokémon was still "entering." This fix makes it so such Abilities only activate once; it's also much neater and easier to edit than the messy version I had before.

The previous version of Forgery had problems whenever the Pokémon's item was consumed at the same time it was hit with a move; it would replace its item with Zoroarkite, then consume the Zoroarkite and be itemless, which in turn left it unable to activate the Ability.
I fixed this by making it acquire the item later on (after it would be consumed), and I also made the Ability itself check for a specific species instead of a specific item at the start, so it should still function in case Zoroarkite is ever not properly replaced (though it's also way more consistent at that now than before).

Let me know if there's anything else I should change about these! After testing, I think they work a lot better now than before, though. C:

* Megas for All: fix Unaware

The custom Ability Body of Water can give the effect of Body Press to special moves, so Unaware needs to ignore an attacker's Special Defense boosts when being attacked.

* Update data/mods/megasforall/abilities.ts

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

* Update data/mods/megasforall/abilities.ts

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

* Update abilities.ts

* Megas for All: Add slate 29 abilities

* Megas for All: Add slate 29 stones

* Megas for All: Add slate 29 forms

(That's a lot of fish)

* Megas for All: Add slate 29 moves

and keep Alolan Dugtrio incompatible with Dugtrionite

* Megas for All: Shorten overlong line

* Apply suggestions from code review

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

* Correct variable name after code review

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2021-03-03 00:32:17 -07:00
Kris Johnson
880112b5f0 Max Berries: Fix Roseli Berry 2021-03-01 20:25:26 -07:00
Kris Johnson
87d9336898 Max Berries: Fix berry activation 2021-03-01 14:31:44 -07:00
Kris Johnson
72650f7762 Add March 2021 OMotM/LCotM/RoA Spotlight 2021-02-28 21:54:10 -07:00
Kris Johnson
aeecf8d24c
Dexsearch: Add support for searching by mods (#8064) 2021-02-28 14:37:00 -08:00
Kris Johnson
eafebc98b5 Actually fix Gen 1 HP DV generation 2021-02-28 11:41:42 -07:00
Kris Johnson
f33818a932 Remove unused variable 2021-02-28 11:34:52 -07:00
Kris Johnson
955df9944d Fix Gen 1 Challenge/Hackmons Cup DV generation 2021-02-28 11:32:34 -07:00
Kris Johnson
6ce1e311ef
Add Gen 1 Hackmons Cup (#8077) 2021-02-27 20:20:21 -08:00
HematiteH2O
f04cedae98
Megas for All: Nerf Hawlucha's ability Masquerade (#8071) 2021-02-23 18:01:15 -07:00
HematiteH2O
64f5a02e1c
Megas for All: Add Mega Evolutions from slate 28 (#8065)
* Update formats.ts

Ban Dragonitite in Megas for All in line with latest update

* Update abilities.ts

Megas for All: add slate 28 Abilities (Everlasting Winter, Forgery, Clairvoyance and Sleight of Hand)

* Update items.ts

Megas for All: add slate 28 Mega Stones (Ninetalesite, Zoroarkite and Delphoxite)

* Update pokedex.ts

Megas for All: add slate 29 Mega Evolutions (Ninetales-Alola, Zoroark, Delphox); buff Thievul; add battleOnly for Mega Evolutions with multiple base forms (this was causing issues before)

* Update scripts.ts

Megas for All: add new moves to Thievul, Delphox; add form requirement for Mega Ninetales; add compatibility with Mega Zoroark to Mega Evolution and Z-Move scripts

* Update items.ts

Megas for All: rename Delphoxite -> Delphite

* Update pokedex.ts

Megas for All: rename Delphoxite -> Delphite

* Update abilities.ts

Megas for All: correct line length and trailing spaces

* Update items.ts

Megas for All: correcting species string (caught by npm test)

* Update abilities.ts

* Update scripts.ts

* Update abilities.ts

Megas for All: improve Everlasting Winter
(It feels remiss of me not to specify this - Ninetales gets Rain Dance itself, so it would be awkward if it was that easy to overwrite Everlasting Hail even if no one would do it in a serious environment)
I just tested and can confirm this fix works more properly!

* Update data/mods/megasforall/abilities.ts

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

* Update data/mods/megasforall/abilities.ts

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

* Update data/mods/megasforall/items.ts

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

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2021-02-23 14:13:49 -07:00
Annika
591eb345ce
Random Battles: Refactor LGPE and Gens 1-3 (#8060) 2021-02-23 10:27:19 -08:00
Annika
68dde4c058
Implement RandomTeams#multipleSamplesNoReplace (#8059) 2021-02-22 11:42:25 -08:00
Annika
c2e97aaaed
Use optional chaining in more places (#8063) 2021-02-22 11:42:05 -08:00
ACakeWearingAHat
c9e431ed48
Random Battles: Bugfixes for Doubles and old generations (#8058) 2021-02-19 16:08:27 -08:00
Annika
bc5099b74b Megas for All: Remove non-breaking space character 2021-02-17 22:11:30 -08:00
Kris Johnson
31856b698e
ADV: Move Breloom to OU and Regice to UUBL
https://www.smogon.com/forums/threads/adv-ou-tiering-changes.3652636/#post-8757221
2021-02-17 16:54:34 -07:00
Marty-D
dfb4f2cd90 Implement buggy Trick/Switcheroo behaviour with Kyogre/Groudon
Thanks Zaggyo!
To be reverted assuming it's patched someday.
2021-02-17 13:53:01 -05:00
Annika
59cf608b53
SSB: Prevent transformations into the same forme (#8044) 2021-02-15 21:12:37 -08:00
Instruct
9e5693a338
SSB: Prevent Data Corruption from being reverted by forme changes (#8040) 2021-02-15 21:10:06 -08:00
Guangcong Luo
5b9a26ac7a Fix Stadium Counter 2021-02-15 21:03:54 -08:00
Guangcong Luo
1b281650c6 Rename Stadium to Gen 1 Stadium
This is required to add support for Stadium in unit tests. A lot of the
codebase assumes that all mods start with "gen" followed by a number,
but I don't want to touch the others at the moment.
2021-02-15 21:03:47 -08:00
Instruct
ae34b97c87
SSB: Change set generation to rely on weaknesses against types (#8032) 2021-02-14 16:32:46 -08:00
ACakeWearingAHat
0c42a8f5bf
Random Doubles Updates (#8029)
Patch notes (2/13/21):
-Prevent Virizion with 1 attack by preventing Coaching from generating with any other setup move.
-Prevent First Impression from generating with any setup move, for Sirfetch'd.
-Reject Protect if Belly Drum is in the movepool but hasn't been rolled, in an attempt to prevent Belly Drum-less Eiscue.
-Fix post-refactor bug causing heavy-duty boots to generate where it shouldn't
-Glastrier: Icicle Crash over Avalanche
-Keldeo: Muddy Water over Hydro Pump and Scald, added Air Slash.
-Regieleki: Electroweb over Eerie Impulse
-Various level balancing. Pokemon above 56.00% win rate nerfed. Pokemon below 46.00% win rate buffed. Highlights: Moltres-Galar, Regidrago, Calyrex-Shadow, Zacian-C down again, Maractus, Toxapex, Shuckle, etc. up. See pull request for full list of level changes.

Gen 7 Random Doubles: Remove Protect from Typhlosion to prevent Choice Scarf Protect.
2021-02-13 15:09:55 -08:00
Annika
57721b3ecb Prettify JSON for Gen 6 Battle Factory 2021-02-13 14:19:58 -08:00