-
Notifications
You must be signed in to change notification settings - Fork 191
/
config.js
13340 lines (13290 loc) · 512 KB
/
config.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
/* Trimps
Copyright (C) 2019 Zach Hood
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program (if you are reading this on the original
author's website, you can find a copy at
<trimps.github.io/license.txt>). If not, see
<http://www.gnu.org/licenses/>. */
//Spoilers ahead, proceed with caution
function newGame () {
var toReturn = {
global: {
//New and accurate version
stringVersion: '5.9.2',
//Leave 'version' at 4.914 forever, for compatability with old saves
version: 4.914,
isBeta: false,
betaV: 0,
killSavesBelow: 0.13,
uniqueId: new Date().getTime() + "" + Math.floor(Math.random() * 1e10),
playerGathering: "",
playerModifier: 1,
buildingsQueue: [],
timeLeftOnCraft: 0,
crafting: "",
timeLeftOnTrap: -1,
world: 1,
universe: 1,
gridArray: [],
mapGridArray: [],
mapsOwnedArray: [],
currentMapId: "",
lastClearedCell: -1,
lastClearedMapCell: -1,
pauseFight: true,
soldierHealth: 0,
soldierHealthMax: 0,
soldierHealthRemaining: 0,
soldierCurrentAttack: 0,
soldierCurrentBlock: 0,
soldierEnergyShield: 0,
soldierEnergyShieldMax: 0,
shieldLayersUsed: 0,
fighting: false,
health: 50,
attack: 6,
block: 0,
autoBattle: false,
autoCraftModifier: 0,
start: new Date().getTime(),
time: 0,
portalTime: new Date().getTime(),
lastFightUpdate: "",
battleCounter: 0,
firing: false,
mapsActive: false,
preMapsActive: false,
switchToMaps: false,
switchToWorld: false,
lookingAtMap: "",
mapsOwned: 0,
totalMapsEarned: 0,
freshFight: false,
tab: "All",
repeatMap: false,
buyAmt: 1,
numTab: 1,
spreadsheetMode: false,
lockTooltip: false,
portalActive: false,
mapsUnlocked: false,
lastOnline: 0,
buyTab: "all",
nextQueueId: 0,
kongBonusMode: false,
canRespecPerks: true,
respecActive: false,
heliumLeftover: 0,
viewingUpgrades: false,
totalPortals: 0,
totalRadPortals: 0,
lastCustomAmt: 1,
trapBuildAllowed: false,
trapBuildToggled: false,
lastSkeletimp: 0,
pp: [],
highestLevelCleared: 0,
highestRadonLevelCleared: 0,
b: 0,
challengeActive: "",
selectedChallenge: "",
multiChallenge: {},
lastOfflineProgress: "",
sLevel: 0,
portalColor: 0,
totalGifts: 0,
brokenPlanet: false,
formation: 0,
bestHelium: 0,
tempHighHelium: 0,
totalHeliumEarned: 0,
bestRadon: 0,
tempHighRadon: 0,
totalRadonEarned: 0,
radonLeftover: 0,
newUniverse: 1,
removingPerks: false,
lastBreedTime: 0,
antiStacks: 0,
prisonClear: 0,
frugalDone: false,
glassDone: false,
lastUnlock: 0,
lowestGen: -1,
breedBack: -1,
titimpLeft: 0,
mapBonus: 0,
mapRunCounter: 0,
mapCounterGoal: 0,
slowDone: false,
turkimpTimer: 0,
statsMode: "current",
achievementBonus: 0,
lastLowGen: 0,
presimptStore: "food",
lastWarp: 0,
zoneStarted: new Date().getTime(),
mapStarted: new Date().getTime(),
bionicOwned: 0,
roboTrimpLevel: 0,
roboTrimpCooldown: 0,
useShriek: false,
usingShriek: false,
autoUpgrades: false,
autoUpgradesAvailable: false,
autoPrestiges: 0,
autoStorage: false,
autoStorageAvailable: false,
totalVoidMaps: 0,
voidMapsToggled: false,
voidBuff: "",
lastVoidMap: 0,
voidSeed: Math.floor(Math.random() * 1000000),
scrySeed: Math.floor(Math.random() * 1000000),
heirloomSeed: Math.floor(Math.random() * 1000000),
coreSeed: Math.floor(Math.random() * 1000000),
heirloomBoneSeed: Math.floor(Math.random() * 1000000),
bestHeirloomSeed: Math.floor(Math.random() * 1000000),
eggSeed: Math.floor(Math.random() * 1000000),
mutationSeed: Math.floor(Math.random() * 1000000),
u2MutationSeed: Math.floor(Math.random() * 1000000),
enemySeed: Math.floor(Math.random() * 1000000),
u2WorldSeed: Math.floor(Math.random() * 1000000),
reincarnateSeed: Math.floor(Math.random() * 1000000),
//not to be confused with mutation seed of course
mutatedSeeds: 0,
mutatedSeedsSpent: 0,
u2MutationData: {},
showU2MutNames: false,
ogU2MutationSeed: -1,
heirloomsExtra: [],
heirloomsCarried: [],
StaffEquipped: {},
ShieldEquipped: {},
CoreEquipped: {},
nullifium: 0,
maxCarriedHeirlooms: 1,
selectedHeirloom: [],
lastPortal: -1,
lastRadonPortal: 0,
addonUser: false,
eggLoc: -1,
researched: false,
bonePortalThisRun: false,
maxSplit: 1,
maxSoldiersAtStart: -1,
playFabLoginType: -1,
lastCustomExact: 1,
voidMaxLevel: -1,
voidMaxLevel2: -1,
rememberInfo: false,
spireActive: false,
spireDeaths: 0,
Geneticistassist: false,
GeneticistassistSetting: -1,
GeneticistassistSteps: [-1, 1, 10, 30],
spireRows: 0,
goldenUpgrades: 0,
voidDeaths: 0,
essence: 0,
spentEssence: 0,
skeleSeed: Math.floor(Math.random() * 1000000),
decayDone: false,
dailyChallenge: {},
recentDailies: [],
dailyHelium: 0,
breedTime: 1,
magmite: 0,
magmaFuel: 0,
generatorMode: 1, //0 passive, 1 active, 2 hybrid
trimpsGenerated: 0,
timeSinceLastGeneratorTick: -1,
canMagma: true,
lastBonePresimpt: 0,
runningChallengeSquared: false,
totalSquaredReward: 0,
ArchaeologyDone: false,
archString: "",
archThresh: 50,
trackedAchieve: null,
mayhemCompletions: 0,
pandCompletions: 0,
desoCompletions: 0,
frigidCompletions: 0,
rageMutStacks: 0,
novaMutStacks: 0,
tabForMastery: true,
perkPresetU1: {
perkPreset1: {},
perkPreset2: {},
perkPreset3: {}
},
perkPresetU2: {
perkPreset1: {},
perkPreset2: {},
perkPreset3: {}
},
improvedAutoStorage: false,
firstCustomAmt: -1,
firstCustomExact: -1,
autoGolden: -1,
autoGoldenU2: -1,
autoStructureSetting: {enabled: false},
autoStructureSettingU2: {enabled: false},
autoJobsSetting: {enabled: false},
autoJobsSettingU2: {enabled: false},
autoEquipSetting: {enabled: false},
autoEquipSettingU2: {enabled: false},
autoEquipUnlocked: false,
passive: true,
spiresCompleted: 0,
lastSpireCleared: 0,
sugarRush: 0,
holidaySeed: Math.floor(Math.random() * 100000),
hideMapRow: false,
mapExtraBonus: "",
realBreedTime: 0,
fluffyExp: 0,
fluffyExp2: 0,
fluffyPrestige: 0,
fluffyPrestige2: 0,
selectedMapPreset: 1,
runFluffyExp: 0,
runTokens: 0,
bestTokens: 0,
genPaused: false,
canMapAtZone: false,
capTrimp: false,
lastSoldierSentAt: new Date().getTime(),
supervisionSetting: 100,
canScryCache: false,
waitToScry: false,
waitToScryMaps: false,
freeTalentRespecs: 3,
genStateConfig: [],
uberNature: "",
//For the log notation base
logNotBase: 10,
lowestShield: 100,
hemmTimer: 300,
armyAttackCount: 0,
fightAttackCount: 0,
mapHealthActive: false,
voidPowerActive: false,
stormDone: false,
exterminateDone: false,
parityBonus: 1,
parityMult: 0,
gammaMult: 0,
hazShieldCredit: 0,
zoneRes: [0],
alchemyUnlocked: false,
farmlandsUnlocked: false,
potionData: null,
potionAuto: null,
autoBattleData: null,
canGuString: false,
guString: "",
lastU2Voids: 0,
SB: 0,
tutorialStep: 0,
tutorialOpen: true,
tutorialActive: false,
tutorialLg: false,
mazBw: -1,
expandingTauntimp: false,
lastHeirlooms: {
u1: {
Shield: -1,
Staff: -1
},
u2: {
Shield: -1,
Staff: -1
}
},
mapPresets: {
p1: {
loot: 0,
difficulty: 0,
size: 0,
biome: "Random",
specMod: "0",
perf: false,
extra: 0,
offset: 'd'
},
p2: {
loot: 0,
difficulty: 0,
size: 0,
biome: "Random",
specMod: "0",
perf: false,
extra: 0,
offset: 'd'
},
p3: {
loot: 0,
difficulty: 0,
size: 0,
biome: "Random",
specMod: "0",
perf: false,
extra: 0,
offset: 'd'
},
p4: {
loot: 0,
difficulty: 0,
size: 0,
biome: "Random",
specMod: "0",
perf: false,
extra: 0,
offset: 'd'
},
p5: {
loot: 0,
difficulty: 0,
size: 0,
biome: "Random",
specMod: "0",
perf: false,
extra: 0,
offset: 'd'
}
},
mapPresets2: {
p1: {
loot: 0,
difficulty: 0,
size: 0,
biome: "Random",
specMod: "0",
perf: false,
extra: 0,
offset: 'd'
},
p2: {
loot: 0,
difficulty: 0,
size: 0,
biome: "Random",
specMod: "0",
perf: false,
extra: 0,
offset: 'd'
},
p3: {
loot: 0,
difficulty: 0,
size: 0,
biome: "Random",
specMod: "0",
perf: false,
extra: 0,
offset: 'd'
},
p4: {
loot: 0,
difficulty: 0,
size: 0,
biome: "Random",
specMod: "0",
perf: false,
extra: 0,
offset: 'd'
},
p5: {
loot: 0,
difficulty: 0,
size: 0,
biome: "Random",
specMod: "0",
perf: false,
extra: 0,
offset: 'd'
}
},
lootAvgs: {
food: {average:0, accumulator: 0},
wood: {average:0, accumulator: 0},
metal: {average:0, accumulator: 0},
gems: {average:0, accumulator: 0},
fragments: {average:0, accumulator: 0},
science: {average:0, accumulator: 0}
},
menu: {
buildings: true,
jobs: false,
upgrades: false
},
messages: {
Story: {
enabled: true
},
Loot: {
enabled: true,
primary: true,
secondary: true,
bone: true,
exotic: true,
helium: true,
voidMaps: true,
essence: true,
token: true,
magma: true,
events: true,
cache: true,
exp: true,
//runetrinkets: true,
},
Unlocks: {
enabled: true,
repeated: true,
unique: true
},
Combat: {
enabled: true,
trimp: true,
enemy: true
},
Notices: {
enabled: true
}
},
prestige: {
attack: 13,
health: 14,
cost: 57,
block: 10
},
difs: {
attack: 0,
health: 0,
block: 0,
trainers: 0
},
getEnemyAttack: function (level, name, ignoreImpStat) {
var world = getCurrentMapObject();
var amt = 0;
world = (game.global.mapsActive) ? world.level : game.global.world;
var attackBase = (game.global.universe == 2) ? 750 : 50;
amt += attackBase * Math.sqrt(world) * Math.pow(3.27, world / 2);
amt -= 10;
if (world == 1){
amt *= 0.35;
amt = (amt * 0.20) + ((amt * 0.75) * (level / 100));
}
else if (world == 2){
amt *= 0.5;
amt = (amt * 0.32) + ((amt * 0.68) * (level / 100));
}
else if (world < 60)
amt = (amt * 0.375) + ((amt * 0.7) * (level / 100));
else{
amt = (amt * 0.4) + ((amt * 0.9) * (level / 100));
amt *= Math.pow(1.15, world - 59);
}
if (world < 60) amt *= 0.85;
if (world > 6 && game.global.mapsActive) amt *= 1.1;
if (!ignoreImpStat)
amt *= game.badGuys[name].attack;
if (game.global.universe == 2){
var part1 = (world > 40) ? 40 : world;
var part2 = (world > 60) ? 20 : world - 40;
var part3 = (world - 60);
var part4 = (world - 300);
if (part2 < 0) part2 = 0;
if (part3 < 0) part3 = 0;
if (part4 < 0) part4 = 0;
amt *= Math.pow(1.5, part1);
amt *= Math.pow(1.4, part2);
amt *= Math.pow(1.32, part3);
amt *= Math.pow(1.15, part4);
}
return Math.floor(amt);
},
getEnemyHealth: function (level, name, ignoreImpStat) {
var world = getCurrentMapObject();
world = (game.global.mapsActive) ? world.level : game.global.world;
var amt = 0;
var healthBase = (game.global.universe == 2) ? 10e7 : 130;
amt += healthBase * Math.sqrt(world) * Math.pow(3.265, world / 2);
amt -= 110;
if (world == 1 || world == 2 && level < 10){
amt *= 0.6;
amt = (amt * 0.25) + ((amt * 0.72) * (level / 100));
}
else if (world < 60)
amt = (amt * 0.4) + ((amt * 0.4) * (level / 110));
else{
amt = (amt * 0.5) + ((amt * 0.8) * (level / 100));
amt *= Math.pow(1.1, world - 59);
}
if (world < 60) amt *= 0.75;
if (world > 5 && game.global.mapsActive) amt *= 1.1;
if (!ignoreImpStat)
amt *= game.badGuys[name].health;
if (game.global.universe == 2){
var part1 = (world > 60) ? 60 : world;
var part2 = (world - 60);
var part3 = (world - 300);
if (part2 < 0) part2 = 0;
if (part3 < 0) part3 = 0;
amt *= Math.pow(1.4, part1);
amt *= Math.pow(1.32, part2);
amt *= Math.pow(1.15, part3);
}
return Math.floor(amt);
}
},
herbs: {
Potatoes: {
owned: 0,
cowned: 0,
},
Mushrooms: {
owned: 0,
cowned: 0,
},
Seaweed: {
owned: 0,
cowned: 0,
},
Firebloom: {
owned: 0,
cowned: 0,
},
Berries: {
owned: 0,
cowned: 0,
},
},
empowerments: {
Poison: {
description: function () {
return "When this Empowerment is active, each successful attack by your Trimps stacks a debuff on the enemy, causing it to take <b>" + this.formatModifier(this.getModifier()) + "%</b> of the damage you dealt every attack until it dies. Each attack by your Trimps will further add to the poison effect.";
},
upgradeDescription: function () {
return "Increases the percentage of damage that sticks to enemies as poison during the Empowerment of Poison by <b>" + this.formatModifier(this.baseModifier) + "%</b>. You currently poison for <b>" + this.formatModifier(this.getModifier()) + "%</b>, and next level will cause you to poison for <b>" + this.formatModifier(this.getModifier(1)) + "%</b>.";
},
baseModifier: 0.01,
getModifier: function (change) {
if (!change) change = 0;
return ((this.getLevel() + change) * this.baseModifier);
},
formatModifier: function (number){
return prettify(number * 100);
},
getDamage: function(){
if (getEmpowerment() == "Poison" && getUberEmpowerment() == "Poison") return (this.currentDebuffPower * 2);
return this.currentDebuffPower;
},
getLevel: function(){
var level = this.level;
if (game.talents.nature2.purchased) level += 5;
return level;
},
getRetainBonus: function(){
var extra = 0;
if (game.talents.nature2.purchased){
extra += 5;
}
if (Fluffy.isRewardActive('naturesWrath')){
extra += 10;
}
return extra;
},
color: "#33bb33",
currentDebuffPower: 0,
level: 1,
retainLevel: 0,
tokens: 0,
nextUberCost: 0,
enlightenDesc: "your Trimps deal 3x damage, and Poison Nature stacks deal 2x damage"
},
Wind: {
description: function () {
return "When this Empowerment is active, each successful attack by your Trimps stacks a debuff on the enemy, causing winds to swell and knock extra resources into your reach. Each stack increases Helium gained from the World by <b>" + this.formatModifier(this.getModifier(0, true)) + "%</b> and increases all other basic resources gained from all sources by <b>" + this.formatModifier(this.getModifier()) + "%</b> until that enemy dies (maximum of " + this.stackMax() + " stacks). This bonus does not apply to Fragments, and the helium bonus does not apply to maps.";
},
upgradeDescription: function () {
var heMod = this.baseModifier;
if (Fluffy.isRewardActive("naturesWrath")) heMod *= 5;
return "Increases the amount of extra Helium you find in the World by <b>" + this.formatModifier(heMod) + "%</b> and non-Helium basic resources from all sources by <b>" + this.formatModifier(this.baseModifier * 10) + "%</b> per stack when the Empowerment of Wind is active. Your current bonus is <b>" + this.formatModifier(this.getModifier(0, true)) + "%</b> Helium, and next level will bring your bonus to <b>" + this.formatModifier(this.getModifier(1, true)) + "%</b> extra helium. Non-Helium resource gain is always " + ((Fluffy.isRewardActive('naturesWrath')) ? "double" : "10x") + " that of Helium, and the Helium bonus does not apply in maps.";
},
baseModifier: 0.001,
getModifier: function (change, forHelium) {
if (!change) change = 0;
var mod = ((this.getLevel() + change) * this.baseModifier);
if (!forHelium) mod *= 10;
if (forHelium && Fluffy.isRewardActive("naturesWrath")){
mod *= 5;
}
return mod;
},
formatModifier: function (number) {
return prettify(number * 100);
},
getCombatModifier: function (forHelium) {
var mod = this.currentDebuffPower * this.getModifier(0, forHelium);
return mod;
},
getLevel: function(){
var level = this.level;
if (game.talents.nature2.purchased) level += 5;
return level;
},
getRetainBonus: function(){
var extra = 0;
if (game.talents.nature2.purchased){
extra += 5;
}
if (getUberEmpowerment() == "Wind"){
extra += 5;
}
return extra;
},
currentDebuffPower: 0,
color: "#337733",
level: 1,
retainLevel: 0,
stackMax: function(){
return (getUberEmpowerment() == "Wind") ? 300 : 200;
},
tokens: 0,
nextUberCost: 0,
enlightenDesc: "you gain a 10x increase in all non-Helium loot, Wind stacks accumulate twice as fast, Wind can stack to 300, Wind gains an additional 5% stack transfer rate, and your Trimps gain access to the Wind Formation. This new Formation prevents any enemies in Wind Zones from falling below 1HP before they have 300 stacks of Wind. Wind Formation also grants all bonuses of Scrying Formation and allows collection of Dark Essence with no Trimp stat penalty",
formationDesc: "You have been Enlightened by Wind! While in this Formation in a Wind Zone, enemies will never fall below 1HP before they have 300 stacks of Wind.<br/><br/>This Formation also allows collection of Dark Essence, and grants all bonuses of the Scryer Formation."
},
Ice: {
description: function () {
return "When this Empowerment is active, enemies will be Chilled each time your Trimps attack. The Chill debuff stacks, reduces the damage that enemy deals by <b>" + this.formatModifier(this.getModifier()) + "%</b> (compounding) per stack, and increases the damage your Trimps deal to that enemy by " + ((Fluffy.isRewardActive('naturesWrath')) ? " twice that amount (with diminishing returns, max of +200% attack)" : "the same amount (with diminishing returns, max of 100%)") + " until it dies." + this.overkillDesc();
},
upgradeDescription: function () {
return "Reduces the enemy's damage dealt from each stack of Chilled when the Empowerment of Ice is active by <b>" + this.formatModifier(1 - this.baseModifier) + "%</b> (compounding), and increases the damage your Trimps deal to that enemy by " + ((Fluffy.isRewardActive('naturesWrath')) ? " twice that amount (with diminishing returns, max of +200% attack)" : "the same amount (with diminishing returns, max of 100%)") + ". Your current bonus is <b>" + this.formatModifier(this.getModifier()) + "%</b>, and next level will bring your bonus to <b>" + this.formatModifier(this.getModifier(1)) + "%</b>." + this.overkillDesc();
},
overkillDesc: function(){
var level = this.getLevel();
if (level < 50) return "<div style='margin-top: 10px'><b>You will earn +1 Overkill during Ice Zones once you reach Level 50, and a second Overkill cell at Level 100!</b></div>";
else if (level < 100) return "<div style='margin-top: 10px'><b>You are earning +1 Overkill during Ice Zones! Earn another at Level 100!</b></div>";
else return "<div style='margin-top: 10px'><b>Your Ice level is" + ((level > 100) ? " over" : "") + " 100, and you are gaining an additional 2 cells of Overkill during Ice Zones!</b></div>";
},
baseModifier: 0.01,
getModifier: function (change) {
if (!change) change = 0;
return Math.pow(1 - this.baseModifier, (this.getLevel() + change));
},
getCombatModifier: function () {
return Math.pow(this.getModifier(), this.currentDebuffPower);
},
getDamageModifier: function() {
var mod = 1 - this.getCombatModifier();
if (Fluffy.isRewardActive('naturesWrath')) mod *= 2;
return mod;
},
formatModifier: function (number){
return prettify((1 - number) * 100);
},
getLevel: function(){
var level = this.level;
if (game.talents.nature2.purchased) level += 5;
return level;
},
getRetainBonus: function(){
var extra = 0;
if (game.talents.nature2.purchased){
extra += 5;
}
return extra;
},
color: "#3333bb",
currentDebuffPower: 0,
level: 1,
retainLevel: 0,
tokens: 0,
nextUberCost: 0,
get enlightenDesc(){
return "your Trimps gain +2 maximum Overkill cells " + ((game.global.spiresCompleted >= 2) ? " once Nature starts and +0.25% increased Fluffy Exp per Ice level <b>(currently " + prettify(game.empowerments.Ice.getLevel() * 0.25) + "%)</b>" : "") + " for your entire run. In Ice Zones, Ice stacks accumulate twice as fast, and if an enemy is hit by your Trimps while it has 20 or more stacks of Ice and is below 50% health, it will instantly shatter! The shards of Ice from the shattered enemy destroy everything in their path, triggering your maximum Overkill regardless of your damage";
}
}
},
singleRunBonuses: {
goldMaps: {
name: "Golden Maps",
text: "+100% Map Loot",
cost: 20,
confirmation: "You are about to purchase Golden Maps for 20 bones. All of your current and future maps will gain +100% loot added to their normal loot roll <b>until your next Portal</b>. Is this what you wanted to do?",
owned: false,
fire: function () {
game.unlocks.goldMaps = true;
for (var x = 0; x < game.global.mapsOwnedArray.length; x++){
game.global.mapsOwnedArray[x].loot += 1;
}
refreshMaps();
}
},
quickTrimps: {
name: "Quick Trimps",
text: "+100% Breed Speed",
cost: 20,
confirmation: "You are about to purchase Quick Trimps for 20 bones. This will cause your Trimps to breed twice as fast <b>until your next Portal</b>. Is this what you wanted to do?",
owned: false,
fire: function () {
swapClass("psColor", "psColorOrange", document.getElementById("trimpsPs"));
},
reset: function () {
swapClass("psColor", "psColorWhite", document.getElementById("trimpsPs"));
},
load: function () {
this.fire();
}
},
sharpTrimps: {
name: "Sharp Trimps",
text: "+50% Trimp Damage",
cost: 25,
confirmation: "You are about to purchase Sharp Trimps for 25 bones. This will cause your Trimps to deal 50% more damage <b>until your next Portal</b>. Is this what you wanted to do?",
owned: false,
fire: function () {
swapClass("attackColor", "attackColorOrange", document.getElementById("goodGuyAttack"));
},
reset: function () {
swapClass("attackColor", "attackColorNormal", document.getElementById("goodGuyAttack"));
},
load: function () {
this.fire();
}
},
heliumy: {
get name(){
return (game.global.universe == 2) ? "Radonculous" : "Heliumy";
},
get text(){
return "+25% " + heliumOrRadon();
},
cost: 100,
get confirmation(){
return "You are about to purchase " + this.name + " for 100 bones. This will cause you to earn 25% more " + heliumOrRadon() + " from all sources <b>until your next Portal</b>. Is this what you wanted to do?"
},
owned: false,
fire: function () {
swapClass("hePhColor", "hePhColorOrange", document.getElementById("heliumPh"));
},
reset: function () {
swapClass("hePhColor", "hePhColorNormal", document.getElementById("heliumPh"));
},
load: function () {
this.fire();
}
}
},
permaBoneBonuses: {
voidMaps: {
name: "Void Maps",
text: "Upgrade your Void Map harvesting devices with the power of Bone! Each upgrade will cause 1 out of 100 Void Maps you find to be duplicated, guaranteed.",
confirmation: "You are about to purchase a level of Bone Void Maps, causing +1 out of 100 Void Maps you find to be duplicated. Is this what you wanted to do?",
owned: 0,
tracker: 0,
checkDupe: function(prefix, suffix){
this.tracker += this.owned;
if (this.tracker >= 100){
createVoidMap(prefix, suffix, true, true);
var texts = [
"Before you even see the original Void Map, the Bone Trader appears in front of you and hands you the Void Map's duplicate. With his mission successful, the Bone Trader then wanders to a nearby bush to check for bones, then vanishes in a disappointed puff of smoke.",
"You hear a THWACK like someone smacking two bones together right next to your frickin ear. Rather miffed, you turn around to see nothing but a Void Map on the ground. About 15 trimplengths away you spot the rear end of the Bone Trader sticking out from behind a rock, but you decide not to say anything.",
"The Bone Trader pops into existence quite a distance in front of you, clearly wearing a chef's apron and holding a spoon carved from bone. He tosses a Void Map in your general direction, then quickly disappears. You may have just interrupted the cooking of some soup.",
"You almost stumble and fall in a hole right in front of you that definitely was not there a minute ago. You look down and see the Bone Trader staring up at you with a warm smile, holding up a Void Map. You take the Void Map, thank the Bone Trader, and the hole fills back in instantly."
]
var text = texts[Math.floor(Math.random() * texts.length)];
message(text, "Loot", "th-large", "voidMessage", 'voidMaps');
this.tracker -= 100;
}
}
},
boosts: {
name: "Bone Shrine",
get text(){
return "Gain 1 Bone Charge every " + prettify(this.chargeTime(true)) + " hours, up to a max of 10 Bone Charges that persist through Portals. Consume 1 Bone Charge to gain " + prettify(this.timeGranted()) + " minutes of all primary resources as loot. Gain +10 mins per level, levels 5 and 10 reduce time to gain a charge by 30 minutes each."
},
get confirmation(){
var text = "You are about to purchase a level of Bone Shrine, granting +10 minutes of primary resources as loot when worshipping the Shrine"
if (this.owned == 4 || this.owned == 9) text += ", and -30 minutes on the cooldown time per charge";
text += ". Is this what you wanted to do?";
return text;
},
timeGranted: function(){
if (this.owned == 0) return 10;
return 10 * this.owned;
},
chargeTime: function(hoursOnly){
var hours = 4;
hours -= (Math.floor(this.owned / 5) * 0.5);
if (hoursOnly) return hours;
return (hours * 3.6e6); // to ms
},
btnTooltip: function(){
var text = "";
text += "Click this button or press (O/o) to use a Bone Charge by worshipping at the Bone Shrine. Will grant " + this.timeGranted() + " minutes of gathering for Food, Wood, and Metal as loot, meaning they get bonuses that apply to gathering AND looting. Will automatically build any storage buildings required to hold your spoils, and deduct their prices from the pot.<br/><br/>In total, will grant <b>" + this.consume(true) + "</b><br/><br/>";
if (this.charges == 10) text += "Currently at maximum charges!";
else text += "You currently have <b>" + this.charges + "</b> Charge" + needAnS(this.charges) + ". Will gain " + ((this.charges == 0) ? "a" : "another") + " charge in " + formatMinutesForDescriptions(this.checkCharges(true) / 60000) + ".";
return text;
},
checkCharges: function(getTime){
if (this.charges == 10){
this.lastChargeAt = -1;
return;
}
if (this.lastChargeAt == -1) this.lastChargeAt = new Date().getTime();
var chargeMs = this.chargeTime();
var msSinceCharge = new Date().getTime() - this.lastChargeAt;
if (getTime){
var addPause = 0;
if (game.options.menu.pauseGame.enabled){
var now = new Date().getTime();
addPause = now - game.options.menu.pauseGame.timeAtPause;
}
return chargeMs - msSinceCharge + addPause;
}
if (game.options.menu.pauseGame.enabled) return;
if (msSinceCharge >= chargeMs){
var charges = Math.floor(msSinceCharge / chargeMs);
this.charges += charges;
this.lastChargeAt += (charges * chargeMs);
if (this.charges > 10) this.charges = 10;
this.updateBtn();
}
},
onPurchase: function(){
this.updateBtn();
},
updateBtn: function(){
var elem = document.getElementById('boneShrineBtn');
if (this.owned <= 0) {
elem.style.display = 'none';
return;
}
elem.style.display = 'block';
elem.innerHTML = this.charges + " Bone Charge" + needAnS(this.charges);
var className = (this.charges == 0) ? 'isEmpty' : ((this.charges < 10) ? 'isFilling' : 'isFull');
swapClass('is', className, elem);
},
consume: function(previewOnly){
if (this.owned <= 0 || (!previewOnly && this.charges <= 0)) return;
if (!previewOnly && game.options.menu.pauseGame.enabled) return;
if (!previewOnly && game.global.challengeActive == "Pandemonium") return;
var eligible = ["food", "wood", "metal"];
var storage = ["Barn", "Shed", "Forge"];
var purchased = [0, 0, 0];
var rewarded = [0, 0, 0];
var hasNeg = false;
for (var x = 0; x < eligible.length; x++){
var resName = eligible[x];
var storageBuilding = game.buildings[storage[x]];
var resObj = game.resources[resName];
var amt = simpleSeconds(resName, (this.timeGranted() * 60));
amt = scaleLootBonuses(amt, true);
var tempMax = resObj.max;
var packMod = getPerkLevel("Packrat") * game.portal.Packrat.modifier;
var newTotal = resObj.owned + amt;
while (newTotal > calcHeirloomBonus("Shield", "storageSize", tempMax + (tempMax * packMod))){
var nextCost = calculatePercentageBuildingCost(storage[x], resName, 0.25, tempMax);
if (newTotal < nextCost) break;
newTotal -= nextCost;
amt -= nextCost;
tempMax *= 2;
purchased[x]++;
if (!previewOnly){
resObj.max *= 2;
storageBuilding.purchased++;
storageBuilding.owned++;
}
}
rewarded[x] = amt;
if (amt < 0) hasNeg = true;
if (!previewOnly) resObj.owned += amt;
}
var text = prettify(rewarded[0]) + " Food, " + prettify(rewarded[1]) + " Wood, and " + prettify(rewarded[2]) + " Metal after building " + purchased[0] + " Barn" + needAnS(purchased[0]) + ", " + purchased[1] + " Shed" + needAnS(purchased[1]) + ", and " + purchased[2] + " Forge" + needAnS(purchased[2]) + "."
if (hasNeg && previewOnly) text += "<br/><br/>A negative number for a resource means that resources would be wasted if another storage is not purchased, but purchasing that last storage leaves you with fewer of that resource than you have now. This can be resolved by emptying your storage before Worshipping."
if (!previewOnly){
this.charges--;
this.updateBtn();
}
if (!previewOnly && lastTooltipTitle == "Bone Shrine"){
document.getElementById('tipText').innerHTML = this.btnTooltip();
}
return text;
},
owned: 0,
used: 0,
charges: 0,
lastChargeAt: -1,
},
exotic: {
name: "More Imports",
text: "Use more Bones to lure even more Exotic Imports to your World. Each level increases the chance per cell for each Exotic Import to spawn by +0.05%.",
confirmation: "You are about to purchase a level of More Imports, increasing the chance per cell of each Exotic Import to spawn by +0.05%. Is this what you wanted to do?",
owned: 0,
addChance: function(){
return this.owned * 0.05;
}
},
multitasking: {
name: "Multitasking",
text: "Teach the most gifted of your Trimps to multitask, allowing +5% per level of your employed Trimps to breed while they work, and allowing +5% per level of your unemployed Trimps to help gather resources whenever the town is full.",
confirmation: "You are about to purchase a level of Multitasking, allowing +5% per level of your employed Trimps to breed while they work and +5% per level of your unemployed Trimps to help gather whenever the town is full. Is this what you wanted to do?",
owned: 0,
mult: function(){
return this.owned * 0.05;
}
}
},
options: {
displayed: false,
menu: {
autoSave: {
enabled: 1,
extraTags: "popular general",
description: "Automatically save the game once per minute.",
titles: ["Not Saving", "Auto Saving"],
onToggle: function () {
var elem = document.getElementById("saveIndicator");
if (this.enabled) elem.innerHTML = "<span class='autosaving'>(AutoSaving)</span>";
else elem.innerHTML = "<span class='notAutosaving'>(Not AutoSaving)</span>";
}
},
usePlayFab: {
enabled: 0,
extraTags: "popular general cloud",
description: "When the game saves, every 30 minutes also back up a copy online with PlayFab. While using this setting, you will be asked if you want to download your online save if it is ever ahead of the version on your computer. You can also manually import your save from PlayFab through the Import menu.",
titles: ["Not Saving Online", "Saving with PlayFab"],
onToggle: function () {
var indicatorElem = document.getElementById("playFabIndicator");
if (this.enabled == 1) indicatorElem.className = "icomoon icon-wifi iconStateGood";
else indicatorElem.className = "";
},
lockUnless: function (){return (typeof nw === 'undefined')}
},
saveAndExit: {
enabled: 0,
extraTags: "general",
description: "Save the game, then close it! Your Trimps will be here when you get back.",
titles: ["Save and Exit"],
onToggle: function(){
save();
try {
var win = nw.Window.get();
win.close();
} catch (error) {
}
},
lockUnless: function() {return (typeof nw !== 'undefined')}
},
richPresence: {