A Pokemon damage calculator.
import { sulcalc, Field, Generation, Move, Pokemon, Weather } from "sulcalc";
const attacker = new Pokemon({
name: "Moltres",
item: "Charcoal",
gen: Generation.GSC
});
const defender = new Pokemon({
name: "Snorlax",
item: "Leftovers",
gen: Generation.GSC
});
const move = new Move({
name: "Fire Blast",
gen: Generation.GSC
});
const field = new Field({
weather: Weather.SUN,
gen: Generation.GSC
});
sulcalc(attacker, defender, move, field).summary;
// 'Charcoal Moltres Fire Blast vs. Leftovers Snorlax in Sun: 237 - 279 (45.3 - 53.3%) -- 0.3% chance to 2HKO after Leftovers'- Install Node.js if you haven't done so already.
- Run
npm ciin the root directory of the repository. - Be sure to run
npm run setupbefore running other tasks.
npm run startto start a local server that will serve the app.- After a while it will finish building and provide a link in the console.
npm run build:appto build the web app.npm run build:libto bundle just the API together.- All builds are put in the
/distfolder.
npm run testto run the unit tests.npm run lintto run TSLint and Prettier.npm run style:fixto autoformat with Prettier.- These should all be run automatically before commits.