Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

Star Wars: Legion Database for Dart and JSON

License

Notifications You must be signed in to change notification settings

matanlurey/swlegion-archived

Repository files navigation

Database and Data Model for Star Wars: Legion.

Build Status

This package is written and maintained in Dart for maintainability. There is also a JSON format for use with other languages or systems (see lib/catalog.json).

Star Wars, Star Wars: Legion and all related properties and text are owned by Fantasy Flight Games, Lucasfilm Ltd., and/or Disney.

Usage

This package provides 2 libraries: catalog.dart and swlegion.dart. Library catalog is a (best effort) collection of all known cards and other models that may change over time. Common APIs include:

  • catalog.commands and Commands
  • catalog.units and Units
  • catalog.upgrades and Upgrades
  • catalog.weapons and Weapons

Library swlegion.dart is just the data models, with the idea that they are used to create catalog.dart (and exported as catalog.json for use in non-Dart clients).

There is also a utility class Catalog (or the built-in instance, catalog) which adds the ability to do easy aggregations or compuations, for example which Upgrade(s) are valid given a Unit instance or reference, and a utility class Holodeck for running dice simulations and calculating statistics (holodeck.dart).