-
Notifications
You must be signed in to change notification settings - Fork 6
/
research.js
621 lines (603 loc) · 19.3 KB
/
research.js
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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
function defineTech() {
// General Technological Level of the Empire
research['tech'] = [
{
name: 'Simple Handtools',
description: "Knowledge of how to construct simple hand tools. Congratulations on advancing to the cave man era, only a few million more years and you could learn to make fire.",
cost: {
lumber: 2,
stone: 2
}
},
{
name: 'Construction',
description: "Knowledge of how to build basic structures. Your mom always knew you'd be special.",
cost: {
lumber: 3,
stone: 3
},
effect: function () {
$('#city_info').show();
$('#city_menu').show();
$('#sub_city').show();
}
},
{
name: 'Electricity',
require: { minerals: 3, knowledge: 20 },
description: 'Discover electricity and advance into a new era. No Elephants were sacrificed for this achievement.',
cost: {
money: 5000,
copper: 100,
coal: 100
}
},
{
name: 'Power Tools',
require: { mining: 5, timber: 5 },
description: 'Modern tools powered by electricity. More pragmantic then steam punk, but not as cool.',
cost: {
money: 10000,
coal: 500,
oil: 500,
steel: 500
}
}
];
research['economics'] = [
{
name: 'Basic Economics',
require: { knowledge: 5 },
description: 'Learn about how to manage an economy through money and trade. ',
cost: {
lumber: 5,
stone: 5
},
effect: function () {
$('#city_info .money').show();
}
},
{
name: 'Taxation',
require: { knowledge: 8 },
description: 'Develop a tax code, this makes all citizens with jobs automatically generate revenue each minute.',
cost: {
money: 50
}
},
{
name: 'Production Quotas',
require: { government: 1, overseer: 1, knowledge: 15 },
description: "Learn about how to set production quotas set by city hall, so your citizens know when it's ok to slack off",
cost: {
money: 2500
}
},
{
name: 'Fast Tax Cycles',
require: { knowledge: 30 },
description: 'A good citizen enjoys doing their patriotic duty of paying their taxes, so do it twice as often.',
cost: {
money: 25000
}
},
{
name: 'Accounting',
require: { education: 1 },
description: 'Learn the fundamentals of accounting and how it can help you manage your assets.',
cost: {
money: 50000
}
}
];
research['cartography'] = [
{
name: 'Basic Cartography',
require: { tech: 1, knowledge: 2 },
description: 'Learn how draw crude maps which help you navigate further from your camp.',
cost: {
lumber: 10,
stone: 5
},
effect: function () {
city[0].size = 3;
city[0].scale = 40;
loadCityMap(0);
}
},
{
name: 'Landmarks',
require: { knowledge: 10 },
description: 'Learn to draw better maps by using landmarks, this increases your zone of influence.',
cost: {
money: 100,
lumber: 25
},
effect: function () {
city[0].size = 4;
city[0].scale = 30;
loadCityMap(0);
}
},
{
name: 'Compass',
require: { knowledge: 32 },
description: 'Invent the compass which lets you navigate further away without getting lost, increases the zone of influence of your capital.',
cost: {
money: 100000,
iron: 100
},
effect: function () {
city[0].size = 5;
city[0].scale = 25;
loadCityMap(0);
}
},
{
name: 'Star Charts',
require: { astrology: 1, knowledge: 45 },
description: 'Learn to make star charts which aid navigation, increases the zone of influence of your capital.',
cost: {
money: 1000000
},
effect: function () {
city[0].size = 6;
city[0].scale = 20;
loadCityMap(0);
}
}
];
research['astrology'] = [
{
name: 'Astrology',
require: { economics: 1, knowledge: 38 },
description: 'Learn about celestial objects and how to track their movements.',
cost: {
money: 250000
}
}
];
research['government'] = [
{
name: 'Oxymoron Hall',
require: { economics: 1, knowledge: 10 },
description: 'Learn how to form a functioning government with a city hall.',
cost: {
money: 75,
lumber: 10,
stone: 20,
iron: 5
}
},
{
name: 'Tax Rates',
require: { economics: 2, knowledge: 20 },
description: 'Gain ability to set the tax rate in city hall. Sure to be popular with your subjects.',
cost: {
money: 500
}
},
{
name: 'Oppressive Taxes',
require: { knowledge: 25 },
description: "Unlocks oppressive taxes, you may not want to use this but it's always nice to have the option of taxing your citizens to death.",
cost: {
money: 1000
}
},
{
name: 'Extra Bureaucracy',
require: { knowledge: 30 },
description: 'The only thing better then bureaucracy is more bureaucracy. Increases the number of bureaucrats you can have.',
cost: {
money: 10000
},
effect: function () {
building['city_hall']['rank'][0]['labor_cap'] = 5;
}
}
];
research['overseer'] = [
{
name: 'Foreman',
require: { knowledge: 10 },
description: 'Learn how to oversee a factory with a foreman who boosts productivity.',
cost: {
money: 1000
}
},
{
name: 'Operations Manager',
require: { economics: 2, knowledge: 28 },
description: 'Learn how to manage a factory with a manager who automatically sells excess materials.',
cost: {
money: 25000
}
}
];
research['status_reports'] = [
{
name: 'Labor Reports',
require: { government: 1 },
description: 'Get easy tooltip updates which help you keep informed about your labor distribution.',
cost: {
money: 100
},
effect: function () {
loadCityMap(0);
}
}
];
research['survey'] = [
{
name: 'Prospecting',
require: { economics: 1, knowledge: 10 },
description: 'Learn how to survey land for potential mine locations.',
cost: {
money: 100,
lumber: 10,
stone: 10
}
}
];
research['expedition'] = [
{
name: 'Exploration',
require: { survey: 1, knowledge: 30 },
description: 'Learn the logistics of mounting an expedition to find new lands, and how to exploit them.',
cost: {
money: 10000
},
effect: function () {
//$('#expedition_button').show();
}
}
];
research['housing'] = [
{
name: 'Basic Housing',
require: { tech: 2, knowledge: 5 },
description: "Learn how to build artifical caves for citizens to live in. Marketing wants to call it a hut",
cost: {
lumber: 5,
stone: 5
},
effect: function () {
$('#city_info .citizen').show();
}
},
{
name: 'Efficient Housing',
require: { minerals: 4, tech: 3, knowledge: 20 },
description: 'Learn how to build apartment buildings for citizens.',
cost: {
money: 10000,
steel: 50,
cement: 50,
copper: 50,
lumber: 50
}
}
];
research['warehouse'] = [
{
name: 'Storage Shed',
require: { minerals: 2, tech: 2, knowledge: 5 },
description: 'Learn how to build a simple shed to store materials.',
cost: {
lumber: 5,
stone: 5,
iron: 5
}
},
{
name: 'Warehouse',
require: { minerals: 4, tech: 3, knowledge: 24 },
description: 'Learn how to build a large storage building.',
cost: {
money: 20000,
cement: 50,
lumber: 50,
steel: 50
}
}
];
research['packing'] = [
{
name: 'Efficient Packing',
require: { warehouse: 1, knowledge: 12 },
description: 'Learn how to get the most out of your storage by arranging things in neat piles instead of haphazardly tossing them in. Increasese storage gain from Sheds by 25%',
cost: {
money: 1000
}
},
{
name: 'Pallets',
require: { warehouse: 2, knowledge: 28 },
description: 'Learn how to more efficiently pack a warehouse by stacking things on pallets. Increasese storage gain from Warehouses by 25%',
cost: {
money: 40000
}
}
];
research['farming'] = [
{
name: 'Farming',
require: { housing: 1 },
description: 'Learn the basics of farming.',
cost: {
lumber: 10,
stone: 20
}
},
{
name: 'Greenhouse',
require: { knowledge: 20 },
description: 'Learn about how a greenhouse can enhance your farm.',
cost: {
lumber: 10,
stone: 5,
iron: 5
}
}
];
research['smelting'] = [
{
name: 'Smelting',
require: { tech: 1 },
description: 'Learn how to build a blast furnace to smelt ore into usable metals.',
cost: {
lumber: 2,
stone: 2
}
}
];
research['minerals'] = [
{
name: 'Copper Ore',
require: { smelting: 1 },
description: 'Learn how to extract and smelt copper ore.',
cost: {
lumber: 5,
stone: 5
},
effect: function () {
global.resource.copper.unlocked = 1;
city[0]['storage']['copper'] = 0;
}
},
{
name: 'Iron Ore',
require: { knowledge: 4 },
description: 'Learn how to extract and smelt iron ore.',
cost: {
lumber: 10,
stone: 10,
copper: 10
},
effect: function () {
global.resource.iron.unlocked = 1;
city[0]['storage']['iron'] = 0;
}
},
{
name: 'Coal Ore',
require: { knowledge: 6 },
description: 'Learn how to extract coal.',
cost: {
lumber: 10,
stone: 10,
iron: 10
},
effect: function () {
global.resource.coal.unlocked = 1;
city[0]['storage']['coal'] = 0;
}
},
{
name: 'Steel Smelting',
require: { knowledge: 8 },
description: 'Learn how to turn iron and coal into steel.',
cost: {
lumber: 10,
coal: 10,
iron: 25
},
effect: function () {
global.resource.steel.unlocked = 1;
}
}
];
// General technology related to mining
research['mining'] = [
{
name: 'Stone Pickaxe',
require: { tech: 1 },
description: 'A crude pickaxe made from a stone head attached to a stick. Increases manual mining speed.',
cost: {
lumber: 2,
stone: 2
},
effect: function () {
global.resource.stone.rate = 2;
}
},
{
name: 'Copper Pickaxe',
require: { minerals: 1 },
description: 'A pickaxe made from a wooden shaft with a copper head. Increases manual mining speed.',
cost: {
lumber: 5,
copper: 5
},
effect: function () {
global.resource.stone.rate = 3;
global.resource.copper.rate = 2;
}
},
{
name: 'Iron Pickaxe',
require: { minerals: 2 },
description: 'A pickaxe made from a wooden shaft with an iron head. Increases manual mining speed.',
cost: {
lumber: 10,
iron: 10
},
effect: function () {
global.resource.stone.rate = 4;
global.resource.copper.rate = 3;
global.resource.iron.rate = 2;
global.resource.coal.rate = 2;
}
},
{
name: 'Steel Pickaxe',
require: { minerals: 4 },
description: 'A pickaxe made from a wooden shaft with a steel head. Increases manual mining speed.',
cost: {
money: 100,
lumber: 100,
steel: 25
},
effect: function () {
global.resource.stone.rate = 5;
global.resource.copper.rate = 4;
global.resource.iron.rate = 3;
global.resource.coal.rate = 3;
}
},
{
name: 'Lightweight Pickaxe',
description: 'A pickaxe made from an aluminium shaft with a steel head. Increases manual mining speed.',
cost: {
money: 1000,
lumber: 250,
aluminium: 100
},
effect: function () {
global.resource.stone.rate = 6;
global.resource.copper.rate = 5;
global.resource.iron.rate = 4;
global.resource.coal.rate = 4;
}
},
{
name: 'Jackhammer',
require: { tech: 4 },
description: 'Jackhammers drastically increases manual mining production.',
cost: {
money: 5000,
oil: 2500,
aluminium: 5000,
steel: 25000
},
effect: function () {
global.resource.stone.rate = 7;
global.resource.copper.rate = 6;
global.resource.iron.rate = 5;
global.resource.coal.rate = 5;
global.resource.stone.yield = 2;
}
}
];
// Lumberjacking tech
research['timber'] = [
{
name: 'Stone Axe',
require: { tech: 1 },
description: 'A crude axe made from a stone head attached to a stick. Increases manual wood cutting speed.',
cost: {
lumber: 2,
stone: 2
},
effect: function () {
global.resource.lumber.rate = 2;
}
},
{
name: 'Copper Axe',
require: { minerals: 1 },
description: 'An axe made from a wooden shaft with a copper head. Increases manual wood cutting speed.',
cost: {
lumber: 5,
copper: 5
},
effect: function () {
global.resource.lumber.rate = 3;
}
},
{
name: 'Iron Axe',
require: { minerals: 2 },
description: 'An axe made from a wooden shaft with a copper head. Increases manual wood cutting speed.',
cost: {
lumber: 10,
iron: 10
},
effect: function () {
global.resource.lumber.rate = 4;
}
},
{
name: 'Steel Axe',
require: { minerals: 4 },
description: 'An axe made from a wooden shaft with a copper head. Increases manual wood cutting speed.',
cost: {
money: 100,
lumber: 100,
steel: 25
},
effect: function () {
global.resource.lumber.rate = 5;
}
},
{
name: 'Crosscut Saw',
description: 'The next evolution in cutting down trees, saws are more efficent then axes. Increases manual wood cutting speed.',
cost: {
money: 1000,
lumber: 250,
steel: 100
},
effect: function () {
global.resource.lumber.rate = 6;
}
},
{
name: 'Bow Saw',
description: 'A better saw with an aluminium frame. Increases manual wood cutting speed.',
cost: {
money: 2500,
aluminium: 2500,
steel: 5000
},
effect: function () {
global.resource.lumber.rate = 7;
}
},
{
name: 'Chainsaw',
require: { tech: 4 },
description: 'A lean mean tree cutting machine, chainsaws are way better then manual saws. Increased manual lumber yield.',
cost: {
money: 5000,
oil: 2500,
aluminium: 5000,
steel: 25000
},
effect: function () {
global.resource.lumber.yield = 2;
}
}
];
research['education'] = [
{
name: 'Education',
require: { knowledge: 30 },
description: "What came first, the teacher or the pupil? We're not sure how the first educator came to be without an education either but this research aims to find out.",
cost: {
money: 2000
}
}
];
}