Commit Graph

31 Commits

Author SHA1 Message Date
Tarrembeau
3a035c9f2d
[Gen 1] Random Battle: Make PU Pokémon level 77 (#8721)
https://discord.com/channels/294651453279174656/809413397840920586/963086002942001203
2022-04-30 12:51:25 -07:00
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
Tarrembeau
3f701ef973
Gen 1 Random Battle: Make bad Pokémon level 100 (#8630) 2022-01-19 14:12:50 -08:00
Annika
5069ef4d55 Gen 1 Random Battle: Don't use bad Pokémon as leads 2022-01-15 14:17:01 -08:00
WeWuzNidokangz
7097a9ac75
Hackmons Cup: Support custom team bans/unbans (#8607) 2022-01-09 14:46:41 -08:00
Karthik
c9c34a2357
Gen 1 Random Battle: Fix Monotype (#8516) 2021-11-03 21:25:14 -07:00
Annika
d3a2911c27 Random Battles: Use correct Dex APIs 2021-10-08 19:50:52 -07:00
Annika
77acf7831d Random Battles: Properly level (OU) mons in Gen 1 2021-05-27 10:37:20 -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
071e21da5c
Random Battles: Refactor to use Sets and Multisets more (#8292) 2021-05-11 09:16:28 -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
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
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
Annika
8a587b1746 Random Battles: Allow 1 Ditto per game in Gen 1/2 2021-03-18 16:35:01 -07:00
Annika
8e6c54e676 Random Battles: Scale levels for NUBL in Gen 1 2021-03-10 09:23:13 -08:00
Annika
c8351c79e3 Random Battles: Add level scale for Gen 1 NU 2021-03-08 18:23:45 -08:00
Kris Johnson
cf44322310 Gen 1 Hackmons Cup: Fix mbstmin, add level cap 2021-03-03 13:37:58 -07: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
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
Guangcong Luo
ea58695f0f Revert "CC/HC: Fix level balancing formula (#7773)"
This change was controversial. pyuk agreed to revert in preparation for
Random Battles Team Tour 4 as mentioned in:

https://www.smogon.com/forums/threads/revert-the-level-changes-to-hackmons-cup.3674551/

This reversion should not be interpreted as taking a side in whether
the level formula should be changed after the tour.

This reverts commit b6bf805a1a.
2020-12-09 23:18:41 +00:00
MacChaeger
b6bf805a1a
CC/HC: Fix level balancing formula (#7773) 2020-12-08 09:55:30 +04:00
Guangcong Luo
9d87616176
Add more style linting rules (#7537)
* Lint arrow-body-style

* Lint prefer-object-spread

Object spread is faster _and_ more readable.

This also fixes a few unnecessary object clones.

* Enable no-parameter-properties

This isn't currently used, but this makes clear that it shouldn't be.

* Refactor more Promises to async/await

* Remove unnecessary code from getDataMoveHTML etc

* Lint prefer-string-starts-ends-with

* Stop using no-undef

According to the typescript-eslint FAQ, this is redundant with
TypeScript, and they're not wrong. This will save us from needing to
specify globals in two different places which will be nice.
2020-10-19 02:42:28 -07:00
Kris Johnson
28bf388b98
Typescript data (#6553) 2020-04-23 09:16:09 -07:00