Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add decks support #116

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions data/Base/Base Set 2/Decks/Grass Chopper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Base Set 2"

const deck: Deck = {
id: "td.base4.gc",
name: {
en: "Grass Chopper"
},
set: Set,
typesFocus: ["Fighting", "Grass"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Base Set 2/Decks/Hot Water.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Base Set 2"

const deck: Deck = {
id: "td.base4.hw",
name: {
en: "Hot Water"
},
set: Set,
typesFocus: ["Fire", "Water"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Base Set 2/Decks/Lightning Bug.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Base Set 2"

const deck: Deck = {
id: "td.base4.lg",
name: {
en: "Lightning Bug"
},
set: Set,
typesFocus: ["Lightning", "Grass"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Base Set 2/Decks/Psych Out.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Base Set 2"

const deck: Deck = {
id: "td.base4.po",
name: {
en: "Psych Out"
},
set: Set,
typesFocus: ["Psychic", "Water"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Base Set/decks/Blackout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Base Set"

const deck: Deck = {
id: "td.base1.bl",
name: {
en: "Blackout"
},
set: Set,
typesFocus: ["Water", "Fighting"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Base Set/decks/Brushfire.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Base Set"

const deck: Deck = {
id: "td.base1.br",
name: {
en: "Brushfire"
},
set: Set,
typesFocus: ["Fire", "Grass"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Base Set/decks/Overgrowth.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Base Set"

const deck: Deck = {
id: "td.base1.ov",
name: {
en: "Overgrowth"
},
set: Set,
typesFocus: ["Water", "Grass"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Base Set/decks/Zap!.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Base Set"

const deck: Deck = {
id: "td.base1.za",
name: {
en: "Zap!"
},
set: Set,
typesFocus: ["Lightning", "Psychic"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Fossil/Decks/BodyGuard.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Fossil"

const deck: Deck = {
id: "td.base1.bd",
name: {
en: "BodyGuard"
},
set: Set,
typesFocus: ["Grass", "Fighting"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Fossil/Decks/LockDown.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Base Set"

const deck: Deck = {
id: "td.base1.ld",
name: {
en: "LockDown"
},
set: Set,
typesFocus: ["Fire", "Water"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Jungle/decks/Power Reserve.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Jungle"

const deck: Deck = {
id: "td.base2.pr",
name: {
en: "Power Reserve"
},
set: Set,
typesFocus: ["Psychic", "Grass"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Jungle/decks/Water Blast.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Jungle"

const deck: Deck = {
id: "td.base2.wb",
name: {
en: "Water Blast"
},
set: Set,
typesFocus: ["Water", "Fighting"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Team Rocket/decks/Devastation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Team Rocket"

const deck: Deck = {
id: "td.base4.de",
name: {
en: "Devastation"
},
set: Set,
typesFocus: ["Grass", "Water"],
cards: []
}

export default deck
14 changes: 14 additions & 0 deletions data/Base/Team Rocket/decks/Grass Chopper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Deck } from "../../../../interfaces"
import Set from "../../Team Rocket"

const deck: Deck = {
id: "td.base4.to",
name: {
en: "Trouble"
},
set: Set,
typesFocus: ["Psychic", "Grass"],
cards: []
}

export default deck
40 changes: 40 additions & 0 deletions data/Black & White/Noble Victories/Decks/Fast Daze.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { Deck } from '../../../../interfaces'
import Set from "../../Noble Victories"

const deck: Deck = {
id: 'td.bw3.fd',
name: {
en: 'Fast Daze'
},
set: Set,
typesFocus: ['Fire', 'Grass'],
cards: [
{ id: 'bw3-12', variant: 'holo' },
'bw3-12',
{ id: 'bw3-11', quantity: 4 },
'bw3-3',
{ id: 'bw3-2', quantity: 2 },
{ id: 'bw3-1', quantity: 3 },
'bw3-5',
{ id: 'bw3-4', quantity: 2 },
{ id: 'bw3-7', quantity: 2 },
{ id: 'bw3-6', quantity: 2 },
{ id: 'bw3-9', quantity: 3 },
'bw3-21',
{ id: 'bw3-21', quantity: 2 },
{ id: 'bw3-17', quantity: 2 },
{ id: 'bw3-16', quantity: 2 },
{ id: 'bw3-7', quantity: 2 },
{ id: 'bw1-93', quantity: 2 },
{ id: 'bw1-100', quantity: 2 },
{ id: 'bw2-91', quantity: 2 },
{ id: 'bw2-91', quantity: 2 },
'bw3-92',
{ id: 'bw1-99', quantity: 2 },
{ id: 'bw3-95', quantity: 2 },
{ id: 'bw1-105', quantity: 12 },
{ id: 'bw1-106', quantity: 6 }
]
}

export default deck
21 changes: 21 additions & 0 deletions interfaces.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,24 @@ export interface Filter {
cards: Array<string>
}
}

export interface Deck {
id: `td.${string}.${string}`
set: Set
name: Languages
typesFocus: Array<Types>
cards: Array<{
/**
* Card Global ID
*/
id: string
/**
* Card quantity in the deck
*/
quantity?: number
/**
* Card variant
*/
variant?: keyof Omit<variants, 'normal' | 'firstEdition'>
} | string>
}