-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathboosts.js
13894 lines (12872 loc) · 418 KB
/
boosts.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
/**************************************************************
* Boosts
*
* New boosts should only be added to the END of the list!
*************************************************************/
Molpy.DefineBoosts = function() {
Molpy.groupNames = {
boosts: ['boost', 'Boosts', 'boost'],
badges: ['badge', 'Badges', 'badge'],
hpt: ['hill people tech', 'Hill People Tech', 'hillpeopletech'],
ninj: ['ninjutsu', 'Ninjutsu', 'ninjutsu'],
chron: ['chronotech', 'Chronotech', 'chronotech'],
cyb: ['cybernetics', 'Cybernetics', 'cybernetics'],
bean: ['beanie tech', 'Beanie Tech', 'beanietech'],
ceil: ['ceiling', 'Ceilings', 'glassceiling12'],
drac: ['draconic', 'Draconic', 'draconic'],
stuff: ['stuff', 'Stuff', 'stuff'],
land: ['land', 'Land'],
prize: ['prize', 'Prizes', 'prizes'],
discov: ['discovery', 'Discoveries', 'discov', 'Discovery', 'A memorable discovery'],
monums: ['sand monument', 'Sand Monuments', 'sandmonument', 'Sand Monument', 'A sand structure commemorating'],
monumg: ['glass monument', 'Glass Monuments', 'glassmonument', 'Glass Monument', 'A glass sculpture commemorating'],
diamm: ['masterpiece', 'Masterpieces', 'masterpiece' ,'Masterpiece', 'This is a diamond masterpiece.<br>All craftottership is of the highest quality.<br>On the masterpiece is an image of', 'in diamond. <br>It molpifies with spikes of treeishness.'],
faves: ['favourites', 'Favourites'],
magic: ['magic', 'Magic'],
dimen: ['dimension tech', 'Dimension Tech'],
varie: ['variegation', 'Variegation', 'varie'],
};
Molpy.unlockedGroups['stuff'] = 1; // Stuff is always unlocked because Sand and Castles are always unlocked
Molpy.nextBageGroup = {discov: 'monums', monums: 'monumg'};// ,monumg:'diamm'};
new Molpy.Boost({
name: 'Bigger Buckets',
icon: 'biggerbuckets',
desc: 'Raises sand rate of buckets and clicks',
price: {
Sand: 500,
Castles: 0,
},
stats: 'Adds 0.1 S/mNP to each Bucket, before multipliers'
});
new Molpy.Boost({
name: 'Huge Buckets',
icon: 'hugebuckets',
desc: 'Doubles sand rate of buckets and clicks',
price: {
Sand: 800,
Castles: 2
}
});
new Molpy.Boost({
name: 'Helping Hand',
icon: 'helpinghand',
desc: 'Raises sand rate of Cuegan',
price: {
Sand: 500,
Castles: 2,
},
stats: 'Adds 0.2 S/mNP to each Cuegan, before multipliers'
});
new Molpy.Boost({
name: 'Cooperation',
icon: 'cooperation',
desc: 'Boosts sand rate of Cuegan cumulatively by 5% per pair of buckets',
price: {
Sand: 2000,
Castles: 4,
},
stats: function() {
if(Molpy.Got('Cooperation')) {
var mult = Math.pow(1.05, Math.floor(Molpy.SandTools['Bucket'].amount / 2));
return 'Multiplies Cuegans\' sand production by ' + Molpify(mult * 100, 2) + '%';
}
return 'Boosts sand rate of Cuegan cumulatively by 5% per pair of buckets';
}
});
new Molpy.Boost({
name: 'Spring Fling',
icon: 'springfling',
desc: 'Trebuchets build an extra Castle',
price: {
Sand: 1000,
Castles: 6
},
});
new Molpy.Boost({
name: 'Trebuchet Pong',
icon: 'trebpong',
desc: 'Boosts sand rate of buckets cumulatively by 50% per pair of trebuchets',
stats: function() {
return 'Sand rate of buckets is multiplied by '
+ Molpify(Math.pow(1.5, Math.floor(Molpy.CastleTools['Trebuchet'].amount / 2)));
},
price: {
Sand: 3000,
Castles: 6
},
});
new Molpy.Boost({
name: 'Molpies',
icon: 'molpies',
desc: 'Increases sand dig rate based on Badges',
price: {
Sand: 5000,
Castles: 5,
},
stats: function() {
if(Molpy.Got('Molpies')) {
var mult = 0.01 * Molpy.BadgesOwned;
return 'Increases sand dig rate by ' + Molpify(mult * 100, 2) + '%';
}
return 'Increases sand dig rate by 1% per Badge earned';
}
});
new Molpy.Boost({
name: 'Busy Bot',
icon: 'busybot',
group: 'cyb',
desc: 'NewPixBots activate 10% sooner',
price: {
Sand: 900,
Castles: 4
},
});
new Molpy.Boost({
name: 'Stealthy Bot',
icon: 'stealthybot',
group: 'ninj',
desc: 'NewPixBots activate 10% sooner',
price: {
Sand: 1200,
Castles: 5
},
});
new Molpy.Boost({
name: 'Flag Bearer',
icon: 'flagbearer',
desc: 'Flags are more powerful',
price: {
Sand: 5500,
Castles: 8,
},
stats: 'Each flag produces 2 extra sand/mNP, before multipliers'
});
new Molpy.Boost({
name: 'War Banner',
icon: 'warbanner',
desc: 'Trebuchets only destroy 1 castle',
price: {
Sand: 3000,
Castles: 10
},
});
new Molpy.Boost({
name: 'Magic Mountain',
icon: 'magicmountain',
desc: 'Flags are much more powerful',
price: {
Sand: 8000,
Castles: 15,
},
stats: 'Multiplies Flag sand rate by 2.5'
});
new Molpy.Boost({
name: 'Extension Ladder',
icon: 'extensionladder',
desc: 'Ladders reach a little higher',
price: {
Sand: '12K',
Castles: 22,
},
stats: 'Each ladder produces 18 more sand per mNP, before multipliers'
});
new Molpy.Boost({
name: 'Level Up!',
icon: 'levelup',
desc: 'Ladders are much more powerful',
price: {
Sand: '29K',
Castles: 34,
},
stats: 'Ladders produce twice as much Sand'
});
new Molpy.Boost({
name: 'Varied Ammo',
icon: 'variedammo',
desc: 'Trebuchets build an extra castle for each Castle Tool you have 2+ of',
price:{
Sand: 3900,
Castles: 48,
},
stats: function() {
if(Molpy.Got('Varied Ammo')) {
var val = 0;
for( var i in Molpy.CastleTools)
if(Molpy.CastleTools[i].amount > 1) val++;
return 'Each trebuchet produces ' + Molpify(val) + ' more castles per ONG, before multipliers';
}
return 'For each kind of Castle Tool of which you have 2 or more, each trebuchet produces an additional castle per ONG, before multipliers';
}
});
new Molpy.Boost({
name: 'Megball',
icon: 'megball',
desc: 'Cuegan produce double sand',
price:{
Sand: 10700,
Castles: 56
},
});
new Molpy.Boost({
name: 'Robot Efficiency',
icon: 'robotefficiency',
group: 'cyb',
desc: 'Newpixbots build an extra castle (before any doubling)',
price:{
Sand: '34K',
Castles: 153
},
});
new Molpy.Boost({
name: 'Ninja Builder',
icon: 'ninjabuilder',
group: 'ninj',
desc: 'When incrementing ninja stealth streak, builds that many castles',
price:{
Sand: 4000,
Castles: 35,
},
stats: function() {
if(Molpy.Got('Ninja Builder'))
return 'Will build ' + Molpify(Molpy.CalcStealthBuild(1), 3) + ' Castles unless you destealth ninjas';
return 'Ninja Stealth increments the first time you click within a NewPix after NewPixBots activate. It will reset if you click before NewPixBots activate, or don\'t click before the next ONG.'
}
});
new Molpy.Boost({
name: 'Erosion',
icon: 'erosion',
desc: 'Waves destroy less by 20% of total castles wasted by waves, and ' + '2 less per River bought',
price:{
Sand: '40K',
Castles: 77
},
});
new Molpy.Boost({
name: 'Autosave Option',
icon: 'autosave',
desc: 'Autosave option is available',
price:{
Sand: 100,
Castles: 4
},
});
new Molpy.Boost({
name: 'Helpful Hands',
icon: 'helpfulhands',
desc: 'Each Cuegan+Bucket pair gives clicking +0.5 sand',
price:{
Sand: 250,
Castles: 5
},
});
new Molpy.Boost({
name: 'True Colours',
icon: 'truecolours',
desc: 'Each Cuegan+Flag pair gives clicking +5 sand',
price:{
Sand: 750,
Castles: 15,
},
});
new Molpy.Boost({
name: 'Precise Placement',
icon: 'preciseplacement',
desc: 'For every two ladders, scaffolds destroy one less castle',
price:{
Sand: 8750,
Castles: 115
},
});
new Molpy.Boost({
name: 'Ninja Hope',
icon: 'ninjahope',
group: 'ninj',
desc: 'Avoid one Ninja Stealth reset, at the cost of 10 castles',
price:{
Sand: 7500,
Castles: 40,
},
startPower: 1
});
new Molpy.Boost({
name: 'Ninja Penance',
icon: 'ninjapenance',
group: 'ninj',
desc: 'Avoid a two Ninja Stealth resets, at the cost of 30 castles each',
price:{
Sand: '25K',
Castles: 88,
},
startPower: 2
});
new Molpy.Boost({
name: 'Blitzing',
icon: 'blitzing',
className: 'alert',
desc: function(me) {
if (!me.bought) return 'Boosts sand rate. Currently locked.';
if(!Molpy.Got('Sea Mining'))return Molpify(me.power, 1) + '% Sand for ' + MolpifyCountdown(me.countdown);
else if(Molpy.Redacted.totalClicks < 1e6) return 'Beach digs will give Coal for ' + MolpifyCountdown(me.countdown);
},
startCountdown: 23, // only used when loading to ensure it doesn't get stuck. any true value would do here
countdownCMS: 1,
lockFunction: function() {
if(Molpy.Got('Sea Mining')){
Molpy.LockBoost('Sea Mining');
}
},
});
new Molpy.Boost({
name: 'Kitnip',
icon: 'kitnip',
desc: Molpy.Redacted.words + ' come more often and stay longer',
price:{
Sand: 33221,
Castles: 63
},
});
new Molpy.Boost({
name: 'Department of Redundancy Department',
alias: 'DoRD',
icon: 'department',
group: 'hpt',
desc: Molpy.Redacted.words + ' sometimes unlock special boosts',
price:{
Sand: 23456,
Castles: 78
},
});
new Molpy.Boost({
name: 'Raise the Flag',
icon: 'raisetheflag',
desc: 'Each Flag+Ladder pair gives clicking an extra +50 sand',
price:{
Sand: '85K',
Castles: 95
},
});
new Molpy.Boost({
name: 'Hand it Up',
icon: 'handitup',
desc: 'Each Ladder+Bag pair gives clicking an extra +500 sand',
price:{
Sand: '570K',
Castles: 170,
},
department: 1
});
new Molpy.Boost({
name: 'Riverish',
icon: 'riverish',
desc: 'Rivers destroy less castles the more you click',
price:{
Sand: '82K',
Castles: 290,
},
department: 1,
buyFunction: function() {
this.power = Molpy.beachClicks;
}
});
new Molpy.Boost({
name: 'Monty Haul Problem',
alias: 'MHP',
icon: 'monty',
className: 'action',
desc: function(me) {
if(!me.bought) return('There are three doors, which conceal unfabulous prizes!');
var str = '';
for( var i in Molpy.MontyDoors) {
var door = Molpy.MontyDoors[i];
if(door != me.goat) {
str += '<input type="Button" value="Choose Door ' + door + '" onclick="Molpy.Monty(\''
+ door + '\')"><br>'
} else {
if(Molpy.Got('Beret Guy')) {
str += '<input type="Button" value="Take goat" onclick="Molpy.Monty(\'' + door + '\')"><br>'
} else {
str += 'Door ' + door + ' is a goat<br>';
}
}
}
str += 'Choose a door! You might gain half your current Castles, or you might lose them all and get a Goat';
if(Molpy.IsEnabled('HoM'))
str += '<br>With Hall of Mirrors, you also stand to gain a fifth of your Glass Chip Storage balance, or lose a third of it.';
return str;
},
price:{
Sand: function() {
var p = Molpy.Boosts['MHP'].power;
return 100 * Math.pow(2, Math.max(1, p - 9));
},
GlassBlocks: function() {
if(!Molpy.IsEnabled('HoM')) return 0;
var p = Molpy.Boosts['MHP'].power;
return 100 * Math.pow(2, Math.max(1, p - 15));
},
},
lockFunction: function() {
this.power++;
this.goat = 0;
this.prize = 0;
},
unlockFunction: function() {
this.prize = Molpy.GetDoor();
},
loadFunction: function() { Molpy.LockBoost('MHP') },
department: 0,
});
Molpy.MontyDoors = ['A', 'B', 'C'];
Molpy.Monty = function(door) {
Molpy.Anything = 1;
var me = Molpy.Boosts['MHP'];
me.door = door;
if(!me.bought) {
Molpy.Notify('Buy it first, silly molpy!',1);
return;
}
if(me.goat) {
if(me.door == me.goat && !Molpy.Got('Beret Guy')) {
Molpy.Notify('That door has already been opened.',1);
return;
}
Molpy.RewardMonty();
} else {
Function('me', Molpy.BeanishToCuegish(Molpy.MontyMethod))(me);
if(me.goat) {
Molpy.Notify('Door ' + me.goat + ' is opened, revealing a goat!<br>You may switch from Door ' + me.door
+ ' if you like.', 0);
me.Refresh();
return;
} else {
Molpy.RewardMonty();
}
}
Molpy.LockBoost('MHP');
}
Molpy.GetDoor = function() {
return GLRschoice(Molpy.MontyDoors);
}
Molpy.RewardMonty = function() {
var me = Molpy.Boosts['MHP'];
if(me.door == me.prize) {
var amount = Molpy.Boosts['Castles'].power;
Molpy.Notify('Hooray, you found the prize behind door ' + me.door + '!',0);
Molpy.Boosts['Castles'].build(Math.floor(Molpy.Boosts['Castles'].power / 2), 1);
if(Molpy.IsEnabled('HoM')) Molpy.Add('GlassChips', Math.floor(Molpy.Boosts['GlassChips'].power / 5), 1);
if(Molpy.Got('Gruff')) Molpy.GetYourGoat(3);
} else {
Molpy.Destroy('Castles', Molpy.Boosts['Castles'].power);
Molpy.Boosts['MHP'].power = Math.ceil(Math.floor(Molpy.Boosts['MHP'].power / 1.8));
if(Molpy.IsEnabled('HoM')) Molpy.Spend('GlassChips', Math.floor(Molpy.Boosts['GlassChips'].power / 3));
Molpy.GetYourGoat(1);
}
}
Molpy.GetYourGoat = function(n) {
Molpy.Add('Goats', n);
if(Molpy.Has('Goats', 2)) Molpy.EarnBadge('Second Edition');
if(Molpy.Has('Goats', 20)) Molpy.UnlockBoost('HoM');
if(Molpy.Has('Goats', 200)) Molpy.UnlockBoost('Beret Guy');
if (n== 1)
Molpy.Notify('You got a goat!',0);
else
Molpy.Notify('You got '+n+' goats!',0);
}
new Molpy.Boost({
name: 'Grapevine',
icon: 'grapevine',
desc: 'Increases sand dig rate by 2% per badge earned',
price:{
Sand: '25K',
Castles: 25,
},
department: 1,
stats: function() {
if(Molpy.Got('Grapevine')) {
var mult = 0.02 * Molpy.BadgesOwned;
return 'Increases sand dig rate by ' + Molpify(mult * 100, 2) + '%';
}
return 'Increases sand dig rate by 2% per Badge earned';
}
});
new Molpy.Boost({
name: 'Affordable Swedish Home Furniture',
alias: 'ASHF',
icon: 'ashf',
group: 'hpt',
className: 'alert',
desc: function(me) {
if (!me.bought) return 'Gives a discount on all boosts purchased. Currently locked.';
return Molpify(me.power * 100, 1) + '% off all items for ' + MolpifyCountdown(me.countdown)
},
buyFunction: function() {
Molpy.shopNeedUpdate = 1;
Molpy.CalcPriceFactor();
Molpy.Donkey();
},
countdownFunction: function() {
if(this.countdown == 2) {
Molpy.Notify('Only 2mNP of discounts remain!');
}
},
lockFunction: function() {
var pp = Molpy.Boosts['Price Protection'];
if(pp.IsEnabled)
pp.power = pp.bought + 1;
else
Molpy.UnlockBoost(pp.alias);
},
startPower: function() {
if(Molpy.Got('GoldCard')) return 0.6;
if(Molpy.Got('SilverCard')) return 0.5;
return 0.4;
},
countdownCMS: 1,
startCountdown: function() {
if(Molpy.Got('Late Closing Hours')) {
return 10;
}
return 5;
},
department: 1
});
new Molpy.Boost({
name: 'Overcompensating',
icon: 'overcompensating',
desc: function(me) {
return 'During LongPix, Sand Tools dig ' + Molpify(me.startPower * 100, 1) + '% extra sand'
},
price:{
Sand: 987645,
Castles: 321,
},
startPower: 1.5
});
new Molpy.Boost({
name: 'Doublepost',
icon: 'doublepost',
desc: 'During LongPix, Castle Tools activate a second time.',
price:{
Sand: '650K',
Castles: 4000
},
stats: function(me) {
var target = Molpy.SafetyTarget();
return 'During LongPix, Castle Tools activate a second time.'
+ '<br>Returning to shortpix will '
+ (Molpy.Got('Safety Blanket') ? 'disable' : 'lock')
+ ' this boost.'
+ '<br>You have done this ' + Molpy.Boosts['Safety Net'].power
+ ' time' + plural(Molpy.Boosts['Safety Net'].power) + '.'
+ (target[0] ? ('<br>Next boost at: ' + Molpify(target[0], 3)) : '');
},
department: 0,
});
Molpy.SafetyTarget = function() {
if(!Molpy.Boosts['Safety Net'].unlocked)
return [10, 'Safety Net'];
if(!Molpy.Boosts['Safety Blanket'].unlocked)
return [50, 'Safety Blanket'];
if(Molpy.Got('Vacuum Cleaner') && !Molpy.Boosts['Overtime'].unlocked)
return [222, 'Overtime'];
if(Molpy.Got('Overtime') && !Molpy.Boosts['Time Dilation'].unlocked)
return [555, 'Time Dilation'];
return [0, ''];
};
new Molpy.Boost({
name: 'Coma Molpy Style',
icon: 'comamolpystyle',
className: 'toggle',
desc: function(me) {
return (me.IsEnabled ? '' : 'When active, ')
+ 'the ONG clock is frozen.<br>(Castle Tools do not activate and ninjas stay stealthed.)<br><input type="Button" onclick="Molpy.ComaMolpyStyleToggle()" value="'
+ (me.IsEnabled ? 'Dea' : 'A') + 'ctivate"></input>';
},
IsEnabled: Molpy.BoostFuncs.BoolPowEnabled,
price:{
Sand: 8500,
Castles: 200
},
});
Molpy.cmsline = 0;
Molpy.ComaMolpyStyleToggle = function() {
Molpy.Anything = 1;
var me = Molpy.Boosts['Coma Molpy Style'];
Molpy.Notify(Molpy.cms[Molpy.cmsline]);
Molpy.cmsline++;
if(Molpy.cmsline >= Molpy.cms.length) {
Molpy.cmsline = 0;
if(!me.bought) {
me.buy();
if(me.bought) Molpy.RewardRedacted();
}
}
if(!me.bought) {
return;
}
var acPower = Molpy.Boosts['Coma Molpy Style'].power;
if(acPower) {
acPower = 0; // off
Molpy.ONGstart = ONGsnip(dayjs()); // don't immediately ONG!
} else {
acPower = 1; // on
}
g('clockface').className = acPower ? 'hidden' : 'unhidden';
Molpy.Boosts['Coma Molpy Style'].power = acPower;
Molpy.Boosts['Coma Molpy Style'].Refresh();
Molpy.RatesRecalculate();
}
new Molpy.Boost({
name: 'Time Travel',
icon: 'timetravel',
group: 'chron',
className: 'action',
desc: function(me) {
var price = Molpy.TimeTravelPrice();
return 'Pay ' + Molpify(price, 2) + ' Castles to move <input type="Button" onclick="Molpy.TimeTravel('
+ (-me.power) + ');" value="backwards"></input> or <input type="Button" onclick="Molpy.TimeTravel('
+ me.power + ');" value="forwards"></input> ' + Molpify(me.power) + ' NP in Time';
},
price:{
Sand: 1000,
Castles: 30,
},
buyFunction: function() {
this.power = 1;
},
// Saved Unique Properties
travelCount: 0,
defSave: 1,
saveData: {4:['travelCount', 0, 'int']}
});
Molpy.TimeTravelPrice = function() {
var price = Molpy.newpixNumber;
price += Molpy.Boosts['Castles'].power * Molpy.newpixNumber / 3094;
price += Molpy.Boosts['Time Travel'].travelCount;
if(Molpy.Got('Flux Capacitor')) price = Math.ceil(price * .2);
price = Math.ceil(price / Molpy.priceFactor); // BECAUSE TIME TRAVEL
// AMIRITE?
if(price < 0) price *= -1;
if(price > Molpy.Boosts['Castles'].power) Molpy.Boosts['Flux Capacitor'].department = 1;
if(isNaN(price)) price = Infinity;
return price;
}
Molpy.TimeTravel = function(NP) {
Molpy.Anything = 1;
var oldNP=Molpy.newpixNumber;
var frac = Number((Math.abs(Molpy.newpixNumber)-Math.floor(Math.abs(Molpy.newpixNumber))).toFixed(3));
var sign = Math.sign(Molpy.newpixNumber);
if(Molpy.TTT(Number((sign*(Math.floor(Math.abs(Molpy.newpixNumber))+frac)+ NP).toFixed(3)), 0)) {
if(oldNP>0)
{
if(NP > 0) Molpy.EarnBadge('Fast Forward');
if(NP < 0) Molpy.EarnBadge('And Back');
}else if(oldNP<0){
if(NP > 0) Molpy.EarnBadge('Forward to the Past');
if(NP < 0) Molpy.EarnBadge('Stuck in Reverse');
}
var t = Molpy.Boosts['Time Travel'].travelCount;
if(t >= 10) Molpy.EarnBadge('Primer');
if(t >= 20) Molpy.UnlockBoost('Flux Capacitor');
if(t >= 30 && Molpy.Got('Flux Capacitor')) Molpy.UnlockBoost('Flux Turbine');
if(t >= 40) Molpy.EarnBadge('Wimey');
if(t >= 160) Molpy.EarnBadge('Hot Tub');
if(t >= 640) Molpy.EarnBadge("Dude, Where's my DeLorean?");
}
}
// targeted time travel!
Molpy.TTT = function(np, chips, silence) {
var oldnp = Molpy.newpixNumber;
Molpy.Anything = 1
chips = chips ? (chips == 1?Molpy.CalcJumpEnergy(np):Infinity) : 0;
var price = Molpy.TimeTravelPrice();
if(chips) price = 0;
if(np < 1 && !Molpy.Earned('Minus Worlds') && !Molpy.Earned('Absolute Zero')) {
Molpy.Notify('Heretic!',1);
Molpy.Notify('There is nothing before time.',1);
return;
}
if(Math.sign(Math.floor(Math.abs(np)))== 0 && Math.sign(oldnp)!== 0 && !Molpy.Earned('Absolute Zero')) {
Molpy.Notify('Divide by zero error!',1);
return;
}
if(Math.sign(Math.floor(Math.abs(np)))== 0 && Math.sign(oldnp)!== 0 && Molpy.Earned('Absolute Zero')) {
Molpy.Notify('You cannot pass into NP0 directly;<br>charge your signpost.',1);
return;
}
if(Number((Math.abs(np)-Math.floor(Math.abs(np))).toFixed(3)) !== Number((Math.abs(oldnp)-Math.floor(Math.abs(oldnp))).toFixed(3))){
Molpy.Notify('You can not travel across timelines.',1);
Molpy.Notify('Travel to NP 0 first.',1);
return;
}
if(oldnp == 0 && Math.abs(np) < 3095) {
Molpy.Notify('Only absconding to the edge of Time will avail you now.',1);
Molpy.EarnBadge('The Big Freeze');
return;
}
if(Math.floor(Math.abs(np)) > Math.floor(Math.abs(Molpy.largestNPvisited[Number((Math.abs(np)-Math.floor(Math.abs(np))).toFixed(3))]))) {
Molpy.Notify('Wait For It',1);
return;
}
if(!Molpy.Boosts['Time Travel'].bought && !chips) {
Molpy.Notify('In the future, you\'ll pay for this!',1);
return;
}
if(Molpy.Boosts['Castles'].power >= price || chips) {
if(!Molpy.Spend('GlassChips', chips)) {
Molpy.Notify('Great Scott, there\'s a hole in the glass tank!',1);
return;
}
Molpy.Spend('Castles', price);
if(Molpy.Earned('discov' + Molpy.newpixNumber)) Molpy.Badges['discov' + Molpy.newpixNumber].Refresh();
if(oldnp != np && np == Molpy.highestNPvisited && Molpy.Boosts['kitkat'].prey.length >= 24) Molpy.UnlockBoost('PG');
Molpy.newpixNumber = np;
Molpy.Boosts['Signpost'].power = 0;
if(Molpy.Earned('discov' + Molpy.newpixNumber)) Molpy.Badges['discov' + Molpy.newpixNumber].Refresh();
Molpy.ONGstart = ONGsnip(dayjs());
Molpy.HandlePeriods();
Molpy.UpdateBeach();
if(!silence) Molpy.Notify('Time Travel successful! Welcome to NewPix ' + Molpify(Math.floor(Molpy.newpixNumber)));
Molpy.Boosts['Time Travel'].travelCount++;
if(Molpy.Boosts['Time Travel'].travelCount >= 10 && !silence) Molpy.HandleInvaders(chips);
Molpy.Boosts['Time Travel'].Refresh();
if(chips && Molpy.Got('Crystal Memories') && Molpy.Got('Flux Surge')) {
var c = Molpy.Got('TDE') + 1;
Molpy.Boosts['Flux Surge'].countdown *= .5;
Molpy.Add('FluxCrystals', c);
Molpy.Notify('Great Scott! '+Molpify(c)+' flux crystal'+plural(c)+' materialized.');
}
Molpy.Boosts['Now Where Was I?'].Refresh();
Molpy.Boosts['PG'].Refresh();
Molpy.Boosts['kitkat'].Refresh();
Molpy.LockBoost('Muse');
Molpy.UpdateFaves();
return 1;
} else {
Molpy.Notify('<i>Castles</i>? Where we\'re going we do need... <i>castles</i>.',1);
}
}
Molpy.HandleInvaders = function(mem) {
var incursionFactor = Molpy.Got('AD') ? 1.5 : Molpy.Got('Flux Capacitor') ? 4 : (Molpy.Got('Flux Turbine') ? 8 : 20);
if(mem) incursionFactor *= 10;
if(!flandom(incursionFactor)) {
var npb = Molpy.CastleTools['NewPixBot'];
if(!Molpy.Boosts['NavCode'].power && npb.temp < 30) {
Molpy.Notify('You do not arrive alone');
npb.amount++;
npb.temp++;
npb.Refresh();
} else {
Molpy.Notify('Temporal Incursion Prevented!');
}
}
}
Molpy.CalcJumpEnergy = function(destNP) {
var gap = destNP - Molpy.newpixNumber;
var cost = gap * gap;
cost += Molpy.Boosts['Time Travel'].travelCount;
cost *= 100;
// Jumps between sides costs a lot more unless returning from the Minus side without having AA This is so
// that if one goes early you can return, but going again has to be expensive
if(destNP * Molpy.newpixNumber < 0) {
if(destNP < 0 || Molpy.Boosts['AA'].bought) cost *= 1000000;
}
if(destNP < 0 && !Molpy.Earned('discov' + destNP)) cost *= 1.1; // premium jumping using MM to unknwon discovery
if(Molpy.Got('Flux Capacitor')) cost *= .2;
if(Molpy.Got('Mind Glow') && Molpy.Earned('monums' + destNP)) cost *= .5;
if(Molpy.Got('Memory Singer') && Molpy.Earned('monumg' + destNP)) cost *= .5;
return Math.ceil(cost);
}
new Molpy.Boost({
name: 'Active Ninja',
icon: 'activeninja',
group: 'ninj',
desc: 'During LongPix, Ninja Stealth is incremented by 3 per NP. Is there an Echo in here?',
price:{
Sand: '1.5M',
Castles: 240
},
department: 0,
});
new Molpy.Boost({
name: 'Kitties Galore',
icon: 'kittiesgalore',
desc: 'Even more ' + Molpy.Redacted.words,
price:{
Sand: '2.5M',
Castles: 4400
},
department: 0,
});
new Molpy.Boost({
name: 'HAL-0-Kitty',
icon: 'halokitty',
group: 'cyb',
desc: 'NewPixBots build an extra Castle per 9 ' + Molpy.Redacted.words,
price:{
Sand: 9000,
Castles: 2001
},
});
new Molpy.Boost({
name: 'Factory Automation',
icon: 'factoryautomation',
group: 'hpt',
desc: function(me) {
var costs = '';
var i = me.power + 1;
var n = 0;
while(i--) {
var sand = 2000000 * Math.pow(100000, i);
costs += Molpify(sand);
n++;
if(n > 5) {
costs += ', then... ';
break;
}
if(i) costs += ', then ';
}
if(!me.power)
return 'When NewPixBots activate, so does the Department of Redundancy Department at a cost of '
+ costs
+ ' Sand, if you have at least 20 NewPixBots.<br>Can be upgraded if you have Doubleposting and ask the right person...';
return 'Level: ' + Molpify(me.power + 1, 3)
+ '<br>When NewPixBots activate, so does the Department of Redundancy Department at a cost of '
+ costs + ' Sand. Will activate less times if you don\'t have 20 bots per automation level.';
},
price:{
Sand: '4.5M',
Castles: 15700
},
});
new Molpy.Boost({
name: 'Blast Furnace',
icon: 'blastfurnace',
group: 'hpt',
desc: 'Gives the Department of Redundancy Department the ability to make Castles from Sand',
price:{
Sand: '8.8M',
Castles: 28600,
},
department : 0,
stats: function() {
var blastFactor = 1000;
if(Molpy.Got('Fractal Sandcastles')) {
blastFactor = Math.max(5, 1000 * Math.pow(0.94, Molpy.Boosts['Fractal Sandcastles'].power));
}
return 'Uses '
+ Molpify(2000000)
+ ' Sand to warm up, then makes Castles at a cost of '
+ Molpify(blastFactor, 1)
+ ' each. Can make up to a third of your total castles built (before accounting for any Flux Turbine bonus).';
}
});
new Molpy.Boost({
name: 'Sandbag',
icon: 'sandbag',
desc: 'Bags and Rivers give each other a cumulative 5% boost to Sand digging, Castle building, and Castle destruction (per River or Bag, respectively)',
price:{
Sand: '1.4M',
Castles: '21K'
},
});
new Molpy.Boost({
name: 'Embaggening',
icon: 'embaggening',
desc: 'Each Cuegan after the 14th gives a 2% boost to the sand dig rate of Bags',
price:{
Sand: '3.5M',
Castles: '23K'
},
});
new Molpy.Boost({
name: 'Carrybot',
icon: 'carrybot',
group: 'cyb',
desc: 'NewPixBots produce double castles, Buckets produce quadruple sand',
price:{
Sand: '10K',
Castles: '1K'
},
});
new Molpy.Boost({
name: 'Stickbot',
icon: 'stickbot',
group: 'cyb',
desc: 'NewPixBots produce double castles, Cuegan produce quadruple sand',
price:{
Sand: '50K',
Castles: '2.5K'
},
});
new Molpy.Boost({
name: 'Standardbot',
icon: 'standardbot',
group: 'cyb',
desc: 'NewPixBots produce double castles, Flags produce quadruple sand',
price:{
Sand: '250K',
Castles: 6250
},
});
new Molpy.Boost({
name: 'Climbbot',
icon: 'climbbot',
group: 'cyb',
desc: 'NewPixBots produce double castles, Ladders produce quadruple sand',
price:{
Sand: '1250K',
Castles: 15625
},
});
new Molpy.Boost({
name: 'Luggagebot',
icon: 'luggagebot',
group: 'cyb',
desc: 'NewPixBots produce double castles, Bags produce quadruple sand',
price:{
Sand: '6250K',
Castles: 39063
},
});
new Molpy.Boost({
name: 'Recursivebot',
icon: 'recursivebot',
group: 'cyb',
desc: 'NewPixBots produce double castles',
price:{
Sand: '50K',
Castles: '10K',
},
});
new Molpy.Boost({
name: 'Flingbot',
icon: 'flingbot',