Coder Social home page Coder Social logo

griffinledingham / sulcalc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from whisperdoll/sulcata-damage-calculator

0.0 2.0 0.0 16.07 MB

A Pokemon damage calculator

Home Page: https://sulcata.github.io/sulcalc/

License: MIT License

JavaScript 84.32% Vue 2.06% CSS 0.16% HTML 0.05% TypeScript 13.40%

sulcalc's Introduction

sulcalc

Build Status

A Pokemon damage calculator.

Usage

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'

Installing Dependencies and Setup

  1. Install Node.js if you haven't done so already.
  2. Run npm ci in the root directory of the repository.
  3. Be sure to run npm run setup before running other tasks.

Running

  • npm run start to start a local server that will serve the app.
  • After a while it will finish building and provide a link in the console.

Building

  • npm run build:app to build the web app.
  • npm run build:lib to bundle just the API together.
  • All builds are put in the /dist folder.

Linting and Testing

  • npm run test to run the unit tests.
  • npm run lint to run TSLint and Prettier.
  • npm run style:fix to autoformat with Prettier.
  • These should all be run automatically before commits.

Issues

GitHub Issues

License

MIT License

sulcalc's People

Contributors

sulcata avatar disasterarea96 avatar skypo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.