-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.d.ts
180 lines (161 loc) · 4 KB
/
index.d.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
declare class Card {
id: number
ot: number
alias?: number
setcode: number
declare class: number
category: number
name: string
desc: string
originLevel?: number
level?: number
pendulumScale: number
linkMarkers: Array<boolean> | null
linkNumber: number | null
race?: number
atribute?: number
atk?: number
def?: number
static deckSortLevel(p1: Card, p2: Card): number
static numText(num: number): string
attributeText(): string
raceText(): string
typeText(): string
atkText(): string
defText(): string
isAlias: boolean
isOcg: boolean
isTcg: boolean
isEx: boolean
isTypeMonster: boolean
isTypeSpell: boolean
isTypeTrap: boolean
isTypeNormal: boolean
isTypeEffect: boolean
isTypeFusion: boolean
isTypeRitual: boolean
isTypeTrapMonster: boolean
isTypeSpirit: boolean
isTypeUnion: boolean
isTypeDual: boolean
isTypeTuner: boolean
isTypeSynchro: boolean
isTypeToken: boolean
isTypeQuickplay: boolean
isTypeContinuous: boolean
isTypeEquip: boolean
isTypeField: boolean
isTypeCounter: boolean
isTypeFlip: boolean
isTypeToon: boolean
isTypeXyz: boolean
isTypePendulum: boolean
isTypeSpsummon: boolean
isTypeLink: boolean
isAttributeEarth: boolean
isAttributeWater: boolean
isAttributeFire: boolean
isAttributeWind: boolean
isAttributeLight: boolean
isAttributeDark: boolean
isAttributeDevine: boolean
isRaceWarrior: boolean
isRaceSpellcaster: boolean
isRaceFairy: boolean
isRaceFend: boolean
isRaceZombie: boolean
isRaceMachine: boolean
isRaceAqua: boolean
isRacePyro: boolean
isRaceRock: boolean
isRaceWindbeast: boolean
isRacePlant: boolean
isRaceInsect: boolean
isRaceThunder: boolean
isRaceDragon: boolean
isRaceBeast: boolean
isRaceBeastWarrior: boolean
isRaceDinosaur: boolean
isRaceFish: boolean
isRaceSeaeprent: boolean
isRaceReptile: boolean
isRacePsychro: boolean
isRaceDevine: boolean
isRaceCreatorgod: boolean
isRaceWyrm: boolean
isRaceCybers: boolean
}
type CardorId = Card | number;
declare class Deck {
main: Array<CardorId>
side: Array<CardorId>
ex: Array<CardorId>
classifiedMain: {CardorId: number}
classifiedSide: {CardorId: number}
classifiedEx: {CardorId: number}
form: 'id' | 'card'
classify(): Deck
separateExFromMain(): Deck
tranFromToCards(): Deck
transformToID(): Deck
static fromString(content: string): Deck
static toString(): string
}
declare type __Environment = {
new(local: string): __Environment
main: Array<number>
sets: Array<Set>
cards: Record<number, Card>
loadAllCards() : void
searchCardByName(name: string): Array<number>
getCardByName(name: string): Card | null
}
declare type _Environment = Record<string, __Environment> & __Environment
declare var Environment : _Environment
declare class replayHeader {
static replayCompressedFlag: number
static replayTagFlag: number
static replayDecodedFlag: number
static replaySinglMode: number
static replayUniform: number
dataSize: number
isTag: boolean
isCompressed: boolean
}
declare class Replay {
static fromFile(filePath: string): Replay
static fromBuffer(buffer: Buffer): Replay
header: replayHeader
hostName: string
clientName: string
startLp: number
startHand: number
drawCount: number
opt: number
hostDeck: Deck
clientDeck: Deck
decks: Array<Deck>
isTag: boolean
tagHostName?: string
tagClientName?: string
tagHostDeck?: Deck
tagClientDeck?: Deck
toBuffer(): Buffer
writeToFile(file: string): void
}
declare class Set {
number: number
name: string
originName: string
ids: Array<number>
includes(id: Card | number): boolean
separateOriginNameFromName(): true
}
export {
Deck,
Environment,
Card,
replayHeader,
Replay,
Set,
}