diff --git a/javascripts/core/currency.js b/javascripts/core/currency.js index f7d91c7ec..f544fa47b 100644 --- a/javascripts/core/currency.js +++ b/javascripts/core/currency.js @@ -192,7 +192,7 @@ class DecimalCurrency extends Currency { get operations() { return MathOperations.decimal; } get mantissa() { return this.value.mantissa; } get exponent() { return this.value.exponent; } - get startingValue() { return new Decimal(DC.D0); } + get startingValue() { return DC.D0; } } window.DecimalCurrency = DecimalCurrency; diff --git a/javascripts/core/player.js b/javascripts/core/player.js index 830e898dd..1730fd520 100644 --- a/javascripts/core/player.js +++ b/javascripts/core/player.js @@ -5,30 +5,28 @@ import { DC } from "./constants.js"; // This is actually reassigned when importing saves // eslint-disable-next-line prefer-const window.player = { - antimatter: new Decimal(DC.E1), + antimatter: DC.E1, dimensions: { antimatter: Array.range(0, 8).map(() => ({ bought: 0, costBumps: 0, - amount: new Decimal(DC.D0) + amount: DC.D0 })), infinity: Array.range(0, 8).map(tier => ({ isUnlocked: false, bought: 0, - amount: new Decimal(DC.D0), - cost: [new Decimal(DC.E8), new Decimal(DC.E9), new Decimal(DC.E10), new Decimal(DC.E20), new Decimal(DC.E140), - new Decimal(DC.E200), new Decimal(DC.E250), new Decimal(DC.E280)][tier], + amount: DC.D0, + cost: [DC.E8, DC.E9, DC.E10, DC.E20, DC.E140, DC.E200, DC.E250, DC.E280][tier], baseAmount: 0 })), time: Array.range(0, 8).map(tier => ({ - cost: [new Decimal(DC.D1), new Decimal(DC.D5), new Decimal(DC.E2), new Decimal(DC.E3), new Decimal(DC.E2350), - new Decimal(DC.E2650), new Decimal(DC.E3000), new Decimal(DC.E3350)][tier], - amount: new Decimal(DC.D0), + cost: [DC.D1, DC.D5, DC.E2, DC.E3, DC.E2350, DC.E2650, DC.E3000, DC.E3350][tier], + amount: DC.D0, bought: 0 })) }, buyUntil10: true, - sacrificed: new Decimal(DC.D0), + sacrificed: DC.D0, achievementBits: Array.repeat(0, 15), secretAchievementBits: Array.repeat(0, 4), infinityUpgrades: new Set(), @@ -58,26 +56,26 @@ window.player = { disableContinuum: false, reality: { mode: 0, - rm: new Decimal(DC.D1), + rm: DC.D1, glyph: 0, isActive: false }, eternity: { mode: 0, - amount: new Decimal(DC.D1), + amount: DC.D1, increaseWithMult: true, time: 1, - xHighest: new Decimal(DC.D1), + xHighest: DC.D1, isActive: false }, bigCrunch: { cost: 1, interval: 150000, mode: 0, - amount: new Decimal(DC.D1), + amount: DC.D1, increaseWithMult: true, time: 1, - xHighest: new Decimal(DC.D1), + xHighest: DC.D1, isActive: true, lastTick: 0 }, @@ -112,7 +110,7 @@ window.player = { isBought: false }, sacrifice: { - multiplier: new Decimal(DC.D2), + multiplier: DC.D2, isActive: true }, antimatterDims: Array.range(0, 8).map(tier => ({ @@ -159,9 +157,9 @@ window.player = { ipMultBuyer: { isActive: false, }, epMultBuyer: { isActive: false, }, }, - infinityPoints: new Decimal(DC.D0), - infinities: new Decimal(DC.D0), - infinitiesBanked: new Decimal(DC.D0), + infinityPoints: DC.D0, + infinities: DC.D0, + infinitiesBanked: DC.D0, dimensionBoosts: 0, galaxies: 0, news: { @@ -177,10 +175,10 @@ window.player = { }, lastUpdate: new Date().getTime(), chall2Pow: 1, - chall3Pow: new Decimal(DC.D0_01), - matter: new Decimal(DC.D1), + chall3Pow: DC.D0_01, + matter: DC.D1, chall9TickspeedCostBumps: 0, - chall8TotalSacrifice: new Decimal(DC.D1), + chall8TotalSacrifice: DC.D1, ic2Count: 0, partInfinityPoint: 0, partInfinitied: 0, @@ -214,7 +212,7 @@ window.player = { noInfinities: true, noEternities: true, noContinuum: true, - maxID1: new Decimal(DC.D0), + maxID1: DC.D0, maxStudies: 0, maxGlyphs: 0, slowestBH: 1, @@ -229,59 +227,59 @@ window.player = { gameCreatedTime: Date.now(), totalTimePlayed: 0, realTimePlayed: 0, - totalAntimatter: new Decimal(DC.D0), + totalAntimatter: DC.D0, lastTenInfinities: Array.range(0, 10).map(() => - [Number.MAX_VALUE, new Decimal(DC.D1), new Decimal(DC.D1), Number.MAX_VALUE]), + [Number.MAX_VALUE, DC.D1, DC.D1, Number.MAX_VALUE]), lastTenEternities: Array.range(0, 10).map(() => - [Number.MAX_VALUE, new Decimal(DC.D1), new Decimal(DC.D1), Number.MAX_VALUE]), + [Number.MAX_VALUE, DC.D1, DC.D1, Number.MAX_VALUE]), lastTenRealities: Array.range(0, 10).map(() => - [Number.MAX_VALUE, new Decimal(DC.D1), 1, Number.MAX_VALUE, 0]), + [Number.MAX_VALUE, DC.D1, 1, Number.MAX_VALUE, 0]), thisInfinity: { time: 0, realTime: 0, lastBuyTime: 0, - maxAM: new Decimal(DC.D0), - bestIPmin: new Decimal(DC.D0), + maxAM: DC.D0, + bestIPmin: DC.D0, }, bestInfinity: { time: Number.MAX_VALUE, realTime: Number.MAX_VALUE, - bestIPminEternity: new Decimal(DC.D0), - bestIPminReality: new Decimal(DC.D0), + bestIPminEternity: DC.D0, + bestIPminReality: DC.D0, }, thisEternity: { time: 0, realTime: 0, - maxAM: new Decimal(DC.D0), - maxIP: new Decimal(DC.D0), - bestIPMsWithoutMaxAll: new Decimal(DC.D0), - bestEPmin: new Decimal(DC.D0), - bestInfinitiesPerMs: new Decimal(DC.D0), + maxAM: DC.D0, + maxIP: DC.D0, + bestIPMsWithoutMaxAll: DC.D0, + bestEPmin: DC.D0, + bestInfinitiesPerMs: DC.D0, }, bestEternity: { time: Number.MAX_VALUE, realTime: Number.MAX_VALUE, - bestEPminReality: new Decimal(DC.D0), + bestEPminReality: DC.D0, }, thisReality: { time: 0, realTime: 0, - maxAM: new Decimal(DC.D0), - maxIP: new Decimal(DC.D0), - maxEP: new Decimal(DC.D0), - bestEternitiesPerMs: new Decimal(DC.D0), - maxReplicanti: new Decimal(DC.D0), - maxDT: new Decimal(DC.D0), + maxAM: DC.D0, + maxIP: DC.D0, + maxEP: DC.D0, + bestEternitiesPerMs: DC.D0, + maxReplicanti: DC.D0, + maxDT: DC.D0, }, bestReality: { time: Number.MAX_VALUE, realTime: Number.MAX_VALUE, glyphStrength: 0, - RMmin: new Decimal(DC.D0), + RMmin: DC.D0, RMminSet: [], glyphLevel: 0, glyphLevelSet: [], - bestEP: new Decimal(DC.D0), + bestEP: DC.D0, bestEPSet: [], speedSet: [], iMCapSet: [], @@ -290,29 +288,29 @@ window.player = { }, infMult: 0, version: 13, - infinityPower: new Decimal(DC.D1), + infinityPower: DC.D1, postC4Tier: 0, - eternityPoints: new Decimal(DC.D0), - eternities: new Decimal(DC.D0), + eternityPoints: DC.D0, + eternities: DC.D0, eternityUpgrades: new Set(), epmultUpgrades: 0, - timeShards: new Decimal(DC.D0), + timeShards: DC.D0, totalTickGained: 0, totalTickBought: 0, replicanti: { unl: false, - amount: new Decimal(DC.D0), + amount: DC.D0, chance: 0.01, - chanceCost: new Decimal(DC.E150), + chanceCost: DC.E150, interval: 1000, - intervalCost: new Decimal(DC.E140), + intervalCost: DC.E140, boughtGalaxyCap: 0, galaxies: 0, - galCost: new Decimal(DC.E170), + galCost: DC.E170, }, timestudy: { - theorem: new Decimal(DC.D0), - maxTheorem: new Decimal(DC.D0), + theorem: DC.D0, + maxTheorem: DC.D0, amBought: 0, ipBought: 0, epBought: 0, @@ -332,9 +330,9 @@ window.player = { dilation: { studies: [], active: false, - tachyonParticles: new Decimal(DC.D0), - dilatedTime: new Decimal(DC.D0), - nextThreshold: new Decimal(DC.E3), + tachyonParticles: DC.D0, + dilatedTime: DC.D0, + nextThreshold: DC.E3, baseTachyonGalaxies: 0, totalTachyonGalaxies: 0, upgrades: new Set(), @@ -343,12 +341,12 @@ window.player = { 2: 0, 3: 0, }, - lastEP: new Decimal(DC.DM1), + lastEP: DC.DM1, }, realities: 0, partSimulatedReality: 0, reality: { - realityMachines: new Decimal(DC.D0), + realityMachines: DC.D0, imaginaryMachines: 0, iMCap: 0, glyphs: { @@ -405,7 +403,7 @@ window.player = { perkPoints: 0, autoEC: true, lastAutoEC: 0, - partEternitied: new Decimal(DC.D0), + partEternitied: DC.D0, autoAchieve: true, gainedAutoAchievements: true, automator: { @@ -446,10 +444,10 @@ window.player = { quotes: [], unlockBits: 0, run: false, - bestRunAM: new Decimal(DC.D1), + bestRunAM: DC.D1, bestAMSet: [], perkShop: Array.repeat(0, 5), - lastRepeatedMachines: new Decimal(DC.D0) + lastRepeatedMachines: DC.D0 }, effarig: { relicShards: 0, @@ -563,13 +561,13 @@ window.player = { petWithRecollection: "" }, laitela: { - darkMatter: new Decimal(DC.D0), - maxDarkMatter: new Decimal(DC.D0), + darkMatter: DC.D0, + maxDarkMatter: DC.D0, run: false, quotes: [], dimensions: Array.range(0, 4).map(() => ({ - amount: new Decimal(DC.D0), + amount: DC.D0, intervalUpgrades: 0, powerDMUpgrades: 0, powerDEUpgrades: 0,