@flesh-and-blood/types 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +184 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/interfaces.d.ts +312 -0
- package/dist/sets.d.ts +22 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# Flesh and Blood cards
|
|
2
|
+
|
|
3
|
+
- [Overview & installation](#overview-and-installation)
|
|
4
|
+
- [Card interfaces](#card-interfaces)
|
|
5
|
+
- [Enums](#enums)
|
|
6
|
+
- [Working with this project](#working-with-this-project)
|
|
7
|
+
|
|
8
|
+
# 8.0 breaking changes
|
|
9
|
+
|
|
10
|
+
- `card.images` has been deprecated in favor of `card.printings`
|
|
11
|
+
- `defaultImageName` has been renamed `defaultImage` for brevity
|
|
12
|
+
- `specialImageName` has been renamed `specialImage` for brevity
|
|
13
|
+
|
|
14
|
+
# 7.0 breaking changes
|
|
15
|
+
|
|
16
|
+
- `card.rarity` has been deprecated in favor of `card.rarities`
|
|
17
|
+
|
|
18
|
+
## Overview and installation
|
|
19
|
+
|
|
20
|
+
A library of all Flesh and Blood cards, available as a bundled TypeScript file with matching interfaces. Source data comes from the amazing [the-fab-cube/flesh-and-blood-cards](https://github.com/the-fab-cube/flesh-and-blood-cards) repository maintained by [Tyler Luce](https://github.com/luceleaftea) - all credit goes to him, and all errors are probably added by me in this project 😅.
|
|
21
|
+
|
|
22
|
+
To install run `npm i --save fab-cards`.
|
|
23
|
+
|
|
24
|
+
Access the card data in your project:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import { cards } from "fab-cards";
|
|
28
|
+
|
|
29
|
+
cards.forEach((card) => {
|
|
30
|
+
// do stuff with the card data
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Card interfaces
|
|
35
|
+
|
|
36
|
+
**`Card`** contains all of the fields that could show up for any particular card. Required fields can be found on every card, while optional fields may or may not exist on any given card.
|
|
37
|
+
|
|
38
|
+
### Required
|
|
39
|
+
|
|
40
|
+
| Field | Data type | Examples |
|
|
41
|
+
| -------------- | -------------------- | ------------------------------------------ |
|
|
42
|
+
| artists | `string` array | `[ "Riordan Delmiro" ]` |
|
|
43
|
+
| cardIdentifier | `string` | `"snatch-red"`, `"aether-wildfire-red"` |
|
|
44
|
+
| classes | `Class` enum array | `["Generic"]`, `["Warrior","Wizard"]` |
|
|
45
|
+
| defaultImage | `string` | `"1HP001.width-450"` |
|
|
46
|
+
| printings | `Printing` array | see **`Printing`** |
|
|
47
|
+
| name | `string` | `"Rain Razors"`, `"Pummel"` |
|
|
48
|
+
| rarities | `Rarity` enum array | `["Super Rare"]`, `["Token", "Majestic"]` |
|
|
49
|
+
| setIdentifiers | `string` array | `[ "1HP009", "CRU006" ]` |
|
|
50
|
+
| sets | `Release` enum array | `[ "History Pack 1", "Crucible of War" ]` |
|
|
51
|
+
| specialImage | `string` | `"1HP001.width-450"` |
|
|
52
|
+
| subtypes | `Subtype` enum array | `["OneHanded", "Dagger"]`, `["Aura"]` |
|
|
53
|
+
| types | `Type` enum array | `["Action"]`, `["Hero"]` |
|
|
54
|
+
| typeText | `string` | `"Elemental Ranger Action – Arrow Attack"` |
|
|
55
|
+
|
|
56
|
+
### Optional
|
|
57
|
+
|
|
58
|
+
| Field | Data type | Examples |
|
|
59
|
+
| -------------------------- | -------------------- | ------------------------------------ |
|
|
60
|
+
| cost | `number` | `0`, `10` |
|
|
61
|
+
| defense | `number` | `3`, `4` |
|
|
62
|
+
| functionalText | `string` | `"If Snatch hits, draw a card."` |
|
|
63
|
+
| fusions | `Fusion` enum array | `[ "Earth", "Ice" ]` |
|
|
64
|
+
| hero | `Hero` enum | `"Rhinar"`, `"Dori"` |
|
|
65
|
+
| intellect | `number` | `3`, `4` |
|
|
66
|
+
| isCardBack | `boolean` | `true` |
|
|
67
|
+
| keywords | `Keyword` enum array | `[ "Boost" ]` |
|
|
68
|
+
| life | `number` | `18`, `40` |
|
|
69
|
+
| oppositeSideCardIdentifier | `string` | `"invoke-kyloria-red"`, `"tomeltai"` |
|
|
70
|
+
| pitch | `number` | `1`, `2`, `3` |
|
|
71
|
+
| power | `number` | `3`, `14` |
|
|
72
|
+
| restrictedFormats | `Format` enum array | `[ "Blitz" ]` |
|
|
73
|
+
| specialCost | `string` | `"XX"`, `"3X"` |
|
|
74
|
+
| specialDefense | `string` | `"*"` |
|
|
75
|
+
| specialPower | `string` | `"*"` |
|
|
76
|
+
| specializations | `Hero` enum array | `["Dromai","Fai"]` |
|
|
77
|
+
| talents | `Talent` enum array | `[ "Draconic" ]` |
|
|
78
|
+
| young | `boolean` | `true` |
|
|
79
|
+
|
|
80
|
+
**`Printing`** contains information about the different printings a card has had (e.g. different sets, foilings)
|
|
81
|
+
|
|
82
|
+
| Field | Data type | Examples |
|
|
83
|
+
| ---------- | --------------------------------- | ----------------------------------- |
|
|
84
|
+
| edition | `string` of `ReleaseEdition` enum | `"Alpha"`, `"Unlimited"` |
|
|
85
|
+
| foiling | `string` of `Foiling` enum | `"Cold"`, `"Rainbow"` |
|
|
86
|
+
| identifier | `string` | `"1HP001"` |
|
|
87
|
+
| image | `string` | `"1HP001.width-450"` |
|
|
88
|
+
| set | `string` of `Release` enum | `"Dynasty"`, `"Uprising"` |
|
|
89
|
+
| treatment | `string` of `Treatment` enum | `"Alternate Art"`, `"Extended Art"` |
|
|
90
|
+
|
|
91
|
+
## Enums
|
|
92
|
+
|
|
93
|
+
**`Class`**
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
"NotClassed", "Generic", "Adjudicator", "Bard", "Brute", "Guardian", "Illusionist", "Mechanologist", "Merchant", "Ninja", "Ranger", "Runeblade", "Shapeshifter", "Warrior", "Wizard",
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
<br/>
|
|
100
|
+
|
|
101
|
+
**`Format`**
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
"Blitz", "Clash", "Classic Constructed", "Commoner",
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
<br/>
|
|
108
|
+
|
|
109
|
+
**`Fusion`**
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
"Earth", "Ice", "Lightning",
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
<br/>
|
|
116
|
+
|
|
117
|
+
**`Rarity`**
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
"Token", "Common", "Rare", "Super Rare", "Majestic", "Legendary", "Fabled", "Promo",
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
<br/>
|
|
124
|
+
|
|
125
|
+
**`Release`**
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
// Full sets
|
|
129
|
+
"Arcane Rising", "Crucible of War", "Dynasty", "Everfest", "History Pack 1", "Monarch", "Tales of Aria", "Uprising", "Welcome to Rathe",
|
|
130
|
+
|
|
131
|
+
// Hero/blitz decks
|
|
132
|
+
"Boltyn Blitz Deck", "Briar Blitz Deck", "Bravo Blitz Deck", "Chane Blitz Deck", "Classic Battles: Rhinar vs Dorinthea", "Dorinthea Hero Deck", "Ira Welcome Deck", "Katsu Hero Deck", "LeviaBlitzDeck", "Lexi Blitz Deck", "Oldhim Blitz Deck", "Prism Blitz Deck", "Rhinar Hero Deck",
|
|
133
|
+
|
|
134
|
+
// One-offs
|
|
135
|
+
"Promos",
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
<br/>
|
|
139
|
+
|
|
140
|
+
**`Talent`**
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
"Draconic", "Earth", "Elemental", "Ice", "Light", "Lightning", "Royal", "Shadow",
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
<br/>
|
|
147
|
+
|
|
148
|
+
**`Type`**
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
"Action", "Attack Action", "Attack Reaction", "Defense Reaction", "Equipment", "Hero", "Instant", "Mentor", "Resource", "Token", "Weapon",
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**`Hero`**
|
|
155
|
+
|
|
156
|
+
```ts
|
|
157
|
+
"Arakni", "Azalea", "Benji", "Boltyn", "Bravo", "Briar", "Chane", "Dash", "Data Doll", "Dorinthea", "Emperor", "Genis Wotchuneed", "Ira", "Iyslander", "Kano", "Kassai", "Katsu", "Kavdaen", "Kayo", "Levia", "Lexi", "Oldhim", "Prism", "Rhinar", "Ruu’di", "Shiyana", "Taylor", "Valda", "Viserai", "Yorick",
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
<br/>
|
|
161
|
+
|
|
162
|
+
**`Keyword`**
|
|
163
|
+
|
|
164
|
+
```ts
|
|
165
|
+
"Arcane Barrier", "Battleworn", "Blade Break", "Blood Debt", "Boost", "Channel", "Charge", "Combo", "Crush", "Dominate", "Essence", "Freeze", "Fusion", "Go Again", "Heave", "Intimidate", "Legendary", "Mentor", "Negate", "Opt", "Phantasm", "Reload", "Reprise", "Specialization", "Spectra", "Spellvoid", "Temper", "Thaw", "Unfreeze",
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Working with this project
|
|
169
|
+
|
|
170
|
+
### Card data
|
|
171
|
+
|
|
172
|
+
- [src/cards.csv](src/cards.csv) is the source of truth for all generated data. The data is managed in Google Sheets and sourced from [the-fab-cube/flesh-and-blood-cards](https://github.com/the-fab-cube/flesh-and-blood-cards).
|
|
173
|
+
|
|
174
|
+
### Data transformations
|
|
175
|
+
|
|
176
|
+
There are three steps involved in transforming the `.tsv` source data into typed `.ts` code - executed via `npm run transform`.
|
|
177
|
+
|
|
178
|
+
1. [src/parser.ts](src/parser.ts) reads from the `.tsv` file and converts the data into JavaScript objects (performing basic steps like converting comma-delimited lists into arrays)
|
|
179
|
+
1. [src/mapper.ts](src/mapper.ts) takes the parsed card data and transforms it to match the interfaces in [src/interfaces.ts](src/interfaces.ts)
|
|
180
|
+
1. [src/writer.ts](src/writer.ts) creates `.ts` files containing the card information and all types
|
|
181
|
+
|
|
182
|
+
### Bundling the library
|
|
183
|
+
|
|
184
|
+
To generate the distributed package code run `npm run build` after transforming the data.
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var g=Object.defineProperty,F=Object.defineProperties,N=Object.getOwnPropertyDescriptor,V=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertyNames,z=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var u=(r,a,o)=>a in r?g(r,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[a]=o,f=(r,a)=>{for(var o in a||(a={}))A.call(a,o)&&u(r,o,a[o]);if(z)for(var o of z(a))Q.call(a,o)&&u(r,o,a[o]);return r},v=(r,a)=>F(r,V(a));var q=(r,a)=>{for(var o in a)g(r,o,{get:a[o],enumerable:!0})},J=(r,a,o,l)=>{if(a&&typeof a=="object"||typeof a=="function")for(let D of Y(a))!A.call(r,D)&&D!==o&&g(r,D,{get:()=>a[D],enumerable:!(l=N(a,D))||l.enumerable});return r};var X=r=>J(g({},"__esModule",{value:!0}),r);var _={};q(_,{Class:()=>C,Foiling:()=>P,Format:()=>L,Fusion:()=>x,Hero:()=>U,Keyword:()=>G,Rarity:()=>I,Release:()=>O,ReleaseEdition:()=>M,Subtype:()=>W,Talent:()=>E,Treatment:()=>p,Type:()=>T,fullSetIdentifiers:()=>j,setIdentifierToSetMappings:()=>R,setToSetIdentifierMappings:()=>Z});module.exports=X(_);var P=(l=>(l.C="Cold",l.G="Gold",l.R="Rainbow",l))(P||{}),p=(m=>(m.AB="Alternate Border",m.AA="Alternate Art",m.AT="Alternate Text",m.DS="Double Sided",m.EA="Extended Art",m.FA="Full Art",m))(p||{}),C=(c=>(c.NotClassed="NotClassed",c.Generic="Generic",c.Adjudicator="Adjudicator",c.Assassin="Assassin",c.Bard="Bard",c.Brute="Brute",c.Guardian="Guardian",c.Illusionist="Illusionist",c.Mechanologist="Mechanologist",c.Merchant="Merchant",c.Ninja="Ninja",c.Ranger="Ranger",c.Runeblade="Runeblade",c.Shapeshifter="Shapeshifter",c.Warrior="Warrior",c.Wizard="Wizard",c))(C||{}),L=(k=>(k.Blitz="Blitz",k.BlitzLivingLegend="Blitz (Living Legend)",k.Clash="Clash",k.ClassicConstructed="Classic Constructed",k.ClassicConstructedLivingLegend="Classic Constructed (Living Legend)",k.Commoner="Commoner",k.Draft="Draft",k.Open="Open",k.Sealed="Sealed",k.UltimatePitFight="Ultimate Pit Fight",k))(L||{}),x=(l=>(l.Earth="Earth",l.Ice="Ice",l.Lightning="Lightning",l))(x||{}),I=(B=>(B.Token="Token",B.Common="Common",B.Rare="Rare",B.SuperRare="Super Rare",B.Majestic="Majestic",B.Marvel="Marvel",B.Legendary="Legendary",B.Fabled="Fabled",B.Promo="Promo",B))(I||{}),O=(t=>(t.ArcaneRising="Arcane Rising",t.BrightLights="Bright Lights",t.CrucibleOfWar="Crucible of War",t.DuskTillDawn="Dusk till Dawn",t.Dynasty="Dynasty",t.Everfest="Everfest",t.HistoryPack1="History Pack 1",t.Monarch="Monarch",t.Outsiders="Outsiders",t.TalesOfAria="Tales of Aria",t.Uprising="Uprising",t.WelcomeToRathe="Welcome to Rathe",t.ArakniBlitzDeck="Arakni Blitz Deck",t.AzaleaBlitzDeck="Azalea Blitz Deck",t.BenjiBlitzDeck="Benji Blitz Deck",t.BoltynBlitzDeck="Boltyn Blitz Deck",t.BriarBlitzDeck="Briar Blitz Deck",t.BravoBlitzDeck="Bravo Blitz Deck",t.ChaneBlitzDeck="Chane Blitz Deck",t.ClassicBattlesRhinarDorinthea="Classic Battles: Rhinar vs Dorinthea",t.DromaiBlitzDeck="Dromai Blitz Deck",t.DorintheaHeroDeck="Dorinthea Hero Deck",t.FaiBlitzDeck="Fai Blitz Deck",t.IraWelcomeDeck="Ira Welcome Deck",t.KatsuBlitzDeck="Katsu Blitz Deck",t.KatsuHeroDeck="Katsu Hero Deck",t.LeviaBlitzDeck="Levia Blitz Deck",t.LexiBlitzDeck="Lexi Blitz Deck",t.OldhimBlitzDeck="Oldhim Blitz Deck",t.PrismBlitzDeck="Prism Blitz Deck",t.RhinarHeroDeck="Rhinar Hero Deck",t.RiptideBlitzDeck="Riptide Blitz Deck",t.RoundTheTable="Round the Table",t.UzuriBlitzDeck="Uzuri Blitz Deck",t.Promos="Promos",t))(O||{}),M=(D=>(D.Alpha="Alpha",D.First="First",D.Unlimited="Unlimited",D.Promo="Promo",D))(M||{}),E=(h=>(h.Royal="Royal",h.Draconic="Draconic",h.Earth="Earth",h.Elemental="Elemental",h.Ice="Ice",h.Light="Light",h.Lightning="Lightning",h.Shadow="Shadow",h))(E||{}),T=(s=>(s.Action="Action",s.AttackReaction="Attack Reaction",s.Block="Block",s.DefenseReaction="Defense Reaction",s.DemiHero="Demi-Hero",s.Equipment="Equipment",s.Hero="Hero",s.Instant="Instant",s.Mentor="Mentor",s.Resource="Resource",s.Token="Token",s.Weapon="Weapon",s))(T||{}),W=(i=>(i.OneHanded="1H",i.TwoHanded="2H",i.Affliction="Affliction",i.Ally="Ally",i.Angel="Angel",i.Arms="Arms",i.Arrow="Arrow",i.Ash="Ash",i.Attack="Attack",i.Aura="Aura",i.Axe="Axe",i.Base="Base",i.Book="Book",i.Bow="Bow",i.Chest="Chest",i.Claw="Claw",i.Club="Club",i.Construct="Construct",i.Dagger="Dagger",i.Demon="Demon",i.Dragon="Dragon",i.Evo="Evo",i.Fiddle="Fiddle",i.Figment="Figment",i.Flail="Flail",i.Gem="Gem",i.Gun="Gun",i.Hammer="Hammer",i.Head="Head",i.Invocation="Invocation",i.Item="Item",i.Landmark="Landmark",i.Lute="Lute",i.Legs="Legs",i.NonAttack="Non-Attack",i.OffHand="Off-Hand",i.Orb="Orb",i.Pistol="Pistol",i.Quiver="Quiver",i.Rock="Rock",i.Shuriken="Shuriken",i.Scepter="Scepter",i.Scythe="Scythe",i.Song="Song",i.Staff="Staff",i.Sword="Sword",i.Trap="Trap",i.Young="Young",i))(W||{}),U=(n=>(n.Arakni="Arakni",n.Azalea="Azalea",n.Benji="Benji",n.Boltyn="Boltyn",n.Bravo="Bravo",n.Brevant="Brevant",n.Briar="Briar",n.Chane="Chane",n.Dash="Dash",n.DataDoll="Data Doll",n.Dorinthea="Dorinthea",n.Dromai="Dromai",n.Emperor="Emperor",n.Fai="Fai",n.GenisWotchuneed="Genis Wotchuneed",n.Ira="Ira",n.Iyslander="Iyslander",n.Kano="Kano",n.Kassai="Kassai",n.Katsu="Katsu",n.Kavdaen="Kavdaen",n.Kayo="Kayo",n.Levia="Levia",n.Lexi="Lexi",n.Melody="Melody",n.Oldhim="Oldhim",n.ProfessorTeklovossen="Professor Teklovossen",n.Prism="Prism",n.Rhinar="Rhinar",n.Riptide="Riptide",n.Ruudi="Ruu\u2019di",n.Shiyana="Shiyana",n.Taipanis="Taipanis",n.Taylor="Taylor",n.Teklovossen="Teklovossen",n.Theryon="Theryon",n.Uzuri="Uzuri",n.Valda="Valda",n.Vynnset="Vynnset",n.Viserai="Viserai",n.Yorick="Yorick",n.Yoji="Yoji",n))(U||{}),G=(e=>(e.ArcaneBarrier="Arcane Barrier",e.Awaken="Awaken",e.Battleworn="Battleworn",e.BladeBreak="Blade Break",e.BloodDebt="Blood Debt",e.Boost="Boost",e.Channel="Channel",e.Charge="Charge",e.Combo="Combo",e.Contract="Contract",e.Crush="Crush",e.Dominate="Dominate",e.Ephemeral="Ephemeral",e.Essence="Essence",e.EvoUpgrade="Evo Upgrade",e.Freeze="Freeze",e.Fusion="Fusion",e.GoAgain="Go again",e.Heave="Heave",e.Intimidate="Intimidate",e.Legendary="Legendary",e.Material="Material",e.Mirage="Mirage",e.Negate="Negate",e.Opt="Opt",e.Overpower="Overpower",e.Pairs="Pairs",e.Piercing="Piercing",e.Phantasm="Phantasm",e.Protect="Protect",e.Quell="Quell",e.Reload="Reload",e.Reprise="Reprise",e.RuneGate="Rune Gate",e.Rupture="Rupture",e.Solflare="Solflare",e.Specialization="Specialization",e.Spectra="Spectra",e.Spellvoid="Spellvoid",e.Stealth="Stealth",e.Surge="Surge",e.Temper="Temper",e.Tower="Tower",e.Transform="Transform",e.Unfreeze="Unfreeze",e.Unity="Unity",e.Ward="Ward",e))(G||{});var j={wtr:"Welcome to Rathe",arc:"Arcane Rising",cru:"Crucible of War",mon:"Monarch",ele:"Tales of Aria",evr:"Everfest","1hp":"History Pack 1",hp1:"History Pack 1",upr:"Uprising",dyn:"Dynasty",out:"Outsiders",dtd:"Dusk till Dawn",evo:"Bright Lights"},R=v(f({},j),{ara:"Arakni Blitz Deck",azl:"Azalea Blitz Deck",ben:"Benji Blitz Deck",bol:"Boltyn Blitz Deck",bri:"Briar Blitz Deck",bvo:"Bravo Blitz Deck",chn:"Chane Blitz Deck",dro:"Dromai Blitz Deck",fai:"Fai Blitz Deck",kat:"Katsu Blitz Deck",lev:"Levia Blitz Deck",lxi:"Lexi Blitz Deck",old:"Oldhim Blitz Deck",psm:"Prism Blitz Deck",rip:"Riptide Blitz Deck",uzu:"Uzuri Blitz Deck",dvr:"Classic Battles: Rhinar vs Dorinthea",rvd:"Classic Battles: Rhinar vs Dorinthea",ira:"Ira Welcome Deck",tcc:"Round the Table",tea:"Dorinthea Hero Deck",ksu:"Katsu Hero Deck",rnr:"Rhinar Hero Deck",fab:"Promos",her:"Promos",jdg:"Promos",lgs:"Promos",lss:"Promos",oxo:"Promos",xxx:"Promos",win:"Promos"}),d={};for(let[r,a]of Object.entries(R)){let o=d[a];o?o.push(r):d[a]=[r]}var Z=d;0&&(module.exports={Class,Foiling,Format,Fusion,Hero,Keyword,Rarity,Release,ReleaseEdition,Subtype,Talent,Treatment,Type,fullSetIdentifiers,setIdentifierToSetMappings,setToSetIdentifierMappings});
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
export interface Card {
|
|
2
|
+
artists: string[];
|
|
3
|
+
cardIdentifier: string;
|
|
4
|
+
classes: Class[];
|
|
5
|
+
defaultImage: string;
|
|
6
|
+
name: string;
|
|
7
|
+
printings: Printing[];
|
|
8
|
+
rarities: Rarity[];
|
|
9
|
+
rarity: Rarity;
|
|
10
|
+
setIdentifiers: string[];
|
|
11
|
+
sets: Release[];
|
|
12
|
+
specialImage: string;
|
|
13
|
+
subtypes: Subtype[];
|
|
14
|
+
types: Type[];
|
|
15
|
+
typeText: string;
|
|
16
|
+
cost?: number;
|
|
17
|
+
defense?: number;
|
|
18
|
+
functionalText?: string;
|
|
19
|
+
fusions?: Fusion[];
|
|
20
|
+
life?: number;
|
|
21
|
+
hero?: Hero;
|
|
22
|
+
intellect?: number;
|
|
23
|
+
isCardBack?: boolean;
|
|
24
|
+
keywords?: Keyword[];
|
|
25
|
+
oppositeSideCardIdentifier?: string;
|
|
26
|
+
pitch?: number;
|
|
27
|
+
power?: number;
|
|
28
|
+
restrictedFormats?: Format[];
|
|
29
|
+
specialCost?: string;
|
|
30
|
+
specialDefense?: string;
|
|
31
|
+
specialPower?: string;
|
|
32
|
+
specializations?: Hero[];
|
|
33
|
+
talents?: Talent[];
|
|
34
|
+
young?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface Printing {
|
|
37
|
+
edition?: ReleaseEdition;
|
|
38
|
+
foiling?: Foiling;
|
|
39
|
+
identifier: string;
|
|
40
|
+
image: string;
|
|
41
|
+
set: Release;
|
|
42
|
+
treatment?: Treatment;
|
|
43
|
+
}
|
|
44
|
+
export declare enum Foiling {
|
|
45
|
+
C = "Cold",
|
|
46
|
+
G = "Gold",
|
|
47
|
+
R = "Rainbow"
|
|
48
|
+
}
|
|
49
|
+
export declare enum Treatment {
|
|
50
|
+
AB = "Alternate Border",
|
|
51
|
+
AA = "Alternate Art",
|
|
52
|
+
AT = "Alternate Text",
|
|
53
|
+
DS = "Double Sided",
|
|
54
|
+
EA = "Extended Art",
|
|
55
|
+
FA = "Full Art"
|
|
56
|
+
}
|
|
57
|
+
export declare enum Class {
|
|
58
|
+
NotClassed = "NotClassed",
|
|
59
|
+
Generic = "Generic",
|
|
60
|
+
Adjudicator = "Adjudicator",
|
|
61
|
+
Assassin = "Assassin",
|
|
62
|
+
Bard = "Bard",
|
|
63
|
+
Brute = "Brute",
|
|
64
|
+
Guardian = "Guardian",
|
|
65
|
+
Illusionist = "Illusionist",
|
|
66
|
+
Mechanologist = "Mechanologist",
|
|
67
|
+
Merchant = "Merchant",
|
|
68
|
+
Ninja = "Ninja",
|
|
69
|
+
Ranger = "Ranger",
|
|
70
|
+
Runeblade = "Runeblade",
|
|
71
|
+
Shapeshifter = "Shapeshifter",
|
|
72
|
+
Warrior = "Warrior",
|
|
73
|
+
Wizard = "Wizard"
|
|
74
|
+
}
|
|
75
|
+
export declare enum Format {
|
|
76
|
+
Blitz = "Blitz",
|
|
77
|
+
BlitzLivingLegend = "Blitz (Living Legend)",
|
|
78
|
+
Clash = "Clash",
|
|
79
|
+
ClassicConstructed = "Classic Constructed",
|
|
80
|
+
ClassicConstructedLivingLegend = "Classic Constructed (Living Legend)",
|
|
81
|
+
Commoner = "Commoner",
|
|
82
|
+
Draft = "Draft",
|
|
83
|
+
Open = "Open",
|
|
84
|
+
Sealed = "Sealed",
|
|
85
|
+
UltimatePitFight = "Ultimate Pit Fight"
|
|
86
|
+
}
|
|
87
|
+
export declare enum Fusion {
|
|
88
|
+
Earth = "Earth",
|
|
89
|
+
Ice = "Ice",
|
|
90
|
+
Lightning = "Lightning"
|
|
91
|
+
}
|
|
92
|
+
export declare enum Rarity {
|
|
93
|
+
Token = "Token",
|
|
94
|
+
Common = "Common",
|
|
95
|
+
Rare = "Rare",
|
|
96
|
+
SuperRare = "Super Rare",
|
|
97
|
+
Majestic = "Majestic",
|
|
98
|
+
Marvel = "Marvel",
|
|
99
|
+
Legendary = "Legendary",
|
|
100
|
+
Fabled = "Fabled",
|
|
101
|
+
Promo = "Promo"
|
|
102
|
+
}
|
|
103
|
+
export declare enum Release {
|
|
104
|
+
ArcaneRising = "Arcane Rising",
|
|
105
|
+
BrightLights = "Bright Lights",
|
|
106
|
+
CrucibleOfWar = "Crucible of War",
|
|
107
|
+
DuskTillDawn = "Dusk till Dawn",
|
|
108
|
+
Dynasty = "Dynasty",
|
|
109
|
+
Everfest = "Everfest",
|
|
110
|
+
HistoryPack1 = "History Pack 1",
|
|
111
|
+
Monarch = "Monarch",
|
|
112
|
+
Outsiders = "Outsiders",
|
|
113
|
+
TalesOfAria = "Tales of Aria",
|
|
114
|
+
Uprising = "Uprising",
|
|
115
|
+
WelcomeToRathe = "Welcome to Rathe",
|
|
116
|
+
ArakniBlitzDeck = "Arakni Blitz Deck",
|
|
117
|
+
AzaleaBlitzDeck = "Azalea Blitz Deck",
|
|
118
|
+
BenjiBlitzDeck = "Benji Blitz Deck",
|
|
119
|
+
BoltynBlitzDeck = "Boltyn Blitz Deck",
|
|
120
|
+
BriarBlitzDeck = "Briar Blitz Deck",
|
|
121
|
+
BravoBlitzDeck = "Bravo Blitz Deck",
|
|
122
|
+
ChaneBlitzDeck = "Chane Blitz Deck",
|
|
123
|
+
ClassicBattlesRhinarDorinthea = "Classic Battles: Rhinar vs Dorinthea",
|
|
124
|
+
DromaiBlitzDeck = "Dromai Blitz Deck",
|
|
125
|
+
DorintheaHeroDeck = "Dorinthea Hero Deck",
|
|
126
|
+
FaiBlitzDeck = "Fai Blitz Deck",
|
|
127
|
+
IraWelcomeDeck = "Ira Welcome Deck",
|
|
128
|
+
KatsuBlitzDeck = "Katsu Blitz Deck",
|
|
129
|
+
KatsuHeroDeck = "Katsu Hero Deck",
|
|
130
|
+
LeviaBlitzDeck = "Levia Blitz Deck",
|
|
131
|
+
LexiBlitzDeck = "Lexi Blitz Deck",
|
|
132
|
+
OldhimBlitzDeck = "Oldhim Blitz Deck",
|
|
133
|
+
PrismBlitzDeck = "Prism Blitz Deck",
|
|
134
|
+
RhinarHeroDeck = "Rhinar Hero Deck",
|
|
135
|
+
RiptideBlitzDeck = "Riptide Blitz Deck",
|
|
136
|
+
RoundTheTable = "Round the Table",
|
|
137
|
+
UzuriBlitzDeck = "Uzuri Blitz Deck",
|
|
138
|
+
Promos = "Promos"
|
|
139
|
+
}
|
|
140
|
+
export declare enum ReleaseEdition {
|
|
141
|
+
Alpha = "Alpha",
|
|
142
|
+
First = "First",
|
|
143
|
+
Unlimited = "Unlimited",
|
|
144
|
+
Promo = "Promo"
|
|
145
|
+
}
|
|
146
|
+
export declare enum Talent {
|
|
147
|
+
Royal = "Royal",
|
|
148
|
+
Draconic = "Draconic",
|
|
149
|
+
Earth = "Earth",
|
|
150
|
+
Elemental = "Elemental",
|
|
151
|
+
Ice = "Ice",
|
|
152
|
+
Light = "Light",
|
|
153
|
+
Lightning = "Lightning",
|
|
154
|
+
Shadow = "Shadow"
|
|
155
|
+
}
|
|
156
|
+
export declare enum Type {
|
|
157
|
+
Action = "Action",
|
|
158
|
+
AttackReaction = "Attack Reaction",
|
|
159
|
+
Block = "Block",
|
|
160
|
+
DefenseReaction = "Defense Reaction",
|
|
161
|
+
DemiHero = "Demi-Hero",
|
|
162
|
+
Equipment = "Equipment",
|
|
163
|
+
Hero = "Hero",
|
|
164
|
+
Instant = "Instant",
|
|
165
|
+
Mentor = "Mentor",
|
|
166
|
+
Resource = "Resource",
|
|
167
|
+
Token = "Token",
|
|
168
|
+
Weapon = "Weapon"
|
|
169
|
+
}
|
|
170
|
+
export declare enum Subtype {
|
|
171
|
+
OneHanded = "1H",
|
|
172
|
+
TwoHanded = "2H",
|
|
173
|
+
Affliction = "Affliction",
|
|
174
|
+
Ally = "Ally",
|
|
175
|
+
Angel = "Angel",
|
|
176
|
+
Arms = "Arms",
|
|
177
|
+
Arrow = "Arrow",
|
|
178
|
+
Ash = "Ash",
|
|
179
|
+
Attack = "Attack",
|
|
180
|
+
Aura = "Aura",
|
|
181
|
+
Axe = "Axe",
|
|
182
|
+
Base = "Base",
|
|
183
|
+
Book = "Book",
|
|
184
|
+
Bow = "Bow",
|
|
185
|
+
Chest = "Chest",
|
|
186
|
+
Claw = "Claw",
|
|
187
|
+
Club = "Club",
|
|
188
|
+
Construct = "Construct",
|
|
189
|
+
Dagger = "Dagger",
|
|
190
|
+
Demon = "Demon",
|
|
191
|
+
Dragon = "Dragon",
|
|
192
|
+
Evo = "Evo",
|
|
193
|
+
Fiddle = "Fiddle",
|
|
194
|
+
Figment = "Figment",
|
|
195
|
+
Flail = "Flail",
|
|
196
|
+
Gem = "Gem",
|
|
197
|
+
Gun = "Gun",
|
|
198
|
+
Hammer = "Hammer",
|
|
199
|
+
Head = "Head",
|
|
200
|
+
Invocation = "Invocation",
|
|
201
|
+
Item = "Item",
|
|
202
|
+
Landmark = "Landmark",
|
|
203
|
+
Lute = "Lute",
|
|
204
|
+
Legs = "Legs",
|
|
205
|
+
NonAttack = "Non-Attack",
|
|
206
|
+
OffHand = "Off-Hand",
|
|
207
|
+
Orb = "Orb",
|
|
208
|
+
Pistol = "Pistol",
|
|
209
|
+
Quiver = "Quiver",
|
|
210
|
+
Rock = "Rock",
|
|
211
|
+
Shuriken = "Shuriken",
|
|
212
|
+
Scepter = "Scepter",
|
|
213
|
+
Scythe = "Scythe",
|
|
214
|
+
Song = "Song",
|
|
215
|
+
Staff = "Staff",
|
|
216
|
+
Sword = "Sword",
|
|
217
|
+
Trap = "Trap",
|
|
218
|
+
Young = "Young"
|
|
219
|
+
}
|
|
220
|
+
export declare enum Hero {
|
|
221
|
+
Arakni = "Arakni",
|
|
222
|
+
Azalea = "Azalea",
|
|
223
|
+
Benji = "Benji",
|
|
224
|
+
Boltyn = "Boltyn",
|
|
225
|
+
Bravo = "Bravo",
|
|
226
|
+
Brevant = "Brevant",
|
|
227
|
+
Briar = "Briar",
|
|
228
|
+
Chane = "Chane",
|
|
229
|
+
Dash = "Dash",
|
|
230
|
+
DataDoll = "Data Doll",
|
|
231
|
+
Dorinthea = "Dorinthea",
|
|
232
|
+
Dromai = "Dromai",
|
|
233
|
+
Emperor = "Emperor",
|
|
234
|
+
Fai = "Fai",
|
|
235
|
+
GenisWotchuneed = "Genis Wotchuneed",
|
|
236
|
+
Ira = "Ira",
|
|
237
|
+
Iyslander = "Iyslander",
|
|
238
|
+
Kano = "Kano",
|
|
239
|
+
Kassai = "Kassai",
|
|
240
|
+
Katsu = "Katsu",
|
|
241
|
+
Kavdaen = "Kavdaen",
|
|
242
|
+
Kayo = "Kayo",
|
|
243
|
+
Levia = "Levia",
|
|
244
|
+
Lexi = "Lexi",
|
|
245
|
+
Melody = "Melody",
|
|
246
|
+
Oldhim = "Oldhim",
|
|
247
|
+
ProfessorTeklovossen = "Professor Teklovossen",
|
|
248
|
+
Prism = "Prism",
|
|
249
|
+
Rhinar = "Rhinar",
|
|
250
|
+
Riptide = "Riptide",
|
|
251
|
+
Ruudi = "Ruu\u2019di",
|
|
252
|
+
Shiyana = "Shiyana",
|
|
253
|
+
Taipanis = "Taipanis",
|
|
254
|
+
Taylor = "Taylor",
|
|
255
|
+
Teklovossen = "Teklovossen",
|
|
256
|
+
Theryon = "Theryon",
|
|
257
|
+
Uzuri = "Uzuri",
|
|
258
|
+
Valda = "Valda",
|
|
259
|
+
Vynnset = "Vynnset",
|
|
260
|
+
Viserai = "Viserai",
|
|
261
|
+
Yorick = "Yorick",
|
|
262
|
+
Yoji = "Yoji"
|
|
263
|
+
}
|
|
264
|
+
export declare enum Keyword {
|
|
265
|
+
ArcaneBarrier = "Arcane Barrier",
|
|
266
|
+
Awaken = "Awaken",
|
|
267
|
+
Battleworn = "Battleworn",
|
|
268
|
+
BladeBreak = "Blade Break",
|
|
269
|
+
BloodDebt = "Blood Debt",
|
|
270
|
+
Boost = "Boost",
|
|
271
|
+
Channel = "Channel",
|
|
272
|
+
Charge = "Charge",
|
|
273
|
+
Combo = "Combo",
|
|
274
|
+
Contract = "Contract",
|
|
275
|
+
Crush = "Crush",
|
|
276
|
+
Dominate = "Dominate",
|
|
277
|
+
Ephemeral = "Ephemeral",
|
|
278
|
+
Essence = "Essence",
|
|
279
|
+
EvoUpgrade = "Evo Upgrade",
|
|
280
|
+
Freeze = "Freeze",
|
|
281
|
+
Fusion = "Fusion",
|
|
282
|
+
GoAgain = "Go again",
|
|
283
|
+
Heave = "Heave",
|
|
284
|
+
Intimidate = "Intimidate",
|
|
285
|
+
Legendary = "Legendary",
|
|
286
|
+
Material = "Material",
|
|
287
|
+
Mirage = "Mirage",
|
|
288
|
+
Negate = "Negate",
|
|
289
|
+
Opt = "Opt",
|
|
290
|
+
Overpower = "Overpower",
|
|
291
|
+
Pairs = "Pairs",
|
|
292
|
+
Piercing = "Piercing",
|
|
293
|
+
Phantasm = "Phantasm",
|
|
294
|
+
Protect = "Protect",
|
|
295
|
+
Quell = "Quell",
|
|
296
|
+
Reload = "Reload",
|
|
297
|
+
Reprise = "Reprise",
|
|
298
|
+
RuneGate = "Rune Gate",
|
|
299
|
+
Rupture = "Rupture",
|
|
300
|
+
Solflare = "Solflare",
|
|
301
|
+
Specialization = "Specialization",
|
|
302
|
+
Spectra = "Spectra",
|
|
303
|
+
Spellvoid = "Spellvoid",
|
|
304
|
+
Stealth = "Stealth",
|
|
305
|
+
Surge = "Surge",
|
|
306
|
+
Temper = "Temper",
|
|
307
|
+
Tower = "Tower",
|
|
308
|
+
Transform = "Transform",
|
|
309
|
+
Unfreeze = "Unfreeze",
|
|
310
|
+
Unity = "Unity",
|
|
311
|
+
Ward = "Ward"
|
|
312
|
+
}
|
package/dist/sets.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Release } from "./interfaces";
|
|
2
|
+
export declare const fullSetIdentifiers: {
|
|
3
|
+
wtr: Release;
|
|
4
|
+
arc: Release;
|
|
5
|
+
cru: Release;
|
|
6
|
+
mon: Release;
|
|
7
|
+
ele: Release;
|
|
8
|
+
evr: Release;
|
|
9
|
+
"1hp": Release;
|
|
10
|
+
hp1: Release;
|
|
11
|
+
upr: Release;
|
|
12
|
+
dyn: Release;
|
|
13
|
+
out: Release;
|
|
14
|
+
dtd: Release;
|
|
15
|
+
evo: Release;
|
|
16
|
+
};
|
|
17
|
+
export declare const setIdentifierToSetMappings: {
|
|
18
|
+
[key: string]: Release;
|
|
19
|
+
};
|
|
20
|
+
export declare const setToSetIdentifierMappings: {
|
|
21
|
+
[key: string]: string[];
|
|
22
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@flesh-and-blood/types",
|
|
3
|
+
"description": "TypeScript representations of Flesh and Blood card types",
|
|
4
|
+
"version": "0.0.3",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"scripts": {
|
|
9
|
+
"prebuild": "rm -rf dist",
|
|
10
|
+
"build": "esbuild ./src/index.ts --outdir=dist --bundle --minify --platform=node --target=es6",
|
|
11
|
+
"postbuild": "tsc --declaration",
|
|
12
|
+
"test": "jest",
|
|
13
|
+
"full": "npm run test && npm run build",
|
|
14
|
+
"prepublish": "npm run full"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/jest": "^29.5.4",
|
|
18
|
+
"@types/node": "^20.6.0",
|
|
19
|
+
"@types/papaparse": "5.3.8",
|
|
20
|
+
"chalk": "^4.1.2",
|
|
21
|
+
"esbuild": "^0.19.2",
|
|
22
|
+
"esbuild-jest": "^0.5.0",
|
|
23
|
+
"fab-cards": "^8.0.142",
|
|
24
|
+
"fast-xml-parser": "^4.2.7",
|
|
25
|
+
"jest": "^29.7.0",
|
|
26
|
+
"papaparse": "5.3.2",
|
|
27
|
+
"ts-node": "^10.9.1",
|
|
28
|
+
"typescript": "^5.2.2"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"/dist"
|
|
32
|
+
],
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/fabrary/fab-cards.git"
|
|
39
|
+
},
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/fabrary/fab-cards/issues"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/fabrary/fab-cards#readme",
|
|
44
|
+
"author": "Phillip Manwaring",
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"keywords": [
|
|
47
|
+
"Flesh and Blood",
|
|
48
|
+
"FAB",
|
|
49
|
+
"FABTCG"
|
|
50
|
+
],
|
|
51
|
+
"gitHead": "2f444ec7d273fc6fc5b0d2e4280638193bf4ff01"
|
|
52
|
+
}
|