* Improvements to room FAQs and repeats
- Removed /rfaq alias check when setting a topic to repeat. If a /rfaq alias is set to repeat, the text of the topic the alias is set for is displayed, rather than the topic's ID.
- If a /rfaq is deleted, repeats linked to it or one of its aliases will also be deleted, preventing a crash caused by trying to display a nonexistent topic.
- A separate problem, but the ability to set a topic as an alias of itself has been removed. Because this is possible, you can have a topic which is registered in the server, but does not appear at all if you type /rfaq.
* Remove unnecessary toID
* Update room-faqs.ts
Avoiding lint error array-callback-return
* Use for loop instead of map
* Update room-faqs.ts
* Restore original code, prevent overriding topics
Turns out it is possible to cause a similar crash that is not related to repeats. This can be done by creating two topics (Topic 1 and Topic 2) and making Topic 2 have an alias (Topic 3). You can then make Topic 2 an alias of Topic 1, making Topic 3 an alias of an alias. Deleting Topic 1 will delete Topic 2 but not Topic 3, and typing /rfaq Topic 3 will cause a crash.
It feels like it would overcomplicate the code to try to redirect existing aliases. I don't know how often people override topics, but the removal of this does not seem like too much of an inconvenience (just one extra step to convert a topic to an alias).
Also, for some reason, removing an alias would remove a repeat linked to the topic. Not sure why it was made that way, so I made it so that removing the topic is the only thing that should remove the repeat.
* Fix next battle timer imprecision
* Improve set count indicators
* Update server/room-battle.ts
* Don't leak teams in formats without Team Preview
---------
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Bo3: Design nitpicks
* Update server/room-battle.ts
Co-authored-by: Mia <49593536+mia-pi-git@users.noreply.github.com>
* Update position of `|` for set score display
* consistency
---------
Co-authored-by: Mia <49593536+mia-pi-git@users.noreply.github.com>
* Fix /fuse arg parsing
* Add a space to please the CI god
* Update server/chat-plugins/othermetas.ts
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Fix gen parsing on /fuseN
---------
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>
* Fuse command with single value
* im bad at this
* so hp still appears
* Help entry
* Update server/chat-plugins/othermetas.ts
---------
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>