-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
154 lines (138 loc) · 3.22 KB
/
types.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
declare global {
interface Book {
id: number;
title: string;
code: string;
serie: string;
disciplines: number;
randomNumberTable: number[][];
data: Data;
actionChart: ActionChart;
combat: Combat;
history: SectionHistory[];
isInitialized: boolean;
isStarted: boolean;
}
interface Data {
dedication: GenericSection;
acknowledgements: GenericSection;
theStorySoFar: GenericSection;
theGameRules: GenericSection;
kaiDisciplines: GenericSection;
equipment: GenericSection;
combatRules: GenericSection;
kaiLevels: GenericSection;
loreCircles: GenericSection;
improvedDisciplines: GenericSection;
kaiWisdom: GenericSection;
kaiMap: GenericSection;
numberedSections: GenericSection[];
license: GenericSection;
}
interface ActionChart {
combatSkill: number;
maxCombatSkill: number;
endurance: number;
maxEndurance: number;
beltPouch: number;
meals: number;
kaiDisciplines: {
kaiDiscipline1: string;
kaiDiscipline2: string;
kaiDiscipline3: string;
kaiDiscipline4: string;
kaiDiscipline5: string;
kaiDiscipline6: string;
kaiDiscipline7: string;
kaiDiscipline8: string;
kaiDiscipline9: string;
};
weapons: {
weapon1: string;
weapon2: string;
};
backpackItems: {
backpackItem1: string;
backpackItem2: string;
backpackItem3: string;
backpackItem4: string;
backpackItem5: string;
backpackItem6: string;
backpackItem7: string;
backpackItem8: string;
};
specialItems: {
specialItem1: string;
specialItem2: string;
specialItem3: string;
specialItem4: string;
specialItem5: string;
specialItem6: string;
specialItem7: string;
specialItem8: string;
specialItem9: string;
specialItem10: string;
specialItem11: string;
specialItem12: string;
};
notes: string;
}
interface GenericSection {
id: string;
paragraphs: Paragraph[];
}
interface Paragraph {
id: number;
type: "text" | "header-1" | "header-2" | "header-3" | "image";
text: string;
}
interface ComponentPart {
isComponent: true;
componentName: string;
props: Record<string, string>;
}
interface TextPart {
isComponent: false;
text: string;
}
type ContentPart = ComponentPart | TextPart;
interface SectionHistory {
id: number;
name: string;
path: string;
timestamp: string;
}
interface Combat {
name: string;
inProgress: boolean;
isEvading: boolean;
loneWolfCombatSkill: number;
enemyCombatSkill: number;
combatRatio: number;
boundedCombatRatio: number;
steps: Step[];
}
interface Step {
id: number;
loneWolfEndurance: number;
enemyEndurance: number;
randomNumber: number | null;
}
interface CombatResult {
enemyLoss: number | "k";
lonewolfLoss: number | "k";
}
interface CombatResultsRow {
[combatRatio: number]: CombatResult;
}
interface CombatResultsTable {
[randomNumber: number]: CombatResultsRow;
}
interface StorageConfig {
storeName: string;
}
interface CacheData {
[key: string]: any;
}
}
export {};