* Randomized set updates
* fix some things
* add resttalk primarina gen 7
* Create Pokemon incompability system
* Simplify code
* tghost oinkolognes
* Give sash back to doubles smeargle
* Give sash back to doubles smeargle
* Allow BDSP moves to be learned via HOME relearner
* Update team-validator.ts
Commented out my changes to see if this was causing a test to fail; turns out my code isn't at fault.
* Update team-validator.ts
* Don't get learnset for Pokemon that don't exist in BDSP
Without the isNonstandard check, the learnset will be taken from the base learnsets.ts file, which could result in detecting moves that are actually not from BDSP.
* Fix BDSP legality
* Update team-validator.ts
* Fix test and learnsets
* Update data.js
* Prevent illegal transfers to/from BDSP
Nincada from outside BDSP cannot be sent to BDSP, Nincada from BDSP cannot be sent to other Switch games, and Spinda cannot be sent from or to BDSP. Currently this has no effect in regular Gen 9, but it technically does in Gen 9 Natdex (I have no idea if anything changes), and it may affect future generations.
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.
TypeScript 4.8+ supports Lowercase for lowercase strings, which isn't
exactly what ID is, but can be used to type IDs in object keys and data
entries that previously required string. I'm calling it IDEntry in places
where it should be an ID but TypeScript doesn't support that.
Very conveniently, no additional casts will be needed when using ID
where IDEntry is expected.
It's caught at least a few bugs, which is also why I'm PRing: I didn't
write the code for the bugs it found, and don't know if it's the right
way to fix them.
This ballooned into several other type refactors.
* Add Gen 9 BSS Factory
Co-Authored-By: NO-VED <16705080+no-ved@users.noreply.github.com>
* Split and tweak sets per Cake & Livid's review
* Put sets with moves that aren't rolled on one line
Apologies in advance to my linter
* Last of Cake's changes
* Fix missing curly
That's what I get for copy pasting
* Address livid's review
* Address Livid's review
* Show Gen 9 BSSF in search
* Address Kris' review
* Move Gen 9 BSS Factory to Rands Spotlight
per ACakeWearingAHat
* Update config/formats.ts
---------
Co-authored-by: NO-VED <16705080+no-ved@users.noreply.github.com>
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Create framework for Gen 7 rands revamp
* Shuffle moves and deal with Z-Conversion Porygon-Z
* Add isDoubles as a input for STAB enforcement
* Undo previous
* Move gen 7 doubles code to a separate file
* fill out moves
* revamp abilities
* minor moveset updates
* prevent technician alolan persian
* mostly linting
* Revamp setup moves
* Male Greninja
* Further clean up Setup lists
* More Z-move stuff
* Tweak move and ability incompatibilities
* enforce shadow sneak on kecleon
* Add Geomancy to setup and prevent evasion abilities by default
* items
* more minor set updates
* linting
* add more z-move users
* soundproof kommonium clanger
* rockium kabutops
* Weak Armor adjustments + some syntax
* refactor and fix /setodds and /randbats and /randdubs
* improve item generation code
* Allow plot sucker houndoom
* Allow Power Construct on Zygarde and homogenize gen 6 ability generation code
* Don't apply new noSTAB list to gen 7 doubles
* Fix -ate abilities
* comment
* Rework shed skin a bit
* Abilities tweaking/simplifying
* simplify Magnet Pull, since Probopass always has earth power
* Enforce U-turn on some Bug types
* Rework specific ability rejections into enforcements
* Prevent Oblivious on Pokemon with no Status moves, since infatuation doesn't exist
* Remove unnecessary item generation code
* Remove Petaya Berry from HP EVs adjustments
* prevent scarf lanturn
* scarf physical changes
diggersby/medicham
* Give Genesect-Douse its level
* Bug fixes and minor set changes
* Split raichu-alola
* Remove unnecessary preferred types
* Don't enforce HP flying on flying types
* make 4 atks jirachi av
* Actually give Jirachi AV and prevent swift swim kingdra with focus energy
* remove another unnecessary ptype
* Drain Punch/CC incompatibility
* Enforce recovery on support Mew
* Prevent Life Orb with Sturdy
* add preferred type(s) to /randbats for gen7
* lint
* forgot semicolon oops
* Remove kangaskhan PT
* Fix u-turn enforcement
* Enforce recovery on Volbeat
* Don't give Honchkrow Black Glasses
* Setup Solgaleo should get Weakness Policy
* Add Bulk Up to guts hariyama
* make Kingler setup sweeper
* Stoutland set update
* Prevent Sash Mismagius and double fire move Volcarona
* Prevent Choice Scarf on Wallbreaker
* Enforce recovery on Ledian
* Remove Ice Beam from Absol-Mega
* Adjust Seviper PTs
* PT normal Heliolisk
* Add PUP to nostab
* Future-proof Nihilego's SpD EVs in case of level changes/Hidden Power IVs
* Change Shaymin PT to Flying
* Prevent lead Focus Sash with Defog or Regenerator
* Remove unnecessary condition for sash
* Move pivotingMoves to the top
* Support Max Move Count tests for gens 7 and 9
* Move general incompatibilites to incompatiblePairs array
* Create a type for roles
* Make Gen 7 no longer inherit from Gen 7 doubles
* Remove unnecessary hardcode
* Remove now unnecessary code (after doubles/singles separation)
* Move hardcodes into incompatiblePairs array
* Split ability enforcement into species and non/species conditions, and fix up some minor things
* Convert ability enforcements that only apply to one Pokemon to species-based
* Update server/chat-plugins/randombattles/index.ts
Co-authored-by: Mia <49593536+mia-pi-git@users.noreply.github.com>
* Update server/chat-plugins/randombattles/index.ts
Co-authored-by: Mia <49593536+mia-pi-git@users.noreply.github.com>
* Update random-teams.ts
* make types for role and preferredType explicit in function definitions
* Update test/random-battles/gen7.js
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen6/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen7/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen7/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen6/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen7/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen7/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen7/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen7/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen7/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen7/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen7/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen7/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen7/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/mods/gen7/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* finish snake casing the gen 7 file
* snake case gen 8, hopefully
* Update random-teams.ts
* lint please
* missed a snake
* Fix an incompatibility
* Add types for randomSets
* Simplify /randbats data retrival for Gen 7 random doubles
* Further simplify gen 7 randdubs command
---------
Co-authored-by: livid washed <115855253+livid-washed@users.noreply.github.com>
Co-authored-by: adrivrie <adriaan.de.vries@hotmail.com>
Co-authored-by: Mia <49593536+mia-pi-git@users.noreply.github.com>
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Move gen 8 rands code to gen8 folder
* Add test data file
* Remove hidden power from random-teams
* Remove BDSP
* Remove item selection for now
* Remove ability culling for now
* Remove move culling for now
* Obtain allowed pokemon from random-sets.json
* Add tera blast counter
* linting
* Remove Dynamax from random-teams
* Remove unnecessary check
* Add role and tera type + fix data format
* remove gmax
* Disable tier for now
* movePool should have move ids not names
* linting
* Add required moves
* Create an individual function for moveset generation
* Return moves early if <= 4 moves available
* Add counter for individual STABS, including tera
* Tera Blast is tera stab
* Add some moves (help with testing)
* Remove culling moves from moveset
* Add new hazard removing moves
* Test STAB and recovery moves
* Cull movepool each time a move is added
* Black Sludge only if tera type is Poison
* teratype and role to functions
* Test some 'High Priority' items
* Move ability selection to its own function
* Fix ability sorting/selection
* No need to go through the move adding process if number of moves in set + movepool is 4
* lint
* Remove some pokemon that aren't in gen 9 randbats
* Tera STAB example
* Allow for forcing abilities
* Silvally not in gen 9
* Move level calculation to getLevel
* Tier-based levelling and doubles coverage
* Sitrus Berry default item for doubles
* Avoid hard-coding for species frequency
* Linting + replace hail with snow
* Change a comment slightly
* Fix STAB moves: need to check that they do damage
* minor thing
* Comment out tera type requirement
* comments
* Add gen 9 randbats format
* STAB counter
* Remove setupType
* Add cullMutlaExclusive()
* Remove unnecessary functions
* Move CC/HC to the bottom
* Allow movesA and movesB to be overlapping
* Initialization of fill-out
* linting
* Setup moveEnforcementCheckers
* Type/STAB counter only updates for moves that aren't in noSTAB
* Account for type changing abilities earlier
* STAB enforcement
* Setup moves array
* linting
* Revert Setup change
* More fillout
* move tweaks
* Tera STAB enforcement
* Remove rest from recovery moves
* Enforce setup
* Add Facade if Guts
* Misc enforced moves
* Enforce more moves
* Enforce STAB priority
* Setup forced on tera blast user
* check if there are moves of the desired kind before sampling
* move tweaks
* Need to check if setupMoves is empty
* fix brute bonnet
* fix scream tail
* Finish up move incompatibilities
* fix scream tail harder
* Formatting
* Fix some things
* End culling early if movepool gets too small
* Paired moves: end culling early if movepool gets too small
* Remove 'stop cull' for testing purposes
* If 2/4 moves are filled, remove single unpaired move
* Remove now unnecessary hardcodes
* Use MovePairs instead of hardcoding pairs
* addMove function for adding moves to moveset
* Move updates
* Extra check is unnecessary, moves and movePool should never have moves in common
* Mach Punch required on Breloom
* lint
* Remove Synthesis from Brute Bonnet (5 enforced moves)
* adjust oranguru tera types
* finish up moves
* Force abilities
* Update my favorite pokemon
* linting
* Add shouldCullAbility
* fix setup counter
* Move sorting abilities below hardcoding
* minor change
* Add fields
* fix sawsbuck typo
* Improve the species generation + remove Basculegion and Houndstone as possible leads
* Fix Species frequency
* Linting
* veluza can actually run sharpness
* code all ability rejections
* Update random-sets.json
* EVs/IVs tinkering change
* fix capitalization error
* Perform small fixes
* fix moves that don't exist
* linting
* Magnezone hardcode
* Items
* Update random-teams.ts
* linting
* prep for leveling
* long list for ditto
* comment out a line of text
* finish individualizing levels and also melop sucks
* add lokix thing
* revavroom
* updates from testing
* komala probably shouldn't have dark as an option
* tropius fix
* intim mence is ok
* kleavor should not get sheer force
* why did we give hydre earth power lmao
* why did we put leech seed on toed
* forgot to sitrusify cheek pouch mons
* fix enamorus
* Syntax error
* Change Zoroark lastmon condition to level >= 72
* Fix Zoroark-level constraint to allow for level forcing
* Fix singles vs doubles definition
* Use species.id as much as possible for set generation
* updates from testing
* allow flash fire heatran
* additional sash parameters
* reject stakeout if the user has zero attacks
* fixes
* update pawmot abilities
* Change iron fist counter to a number
* Force Own Tempo on Petal Dance Lilligant
* Add T-wave to SD groudon set
* Slush Rush guaranteed with Snowscape + possible if team has snow
* Rework ability sorting: find list of non-culled abilities before sorting and selecting
* Move S/V rands to The Forefront
* fix regidrago
* Small fix to choosing allowed abilities
* update aliases
* Update Arcanines
* Change from forEach to for, since index is no longer being used
* first impression is bug stab now
* set updates from the randscord
* Update /randbats to gen 9
* Add Tera Type to /randbats output
* things to do with steel
* Update data/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Update data/random-teams.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Move Battle Factory and BSS Factory to mods/gen8 folder
* Remove gen8 factory sets test
* Copy over random-sets.json when building
* add missing heatran-based incompatibility
* fix sableye not always getting Recover
* set updates
* start movin' cap 1v1
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* finish movin' cap 1v1
* Update random-battles.ts
* Update random-teams.ts
* Update random-teams.ts
Co-authored-by: livid washed <liuc.kelvin9901@hotmail.com>
Co-authored-by: livid washed <115855253+livid-washed@users.noreply.github.com>
Co-authored-by: Alexander B <4866817+MathyFurret@users.noreply.github.com>
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* PP from ally moves is no longer infinite in PiC
* add deductpp to modded pokemon
* eep
* Refactor when start effects activate upon switching in.
* Add new effects for leppa berry consumption
* I forgot about these items ngl
* add some new support for moves
* Restrict Wandering Spirit, add extra failsafe
* fix things
* Last minute bugfix
* Update banlist
* start working on gen 9
* update nextturn
* a
* more stuff
* Update formats.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>