Commit Graph

154 Commits

Author SHA1 Message Date
Kris Johnson
77b1596c13
Gen 1: Fix Bide duration
this.random is exclusive of the upper boundary, so gen 1 Bide was always calling 3 turn bide instead of 3-4 turns
2022-05-14 15:18:36 -06:00
Karthik
108add8a44
Fix a bunch of Metronome quirks (#8769) 2022-05-12 18:45:51 -04:00
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
Karthik
a442790709
Gen I: Fix Transform bugs (#8732) 2022-04-24 17:59:37 -05:00
Marty-D
b696066c58
Update RBY tiers
https://www.smogon.com/forums/posts/9182452/
2022-04-11 20:39:57 -04:00
Annika
d09e2d8354 Random Battles: April 2022 patch 2022-04-04 16:22:31 -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
Karthik
c6dc201c2a
Gen 1: Fix Conversion client message (#8701) 2022-03-26 20:31:46 -05: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
b1fc64fbc2
Gen 1: Fix visual bug with Haze (#8605) 2022-01-03 15:25:59 -05:00
Annika
e082ce9434 Random Battles: Alphabetize move arrays 2022-01-02 21:09:20 -08:00
Karthik
993a48f584
Gen 1: Fix Haze (#8587) 2021-12-27 16:50:07 -05:00
EvGym
5d8117302c
Refactor overriding stats used for damaging moves (#8373) 2021-11-08 13:48:26 -08: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
4771a9db55 Gens I-II: Remove unneeded checks for spread moves 2021-10-28 18:52:28 -05:00
Annika
ceda8e1beb Improve grammar for Bide's debug hint in Gen 1
Fixes #8497
2021-10-24 00:11:56 -07:00
Annika
d3a2911c27 Random Battles: Use correct Dex APIs 2021-10-08 19:50:52 -07:00
Karthik
7f14b41c6f
Gen I-II: Fix Mist & Haze behavior (#8472) 2021-09-19 10:29:48 -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
77acf7831d Random Battles: Properly level (OU) mons in Gen 1 2021-05-27 10:37:20 -07:00
May Evans
2d28dc4966
Gen 1: Move Victreebel and Lapras to OU by technicality (#8336) 2021-05-25 21:38:41 -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
Kris Johnson
dc57eb71dc Gen 1: Move Raichu to NUBL 2021-04-27 20:33:48 -06: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
Karthik
8963e4ace4
Gen 1: Don't allow Pokemon to recharge if frozen (#8211) 2021-04-19 12:45:44 -04: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
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
1462dafbc4 Gen 1: Move Poliwrath to NUBL 2021-04-02 00:02:48 -06:00
Guangcong Luo
3b5e8cbfc2
Refactor for multi battles (#8152) 2021-03-31 20:27:07 -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
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
3fbaa90ddd Add Gen 1 NU 2021-03-08 17:21:37 -07: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