Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@pkmn/sim: Running Dex.formats.getRuleTable(Dex.formats.get('gen9lc')) crashes #25

Closed
thejetou opened this issue Nov 4, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@thejetou
Copy link

thejetou commented Nov 4, 2023

Describe the bug:

Running Dex.formats.getRuleTable(Dex.formats.get('gen9lc')) crashes on @pkmn/sim:0.7.57 with the error:

Uncaught Error: Rule "-Stantler" in "[Gen 9] LC" already exists in "Little Cup"
    at DexFormats.getRuleTable (/home/jet/workspace/pkmnsimtest/node_modules/@pkmn/sim/build/cjs/sim/dex-formats.js:514:27)

Example:

import { Dex } from '@pkmn/sim'
Dex.includeFormats();
console.log(Dex.formats.getRuleTable(Dex.formats.get('gen9lc')));

Expected behavior:

Dex.formats.getRuleTable should have returned the rule table and not crashed.

Additional context:

Running the equivalent code on smogon/pokemon-showdown@813f2ef works as expected.

Discord conversation: https://discord.com/channels/689316505560809576/689316506265321535/1170051792818667621

@thejetou thejetou added the bug Something isn't working label Nov 4, 2023
@scheibo
Copy link
Contributor

scheibo commented Nov 6, 2023

Per our conversation i think this might possibly be related to #21 (comment) so I think I might have to solve them together. Will try to find some time to look into these Dex issues this month.

@scheibo
Copy link
Contributor

scheibo commented Feb 24, 2024

Per convo on discord: we should move formats which depend on mods (eg. gen9vgc2023regd) out of @pkmn/sim's config/formats.ts and instead include them in @pkmn/mods. gen9lc doesn't crash because of this issue, but mod-dependent formats also crash so I figured I'd just address that in this same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants