smogon / damage-calc

Pokemon games damage calculator
https://calc.pokemonshowdown.com
MIT License
397 stars 367 forks source link

Example in README doesn't work with gen 9 #559

Closed vs1720 closed 1 year ago

vs1720 commented 1 year ago

Hi, the example in the readme with Chansey and Gengar doesn't work when generation is changed to gen 9 when running it as javascript with error: Cannot read properties of undefined (reading 'gengar')

I am using require instead of imports to run the code - const { calculate, Generations, Pokemon, Move } = require('@smogon/calc');

I have not really worked with javascript in the past so this could be just ignorance on my part but any help is appreciated!

shrianshChari commented 1 year ago

This is largely because the @smogon/calc package hasn't been updated to support gen 9 (see #503). As of now the package only supports gens 1-8, and if you try and use gen 9, then it'll show that there are no mons.

thejetou commented 1 year ago

v0.8.0 has since been released with Generation 9 support.