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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
|
let fs = require("fs")
let data = {}
// Factions
const DS = 0
const BK = 1
const VE = 2
const MI = 3
// Pieces
const DISC = 0
const ELITE = 1
const TROOPS = 2
// Creating cards
const IMAP = { D: DS, B: BK, V: VE }
let order = []
data.card_title = [ null ]
data.card_order = [ null ]
data.card_flavor = []
data.card_flavor_shaded = []
function def_order(s) {
order = [ IMAP[s[0]], IMAP[s[1]], IMAP[s[2]] ]
}
function def_card(number, name) {
data.card_title[number] = name
data.card_order[number] = order
}
function flavor(id, unshaded, shaded) {
id = parseInt(id)
if (unshaded)
data.card_flavor[id] = unshaded
if (shaded)
data.card_flavor_shaded[id] = shaded
}
def_order("BDV")
def_card(3, "Diamond Mines of Golconda")
def_card(10, "Capital Relocated")
def_card(15, "Uprising in Daulatabad")
def_card(19, "Bengali Resistance")
def_card(29, "Ashvapati, Lord of Horses")
def_card(30, "Bara Gazi Toph")
def_order("BVD")
def_card(16, "Gulbarga Fort")
def_card(17, "Sufi Shaikh Relocates")
def_card(18, "Center of High Culture")
def_card(28, "The Turquoise Throne")
def_card(31, "The Raichur Doab")
def_card(35, "Hindu-Muslim Marriages")
def_order("DBV")
def_card(1, "Malik Kafur")
def_card(2, "Mongol Army Repelled")
def_card(8, "Yadava Kingdom Annexed")
def_card(11, "Hindu Kush Mountains")
def_card(20, "Eastern Ganga Dynasty")
def_card(21, "Vindhya Range")
def_order("DVB")
def_card(4, "Ears of the Sultan")
def_card(6, "Siege of Warangal")
def_card(7, "The Conquest of Madurai")
def_card(9, "Kakatiya Empire Extinguished")
def_card(22, "A New Calculus")
def_card(27, "Taghi the Elusive")
def_order("VBD")
def_card(13, "Sage of Vidyaranya")
def_card(14, "Last Great King of the Hoysalas")
def_card(25, "Empire Building")
def_card(26, "Of Gods and Kings")
def_card(32, "The Hare and the Hounds")
def_card(33, "Commercial Port of Goa")
def_order("VDB")
def_card(5, "Siege of Chittor")
def_card(12, "Musunuri Nayakas")
def_card(23, "Virupaksha Temple")
def_card(24, "Stone Temple Chariots")
def_card(34, "Bahmani Sultan Assassinated")
def_card(36, "Northern Alliances")
order = null
def_card(37, "Mongol Invasion")
def_card(38, "Mongol Invasion")
def_card(39, "Mongol Invasion")
def_card(40, "Mongol Invasion")
def_card(41, "Mongol Invasion")
def_card(42, "Mongol Invasion")
def_card(43, "Timurid Empire")
def_card(44, "Timurid Empire")
def_card(45, "Zenith of the Delhi Sultanate")
def_card(46, "Rise of the Rebel Sultans")
def_card(47, "Lords of the Deccan")
flavor("1. Malik Kafur", "General assassinated, power struggle ensues", "Favored slave-general brilliant in battle")
flavor("2. Mongol Army Repelled", "Pyrrhic victory", "Sultan’s mercenary army victorious")
flavor("3. Diamond Mines of Golconda", "Untold riches lie just beneath the surface", "Sultan’s oppressive taxation")
flavor("4. Ears of the Sultan", "Sultan’s plans intercepted", "Network of spies covers the Deccan")
flavor("5. Siege of Chittor", "Hammir Singh reclaims a Rajput Kingdom", "Massacre at Chittor")
flavor("6. Siege of Warangal", "Continual looting encourages resistance", "Koh-i-Noor diamond among war spoils")
flavor("7. The Conquest of Madurai", "Tale of Madurai Sultan’s defeat chronicled in epic Sanskrit poem", "Sultan’s generals plunder Pandyan kingdom")
flavor("8. Yadava Kingdom Annexed", "Multi-ethnic polity seeds development", "Sultanate reclaims natural stronghold")
flavor("9. Kakatiya Empire Extinguished", "Telugu kingdom leaves a mythic legacy", "Sultanate tires of awaiting tribute")
flavor("10. Capital Relocated", "Political damage and chaos ensues as the Delhi elite is forced to migrate", "Sultan shortens his reach into the Deccan")
flavor("11. Hindu Kush Mountains", "Sultanate army perishes in the snow on a scheme of foreign conquest", "Grandiose schemes pay dividends")
flavor("12. Musunuri Nayakas", "“Warrior kings” rise in the shadow of the Kakatiya Empire", "Telugu warriors no match for siege technology from Central Asia")
flavor("13. Sage of Vidyaranya", "Meeting with revered jagadguru in Sringeri sparks a foundational myth", "Inferior military suffers early defeats")
flavor("14. Last Great King of the Hoysalas", "Vijayanagara emerges from the crumbling kingdom of Veera Ballala III", "Delhi’s armies plunder the Hoysala Capital")
flavor("15. Uprising in Daulatabad", "Delhi resentment reaches breaking point", "Commanders sentenced to death")
flavor("16. Gulbarga Fort", "Defenses expanded in the first Bahmani capital", "Bahmani Kingdom threatens control")
flavor("17. Sufi Shaikh Relocates", "Siraj-al-Din Junaidi takes up residence", "Relationships sour between Bahmani rulers and Sufi shaikhs")
flavor("18. Center of High Culture", "Bahmani Kingdom attracts great minds from afar; culture flourishes in the Deccan", "Divisions among Deccanis and newcomers")
flavor("19. Bengali Resistance", "Governors repeatedly assert independence", "Criminals conscripted to reclaim Bengal")
flavor("20. Eastern Ganga Dynasty", "Prosperous kingdom falls into decline", "Sultanate invades Orissa")
flavor("21. Vindhya Range", "Mountainous region provides a natural buffer from Delhi", "Long campaigns go unchallenged")
flavor("22. A New Calculus", "Madhava of Sangamagrama founds the Kerala School of Astronomy and Mathematics", "Narayana Pandita’s mathematical treatises offer new insights of immediate use")
flavor("23. Virupaksha Temple", "Temple to Shiva merges regional goddess cults", "Symbols of sovereignty destroyed")
flavor("24. Stone Temple Chariots", "Chariots carry representations of Puranic Hindu gods", "Cultural development draws interest")
flavor("25. Empire Building", "Lords of the Eastern and Western Oceans", "Sultan’s new roads thrust into the Deccan")
flavor("26. Of Gods and Kings", "Telugu poet Srinatha revolutionizes the craft and weaves the tapestry of an Empire, while Sufi devotional songs of Amir Khusrau praise the Sultans in Delhi", "")
flavor("27. Taghi the Elusive", "Fugitive rebel an expensive distraction", "The Sultan marches west in pursuit")
flavor("28. The Turquoise Throne", "Bahmanis cross the Krishna river into Telangana", "Telangana Nayakas implore allies to attack")
flavor("29. Ashvapati, Lord of Horses", "Bahmani rulers likened to Hindu god", "War horses and siege technology imported from overseas")
flavor("30. Bara Gazi Toph", "Gigantic cannons defend Bahmani forts", "Gunpowder and cannons appear suddenly in the subcontinent")
flavor("31. The Raichur Doab", "Repeated raids over fertile lands", "Massive casualties in both kingdoms")
flavor("32. The Hare and the Hounds", "Identical empire origin stories lean on regional cult mythologies", "Persian values inherited from Delhi")
flavor("33. Commercial Port of Goa", "Struggle for critical maritime routes", "Competition over ports boils over")
flavor("34. Bahmani Sultan Assassinated", "Vijayanagara captures Goa while the Bahmanis are destabilized", "Bahmani successor ushers in a period of social reform and cultural revival")
flavor("35. Hindu-Muslim Marriages", "Bahmani Sultan weds a Hindu bride", "Diffusion and dilution of culture")
flavor("36. Northern Alliances", "Vijayanagara probes an alliance with Delhi", "Alliance rejected")
// Defining spaces
data.spaces = [ ]
data.space_name = [ ]
function def_space(type, pop, name) {
data.spaces.push({ type, id: to_ascii(name), pop, adjacent: [] })
data.space_name.push(name)
}
function adjacent(an, bn) {
ax = data.space_name.indexOf(an)
bx = data.space_name.indexOf(bn)
add(data.spaces[ax].adjacent, bx)
add(data.spaces[bx].adjacent, ax)
}
def_space("province", 1, "Andhra")
def_space("province", 2, "Bengal")
def_space("province", 1, "Gondwana")
def_space("province", 2, "Gujarat")
def_space("province", 1, "Jaunpur")
def_space("province", 2, "Karnataka")
def_space("province", 1, "Madhyadesh")
def_space("province", 2, "Maharashtra")
def_space("province", 2, "Malwa")
def_space("province", 1, "Orissa")
def_space("province", 1, "Rajput Kingdoms")
def_space("province", 1, "Sindh")
def_space("province", 1, "Tamilakam")
def_space("capital", 0, "Delhi")
def_space("mongol", 0, "Mountain Passes")
def_space("mongol", 0, "Punjab")
def_space("holdbox", null, "MI_available")
def_space("holdbox", null, "DS_available")
def_space("holdbox", null, "BK_available")
def_space("holdbox", null, "VE_available")
def_space("holdbox", null, "BK_DI_2")
def_space("holdbox", null, "BK_DI_4")
def_space("holdbox", null, "VE_DI_1")
def_space("holdbox", null, "VE_DI_2")
def_space("holdbox", null, "VE_DI_3")
def_space("holdbox", null, "VE_DI_4")
adjacent("Andhra", "Gondwana")
adjacent("Andhra", "Karnataka")
adjacent("Andhra", "Madhyadesh")
adjacent("Andhra", "Maharashtra")
adjacent("Andhra", "Orissa")
adjacent("Andhra", "Tamilakam")
adjacent("Bengal", "Gondwana")
adjacent("Bengal", "Jaunpur")
adjacent("Bengal", "Orissa")
adjacent("Gondwana", "Jaunpur")
adjacent("Gondwana", "Madhyadesh")
adjacent("Gondwana", "Orissa")
adjacent("Gujarat", "Madhyadesh")
adjacent("Gujarat", "Maharashtra")
adjacent("Gujarat", "Malwa")
adjacent("Gujarat", "Rajput Kingdoms")
adjacent("Gujarat", "Sindh")
adjacent("Jaunpur", "Delhi")
adjacent("Jaunpur", "Malwa")
adjacent("Karnataka", "Maharashtra")
adjacent("Karnataka", "Tamilakam")
adjacent("Madhyadesh", "Malwa")
adjacent("Madhyadesh", "Maharashtra")
adjacent("Madhyadesh", "Orissa")
adjacent("Maharashtra", "Malwa")
adjacent("Malwa", "Delhi")
adjacent("Malwa", "Rajput Kingdoms")
adjacent("Rajput Kingdoms", "Delhi")
adjacent("Rajput Kingdoms", "Punjab")
adjacent("Rajput Kingdoms", "Sindh")
adjacent("Sindh", "Mountain Passes")
adjacent("Sindh", "Punjab")
adjacent("Punjab", "Delhi")
adjacent("Punjab", "Mountain Passes")
// Def cities
data.city = [ ]
data.city_name = [ ]
function def_city(name) {
data.city.push({ id: to_ascii(name), adjacent: [] })
data.city_name.push(name)
}
function adjacent_city(city, province) {
c = data.city_name.indexOf(city)
p = data.space_name.indexOf(province)
add(data.city[c].adjacent, p)
}
def_city("Chittor")
def_city("Devagiri")
def_city("Goa")
def_city("Gulbarga")
def_city("Vijayanagara")
def_city("Warangal")
adjacent_city("Chittor", "Gujarat")
adjacent_city("Chittor", "Malwa")
adjacent_city("Chittor", "Rajput Kingdoms")
adjacent_city("Devagiri", "Gujarat")
adjacent_city("Devagiri", "Madhyadesh")
adjacent_city("Devagiri", "Maharashtra")
adjacent_city("Devagiri", "Malwa")
adjacent_city("Goa", "Karnataka")
adjacent_city("Goa", "Maharashtra")
adjacent_city("Gulbarga", "Andhra")
adjacent_city("Gulbarga", "Madhyadesh")
adjacent_city("Gulbarga", "Maharashtra")
adjacent_city("Vijayanagara", "Andhra")
adjacent_city("Vijayanagara", "Karnataka")
adjacent_city("Vijayanagara", "Maharashtra")
adjacent_city("Warangal", "Andhra")
adjacent_city("Warangal", "Gondwana")
adjacent_city("Warangal", "Madhyadesh")
adjacent_city("Warangal", "Orissa")
// Pieces numbers
function def_piece(faction, type, count) {
if (count == 0) {
data.first_piece[faction][type] = null
data.last_piece[faction][type] = null
} else {
data.first_piece[faction][type] = pc_index
data.last_piece[faction][type] = pc_index + count - 1
pc_index += count
}
}
pc_index = 0
data.first_piece = [ [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0] ]
data.last_piece = [ [-1, -1, -1], [-1, -1, -1], [-1, -1, -1], [-1, -1, -1] ]
def_piece(DS, DISC, 5)
def_piece(DS, ELITE, 5)
def_piece(DS, TROOPS, 32)
def_piece(BK, DISC, 5)
def_piece(BK, ELITE, 18)
def_piece(BK, TROOPS, 0)
def_piece(VE, DISC, 5)
def_piece(VE, ELITE, 22)
def_piece(VE, TROOPS, 0)
def_piece(MI, DISC, 0)
def_piece(MI, ELITE, 0)
def_piece(MI, TROOPS, 12)
// Tools
function add(list, item) {
if (!list.includes(item))
list.push(item)
}
function to_ascii(s) {
return s.normalize("NFD").replace(/[\u0300-\u036f]/g, "")
}
// Output data file
fs.writeFileSync("data.js", "const data = " + JSON.stringify(data, 0, 0) + "\nif (typeof module !== 'undefined') module.exports = data\n")
|