0.15.2 • Published 6 years ago

fire-emblem-heroes-stats v0.15.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

fire-emblem-heroes-stats

yarn compatible

Scrapes http://feheroes.wiki/ for all available heroes and their stat variants, as well as all skill data.

Latest scraped stats are available in raw JSON format here:

https://github.com/ajhyndman/fire-emblem-working-title/blob/master/packages/fire-emblem-heroes-stats/stats.json

You can also try fire-emblem-heroes-stats out without installing, using Runkit!

Installation

You can load fire-emblem-heroes-stats via npm, or with a script tag.

HTML (loaded via CDN)

<!-- Dev -->
<script src="https://proving-grounds-static.ajhyndman.com/<version>/fire-emblem-heroes-stats.js"></script>
<!-- Production -->
<script src="https://proving-grounds-static.ajhyndman.com/<version>/fire-emblem-heroes-stats.min.js"></script>

<script type="text/javascript">
  // A new variable will be available here, named `stats`.
  alert(stats.getHero('Anna'));
</script>

Node (npm)

npm install --save fire-emblem-heroes-stats
var stats = require('fire-emblem-heroes-stats');

Usage

You can use the stats exported by this module as-is, or via one of the helper methods provided.

Helpers

// get lists of heroes
stats.getAllHeroes();
stats.getEventHeroes();
stats.getReleasedHeroes();

// get one hero
stats.getHero('Anna');

// get a list of all skills
stats.getAllSkills();

// get one skill's info
stats.getSkillObject('Silver Axe+');
stats.getSkillType('Silver Axe+');

Format

Stats Root

stats exposes a plain javascript object with the following format:

console.log(stats.default);

// =>
// {
//   heroes: [/* List of heroes */],
//   skills: [/* List of skills */],
// }

Heroes

The stats for each hero in this package have the following format:

{
  "name": "Abel",
  "moveType": "Cavalry",
  "weaponType": "Blue Lance",
  "total": 154,
  "skills": [
    {
      "name": "Iron Lance",
      "default": "-",
      "rarity": "-"
    },
    {
      "name": "Steel Lance",
      "default": "-",
      "rarity": "-"
    },

    // ...

    {
      "name": "Swordbreaker 2",
      "rarity": "-"
    },
    {
      "name": "Swordbreaker 3",
      "rarity": 4
    }
  ],
  "stats": {
    // Level 1 stats do not include variance.
    "1": {
      // Stats are further broken down by rarity.
      "4": { "hp": 16, "atk": 6, "spd": 8, "def": 8, "res": 5 },
      "5": { "hp": 17, "atk": 7, "spd": 8, "def": 8, "res": 6 }
    },
    // Level 40 stats include all known variances, as defined in the wiki.
    "40": {
      "4": {
        // Format here is [Low, Med, High].  In some cases, when only two values
        // are known, and it is not clear which is high and which is low, there
        // may only be two values here.
        "hp": [33, 36, 39],
        "atk": ["-", 30, 33],
        "spd": [27, 30 ,33],
        "def": [21, 24 ,27],
        "res": [20, 23, 26]
      },
      "5": {
        "hp": [35, 39, 42],
        "atk": [30, 33, 36],
        "spd": [29, 32, 35],
        "def": [22, 25, 28],
        "res": [22, 25, 29]
      }
    }
  }
}

Skills

Skills each have a type key and stats relevant to their skill slot.

{
  // Every skill has these keys.
  "name": "Raijinto",
  "type": "WEAPON",
  "effect": "Enables counterattack regardless of distance if this unit is attacked",

  // Every weapon skill has these keys.
  "cost": "400 SP",
  "damage(mt)": 16,
  "range(rng)": 1,
  "exclusive?": "Yes",
  "weaponType": "Red Sword"
},

Formal definition

A full, formal type definition can be found here. This can also be consumed by Facebook's Flowtype static type checker in your own javascript application.

Development

To scrape the latest wiki updates yourself:

$ git clone https://github.com/ajhyndman/fire-emblem-working-title.git
$ cd fire-emblem-working-title
$ lerna bootstrap
$ cd fire-emblem-heroes-stats
$ npm run scrape-stats
$ npm run scrape-images
0.15.2

6 years ago

0.15.1

6 years ago

0.15.0

6 years ago

0.14.5

6 years ago

0.14.4

6 years ago

0.14.3

6 years ago

0.14.2

6 years ago

0.14.1

6 years ago

0.14.0

6 years ago

0.13.1

6 years ago

0.12.6

6 years ago

0.12.5

6 years ago

0.12.4

6 years ago

0.12.3

6 years ago

0.12.2

6 years ago

0.12.1

6 years ago

0.12.0

6 years ago

0.11.2

6 years ago

0.11.1

6 years ago

0.11.0

6 years ago

0.10.2

6 years ago

0.10.1

7 years ago

0.10.0

7 years ago

0.9.14

7 years ago

0.9.12

7 years ago

0.9.11

7 years ago

0.9.10

7 years ago

0.9.9

7 years ago

0.9.8

7 years ago

0.9.7

7 years ago

0.9.6

7 years ago

0.9.5

7 years ago

0.9.4

7 years ago

0.9.3

7 years ago

0.9.2

7 years ago

0.9.0

7 years ago

0.8.3

7 years ago

0.8.2

7 years ago

0.8.1

7 years ago

0.7.22

7 years ago

0.7.21

7 years ago

0.7.20

7 years ago

0.7.19

7 years ago

0.7.18

7 years ago

0.7.16

7 years ago

0.7.15

7 years ago

0.7.14

7 years ago

0.7.13

7 years ago

0.7.12

7 years ago

0.7.11

7 years ago

0.7.10

7 years ago

0.7.9

7 years ago

0.7.6

7 years ago

0.7.5

7 years ago

0.7.4

7 years ago

0.7.3

7 years ago

0.7.2

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.6.6

7 years ago

0.6.4

7 years ago

0.6.3

7 years ago

0.6.2

7 years ago

0.6.1

7 years ago

0.6.0

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago