Commit Graph

203 Commits

Author SHA1 Message Date
Annika
4d73b897b6 Random Battles: Support more value rules
This adds support for `Max Move Count` and `Adjust Level`
2022-03-30 21:56:43 -07:00
Alexander B
6d4e595977
Hackmons Cup: Fix custom whitelists w/ formes (#8679) 2022-03-04 18:32:41 -08:00
Annika
dce7f33b65 Random Battles: March 2022 balance patch 2022-03-03 18:26:01 -08:00
Annika
66c2f4b53a Random Battles updates 2022-02-04 20:08:27 -08:00
pyuk-bot
32892af464
Fix National Dex Eviolite checks (#8650) 2022-02-01 13:51:04 -05:00
Annika
70aac0296e Random Battle: Account for nonexistent evolutions 2022-01-30 18:02:29 -08:00
pyuk-bot
60524b050e
Randbats: Don't count fixed damage as needing Atk (#8642) 2022-01-28 17:50:57 -08:00
WeWuzNidokangz
7097a9ac75
Hackmons Cup: Support custom team bans/unbans (#8607) 2022-01-09 14:46:41 -08:00
Annika
6fca9fed27 Random Battle updates 2022-01-02 21:09:20 -08:00
Annika
57ee011881 Random Battles: Remove unintentional comment 2021-12-10 19:21:15 -08:00
Annika
75ab25b160 Random Battles updates 2021-12-05 18:17:15 -08:00
Annika
ca89934daf BD/SP Random Battles: Level based on tiers 2021-12-04 18:10:38 -08:00
Annika
4652c56020 Random Battles: Fix Hidden Power IVs
Fixes #8549
2021-12-04 18:10:38 -08:00
Annika
a3c4c696e8 Improvements to BD/SP Random Battles 2021-11-24 16:00:31 -08:00
Annika
67858680cc BD/SP Random Battle: Fix team generation bugs 2021-11-23 16:31:44 -08:00
Kris Johnson
05ceaec09e
Random Battle: Fix BDSP set generation (#8535) 2021-11-22 16:24:39 -08:00
Annika
bf23cb7b94 Fix CI 2021-11-19 01:23:17 -05:00
Annika
11931f9374
BDSP Random Battle: Level properly 2021-11-18 22:09:06 -08: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
Mia
f76bb79c74 Random-Teams: Fix Hackmons Cup move generation
Without this fix, the hackmons cup generator pushes DataMoves to the set.moves array, which crashes /showset. (it crashes because Teams.packName is called on an object, so it's truthy, but move.replace does not exist since it isn't a string).
2021-10-11 12:51:17 -05:00
Annika
d3a2911c27 Random Battles: Use correct Dex APIs 2021-10-08 19:50:52 -07:00
Annika
b626892dab Random Battles updates 2021-10-02 14:50:11 -07:00
Kris Johnson
b4e1514d37
Random Battle: Fix crash with Force Monotype (#8476) 2021-09-20 08:58:22 -07:00
Kris Johnson
eb4b7568c8 Revert "Random Battle: Fix crash with Force Monotype"
This reverts commit 2e4439f940.
2021-09-20 02:59:25 -06:00
Kris Johnson
2e4439f940 Random Battle: Fix crash with Force Monotype 2021-09-20 02:41:08 -06:00
ACakeWearingAHat
fc1c3e17c5
Random Battles updates (#8473) 2021-09-19 15:50:11 -07:00
Annika
1fc5e3a787 Random Battles updates 2021-09-06 20:46:44 -07:00
Annika
3aa9934e65 Random Battles updates 2021-08-02 14:20:38 -07:00
Annika
c134195915
Use ts-node instead of Sucrase (#8369) 2021-07-09 19:59:22 -07:00
Annika
33e82d85d5 Random Battles update 2021-07-01 16:33:40 -07:00
ACakeWearingAHat
92c932d35a
Random Battles updates (#8374) 2021-06-25 17:04:41 -07:00
Annika
6363a1854c Random Battles: Don't allow unreleased HAs 2021-06-07 18:45:22 -07:00
Annika
8a6bb51c23 Random Battles update 2021-06-01 16:22:57 -07:00
Annika
a77db612c8 Random Battles updates 2021-05-23 16:11:54 -07:00
Annika
071e21da5c
Random Battles: Refactor to use Sets and Multisets more (#8292) 2021-05-11 09:16:28 -07:00
Mia
2a8f69ab0a Randbats: Properly throw on invalid types 2021-05-10 11:55:20 -05:00
Annika
0b438673a6 Fix BSS Factory item generation 2021-05-09 13:00:36 -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
00a533f4fe Random Battles: Fix minSourceGen bug 2021-05-06 23:05:37 -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
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
ACakeWearingAHat
42cf635dca
Random Battles Updates (#8270) 2021-05-04 21:42:49 -07:00
Annika
d48c7a9ed6 Random Battles: Fix STAB enforcement 2021-05-03 15:16:57 -07:00
Annika
99cb226a4b Random Battles update 2021-05-01 18:37:52 -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
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
ACakeWearingAHat
7fd6baa4c3
Random Battles: Fix Toxtricity (#8196) 2021-04-13 16:11:31 -07:00
ACakeWearingAHat
5493420d9c
Random Battles Improvements (#8192) 2021-04-10 17:46:41 -07:00