1.1.2 • Published 6 years ago

@scriptstone/cards v1.1.2

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

Scriptstone Cards

Hearthstone Card Metadata from HearthstoneJSON converted into a JavaScript object that maps Card IDs to the Card Metadata. Currently updated for Patch 12.0.0.25770.

Install

npm i @scriptstone/cards

Usage

const Cards = require('scriptstone-cards');
console.log(Cards['GIL_820']);

Output

{ artist: 'Matt Dixon',
  attack: 6,
  cardClass: 'SHAMAN',
  collectible: true,
  cost: 9,
  dbfId: 48111,
  elite: true,
  flavor:
   'Beware the Shudderwock, my son. We\'re fresh out of vorpal daggers.',
  health: 6,
  id: 'GIL_820',
  mechanics: [ 'BATTLECRY' ],
  name: 'Shudderwock',
  rarity: 'LEGENDARY',
  set: 'GILNEAS',
  text:
   '[x]<b>Battlecry:</b> Repeat all other\n<b>Battlecries</b> from cards you\nplayed this game <i>(targets\nchosen randomly)</i>.',
  type: 'MINION' }

Export to Prolog

The Hearthstone cards can be exported into a Prolog predicate, card_name/2, that maps card IDs to card names. This predicate can be generated by piping the output of export2Prolog.js into a new file. This resultant file can be loaded into a Prolog engine.

node export2Prolog.js > cards.pl
?- card_name(gil_820, Name).
Name = "Shudderwock".
1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago