-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
80 lines (77 loc) · 1.69 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import type { PokemonTCG } from "npm:pokemon-tcg-sdk-typescript";
// re-export
export type Ability = PokemonTCG.Ability;
export type Attack = PokemonTCG.Attack;
// overrides
export type Card =
& Pick<
PokemonTCG.Card,
| "id"
| "name"
//| "supertype"
//| "subtypes"
| "hp"
//| "types"
| "evolvesFrom"
| "evolvesTo"
| "rules"
| "abilities"
| "attacks"
| "weaknesses"
| "retreatCost"
| "convertedRetreatCost"
| "number"
| "artist"
//| "rarity"
| "flavorText"
| "nationalPokedexNumbers"
| "images"
>
& {
supertype: Supertype;
subtypes: Subtype[];
types: Type[];
rarity: Rarity;
};
export enum Rarity {
Common = "Common", // 1 Diamond
Uncommon = "Uncommon", // 2 Diamonds
Rare = "Rare", // 3 Diamonds
RareDouble = "Rare Double", // 4 Diamonds
RareIllustration = "Rare Illustration", // 1 Star
RareSuper = "Rare Super", // 2 Stars
RareSpecialIllustration = "Rare Special Illustration", // 2 Stars
Immersive = "Immersive", // 3 Stars
RareUltra = "Rare Ultra", // 1 Crown
Promo = "Promo", // Promo
}
export enum Supertype {
Pokemon = "Pok\u00E9mon",
Trainer = "Trainer",
}
export enum Subtype {
Basic = "Basic",
EX = "EX",
Item = "Item",
StageOne = "Stage 1",
StageTwo = "Stage 2",
Supporter = "Supporter",
}
export enum Type {
Grass = "Grass",
Fire = "Fire",
Water = "Water",
Lightning = "Lightning",
Psychic = "Psychic",
Fighting = "Fighting",
Darkness = "Darkness",
Metal = "Metal",
Dragon = "Dragon",
Colorless = "Colorless",
}
// custom
export type SetCardList = {
set: string;
setId: string;
cards: { name: string; number: string; setIndex: string }[];
};