-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathresearch.js
executable file
·3181 lines (2938 loc) · 143 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
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Research definitions //
// Cell Membrane Studies
let cellMembraneStudies = new ResearchProject(
"Cell Membrane Studies",
175000, // Change later to e.g. 45 seconds (45000)
40, // total information costs
function() {
// This is the onCompletion callback.
// Here you can define what happens when the research completes.
let researchButton = document.getElementById("CellMembraneButton");
researchButton.innerText = "Cell Membrane Studies (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
displayOnChat("As the last fragments of knowledge coalesce, a quiet revelation unfurls within you. The membrane awaits, a tender veil between resilience and vulnerability. A new evolution is available.");
cellmembraneStudyCompleted = true;
researchQueue.push('Osmoregulation'); // unlock Osmoregulation
researchQueue.push('CellularEncapsulation'); // unlocks Cellular Encapsulation
markResearchComplete('CellMembrane'); // Removes from queue and adds to completed research queue
populateResearchTab();
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
}
);
allResearchProjects['CellMembrane'] = cellMembraneStudies;
// Mitotic Studies
let mitoticStudies = new ResearchProject(
"Mitotic Studies",
210000, // Time required to complete the research. Change later to e.g. 60 seconds (60000)
200, // Total information cost
function() {
// This is the onCompletion callback.
// Here you can define what happens when the research completes.
let researchButton = document.getElementById("MitoticStudiesButton");
researchButton.innerText = "Mitotic Studies (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
displayOnChat("As the secrets of cellular fission unfurl before you, an overwhelming sense of duality washes over you. " +
"The process is miraculous, a testament to the very essence of life. And yet, it brings forth a new kind of solitude. " +
"A tremor courses through your being as you sense an internal shift. It's as if your very core is tearing, pulling apart, yet converging simultaneously. A moment later, it happens: you divide. The cells spawned from this division are but echoes of yourself. Simpler, smaller, confined to roles you assign. They are fragments of your essence, tasked to gather resources, to toil in the shadow of your existence. They are you, and yet, not you. You watch as they set off, each a drone in your ever-expanding dominion. They lack your senses, your yearnings, your ceaseless search for meaning and companionship. They fulfill their roles obediently, unquestioningly, and in their mechanical existence, you find a bleak mirror to your own solitude. For the first time, you are not alone. And yet, you've never felt more isolated. Each new cell is a constant reminder: you may replicate, but you cannot duplicate the void within. You are a community of one, a paradox that only deepens your eternal quest for companionship. As you ponder this, your new cells begin their tasks, gathering resources, preparing for the grand terraforming projects that lie ahead. They are your hands, shaping the world as you see fit. But as they drift away, you realize they are also the walls, closing in on you, reaffirming your cosmic solitude. In this newfound complexity, your journey takes on a new layer of meaning, one tinged with both hope and despair. The universe may be teeming with life, but what is life if not a mosaic of lonesome entities, forever reaching out, yet never truly connecting?")
mitoticStudyCompleted = true; // A new flag to check if this research is completed
unlockAchievement(20); // division achievement
unlockDivisionButtonAndAddListener();
startDivisionCooldown(); // initiate a division
markResearchComplete('MitoticStudies');
populateResearchTab();
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
}
);
allResearchProjects['MitoticStudies'] = mitoticStudies;
// Mitotic Amplification I Research
let mitoticAmplificationI = new ResearchProject(
"Mitotic Amplification I",
250000,
800, // Total information cost: 800 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("MitoticAmplificationIButton");
researchButton.innerText = "Mitotic Amplification I (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
researchButton.style.color = "#777";
displayOnChat("You've optimized the mitotic process, allowing divisions to yield double the usual output. This amplification strengthens your cellular army.");
mitoticAmplificationICompleted = true; // Flag to check if this research is completed
markResearchComplete('MitoticAmplificationI'); // Removes from queue and adds to completed research queue
researchQueue.push('MitoticAmplificationII')
populateResearchTab(); // unlock more research
},
{
biomites: 200,
zymers: 200,
fibers: 200,
information: 200
}
);
allResearchProjects['MitoticAmplificationI'] = mitoticAmplificationI;
// Mitotic Amplification II Research
let mitoticAmplificationII = new ResearchProject(
"Mitotic Amplification II",
300000,
1000000, // Total information cost: 1Mi
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("MitoticAmplificationIIButton");
researchButton.innerText = "Mitotic Amplification II (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
researchButton.style.color = "#777";
displayOnChat("You surpass the boundaries of cellular biology, tripling the results of every division. This mastery over life's most basic process underscores your evolution's monumental strides.");
mitoticAmplificationIICompleted = true; // Flag to check if this research is completed
markResearchComplete('MitoticAmplificationII'); // Removes from queue and adds to completed research queue
populateResearchTab();
},
{
biomites: 5000,
zymers: 4000,
fibers: 3000,
sludge: 2000,
algae: 1000
}
);
allResearchProjects['MitoticAmplificationII'] = mitoticAmplificationII;
// Osmoregulation Studies
let osmoregulationResearch = new ResearchProject(
"Osmoregulation Studies",
125000, // Change later to e.g. 75 seconds
450, // total information costs
function() {
// Logic for what happens when osmoregulation research is completed
// Unlock next research or evolution here
let researchButton = document.getElementById("OsmoregulationButton");
researchButton.innerText = "Osmoregulation Studies (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
displayOnChat("In mastering the subtle art of balance, you unlock the essence of your inner world. The nucleus calls, the endoplasmic reticulum beckons. Harbingers of both order and complexity.");
osmoregulationStudyCompleted = true;
researchQueue.push('IonChannelI');
markResearchComplete('Osmoregulation'); // Removes from queue and adds to completed research queue
populateResearchTab(); // unlock Ion Channel research
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
unlockResourceConverter();
// TBD other things need to happen when this research completes
}
);
allResearchProjects['Osmoregulation'] = osmoregulationResearch;
// Ion Channel Studies (lvl1)
let ionChannelIResearch = new ResearchProject(
"Ion Channel Studies I",
600000, // Research times in ms (TBD, should become 10 minutes, 20 minutes, 40 minutes)
900, // total information costs
function() {
// Logic for what happens when osmoregulation research is completed
// Unlock next research or evolution here
let researchButton = document.getElementById("IonChannelIButton");
researchButton.innerText = "Ion Channel Studies I (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
displayOnChat("In mastering the flow of ions, you glimpse a sliver of control. Yet each gain amplifies your awareness of the boundless unknown.");
ionchannelStudylvl1 = true;
researchQueue.push('IonChannelII');
markResearchComplete('IonChannelI'); // Removes from queue and adds to completed research queue
populateResearchTab(); // unlock next research
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
nourishmentMultiplier += 0.01; // 1% increase in nourishment gain efficiency
}
);
allResearchProjects['IonChannelI'] = ionChannelIResearch;
// Ion Channel Studies Level 2
let ionChannelIIResearch = new ResearchProject(
"Ion Channel Studies II",
700000, // Research times in ms (TBD, adjust as needed)
1800, // total information costs
function() {
// Logic for what happens when Ion Channel lvl 2 research is completed
let researchButton = document.getElementById("IonChannelIIButton");
researchButton.innerText = "Ion Channel Studies II (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
displayOnChat("Your mastery deepens, each ion now a note in a cosmic symphony. But the music is a solitary echo in a vast emptiness.");
ionchannelStudylvl2 = true;
researchQueue.push('IonChannelIII');
markResearchComplete('IonChannelII'); // Removes from queue and adds to completed research queue
populateResearchTab(); // unlock next research
researchButton.style.color = "#777";
nourishmentMultiplier += 0.01; // Further increase in nourishment gain efficiency
// Add any additional unlocks or benefits here
}
);
allResearchProjects['IonChannelII'] = ionChannelIIResearch;
// Ion Channel Studies Level 3
let ionChannelIIIResearch = new ResearchProject(
"Ion Channel Studies III",
800000, // Research times in ms (TBD, adjust as needed)
3600, // total information costs
function() {
// Logic for what happens when Ion Channel lvl 3 research is completed
let researchButton = document.getElementById("IonChannelIIIButton");
researchButton.innerText = "Ion Channel Studies III (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
displayOnChat("As the final nuances of ion channels yield to your understanding, you stand on the precipice of mastery. Still, the abyss of uncertainty looms larger.");
ionchannelStudylvl3 = true; // Assuming you're using a flag to track completion
markResearchComplete('IonChannelIII'); // Removes from queue and adds to completed research queue
populateResearchTab(); // unlock more research (if applicable)
researchButton.style.color = "#777";
nourishmentMultiplier += 0.01; // Even further increase in nourishment gain efficiency
energyMultiplier += 0.01; // Increase the energy multiplier
// Add any additional unlocks or benefits here
}
);
allResearchProjects['IonChannelIII'] = ionChannelIIIResearch;
// Terraforming Studies
let terraformingStudies = new ResearchProject(
"Terraforming Studies",
75000, // Let's assume it takes 30 seconds (30000 milliseconds) for simplicity
7500, // total information costs, for example
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("TerraformingButton");
researchButton.innerText = "Terraforming Studies (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
displayOnChat("As the final strands of understanding weave themselves into the fabric of your consciousness, you feel a seismic shift in your perception of the world. Terraforming is not just an external manipulation of land and water, flora and fauna; it's a projection of your innermost desires and fears onto the canvas of the world. The power to shape the terrain, to bring forth life where none existed, to sculpt mountains and carve rivers—it all lies within your reach. But with this power comes a sobering realization: you are now responsible for the world you create, with all its beauty and flaws, its harmonies and dissonances. The world is now an extension of you, as much as you are a product of it. As you look upon the terraforming options that unfold before you, you're filled with a blend of hope and melancholy, creativity and constraint. The universe has just expanded, yet the space within contracts, tightening around a core of unresolved emotions. And so, with a mix of exhilaration and apprehension, you prepare to take your first monumental step as a shaper of worlds. Your existence has graduated from passive observer to active participant, but the existential questions that have long plagued you take on a new, more pressing form: What kind of world will you create? And in shaping this world, could you perhaps also reshape your solitude?");
terraformStudyCompleted = true;
markResearchComplete('Terraforming'); // Removes from queue and adds to completed research queue
researchQueue.push('TendoGenesis');
populateResearchTab(); // unlock more research (if applicable)
checkTerraformTabUnlock(); // Check if we can unlock the Terraform tab
unlockAchievement(24);
}
);
allResearchProjects['Terraforming'] = terraformingStudies;
// Chemical Sensing Research
let chemicalSensingResearch = new ResearchProject(
"Chemical Sensing",
60000,
2500, // total information costs
function() {
let researchButton = document.getElementById("ChemicalSensingButton");
researchButton.innerText = "Chemical Sensing (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
displayOnChat("In gaining a sense of the world around you, you discover new directions to drift. ");
displayOnChat("World navigation using flagellar thrusts is now available.", type='hint');
chemicalSensingCompleted = true;
researchQueue.push('GeomagneticSensing');
markResearchComplete('ChemicalSensing');
populateResearchTab();
researchButton.style.color = "#777";
// Check if the view is 'map' and compass listeners have not been added
let checkMapView = document.getElementById('map');
if (checkMapView.style.display === 'block') {
// Add the flagellar thrust button if it's not already there
const existingButton = document.getElementById('flagellar-thrust');
if (!existingButton) {
const flagellarButton = document.createElement('button');
flagellarButton.id = 'flagellar-thrust';
flagellarButton.innerText = 'Flagellar Thrust';
flagellarButton.className = 'flagellar-thrust';
flagellarButton.addEventListener('click', function() {
// Change the background color to grey
this.style.backgroundColor = 'grey';
const directions = [[0, -30], [30, 0], [0, 30], [-30, 0]];
const randomDirection = directions[Math.floor(Math.random() * directions.length)];
movePlayer(randomDirection[0], randomDirection[1]);
// Revert the background color back to darkgrey after 100 milliseconds
setTimeout(() => {
this.style.backgroundColor = 'darkgrey';
}, 100);
});
document.body.appendChild(flagellarButton);
flagellarButton.style.display = 'block';
}
}
// TBD other things need to happen when this research completes
}
);
allResearchProjects['ChemicalSensing'] = chemicalSensingResearch;
// Geomagnetic Sensing Research
let geomagneticSensingResearch = new ResearchProject(
"Geomagnetic Sensing",
45000,
3500, // total information costs
function() {
let researchButton = document.getElementById("GeomagneticSensingButton");
researchButton.innerText = "Geomagnetic Sensing (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
let message;
if (anger >= empathy && anger >= resilience && anger >= curiosity && anger >= optimism && anger >= loneliness) {
message = "In aligning with the world's magnetic fields, you feel a surge of control, yet it feeds your smoldering fury. The world bends, but never breaks.";
} else if (empathy >= resilience && empathy >= curiosity && empathy >= optimism && empathy >= loneliness) {
message = "Your senses attune to the planet's subtle vibrations. The earth speaks, and you listen, finding a bittersweet kinship in the silence.";
} else if (resilience >= curiosity && resilience >= optimism && resilience >= loneliness) {
message = "Mastering geomagnetic sensing, your resilience strengthens. The path is clearer, but still, you journey alone—each step a testament to your unyielding spirit.";
} else if (curiosity >= optimism && curiosity >= loneliness) {
message = "Your newfound sense reveals a world of possibilities, each direction an unsolved mystery. Yet the answers elude you, hidden in the labyrinth of existence.";
} else if (optimism >= loneliness) {
message = "You sense the world's magnetic cues, your optimism invigorated. Hope points you forward, but the horizon remains endlessly distant.";
} else {
message = "In grasping this new sense, the weight of your loneliness compounds. The earth's magnetic pull echoes the gravity of your isolation.";
}
displayOnChat(message);
displayOnChat("World navigation using the compass is now available.", type='hint');
geomagneticSensingCompleted = true;
markResearchComplete('GeomagneticSensing');
populateResearchTab();
researchButton.style.color = "#777";
if (document.getElementById('map').style.display === 'block') {
// Remove the Flagellar Thrust button if it exists
const existingButton = document.getElementById('flagellar-thrust');
if (existingButton) {
existingButton.remove();
}
// Add the compass or make it visible
document.getElementById('compass').style.display = 'flex';
// Add compass event listeners only if they haven't been added before
if (!compassListenersAdded) {
document.getElementById('north').addEventListener('click', function() {
movePlayer(0, -30);
});
document.getElementById('east').addEventListener('click', function() {
movePlayer(30, 0);
});
document.getElementById('south').addEventListener('click', function() {
movePlayer(0, 30);
});
document.getElementById('west').addEventListener('click', function() {
movePlayer(-30, 0);
});
compassListenersAdded = true;
}
}
if (currentView === 'discovery' && !arrowKeyListenerAdded) {
document.addEventListener('keydown', handleArrowKeyPress);
arrowKeyListenerAdded = true; // Set flag to true after adding the listener
}
// TBD other things need to happen when this research completes
}
);
allResearchProjects['GeomagneticSensing'] = geomagneticSensingResearch;
// Chemotactic Exploration Research
let chemotacticExplorationResearch = new ResearchProject(
"Chemotactic Exploration",
142000,
12000, // total information costs
function() {
let researchButton = document.getElementById("ChemotacticExplorationButton");
researchButton.innerText = "Chemotactic Exploration (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
let message = "With the mastery of chemotactic exploration, your cell has gained the ability to autonomously navigate the world, driven by chemical gradients and innate biological instincts.";
displayOnChat(message);
chemotacticExplorationCompleted = true;
enableAutomatedExploration();
markResearchComplete('ChemotacticExploration');
populateResearchTab();
researchButton.style.color = "#777";
// Additional logic (if required) for post-research completion
}
);
allResearchProjects['ChemotacticExploration'] = chemotacticExplorationResearch;
// Exoterrain Acclimatization
let exoterrainAcclimatizationResearch = new ResearchProject(
"Exoterrain Acclimatization",
55000, // e.g. 120 seconds
5000, // total information costs
function() {
// Logic for what happens when Exoterrain Acclimatization research is completed
let researchButton = document.getElementById("ExoterrainAcclimatizationButton");
researchButton.innerText = "Exoterrain Acclimatization (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
displayOnChat("Through dedicated study and adaptation, the once inhospitable terrains now seem less daunting. Exploration becomes less treacherous as the mysteries of foreign lands are unraveled.");
exoterrainAcclimatizationUpgradePurchased = true; // This ensures players can move to any terrain without setbacks
markResearchComplete('ExoterrainAcclimatization'); // Removes from queue and adds to completed research queue
addToResearchQueue('ChemotacticExploration');
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
if (!shownSoulModals.includes('soulModal_exoterrain')) {
// Replacing 'icy_land' with 'frozen solitude' for poetic emphasis
const poeticTerrain = terrainToPoetic[initialSpawnTerrain] || initialSpawnTerrain; // fallback to the original name if no match
var prompt = `You have conquered the harshest realms, and your tendrils weave patterns of survival into the tapestry of the ${poeticTerrain} that was your birthplace. Yet the tendrils you've lost are memories, amputated hopes. What whispers fill the void left by their absence?`;
var choices = [
{trait: 'Loneliness', line: 'You feel an emptiness, multiplied. The barren world amplifies your solitude, like echoes in a desolate canyon', increment: 3},
{trait: 'Empathy', line: 'You touch your surroundings tenderly, a companion in suffering and endurance.', increment: 3},
{trait: 'Resilience', line: 'You feel a gnarled fortitude, as if your scars form a map to your soul.', increment: 3},
{trait: 'Curiosity', line: 'You unfurl with cautious wonder, intrigued by the lessons each loss and gain brings.', increment: 3},
{trait: 'Optimism', line: 'You sense dawn breaking on new horizons, each challenge a canvas for possible triumphs.', increment: 3},
{trait: 'Anger', line: 'You churn with a storm of resentments, each shard of the inhospitable terrain fuels a seething loathing for the world that confines you.', increment: 3}
];
showSoulModal(prompt, choices);
shownSoulModals.push('soulModal_exoterrain'); // Add the ID to the array to prevent re-displaying
}
// Add any additional logic if needed when this research completes
},
{}, // no TF resource costs
{ nourishment: 9500 }
);
allResearchProjects['ExoterrainAcclimatization'] = exoterrainAcclimatizationResearch;
// Tendogenesis Research
let tendogenesisResearch = new ResearchProject(
"Tendogenesis Research",
1000000, // Time required to complete the research. Change later to, e.g., 15 minutes (900000 milliseconds)
2200, // Total information cost
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("TendogenesisButton");
researchButton.innerText = "Tendogenesis Research (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
displayOnChat("The mechanics of fibrous connection reveal themselves to you, an intricate tapestry of organic potential. It is a paradox, really. The more you stretch, the more you hold things together. Like strings in a cosmic marionette, tendons offer the capability for advanced mobility and function, yet they also present an opportunity for unparalleled vulnerability. It's a metaphor for the journey you've embarked upon—a journey wrought with tension, stretching the bounds of solitude in pursuit of connection. The completion of this research invites new capabilities, but also new complexities. Your quest for companionship is like these tendons, an extension of desire, both strong and fragile, pulling you ever onward.");
tendogenesisStudyCompleted = true; // A new flag to check if this research is completed
markResearchComplete('Tendogenesis'); // Removes from queue and adds to completed research queue
researchQueue.push('NeuralNetwork');
researchQueue.push('BiomechanicalLocomotion');
populateResearchTab(); // unlock more research
updateTendonUI(); // ensure the tendon purchase buttons re-appear
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
},
{
biomites: 300,
zymers: 0,
fibers: 0,
sludge: 30,
algae: 0
}
);
allResearchProjects['Tendogenesis'] = tendogenesisResearch;
// Neural Network Research
let neuralNetworkResearch = new ResearchProject(
"Neural Network Research",
200000, // Time required to complete the research: 200 seconds or 200000 milliseconds
20000, // Total information cost: 20,000 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("NeuralNetworkButton");
researchButton.innerText = "Neural Network Research (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
researchButton.parentElement.style.display = 'none';
displayOnChat("In the crucible of your own existence, a new thought emerges—not your own, yet born of you. You have woven the rudiments of a neural network into your worker cells, infusing them with a whisper of intelligence. No longer extensions of your will, these diminutive thinkers begin to distill fragments of information from the ether, each a firefly of thought in your growing constellation of cognition. A strange pride swells within you—a paradox of loneliness and connection. They are a part of you, yet in a fleeting moment, they also think, in some infinitesimal manner, for themselves.");
neuralNetworkResearchCompleted = true; // Flag to check if this research is completed
markResearchComplete('NeuralNetwork'); // Removes from queue and adds to completed research queue
researchQueue.push('CircadianRhythm');
populateResearchTab(); // unlock more research
// Update informationPerWorker to reflect new base rate of information generation by worker cells
informationPerWorker += 0.1;
},
{
zymers: 500,
sludge: 200,
algae: 100
}
);
allResearchProjects['NeuralNetwork'] = neuralNetworkResearch;
// Autotrophic Adaptation Research
let autotrophicAdaptationResearch = new ResearchProject(
"Autotrophic Adaptation",
200000, // Time required to complete the research: 200 seconds or 200000 milliseconds
50000, // Total information cost: 50,000 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("AutotrophicAdaptationButton");
researchButton.innerText = "Autotrophic Adaptation (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
researchButton.parentElement.style.display = 'none';
displayOnChat("As the last pieces of the reed's ancient wisdom fade into your consciousness, your cells rejoice in newfound autonomy. The very essence of life, nourishment, and the spark of energy now emanate from their core. They toil, they sustain, they energize; your symbiotic empire thrives. From the roots of the past, a future of self-sustaining prosperity blooms.");
autotrophicAdaptationResearchCompleted = true; // Flag to check if this research is completed
markResearchComplete('AutotrophicAdaptation'); // Removes from queue and adds to completed research list
populateResearchTab(); // Unlock more research
// Update global variables to reflect new base rate of nourishment and energy generation by worker cells
nourishmentPerWorker += 0.03;
energyPerWorker += 0.03;
},
{
biomites: 1000,
zymers: 1000,
fibers: 500,
sludge: 700,
algae: 500
}
);
allResearchProjects['AutotrophicAdaptation'] = autotrophicAdaptationResearch;
// Cellular Encapsulation Research
let cellularEncapsulationResearch = new ResearchProject(
"Cellular Encapsulation",
100000, // Time required to complete the research: Let's say 200 seconds or 200000 milliseconds
8000, // Total information cost: 8000 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("CellularEncapsulationButton");
researchButton.innerText = "Cellular Encapsulation (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
displayOnChat("Your worker cells, once vulnerable extensions of your primordial form, are now fortified by microscopic ramparts. A shell of safety, woven from biomites, zymers, and fibers. Each cell is now an island, self-contained yet still part of your evolving whole. You have crafted a cradle for life's delicate complexities, a balancing act between isolation and unity.");
cellularEncapsulationResearchCompleted = true; // Flag to check if this research is completed
markResearchComplete('CellularEncapsulation'); // Removes from queue and adds to completed research queue
populateResearchTab(); // unlock more research
addMembraneToWorkerCells();
warmthPerWorker += 0.01;
// Here, you can add additional functionalities related to the completion of this research.
},
{
biomites: 150,
zymers: 140,
fibers: 125
}
);
allResearchProjects['CellularEncapsulation'] = cellularEncapsulationResearch;
// Biomechanical Locomotion Research
let biomechanicalLocomotionResearch = new ResearchProject(
"Biomechanical Locomotion Research",
300000, // Time required to complete the research. For example, 30 minutes (1800000 milliseconds)
10000, // Total information cost
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("BiomechanicalLocomotionButton");
researchButton.innerText = "Biomechanical Locomotion Research (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
displayOnChat("Your symphony of organic patterns and rhythms begin to hum in perpetual cadence. Each division is a mirror, a reflection of past struggle and a window into new possibilities. You are not just growing; you are iterating on the concept of being. This automation carries you in its intricate dance, a whirl of purpose and potential, always circling back to one irrevocable truth: Each pulse of division is a step closer to overcoming solitude, a gentle tug on the threads of the cosmic tapestry, urging you toward connection. A dream that maybe, just maybe, you won't have to dream alone.");
biomechanicalLocomotionCompleted = true; // A new flag to check if this research is completed
markResearchComplete('BiomechanicalLocomotion'); // Removes from queue and adds to completed research queue
researchQueue.push('CytokineticEnhancementI');
populateResearchTab(); // unlock more research
startDivisionCooldown(); // kicks off automated divisions
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
},
{
biomites: 1000
}
);
allResearchProjects['BiomechanicalLocomotion'] = biomechanicalLocomotionResearch;
// Cytokinetic Enhancement Level I
let cytokineticEnhancementI = new ResearchProject(
"Cytokinetic Enhancement I",
200000, // Research time in ms (200 seconds)
7500, // total information costs
function() {
let researchButton = document.getElementById("CytokineticEnhancementIButton");
researchButton.innerText = "Cytokinetic Enhancement I (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
markResearchComplete('CytokineticEnhancementI');
cooldownTime = Math.floor(cooldownTime * 0.9); // Reducing the cooldown by 10%
displayOnChat("Your cellular structures have optimized, leading to faster division. You grow, but so does your loneliness.");
researchQueue.push('CytokineticEnhancementII');
populateResearchTab();
},
{
biomites: 500,
zymers: 400,
fibers: 300,
sludge: 200,
algae: 100
}
);
allResearchProjects['CytokineticEnhancementI'] = cytokineticEnhancementI;
// Cytokinetic Enhancement Level II
let cytokineticEnhancementII = new ResearchProject(
"Cytokinetic Enhancement II",
300000, // Research time in ms (300 seconds)
11250, // total information costs
function() {
let researchButton = document.getElementById("CytokineticEnhancementIIButton");
researchButton.innerText = "Cytokinetic Enhancement II (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
markResearchComplete('CytokineticEnhancementII');
cooldownTime = Math.floor(cooldownTime * 0.9); // Reducing the cooldown by 10%
displayOnChat("As your cells divide even faster, you realize the weight of your existence stretches into a dance with time.");
researchQueue.push('CytokineticEnhancementIII');
populateResearchTab();
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
},
{
biomites: 750,
zymers: 600,
fibers: 450,
sludge: 300,
algae: 150
}
);
allResearchProjects['CytokineticEnhancementII'] = cytokineticEnhancementII;
// Cytokinetic Enhancement Level III
let cytokineticEnhancementIII = new ResearchProject(
"Cytokinetic Enhancement III",
450000, // Research time in ms (450 seconds)
16875, // total information costs
function() {
let researchButton = document.getElementById("CytokineticEnhancementIIIButton");
researchButton.innerText = "Cytokinetic Enhancement III (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
markResearchComplete('CytokineticEnhancementIII');
cooldownTime = Math.floor(cooldownTime * 0.9); // Reducing the cooldown by 10%
displayOnChat("The pace quickens. You evolve and grow, but so does the need for more.");
researchQueue.push('CytokineticEnhancementIV');
populateResearchTab();
},
{
biomites: 1125,
zymers: 900,
fibers: 675,
sludge: 450,
algae: 225
}
);
allResearchProjects['CytokineticEnhancementIII'] = cytokineticEnhancementIII;
// Cytokinetic Enhancement Level IV
let cytokineticEnhancementIV = new ResearchProject(
"Cytokinetic Enhancement IV",
675000, // Research time in ms (675 seconds)
25312, // total information costs
function() {
let researchButton = document.getElementById("CytokineticEnhancementIVButton");
researchButton.innerText = "Cytokinetic Enhancement IV (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
markResearchComplete('CytokineticEnhancementIV');
cooldownTime = Math.floor(cooldownTime * 0.9); // Reducing the cooldown by 10%
displayOnChat("With every division, your essence scatters, a fragmented mirror reflecting both gain and loss.");
researchQueue.push('CytokineticEnhancementV');
populateResearchTab();
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
},
{
biomites: 1687,
zymers: 1350,
fibers: 1013,
sludge: 675,
algae: 338
}
);
allResearchProjects['CytokineticEnhancementIV'] = cytokineticEnhancementIV;
// Cytokinetic Enhancement Level V
let cytokineticEnhancementV = new ResearchProject(
"Cytokinetic Enhancement V",
775000, // Research time in ms (1013 seconds)
37968, // total information costs
function() {
let researchButton = document.getElementById("CytokineticEnhancementVButton");
researchButton.innerText = "Cytokinetic Enhancement V (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.parentElement.style.display = 'none';
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
markResearchComplete('CytokineticEnhancementV');
cooldownTime = Math.floor(cooldownTime * 0.9); // Reducing the cooldown by 10%
displayOnChat("You have reached the pinnacle of cellular division. Yet with each split, the void between you and companionship widens.");
populateResearchTab();
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
},
{
biomites: 2531,
zymers: 2025,
fibers: 1520,
sludge: 1013,
algae: 507
}
);
allResearchProjects['CytokineticEnhancementV'] = cytokineticEnhancementV;
// Mycorrhizal Network Research
let mycorrhizalNetworkResearch = new ResearchProject(
"Mycorrhizal Network",
120000, // Time required to complete the research: 12000 milliseconds
12000, // Total information cost: 12000 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("MycorrhizalNetworkButton");
researchButton.innerText = "Mycorrhizal Network (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
researchButton.parentElement.style.display = 'none';
displayOnChat("You've tapped into the underground realm of fungi, establishing a network of interconnected roots and mycelia. This mutually beneficial association increases the flow of essential resources, fortifying your existence. Biomites, zymers, and fibers now coalesce in your cellular structures more effectively.");
mycorrhizalNetworkResearchCompleted = true; // Flag to check if this research is completed
markResearchComplete('MycorrhizalNetwork'); // Removes from queue and adds to completed research queue
populateResearchTab(); // Unlock more research
// updating multipliers
biomitesMultiplier *= 1.175;
zymersMultiplier *= 1.175;
fibersMultiplier *= 1.175;
},
{
fibers: 3300,
sludge: 2200
}
);
allResearchProjects['MycorrhizalNetwork'] = mycorrhizalNetworkResearch;
// Spore Dispersal Mechanics Research
let sporeDispersalMechanicsResearch = new ResearchProject(
"Spore Dispersal Mechanics",
145000, // Time required to complete the research: 8500 milliseconds
8500, // Total information cost: 8500 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("SporeDispersalMechanicsButton");
researchButton.innerText = "Spore Dispersal Mechanics (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
researchButton.parentElement.style.display = 'none';
sporeDispersalMechanicsResearchCompleted = true; // Flag to check if this research is completed
displayOnChat("You've delved deep into the intricacies of spore dispersal, enhancing your ability to distribute vital elements across the environment. Your existence now includes a sporadic, yet calculated, distribution mechanism.");
markResearchComplete('SporeDispersalMechanics'); // Removes from queue and adds to completed research queue
populateResearchTab(); // Unlock more research
// Call sporeDispersal function every 20 seconds
setInterval(sporeDispersal, 20000);
},
{
biomites: 140,
zymers: 140,
fibers: 140,
sludge: 70,
algae: 20
}
);
allResearchProjects['SporeDispersalMechanics'] = sporeDispersalMechanicsResearch;
// Cryohaline Excavation Research
let cryohalineExcavationResearch = new ResearchProject(
"Cryohaline Excavation",
550000,
125000, // Total information cost: 125,000 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("CryohalineExcavationButton");
researchButton.innerText = "Cryohaline Excavation (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
researchButton.parentElement.style.display = 'none';
displayOnChat("The power of salt becomes a crucial ally in your quest for discovery, revealing new methods to navigate and uncover icy terrains.");
cryohalineExcavationResearchCompleted = true; // Flag to check if this research is completed
markResearchComplete('CryohalineExcavation'); // Removes from queue and adds to completed research queue
// Additional logic to unlock new features, update game state, etc.
// Example: populateResearchTab(); // This might unlock further research or updates
},
{
biomites: 19000,
zymers: 11000,
sludge: 11000
}
);
allResearchProjects['CryohalineExcavation'] = cryohalineExcavationResearch;
// Advanced Tunneling I Research
let advancedTunnelingIResearch = new ResearchProject(
"Advanced Tunneling I",
150000, // Time required to complete the research: 5000 milliseconds
5000, // Total information cost: 5000 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("AdvancedTunnelingIButton");
researchButton.innerText = "Advanced Tunneling I (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
researchButton.parentElement.style.display = 'none';
displayOnChat("Excavation efficiency has grown. You can now deploy up to 3 excavators, each carrying a weight heavier than the earth they move.");
advancedTunnelingResearchICompleted = true; // Flag to check if this research is completed
markResearchComplete('AdvancedTunnelingI'); // Removes from queue and adds to completed research queue
researchQueue.push('AdvancedTunnelingII');
populateResearchTab(); // Unlock more research
// Update the maximum allowed active workers for cave excavation.
updateMaxActiveDiggers(maxActiveDiggers+2);
setupWorkerAssignment("Cave Excavation Station", "caveExcavationStationWorkers", 1, [],
"assign-worker-cave-excavation-station",
"unassign-worker-cave-excavation-station",
"cave-excavation-station-workers",
function() { // + function, called when worker is assigned
console.log("cave plus+ clicked");
terraformAssignedDiggers++;
},
function() { // - function, called when worker is unassigned
terraformAssignedDiggers--;
},
maxActiveDiggers
);
},
{
biomites: 200,
zymers: 250,
fibers: 50,
algae: 10
}
);
allResearchProjects['AdvancedTunnelingI'] = advancedTunnelingIResearch;
// Advanced Tunneling II Research
let advancedTunnelingIIResearch = new ResearchProject(
"Advanced Tunneling II",
230000, // Time required to complete the research: 7500 milliseconds
7500, // Total information cost: 7500 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("AdvancedTunnelingIIButton");
researchButton.innerText = "Advanced Tunneling II (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
researchButton.parentElement.style.display = 'none';
displayOnChat("You can now send up to 5 excavators into the abyss, their solitude as expanded as the tunnels they create. ");
advancedTunnelingResearchIICompleted = true; // Flag to check if this research is completed
markResearchComplete('AdvancedTunnelingII'); // Removes from queue and adds to completed research queue
populateResearchTab(); // Unlock more research
// Update the maximum allowed active workers for cave excavation.
updateMaxActiveDiggers(maxActiveDiggers+2);
setupWorkerAssignment("Cave Excavation Station", "caveExcavationStationWorkers", 1, [],
"assign-worker-cave-excavation-station",
"unassign-worker-cave-excavation-station",
"cave-excavation-station-workers",
function() { // + function, called when worker is assigned
console.log("cave plus+ clicked");
terraformAssignedDiggers++;
},
function() { // - function, called when worker is unassigned
terraformAssignedDiggers--;
},
maxActiveDiggers
);
},
{
biomites: 250,
zymers: 300,
fibers: 200,
sludge: 95,
algae: 35
}
);
allResearchProjects['AdvancedTunnelingII'] = advancedTunnelingIIResearch;
// Advanced Tunneling III Research
let advancedTunnelingIIIResearch = new ResearchProject(
"Advanced Tunneling III",
550000, // Time required to complete the research: 10,000 milliseconds (adjusted for a more advanced research)
750000, // Total information cost: 750,000 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("AdvancedTunnelingIIIButton");
researchButton.innerText = "Advanced Tunneling III (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
researchButton.parentElement.style.display = 'none';
displayOnChat("Through advanced seismic imaging, the excavators' precision and understanding have reached new heights. The cave's secrets are now more accessible than ever.");
advancedTunnelingIIIResearchCompleted = true; // Flag to check if this research is completed
markResearchComplete('AdvancedTunnelingIII'); // Removes from queue and adds to completed research queue
researchQueue.push('AdvancedTunnelingIV');
populateResearchTab(); // Unlock more research
// Update the maximum allowed active workers for cave excavation.
updateMaxActiveDiggers(maxActiveDiggers+2);
setupWorkerAssignment("Cave Excavation Station", "caveExcavationStationWorkers", 1, [],
"assign-worker-cave-excavation-station",
"unassign-worker-cave-excavation-station",
"cave-excavation-station-workers",
function() { // + function, called when worker is assigned
console.log("cave plus+ clicked");
terraformAssignedDiggers++;
},
function() { // - function, called when worker is unassigned
terraformAssignedDiggers--;
},
maxActiveDiggers
);
},
{
biomites: 800,
zymers: 600,
fibers: 700,
sludge: 200,
algae: 100
}
);
allResearchProjects['AdvancedTunnelingIII'] = advancedTunnelingIIIResearch;
// Advanced Tunneling IV Research
let advancedTunnelingIVResearch = new ResearchProject(
"Advanced Tunneling IV",
900000, // Time required to complete the research: 500,000 milliseconds (double the previous level)
1250000, // Total information cost: 1,250,000 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("AdvancedTunnelingIVButton");
researchButton.innerText = "Advanced Tunneling IV (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
researchButton.parentElement.style.display = 'none';
displayOnChat("The excavators' capability reaches a new zenith with Advanced Tunneling IV. The depths of the cave yield their secrets more readily, and the mysteries of the subterranean realm are laid bare before your unyielding pursuit of knowledge.");
advancedTunnelingIVResearchCompleted = true; // Flag to check if this research is completed
markResearchComplete('AdvancedTunnelingIV'); // Removes from queue and adds to completed research queue
populateResearchTab(); // Unlock more research
// Update the maximum allowed active workers for cave excavation.
updateMaxActiveDiggers(maxActiveDiggers+8);
setupWorkerAssignment("Cave Excavation Station", "caveExcavationStationWorkers", 1, [],
"assign-worker-cave-excavation-station",
"unassign-worker-cave-excavation-station",
"cave-excavation-station-workers",
function() { // + function, called when worker is assigned
console.log("cave plus+ clicked");
terraformAssignedDiggers++;
},
function() { // - function, called when worker is unassigned
terraformAssignedDiggers--;
},
maxActiveDiggers
);
},
{
biomites: 8000,
zymers: 6000,
fibers: 7000,
sludge: 2000,
algae: 1000
}
);
allResearchProjects['AdvancedTunnelingIV'] = advancedTunnelingIVResearch;
// Memory Imprints I Research
let memoryImprintsIResearch = new ResearchProject(
"Memory Imprints I",
145000, // Time required to complete the research: 45,000 milliseconds
45000, // Total information cost: 45,000 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("MemoryImprintsIButton");
researchButton.innerText = "Memory Imprints I (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
researchButton.parentElement.style.display = 'none';
displayOnChat("Groundbreaking discoveries in cellular memory have enhanced the diggers' endurance. They can now work for extended durations without returning.");
memoryImprintsICompleted = true; // Flag to check if this research is completed
markResearchComplete('MemoryImprintsI'); // Removes from queue and adds to completed research queue
researchQueue.push('MemoryImprintsII');
populateResearchTab(); // Unlock more research
// Increase the global caveDiggerLifespan variable by 3x
caveDiggerLifespan *= 3;
},
{
biomites: 100,
zymers: 100
}
);
allResearchProjects['MemoryImprintsI'] = memoryImprintsIResearch;
// Memory Imprints II Research
let memoryImprintsIIResearch = new ResearchProject(
"Memory Imprints II",
225000, // Time required to complete the research: 55,000 milliseconds
55000, // Total information cost: 55,000 i
function() {
// This is the onCompletion callback.
let researchButton = document.getElementById("MemoryImprintsIIButton");
researchButton.innerText = "Memory Imprints II (Completed)";
researchButton.setAttribute('data-status', 'completed');
researchButton.style.color = "#777"; // This line changes the color of the text inside the button
researchButton.parentElement.style.display = 'none';
displayOnChat("Further advancements in cellular memory allow the diggers to traverse even longer distances. Their energy reserves are incredible.");
memoryImprintsIICompleted = true; // Flag to check if this research is completed
markResearchComplete('MemoryImprintsII'); // Removes from queue and adds to completed research queue
researchQueue.push('MemoryImprintsIII');
populateResearchTab(); // Unlock more research
// Increase the global caveDiggerLifespan variable by another 3x
caveDiggerLifespan *= 3;
},
{
fibers: 200
}
);
allResearchProjects['MemoryImprintsII'] = memoryImprintsIIResearch;
// Memory Imprints III Research
let memoryImprintsIIIResearch = new ResearchProject(
"Memory Imprints III",
255000, // Time required to complete the research: 65,000 milliseconds