项目作者: pfirpfel

项目描述 :
Interactive Momir Basic console application that prints out cards on a receipt printer.
高级语言: JavaScript
项目地址: git://github.com/pfirpfel/momir-prototype-nodejs.git
创建时间: 2019-06-23T16:17:21Z
项目社区:https://github.com/pfirpfel/momir-prototype-nodejs

开源协议:MIT License

下载


Momir Basic console prototype

Interactive Momir Basic console application that prints out cards on a receipt printer.

Requirements

  • nodejs >= 8
  • (optional) bluetooth-ready, ESC/POS compatible printer

Installation

(Note: Installation will download ~80MB of card data.)

  1. git clone git@github.com:pfirpfel/momir-prototype-nodejs.git
  2. cd momir-prototype-nodejs
  3. npm install

Update momir data

Initially, this will be done by running npm install. But if new cards have been printed since the last run, you can
delete the source data and re-build the momir data:

  1. rm scryfall-oracle-cards.json
  2. npm run install

Usage

Console output only

Run:

  1. npm run momir

The programm is ready as soon as the dialog CMC? appears. Enter a number and press return to output a creature card
with converted mana cost of the entered number.

Console output + receipt print

Configure printer name and/or address and channel in src/constants.js:

  1. exports.printerName = 'MHT-P5801';
  2. exports.printerAddress = '01:23:45:67:89:AB';
  3. exports.printerChannel = 1;

Run:

  1. npm run momir-print

Appendix

Momir Basic

Momir basic is a Magic: The Gathering play variant based on the
Momir Vig Vanguard avatar.

All players use a deck consisting of exactly 60 basic lands and one Momir Vig Vanguard avatar.
The avatars modifies the starting life total of each player to 24 life an has the following ability:

{X}, Discard a card: Create a token that’s a copy of a creature card with converted mana cost X chosen at random.
Activate this ability only any time you could cast a sorcery and only once each turn.