From ee9dcc69996e720bbc07ed6468bf0cb1a068368c Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Sun, 3 Apr 2022 00:02:26 +0800 Subject: [PATCH 01/89] Transfer all fixed elements to one container --- public/stylesheets/new-ui-styles.css | 2 +- public/stylesheets/styles.css | 16 ++++++++++++--- src/components/GameUIComponent.vue | 30 +++++++++++++++++----------- src/components/SaveTimer.vue | 4 ++-- src/components/SpeedrunStatus.vue | 4 ++-- 5 files changed, 36 insertions(+), 20 deletions(-) diff --git a/public/stylesheets/new-ui-styles.css b/public/stylesheets/new-ui-styles.css index d980267ed..0363c9fe1 100644 --- a/public/stylesheets/new-ui-styles.css +++ b/public/stylesheets/new-ui-styles.css @@ -47,7 +47,7 @@ body.t-s9 { display: flex; flex-direction: column; width: 12rem; - position: fixed; + position: absolute; left: 0; z-index: 5; } diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index f23c36126..aa482a09c 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -258,8 +258,8 @@ button:focus { .TTbuttons { color: var(--color-text); - position: fixed; - bottom: 0; + position: absolute; + bottom: -100vh; font-family: Typewriter, serif; display: flex; align-items: flex-end; @@ -1227,6 +1227,16 @@ screen and (max-width: 480px) { height: 100%; } +.c-game-ui--fixed { + width: 100%; + position: fixed; + z-index: 5; + display: flex; + justify-content: center; + top: 0; + left: 0; +} + ._kong-test .c-game-ui { max-height: 100%; } @@ -5897,7 +5907,7 @@ kbd { display: flex; flex-direction: column-reverse; align-items: flex-end; - position: fixed; + position: absolute; top: 0; right: 0; margin-top: 0.5rem; diff --git a/src/components/GameUIComponent.vue b/src/components/GameUIComponent.vue index 08ab6f25b..bbf7f48ac 100644 --- a/src/components/GameUIComponent.vue +++ b/src/components/GameUIComponent.vue @@ -90,21 +90,26 @@ export default { rel="stylesheet" :href="themeCss" > - -
- - - - + id="ui-fixed" + class="c-game-ui--fixed" + > +
+ + + + +
+ + @@ -115,5 +120,6 @@ export default { .ui-wrapper { display: flex; justify-content: center; + position: relative; } \ No newline at end of file diff --git a/src/components/SaveTimer.vue b/src/components/SaveTimer.vue index a603a8d8a..c7c807eac 100644 --- a/src/components/SaveTimer.vue +++ b/src/components/SaveTimer.vue @@ -39,9 +39,9 @@ export default { \ No newline at end of file diff --git a/src/components/tabs/celestial-pelle/NewGame.vue b/src/components/tabs/celestial-pelle/NewGame.vue index ff651716a..120323bb5 100644 --- a/src/components/tabs/celestial-pelle/NewGame.vue +++ b/src/components/tabs/celestial-pelle/NewGame.vue @@ -64,6 +64,7 @@ export default { \ No newline at end of file From 3c87dcd0e787060e133d3ca5fcd03a518d9a136e Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Sun, 17 Apr 2022 10:52:16 +0800 Subject: [PATCH 14/89] Hide fixed components during fullscreen --- javascripts/core/app/ui.init.js | 1 - src/components/GameUiFixedComponents.vue | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/javascripts/core/app/ui.init.js b/javascripts/core/app/ui.init.js index d2f240753..c220e1564 100644 --- a/javascripts/core/app/ui.init.js +++ b/javascripts/core/app/ui.init.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line prefer-const export const state = { view: { modal: { diff --git a/src/components/GameUiFixedComponents.vue b/src/components/GameUiFixedComponents.vue index 2d19fa81b..2690cf280 100644 --- a/src/components/GameUiFixedComponents.vue +++ b/src/components/GameUiFixedComponents.vue @@ -38,9 +38,13 @@ export default { + + \ No newline at end of file diff --git a/src/components/GameUIComponent.vue b/src/components/GameUIComponent.vue index b572f670b..007fdc651 100644 --- a/src/components/GameUIComponent.vue +++ b/src/components/GameUIComponent.vue @@ -2,7 +2,8 @@ import ClassicUi from "@/components/ui-modes/classic/ClassicUi"; import ModernUi from "@/components/ui-modes/modern/ModernUi"; import TabComponents from "@/components/tabs"; -import GameUiFixedComponents from "@/components/GameUiFixedComponents"; +import GameUiComponentFixed from "@/components/GameUiComponentFixed"; +import BackgroundAnimations from "@/components/BackgroundAnimations"; export default { name: "GameUIComponent", @@ -10,7 +11,8 @@ export default { ...TabComponents, ClassicUi, ModernUi, - GameUiFixedComponents + GameUiComponentFixed, + BackgroundAnimations }, computed: { view() { @@ -54,7 +56,8 @@ export default { :href="themeCss" >
- + + diff --git a/src/components/GameUIFixedComponents.vue b/src/components/GameUIFixedComponents.vue deleted file mode 100644 index a9429d6d2..000000000 --- a/src/components/GameUIFixedComponents.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/components/GameUiFixedComponents.vue b/src/components/GameUiComponentFixed.vue similarity index 87% rename from src/components/GameUiFixedComponents.vue rename to src/components/GameUiComponentFixed.vue index 509e778ec..908010c4f 100644 --- a/src/components/GameUiFixedComponents.vue +++ b/src/components/GameUiComponentFixed.vue @@ -5,7 +5,6 @@ import TimeTheoremShop from "@/components/tabs/time-studies/tt-shop/TimeTheoremS import ModernSidebar from "@/components/ui-modes/modern/ModernSidebar"; import SaveTimer from "@/components/SaveTimer"; import SpeedrunStatus from "@/components/SpeedrunStatus"; -import BackgroundAnimations from "@/components/BackgroundAnimations"; import PopupModal from "@/components/modals/PopupModal"; import ModalProgressBar from "@/components/modals/ModalProgressBar"; import FadeToBlack from "@/components/tabs/celestial-pelle/FadeToBlack"; @@ -13,7 +12,7 @@ import CreditsContainer from "@/components/tabs/celestial-pelle/CreditsContainer import NewGame from "@/components/tabs/celestial-pelle/NewGame"; export default { - name: "GameUiFixedComponents", + name: "GameUiComponentFixed", components: { HowToPlay, InfoButton, @@ -21,13 +20,17 @@ export default { ModernSidebar, SaveTimer, SpeedrunStatus, - BackgroundAnimations, PopupModal, ModalProgressBar, FadeToBlack, CreditsContainer, NewGame }, + data() { + return { + rollingCredits: false + }; + }, computed: { view() { return this.$viewModel; @@ -37,6 +40,11 @@ export default { visibility: ui.view.tabs.reality.automator.fullScreen ? "hidden" : "visible" }; } + }, + methods: { + update() { + this.rollingCredits = GameEnd.endState >= 2.5; + } } }; @@ -64,15 +72,14 @@ export default { /> - - - - + + + diff --git a/src/components/tabs/time-dilation/TimeDilationTab.vue b/src/components/tabs/time-dilation/TimeDilationTab.vue index 688b8dcd1..9fafbcf1e 100644 --- a/src/components/tabs/time-dilation/TimeDilationTab.vue +++ b/src/components/tabs/time-dilation/TimeDilationTab.vue @@ -1,14 +1,12 @@ - - - - \ No newline at end of file From 2025d8aa08dcd171301751ab0e659195ff48d0be Mon Sep 17 00:00:00 2001 From: Hirame1 <56225774+Hirame1@users.noreply.github.com> Date: Sun, 8 May 2022 15:55:19 +0700 Subject: [PATCH 26/89] Fix error when step forward blockmato after reload Fix #2583 --- src/components/tabs/automator/AutomatorTextEditor.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/tabs/automator/AutomatorTextEditor.vue b/src/components/tabs/automator/AutomatorTextEditor.vue index 961cff408..ab381c5c4 100644 --- a/src/components/tabs/automator/AutomatorTextEditor.vue +++ b/src/components/tabs/automator/AutomatorTextEditor.vue @@ -139,7 +139,9 @@ export const AutomatorTextUI = { // Used to return back to the same line the editor was on from before switching tabs savedVertPos: 0, scrollToLine(line) { - this.editor.scrollIntoView({ line, ch: 0 }); + if (this.editor) { + this.editor.scrollIntoView({ line, ch: 0 }); + } }, // Line highlighting requires a reference to the row in order to clear it, so keep track of the lines currently // being highlighted for errors or events so that they can be referenced to be cleared instead of the alternative From 344166b58b7d3f31e10f2234f0c07f52d1f2fd44 Mon Sep 17 00:00:00 2001 From: L4R5W Date: Mon, 9 May 2022 17:34:43 +0200 Subject: [PATCH 27/89] fix teresa tab notification --- javascripts/core/secret-formula/tab-notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascripts/core/secret-formula/tab-notifications.js b/javascripts/core/secret-formula/tab-notifications.js index 8f03eb1e9..7edf277f6 100644 --- a/javascripts/core/secret-formula/tab-notifications.js +++ b/javascripts/core/secret-formula/tab-notifications.js @@ -143,7 +143,7 @@ GameDatabase.tabNotifications = { tab: "teresa" } ], - condition: () => player.celestials.teresa.pouredAmount !== 0 && Teresa.isUnlocked, + condition: () => player.celestials.teresa.pouredAmount === 0 && Teresa.isUnlocked, events: [GAME_EVENT.REALITY_UPGRADE_BOUGHT] }, alchemyUnlock: { From 7e426da34af53d72519b4ab1fa9419f2195758a1 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Wed, 11 May 2022 21:22:25 +0800 Subject: [PATCH 28/89] Fix being able to buy "You cannot escape a doomed reality" study --- .../eternity/time-studies/dilation-time-studies.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/javascripts/core/secret-formula/eternity/time-studies/dilation-time-studies.js b/javascripts/core/secret-formula/eternity/time-studies/dilation-time-studies.js index d82fb9b3a..2a02794ea 100644 --- a/javascripts/core/secret-formula/eternity/time-studies/dilation-time-studies.js +++ b/javascripts/core/secret-formula/eternity/time-studies/dilation-time-studies.js @@ -51,6 +51,7 @@ GameDatabase.eternity.timeStudies.dilation = [ cost: () => 1, requirement: () => TimeStudy.timeDimension(8).isBought && player.records.thisReality.maxEP.exponent >= 4000 && - (Perk.firstPerk.isBought ? true : Achievements.preReality.every(a => a.isUnlocked)) + (Perk.firstPerk.isBought ? true : Achievements.preReality.every(a => a.isUnlocked)) && + !Pelle.isDoomed } ]; From 0d8a169d9d4e21b09748be2ec0dfa79ef9fa26ae Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Sun, 8 May 2022 06:02:15 -0700 Subject: [PATCH 29/89] add eslint-plugin-import, configure, and apply changes --- .eslintrc.json | 41 +- .../core/achievements/normal-achievement.js | 2 +- .../core/achievements/secret-achievement.js | 2 +- javascripts/core/app/modal.js | 84 +- javascripts/core/app/ui.js | 8 +- .../core/autobuyers/annihilation-autobuyer.js | 2 +- .../antimatter-dimension-autobuyer.js | 5 +- javascripts/core/autobuyers/autobuyers.js | 2 +- .../core/autobuyers/big-crunch-autobuyer.js | 2 +- .../autobuyers/black-hole-power-autobuyer.js | 2 +- ...rk-matter-dimension-ascension-autobuyer.js | 2 +- .../dark-matter-dimension-autobuyer.js | 2 +- .../autobuyers/dilation-upgrade-autobuyer.js | 2 +- .../core/autobuyers/dimboost-autobuyer.js | 2 +- .../core/autobuyers/eternity-autobuyer.js | 2 +- .../core/autobuyers/galaxy-autobuyer.js | 2 +- .../autobuyers/imaginary-upgrade-autobuyer.js | 2 +- javascripts/core/autobuyers/index.js | 48 +- .../infinity-dimension-autobuyer.js | 5 +- .../prestige-currency-multiplier-autobuyer.js | 2 +- .../core/autobuyers/reality-autobuyer.js | 2 +- .../autobuyers/reality-upgrade-autobuyer.js | 2 +- .../autobuyers/replicanti-galaxy-autobuyer.js | 2 +- .../replicanti-upgrade-autobuyer.js | 2 +- .../core/autobuyers/sacrifice-autobuyer.js | 2 +- .../core/autobuyers/singularity-autobuyer.js | 2 +- .../core/autobuyers/tickspeed-autobuyer.js | 5 +- .../autobuyers/time-dimension-autobuyer.js | 2 +- .../core/autobuyers/time-theorem-autobuyer.js | 2 +- .../core/automator/automator-codemirror.js | 4 +- .../core/automator/automator-commands.js | 4 +- javascripts/core/automator/compiler.js | 6 +- javascripts/core/automator/index.js | 8 +- javascripts/core/automator/lexer.js | 3 +- javascripts/core/automator/parser.js | 7 +- javascripts/core/big_crunch.js | 14 +- javascripts/core/black_hole.js | 4 +- javascripts/core/celestials/V.js | 10 +- javascripts/core/celestials/celestials.js | 12 +- javascripts/core/celestials/effarig.js | 10 +- javascripts/core/celestials/enslaved.js | 7 +- .../laitela/dark-matter-dimension.js | 4 +- .../core/celestials/laitela/laitela.js | 7 +- .../core/celestials/laitela/singularity.js | 3 +- .../core/celestials/pelle/galaxy-generator.js | 1 + javascripts/core/celestials/pelle/pelle.js | 6 +- javascripts/core/celestials/ra/alchemy.js | 2 +- javascripts/core/celestials/ra/ra.js | 4 +- javascripts/core/celestials/teresa.js | 7 +- javascripts/core/challenge.js | 4 +- javascripts/core/currency.js | 2 +- javascripts/core/devtools.js | 3 +- javascripts/core/dilation.js | 6 +- javascripts/core/dimboost.js | 2 +- .../core/dimensions/antimatter-dimension.js | 5 +- .../core/dimensions/infinity-dimension.js | 5 +- javascripts/core/dimensions/time-dimension.js | 5 +- javascripts/core/eternity.js | 4 +- javascripts/core/eternity_challenge.js | 4 +- .../core/game-mechanics/bit-purchasable.js | 2 +- .../core/game-mechanics/bit-upgrade-state.js | 2 +- .../core/game-mechanics/game-mechanic.js | 2 +- javascripts/core/game-mechanics/index.js | 16 +- javascripts/core/game-mechanics/puchasable.js | 2 +- javascripts/core/game-mechanics/rebuyable.js | 2 +- .../core/game-mechanics/set-purchasable.js | 2 +- javascripts/core/globals.js | 152 +-- javascripts/core/glyph-effects.js | 4 +- javascripts/core/glyphs/glyph-core.js | 2 +- javascripts/core/hotkeys.js | 3 +- javascripts/core/imaginary-upgrades.js | 4 +- javascripts/core/kong.js | 2 +- javascripts/core/machines.js | 2 +- javascripts/core/math.js | 3 +- javascripts/core/perks.js | 2 +- javascripts/core/player.js | 6 +- javascripts/core/reality-upgrades.js | 2 +- javascripts/core/reality.js | 2 +- javascripts/core/replicanti.js | 2 +- javascripts/core/sacrifice.js | 2 +- .../achievements/normal-achievements.js | 4 +- .../achievements/secret-achievements.js | 2 +- .../secret-formula/away-progress-types.js | 2 +- .../core/secret-formula/celestials/alchemy.js | 4 +- .../core/secret-formula/celestials/effarig.js | 4 +- .../secret-formula/celestials/enslaved.js | 2 +- .../celestials/galaxy-generator.js | 2 +- .../secret-formula/celestials/navigation.js | 4 +- .../secret-formula/celestials/pelle-quotes.js | 2 +- .../celestials/pelle-upgrades.js | 2 +- .../secret-formula/celestials/perk-shop.js | 2 +- .../core/secret-formula/celestials/ra.js | 2 +- .../core/secret-formula/celestials/rifts.js | 4 +- .../celestials/singularity-milestones.js | 2 +- .../core/secret-formula/celestials/strikes.js | 4 +- .../core/secret-formula/celestials/teresa.js | 4 +- .../core/secret-formula/celestials/v.js | 5 +- .../challenges/eternity-challenges.js | 4 +- .../challenges/infinity-challenges.js | 4 +- .../challenges/normal-challenges.js | 4 +- .../core/secret-formula/confirmation-types.js | 2 +- javascripts/core/secret-formula/credits.js | 4 +- .../eternity/dilation-upgrades.js | 4 +- .../eternity/eternity-milestones.js | 2 +- .../eternity/eternity-upgrades.js | 4 +- .../time-studies/dilation-time-studies.js | 2 +- .../eternity/time-studies/ec-time-studies.js | 4 +- .../time-studies/normal-time-studies.js | 4 +- javascripts/core/secret-formula/h2p.js | 7 +- javascripts/core/secret-formula/index.js | 86 +- .../infinity/break-infinity-upgrades.js | 4 +- .../infinity/infinity-upgrades.js | 4 +- javascripts/core/secret-formula/news.js | 5 +- .../core/secret-formula/reality/automator.js | 2 +- .../reality/glyph-sacrifices.js | 2 +- .../reality/imaginary-upgrades.js | 6 +- .../core/secret-formula/reality/perks.js | 4 +- .../reality/reality-upgrades.js | 4 +- .../core/secret-formula/script-templates.js | 2 +- .../core/secret-formula/shop-purchases.js | 2 +- .../secret-formula/speedrun-milestones.js | 2 +- .../core/secret-formula/tab-notifications.js | 5 +- javascripts/core/secret-formula/tabs.js | 2 +- javascripts/core/speedrun.js | 2 +- javascripts/core/storage/cloud-saving.js | 12 +- javascripts/core/storage/dev-migrations.js | 2 +- javascripts/core/storage/index.js | 10 +- javascripts/core/storage/migrations.js | 2 +- javascripts/core/storage/serializer.js | 2 + javascripts/core/storage/storage.js | 1 + javascripts/core/tickspeed.js | 2 +- .../core/time-studies/dilation-time-study.js | 4 +- .../core/time-studies/ec-time-study.js | 4 +- javascripts/core/time-studies/index.js | 12 +- .../core/time-studies/normal-time-study.js | 2 +- javascripts/core/time-studies/time-studies.js | 2 +- .../time-studies/time-study-connections.js | 2 +- javascripts/core/time-theorems.js | 2 +- javascripts/core/utils.js | 20 +- javascripts/game.js | 7 +- package-lock.json | 1198 ++++++++++++++++- package.json | 2 + src/components/BlobSnowflake.vue | 2 +- src/components/BlobSnowflakes.vue | 2 +- src/components/GameUIComponent.vue | 24 +- src/components/InfinityUpgradeButton.vue | 2 +- src/components/modals/AwayProgressModal.vue | 2 +- .../modals/GlyphSetSaveDeleteModal.vue | 2 +- .../modals/GlyphShowcasePanelModal.vue | 2 +- src/components/modals/LoadGameModal.vue | 2 +- src/components/modals/MessageModal.vue | 2 +- src/components/modals/ModalWrapperChoice.vue | 6 +- src/components/modals/PelleEffectsModal.vue | 2 +- .../modals/SingularityMilestonesModal.vue | 2 +- src/components/modals/SpeedrunModeModal.vue | 2 +- src/components/modals/StudyStringModal.vue | 3 +- .../options/ConfirmationOptionsModal.vue | 2 +- .../modals/options/NewsOptionsModal.vue | 2 +- .../modals/prestige/EnterCelestialsModal.vue | 2 +- .../modals/prestige/RealityModal.vue | 4 +- .../tabs/alchemy/AlchemyCircleNode.vue | 2 +- src/components/tabs/alchemy/AlchemyTab.vue | 4 +- .../ClassicAntimatterDimensionsTab.vue | 6 +- .../ModernAntimatterDimensionsTab.vue | 2 +- .../tabs/autobuyers/AutobuyersTab.vue | 12 +- .../tabs/autobuyers/BigCrunchAutobuyerBox.vue | 2 +- .../tabs/autobuyers/DimensionAutobuyerBox.vue | 2 +- .../autobuyers/DimensionBoostAutobuyerBox.vue | 2 +- .../tabs/autobuyers/GalaxyAutobuyerBox.vue | 2 +- .../tabs/autobuyers/MultipleAutobuyersBox.vue | 2 +- .../tabs/autobuyers/SingleAutobuyerBox.vue | 4 +- .../tabs/autobuyers/SingleAutobuyerInRow.vue | 2 +- .../tabs/automator/AutomatorBlockEditor.vue | 3 +- .../tabs/automator/AutomatorDocs.vue | 4 +- .../tabs/automator/AutomatorEditor.vue | 2 +- .../tabs/automator/AutomatorTab.vue | 3 +- .../tabs/black-hole/BlackHoleTab.vue | 6 +- .../black-hole/BlackHoleUpgradeButton.vue | 4 +- .../tabs/celestial-effarig/EffarigTab.vue | 4 +- .../tabs/celestial-enslaved/EnslavedTab.vue | 2 +- .../DarkMatterDimensionGroup.vue | 3 +- .../tabs/celestial-laitela/LaitelaTab.vue | 12 +- .../CelestialNavigationTab.vue | 6 +- .../tabs/celestial-pelle/PelleRift.vue | 2 +- .../tabs/celestial-pelle/PelleRiftBar.vue | 3 +- .../tabs/celestial-pelle/PelleTab.vue | 4 +- src/components/tabs/celestial-ra/RaPet.vue | 2 +- src/components/tabs/celestial-ra/RaTab.vue | 2 +- .../tabs/celestial-teresa/TeresaTab.vue | 5 +- src/components/tabs/celestial-v/VTab.vue | 2 +- .../EternityChallengesTab.vue | 2 +- .../EternityUpgradeButton.vue | 2 +- .../eternity-upgrades/EternityUpgradesTab.vue | 2 +- .../tabs/glyphs/CurrentGlyphEffects.vue | 2 +- .../tabs/glyphs/GlyphLevelsAndWeights.vue | 2 +- src/components/tabs/glyphs/GlyphsTab.vue | 16 +- .../tabs/glyphs/SacrificedGlyphs.vue | 1 + .../sidebar/GlyphAutosortButtonGroup.vue | 2 +- .../tabs/glyphs/sidebar/GlyphFilterPanel.vue | 6 +- .../sidebar/GlyphInventoryManagementPanel.vue | 4 +- .../tabs/glyphs/sidebar/GlyphSetSavePanel.vue | 4 +- .../tabs/glyphs/sidebar/GlyphTabSidebar.vue | 4 +- .../ImaginaryUpgradeButton.vue | 4 +- src/components/tabs/index.js | 62 +- .../ClassicInfinityDimensionsTab.vue | 2 +- .../ModernInfinityDimensionsTab.vue | 2 +- .../infinity-upgrades/InfinityUpgradesTab.vue | 2 +- .../infinity-upgrades/IpMultiplierButton.vue | 2 +- .../NormalAchievementsTab.vue | 2 +- .../options-gameplay/OptionsGameplayTab.vue | 4 +- .../tabs/options-saving/OptionsSavingTab.vue | 4 +- .../tabs/options-visual/OptionsVisualTab.vue | 15 +- src/components/tabs/perks/PerksTab.vue | 1 + .../reality-upgrades/RealityUpgradeButton.vue | 4 +- .../tabs/replicanti/ReplicantiTab.vue | 4 +- .../time-dilation/DilationUpgradeButton.vue | 4 +- .../ModernTimeDimensionsTab.vue | 2 +- .../tabs/time-studies/DilationTimeStudy.vue | 2 +- .../tabs/time-studies/ECTimeStudy.vue | 2 +- .../tabs/time-studies/TimeStudiesTab.vue | 11 +- .../time-studies/time-study-tree-layout.js | 2 +- .../time-studies/tt-shop/TimeTheoremShop.vue | 4 +- src/components/ui-modes/GameHeader.vue | 10 +- src/components/ui-modes/HeaderBlackHole.vue | 2 +- .../ui-modes/HeaderTickspeedRow.vue | 2 +- src/components/ui-modes/classic/ClassicUi.vue | 5 +- src/components/ui-modes/modern/ModernUi.vue | 6 +- src/main.js | 3 +- src/merge-globals.js | 1 + src/shims.js | 12 +- 230 files changed, 1861 insertions(+), 671 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index b80c8fa3c..c2454acf9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,7 @@ { "extends": [ "eslint:recommended", + "plugin:import/recommended", "plugin:vue/recommended" ], "env": { @@ -14,7 +15,46 @@ "sourceType": "module", "parser": "@babel/eslint-parser" }, + "settings": { + "import/resolver": { + "alias": { + "map": [ + ["@", "./src"] + ], + "extensions": [".js", ".vue"] + } + } + }, "rules": { + "import/prefer-default-export": "off", + + "import/no-unresolved": "error", + "import/named": "error", + "import/namespace": "error", + "import/default": "error", + "import/export": "error", + "import/no-named-as-default": "warn", + "import/no-named-as-default-member": "warn", + "import/no-duplicates": "warn", + "import/extensions": ["warn", "never"], + "import/first": "warn", + "import/newline-after-import": "warn", + "import/no-named-default": "warn", + "import/no-self-import": "warn", + "import/order": [ + "warn", + { + "newlines-between": "always-and-inside-groups", + "pathGroups": [{ "pattern": "@/**", "group": "sibling" }] + } + ], + "sort-imports": [ + "warn", + { + "ignoreCase": true, + "allowSeparatedGroups": true + } + ], "no-console": "warn", "no-template-curly-in-string": "warn", "array-callback-return": "error", @@ -32,7 +72,6 @@ "allowElseIf": false } ], - "vue/one-component-per-file": "error", "vue/component-definition-name-casing": "warn", "vue/order-in-components": "warn", diff --git a/javascripts/core/achievements/normal-achievement.js b/javascripts/core/achievements/normal-achievement.js index a1db5a63c..b66955cb5 100644 --- a/javascripts/core/achievements/normal-achievement.js +++ b/javascripts/core/achievements/normal-achievement.js @@ -1,4 +1,4 @@ -import { GameMechanicState } from "../game-mechanics/index.js"; +import { GameMechanicState } from "../game-mechanics/index"; class AchievementState extends GameMechanicState { constructor(config) { diff --git a/javascripts/core/achievements/secret-achievement.js b/javascripts/core/achievements/secret-achievement.js index 8d2ec2710..35d351738 100644 --- a/javascripts/core/achievements/secret-achievement.js +++ b/javascripts/core/achievements/secret-achievement.js @@ -1,4 +1,4 @@ -import { GameMechanicState } from "../game-mechanics/index.js"; +import { GameMechanicState } from "../game-mechanics/index"; class SecretAchievementState extends GameMechanicState { constructor(config) { diff --git a/javascripts/core/app/modal.js b/javascripts/core/app/modal.js index 6f7d14b79..faaf3ad85 100644 --- a/javascripts/core/app/modal.js +++ b/javascripts/core/app/modal.js @@ -1,64 +1,64 @@ -import MessageModal from "@/components/modals/MessageModal"; import CelestialQuoteModal from "@/components/modals/CelestialQuoteModal"; -import CloudSaveConflictModal from "@/components/modals/cloud/CloudSaveConflictModal"; import CloudLoadConflictModal from "@/components/modals/cloud/CloudLoadConflictModal"; +import CloudSaveConflictModal from "@/components/modals/cloud/CloudSaveConflictModal"; import EternityChallengeStartModal from "@/components/modals/challenges/EternityChallengeStartModal"; import InfinityChallengeStartModal from "@/components/modals/challenges/InfinityChallengeStartModal"; +import MessageModal from "@/components/modals/MessageModal"; import NormalChallengeStartModal from "@/components/modals/challenges/NormalChallengeStartModal"; -import DimensionBoostModal from "@/components/modals/prestige/DimensionBoostModal"; import AntimatterGalaxyModal from "@/components/modals/prestige/AntimatterGalaxyModal"; -import BigCrunchModal from "@/components/modals/prestige/BigCrunchModal"; -import ReplicantiGalaxyModal from "@/components/modals/prestige/ReplicantiGalaxyModal"; -import EternityModal from "@/components/modals/prestige/EternityModal"; -import EnterDilationModal from "@/components/modals/prestige/EnterDilationModal"; -import RealityModal from "@/components/modals/prestige/RealityModal"; -import ResetRealityModal from "@/components/modals/prestige/ResetRealityModal"; -import ExitCelestialModal from "@/components/modals/prestige/ExitCelestialModal"; -import EnterCelestialsModal from "@/components/modals/prestige/EnterCelestialsModal"; -import HardResetModal from "@/components/modals/prestige/HardResetModal"; -import SpeedrunModeModal from "@/components/modals/SpeedrunModeModal"; -import ChangeNameModal from "@/components/modals/ChangeNameModal"; import ArmageddonModal from "@/components/modals/prestige/ArmageddonModal"; +import BigCrunchModal from "@/components/modals/prestige/BigCrunchModal"; +import ChangeNameModal from "@/components/modals/ChangeNameModal"; +import DimensionBoostModal from "@/components/modals/prestige/DimensionBoostModal"; +import EnterCelestialsModal from "@/components/modals/prestige/EnterCelestialsModal"; +import EnterDilationModal from "@/components/modals/prestige/EnterDilationModal"; +import EternityModal from "@/components/modals/prestige/EternityModal"; +import ExitCelestialModal from "@/components/modals/prestige/ExitCelestialModal"; +import HardResetModal from "@/components/modals/prestige/HardResetModal"; +import RealityModal from "@/components/modals/prestige/RealityModal"; +import ReplicantiGalaxyModal from "@/components/modals/prestige/ReplicantiGalaxyModal"; +import ResetRealityModal from "@/components/modals/prestige/ResetRealityModal"; +import SpeedrunModeModal from "@/components/modals/SpeedrunModeModal"; -import ConfirmationOptionsModal from "@/components/modals/options/ConfirmationOptionsModal"; -import InfoDisplayOptionsModal from "@/components/modals/options/InfoDisplayOptionsModal"; -import AwayProgressOptionsModal from "@/components/modals/options/AwayProgressOptionsModal"; -import HotkeysModal from "@/components/modals/options/HotkeysModal"; -import NewsOptionsModal from "@/components/modals/options/NewsOptionsModal"; import AnimationOptionsModal from "@/components/modals/options/AnimationOptionsModal"; -import PreferredTreeModal from "@/components/modals/options/PreferredTreeModal"; +import AwayProgressOptionsModal from "@/components/modals/options/AwayProgressOptionsModal"; +import ConfirmationOptionsModal from "@/components/modals/options/ConfirmationOptionsModal"; import HiddenTabsModal from "@/components/modals/options/hidden-tabs/HiddenTabsModal"; +import HotkeysModal from "@/components/modals/options/HotkeysModal"; +import InfoDisplayOptionsModal from "@/components/modals/options/InfoDisplayOptionsModal"; +import NewsOptionsModal from "@/components/modals/options/NewsOptionsModal"; +import PreferredTreeModal from "@/components/modals/options/PreferredTreeModal"; import DeleteCompanionGlyphModal from "@/components/modals/glyph-management/DeleteCompanionGlyphModal"; import DeleteGlyphModal from "@/components/modals/glyph-management/DeleteGlyphModal"; -import PurgeGlyphModal from "@/components/modals/glyph-management/PurgeGlyphModal"; -import SacrificeGlyphModal from "@/components/modals/glyph-management/SacrificeGlyphModal"; -import RefineGlyphModal from "@/components/modals/glyph-management/RefineGlyphModal"; -import PurgeAllUnprotectedGlyphsModal from "@/components/modals/glyph-management/PurgeAllUnprotectedGlyphsModal"; import PurgeAllRejectedGlyphsModal from "@/components/modals/glyph-management/PurgeAllRejectedGlyphsModal"; +import PurgeAllUnprotectedGlyphsModal from "@/components/modals/glyph-management/PurgeAllUnprotectedGlyphsModal"; +import PurgeGlyphModal from "@/components/modals/glyph-management/PurgeGlyphModal"; +import RefineGlyphModal from "@/components/modals/glyph-management/RefineGlyphModal"; +import SacrificeGlyphModal from "@/components/modals/glyph-management/SacrificeGlyphModal"; -import H2PModal from "@/components/modals/H2PModal"; -import InformationModal from "@/components/modals/InformationModal"; -import GlyphShowcasePanelModal from "@/components/modals/GlyphShowcasePanelModal"; -import UndoGlyphModal from "@/components/modals/UndoGlyphModal"; -import ReplaceGlyphModal from "@/components/modals/ReplaceGlyphModal"; -import UiChoiceModal from "@/components/modals/UiChoiceModal"; -import AwayProgressModal from "@/components/modals/AwayProgressModal"; -import LoadGameModal from "@/components/modals/LoadGameModal"; -import ImportSaveModal from "@/components/modals/ImportSaveModal"; -import ImportAutomatorScriptModal from "@/components/modals/ImportAutomatorScriptModal"; -import DeleteAutomatorScriptModal from "@/components/modals/DeleteAutomatorScriptModal"; import AutomatorScriptTemplate from "@/components/modals/AutomatorScriptTemplate"; +import AwayProgressModal from "@/components/modals/AwayProgressModal"; +import BreakInfinityModal from "@/components/modals/BreakInfinityModal"; +import DeleteAutomatorScriptModal from "@/components/modals/DeleteAutomatorScriptModal"; +import EnslavedHintsModal from "@/components/modals/EnslavedHintsModal"; +import GlyphSetSaveDeleteModal from "@/components/modals/GlyphSetSaveDeleteModal"; +import GlyphShowcasePanelModal from "@/components/modals/GlyphShowcasePanelModal"; +import H2PModal from "@/components/modals/H2PModal"; +import ImportAutomatorScriptModal from "@/components/modals/ImportAutomatorScriptModal"; +import ImportSaveModal from "@/components/modals/ImportSaveModal"; +import InformationModal from "@/components/modals/InformationModal"; +import LoadGameModal from "@/components/modals/LoadGameModal"; +import PelleEffectsModal from "@/components/modals/PelleEffectsModal"; +import RealityGlyphCreationModal from "@/components/modals/RealityGlyphCreationModal"; +import ReplaceGlyphModal from "@/components/modals/ReplaceGlyphModal"; +import SacrificeModal from "@/components/modals/SacrificeModal"; +import SingularityMilestonesModal from "@/components/modals/SingularityMilestonesModal"; import StdStoreModal from "@/components/modals/StdStoreModal"; import StudyStringModal from "@/components/modals/StudyStringModal"; -import SacrificeModal from "@/components/modals/SacrificeModal"; -import BreakInfinityModal from "@/components/modals/BreakInfinityModal"; -import GlyphSetSaveDeleteModal from "@/components/modals/GlyphSetSaveDeleteModal"; -import RealityGlyphCreationModal from "@/components/modals/RealityGlyphCreationModal"; -import EnslavedHintsModal from "@/components/modals/EnslavedHintsModal"; -import SingularityMilestonesModal from "@/components/modals/SingularityMilestonesModal"; -import PelleEffectsModal from "@/components/modals/PelleEffectsModal"; +import UiChoiceModal from "@/components/modals/UiChoiceModal"; +import UndoGlyphModal from "@/components/modals/UndoGlyphModal"; export class Modal { diff --git a/javascripts/core/app/ui.js b/javascripts/core/app/ui.js index a84c9749a..3d2c53787 100644 --- a/javascripts/core/app/ui.js +++ b/javascripts/core/app/ui.js @@ -1,8 +1,10 @@ -import { notify } from "./notify.js"; -import { state } from "./ui.init.js"; import VTooltip from "v-tooltip"; -import { useLongPress, useRepeatingClick } from "./longpress"; import VueGtag from "vue-gtag"; + +import { useLongPress, useRepeatingClick } from "./longpress"; +import { notify } from "./notify"; +import { state } from "./ui.init"; + import GameUIComponent from "@/components/GameUIComponent"; Vue.mixin({ diff --git a/javascripts/core/autobuyers/annihilation-autobuyer.js b/javascripts/core/autobuyers/annihilation-autobuyer.js index 2dfa16fc7..ca2a1d629 100644 --- a/javascripts/core/autobuyers/annihilation-autobuyer.js +++ b/javascripts/core/autobuyers/annihilation-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, AutobuyerState } from "./autobuyer.js"; +import { Autobuyer, AutobuyerState } from "./autobuyer"; Autobuyer.annihilation = new class AnnihilationAutobuyerState extends AutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/antimatter-dimension-autobuyer.js b/javascripts/core/autobuyers/antimatter-dimension-autobuyer.js index 8ec91a596..861eb39a8 100644 --- a/javascripts/core/autobuyers/antimatter-dimension-autobuyer.js +++ b/javascripts/core/autobuyers/antimatter-dimension-autobuyer.js @@ -1,5 +1,6 @@ -import { Autobuyer, UpgradeableAutobuyerState } from "./autobuyer.js"; -import { DC } from "../constants.js"; +import { DC } from "../constants"; + +import { Autobuyer, UpgradeableAutobuyerState } from "./autobuyer"; class AntimatterDimensionAutobuyerState extends UpgradeableAutobuyerState { get tier() { diff --git a/javascripts/core/autobuyers/autobuyers.js b/javascripts/core/autobuyers/autobuyers.js index 359859a07..c4d97dc78 100644 --- a/javascripts/core/autobuyers/autobuyers.js +++ b/javascripts/core/autobuyers/autobuyers.js @@ -1,4 +1,4 @@ -import { Autobuyer } from "./autobuyer.js"; +import { Autobuyer } from "./autobuyer"; export const Autobuyers = (function() { const antimatterDimensions = Autobuyer.antimatterDimension.zeroIndexed; diff --git a/javascripts/core/autobuyers/big-crunch-autobuyer.js b/javascripts/core/autobuyers/big-crunch-autobuyer.js index fc6ee2eab..2542d321e 100644 --- a/javascripts/core/autobuyers/big-crunch-autobuyer.js +++ b/javascripts/core/autobuyers/big-crunch-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, UpgradeableAutobuyerState } from "./autobuyer.js"; +import { Autobuyer, UpgradeableAutobuyerState } from "./autobuyer"; Autobuyer.bigCrunch = new class BigCrunchAutobuyerState extends UpgradeableAutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/black-hole-power-autobuyer.js b/javascripts/core/autobuyers/black-hole-power-autobuyer.js index 108eeba6e..9ccf311e0 100644 --- a/javascripts/core/autobuyers/black-hole-power-autobuyer.js +++ b/javascripts/core/autobuyers/black-hole-power-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, AutobuyerState } from "./autobuyer.js"; +import { Autobuyer, AutobuyerState } from "./autobuyer"; class BlackHolePowerAutobuyerState extends AutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/dark-matter-dimension-ascension-autobuyer.js b/javascripts/core/autobuyers/dark-matter-dimension-ascension-autobuyer.js index d86f133f8..32c919472 100644 --- a/javascripts/core/autobuyers/dark-matter-dimension-ascension-autobuyer.js +++ b/javascripts/core/autobuyers/dark-matter-dimension-ascension-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, IntervaledAutobuyerState } from "./autobuyer.js"; +import { Autobuyer, IntervaledAutobuyerState } from "./autobuyer"; Autobuyer.darkMatterDimsAscension = new class DarkMatterDimensionAscensionAutobuyerState extends IntervaledAutobuyerState { diff --git a/javascripts/core/autobuyers/dark-matter-dimension-autobuyer.js b/javascripts/core/autobuyers/dark-matter-dimension-autobuyer.js index 502d53990..c3c39bba7 100644 --- a/javascripts/core/autobuyers/dark-matter-dimension-autobuyer.js +++ b/javascripts/core/autobuyers/dark-matter-dimension-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, IntervaledAutobuyerState } from "./autobuyer.js"; +import { Autobuyer, IntervaledAutobuyerState } from "./autobuyer"; Autobuyer.darkMatterDims = new class DarkMatterDimensionAutobuyerState extends IntervaledAutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/dilation-upgrade-autobuyer.js b/javascripts/core/autobuyers/dilation-upgrade-autobuyer.js index 0c46b71f7..9f00eaa87 100644 --- a/javascripts/core/autobuyers/dilation-upgrade-autobuyer.js +++ b/javascripts/core/autobuyers/dilation-upgrade-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, IntervaledAutobuyerState } from "./autobuyer.js"; +import { Autobuyer, IntervaledAutobuyerState } from "./autobuyer"; class DilationUpgradeAutobuyerState extends IntervaledAutobuyerState { get _upgradeName() { return ["dtGain", "galaxyThreshold", "tachyonGain"][this.id - 1]; } diff --git a/javascripts/core/autobuyers/dimboost-autobuyer.js b/javascripts/core/autobuyers/dimboost-autobuyer.js index 2b3de13a2..ee27c01f6 100644 --- a/javascripts/core/autobuyers/dimboost-autobuyer.js +++ b/javascripts/core/autobuyers/dimboost-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, UpgradeableAutobuyerState } from "./autobuyer.js"; +import { Autobuyer, UpgradeableAutobuyerState } from "./autobuyer"; Autobuyer.dimboost = new class DimBoostAutobuyerState extends UpgradeableAutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/eternity-autobuyer.js b/javascripts/core/autobuyers/eternity-autobuyer.js index cbf187cd4..2254ee2cd 100644 --- a/javascripts/core/autobuyers/eternity-autobuyer.js +++ b/javascripts/core/autobuyers/eternity-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, AutobuyerState } from "./autobuyer.js"; +import { Autobuyer, AutobuyerState } from "./autobuyer"; Autobuyer.eternity = new class EternityAutobuyerState extends AutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/galaxy-autobuyer.js b/javascripts/core/autobuyers/galaxy-autobuyer.js index 0109fd878..fa50801d8 100644 --- a/javascripts/core/autobuyers/galaxy-autobuyer.js +++ b/javascripts/core/autobuyers/galaxy-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, UpgradeableAutobuyerState } from "./autobuyer.js"; +import { Autobuyer, UpgradeableAutobuyerState } from "./autobuyer"; Autobuyer.galaxy = new class GalaxyAutobuyerState extends UpgradeableAutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/imaginary-upgrade-autobuyer.js b/javascripts/core/autobuyers/imaginary-upgrade-autobuyer.js index 18407020c..9064b4d84 100644 --- a/javascripts/core/autobuyers/imaginary-upgrade-autobuyer.js +++ b/javascripts/core/autobuyers/imaginary-upgrade-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, AutobuyerState } from "./autobuyer.js"; +import { Autobuyer, AutobuyerState } from "./autobuyer"; class ImaginaryUpgradeAutobuyerState extends AutobuyerState { get name() { diff --git a/javascripts/core/autobuyers/index.js b/javascripts/core/autobuyers/index.js index c8b7d8a89..977d7d2f4 100644 --- a/javascripts/core/autobuyers/index.js +++ b/javascripts/core/autobuyers/index.js @@ -1,27 +1,27 @@ -import "./autobuyer.js"; +import "./autobuyer"; -import "./antimatter-dimension-autobuyer.js"; -import "./tickspeed-autobuyer.js"; -import "./dimboost-autobuyer.js"; -import "./galaxy-autobuyer.js"; -import "./big-crunch-autobuyer.js"; -import "./sacrifice-autobuyer.js"; -import "./eternity-autobuyer.js"; -import "./reality-autobuyer.js"; +import "./antimatter-dimension-autobuyer"; +import "./tickspeed-autobuyer"; +import "./dimboost-autobuyer"; +import "./galaxy-autobuyer"; +import "./big-crunch-autobuyer"; +import "./sacrifice-autobuyer"; +import "./eternity-autobuyer"; +import "./reality-autobuyer"; -import "./infinity-dimension-autobuyer.js"; -import "./time-dimension-autobuyer.js"; -import "./time-theorem-autobuyer.js"; -import "./black-hole-power-autobuyer.js"; -import "./reality-upgrade-autobuyer.js"; -import "./imaginary-upgrade-autobuyer.js"; -import "./replicanti-upgrade-autobuyer.js"; -import "./dilation-upgrade-autobuyer.js"; -import "./prestige-currency-multiplier-autobuyer.js"; -import "./replicanti-galaxy-autobuyer.js"; -import "./dark-matter-dimension-autobuyer.js"; -import "./dark-matter-dimension-ascension-autobuyer.js"; -import "./singularity-autobuyer.js"; -import "./annihilation-autobuyer.js"; +import "./infinity-dimension-autobuyer"; +import "./time-dimension-autobuyer"; +import "./time-theorem-autobuyer"; +import "./black-hole-power-autobuyer"; +import "./reality-upgrade-autobuyer"; +import "./imaginary-upgrade-autobuyer"; +import "./replicanti-upgrade-autobuyer"; +import "./dilation-upgrade-autobuyer"; +import "./prestige-currency-multiplier-autobuyer"; +import "./replicanti-galaxy-autobuyer"; +import "./dark-matter-dimension-autobuyer"; +import "./dark-matter-dimension-ascension-autobuyer"; +import "./singularity-autobuyer"; +import "./annihilation-autobuyer"; -export * from "./autobuyers.js"; +export * from "./autobuyers"; diff --git a/javascripts/core/autobuyers/infinity-dimension-autobuyer.js b/javascripts/core/autobuyers/infinity-dimension-autobuyer.js index f2c4400c7..fa3e5a0eb 100644 --- a/javascripts/core/autobuyers/infinity-dimension-autobuyer.js +++ b/javascripts/core/autobuyers/infinity-dimension-autobuyer.js @@ -1,5 +1,6 @@ -import { InfinityDimensions } from "../globals.js"; -import { Autobuyer, IntervaledAutobuyerState } from "./autobuyer.js"; +import { InfinityDimensions } from "../globals"; + +import { Autobuyer, IntervaledAutobuyerState } from "./autobuyer"; class InfinityDimensionAutobuyerState extends IntervaledAutobuyerState { get tier() { diff --git a/javascripts/core/autobuyers/prestige-currency-multiplier-autobuyer.js b/javascripts/core/autobuyers/prestige-currency-multiplier-autobuyer.js index 049e7a4c5..f85e85019 100644 --- a/javascripts/core/autobuyers/prestige-currency-multiplier-autobuyer.js +++ b/javascripts/core/autobuyers/prestige-currency-multiplier-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, AutobuyerState } from "./autobuyer.js"; +import { Autobuyer, AutobuyerState } from "./autobuyer"; Autobuyer.ipMult = new class IPMultAutobuyerState extends AutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/reality-autobuyer.js b/javascripts/core/autobuyers/reality-autobuyer.js index ae43a486c..ed094e199 100644 --- a/javascripts/core/autobuyers/reality-autobuyer.js +++ b/javascripts/core/autobuyers/reality-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, AutobuyerState } from "./autobuyer.js"; +import { Autobuyer, AutobuyerState } from "./autobuyer"; Autobuyer.reality = new class RealityAutobuyerState extends AutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/reality-upgrade-autobuyer.js b/javascripts/core/autobuyers/reality-upgrade-autobuyer.js index 2c7db85a5..f94dc7aae 100644 --- a/javascripts/core/autobuyers/reality-upgrade-autobuyer.js +++ b/javascripts/core/autobuyers/reality-upgrade-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, AutobuyerState } from "./autobuyer.js"; +import { Autobuyer, AutobuyerState } from "./autobuyer"; class RealityUpgradeAutobuyerState extends AutobuyerState { get name() { diff --git a/javascripts/core/autobuyers/replicanti-galaxy-autobuyer.js b/javascripts/core/autobuyers/replicanti-galaxy-autobuyer.js index 8f8b91032..08ce679b4 100644 --- a/javascripts/core/autobuyers/replicanti-galaxy-autobuyer.js +++ b/javascripts/core/autobuyers/replicanti-galaxy-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, AutobuyerState } from "./autobuyer.js"; +import { Autobuyer, AutobuyerState } from "./autobuyer"; Autobuyer.replicantiGalaxy = new class ReplicantiGalaxyAutobuyerState extends AutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/replicanti-upgrade-autobuyer.js b/javascripts/core/autobuyers/replicanti-upgrade-autobuyer.js index 49fe1ade5..8530745ba 100644 --- a/javascripts/core/autobuyers/replicanti-upgrade-autobuyer.js +++ b/javascripts/core/autobuyers/replicanti-upgrade-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, IntervaledAutobuyerState } from "./autobuyer.js"; +import { Autobuyer, IntervaledAutobuyerState } from "./autobuyer"; class ReplicantiUpgradeAutobuyerState extends IntervaledAutobuyerState { get _upgradeName() { return ["chance", "interval", "galaxies"][this.id - 1]; } diff --git a/javascripts/core/autobuyers/sacrifice-autobuyer.js b/javascripts/core/autobuyers/sacrifice-autobuyer.js index 4f17908ac..49b475630 100644 --- a/javascripts/core/autobuyers/sacrifice-autobuyer.js +++ b/javascripts/core/autobuyers/sacrifice-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, AutobuyerState } from "./autobuyer.js"; +import { Autobuyer, AutobuyerState } from "./autobuyer"; Autobuyer.sacrifice = new class SacrificeAutobuyerState extends AutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/singularity-autobuyer.js b/javascripts/core/autobuyers/singularity-autobuyer.js index cd791bd98..5a9468637 100644 --- a/javascripts/core/autobuyers/singularity-autobuyer.js +++ b/javascripts/core/autobuyers/singularity-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, AutobuyerState } from "./autobuyer.js"; +import { Autobuyer, AutobuyerState } from "./autobuyer"; Autobuyer.singularity = new class SingularityAutobuyerState extends AutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/tickspeed-autobuyer.js b/javascripts/core/autobuyers/tickspeed-autobuyer.js index 6801f1532..f42debb64 100644 --- a/javascripts/core/autobuyers/tickspeed-autobuyer.js +++ b/javascripts/core/autobuyers/tickspeed-autobuyer.js @@ -1,5 +1,6 @@ -import { Autobuyer, UpgradeableAutobuyerState } from "./autobuyer.js"; -import { DC } from "../constants.js"; +import { DC } from "../constants"; + +import { Autobuyer, UpgradeableAutobuyerState } from "./autobuyer"; Autobuyer.tickspeed = new class TickspeedAutobuyerState extends UpgradeableAutobuyerState { get data() { diff --git a/javascripts/core/autobuyers/time-dimension-autobuyer.js b/javascripts/core/autobuyers/time-dimension-autobuyer.js index ce9c29dad..523417699 100644 --- a/javascripts/core/autobuyers/time-dimension-autobuyer.js +++ b/javascripts/core/autobuyers/time-dimension-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, IntervaledAutobuyerState } from "./autobuyer.js"; +import { Autobuyer, IntervaledAutobuyerState } from "./autobuyer"; class TimeDimensionAutobuyerState extends IntervaledAutobuyerState { get tier() { diff --git a/javascripts/core/autobuyers/time-theorem-autobuyer.js b/javascripts/core/autobuyers/time-theorem-autobuyer.js index a63110afa..13d0e061b 100644 --- a/javascripts/core/autobuyers/time-theorem-autobuyer.js +++ b/javascripts/core/autobuyers/time-theorem-autobuyer.js @@ -1,4 +1,4 @@ -import { Autobuyer, AutobuyerState } from "./autobuyer.js"; +import { Autobuyer, AutobuyerState } from "./autobuyer"; Autobuyer.timeTheorem = new class TimeTheoremAutobuyerState extends AutobuyerState { get data() { diff --git a/javascripts/core/automator/automator-codemirror.js b/javascripts/core/automator/automator-codemirror.js index 4acedd864..8d3812c36 100644 --- a/javascripts/core/automator/automator-codemirror.js +++ b/javascripts/core/automator/automator-codemirror.js @@ -1,5 +1,5 @@ -import { AutomatorGrammar } from "./parser.js"; -import { AutomatorLexer } from "./lexer.js"; +import { AutomatorGrammar } from "./parser"; +import { AutomatorLexer } from "./lexer"; (function() { function walkSuggestion(suggestion, prefix, output) { diff --git a/javascripts/core/automator/automator-commands.js b/javascripts/core/automator/automator-commands.js index b23a02d54..23d85fb14 100644 --- a/javascripts/core/automator/automator-commands.js +++ b/javascripts/core/automator/automator-commands.js @@ -1,4 +1,4 @@ -import { AutomatorLexer } from "./lexer.js"; +import { AutomatorLexer } from "./lexer"; /** * Note: the $ shorthand for the parser object is required by Chevrotain. Don't mess with it. @@ -723,7 +723,7 @@ export const AutomatorCommands = ((() => { if (missingStudyCount === 0) { AutomatorData.logCommandEvent(`Fully loaded study preset ${ctx.Preset[0].image}`, ctx.startLine); } else if (afterCount > beforeCount) { - AutomatorData.logCommandEvent(`Partially loaded study preset ${ctx.Preset[0].image} + AutomatorData.logCommandEvent(`Partially loaded study preset ${ctx.Preset[0].image} (missing ${quantifyInt("study", missingStudyCount)})`, ctx.startLine); } return ctx.Nowait !== undefined || missingStudyCount === 0 diff --git a/javascripts/core/automator/compiler.js b/javascripts/core/automator/compiler.js index 23cc57247..ced011a23 100644 --- a/javascripts/core/automator/compiler.js +++ b/javascripts/core/automator/compiler.js @@ -1,6 +1,6 @@ -import { AutomatorCommands } from "./automator-commands.js"; -import { AutomatorGrammar } from "./parser.js"; -import { AutomatorLexer } from "./lexer.js"; +import { AutomatorCommands } from "./automator-commands"; +import { AutomatorGrammar } from "./parser"; +import { AutomatorLexer } from "./lexer"; (function() { if (AutomatorGrammar === undefined) { diff --git a/javascripts/core/automator/index.js b/javascripts/core/automator/index.js index 72759cf64..019909292 100644 --- a/javascripts/core/automator/index.js +++ b/javascripts/core/automator/index.js @@ -1,5 +1,5 @@ -import "./compiler.js"; -import "./automator-codemirror.js"; +import "./compiler"; +import "./automator-codemirror"; -export { AutomatorGrammar } from "./parser.js"; -export { standardizeAutomatorCurrencyName } from "./lexer.js"; +export { AutomatorGrammar } from "./parser"; +export { standardizeAutomatorCurrencyName } from "./lexer"; diff --git a/javascripts/core/automator/lexer.js b/javascripts/core/automator/lexer.js index 1d1b6270e..7118aa06c 100644 --- a/javascripts/core/automator/lexer.js +++ b/javascripts/core/automator/lexer.js @@ -2,7 +2,8 @@ /* eslint-disable require-unicode-regexp */ /* eslint-disable camelcase */ import { createToken, Lexer } from "chevrotain"; -import { DC } from "../constants.js"; + +import { DC } from "../constants"; export const AutomatorLexer = (() => { const createCategory = name => createToken({ name, pattern: Lexer.NA, longer_alt: Identifier }); diff --git a/javascripts/core/automator/parser.js b/javascripts/core/automator/parser.js index 32bac32f7..714554a2f 100644 --- a/javascripts/core/automator/parser.js +++ b/javascripts/core/automator/parser.js @@ -1,6 +1,7 @@ -import { Parser, EOF } from "chevrotain"; -import { AutomatorCommands } from "./automator-commands.js"; -import { AutomatorLexer } from "./lexer.js"; +import { EOF, Parser } from "chevrotain"; + +import { AutomatorCommands } from "./automator-commands"; +import { AutomatorLexer } from "./lexer"; export const AutomatorGrammar = (function() { const T = AutomatorLexer.tokenMap; diff --git a/javascripts/core/big_crunch.js b/javascripts/core/big_crunch.js index 48fdf30e8..063572e1c 100644 --- a/javascripts/core/big_crunch.js +++ b/javascripts/core/big_crunch.js @@ -1,6 +1,6 @@ -import { GameMechanicState, SetPurchasableMechanicState, RebuyableMechanicState } from "./game-mechanics/index.js"; -import { DC } from "./constants.js"; -import { SpeedrunMilestones } from "./speedrun.js"; +import { GameMechanicState, RebuyableMechanicState, SetPurchasableMechanicState } from "./game-mechanics/index"; +import { DC } from "./constants"; +import { SpeedrunMilestones } from "./speedrun"; export function bigCrunchAnimation() { document.body.style.animation = "implode 2s 1"; @@ -52,10 +52,10 @@ export function bigCrunchReset() { if (Pelle.isDoomed) PelleStrikes.infinity.trigger(); EventHub.dispatch(GAME_EVENT.BIG_CRUNCH_AFTER); - if (firstInfinity && !Pelle.isDoomed) Modal.message.show(`Upon Infinity, all Dimensions, Dimension Boosts, and Antimatter - Galaxies are reset, but in return, you gain an Infinity Point (IP). This allows you to buy multiple upgrades that - you can find in the Infinity tab. You will also gain one Infinity, which is the stat shown in the Statistics - tab.`); + if (firstInfinity && !Pelle.isDoomed) Modal.message.show(`Upon Infinity, all Dimensions, Dimension Boosts, and + Antimatter Galaxies are reset, but in return, you gain an Infinity Point (IP). This allows you to buy multiple + upgrades that you can find in the Infinity tab. You will also gain one Infinity, which is the stat shown in the + Statistics tab.`); } function bigCrunchUpdateStatistics() { diff --git a/javascripts/core/black_hole.js b/javascripts/core/black_hole.js index 597c6ca2b..f4cf69aa2 100644 --- a/javascripts/core/black_hole.js +++ b/javascripts/core/black_hole.js @@ -1,5 +1,5 @@ -import { DC } from "./constants.js"; -import { SpeedrunMilestones } from "./speedrun.js"; +import { DC } from "./constants"; +import { SpeedrunMilestones } from "./speedrun"; class BlackHoleUpgradeState { constructor(config) { diff --git a/javascripts/core/celestials/V.js b/javascripts/core/celestials/V.js index fa00faa17..918da7264 100644 --- a/javascripts/core/celestials/V.js +++ b/javascripts/core/celestials/V.js @@ -1,7 +1,9 @@ -import { GameDatabase } from "../secret-formula/game-database.js"; -import { GameMechanicState, BitUpgradeState } from "../game-mechanics/index.js"; -import { CelestialQuotes } from "./quotes.js"; -import { SpeedrunMilestones } from "../speedrun.js"; +import { BitUpgradeState, GameMechanicState } from "../game-mechanics/index"; +import { GameDatabase } from "../secret-formula/game-database"; + +import { SpeedrunMilestones } from "../speedrun"; + +import { CelestialQuotes } from "./quotes"; /** * Information about how to format runUnlocks: diff --git a/javascripts/core/celestials/celestials.js b/javascripts/core/celestials/celestials.js index 2563eaff6..e7ad90555 100644 --- a/javascripts/core/celestials/celestials.js +++ b/javascripts/core/celestials/celestials.js @@ -1,10 +1,10 @@ -import { Teresa } from "./teresa.js"; -import { Effarig } from "./effarig.js"; -import { Enslaved } from "./enslaved.js"; -import { V } from "./V.js"; -import { Ra } from "./ra/ra.js"; -import { Laitela } from "./laitela/laitela.js"; +import { Effarig } from "./effarig"; +import { Enslaved } from "./enslaved"; +import { Laitela } from "./laitela/laitela"; import { Pelle } from "./pelle/pelle"; +import { Ra } from "./ra/ra"; +import { Teresa } from "./teresa"; +import { V } from "./V"; export const Celestials = { teresa: Teresa, diff --git a/javascripts/core/celestials/effarig.js b/javascripts/core/celestials/effarig.js index 1ddee8829..823a0984e 100644 --- a/javascripts/core/celestials/effarig.js +++ b/javascripts/core/celestials/effarig.js @@ -1,7 +1,9 @@ -import { GameDatabase } from "../secret-formula/game-database.js"; -import { BitUpgradeState } from "../game-mechanics/index.js"; -import { CelestialQuotes } from "./quotes.js"; -import { DC } from "../constants.js"; +import { BitUpgradeState } from "../game-mechanics/index"; +import { GameDatabase } from "../secret-formula/game-database"; + +import { DC } from "../constants"; + +import { CelestialQuotes } from "./quotes"; export const EFFARIG_STAGES = { INFINITY: 1, diff --git a/javascripts/core/celestials/enslaved.js b/javascripts/core/celestials/enslaved.js index 78900e9b8..bf34196ec 100644 --- a/javascripts/core/celestials/enslaved.js +++ b/javascripts/core/celestials/enslaved.js @@ -1,6 +1,7 @@ -import { GameDatabase } from "../secret-formula/game-database.js"; -import { BitUpgradeState } from "../game-mechanics/index.js"; -import { CelestialQuotes } from "./quotes.js"; +import { BitUpgradeState } from "../game-mechanics/index"; +import { GameDatabase } from "../secret-formula/game-database"; + +import { CelestialQuotes } from "./quotes"; export const ENSLAVED_UNLOCKS = { FREE_TICKSPEED_SOFTCAP: { diff --git a/javascripts/core/celestials/laitela/dark-matter-dimension.js b/javascripts/core/celestials/laitela/dark-matter-dimension.js index 98577bdb4..bf9aaa4a4 100644 --- a/javascripts/core/celestials/laitela/dark-matter-dimension.js +++ b/javascripts/core/celestials/laitela/dark-matter-dimension.js @@ -1,5 +1,5 @@ -import { DimensionState } from "../../dimensions/dimension.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { DimensionState } from "../../dimensions/dimension"; /** * Constants for easily adjusting values diff --git a/javascripts/core/celestials/laitela/laitela.js b/javascripts/core/celestials/laitela/laitela.js index f14bbe65a..c8544a9a7 100644 --- a/javascripts/core/celestials/laitela/laitela.js +++ b/javascripts/core/celestials/laitela/laitela.js @@ -1,6 +1,7 @@ -import { CelestialQuotes } from "../quotes.js"; -import { DC } from "../../constants.js"; -import { DarkMatterDimensions } from "./dark-matter-dimension.js"; +import { CelestialQuotes } from "../quotes"; +import { DC } from "../../constants"; + +import { DarkMatterDimensions } from "./dark-matter-dimension"; export const Laitela = { displayName: "Lai'tela", diff --git a/javascripts/core/celestials/laitela/singularity.js b/javascripts/core/celestials/laitela/singularity.js index a0afdb20a..bfc172164 100644 --- a/javascripts/core/celestials/laitela/singularity.js +++ b/javascripts/core/celestials/laitela/singularity.js @@ -1,4 +1,5 @@ -import { GameMechanicState } from "../../game-mechanics/index.js"; +import { GameMechanicState } from "../../game-mechanics/index"; + import { deepmergeAll } from "@/utility/deepmerge"; class SingularityMilestoneState extends GameMechanicState { diff --git a/javascripts/core/celestials/pelle/galaxy-generator.js b/javascripts/core/celestials/pelle/galaxy-generator.js index 1ab9144c3..b5249e0ad 100644 --- a/javascripts/core/celestials/pelle/galaxy-generator.js +++ b/javascripts/core/celestials/pelle/galaxy-generator.js @@ -1,5 +1,6 @@ import { DC } from "../../constants"; import { RebuyableMechanicState } from "../../game-mechanics/rebuyable"; + import { PelleRifts } from "./rifts"; export const GalaxyGenerator = { diff --git a/javascripts/core/celestials/pelle/pelle.js b/javascripts/core/celestials/pelle/pelle.js index 89dd64349..e9d522e41 100644 --- a/javascripts/core/celestials/pelle/pelle.js +++ b/javascripts/core/celestials/pelle/pelle.js @@ -1,9 +1,11 @@ -import { DC } from "../../constants"; import { Currency } from "../../currency"; +import { DC } from "../../constants"; import { RebuyableMechanicState } from "../../game-mechanics/rebuyable"; import { SetPurchasableMechanicState } from "../../utils"; + +import { CelestialQuotes } from "../quotes"; + import zalgo from "./zalgo"; -import { CelestialQuotes } from "../quotes.js"; const disabledMechanicUnlocks = { achievements: () => ({}), diff --git a/javascripts/core/celestials/ra/alchemy.js b/javascripts/core/celestials/ra/alchemy.js index 84e7f6e8f..fe02a65bd 100644 --- a/javascripts/core/celestials/ra/alchemy.js +++ b/javascripts/core/celestials/ra/alchemy.js @@ -1,4 +1,4 @@ -import { GameMechanicState } from "../../game-mechanics/index.js"; +import { GameMechanicState } from "../../game-mechanics/index"; /** * @abstract diff --git a/javascripts/core/celestials/ra/ra.js b/javascripts/core/celestials/ra/ra.js index 1ded82f31..102cf7c2f 100644 --- a/javascripts/core/celestials/ra/ra.js +++ b/javascripts/core/celestials/ra/ra.js @@ -1,5 +1,5 @@ -import { GameMechanicState, BitUpgradeState } from "../../game-mechanics/index.js"; -import { CelestialQuotes } from "../quotes.js"; +import { BitUpgradeState, GameMechanicState } from "../../game-mechanics/index"; +import { CelestialQuotes } from "../quotes"; class RaUnlockState extends BitUpgradeState { get bits() { return player.celestials.ra.unlockBits; } diff --git a/javascripts/core/celestials/teresa.js b/javascripts/core/celestials/teresa.js index c255fc9f1..e8e99da69 100644 --- a/javascripts/core/celestials/teresa.js +++ b/javascripts/core/celestials/teresa.js @@ -1,6 +1,7 @@ -import { GameDatabase } from "../secret-formula/game-database.js"; -import { BitUpgradeState, RebuyableMechanicState } from "../game-mechanics/index.js"; -import { CelestialQuotes } from "./quotes.js"; +import { BitUpgradeState, RebuyableMechanicState } from "../game-mechanics/index"; +import { GameDatabase } from "../secret-formula/game-database"; + +import { CelestialQuotes } from "./quotes"; export const Teresa = { timePoured: 0, diff --git a/javascripts/core/challenge.js b/javascripts/core/challenge.js index 78d7613e2..19d2fc835 100644 --- a/javascripts/core/challenge.js +++ b/javascripts/core/challenge.js @@ -1,5 +1,5 @@ -import { GameMechanicState } from "./game-mechanics/index.js"; -import { DC } from "./constants.js"; +import { DC } from "./constants"; +import { GameMechanicState } from "./game-mechanics/index"; // This function does *not* reset anything. Only call it when you've already // done all the non-UI stuff. Right now the only UI thing to do is switch to diff --git a/javascripts/core/currency.js b/javascripts/core/currency.js index 695514a03..08521d49e 100644 --- a/javascripts/core/currency.js +++ b/javascripts/core/currency.js @@ -1,4 +1,4 @@ -import { DC } from "./constants.js"; +import { DC } from "./constants"; /** diff --git a/javascripts/core/devtools.js b/javascripts/core/devtools.js index e1ea9ed91..8ac429cbd 100644 --- a/javascripts/core/devtools.js +++ b/javascripts/core/devtools.js @@ -1,6 +1,7 @@ -import { DC } from "./constants.js"; import { sha512_256 } from "js-sha512"; +import { DC } from "./constants"; + /* eslint-disable no-console */ // Disabling no-console here seems // reasonable, since these are the devtools after all diff --git a/javascripts/core/dilation.js b/javascripts/core/dilation.js index 4bc20bb5e..00e780749 100644 --- a/javascripts/core/dilation.js +++ b/javascripts/core/dilation.js @@ -1,6 +1,6 @@ -import { SetPurchasableMechanicState, RebuyableMechanicState } from "./game-mechanics/index.js"; -import { DC } from "./constants.js"; -import { SpeedrunMilestones } from "./speedrun.js"; +import { RebuyableMechanicState, SetPurchasableMechanicState } from "./game-mechanics/index"; +import { DC } from "./constants"; +import { SpeedrunMilestones } from "./speedrun"; export function animateAndDilate() { document.body.style.animation = "dilate 2s 1 linear"; diff --git a/javascripts/core/dimboost.js b/javascripts/core/dimboost.js index 2b39897f9..ef475da11 100644 --- a/javascripts/core/dimboost.js +++ b/javascripts/core/dimboost.js @@ -1,4 +1,4 @@ -import { DC } from "./constants.js"; +import { DC } from "./constants"; class DimBoostRequirement { constructor(tier, amount) { diff --git a/javascripts/core/dimensions/antimatter-dimension.js b/javascripts/core/dimensions/antimatter-dimension.js index 294c1e0e8..627a6d706 100644 --- a/javascripts/core/dimensions/antimatter-dimension.js +++ b/javascripts/core/dimensions/antimatter-dimension.js @@ -1,5 +1,6 @@ -import { DimensionState } from "./dimension.js"; -import { DC } from "../constants.js"; +import { DC } from "../constants"; + +import { DimensionState } from "./dimension"; // Multiplier applied to all Antimatter Dimensions, regardless of tier. This is cached using a Lazy // and invalidated every update. diff --git a/javascripts/core/dimensions/infinity-dimension.js b/javascripts/core/dimensions/infinity-dimension.js index b626d9cc4..de810c5da 100644 --- a/javascripts/core/dimensions/infinity-dimension.js +++ b/javascripts/core/dimensions/infinity-dimension.js @@ -1,5 +1,6 @@ -import { DimensionState } from "./dimension.js"; -import { DC } from "../constants.js"; +import { DC } from "../constants"; + +import { DimensionState } from "./dimension"; export function infinityDimensionCommonMultiplier() { let mult = new Decimal(ShopPurchase.allDimPurchases.currentMult) diff --git a/javascripts/core/dimensions/time-dimension.js b/javascripts/core/dimensions/time-dimension.js index 1571006b3..503998a18 100644 --- a/javascripts/core/dimensions/time-dimension.js +++ b/javascripts/core/dimensions/time-dimension.js @@ -1,5 +1,6 @@ -import { DimensionState } from "./dimension.js"; -import { DC } from "../constants.js"; +import { DC } from "../constants"; + +import { DimensionState } from "./dimension"; export function buySingleTimeDimension(tier) { const dim = TimeDimension(tier); diff --git a/javascripts/core/eternity.js b/javascripts/core/eternity.js index cd3e0d2cf..0475eb0cc 100644 --- a/javascripts/core/eternity.js +++ b/javascripts/core/eternity.js @@ -1,5 +1,5 @@ -import { GameMechanicState, SetPurchasableMechanicState } from "./game-mechanics/index.js"; -import { DC } from "./constants.js"; +import { GameMechanicState, SetPurchasableMechanicState } from "./game-mechanics/index"; +import { DC } from "./constants"; function giveEternityRewards(auto) { player.records.bestEternity.time = Math.min(player.records.thisEternity.time, player.records.bestEternity.time); diff --git a/javascripts/core/eternity_challenge.js b/javascripts/core/eternity_challenge.js index dcb640a7e..08172b901 100644 --- a/javascripts/core/eternity_challenge.js +++ b/javascripts/core/eternity_challenge.js @@ -1,6 +1,6 @@ -import { GameMechanicState } from "./game-mechanics/index.js"; -import { DC } from "./constants.js"; +import { DC } from "./constants"; import { deepmergeAll } from "@/utility/deepmerge"; +import { GameMechanicState } from "./game-mechanics/index"; export function startEternityChallenge() { initializeChallengeCompletions(); diff --git a/javascripts/core/game-mechanics/bit-purchasable.js b/javascripts/core/game-mechanics/bit-purchasable.js index 670998158..c2c339858 100644 --- a/javascripts/core/game-mechanics/bit-purchasable.js +++ b/javascripts/core/game-mechanics/bit-purchasable.js @@ -1,4 +1,4 @@ -import { PurchasableMechanicState } from "./puchasable.js"; +import { PurchasableMechanicState } from "./puchasable"; /** * @abstract diff --git a/javascripts/core/game-mechanics/bit-upgrade-state.js b/javascripts/core/game-mechanics/bit-upgrade-state.js index 2c21de72a..ff971913b 100644 --- a/javascripts/core/game-mechanics/bit-upgrade-state.js +++ b/javascripts/core/game-mechanics/bit-upgrade-state.js @@ -1,4 +1,4 @@ -import { GameMechanicState } from "./game-mechanic.js"; +import { GameMechanicState } from "./game-mechanic"; /** * @abstract diff --git a/javascripts/core/game-mechanics/game-mechanic.js b/javascripts/core/game-mechanics/game-mechanic.js index de6012e04..03e156de6 100644 --- a/javascripts/core/game-mechanics/game-mechanic.js +++ b/javascripts/core/game-mechanics/game-mechanic.js @@ -1,4 +1,4 @@ -import { Effect } from "./effect.js"; +import { Effect } from "./effect"; /** * @abstract diff --git a/javascripts/core/game-mechanics/index.js b/javascripts/core/game-mechanics/index.js index 5268f10d4..9756ec589 100644 --- a/javascripts/core/game-mechanics/index.js +++ b/javascripts/core/game-mechanics/index.js @@ -1,8 +1,8 @@ -export * from "./effect.js"; -export * from "./effects.js"; -export * from "./game-mechanic.js"; -export * from "./bit-upgrade-state.js"; -export * from "./puchasable.js"; -export * from "./set-purchasable.js"; -export * from "./bit-purchasable.js"; -export * from "./rebuyable.js"; +export * from "./effect"; +export * from "./effects"; +export * from "./game-mechanic"; +export * from "./bit-upgrade-state"; +export * from "./puchasable"; +export * from "./set-purchasable"; +export * from "./bit-purchasable"; +export * from "./rebuyable"; diff --git a/javascripts/core/game-mechanics/puchasable.js b/javascripts/core/game-mechanics/puchasable.js index fb4843bb4..44f24c146 100644 --- a/javascripts/core/game-mechanics/puchasable.js +++ b/javascripts/core/game-mechanics/puchasable.js @@ -1,4 +1,4 @@ -import { GameMechanicState } from "./game-mechanic.js"; +import { GameMechanicState } from "./game-mechanic"; /** * @abstract diff --git a/javascripts/core/game-mechanics/rebuyable.js b/javascripts/core/game-mechanics/rebuyable.js index f6c98eab0..ac3abbb0d 100644 --- a/javascripts/core/game-mechanics/rebuyable.js +++ b/javascripts/core/game-mechanics/rebuyable.js @@ -1,4 +1,4 @@ -import { GameMechanicState } from "./game-mechanic.js"; +import { GameMechanicState } from "./game-mechanic"; /** * @abstract diff --git a/javascripts/core/game-mechanics/set-purchasable.js b/javascripts/core/game-mechanics/set-purchasable.js index 0a763198c..96e48ca6d 100644 --- a/javascripts/core/game-mechanics/set-purchasable.js +++ b/javascripts/core/game-mechanics/set-purchasable.js @@ -1,4 +1,4 @@ -import { PurchasableMechanicState } from "./puchasable.js"; +import { PurchasableMechanicState } from "./puchasable"; /** * @abstract diff --git a/javascripts/core/globals.js b/javascripts/core/globals.js index 7a75923c9..a341628b0 100644 --- a/javascripts/core/globals.js +++ b/javascripts/core/globals.js @@ -1,90 +1,90 @@ -export * from "./glyph-effects.js"; -export * from "./player.js"; +export * from "./glyph-effects"; +export * from "./player"; -export * from "./automator/automator-backend.js"; -export * from "./performance-stats.js"; -export * from "./currency.js"; -export * from "./cache.js"; -export * from "./intervals.js"; -export * from "./keyboard.js"; -export * from "./hotkeys.js"; -export * from "./galaxy.js"; -export * from "./away-progress.js"; -export * from "./confirmations.js"; +export * from "./automator/automator-backend"; +export * from "./performance-stats"; +export * from "./currency"; +export * from "./cache"; +export * from "./intervals"; +export * from "./keyboard"; +export * from "./hotkeys"; +export * from "./galaxy"; +export * from "./away-progress"; +export * from "./confirmations"; -export * from "./autobuyers/index.js"; -export * from "./storage/index.js"; +export * from "./autobuyers/index"; +export * from "./storage/index"; -export * from "./notations.js"; -export * from "./tutorial.js"; +export * from "./notations"; +export * from "./tutorial"; -export * from "./new-game.js"; +export * from "./new-game"; -export * from "./celestials/quotes.js"; -export * from "./celestials/teresa.js"; -export * from "./celestials/effarig.js"; -export * from "./celestials/enslaved.js"; -export * from "./celestials/V.js"; -export * from "./celestials/ra/ra.js"; -export * from "./celestials/ra/alchemy.js"; -export * from "./celestials/laitela/laitela.js"; -export * from "./celestials/laitela/dark-matter-dimension.js"; -export * from "./celestials/laitela/singularity.js"; -export * from "./celestials/pelle/pelle.js"; -export * from "./celestials/pelle/strikes.js"; -export * from "./celestials/pelle/rifts.js"; -export * from "./celestials/pelle/galaxy-generator.js"; -export * from "./celestials/pelle/game-end.js"; -export * from "./celestials/celestials.js"; +export * from "./celestials/quotes"; +export * from "./celestials/teresa"; +export * from "./celestials/effarig"; +export * from "./celestials/enslaved"; +export * from "./celestials/V"; +export * from "./celestials/ra/ra"; +export * from "./celestials/ra/alchemy"; +export * from "./celestials/laitela/laitela"; +export * from "./celestials/laitela/dark-matter-dimension"; +export * from "./celestials/laitela/singularity"; +export * from "./celestials/pelle/pelle"; +export * from "./celestials/pelle/strikes"; +export * from "./celestials/pelle/rifts"; +export * from "./celestials/pelle/galaxy-generator"; +export * from "./celestials/pelle/game-end"; +export * from "./celestials/celestials"; -export * from "./automator/index.js"; -export * from "./automator/automator-points.js"; +export * from "./automator/index"; +export * from "./automator/automator-points"; -export * from "./app/player-progress.js"; -export * from "./app/modal.js"; -export * from "./app/themes.js"; -export * from "./app/options.js"; -export * from "./app/ui.js"; +export * from "./app/player-progress"; +export * from "./app/modal"; +export * from "./app/themes"; +export * from "./app/options"; +export * from "./app/ui"; -export * from "./achievements/normal-achievement.js"; -export * from "./achievements/secret-achievement.js"; -export * from "./achievements/achievement-timer.js"; +export * from "./achievements/normal-achievement"; +export * from "./achievements/secret-achievement"; +export * from "./achievements/achievement-timer"; -export * from "./glyphs/glyph-core.js"; -export * from "./glyphs/glyph-effects.js"; -export * from "./glyphs/glyph-generator.js"; -export * from "./glyphs/glyph-purge-handler.js"; -export * from "./glyphs/auto-glyph-processor.js"; +export * from "./glyphs/glyph-core"; +export * from "./glyphs/glyph-effects"; +export * from "./glyphs/glyph-generator"; +export * from "./glyphs/glyph-purge-handler"; +export * from "./glyphs/auto-glyph-processor"; -export * from "./time.js"; -export * from "./tickspeed.js"; +export * from "./time"; +export * from "./tickspeed"; -export * from "./dimensions/antimatter-dimension.js"; -export * from "./dimensions/infinity-dimension.js"; -export * from "./dimensions/time-dimension.js"; +export * from "./dimensions/antimatter-dimension"; +export * from "./dimensions/infinity-dimension"; +export * from "./dimensions/time-dimension"; -export * from "./time-studies/index.js"; +export * from "./time-studies/index"; -export * from "./dimboost.js"; -export * from "./sacrifice.js"; -export * from "./big_crunch.js"; -export * from "./challenge.js"; -export * from "./eternity.js"; -export * from "./eternity_challenge.js"; -export * from "./reality.js"; -export * from "./replicanti.js"; -export * from "./time-theorems.js"; -export * from "./reality-upgrades.js"; -export * from "./imaginary-upgrades.js"; -export * from "./perks.js"; -export * from "./dilation.js"; -export * from "./black_hole.js"; -export * from "./machines.js"; -export * from "./devtools.js"; -export * from "./news-ticker.js"; -export * from "./kong.js"; -export * from "./ui/tabs.js"; -export * from "./ui/tab-notifications.js"; -export * from "./speedrun.js"; +export * from "./dimboost"; +export * from "./sacrifice"; +export * from "./big_crunch"; +export * from "./challenge"; +export * from "./eternity"; +export * from "./eternity_challenge"; +export * from "./reality"; +export * from "./replicanti"; +export * from "./time-theorems"; +export * from "./reality-upgrades"; +export * from "./imaginary-upgrades"; +export * from "./perks"; +export * from "./dilation"; +export * from "./black_hole"; +export * from "./machines"; +export * from "./devtools"; +export * from "./news-ticker"; +export * from "./kong"; +export * from "./ui/tabs"; +export * from "./ui/tab-notifications"; +export * from "./speedrun"; -export * from "./automator/script-templates.js"; +export * from "./automator/script-templates"; diff --git a/javascripts/core/glyph-effects.js b/javascripts/core/glyph-effects.js index 717b69d7f..6b0f39010 100644 --- a/javascripts/core/glyph-effects.js +++ b/javascripts/core/glyph-effects.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "./secret-formula/game-database.js"; -import { DC } from "./constants.js"; +import { DC } from "./constants"; +import { GameDatabase } from "./secret-formula/game-database"; // There is a little too much stuff about glyph effects to put in constants. diff --git a/javascripts/core/glyphs/glyph-core.js b/javascripts/core/glyphs/glyph-core.js index 9ab3f56c8..131cf7f77 100644 --- a/javascripts/core/glyphs/glyph-core.js +++ b/javascripts/core/glyphs/glyph-core.js @@ -1,4 +1,4 @@ -import { GameMechanicState } from "../game-mechanics/index.js"; +import { GameMechanicState } from "../game-mechanics/index"; export const orderedEffectList = ["powerpow", "infinitypow", "replicationpow", "timepow", "dilationpow", "timeshardpow", "powermult", "powerdimboost", "powerbuy10", diff --git a/javascripts/core/hotkeys.js b/javascripts/core/hotkeys.js index 9151d6d93..592399dba 100644 --- a/javascripts/core/hotkeys.js +++ b/javascripts/core/hotkeys.js @@ -1,6 +1,7 @@ -import { GameKeyboard } from "./keyboard.js"; import Mousetrap from "mousetrap"; +import { GameKeyboard } from "./keyboard"; + // Add your hotkeys and combinations here // GameKeyboard.bind for single press combinations // GameKeyboard.bindRepeatable for repeatable combinations diff --git a/javascripts/core/imaginary-upgrades.js b/javascripts/core/imaginary-upgrades.js index e5a394323..d1c41dd62 100644 --- a/javascripts/core/imaginary-upgrades.js +++ b/javascripts/core/imaginary-upgrades.js @@ -1,5 +1,5 @@ -import { BitPurchasableMechanicState, RebuyableMechanicState } from "./game-mechanics/index.js"; -import { DC } from "./constants.js"; +import { BitPurchasableMechanicState, RebuyableMechanicState } from "./game-mechanics/index"; +import { DC } from "./constants"; class ImaginaryUpgradeState extends BitPurchasableMechanicState { constructor(config) { diff --git a/javascripts/core/kong.js b/javascripts/core/kong.js index a2897f39e..f38387381 100644 --- a/javascripts/core/kong.js +++ b/javascripts/core/kong.js @@ -1,4 +1,4 @@ -import { RebuyableMechanicState } from "./game-mechanics/index.js"; +import { RebuyableMechanicState } from "./game-mechanics/index"; export const kong = {}; diff --git a/javascripts/core/machines.js b/javascripts/core/machines.js index ec371c829..75bdf5dbe 100644 --- a/javascripts/core/machines.js +++ b/javascripts/core/machines.js @@ -1,4 +1,4 @@ -import { DC } from "./constants.js"; +import { DC } from "./constants"; export const MachineHandler = { get baseRMCap() { return DC.E1000; }, diff --git a/javascripts/core/math.js b/javascripts/core/math.js index f127c00e8..1075d6364 100644 --- a/javascripts/core/math.js +++ b/javascripts/core/math.js @@ -1,6 +1,7 @@ -import { DC } from "./constants.js"; import { log as lngamma } from "gamma"; +import { DC } from "./constants"; + /* eslint-disable no-use-before-define */ /* eslint-disable max-params */ diff --git a/javascripts/core/perks.js b/javascripts/core/perks.js index 6b5e058f1..2606bb25c 100644 --- a/javascripts/core/perks.js +++ b/javascripts/core/perks.js @@ -1,4 +1,4 @@ -import { SetPurchasableMechanicState } from "./game-mechanics/index.js"; +import { SetPurchasableMechanicState } from "./game-mechanics/index"; class PerkState extends SetPurchasableMechanicState { constructor(config) { diff --git a/javascripts/core/player.js b/javascripts/core/player.js index bd2d58dc6..debb9bf53 100644 --- a/javascripts/core/player.js +++ b/javascripts/core/player.js @@ -1,7 +1,7 @@ -import { GlyphTypes } from "./glyph-effects.js"; -import { AUTOMATOR_MODE, AUTOMATOR_TYPE } from "./automator/automator-backend.js"; -import { DC } from "./constants.js"; +import { AUTOMATOR_MODE, AUTOMATOR_TYPE } from "./automator/automator-backend"; +import { DC } from "./constants"; import { deepmergeAll } from "@/utility/deepmerge"; +import { GlyphTypes } from "./glyph-effects"; // This is actually reassigned when importing saves // eslint-disable-next-line prefer-const diff --git a/javascripts/core/reality-upgrades.js b/javascripts/core/reality-upgrades.js index 144ad447a..6a95d2404 100644 --- a/javascripts/core/reality-upgrades.js +++ b/javascripts/core/reality-upgrades.js @@ -1,4 +1,4 @@ -import { BitPurchasableMechanicState, RebuyableMechanicState } from "./game-mechanics/index.js"; +import { BitPurchasableMechanicState, RebuyableMechanicState } from "./game-mechanics/index"; class RealityUpgradeState extends BitPurchasableMechanicState { constructor(config) { diff --git a/javascripts/core/reality.js b/javascripts/core/reality.js index 9569d5592..1e8c8efce 100644 --- a/javascripts/core/reality.js +++ b/javascripts/core/reality.js @@ -1,4 +1,4 @@ -import { DC } from "./constants.js"; +import { DC } from "./constants"; /** * Object that manages the selection of glyphs offered to the player diff --git a/javascripts/core/replicanti.js b/javascripts/core/replicanti.js index b9806ef3b..2a644a73a 100644 --- a/javascripts/core/replicanti.js +++ b/javascripts/core/replicanti.js @@ -1,4 +1,4 @@ -import { DC } from "./constants.js"; +import { DC } from "./constants"; // Slowdown parameters for replicanti growth, interval will increase by scaleFactor for every scaleLog10 // OoM past the cap (default is 308.25 (log10 of 1.8e308), 1.2, Number.MAX_VALUE) diff --git a/javascripts/core/sacrifice.js b/javascripts/core/sacrifice.js index 80d2e8615..bbacd5829 100644 --- a/javascripts/core/sacrifice.js +++ b/javascripts/core/sacrifice.js @@ -1,4 +1,4 @@ -import { DC } from "./constants.js"; +import { DC } from "./constants"; export class Sacrifice { // This is tied to the "buying an 8th dimension" achievement in order to hide it from new players before they reach diff --git a/javascripts/core/secret-formula/achievements/normal-achievements.js b/javascripts/core/secret-formula/achievements/normal-achievements.js index b0b4df793..be17661e7 100644 --- a/javascripts/core/secret-formula/achievements/normal-achievements.js +++ b/javascripts/core/secret-formula/achievements/normal-achievements.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; GameDatabase.achievements.normal = [ { diff --git a/javascripts/core/secret-formula/achievements/secret-achievements.js b/javascripts/core/secret-formula/achievements/secret-achievements.js index 567a52efd..df4f6a9d9 100644 --- a/javascripts/core/secret-formula/achievements/secret-achievements.js +++ b/javascripts/core/secret-formula/achievements/secret-achievements.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../game-database.js"; +import { GameDatabase } from "../game-database"; GameDatabase.achievements.secret = [ { diff --git a/javascripts/core/secret-formula/away-progress-types.js b/javascripts/core/secret-formula/away-progress-types.js index 6b2a7070b..e6d3f0cca 100644 --- a/javascripts/core/secret-formula/away-progress-types.js +++ b/javascripts/core/secret-formula/away-progress-types.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "./game-database.js"; +import { GameDatabase } from "./game-database"; GameDatabase.awayProgressTypes = [ { diff --git a/javascripts/core/secret-formula/celestials/alchemy.js b/javascripts/core/secret-formula/celestials/alchemy.js index 7ba950abc..938388e91 100644 --- a/javascripts/core/secret-formula/celestials/alchemy.js +++ b/javascripts/core/secret-formula/celestials/alchemy.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; GameDatabase.celestials.alchemy = { resources: { diff --git a/javascripts/core/secret-formula/celestials/effarig.js b/javascripts/core/secret-formula/celestials/effarig.js index a44b35def..9c10719cf 100644 --- a/javascripts/core/secret-formula/celestials/effarig.js +++ b/javascripts/core/secret-formula/celestials/effarig.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; GameDatabase.celestials.effarig = { unlocks: { diff --git a/javascripts/core/secret-formula/celestials/enslaved.js b/javascripts/core/secret-formula/celestials/enslaved.js index 7da0c908a..e3305e9a7 100644 --- a/javascripts/core/secret-formula/celestials/enslaved.js +++ b/javascripts/core/secret-formula/celestials/enslaved.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../game-database.js"; +import { GameDatabase } from "../game-database"; GameDatabase.celestials.enslaved = { // Note that "condition" isn't displayed in-game. These are meant to be indicators here of diff --git a/javascripts/core/secret-formula/celestials/galaxy-generator.js b/javascripts/core/secret-formula/celestials/galaxy-generator.js index dda1d0f96..3d6fbe98a 100644 --- a/javascripts/core/secret-formula/celestials/galaxy-generator.js +++ b/javascripts/core/secret-formula/celestials/galaxy-generator.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../game-database.js"; +import { GameDatabase } from "../game-database"; GameDatabase.celestials.pelle.galaxyGeneratorUpgrades = (function() { const formatCost = c => format(c, 2); diff --git a/javascripts/core/secret-formula/celestials/navigation.js b/javascripts/core/secret-formula/celestials/navigation.js index 9a5f659e6..69328ee3c 100644 --- a/javascripts/core/secret-formula/celestials/navigation.js +++ b/javascripts/core/secret-formula/celestials/navigation.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; export function emphasizeEnd(fraction) { return Math.pow(fraction, 10); diff --git a/javascripts/core/secret-formula/celestials/pelle-quotes.js b/javascripts/core/secret-formula/celestials/pelle-quotes.js index d9a86823c..835fa1faf 100644 --- a/javascripts/core/secret-formula/celestials/pelle-quotes.js +++ b/javascripts/core/secret-formula/celestials/pelle-quotes.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../game-database.js"; +import { GameDatabase } from "../game-database"; GameDatabase.celestials.pelle.quotes = {}; diff --git a/javascripts/core/secret-formula/celestials/pelle-upgrades.js b/javascripts/core/secret-formula/celestials/pelle-upgrades.js index 1c900d91d..21e8312ac 100644 --- a/javascripts/core/secret-formula/celestials/pelle-upgrades.js +++ b/javascripts/core/secret-formula/celestials/pelle-upgrades.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../game-database.js"; +import { GameDatabase } from "../game-database"; GameDatabase.celestials.pelle.upgrades = (function() { const formatCost = c => format(c, 2); diff --git a/javascripts/core/secret-formula/celestials/perk-shop.js b/javascripts/core/secret-formula/celestials/perk-shop.js index 54ed6ccd4..af1c23607 100644 --- a/javascripts/core/secret-formula/celestials/perk-shop.js +++ b/javascripts/core/secret-formula/celestials/perk-shop.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../game-database.js"; +import { GameDatabase } from "../game-database"; GameDatabase.celestials.perkShop = (function() { function rebuyableCost(initialCost, increment, id) { diff --git a/javascripts/core/secret-formula/celestials/ra.js b/javascripts/core/secret-formula/celestials/ra.js index ace9fe785..41d86fe8c 100644 --- a/javascripts/core/secret-formula/celestials/ra.js +++ b/javascripts/core/secret-formula/celestials/ra.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../game-database.js"; +import { GameDatabase } from "../game-database"; GameDatabase.celestials.ra = { pets: { diff --git a/javascripts/core/secret-formula/celestials/rifts.js b/javascripts/core/secret-formula/celestials/rifts.js index 18af25382..a8c0b4aca 100644 --- a/javascripts/core/secret-formula/celestials/rifts.js +++ b/javascripts/core/secret-formula/celestials/rifts.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; GameDatabase.celestials.pelle.rifts = { famine: { diff --git a/javascripts/core/secret-formula/celestials/singularity-milestones.js b/javascripts/core/secret-formula/celestials/singularity-milestones.js index f0faa7f97..b0e87ac8c 100644 --- a/javascripts/core/secret-formula/celestials/singularity-milestones.js +++ b/javascripts/core/secret-formula/celestials/singularity-milestones.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../game-database.js"; +import { GameDatabase } from "../game-database"; // Used for UI purposes to give different theming for different kinds of upgrades export const LAITELA_UPGRADE_DIRECTION = { diff --git a/javascripts/core/secret-formula/celestials/strikes.js b/javascripts/core/secret-formula/celestials/strikes.js index 5650118b1..f5e61d8cb 100644 --- a/javascripts/core/secret-formula/celestials/strikes.js +++ b/javascripts/core/secret-formula/celestials/strikes.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; GameDatabase.celestials.pelle.strikes = { infinity: { diff --git a/javascripts/core/secret-formula/celestials/teresa.js b/javascripts/core/secret-formula/celestials/teresa.js index 141d3f160..e3460c442 100644 --- a/javascripts/core/secret-formula/celestials/teresa.js +++ b/javascripts/core/secret-formula/celestials/teresa.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../game-database.js"; +import { GameDatabase } from "../game-database"; GameDatabase.celestials.teresa = { unlocks: { @@ -37,4 +37,4 @@ GameDatabase.celestials.teresa = { isDisabledInDoomed: true } } -}; \ No newline at end of file +}; diff --git a/javascripts/core/secret-formula/celestials/v.js b/javascripts/core/secret-formula/celestials/v.js index 4bd457d0d..342144a95 100644 --- a/javascripts/core/secret-formula/celestials/v.js +++ b/javascripts/core/secret-formula/celestials/v.js @@ -1,5 +1,6 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; + // This is supposed to be in ./navigation.js but importing doesn't work for some stupid reason function emphasizeEnd(fraction) { return Math.pow(fraction, 10); diff --git a/javascripts/core/secret-formula/challenges/eternity-challenges.js b/javascripts/core/secret-formula/challenges/eternity-challenges.js index 79b5dc2cb..e646cda58 100644 --- a/javascripts/core/secret-formula/challenges/eternity-challenges.js +++ b/javascripts/core/secret-formula/challenges/eternity-challenges.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; const specialInfinityGlyphDisabledEffectText = () => (PelleRifts.chaos.milestones[1].canBeApplied ? "The Pelle-Specific effect from Infinity Glyphs is also disabled." diff --git a/javascripts/core/secret-formula/challenges/infinity-challenges.js b/javascripts/core/secret-formula/challenges/infinity-challenges.js index d59b8938e..d195e9230 100644 --- a/javascripts/core/secret-formula/challenges/infinity-challenges.js +++ b/javascripts/core/secret-formula/challenges/infinity-challenges.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; GameDatabase.challenges.infinity = [ { diff --git a/javascripts/core/secret-formula/challenges/normal-challenges.js b/javascripts/core/secret-formula/challenges/normal-challenges.js index daafa2ffa..142cf49bc 100644 --- a/javascripts/core/secret-formula/challenges/normal-challenges.js +++ b/javascripts/core/secret-formula/challenges/normal-challenges.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; // I tried to make it relatively simple to add more locks; the idea is that you give it a value here // and then it's all handled in the backend diff --git a/javascripts/core/secret-formula/confirmation-types.js b/javascripts/core/secret-formula/confirmation-types.js index 4bd07b2c7..fee535d74 100644 --- a/javascripts/core/secret-formula/confirmation-types.js +++ b/javascripts/core/secret-formula/confirmation-types.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "./game-database.js"; +import { GameDatabase } from "./game-database"; GameDatabase.confirmationTypes = [ { diff --git a/javascripts/core/secret-formula/credits.js b/javascripts/core/secret-formula/credits.js index a1418224e..2dddbefb9 100644 --- a/javascripts/core/secret-formula/credits.js +++ b/javascripts/core/secret-formula/credits.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "./game-database.js"; +import { GameDatabase } from "./game-database"; GameDatabase.credits = { // Must be placed in the order it is desired they appear in the credits @@ -359,4 +359,4 @@ GameDatabase.credits = { ] }; -GameDatabase.credits.roles.count = Object.keys(GameDatabase.credits.roles).length; \ No newline at end of file +GameDatabase.credits.roles.count = Object.keys(GameDatabase.credits.roles).length; diff --git a/javascripts/core/secret-formula/eternity/dilation-upgrades.js b/javascripts/core/secret-formula/eternity/dilation-upgrades.js index b81d97106..44db5a33a 100644 --- a/javascripts/core/secret-formula/eternity/dilation-upgrades.js +++ b/javascripts/core/secret-formula/eternity/dilation-upgrades.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; GameDatabase.eternity.dilation = (function() { function rebuyableCost(initialCost, increment, id) { diff --git a/javascripts/core/secret-formula/eternity/eternity-milestones.js b/javascripts/core/secret-formula/eternity/eternity-milestones.js index 99c201250..691007ce9 100644 --- a/javascripts/core/secret-formula/eternity/eternity-milestones.js +++ b/javascripts/core/secret-formula/eternity/eternity-milestones.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../game-database.js"; +import { GameDatabase } from "../game-database"; GameDatabase.eternity.milestones = { autobuyerIPMult: { diff --git a/javascripts/core/secret-formula/eternity/eternity-upgrades.js b/javascripts/core/secret-formula/eternity/eternity-upgrades.js index 250d6bdd7..f5d17939d 100644 --- a/javascripts/core/secret-formula/eternity/eternity-upgrades.js +++ b/javascripts/core/secret-formula/eternity/eternity-upgrades.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; GameDatabase.eternity.upgrades = { idMultEP: { diff --git a/javascripts/core/secret-formula/eternity/time-studies/dilation-time-studies.js b/javascripts/core/secret-formula/eternity/time-studies/dilation-time-studies.js index 2a02794ea..7d7efd129 100644 --- a/javascripts/core/secret-formula/eternity/time-studies/dilation-time-studies.js +++ b/javascripts/core/secret-formula/eternity/time-studies/dilation-time-studies.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../../game-database.js"; +import { GameDatabase } from "../../game-database"; GameDatabase.eternity.timeStudies.dilation = [ { diff --git a/javascripts/core/secret-formula/eternity/time-studies/ec-time-studies.js b/javascripts/core/secret-formula/eternity/time-studies/ec-time-studies.js index d0913bf5f..adf5bb08a 100644 --- a/javascripts/core/secret-formula/eternity/time-studies/ec-time-studies.js +++ b/javascripts/core/secret-formula/eternity/time-studies/ec-time-studies.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../../game-database.js"; -import { DC } from "../../../constants.js"; +import { DC } from "../../../constants"; +import { GameDatabase } from "../../game-database"; GameDatabase.eternity.timeStudies.ec = [ { diff --git a/javascripts/core/secret-formula/eternity/time-studies/normal-time-studies.js b/javascripts/core/secret-formula/eternity/time-studies/normal-time-studies.js index be3adcfb4..3c42f10f6 100644 --- a/javascripts/core/secret-formula/eternity/time-studies/normal-time-studies.js +++ b/javascripts/core/secret-formula/eternity/time-studies/normal-time-studies.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../../game-database.js"; -import { DC } from "../../../constants.js"; +import { DC } from "../../../constants"; +import { GameDatabase } from "../../game-database"; /** * List of time study specifications and attributes diff --git a/javascripts/core/secret-formula/h2p.js b/javascripts/core/secret-formula/h2p.js index e2eacfcce..3ea6a0612 100644 --- a/javascripts/core/secret-formula/h2p.js +++ b/javascripts/core/secret-formula/h2p.js @@ -1,6 +1,7 @@ -import { GameDatabase } from "./game-database.js"; -import { DC } from "../constants.js"; -import { Pelle, PelleStrikes } from "../globals.js"; +import { Pelle, PelleStrikes } from "../globals"; +import { DC } from "../constants"; + +import { GameDatabase } from "./game-database"; GameDatabase.h2p = { /** diff --git a/javascripts/core/secret-formula/index.js b/javascripts/core/secret-formula/index.js index d76c8d8e9..a8380d6a8 100644 --- a/javascripts/core/secret-formula/index.js +++ b/javascripts/core/secret-formula/index.js @@ -1,45 +1,47 @@ -import "./game-database.js"; +/* eslint-disable import/newline-after-import */ +/* eslint-disable import/first */ +import "./game-database"; -import "./tabs.js"; -import "./away-progress-types.js"; -import "./confirmation-types.js"; -import "./tab-notifications.js"; -import "./news.js"; -import "./achievements/normal-achievements.js"; -import "./achievements/secret-achievements.js"; -import "./challenges/normal-challenges.js"; -import "./challenges/infinity-challenges.js"; -import "./challenges/eternity-challenges.js"; -import "./infinity/infinity-upgrades.js"; -import "./infinity/break-infinity-upgrades.js"; -import "./eternity/time-studies/normal-time-studies.js"; -import "./eternity/time-studies/ec-time-studies.js"; -import "./eternity/time-studies/dilation-time-studies.js"; -import "./eternity/eternity-upgrades.js"; -import "./eternity/eternity-milestones.js"; -import "./eternity/dilation-upgrades.js"; -import "./reality/reality-upgrades.js"; -import "./reality/imaginary-upgrades.js"; -export * from "./reality/perks.js"; -import "./reality/automator.js"; -import "./reality/glyph-sacrifices.js"; -import "./celestials/perk-shop.js"; -import "./celestials/teresa.js"; -import "./celestials/effarig.js"; -import "./celestials/pelle-upgrades.js"; -import "./celestials/strikes.js"; -import "./celestials/rifts.js"; -import "./celestials/galaxy-generator.js"; -import "./celestials/ra.js"; -import "./celestials/pelle-quotes.js"; -import "./celestials/enslaved.js"; -export * from "./celestials/v.js"; -import "./celestials/alchemy.js"; -import "./shop-purchases.js"; -export * from "./celestials/singularity-milestones.js"; -import "./script-templates.js"; -import "./speedrun-milestones.js"; +import "./tabs"; +import "./away-progress-types"; +import "./confirmation-types"; +import "./tab-notifications"; +import "./news"; +import "./achievements/normal-achievements"; +import "./achievements/secret-achievements"; +import "./challenges/normal-challenges"; +import "./challenges/infinity-challenges"; +import "./challenges/eternity-challenges"; +import "./infinity/infinity-upgrades"; +import "./infinity/break-infinity-upgrades"; +import "./eternity/time-studies/normal-time-studies"; +import "./eternity/time-studies/ec-time-studies"; +import "./eternity/time-studies/dilation-time-studies"; +import "./eternity/eternity-upgrades"; +import "./eternity/eternity-milestones"; +import "./eternity/dilation-upgrades"; +import "./reality/reality-upgrades"; +import "./reality/imaginary-upgrades"; +export * from "./reality/perks"; +import "./reality/automator"; +import "./reality/glyph-sacrifices"; +import "./celestials/perk-shop"; +import "./celestials/teresa"; +import "./celestials/effarig"; +import "./celestials/pelle-upgrades"; +import "./celestials/strikes"; +import "./celestials/rifts"; +import "./celestials/galaxy-generator"; +import "./celestials/ra"; +import "./celestials/pelle-quotes"; +import "./celestials/enslaved"; +export * from "./celestials/v"; +import "./celestials/alchemy"; +import "./shop-purchases"; +export * from "./celestials/singularity-milestones"; +import "./script-templates"; +import "./speedrun-milestones"; -import "./h2p.js"; +import "./h2p"; -import "./credits.js"; \ No newline at end of file +import "./credits"; diff --git a/javascripts/core/secret-formula/infinity/break-infinity-upgrades.js b/javascripts/core/secret-formula/infinity/break-infinity-upgrades.js index 5119dae59..9c0a606f3 100644 --- a/javascripts/core/secret-formula/infinity/break-infinity-upgrades.js +++ b/javascripts/core/secret-formula/infinity/break-infinity-upgrades.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; GameDatabase.infinity.breakUpgrades = (function() { function rebuyable(config) { diff --git a/javascripts/core/secret-formula/infinity/infinity-upgrades.js b/javascripts/core/secret-formula/infinity/infinity-upgrades.js index 79b740ddb..0d9db2860 100644 --- a/javascripts/core/secret-formula/infinity/infinity-upgrades.js +++ b/javascripts/core/secret-formula/infinity/infinity-upgrades.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; GameDatabase.infinity.upgrades = (function() { function dimInfinityMult() { diff --git a/javascripts/core/secret-formula/news.js b/javascripts/core/secret-formula/news.js index c9eae6f85..e51d6bb06 100644 --- a/javascripts/core/secret-formula/news.js +++ b/javascripts/core/secret-formula/news.js @@ -1,5 +1,6 @@ -import { GameDatabase } from "./game-database.js"; -import { DC } from "../constants.js"; +import { DC } from "../constants"; + +import { GameDatabase } from "./game-database"; // A = always there // L = locked diff --git a/javascripts/core/secret-formula/reality/automator.js b/javascripts/core/secret-formula/reality/automator.js index 10a42b5b1..1f88f19f4 100644 --- a/javascripts/core/secret-formula/reality/automator.js +++ b/javascripts/core/secret-formula/reality/automator.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../game-database.js"; +import { GameDatabase } from "../game-database"; GameDatabase.reality.automator = { commands: [ diff --git a/javascripts/core/secret-formula/reality/glyph-sacrifices.js b/javascripts/core/secret-formula/reality/glyph-sacrifices.js index edb2aaad9..7f54e1008 100644 --- a/javascripts/core/secret-formula/reality/glyph-sacrifices.js +++ b/javascripts/core/secret-formula/reality/glyph-sacrifices.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "../game-database.js"; +import { GameDatabase } from "../game-database"; GameDatabase.reality.glyphSacrifice = [ { diff --git a/javascripts/core/secret-formula/reality/imaginary-upgrades.js b/javascripts/core/secret-formula/reality/imaginary-upgrades.js index 8b33e189d..982bc7a9f 100644 --- a/javascripts/core/secret-formula/reality/imaginary-upgrades.js +++ b/javascripts/core/secret-formula/reality/imaginary-upgrades.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; GameDatabase.reality.imaginaryUpgrades = (function() { const rebuyable = props => { @@ -130,7 +130,7 @@ GameDatabase.reality.imaginaryUpgrades = (function() { name: "Transience of Information", id: 13, cost: 5e7, - requirement: () => `Reach ${format(Number.MAX_VALUE, 2)} projected Reality Machines within + requirement: () => `Reach ${format(Number.MAX_VALUE, 2)} projected Reality Machines within The Enslaved Ones' Reality`, hasFailed: () => !Enslaved.isRunning, checkRequirement: () => Enslaved.isRunning && MachineHandler.uncappedRM.gte(Number.MAX_VALUE), diff --git a/javascripts/core/secret-formula/reality/perks.js b/javascripts/core/secret-formula/reality/perks.js index 831642e83..d402025d0 100644 --- a/javascripts/core/secret-formula/reality/perks.js +++ b/javascripts/core/secret-formula/reality/perks.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; export const PERK_FAMILY = { ANTIMATTER: "ANTIMATTER", diff --git a/javascripts/core/secret-formula/reality/reality-upgrades.js b/javascripts/core/secret-formula/reality/reality-upgrades.js index cc63e9ef5..7f35f3233 100644 --- a/javascripts/core/secret-formula/reality/reality-upgrades.js +++ b/javascripts/core/secret-formula/reality/reality-upgrades.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "../game-database.js"; -import { DC } from "../../constants.js"; +import { DC } from "../../constants"; +import { GameDatabase } from "../game-database"; GameDatabase.reality.upgrades = (function() { const rebuyable = props => { diff --git a/javascripts/core/secret-formula/script-templates.js b/javascripts/core/secret-formula/script-templates.js index b906951fc..7efc7d2eb 100644 --- a/javascripts/core/secret-formula/script-templates.js +++ b/javascripts/core/secret-formula/script-templates.js @@ -1,5 +1,5 @@ -import { GameDatabase } from "./game-database.js"; import { AutobuyerInputFunctions } from "@/components/tabs/autobuyers/AutobuyerInput"; +import { GameDatabase } from "./game-database"; GameDatabase.reality.automator.templates = { /** diff --git a/javascripts/core/secret-formula/shop-purchases.js b/javascripts/core/secret-formula/shop-purchases.js index fbc167e51..7e2fb54f2 100644 --- a/javascripts/core/secret-formula/shop-purchases.js +++ b/javascripts/core/secret-formula/shop-purchases.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "./game-database.js"; +import { GameDatabase } from "./game-database"; GameDatabase.shopPurchases = { dimPurchases: { diff --git a/javascripts/core/secret-formula/speedrun-milestones.js b/javascripts/core/secret-formula/speedrun-milestones.js index 02e675cac..226453045 100644 --- a/javascripts/core/secret-formula/speedrun-milestones.js +++ b/javascripts/core/secret-formula/speedrun-milestones.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "./game-database.js"; +import { GameDatabase } from "./game-database"; GameDatabase.speedrunMilestones = [ { diff --git a/javascripts/core/secret-formula/tab-notifications.js b/javascripts/core/secret-formula/tab-notifications.js index 7edf277f6..5957593d9 100644 --- a/javascripts/core/secret-formula/tab-notifications.js +++ b/javascripts/core/secret-formula/tab-notifications.js @@ -1,5 +1,6 @@ -import { GameDatabase } from "./game-database.js"; -import { DC } from "../constants.js"; +import { DC } from "../constants"; + +import { GameDatabase } from "./game-database"; GameDatabase.tabNotifications = { firstInfinity: { diff --git a/javascripts/core/secret-formula/tabs.js b/javascripts/core/secret-formula/tabs.js index 475fa3874..89db891ea 100644 --- a/javascripts/core/secret-formula/tabs.js +++ b/javascripts/core/secret-formula/tabs.js @@ -1,4 +1,4 @@ -import { GameDatabase } from "./game-database.js"; +import { GameDatabase } from "./game-database"; GameDatabase.tabs = [ { diff --git a/javascripts/core/speedrun.js b/javascripts/core/speedrun.js index b9b1cc13a..b8b03f13d 100644 --- a/javascripts/core/speedrun.js +++ b/javascripts/core/speedrun.js @@ -1,5 +1,5 @@ import { GameDatabase } from "./secret-formula/game-database"; -import { GameMechanicState } from "./game-mechanics/index.js"; +import { GameMechanicState } from "./game-mechanics/index"; export const Speedrun = { unlock() { diff --git a/javascripts/core/storage/cloud-saving.js b/javascripts/core/storage/cloud-saving.js index a682ea1dd..8ae5ab1f1 100644 --- a/javascripts/core/storage/cloud-saving.js +++ b/javascripts/core/storage/cloud-saving.js @@ -1,9 +1,13 @@ +/* eslint-disable import/extensions */ import pako from "pako/dist/pako.esm.mjs"; -import { decodeBase64Binary } from "./base64-binary"; -import { ProgressChecker } from "./progress-checker.js"; +/* eslint-enable import/extensions */ + +import { get, getDatabase, ref, set } from "firebase/database"; +import { getAuth, GoogleAuthProvider, signInWithPopup, signOut } from "firebase/auth"; import { initializeApp } from "firebase/app"; -import { getAuth, signInWithPopup, signOut, GoogleAuthProvider } from "firebase/auth"; -import { getDatabase, ref, get, set } from "firebase/database"; + +import { decodeBase64Binary } from "./base64-binary"; +import { ProgressChecker } from "./progress-checker"; const firebaseConfig = { apiKey: "AIzaSyDuRTTluAFufmvw1zxGH6fsyEHmmbu8IHI", diff --git a/javascripts/core/storage/dev-migrations.js b/javascripts/core/storage/dev-migrations.js index 2d065654f..58789eab6 100644 --- a/javascripts/core/storage/dev-migrations.js +++ b/javascripts/core/storage/dev-migrations.js @@ -1,4 +1,4 @@ -import { GameStorage } from "./storage.js"; +import { GameStorage } from "./storage"; function arrayToBits(array) { let bits = 0; diff --git a/javascripts/core/storage/index.js b/javascripts/core/storage/index.js index 3c62e61f9..91b0685f1 100644 --- a/javascripts/core/storage/index.js +++ b/javascripts/core/storage/index.js @@ -1,6 +1,6 @@ -import "./migrations.js"; -import "./dev-migrations.js"; +import "./migrations"; +import "./dev-migrations"; -export * from "./serializer.js"; -export * from "./storage.js"; -export * from "./cloud-saving.js"; +export * from "./serializer"; +export * from "./storage"; +export * from "./cloud-saving"; diff --git a/javascripts/core/storage/migrations.js b/javascripts/core/storage/migrations.js index e8cc1ccef..0f6ed4188 100644 --- a/javascripts/core/storage/migrations.js +++ b/javascripts/core/storage/migrations.js @@ -1,5 +1,5 @@ -import { GameStorage } from "./storage.js"; import { deepmergeAll } from "@/utility/deepmerge"; +import { GameStorage } from "./storage"; // WARNING: Don't use state accessors and functions from global scope here, that's not safe in long-term GameStorage.migrations = { diff --git a/javascripts/core/storage/serializer.js b/javascripts/core/storage/serializer.js index d80a0dfd8..cf649f7bd 100644 --- a/javascripts/core/storage/serializer.js +++ b/javascripts/core/storage/serializer.js @@ -1,4 +1,6 @@ +/* eslint-disable import/extensions */ import pako from "pako/dist/pako.esm.mjs"; +/* eslint-enable import/extensions */ export const GameSaveSerializer = { serialize(save) { diff --git a/javascripts/core/storage/storage.js b/javascripts/core/storage/storage.js index 11932967b..c647fa191 100644 --- a/javascripts/core/storage/storage.js +++ b/javascripts/core/storage/storage.js @@ -1,4 +1,5 @@ import * as ADNotations from "@antimatter-dimensions/notations"; + import { deepmergeAll } from "@/utility/deepmerge"; export const GameStorage = { diff --git a/javascripts/core/tickspeed.js b/javascripts/core/tickspeed.js index 666ef7e63..3677e94d9 100644 --- a/javascripts/core/tickspeed.js +++ b/javascripts/core/tickspeed.js @@ -1,4 +1,4 @@ -import { DC } from "./constants.js"; +import { DC } from "./constants"; export function getTickSpeedMultiplier() { if (InfinityChallenge(3).isRunning) return DC.D1; diff --git a/javascripts/core/time-studies/dilation-time-study.js b/javascripts/core/time-studies/dilation-time-study.js index 2a3bb9782..701762f81 100644 --- a/javascripts/core/time-studies/dilation-time-study.js +++ b/javascripts/core/time-studies/dilation-time-study.js @@ -1,5 +1,5 @@ -import { TimeStudyState } from "./time-studies.js"; -import { TimeStudy } from "./normal-time-study.js"; +import { TimeStudy } from "./normal-time-study"; +import { TimeStudyState } from "./time-studies"; export class DilationTimeStudyState extends TimeStudyState { constructor(config) { diff --git a/javascripts/core/time-studies/ec-time-study.js b/javascripts/core/time-studies/ec-time-study.js index 2688406f3..50a7cc826 100644 --- a/javascripts/core/time-studies/ec-time-study.js +++ b/javascripts/core/time-studies/ec-time-study.js @@ -1,5 +1,5 @@ -import { TimeStudyState } from "./time-studies.js"; -import { TimeStudy } from "./normal-time-study.js"; +import { TimeStudy } from "./normal-time-study"; +import { TimeStudyState } from "./time-studies"; export class ECTimeStudyState extends TimeStudyState { constructor(config) { diff --git a/javascripts/core/time-studies/index.js b/javascripts/core/time-studies/index.js index acaf2fac4..143bee257 100644 --- a/javascripts/core/time-studies/index.js +++ b/javascripts/core/time-studies/index.js @@ -1,6 +1,6 @@ -export * from "./time-studies.js"; -export * from "./time-study-tree.js"; -export * from "./normal-time-study.js"; -export * from "./ec-time-study.js"; -export * from "./dilation-time-study.js"; -export * from "./time-study-connections.js"; +export * from "./time-studies"; +export * from "./time-study-tree"; +export * from "./normal-time-study"; +export * from "./ec-time-study"; +export * from "./dilation-time-study"; +export * from "./time-study-connections"; diff --git a/javascripts/core/time-studies/normal-time-study.js b/javascripts/core/time-studies/normal-time-study.js index ca60fe697..384b3449d 100644 --- a/javascripts/core/time-studies/normal-time-study.js +++ b/javascripts/core/time-studies/normal-time-study.js @@ -1,4 +1,4 @@ -import { TimeStudyState } from "./time-studies.js"; +import { TimeStudyState } from "./time-studies"; export const NormalTimeStudies = {}; diff --git a/javascripts/core/time-studies/time-studies.js b/javascripts/core/time-studies/time-studies.js index b63f0f0ec..e190736fe 100644 --- a/javascripts/core/time-studies/time-studies.js +++ b/javascripts/core/time-studies/time-studies.js @@ -1,4 +1,4 @@ -import { GameMechanicState } from "../game-mechanics/index.js"; +import { GameMechanicState } from "../game-mechanics/index"; function showSecondPreferredWarning(currTree) { // Show a warning if the player can choose the second preferred dimension path and hasn't yet done so. diff --git a/javascripts/core/time-studies/time-study-connections.js b/javascripts/core/time-studies/time-study-connections.js index 15d3712d8..cce890cb2 100644 --- a/javascripts/core/time-studies/time-study-connections.js +++ b/javascripts/core/time-studies/time-study-connections.js @@ -1,4 +1,4 @@ -import { TimeStudy } from "./normal-time-study.js"; +import { TimeStudy } from "./normal-time-study"; export class TimeStudyConnection { constructor(from, to, override) { diff --git a/javascripts/core/time-theorems.js b/javascripts/core/time-theorems.js index 7a1b0c264..3324dd394 100644 --- a/javascripts/core/time-theorems.js +++ b/javascripts/core/time-theorems.js @@ -1,4 +1,4 @@ -import { DC } from "./constants.js"; +import { DC } from "./constants"; /** * @abstract diff --git a/javascripts/core/utils.js b/javascripts/core/utils.js index 4365ea8e3..c0c69d79b 100644 --- a/javascripts/core/utils.js +++ b/javascripts/core/utils.js @@ -1,14 +1,14 @@ // Stuff to be loaded into global before anything else -import "./polyfill.js"; -import "./extensions.js"; +import "./polyfill"; +import "./extensions"; -import "./crash.js"; -import "./timespan.js"; -import "./format.js"; -import "./constants.js"; -import "./math.js"; -import "./async-utils.js"; -import "./event-hub.js"; +import "./crash"; +import "./timespan"; +import "./format"; +import "./constants"; +import "./math"; +import "./async-utils"; +import "./event-hub"; -export * from "./game-mechanics/index.js"; +export * from "./game-mechanics/index"; diff --git a/javascripts/game.js b/javascripts/game.js index 04c511526..f56e8d19e 100644 --- a/javascripts/game.js +++ b/javascripts/game.js @@ -1,8 +1,9 @@ -import { playFabLogin } from "./core/playfab.js"; -import { DC } from "./core/constants.js"; -import { SpeedrunMilestones } from "./core/speedrun.js"; import TWEEN from "tween.js"; + +import { DC } from "./core/constants"; import { deepmergeAll } from "@/utility/deepmerge"; +import { playFabLogin } from "./core/playfab"; +import { SpeedrunMilestones } from "./core/speedrun"; import { supportedBrowsers } from "./supported-browsers"; if (GlobalErrorHandler.handled) { diff --git a/package-lock.json b/package-lock.json index 9d965c854..ee4ae2e58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,8 @@ "@vue/cli-service": "^5.0.0-rc.0", "browserslist-useragent-regexp": "^3.0.2", "eslint": "^7.20.0", + "eslint-import-resolver-alias": "^1.1.2", + "eslint-plugin-import": "^2.26.0", "eslint-plugin-vue": "^8.0.3", "vue-template-compiler": "^2.6.11", "webpack": "^5.64.0" @@ -2908,6 +2910,12 @@ "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", "dev": true }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, "node_modules/@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", @@ -6320,6 +6328,25 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, + "node_modules/array-includes": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", + "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -6329,6 +6356,24 @@ "node": ">=8" } }, + "node_modules/array.prototype.flat": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", + "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -8194,15 +8239,19 @@ } }, "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "dev": true, "dependencies": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/del": { @@ -8686,12 +8735,75 @@ "stackframe": "^1.1.1" } }, + "node_modules/es-abstract": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.0.tgz", + "integrity": "sha512-URbD8tgRthKD3YcC39vbvSDrX23upXnPcnGAjQfgxXF5ID75YcENawc9ZX/9iTP9ptUyfCLIxTTuMYoRfiOVKA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "regexp.prototype.flags": "^1.4.1", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es-module-lexer": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", "dev": true }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -8772,6 +8884,177 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-import-resolver-alias": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-alias/-/eslint-import-resolver-alias-1.1.2.tgz", + "integrity": "sha512-WdviM1Eu834zsfjHtcGHtGfcu+F30Od3V7I9Fi57uhBEwPkjDcii7/yW8jAT+gOhn4P/vOxxNAXbFAKsrrc15w==", + "dev": true, + "engines": { + "node": ">= 4" + }, + "peerDependencies": { + "eslint-plugin-import": ">=1.4.0" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/eslint-module-utils": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", + "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/eslint-module-utils/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", + "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.3", + "has": "^1.0.3", + "is-core-module": "^2.8.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.5", + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/eslint-plugin-vue": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.0.3.tgz", @@ -9784,12 +10067,39 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gamma": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gamma/-/gamma-1.0.0.tgz", @@ -9838,6 +10148,22 @@ "node": ">=6" } }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -9952,6 +10278,15 @@ "node": ">= 0.4.0" } }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -9961,10 +10296,22 @@ "node": ">=4" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, "engines": { "node": ">= 0.4" @@ -10426,6 +10773,20 @@ "node": ">= 0.10" } }, + "node_modules/internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -10481,6 +10842,18 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -10493,6 +10866,34 @@ "node": ">=8" } }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-ci": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", @@ -10506,9 +10907,9 @@ } }, "node_modules/is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -10606,6 +11007,33 @@ "node": ">=8" } }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-path-cwd": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", @@ -10670,6 +11098,18 @@ "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", "dev": true }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -10679,6 +11119,36 @@ "node": ">=0.10.0" } }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -10691,6 +11161,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -11490,9 +11972,9 @@ "dev": true }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -11501,9 +11983,9 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "node_modules/minipass": { @@ -11762,6 +12244,15 @@ "node": ">=0.10.0" } }, + "node_modules/object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-is": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", @@ -11805,6 +12296,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.values": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/obuf": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", @@ -13269,13 +13777,14 @@ "integrity": "sha512-4qf/7IsIKfSNHQXSwial1IFmfM1Cc/whNBQqRwe0V2stPe7KmN1U0tWQiIx6JiirgSrisjE0eECdNf7Tav1Ntw==" }, "node_modules/regexp.prototype.flags": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", - "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" }, "engines": { "node": ">= 0.4" @@ -13386,13 +13895,17 @@ "dev": true }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dev": true, "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -13707,6 +14220,20 @@ "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", "dev": true }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", @@ -14019,6 +14546,34 @@ "node": ">=8" } }, + "node_modules/string.prototype.trimend": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -14030,6 +14585,15 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -14097,6 +14661,18 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/svg-pan-zoom": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/svg-pan-zoom/-/svg-pan-zoom-3.6.1.tgz", @@ -14417,6 +14993,30 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, + "node_modules/tsconfig-paths": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, "node_modules/tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", @@ -14462,6 +15062,21 @@ "node": ">= 0.6" } }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -15507,6 +16122,22 @@ "which": "bin/which" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/wildcard": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", @@ -17834,6 +18465,12 @@ "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", "dev": true }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, "@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", @@ -20500,12 +21137,37 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, + "array-includes": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", + "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" + } + }, "array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, + "array.prototype.flat": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", + "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" + } + }, "astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -21901,12 +22563,13 @@ "dev": true }, "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "dev": true, "requires": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" } }, "del": { @@ -22290,12 +22953,63 @@ "stackframe": "^1.1.1" } }, + "es-abstract": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.0.tgz", + "integrity": "sha512-URbD8tgRthKD3YcC39vbvSDrX23upXnPcnGAjQfgxXF5ID75YcENawc9ZX/9iTP9ptUyfCLIxTTuMYoRfiOVKA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "regexp.prototype.flags": "^1.4.1", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + } + }, "es-module-lexer": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", "dev": true }, + "es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -22532,6 +23246,148 @@ } } }, + "eslint-import-resolver-alias": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-alias/-/eslint-import-resolver-alias-1.1.2.tgz", + "integrity": "sha512-WdviM1Eu834zsfjHtcGHtGfcu+F30Od3V7I9Fi57uhBEwPkjDcii7/yW8jAT+gOhn4P/vOxxNAXbFAKsrrc15w==", + "dev": true, + "requires": {} + }, + "eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "dev": true, + "requires": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "eslint-module-utils": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", + "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", + "dev": true, + "requires": { + "debug": "^3.2.7", + "find-up": "^2.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "eslint-plugin-import": { + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", + "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", + "dev": true, + "requires": { + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.3", + "has": "^1.0.3", + "is-core-module": "^2.8.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.5", + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" + }, + "dependencies": { + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + } + } + }, "eslint-plugin-vue": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.0.3.tgz", @@ -23107,12 +23963,30 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true + }, "gamma": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gamma/-/gamma-1.0.0.tgz", @@ -23149,6 +24023,16 @@ "pump": "^3.0.0" } }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, "glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -23235,16 +24119,31 @@ "function-bind": "^1.1.1" } }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.1" + } + }, "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true }, "has-tostringtag": { @@ -23586,6 +24485,17 @@ } } }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -23626,6 +24536,15 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -23635,6 +24554,22 @@ "binary-extensions": "^2.0.0" } }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true + }, "is-ci": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", @@ -23645,9 +24580,9 @@ } }, "is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", "dev": true, "requires": { "has": "^1.0.3" @@ -23712,6 +24647,21 @@ "ip-regex": "^4.0.0" } }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true + }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-path-cwd": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", @@ -23755,18 +24705,54 @@ "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", "dev": true }, + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, "is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, "is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -24414,17 +25400,17 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "minipass": { @@ -24636,6 +25622,12 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, + "object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "dev": true + }, "object-is": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", @@ -24664,6 +25656,17 @@ "object-keys": "^1.1.1" } }, + "object.values": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + } + }, "obuf": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", @@ -25720,13 +26723,14 @@ "integrity": "sha512-4qf/7IsIKfSNHQXSwial1IFmfM1Cc/whNBQqRwe0V2stPe7KmN1U0tWQiIx6JiirgSrisjE0eECdNf7Tav1Ntw==" }, "regexp.prototype.flags": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", - "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" } }, "regexpp": { @@ -25809,13 +26813,14 @@ "dev": true }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dev": true, "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-from": { @@ -26055,6 +27060,17 @@ "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", "dev": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", @@ -26315,6 +27331,28 @@ "strip-ansi": "^6.0.1" } }, + "string.prototype.trimend": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "string.prototype.trimstart": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -26323,6 +27361,12 @@ "ansi-regex": "^5.0.1" } }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -26366,6 +27410,12 @@ "has-flag": "^3.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, "svg-pan-zoom": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/svg-pan-zoom/-/svg-pan-zoom-3.6.1.tgz", @@ -26599,6 +27649,29 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, + "tsconfig-paths": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + } + } + }, "tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", @@ -26634,6 +27707,18 @@ "mime-types": "~2.1.24" } }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -27411,6 +28496,19 @@ "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, "wildcard": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", diff --git a/package.json b/package.json index 71b2d35b3..5e6a3a173 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,8 @@ "@vue/cli-service": "^5.0.0-rc.0", "browserslist-useragent-regexp": "^3.0.2", "eslint": "^7.20.0", + "eslint-import-resolver-alias": "^1.1.2", + "eslint-plugin-import": "^2.26.0", "eslint-plugin-vue": "^8.0.3", "vue-template-compiler": "^2.6.11", "webpack": "^5.64.0" diff --git a/src/components/BlobSnowflake.vue b/src/components/BlobSnowflake.vue index f9af5934f..deda011cb 100644 --- a/src/components/BlobSnowflake.vue +++ b/src/components/BlobSnowflake.vue @@ -107,4 +107,4 @@ export default { user-select: none; cursor: default; } - \ No newline at end of file + diff --git a/src/components/BlobSnowflakes.vue b/src/components/BlobSnowflakes.vue index c9d9a17b9..e344c4754 100644 --- a/src/components/BlobSnowflakes.vue +++ b/src/components/BlobSnowflakes.vue @@ -1,6 +1,6 @@ diff --git a/src/components/tabs/celestial-pelle/PelleStrike.vue b/src/components/tabs/celestial-pelle/PelleStrike.vue index 51a080fc0..b4097d0f9 100644 --- a/src/components/tabs/celestial-pelle/PelleStrike.vue +++ b/src/components/tabs/celestial-pelle/PelleStrike.vue @@ -37,21 +37,21 @@ export default { diff --git a/src/components/tabs/celestial-pelle/RemnantGainFactor.vue b/src/components/tabs/celestial-pelle/RemnantGainFactor.vue index e0b005a33..77e02fdc3 100644 --- a/src/components/tabs/celestial-pelle/RemnantGainFactor.vue +++ b/src/components/tabs/celestial-pelle/RemnantGainFactor.vue @@ -138,13 +138,13 @@ export default { } .c-remnant-factors { - background-color: var(--color-text-inverted); + z-index: 4; + font-weight: bold; color: var(--color-text); + background-color: var(--color-text-inverted); border: var(--var-border-width, 0.2rem) solid var(--color-pelle--base); border-radius: var(--var-border-radius, 0.5rem); padding: 0.3rem; - font-weight: bold; - z-index: 4; } .c-remnant-factors-text { @@ -158,10 +158,10 @@ export default { .l-remnant-factors-col { display: flex; + flex-grow: 0; + flex-shrink: 0; flex-direction: column; margin-left: 2rem; - flex-shrink: 0; - flex-grow: 0; } .l-remnant-factors-col--first { diff --git a/src/components/tabs/celestial-ra/RaPet.vue b/src/components/tabs/celestial-ra/RaPet.vue index 93a779eb4..4839ab9ec 100644 --- a/src/components/tabs/celestial-ra/RaPet.vue +++ b/src/components/tabs/celestial-ra/RaPet.vue @@ -310,8 +310,8 @@ export default { .c-ra-pet-upgrade-memory { border-top-right-radius: 0; - border-bottom-left-radius: 0; border-bottom-right-radius: 0; + border-bottom-left-radius: 0; } .c-ra-pet-upgrade-chunk { diff --git a/src/components/tabs/glyphs/sidebar/SelectedEffectToggle.vue b/src/components/tabs/glyphs/sidebar/SelectedEffectToggle.vue index 4a832972f..c8cc4652e 100644 --- a/src/components/tabs/glyphs/sidebar/SelectedEffectToggle.vue +++ b/src/components/tabs/glyphs/sidebar/SelectedEffectToggle.vue @@ -103,23 +103,23 @@ export default { diff --git a/src/components/tabs/shop/ShopTab.vue b/src/components/tabs/shop/ShopTab.vue index 843382861..623b45adc 100644 --- a/src/components/tabs/shop/ShopTab.vue +++ b/src/components/tabs/shop/ShopTab.vue @@ -107,11 +107,11 @@ export default { } .c-shop-disclaimer { - color: black; - background: var(--color-bad); width: 100rem; font-size: 1.8rem; font-weight: bold; + color: black; + background: var(--color-bad); border: var(--var-border-width, 0.2rem) solid black; border-radius: var(--var-border-radius, 1rem); margin-top: 0.8rem; @@ -139,15 +139,15 @@ export default { } .o-shop-button-button { + display: flex; + align-items: center; + font-family: Typewriter; background: turquoise; border: none; border-radius: var(--var-border-radius, 0.5rem); - display: flex; margin: auto; - align-items: center; - font-family: Typewriter; - padding: 0.5rem 2rem; margin-top: 1rem; + padding: 0.5rem 2rem; cursor: pointer; } diff --git a/src/components/tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue b/src/components/tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue index 85ecfa061..ac1919924 100644 --- a/src/components/tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue +++ b/src/components/tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue @@ -123,8 +123,8 @@ export default { diff --git a/src/components/ui-modes/HeaderBlackHole.vue b/src/components/ui-modes/HeaderBlackHole.vue index ae49f0baa..943023efd 100644 --- a/src/components/ui-modes/HeaderBlackHole.vue +++ b/src/components/ui-modes/HeaderBlackHole.vue @@ -117,8 +117,8 @@ export default { diff --git a/src/components/tabs/celestial-pelle/PelleTab.vue b/src/components/tabs/celestial-pelle/PelleTab.vue index cc1affb77..60582ee0b 100644 --- a/src/components/tabs/celestial-pelle/PelleTab.vue +++ b/src/components/tabs/celestial-pelle/PelleTab.vue @@ -186,12 +186,12 @@ export default { background: black; } -@keyframes roll { +@keyframes a-roll { 100% { transform: rotateY(360deg); } } .pelle-icon { - animation: roll infinite 8s linear; + animation: a-roll infinite 8s linear; } .o-celestial-quote-history { From 44793c004861d6a53bdccf82f2ebef5c8b31f1cb Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Tue, 17 May 2022 07:17:58 -0700 Subject: [PATCH 38/89] tweak base tab colors to match unique tabs --- public/stylesheets/new-ui-styles.css | 8 ++------ public/stylesheets/styles.css | 24 ++++-------------------- 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/public/stylesheets/new-ui-styles.css b/public/stylesheets/new-ui-styles.css index 264b6d626..5fd3cccb7 100644 --- a/public/stylesheets/new-ui-styles.css +++ b/public/stylesheets/new-ui-styles.css @@ -66,7 +66,7 @@ body.t-s9 { height: 7rem; justify-content: center; align-items: center; - background-color: var(--color-base); + background-color: var(--color-prestige--accent); border-right: 0.1rem solid var(--color-accent); border-bottom: 0.1rem solid var(--color-accent); padding: 1rem; @@ -311,7 +311,7 @@ body.t-s9 { line-height: 2.8rem; opacity: 0; color: var(--color-text); - background: var(--color-base); + background: var(--color-prestige--accent); border: 0.1rem solid var(--color-accent); margin-left: -7.7rem; transition-duration: 0.2s; @@ -345,7 +345,6 @@ body.t-s9 { .o-tab-btn--infinity .o-subtab__tooltip { color: var(--color-infinity); - background: var(--color-prestige--accent); border-color: var(--color-infinity); } @@ -355,7 +354,6 @@ body.t-s9 { .o-tab-btn--eternity .o-subtab__tooltip { color: var(--color-eternity); - background: var(--color-prestige--accent); border-color: var(--color-eternity); } @@ -365,7 +363,6 @@ body.t-s9 { .o-tab-btn--reality .o-subtab__tooltip { color: var(--color-reality); - background: var(--color-prestige--accent); border-color: var(--color-reality); } @@ -375,7 +372,6 @@ body.t-s9 { .o-tab-btn--celestial .o-subtab__tooltip { color: var(--color-celestials); - background: var(--color-prestige--accent); border-color: var(--color-celestials); } diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index 1eb4d4f27..716f5f181 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -154,7 +154,7 @@ html { --color-reality: #afa3a5; --color-reality-light: #e8e3e4; --color-celestials: #f2d6c1; - --color-prestige--accent: black; + --color-prestige--accent: #dbd242; --color-pelle--base: #7cb727; } @@ -534,7 +534,7 @@ button:focus { font-size: 1.8rem; font-weight: bold; color: var(--color-text); - background-color: var(--color-base); + background-color: var(--color-prestige--accent); border: var(--var-border-width, 0.2rem) solid var(--color-accent); border-radius: var(--var-border-radius, 0.4rem); transition-duration: 0.2s; @@ -549,51 +549,43 @@ button:focus { } .o-tab-btn:hover { - color: var(--color-text-inverted); + color: var(--color-prestige--accent); background: var(--color-accent); } .o-tab-btn--infinity { color: var(--color-infinity); - background: var(--color-prestige--accent); border-color: var(--color-infinity); } .o-tab-btn--infinity:hover { - color: var(--color-prestige--accent); background: var(--color-infinity); } .o-tab-btn--eternity { color: var(--color-eternity); - background: var(--color-prestige--accent); border-color: var(--color-eternity); } .o-tab-btn--eternity:hover { - color: var(--color-prestige--accent); background: var(--color-eternity); } .o-tab-btn--reality { color: var(--color-reality); - background: var(--color-prestige--accent); border-color: var(--color-reality); } .o-tab-btn--reality:hover { - color: var(--color-prestige--accent); background: var(--color-reality); } .o-tab-btn--celestial { color: var(--color-celestials); - background: var(--color-prestige--accent); border-color: var(--color-celestials); } .o-tab-btn--celestial:hover { - color: var(--color-prestige--accent); background: var(--color-celestials); } @@ -9260,7 +9252,7 @@ input.o-automator-block-input { font: 1rem Typewriter, serif; font-weight: bold; color: var(--color-text); - background-color: var(--color-base); + background-color: var(--color-text-inverted); border: 0.1rem solid black; border-radius: var(--var-border-radius, 0.4rem); box-shadow: none; @@ -9296,45 +9288,37 @@ input.o-automator-block-input { .c-hide-modal-tab-button--infinity { color: var(--color-infinity); - background: var(--color-prestige--accent); border-color: var(--color-infinity); } .c-hide-modal-tab-button--infinity:hover { - color: var(--color-prestige--accent); background: var(--color-infinity); } .c-hide-modal-tab-button--eternity { color: var(--color-eternity); - background: var(--color-prestige--accent); border-color: var(--color-eternity); } .c-hide-modal-tab-button--eternity:hover { - color: var(--color-prestige--accent); background: var(--color-eternity); } .c-hide-modal-tab-button--reality { color: var(--color-reality); - background: var(--color-prestige--accent); border-color: var(--color-reality); } .c-hide-modal-tab-button--reality:hover { - color: var(--color-prestige--accent); background: var(--color-reality); } .c-hide-modal-tab-button--celestials { color: var(--color-celestials); - background: var(--color-prestige--accent); border-color: var(--color-celestials); } .c-hide-modal-tab-button--celestials:hover { - color: var(--color-prestige--accent); background: var(--color-celestials); } From 679ae44dd2a3336d68a8610d172dba73f5fedeb3 Mon Sep 17 00:00:00 2001 From: L4R5W <66326188+L4R5W@users.noreply.github.com> Date: Wed, 18 May 2022 09:33:13 +0200 Subject: [PATCH 39/89] add ReacTivity to credits --- javascripts/core/secret-formula/credits.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/javascripts/core/secret-formula/credits.js b/javascripts/core/secret-formula/credits.js index 2dddbefb9..b3f768f8e 100644 --- a/javascripts/core/secret-formula/credits.js +++ b/javascripts/core/secret-formula/credits.js @@ -321,6 +321,9 @@ GameDatabase.credits = { }, { name: "Razvan Cercel", roles: 12 + }, { + name: "ReacTivity", + roles: 12 }, { name: "Rukimix", roles: 12 From e8515984e8b1ece78df607b212adb056c72f0189 Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Wed, 18 May 2022 05:26:15 -0700 Subject: [PATCH 40/89] adjust stylelintrc to hopefully not break codefactor --- .stylelintrc.json | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index 2ab809c30..a8ab7f125 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -3,8 +3,13 @@ "stylelint-order" ], "extends": [ - "stylelint-config-standard", - "stylelint-config-recommended-vue" + "stylelint-config-recommended", + "stylelint-config-html", + "stylelint-config-standard" + ], + "files": [ + "*.vue", + "**/*.vue" ], "rules": { "no-descending-specificity": null, @@ -23,6 +28,25 @@ "ignoreProperties": ["appearance", "background-clip", "backdrop-filter", "clip-path", "user-select"] } ], + "selector-pseudo-class-no-unknown": [ + true, + { + "ignorePseudoClasses": [ + "deep", + "global" + ] + } + ], + "selector-pseudo-element-no-unknown": [ + true, + { + "ignorePseudoElements": [ + "v-deep", + "v-global", + "v-slotted" + ] + } + ], "unit-allowed-list": [ "rem", From a7ba8e1057225e2a9d6af5e474558eabdd19996a Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Wed, 18 May 2022 05:38:00 -0700 Subject: [PATCH 41/89] fix incorrect config --- .stylelintrc.json | 60 +++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index a8ab7f125..1f451f64c 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -3,14 +3,8 @@ "stylelint-order" ], "extends": [ - "stylelint-config-recommended", - "stylelint-config-html", "stylelint-config-standard" ], - "files": [ - "*.vue", - "**/*.vue" - ], "rules": { "no-descending-specificity": null, "font-family-no-missing-generic-family-keyword": null, @@ -28,25 +22,6 @@ "ignoreProperties": ["appearance", "background-clip", "backdrop-filter", "clip-path", "user-select"] } ], - "selector-pseudo-class-no-unknown": [ - true, - { - "ignorePseudoClasses": [ - "deep", - "global" - ] - } - ], - "selector-pseudo-element-no-unknown": [ - true, - { - "ignorePseudoElements": [ - "v-deep", - "v-global", - "v-slotted" - ] - } - ], "unit-allowed-list": [ "rem", @@ -413,5 +388,38 @@ "emptyLineBeforeUnspecified": "always" } ] - } + }, + "overrides": [ + { + "files": [ + "*.vue", + "**/*.vue" + ], + "extends": [ + "stylelint-config-recommended", + "stylelint-config-html" + ], + "rules": { + "selector-pseudo-class-no-unknown": [ + true, + { + "ignorePseudoClasses": [ + "deep", + "global" + ] + } + ], + "selector-pseudo-element-no-unknown": [ + true, + { + "ignorePseudoElements": [ + "v-deep", + "v-global", + "v-slotted" + ] + } + ] + } + } + ] } From 5db5c07ebaf3f8b723724435120bdd79f871dd6a Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Wed, 18 May 2022 10:20:07 -0700 Subject: [PATCH 42/89] fix all `no-prototype-builtin` errors --- javascripts/core/app/ui.js | 2 +- javascripts/core/devtools.js | 2 +- javascripts/core/intervals.js | 5 ++++- javascripts/core/performance-stats.js | 2 +- javascripts/core/player.js | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/javascripts/core/app/ui.js b/javascripts/core/app/ui.js index 3d2c53787..c619abf78 100644 --- a/javascripts/core/app/ui.js +++ b/javascripts/core/app/ui.js @@ -97,7 +97,7 @@ const ReactivityComplainer = { throw new Error(`Boi you fukked up - ${path} became REACTIVE (oh shite)`); } for (const key in obj) { - if (!obj.hasOwnProperty(key)) continue; + if (!Object.prototype.hasOwnProperty.call(obj, key)) continue; const prop = obj[key]; if (typeof prop === "object") { this.checkReactivity(prop, `${path}.${key}`); diff --git a/javascripts/core/devtools.js b/javascripts/core/devtools.js index 8ac429cbd..0397b07ff 100644 --- a/javascripts/core/devtools.js +++ b/javascripts/core/devtools.js @@ -166,7 +166,7 @@ dev.resetDilation = function() { // when making a special glyph, so no max-params // eslint-disable-next-line max-params dev.giveSpecialGlyph = function(color, symbol, level, rawLevel = level) { - if (!specialGlyphSymbols.hasOwnProperty(symbol)) return; + if (!Object.prototype.hasOwnProperty.call(specialGlyphSymbols, symbol)) return; if (Glyphs.freeInventorySpace === 0) return; const glyph = GlyphGenerator.randomGlyph({ actualLevel: level, rawLevel }); glyph.symbol = symbol; diff --git a/javascripts/core/intervals.js b/javascripts/core/intervals.js index c9c887118..5192caf17 100644 --- a/javascripts/core/intervals.js +++ b/javascripts/core/intervals.js @@ -30,7 +30,10 @@ export const GameIntervals = (function() { // Not a getter because getter will cause stack overflow all() { return Object.values(GameIntervals) - .filter(i => i.hasOwnProperty("start") && i.hasOwnProperty("stop")); + .filter(i => + Object.prototype.hasOwnProperty.call(i, "start") && + Object.prototype.hasOwnProperty.call(i, "stop") + ); }, start() { // eslint-disable-next-line no-shadow diff --git a/javascripts/core/performance-stats.js b/javascripts/core/performance-stats.js index 8f12ba35e..42c0f8f09 100644 --- a/javascripts/core/performance-stats.js +++ b/javascripts/core/performance-stats.js @@ -49,7 +49,7 @@ export const PerformanceStats = { function render(rootBlock) { indentLevel++; for (const blockName in rootBlock) { - if (!rootBlock.hasOwnProperty(blockName)) continue; + if (!Object.prototype.hasOwnProperty.call(rootBlock, blockName)) continue; const block = rootBlock[blockName]; const records = block.records; while (records.length > 1 && records.last().timestamp - records.first().timestamp > samplePeriod) { diff --git a/javascripts/core/player.js b/javascripts/core/player.js index debb9bf53..7a6fbdfa0 100644 --- a/javascripts/core/player.js +++ b/javascripts/core/player.js @@ -984,7 +984,7 @@ export function guardFromNaNValues(obj) { } for (const key in obj) { - if (!obj.hasOwnProperty(key)) continue; + if (!Object.prototype.hasOwnProperty.call(obj, key)) continue; // TODO: rework autobuyer saving if (key === "automator") continue; From c7905dc70bdaba9b44e8dafbb38312813311e04c Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Wed, 18 May 2022 18:16:55 -0700 Subject: [PATCH 43/89] clean up infinity upgrade gamedatabase --- javascripts/core/big_crunch.js | 307 ------------ javascripts/core/break-infinity-upgrades.js | 48 ++ javascripts/core/globals.js | 2 + javascripts/core/infinity-upgrades.js | 213 ++++++++ .../infinity/break-infinity-upgrades.js | 283 +++++------ .../infinity/infinity-upgrades.js | 460 +++++++++--------- 6 files changed, 643 insertions(+), 670 deletions(-) create mode 100644 javascripts/core/break-infinity-upgrades.js create mode 100644 javascripts/core/infinity-upgrades.js diff --git a/javascripts/core/big_crunch.js b/javascripts/core/big_crunch.js index 063572e1c..1fd0a6259 100644 --- a/javascripts/core/big_crunch.js +++ b/javascripts/core/big_crunch.js @@ -1,6 +1,4 @@ -import { GameMechanicState, RebuyableMechanicState, SetPurchasableMechanicState } from "./game-mechanics/index"; import { DC } from "./constants"; -import { SpeedrunMilestones } from "./speedrun"; export function bigCrunchAnimation() { document.body.style.animation = "implode 2s 1"; @@ -152,311 +150,6 @@ export function secondSoftReset(forcedNDReset = false) { AchievementTimers.marathon2.reset(); } -class ChargedInfinityUpgradeState extends GameMechanicState { - constructor(config, upgrade) { - super(config); - this._upgrade = upgrade; - } - - get isEffectActive() { - return this._upgrade.isBought && this._upgrade.isCharged; - } -} - -export class InfinityUpgrade extends SetPurchasableMechanicState { - constructor(config, requirement) { - super(config); - if (Array.isArray(requirement) || typeof requirement === "function") { - this._requirements = requirement; - } else if (requirement === undefined) { - this._requirements = []; - } else { - this._requirements = [requirement]; - } - if (config.charged) { - this._chargedEffect = new ChargedInfinityUpgradeState(config.charged, this); - } - } - - get currency() { - return Currency.infinityPoints; - } - - get set() { - return player.infinityUpgrades; - } - - get isAvailableForPurchase() { - return typeof this._requirements === "function" ? this._requirements() - : this._requirements.every(x => x.isBought); - } - - get isEffectActive() { - return this.isBought && !this.isCharged; - } - - get chargedEffect() { - return this._chargedEffect; - } - - purchase() { - if (super.purchase()) { - // This applies the 4th column of infinity upgrades retroactively - if (this.config.id.includes("skip")) skipResetsIfPossible(); - EventHub.dispatch(GAME_EVENT.INFINITY_UPGRADE_BOUGHT); - return true; - } - if (this.canCharge) { - this.charge(); - return true; - } - return false; - } - - get hasChargeEffect() { - return this.config.charged !== undefined; - } - - get isCharged() { - return player.celestials.ra.charged.has(this.id); - } - - get canCharge() { - return this.isBought && - this.hasChargeEffect && - !this.isCharged && - Ra.chargesLeft !== 0 && - !Pelle.isDisabled("chargedInfinityUpgrades"); - } - - charge() { - player.celestials.ra.charged.add(this.id); - } - - disCharge() { - player.celestials.ra.charged.delete(this.id); - } -} - -export function totalIPMult() { - if (Effarig.isRunning && Effarig.currentStage === EFFARIG_STAGES.INFINITY) { - return DC.D1; - } - let ipMult = DC.D1 - .times(ShopPurchase.IPPurchases.currentMult) - .timesEffectsOf( - TimeStudy(41), - TimeStudy(51), - TimeStudy(141), - TimeStudy(142), - TimeStudy(143), - Achievement(85), - Achievement(93), - Achievement(116), - Achievement(125), - Achievement(141).effects.ipGain, - InfinityUpgrade.ipMult, - DilationUpgrade.ipMultDT, - GlyphEffect.ipMult - ); - ipMult = ipMult.times(Replicanti.amount.powEffectOf(AlchemyResource.exponential)); - return ipMult; -} - -export function disChargeAll() { - const upgrades = [ - InfinityUpgrade.totalTimeMult, - InfinityUpgrade.dim18mult, - InfinityUpgrade.dim36mult, - InfinityUpgrade.resetBoost, - InfinityUpgrade.buy10Mult, - InfinityUpgrade.dim27mult, - InfinityUpgrade.dim45mult, - InfinityUpgrade.galaxyBoost, - InfinityUpgrade.thisInfinityTimeMult, - InfinityUpgrade.unspentIPMult, - InfinityUpgrade.dimboostMult, - InfinityUpgrade.ipGen - ]; - for (const upgrade of upgrades) { - if (upgrade.isCharged) { - upgrade.disCharge(); - } - } - player.celestials.ra.disCharge = false; -} - -(function() { - const db = GameDatabase.infinity.upgrades; - const upgrade = (config, requirement) => new InfinityUpgrade(config, requirement); - InfinityUpgrade.totalTimeMult = upgrade(db.totalTimeMult); - InfinityUpgrade.dim18mult = upgrade(db.dim18mult, InfinityUpgrade.totalTimeMult); - InfinityUpgrade.dim36mult = upgrade(db.dim36mult, InfinityUpgrade.dim18mult); - InfinityUpgrade.resetBoost = upgrade(db.resetBoost, InfinityUpgrade.dim36mult); - - InfinityUpgrade.buy10Mult = upgrade(db.buy10Mult); - InfinityUpgrade.dim27mult = upgrade(db.dim27mult, InfinityUpgrade.buy10Mult); - InfinityUpgrade.dim45mult = upgrade(db.dim45mult, InfinityUpgrade.dim27mult); - InfinityUpgrade.galaxyBoost = upgrade(db.galaxyBoost, InfinityUpgrade.dim45mult); - - InfinityUpgrade.thisInfinityTimeMult = upgrade(db.thisInfinityTimeMult); - InfinityUpgrade.unspentIPMult = upgrade(db.unspentIPMult, InfinityUpgrade.thisInfinityTimeMult); - InfinityUpgrade.dimboostMult = upgrade(db.dimboostMult, InfinityUpgrade.unspentIPMult); - InfinityUpgrade.ipGen = upgrade(db.ipGen, InfinityUpgrade.dimboostMult); - - InfinityUpgrade.skipReset1 = upgrade(db.skipReset1); - InfinityUpgrade.skipReset2 = upgrade(db.skipReset2, InfinityUpgrade.skipReset1); - InfinityUpgrade.skipReset3 = upgrade(db.skipReset3, InfinityUpgrade.skipReset2); - InfinityUpgrade.skipResetGalaxy = upgrade(db.skipResetGalaxy, InfinityUpgrade.skipReset3); - - InfinityUpgrade.ipOffline = upgrade(db.ipOffline, () => Achievement(41).isUnlocked); -}()); - -// The repeatable 2xIP upgrade has an odd cost structure - it follows a shallow exponential (step *10) up to e3M, at -// which point it follows a steeper one (step *1e10) up to e6M before finally hardcapping. At the hardcap, there's -// an extra bump that increases the multipler itself from e993k to e1M. All these numbers are specified in -// GameDatabase.infinity.upgrades.ipMult -class InfinityIPMultUpgrade extends GameMechanicState { - get cost() { - if (this.purchaseCount >= this.purchasesAtIncrease) { - return this.config.costIncreaseThreshold - .times(Decimal.pow(this.costIncrease, this.purchaseCount - this.purchasesAtIncrease)); - } - return Decimal.pow(this.costIncrease, this.purchaseCount + 1); - } - - get purchaseCount() { - return player.IPMultPurchases; - } - - get purchasesAtIncrease() { - return this.config.costIncreaseThreshold.log10() - 1; - } - - get hasIncreasedCost() { - return this.purchaseCount >= this.purchasesAtIncrease; - } - - get costIncrease() { - return this.hasIncreasedCost ? 1e10 : 10; - } - - get isCapped() { - return this.cost.gte(this.config.costCap); - } - - get isBought() { - return this.isCapped; - } - - get isRequirementSatisfied() { - return Achievement(41).isUnlocked; - } - - get canBeBought() { - return !Pelle.isDoomed && !this.isCapped && Currency.infinityPoints.gte(this.cost) && this.isRequirementSatisfied; - } - - // This is only ever called with amount = 1 or within buyMax under conditions that ensure the scaling doesn't - // change mid-purchase - purchase(amount = 1) { - if (!this.canBeBought) return; - if (!TimeStudy(181).isBought) { - Autobuyer.bigCrunch.bumpAmount(DC.D2.pow(amount)); - } - Currency.infinityPoints.subtract(Decimal.sumGeometricSeries(amount, this.cost, this.costIncrease, 0)); - player.IPMultPurchases += amount; - GameUI.update(); - } - - buyMax() { - if (!this.canBeBought) return; - if (!this.hasIncreasedCost) { - // Only allow IP below the softcap to be used - const availableIP = Currency.infinityPoints.value.clampMax(this.config.costIncreaseThreshold); - const purchases = Decimal.affordGeometricSeries(availableIP, this.cost, this.costIncrease, 0).toNumber(); - if (purchases <= 0) return; - this.purchase(purchases); - } - // Do not replace it with `if else` - it's specifically designed to process two sides of threshold separately - // (for example, we have 1e4000000 IP and no mult - first it will go to (but not including) 1e3000000 and then - // it will go in this part) - if (this.hasIncreasedCost) { - const availableIP = Currency.infinityPoints.value.clampMax(this.config.costCap); - const purchases = Decimal.affordGeometricSeries(availableIP, this.cost, this.costIncrease, 0).toNumber(); - if (purchases <= 0) return; - this.purchase(purchases); - } - } -} - -InfinityUpgrade.ipMult = new InfinityIPMultUpgrade(GameDatabase.infinity.upgrades.ipMult); - -export class BreakInfinityUpgrade extends SetPurchasableMechanicState { - get currency() { - return Currency.infinityPoints; - } - - get set() { - return player.infinityUpgrades; - } - - onPurchased() { - if (this.id === "postGalaxy") { - SpeedrunMilestones(7).tryComplete(); - PelleStrikes.powerGalaxies.trigger(); - } - } -} - -(function() { - const db = GameDatabase.infinity.breakUpgrades; - const upgrade = props => new BreakInfinityUpgrade(props); - BreakInfinityUpgrade.totalAMMult = upgrade(db.totalAMMult); - BreakInfinityUpgrade.currentAMMult = upgrade(db.currentAMMult); - BreakInfinityUpgrade.galaxyBoost = upgrade(db.galaxyBoost); - - BreakInfinityUpgrade.infinitiedMult = upgrade(db.infinitiedMult); - BreakInfinityUpgrade.achievementMult = upgrade(db.achievementMult); - BreakInfinityUpgrade.slowestChallengeMult = upgrade(db.slowestChallengeMult); - - BreakInfinityUpgrade.infinitiedGen = upgrade(db.infinitiedGen); - BreakInfinityUpgrade.autobuyMaxDimboosts = upgrade(db.autobuyMaxDimboosts); - BreakInfinityUpgrade.autobuyerSpeed = upgrade(db.autobuyerSpeed); -}()); - -class RebuyableBreakInfinityUpgradeState extends RebuyableMechanicState { - get currency() { - return Currency.infinityPoints; - } - - get boughtAmount() { - return player.infinityRebuyables[this.id]; - } - - set boughtAmount(value) { - player.infinityRebuyables[this.id] = value; - } - - get isCapped() { - return this.boughtAmount === this.config.maxUpgrades; - } -} - -BreakInfinityUpgrade.tickspeedCostMult = new class extends RebuyableBreakInfinityUpgradeState { - onPurchased() { - GameCache.tickSpeedMultDecrease.invalidate(); - } -}(GameDatabase.infinity.breakUpgrades.tickspeedCostMult); - -BreakInfinityUpgrade.dimCostMult = new class extends RebuyableBreakInfinityUpgradeState { - onPurchased() { - GameCache.dimensionMultDecrease.invalidate(); - } -}(GameDatabase.infinity.breakUpgrades.dimCostMult); - -BreakInfinityUpgrade.ipGen = new RebuyableBreakInfinityUpgradeState(GameDatabase.infinity.breakUpgrades.ipGen); - export function preProductionGenerateIP(diff) { if (InfinityUpgrade.ipGen.isBought) { const genPeriod = Time.bestInfinity.totalMilliseconds * 10; diff --git a/javascripts/core/break-infinity-upgrades.js b/javascripts/core/break-infinity-upgrades.js new file mode 100644 index 000000000..fdbaacf19 --- /dev/null +++ b/javascripts/core/break-infinity-upgrades.js @@ -0,0 +1,48 @@ +import { RebuyableMechanicState, SetPurchasableMechanicState } from "./game-mechanics/index"; +import { SpeedrunMilestones } from "./speedrun"; + +export class BreakInfinityUpgradeState extends SetPurchasableMechanicState { + get currency() { + return Currency.infinityPoints; + } + + get set() { + return player.infinityUpgrades; + } + + onPurchased() { + if (this.id === "postGalaxy") { + SpeedrunMilestones(7).tryComplete(); + PelleStrikes.powerGalaxies.trigger(); + } + } +} + +class RebuyableBreakInfinityUpgradeState extends RebuyableMechanicState { + get currency() { + return Currency.infinityPoints; + } + + get boughtAmount() { + return player.infinityRebuyables[this.id]; + } + + set boughtAmount(value) { + player.infinityRebuyables[this.id] = value; + } + + get isCapped() { + return this.boughtAmount === this.config.maxUpgrades; + } + + onPurchased() { + this.config.onPurchased?.(); + } +} + +export const BreakInfinityUpgrade = mapGameDataToObject( + GameDatabase.infinity.breakUpgrades, + config => (config.rebuyable + ? new RebuyableBreakInfinityUpgradeState(config) + : new BreakInfinityUpgradeState(config)) +); diff --git a/javascripts/core/globals.js b/javascripts/core/globals.js index a341628b0..f57e7e930 100644 --- a/javascripts/core/globals.js +++ b/javascripts/core/globals.js @@ -68,6 +68,8 @@ export * from "./time-studies/index"; export * from "./dimboost"; export * from "./sacrifice"; export * from "./big_crunch"; +export * from "./infinity-upgrades"; +export * from "./break-infinity-upgrades"; export * from "./challenge"; export * from "./eternity"; export * from "./eternity_challenge"; diff --git a/javascripts/core/infinity-upgrades.js b/javascripts/core/infinity-upgrades.js new file mode 100644 index 000000000..45c571da3 --- /dev/null +++ b/javascripts/core/infinity-upgrades.js @@ -0,0 +1,213 @@ +import { GameMechanicState, SetPurchasableMechanicState } from "./game-mechanics/index"; +import { DC } from "./constants"; + +class ChargedInfinityUpgradeState extends GameMechanicState { + constructor(config, upgrade) { + super(config); + this._upgrade = upgrade; + } + + get isEffectActive() { + return this._upgrade.isBought && this._upgrade.isCharged; + } +} + +export class InfinityUpgradeState extends SetPurchasableMechanicState { + constructor(config) { + super(config); + if (config.charged) { + this._chargedEffect = new ChargedInfinityUpgradeState(config.charged, this); + } + } + + get currency() { + return Currency.infinityPoints; + } + + get set() { + return player.infinityUpgrades; + } + + get isAvailableForPurchase() { + return this.config.checkRequirement?.() ?? true; + } + + get isEffectActive() { + return this.isBought && !this.isCharged; + } + + get chargedEffect() { + return this._chargedEffect; + } + + purchase() { + if (super.purchase()) { + // This applies the 4th column of infinity upgrades retroactively + if (this.config.id.includes("skip")) skipResetsIfPossible(); + EventHub.dispatch(GAME_EVENT.INFINITY_UPGRADE_BOUGHT); + return true; + } + if (this.canCharge) { + this.charge(); + return true; + } + return false; + } + + get hasChargeEffect() { + return this.config.charged !== undefined; + } + + get isCharged() { + return player.celestials.ra.charged.has(this.id); + } + + get canCharge() { + return this.isBought && + this.hasChargeEffect && + !this.isCharged && + Ra.chargesLeft !== 0 && + !Pelle.isDisabled("chargedInfinityUpgrades"); + } + + charge() { + player.celestials.ra.charged.add(this.id); + } + + disCharge() { + player.celestials.ra.charged.delete(this.id); + } +} + +export function totalIPMult() { + if (Effarig.isRunning && Effarig.currentStage === EFFARIG_STAGES.INFINITY) { + return DC.D1; + } + let ipMult = DC.D1 + .times(ShopPurchase.IPPurchases.currentMult) + .timesEffectsOf( + TimeStudy(41), + TimeStudy(51), + TimeStudy(141), + TimeStudy(142), + TimeStudy(143), + Achievement(85), + Achievement(93), + Achievement(116), + Achievement(125), + Achievement(141).effects.ipGain, + InfinityUpgrade.ipMult, + DilationUpgrade.ipMultDT, + GlyphEffect.ipMult + ); + ipMult = ipMult.times(Replicanti.amount.powEffectOf(AlchemyResource.exponential)); + return ipMult; +} + +export function disChargeAll() { + const upgrades = [ + InfinityUpgrade.totalTimeMult, + InfinityUpgrade.dim18mult, + InfinityUpgrade.dim36mult, + InfinityUpgrade.resetBoost, + InfinityUpgrade.buy10Mult, + InfinityUpgrade.dim27mult, + InfinityUpgrade.dim45mult, + InfinityUpgrade.galaxyBoost, + InfinityUpgrade.thisInfinityTimeMult, + InfinityUpgrade.unspentIPMult, + InfinityUpgrade.dimboostMult, + InfinityUpgrade.ipGen + ]; + for (const upgrade of upgrades) { + if (upgrade.isCharged) { + upgrade.disCharge(); + } + } + player.celestials.ra.disCharge = false; +} + +// The repeatable 2xIP upgrade has an odd cost structure - it follows a shallow exponential (step *10) up to e3M, at +// which point it follows a steeper one (step *1e10) up to e6M before finally hardcapping. At the hardcap, there's +// an extra bump that increases the multipler itself from e993k to e1M. All these numbers are specified in +// GameDatabase.infinity.upgrades.ipMult +class InfinityIPMultUpgrade extends GameMechanicState { + get cost() { + if (this.purchaseCount >= this.purchasesAtIncrease) { + return this.config.costIncreaseThreshold + .times(Decimal.pow(this.costIncrease, this.purchaseCount - this.purchasesAtIncrease)); + } + return Decimal.pow(this.costIncrease, this.purchaseCount + 1); + } + + get purchaseCount() { + return player.IPMultPurchases; + } + + get purchasesAtIncrease() { + return this.config.costIncreaseThreshold.log10() - 1; + } + + get hasIncreasedCost() { + return this.purchaseCount >= this.purchasesAtIncrease; + } + + get costIncrease() { + return this.hasIncreasedCost ? 1e10 : 10; + } + + get isCapped() { + return this.cost.gte(this.config.costCap); + } + + get isBought() { + return this.isCapped; + } + + get isRequirementSatisfied() { + return Achievement(41).isUnlocked; + } + + get canBeBought() { + return !Pelle.isDoomed && !this.isCapped && Currency.infinityPoints.gte(this.cost) && this.isRequirementSatisfied; + } + + // This is only ever called with amount = 1 or within buyMax under conditions that ensure the scaling doesn't + // change mid-purchase + purchase(amount = 1) { + if (!this.canBeBought) return; + if (!TimeStudy(181).isBought) { + Autobuyer.bigCrunch.bumpAmount(DC.D2.pow(amount)); + } + Currency.infinityPoints.subtract(Decimal.sumGeometricSeries(amount, this.cost, this.costIncrease, 0)); + player.IPMultPurchases += amount; + GameUI.update(); + } + + buyMax() { + if (!this.canBeBought) return; + if (!this.hasIncreasedCost) { + // Only allow IP below the softcap to be used + const availableIP = Currency.infinityPoints.value.clampMax(this.config.costIncreaseThreshold); + const purchases = Decimal.affordGeometricSeries(availableIP, this.cost, this.costIncrease, 0).toNumber(); + if (purchases <= 0) return; + this.purchase(purchases); + } + // Do not replace it with `if else` - it's specifically designed to process two sides of threshold separately + // (for example, we have 1e4000000 IP and no mult - first it will go to (but not including) 1e3000000 and then + // it will go in this part) + if (this.hasIncreasedCost) { + const availableIP = Currency.infinityPoints.value.clampMax(this.config.costCap); + const purchases = Decimal.affordGeometricSeries(availableIP, this.cost, this.costIncrease, 0).toNumber(); + if (purchases <= 0) return; + this.purchase(purchases); + } + } +} + +export const InfinityUpgrade = mapGameDataToObject( + GameDatabase.infinity.upgrades, + config => (config.id === "ipMult" + ? new InfinityIPMultUpgrade(config) + : new InfinityUpgradeState(config)) +); diff --git a/javascripts/core/secret-formula/infinity/break-infinity-upgrades.js b/javascripts/core/secret-formula/infinity/break-infinity-upgrades.js index 9c0a606f3..f3d1edd08 100644 --- a/javascripts/core/secret-formula/infinity/break-infinity-upgrades.js +++ b/javascripts/core/secret-formula/infinity/break-infinity-upgrades.js @@ -1,145 +1,148 @@ import { DC } from "../../constants"; import { GameDatabase } from "../game-database"; -GameDatabase.infinity.breakUpgrades = (function() { - function rebuyable(config) { - const effectFunction = config.effect || (x => x); - return { - id: config.id, - cost: () => config.initialCost * Math.pow(config.costIncrease, player.infinityRebuyables[config.id]), - maxUpgrades: config.maxUpgrades, - description: config.description, - effect: () => effectFunction(player.infinityRebuyables[config.id]), - isDisabled: config.isDisabled, - // There isn't enough room in the button to fit the EC reduction and "Next:" at the same time while still - // presenting all the information in an understandable way, so we only show it if the upgrade is maxed - formatEffect: config.formatEffect || - (value => { - const afterECText = config.afterEC ? config.afterEC() : ""; - return value === config.maxUpgrades - ? `Default: ${formatX(10)} | Currently: ${formatX(10 - value)} ${afterECText}` - : `Default: ${formatX(10)} | Currently: ${formatX(10 - value)} Next: ${formatX(10 - value - 1)}`; - }), - formatCost: value => format(value, 2, 0), - noLabel: !config.label - }; - } - +function rebuyable(config) { + const effectFunction = config.effect || (x => x); + const { id, maxUpgrades, description, isDisabled, noLabel, onPurchased } = config; return { - totalAMMult: { - id: "totalMult", - cost: 1e4, - description: "Antimatter Dimensions gain a multiplier based on total antimatter produced", - effect: () => Math.pow(player.records.totalAntimatter.exponent + 1, 0.5), - formatEffect: value => formatX(value, 2, 2) - }, - currentAMMult: { - id: "currentMult", - cost: 5e4, - description: "Antimatter Dimensions gain a multiplier based on current antimatter", - effect: () => Math.pow(Currency.antimatter.exponent + 1, 0.5), - formatEffect: value => formatX(value, 2, 2) - }, - galaxyBoost: { - id: "postGalaxy", - cost: 5e11, - description: () => `All Galaxies are ${formatPercents(0.5)} stronger`, - effect: 1.5 - }, - infinitiedMult: { - id: "infinitiedMult", - cost: 1e5, - description: "Antimatter Dimensions gain a multiplier based on Infinities", - effect: () => 1 + Currency.infinitiesTotal.value.pLog10() * 10, - formatEffect: value => formatX(value, 2, 2) - }, - achievementMult: { - id: "achievementMult", - cost: 1e6, - description: "Additional multiplier to Antimatter Dimensions based on Achievements completed", - effect: () => Math.max(Math.pow((Achievements.effectiveCount - 30), 3) / 40, 1), - formatEffect: value => formatX(value, 2, 2) - }, - slowestChallengeMult: { - id: "challengeMult", - cost: 1e7, - description: "Antimatter Dimensions gain a multiplier based on slowest challenge run", - effect: () => Decimal.clampMin(50 / Time.worstChallenge.totalMinutes, 1), - formatEffect: value => formatX(value, 2, 2), - hasCap: true, - cap: DC.D3E4 - }, - infinitiedGen: { - id: "infinitiedGeneration", - cost: 2e7, - description: () => (Pelle.isDoomed - ? "This upgrade has no effect while in Doomed" - : "Passively generate Infinities based on your fastest Infinity"), - effect: () => player.records.bestInfinity.time, - formatEffect: value => { - if (Pelle.isDoomed) return "Disabled"; - if (value === Number.MAX_VALUE && !Pelle.isDoomed) return "No Infinity generation"; - let infinities = DC.D1; - infinities = infinities.timesEffectsOf( - RealityUpgrade(5), - RealityUpgrade(7), - Ra.unlocks.continuousTTBoost.effects.infinity - ); - infinities = infinities.times(getAdjustedGlyphEffect("infinityinfmult")); - return `${quantify("Infinity", infinities)} every ${Time.bestInfinity.times(5).toStringShort()}`; - } - }, - autobuyMaxDimboosts: { - id: "autobuyMaxDimboosts", - cost: 5e9, - description: "Unlock the buy max Dimension Boost Autobuyer mode" - }, - autobuyerSpeed: { - id: "autoBuyerUpgrade", - cost: 1e15, - description: "Autobuyers unlocked or improved by Normal Challenges work twice as fast" - }, - tickspeedCostMult: rebuyable({ - id: 0, - initialCost: 1e6, - costIncrease: 5, - maxUpgrades: 8, - description: "Reduce post-infinity Tickspeed Upgrade cost multiplier scaling", - afterEC: () => (EternityChallenge(11).completions > 0 - ? `After EC11: ${formatX(Player.tickSpeedMultDecrease, 2, 2)}` - : "" - ), - label: false, - }), - dimCostMult: rebuyable({ - id: 1, - initialCost: 1e7, - costIncrease: 5e3, - maxUpgrades: 7, - description: "Reduce post-infinity Antimatter Dimension cost multiplier scaling", - afterEC: () => (EternityChallenge(6).completions > 0 - ? `After EC6: ${formatX(Player.dimensionMultDecrease, 2, 2)}` - : "" - ), - label: false, - }), - ipGen: rebuyable({ - id: 2, - initialCost: 1e7, - costIncrease: 10, - maxUpgrades: 10, - effect: value => Player.bestRunIPPM.times(value / 20), - description: () => { - let generation = `Generate ${formatInt(5 * player.infinityRebuyables[2])}%`; - if (!BreakInfinityUpgrade.ipGen.isCapped) { - generation += ` ➜ ${formatInt(5 * (1 + player.infinityRebuyables[2]))}%`; - } - const offlineString = player.options.offlineProgress ? ", works offline" : ""; - return `${generation} of your best IP/min from your last 10 Infinities${offlineString}`; - }, - isDisabled: effect => effect.eq(0), - formatEffect: value => `${format(value, 2, 1)} IP/min`, - label: true - }) + rebuyable: true, + id, + cost: () => config.initialCost * Math.pow(config.costIncrease, player.infinityRebuyables[config.id]), + maxUpgrades, + description, + effect: () => effectFunction(player.infinityRebuyables[config.id]), + isDisabled, + // There isn't enough room in the button to fit the EC reduction and "Next:" at the same time while still + // presenting all the information in an understandable way, so we only show it if the upgrade is maxed + formatEffect: config.formatEffect || + (value => { + const afterECText = config.afterEC ? config.afterEC() : ""; + return value === config.maxUpgrades + ? `Default: ${formatX(10)} | Currently: ${formatX(10 - value)} ${afterECText}` + : `Default: ${formatX(10)} | Currently: ${formatX(10 - value)} Next: ${formatX(10 - value - 1)}`; + }), + formatCost: value => format(value, 2, 0), + noLabel, + onPurchased }; -}()); +} + +GameDatabase.infinity.breakUpgrades = { + totalAMMult: { + id: "totalMult", + cost: 1e4, + description: "Antimatter Dimensions gain a multiplier based on total antimatter produced", + effect: () => Math.pow(player.records.totalAntimatter.exponent + 1, 0.5), + formatEffect: value => formatX(value, 2, 2) + }, + currentAMMult: { + id: "currentMult", + cost: 5e4, + description: "Antimatter Dimensions gain a multiplier based on current antimatter", + effect: () => Math.pow(Currency.antimatter.exponent + 1, 0.5), + formatEffect: value => formatX(value, 2, 2) + }, + galaxyBoost: { + id: "postGalaxy", + cost: 5e11, + description: () => `All Galaxies are ${formatPercents(0.5)} stronger`, + effect: 1.5 + }, + infinitiedMult: { + id: "infinitiedMult", + cost: 1e5, + description: "Antimatter Dimensions gain a multiplier based on Infinities", + effect: () => 1 + Currency.infinitiesTotal.value.pLog10() * 10, + formatEffect: value => formatX(value, 2, 2) + }, + achievementMult: { + id: "achievementMult", + cost: 1e6, + description: "Additional multiplier to Antimatter Dimensions based on Achievements completed", + effect: () => Math.max(Math.pow((Achievements.effectiveCount - 30), 3) / 40, 1), + formatEffect: value => formatX(value, 2, 2) + }, + slowestChallengeMult: { + id: "challengeMult", + cost: 1e7, + description: "Antimatter Dimensions gain a multiplier based on slowest challenge run", + effect: () => Decimal.clampMin(50 / Time.worstChallenge.totalMinutes, 1), + formatEffect: value => formatX(value, 2, 2), + hasCap: true, + cap: DC.D3E4 + }, + infinitiedGen: { + id: "infinitiedGeneration", + cost: 2e7, + description: () => (Pelle.isDoomed + ? "This upgrade has no effect while in Doomed" + : "Passively generate Infinities based on your fastest Infinity"), + effect: () => player.records.bestInfinity.time, + formatEffect: value => { + if (Pelle.isDoomed) return "Disabled"; + if (value === Number.MAX_VALUE && !Pelle.isDoomed) return "No Infinity generation"; + let infinities = DC.D1; + infinities = infinities.timesEffectsOf( + RealityUpgrade(5), + RealityUpgrade(7), + Ra.unlocks.continuousTTBoost.effects.infinity + ); + infinities = infinities.times(getAdjustedGlyphEffect("infinityinfmult")); + return `${quantify("Infinity", infinities)} every ${Time.bestInfinity.times(5).toStringShort()}`; + } + }, + autobuyMaxDimboosts: { + id: "autobuyMaxDimboosts", + cost: 5e9, + description: "Unlock the buy max Dimension Boost Autobuyer mode" + }, + autobuyerSpeed: { + id: "autoBuyerUpgrade", + cost: 1e15, + description: "Autobuyers unlocked or improved by Normal Challenges work twice as fast" + }, + tickspeedCostMult: rebuyable({ + id: 0, + initialCost: 1e6, + costIncrease: 5, + maxUpgrades: 8, + description: "Reduce post-infinity Tickspeed Upgrade cost multiplier scaling", + afterEC: () => (EternityChallenge(11).completions > 0 + ? `After EC11: ${formatX(Player.tickSpeedMultDecrease, 2, 2)}` + : "" + ), + noLabel: true, + onPurchased: () => GameCache.tickSpeedMultDecrease.invalidate() + }), + dimCostMult: rebuyable({ + id: 1, + initialCost: 1e7, + costIncrease: 5e3, + maxUpgrades: 7, + description: "Reduce post-infinity Antimatter Dimension cost multiplier scaling", + afterEC: () => (EternityChallenge(6).completions > 0 + ? `After EC6: ${formatX(Player.dimensionMultDecrease, 2, 2)}` + : "" + ), + noLabel: true, + onPurchased: () => GameCache.dimensionMultDecrease.invalidate() + }), + ipGen: rebuyable({ + id: 2, + initialCost: 1e7, + costIncrease: 10, + maxUpgrades: 10, + effect: value => Player.bestRunIPPM.times(value / 20), + description: () => { + let generation = `Generate ${formatInt(5 * player.infinityRebuyables[2])}%`; + if (!BreakInfinityUpgrade.ipGen.isCapped) { + generation += ` ➜ ${formatInt(5 * (1 + player.infinityRebuyables[2]))}%`; + } + const offlineString = player.options.offlineProgress ? ", works offline" : ""; + return `${generation} of your best IP/min from your last 10 Infinities${offlineString}`; + }, + isDisabled: effect => effect.eq(0), + formatEffect: value => `${format(value, 2, 1)} IP/min`, + noLabel: false + }) +}; diff --git a/javascripts/core/secret-formula/infinity/infinity-upgrades.js b/javascripts/core/secret-formula/infinity/infinity-upgrades.js index 0d9db2860..bc0b9e33f 100644 --- a/javascripts/core/secret-formula/infinity/infinity-upgrades.js +++ b/javascripts/core/secret-formula/infinity/infinity-upgrades.js @@ -1,227 +1,241 @@ import { DC } from "../../constants"; import { GameDatabase } from "../game-database"; -GameDatabase.infinity.upgrades = (function() { - function dimInfinityMult() { - return Currency.infinitiesTotal.value.times(0.2).plus(1); - } - function chargedDimInfinityMult() { - return 1 + Math.log10(Math.max(1, Currency.infinitiesTotal.value.pLog10())) * Math.sqrt(Ra.pets.teresa.level) / 150; - } - return { - totalTimeMult: { - id: "timeMult", - cost: 1, - description: "Antimatter Dimensions gain a multiplier based on time played", - effect: () => Math.pow(Time.totalTimePlayed.totalMinutes / 2, 0.15), - formatEffect: value => formatX(value, 2, 2), - charged: { - description: "Antimatter Dimensions gain a power effect based on time played and Teresa level", - effect: () => 1 + - Math.log10(Math.log10(Time.totalTimePlayed.totalMilliseconds)) * - Math.pow(Ra.pets.teresa.level, 0.5) / 150, - formatEffect: value => formatPow(value, 4, 4) - } - }, - dim18mult: { - id: "18Mult", - cost: 1, - description: "1st and 8th Antimatter Dimensions gain a multiplier based on Infinities", - effect: () => dimInfinityMult(), - formatEffect: value => formatX(value, 1, 1), - charged: { - description: "1st and 8th Antimatter Dimensions gain a power effect based on Infinities and Teresa level", - effect: () => chargedDimInfinityMult(), - formatEffect: value => formatPow(value, 4, 4) - } - }, - dim27mult: { - id: "27Mult", - cost: 1, - description: "2nd and 7th Antimatter Dimensions gain a multiplier based on Infinities", - effect: () => dimInfinityMult(), - formatEffect: value => formatX(value, 1, 1), - charged: { - description: "2nd and 7th Antimatter Dimensions gain a power effect based on Infinities and Teresa level", - effect: () => chargedDimInfinityMult(), - formatEffect: value => formatPow(value, 4, 4) - } - }, - dim36mult: { - id: "36Mult", - cost: 1, - description: "3rd and 6th Antimatter Dimensions gain a multiplier based on Infinities", - effect: () => dimInfinityMult(), - formatEffect: value => formatX(value, 1, 1), - charged: { - description: "3rd and 6th Antimatter Dimensions gain a power effect based on Infinities and Teresa level", - effect: () => chargedDimInfinityMult(), - formatEffect: value => formatPow(value, 4, 4) - } - }, - dim45mult: { - id: "45Mult", - cost: 1, - description: "4th and 5th Antimatter Dimensions gain a multiplier based on Infinities", - effect: () => dimInfinityMult(), - formatEffect: value => formatX(value, 1, 1), - charged: { - description: "4th and 5th Antimatter Dimensions gain a power effect based on Infinities and Teresa level", - effect: () => chargedDimInfinityMult(), - formatEffect: value => formatPow(value, 4, 4) - } - }, - resetBoost: { - id: "resetBoost", - cost: 1, - description: () => - `Decrease the number of Dimensions needed for Dimension Boosts and Antimatter Galaxies by ${formatInt(9)}`, - effect: 9, - charged: { - description: () => "Decrease Dimension Boost requirement based on Teresa level", - effect: () => 1 / (1 + Math.sqrt(Ra.pets.teresa.level) / 10), - formatEffect: value => `${formatX(value, 4, 4)}` - } - }, - buy10Mult: { - id: "dimMult", - cost: 1, - description: () => `Increase the multiplier for buying ${formatInt(10)} Antimatter Dimensions`, - effect: () => 1.1, - formatEffect: () => `${formatX(2, 0, 1)} ➜ ${formatX(2.2, 0, 1)}`, - charged: { - description: () => `The multiplier for buying ${formatInt(10)} Antimatter Dimensions gains ` + - "a power effect based on Teresa level", - effect: () => 1 + Ra.pets.teresa.level / 200, - formatEffect: value => formatPow(value, 3, 3) - } - }, - galaxyBoost: { - id: "galaxyBoost", - cost: 2, - description: "All Galaxies are twice as strong", - effect: 2, - charged: { - description: "All Galaxies are stronger based on Teresa level", - effect: () => 2 + Math.sqrt(Ra.pets.teresa.level) / 100, - formatEffect: value => `+${formatPercents(value - 1)}` - } - }, - thisInfinityTimeMult: { - id: "timeMult2", - cost: 3, - description: "Antimatter Dimensions gain a multiplier based on time spent in current Infinity", - effect: () => Decimal.max(Math.pow(Time.thisInfinity.totalMinutes / 4, 0.25), 1), - formatEffect: value => formatX(value, 2, 2), - charged: { - description: - "Antimatter Dimensions gain a power effect based on time spent in current Infinity and Teresa level", - effect: () => 1 + - Math.log10(Math.log10(Time.thisInfinity.totalMilliseconds + 100)) * - Math.sqrt(Ra.pets.teresa.level) / 150, - formatEffect: value => formatPow(value, 4, 4) - } - }, - unspentIPMult: { - id: "unspentBonus", - cost: 5, - description: "Multiplier to 1st Antimatter Dimension based on unspent Infinity Points", - effect: () => Currency.infinityPoints.value.dividedBy(2).pow(1.5).plus(1), - formatEffect: value => formatX(value, 2, 2), - charged: { - description: "Multiplier to 1st Antimatter Dimension based on unspent Infinity Points, powered by Teresa level", - effect: () => Currency.infinityPoints.value.dividedBy(2).pow(Math.sqrt(Ra.pets.teresa.level) * 1.5).plus(1), - formatEffect: value => formatX(value, 2, 2) - } - }, - dimboostMult: { - id: "resetMult", - cost: 7, - description: "Increase Dimension Boost multiplier", - effect: () => 2.5, - formatEffect: () => `${formatX(2, 0, 1)} ➜ ${formatX(2.5, 0, 1)}`, - charged: { - description: "Dimension Boost multiplier gains a power effect based on Teresa level", - effect: () => 1 + Ra.pets.teresa.level / 200, - formatEffect: value => formatPow(value, 3, 3) - } - }, - ipGen: { - id: "passiveGen", - cost: 10, - description: () => (Pelle.isDoomed - ? "This upgrade has no effect while in Doomed" - : `Passively generate Infinity Points ${formatInt(10)} times slower than your fastest Infinity`), - // Cutting corners: this is not actual effect, but it is totalIPMult that is displyed on upgrade - effect: () => (Teresa.isRunning || V.isRunning || Pelle.isDoomed ? DC.D0 : GameCache.totalIPMult.value), - formatEffect: value => { - if (Teresa.isRunning || V.isRunning) return "Disabled in this reality"; - if (Pelle.isDoomed) return "Disabled"; - const income = format(value, 2, 0); - const period = player.records.bestInfinity.time >= 999999999999 - ? "∞" - : Time.bestInfinity.times(10).toStringShort(); - return `${income} every ${period}`; - }, - charged: { - description: () => - `Gain a percentage of your Reality Machines gained on Reality each real-time second, - percent increases with Teresa level`, - effect: () => Math.sqrt(Ra.pets.teresa.level) / 1000 * - Ra.unlocks.continuousTTBoost.effects.autoPrestige.effectOrDefault(1), - formatEffect: value => `${formatPercents(value, 2)}` - } - }, - skipReset1: { - id: "skipReset1", - cost: 20, - description: () => - `Start every reset with ${formatInt(1)} Dimension Boost, automatically unlocking the 5th Antimatter Dimension`, - }, - skipReset2: { - id: "skipReset2", - cost: 40, - description: () => - `Start every reset with ${formatInt(2)} Dimension Boosts, automatically unlocking the 6th Antimatter Dimension`, - }, - skipReset3: { - id: "skipReset3", - cost: 80, - description: () => - `Start every reset with ${formatInt(3)} Dimension Boosts, automatically unlocking the 7th Antimatter Dimension`, - }, - skipResetGalaxy: { - id: "skipResetGalaxy", - cost: 300, - description: () => - `Start every reset with ${formatInt(4)} Dimension Boosts, automatically unlocking the 8th Antimatter Dimension; - and an Antimatter Galaxy`, - }, - ipOffline: { - id: "ipOffline", - cost: 1000, - description: () => (player.options.offlineProgress - ? `Only while offline, gain ${formatPercents(0.5)} of your best IP/min without using Max All` - : "This upgrade would give offline Infinity Point generation, but offline progress is currently disabled"), - effect: () => (player.options.offlineProgress - ? player.records.thisEternity.bestIPMsWithoutMaxAll.times(TimeSpan.fromMinutes(1).totalMilliseconds / 2) - : DC.D0), - isDisabled: () => !player.options.offlineProgress, - formatEffect: value => `${format(value, 2, 2)} IP/min`, - }, - ipMult: { - id: "ipMult", - cost: () => InfinityUpgrade.ipMult.cost, - costCap: DC.E6E6, - costIncreaseThreshold: DC.E3E6, - description: () => (Pelle.isDoomed - ? "This upgrade has no effect while in Doomed" - : `Multiply Infinity Points from all sources by ${formatX(2)}`), - // Normally the multiplier caps at e993k or so with 3300000 purchases, but if the cost is capped then we just give - // an extra e7k to make the multiplier look nice - effect: () => (player.IPMultPurchases >= 3300000 ? DC.E1E6 : DC.D2.pow(player.IPMultPurchases)), - cap: () => Effarig.eternityCap ?? DC.E1E6, - formatEffect: value => formatX(value, 2, 2), + +function dimInfinityMult() { + return Currency.infinitiesTotal.value.times(0.2).plus(1); +} +function chargedDimInfinityMult() { + return 1 + Math.log10(Math.max(1, Currency.infinitiesTotal.value.pLog10())) * Math.sqrt(Ra.pets.teresa.level) / 150; +} + +GameDatabase.infinity.upgrades = { + totalTimeMult: { + id: "timeMult", + cost: 1, + description: "Antimatter Dimensions gain a multiplier based on time played", + effect: () => Math.pow(Time.totalTimePlayed.totalMinutes / 2, 0.15), + formatEffect: value => formatX(value, 2, 2), + charged: { + description: "Antimatter Dimensions gain a power effect based on time played and Teresa level", + effect: () => 1 + + Math.log10(Math.log10(Time.totalTimePlayed.totalMilliseconds)) * + Math.pow(Ra.pets.teresa.level, 0.5) / 150, + formatEffect: value => formatPow(value, 4, 4) } - }; -}()); + }, + dim18mult: { + id: "18Mult", + cost: 1, + checkRequirement: () => InfinityUpgrade.totalTimeMult.isBought, + description: "1st and 8th Antimatter Dimensions gain a multiplier based on Infinities", + effect: () => dimInfinityMult(), + formatEffect: value => formatX(value, 1, 1), + charged: { + description: "1st and 8th Antimatter Dimensions gain a power effect based on Infinities and Teresa level", + effect: () => chargedDimInfinityMult(), + formatEffect: value => formatPow(value, 4, 4) + } + }, + dim27mult: { + id: "27Mult", + cost: 1, + checkRequirement: () => InfinityUpgrade.buy10Mult.isBought, + description: "2nd and 7th Antimatter Dimensions gain a multiplier based on Infinities", + effect: () => dimInfinityMult(), + formatEffect: value => formatX(value, 1, 1), + charged: { + description: "2nd and 7th Antimatter Dimensions gain a power effect based on Infinities and Teresa level", + effect: () => chargedDimInfinityMult(), + formatEffect: value => formatPow(value, 4, 4) + } + }, + dim36mult: { + id: "36Mult", + cost: 1, + checkRequirement: () => InfinityUpgrade.dim18mult.isBought, + description: "3rd and 6th Antimatter Dimensions gain a multiplier based on Infinities", + effect: () => dimInfinityMult(), + formatEffect: value => formatX(value, 1, 1), + charged: { + description: "3rd and 6th Antimatter Dimensions gain a power effect based on Infinities and Teresa level", + effect: () => chargedDimInfinityMult(), + formatEffect: value => formatPow(value, 4, 4) + } + }, + dim45mult: { + id: "45Mult", + cost: 1, + checkRequirement: () => InfinityUpgrade.dim27mult.isBought, + description: "4th and 5th Antimatter Dimensions gain a multiplier based on Infinities", + effect: () => dimInfinityMult(), + formatEffect: value => formatX(value, 1, 1), + charged: { + description: "4th and 5th Antimatter Dimensions gain a power effect based on Infinities and Teresa level", + effect: () => chargedDimInfinityMult(), + formatEffect: value => formatPow(value, 4, 4) + } + }, + resetBoost: { + id: "resetBoost", + cost: 1, + checkRequirement: () => InfinityUpgrade.dim36mult.isBought, + description: () => + `Decrease the number of Dimensions needed for Dimension Boosts and Antimatter Galaxies by ${formatInt(9)}`, + effect: 9, + charged: { + description: () => "Decrease Dimension Boost requirement based on Teresa level", + effect: () => 1 / (1 + Math.sqrt(Ra.pets.teresa.level) / 10), + formatEffect: value => `${formatX(value, 4, 4)}` + } + }, + buy10Mult: { + id: "dimMult", + cost: 1, + description: () => `Increase the multiplier for buying ${formatInt(10)} Antimatter Dimensions`, + effect: () => 1.1, + formatEffect: () => `${formatX(2, 0, 1)} ➜ ${formatX(2.2, 0, 1)}`, + charged: { + description: () => `The multiplier for buying ${formatInt(10)} Antimatter Dimensions gains ` + + "a power effect based on Teresa level", + effect: () => 1 + Ra.pets.teresa.level / 200, + formatEffect: value => formatPow(value, 3, 3) + } + }, + galaxyBoost: { + id: "galaxyBoost", + cost: 2, + checkRequirement: () => InfinityUpgrade.dim45mult.isBought, + description: "All Galaxies are twice as strong", + effect: 2, + charged: { + description: "All Galaxies are stronger based on Teresa level", + effect: () => 2 + Math.sqrt(Ra.pets.teresa.level) / 100, + formatEffect: value => `+${formatPercents(value - 1)}` + } + }, + thisInfinityTimeMult: { + id: "timeMult2", + cost: 3, + description: "Antimatter Dimensions gain a multiplier based on time spent in current Infinity", + effect: () => Decimal.max(Math.pow(Time.thisInfinity.totalMinutes / 4, 0.25), 1), + formatEffect: value => formatX(value, 2, 2), + charged: { + description: + "Antimatter Dimensions gain a power effect based on time spent in current Infinity and Teresa level", + effect: () => 1 + + Math.log10(Math.log10(Time.thisInfinity.totalMilliseconds + 100)) * + Math.sqrt(Ra.pets.teresa.level) / 150, + formatEffect: value => formatPow(value, 4, 4) + } + }, + unspentIPMult: { + id: "unspentBonus", + cost: 5, + checkRequirement: () => InfinityUpgrade.thisInfinityTimeMult.isBought, + description: "Multiplier to 1st Antimatter Dimension based on unspent Infinity Points", + effect: () => Currency.infinityPoints.value.dividedBy(2).pow(1.5).plus(1), + formatEffect: value => formatX(value, 2, 2), + charged: { + description: "Multiplier to 1st Antimatter Dimension based on unspent Infinity Points, powered by Teresa level", + effect: () => Currency.infinityPoints.value.dividedBy(2).pow(Math.sqrt(Ra.pets.teresa.level) * 1.5).plus(1), + formatEffect: value => formatX(value, 2, 2) + } + }, + dimboostMult: { + id: "resetMult", + cost: 7, + checkRequirement: () => InfinityUpgrade.unspentIPMult.isBought, + description: "Increase Dimension Boost multiplier", + effect: () => 2.5, + formatEffect: () => `${formatX(2, 0, 1)} ➜ ${formatX(2.5, 0, 1)}`, + charged: { + description: "Dimension Boost multiplier gains a power effect based on Teresa level", + effect: () => 1 + Ra.pets.teresa.level / 200, + formatEffect: value => formatPow(value, 3, 3) + } + }, + ipGen: { + id: "passiveGen", + cost: 10, + checkRequirement: () => InfinityUpgrade.dimboostMult.isBought, + description: () => (Pelle.isDoomed + ? "This upgrade has no effect while in Doomed" + : `Passively generate Infinity Points ${formatInt(10)} times slower than your fastest Infinity`), + // Cutting corners: this is not actual effect, but it is totalIPMult that is displyed on upgrade + effect: () => (Teresa.isRunning || V.isRunning || Pelle.isDoomed ? DC.D0 : GameCache.totalIPMult.value), + formatEffect: value => { + if (Teresa.isRunning || V.isRunning) return "Disabled in this reality"; + if (Pelle.isDoomed) return "Disabled"; + const income = format(value, 2, 0); + const period = player.records.bestInfinity.time >= 999999999999 + ? "∞" + : Time.bestInfinity.times(10).toStringShort(); + return `${income} every ${period}`; + }, + charged: { + description: () => + `Gain a percentage of your Reality Machines gained on Reality each real-time second, + percent increases with Teresa level`, + effect: () => Math.sqrt(Ra.pets.teresa.level) / 1000 * + Ra.unlocks.continuousTTBoost.effects.autoPrestige.effectOrDefault(1), + formatEffect: value => `${formatPercents(value, 2)}` + } + }, + skipReset1: { + id: "skipReset1", + cost: 20, + description: () => + `Start every reset with ${formatInt(1)} Dimension Boost, automatically unlocking the 5th Antimatter Dimension`, + }, + skipReset2: { + id: "skipReset2", + cost: 40, + checkRequirement: () => InfinityUpgrade.skipReset1.isBought, + description: () => + `Start every reset with ${formatInt(2)} Dimension Boosts, automatically unlocking the 6th Antimatter Dimension`, + }, + skipReset3: { + id: "skipReset3", + cost: 80, + checkRequirement: () => InfinityUpgrade.skipReset2.isBought, + description: () => + `Start every reset with ${formatInt(3)} Dimension Boosts, automatically unlocking the 7th Antimatter Dimension`, + }, + skipResetGalaxy: { + id: "skipResetGalaxy", + cost: 300, + checkRequirement: () => InfinityUpgrade.skipReset3.isBought, + description: () => + `Start every reset with ${formatInt(4)} Dimension Boosts, automatically unlocking the 8th Antimatter Dimension; + and an Antimatter Galaxy`, + }, + ipOffline: { + id: "ipOffline", + cost: 1000, + checkRequirement: () => Achievement(41).isUnlocked, + description: () => (player.options.offlineProgress + ? `Only while offline, gain ${formatPercents(0.5)} of your best IP/min without using Max All` + : "This upgrade would give offline Infinity Point generation, but offline progress is currently disabled"), + effect: () => (player.options.offlineProgress + ? player.records.thisEternity.bestIPMsWithoutMaxAll.times(TimeSpan.fromMinutes(1).totalMilliseconds / 2) + : DC.D0), + isDisabled: () => !player.options.offlineProgress, + formatEffect: value => `${format(value, 2, 2)} IP/min`, + }, + ipMult: { + id: "ipMult", + cost: () => InfinityUpgrade.ipMult.cost, + checkRequirement: () => Achievement(41).isUnlocked, + costCap: DC.E6E6, + costIncreaseThreshold: DC.E3E6, + description: () => (Pelle.isDoomed + ? "This upgrade has no effect while in Doomed" + : `Multiply Infinity Points from all sources by ${formatX(2)}`), + // Normally the multiplier caps at e993k or so with 3300000 purchases, but if the cost is capped then we just give + // an extra e7k to make the multiplier look nice + effect: () => (player.IPMultPurchases >= 3300000 ? DC.E1E6 : DC.D2.pow(player.IPMultPurchases)), + cap: () => Effarig.eternityCap ?? DC.E1E6, + formatEffect: value => formatX(value, 2, 2), + } +}; From dcd34002c6ae1121dba9f256e3b48dc8bba62053 Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Wed, 18 May 2022 18:19:58 -0700 Subject: [PATCH 44/89] clean up alchemy gamedatabase --- javascripts/core/celestials/ra/alchemy.js | 46 +- .../core/secret-formula/celestials/alchemy.js | 885 +++++++++--------- .../core/secret-formula/game-database.js | 1 + 3 files changed, 462 insertions(+), 470 deletions(-) diff --git a/javascripts/core/celestials/ra/alchemy.js b/javascripts/core/celestials/ra/alchemy.js index fe02a65bd..2f3bf9378 100644 --- a/javascripts/core/celestials/ra/alchemy.js +++ b/javascripts/core/celestials/ra/alchemy.js @@ -224,44 +224,16 @@ class AlchemyReaction { } } -export const AlchemyResource = (function() { - function createResource(resource) { - const config = GameDatabase.celestials.alchemy.resources[resource]; - config.id = resource; - if (config.isBaseResource) { - return new BasicAlchemyResourceState(config); - } - return new AdvancedAlchemyResourceState(config); - } - - return { - power: createResource(ALCHEMY_RESOURCE.POWER), - infinity: createResource(ALCHEMY_RESOURCE.INFINITY), - time: createResource(ALCHEMY_RESOURCE.TIME), - replication: createResource(ALCHEMY_RESOURCE.REPLICATION), - dilation: createResource(ALCHEMY_RESOURCE.DILATION), - cardinality: createResource(ALCHEMY_RESOURCE.CARDINALITY), - eternity: createResource(ALCHEMY_RESOURCE.ETERNITY), - dimensionality: createResource(ALCHEMY_RESOURCE.DIMENSIONALITY), - inflation: createResource(ALCHEMY_RESOURCE.INFLATION), - alternation: createResource(ALCHEMY_RESOURCE.ALTERNATION), - effarig: createResource(ALCHEMY_RESOURCE.EFFARIG), - synergism: createResource(ALCHEMY_RESOURCE.SYNERGISM), - momentum: createResource(ALCHEMY_RESOURCE.MOMENTUM), - decoherence: createResource(ALCHEMY_RESOURCE.DECOHERENCE), - exponential: createResource(ALCHEMY_RESOURCE.EXPONENTIAL), - force: createResource(ALCHEMY_RESOURCE.FORCE), - uncountability: createResource(ALCHEMY_RESOURCE.UNCOUNTABILITY), - boundless: createResource(ALCHEMY_RESOURCE.BOUNDLESS), - multiversal: createResource(ALCHEMY_RESOURCE.MULTIVERSAL), - unpredictability: createResource(ALCHEMY_RESOURCE.UNPREDICTABILITY), - reality: createResource(ALCHEMY_RESOURCE.REALITY) - }; -}()); +export const AlchemyResource = mapGameDataToObject( + GameDatabase.celestials.alchemy.resources, + config => (config.isBaseResource + ? new BasicAlchemyResourceState(config) + : new AdvancedAlchemyResourceState(config)) +); export const AlchemyResources = { - all: Object.values(AlchemyResource), - base: Object.values(AlchemyResource).filter(r => r.isBaseResource) + all: AlchemyResource.all, + base: AlchemyResource.all.filter(r => r.isBaseResource) }; export const AlchemyReactions = (function() { @@ -269,7 +241,7 @@ export const AlchemyReactions = (function() { function mapReagents(resource) { return resource.config.reagents .map(r => ({ - resource: AlchemyResources.all[r.resource], + resource: AlchemyResources.all.find(x => x.id === r.resource), cost: r.amount })); } diff --git a/javascripts/core/secret-formula/celestials/alchemy.js b/javascripts/core/secret-formula/celestials/alchemy.js index 938388e91..f93d31188 100644 --- a/javascripts/core/secret-formula/celestials/alchemy.js +++ b/javascripts/core/secret-formula/celestials/alchemy.js @@ -1,443 +1,462 @@ import { DC } from "../../constants"; import { GameDatabase } from "../game-database"; -GameDatabase.celestials.alchemy = { - resources: { - // T1 resources (Non-Effarig "base" resources) - [ALCHEMY_RESOURCE.POWER]: { - name: "Power", - symbol: "Ω", - isBaseResource: true, - effect: amount => 1 + amount / 200000, - tier: 1, - uiOrder: 1, - unlockedAt: 2, - description: "provides a multiplier to Antimatter Dimensions", - formatEffect: value => `Antimatter Dimension multipliers ${formatPow(value, 4, 4)}` - }, - [ALCHEMY_RESOURCE.INFINITY]: { - name: "Infinity", - symbol: "∞", - isBaseResource: true, - effect: amount => 1 + amount / 200000, - tier: 1, - uiOrder: 2, - unlockedAt: 3, - description: "provides a multiplier to Infinity Dimensions", - formatEffect: value => `Infinity Dimension multipliers ${formatPow(value, 4, 4)}` - }, - [ALCHEMY_RESOURCE.TIME]: { - name: "Time", - symbol: "Δ", - isBaseResource: true, - effect: amount => 1 + amount / 200000, - tier: 1, - uiOrder: 3, - unlockedAt: 4, - description: "provides a multiplier to Time Dimensions", - formatEffect: value => `Time Dimension multipliers ${formatPow(value, 4, 4)}` - }, - [ALCHEMY_RESOURCE.REPLICATION]: { - name: "Replication", - symbol: "Ξ", - isBaseResource: true, - effect: amount => Decimal.pow10(amount / 1000), - tier: 1, - uiOrder: 4, - unlockedAt: 5, - description: `increases Replication Speed`, - formatEffect: value => `Replication speed is increased by ${formatX(value, 2, 2)}` - }, - [ALCHEMY_RESOURCE.DILATION]: { - name: "Dilation", - symbol: "Ψ", - isBaseResource: true, - effect: amount => Decimal.pow10(amount / 2000), - tier: 1, - uiOrder: 5, - unlockedAt: 6, - description: "increases Dilated Time production", - formatEffect: value => `Dilated Time production is increased by ${formatX(value, 2, 2)}` - }, +GameDatabase.celestials.alchemy.resources = { + // T1 resources (Non-Effarig "base" resources) + "power": { + id: ALCHEMY_RESOURCE.POWER, + name: "Power", + symbol: "Ω", + isBaseResource: true, + effect: amount => 1 + amount / 200000, + tier: 1, + uiOrder: 1, + unlockedAt: 2, + description: "provides a multiplier to Antimatter Dimensions", + formatEffect: value => `Antimatter Dimension multipliers ${formatPow(value, 4, 4)}` + }, + "infinity": { + id: ALCHEMY_RESOURCE.INFINITY, + name: "Infinity", + symbol: "∞", + isBaseResource: true, + effect: amount => 1 + amount / 200000, + tier: 1, + uiOrder: 2, + unlockedAt: 3, + description: "provides a multiplier to Infinity Dimensions", + formatEffect: value => `Infinity Dimension multipliers ${formatPow(value, 4, 4)}` + }, + "time": { + id: ALCHEMY_RESOURCE.TIME, + name: "Time", + symbol: "Δ", + isBaseResource: true, + effect: amount => 1 + amount / 200000, + tier: 1, + uiOrder: 3, + unlockedAt: 4, + description: "provides a multiplier to Time Dimensions", + formatEffect: value => `Time Dimension multipliers ${formatPow(value, 4, 4)}` + }, + "replication": { + id: ALCHEMY_RESOURCE.REPLICATION, + name: "Replication", + symbol: "Ξ", + isBaseResource: true, + effect: amount => Decimal.pow10(amount / 1000), + tier: 1, + uiOrder: 4, + unlockedAt: 5, + description: `increases Replication Speed`, + formatEffect: value => `Replication speed is increased by ${formatX(value, 2, 2)}` + }, + "dilation": { + id: ALCHEMY_RESOURCE.DILATION, + name: "Dilation", + symbol: "Ψ", + isBaseResource: true, + effect: amount => Decimal.pow10(amount / 2000), + tier: 1, + uiOrder: 5, + unlockedAt: 6, + description: "increases Dilated Time production", + formatEffect: value => `Dilated Time production is increased by ${formatX(value, 2, 2)}` + }, - // T2 resources (combinations of pairs of T1 resources) - [ALCHEMY_RESOURCE.CARDINALITY]: { - name: "Cardinality", - symbol: "α", - isBaseResource: false, - effect: amount => 1 + 0.2 / (1 + amount / 20000), - tier: 2, - uiOrder: 3, - unlockedAt: 8, - get description() { return `reduces the slowdown per ${format(Number.MAX_VALUE, 2)} Replicanti`; }, - formatEffect: value => `Replicanti interval increases slower ${formatX(1.2, 1, 1)} ➜ ` + - `${formatX(value, 4, 4)} per ${format(Number.MAX_VALUE, 2)}`, - reagents: [ - { - resource: ALCHEMY_RESOURCE.TIME, - amount: 8 - }, - { - resource: ALCHEMY_RESOURCE.REPLICATION, - amount: 7 - } - ] - }, - [ALCHEMY_RESOURCE.ETERNITY]: { - name: "Eternity", - symbol: "τ", - isBaseResource: false, - effect: amount => 1 + amount / 15000, - tier: 2, - uiOrder: 2, - unlockedAt: 9, - description: "increases Eternity generation", - formatEffect: value => `Eternity generation ${formatPow(value, 4, 4)}`, - reagents: [ - { - resource: ALCHEMY_RESOURCE.TIME, - amount: 11 - }, - { - resource: ALCHEMY_RESOURCE.INFINITY, - amount: 4 - } - ] - }, - [ALCHEMY_RESOURCE.DIMENSIONALITY]: { - name: "Dimensionality", - symbol: "ρ", - isBaseResource: false, - effect: amount => Decimal.pow10(5 * amount), - tier: 2, - uiOrder: 1, - unlockedAt: 10, - description: "provides a multiplier to all dimensions", - formatEffect: value => `All Dimensions ${formatX(value)}`, - reagents: [ - { - resource: ALCHEMY_RESOURCE.POWER, - amount: 10 - }, - { - resource: ALCHEMY_RESOURCE.INFINITY, - amount: 5 - } - ] - }, - [ALCHEMY_RESOURCE.INFLATION]: { - name: "Inflation", - symbol: "λ", - isBaseResource: false, - effect: amount => Decimal.pow10(6e9 - 3e5 * amount), - tier: 2, - uiOrder: 5, - unlockedAt: 11, - description: "increases multiplier effect over a threshold", - formatEffect: value => `All Antimatter Dimension multipliers are ${formatPow(1.05, 2, 2)} - if they are above ${format(value)} `, - reagents: [ - { - resource: ALCHEMY_RESOURCE.POWER, - amount: 9 - }, - { - resource: ALCHEMY_RESOURCE.DILATION, - amount: 6 - } - ] - }, - [ALCHEMY_RESOURCE.ALTERNATION]: { - name: "Alternation", - symbol: "ω", - isBaseResource: false, - effect: amount => amount / 200000, - tier: 2, - uiOrder: 4, - unlockedAt: 12, - description: "increases the strength of Tachyon Galaxies based on Replicanti", - formatEffect: value => `Tachyon Galaxies are ${formatPercents(value, 2, 2)} stronger ` + - `per ${format(DC.E1E6)} Replicanti`, - reagents: [ - { - resource: ALCHEMY_RESOURCE.REPLICATION, - amount: 5 - }, - { - resource: ALCHEMY_RESOURCE.DILATION, - amount: 10 - } - ] - }, - - // T3 resources (Effarig and conbinations of T1/T2 with Effarig) - [ALCHEMY_RESOURCE.EFFARIG]: { - name: "Effarig", - symbol: "Ϙ", - isBaseResource: true, - effect: amount => Math.pow(10, amount / 2500), - tier: 2, - uiOrder: 3.5, - unlockedAt: 7, - description: "increases Relic Shard gain", - formatEffect: value => `Relic Shard gain is multiplied ${formatX(value, 2, 2)}` - }, - [ALCHEMY_RESOURCE.SYNERGISM]: { - name: "Synergism", - symbol: "π", - isBaseResource: false, - effect: amount => Math.clampMax(0.3 + Math.sqrt(amount / 15000), 1), - tier: 3, - uiOrder: 2, - unlockedAt: 13, - description: "increases the effectiveness of Alchemy Reactions", - formatEffect(value) { - const baseEffect = `Alchemy reaction efficiency ${formatPercents(0.3)} ➜ ${formatPercents(value, 2, 2)}`; - if (player.reality.glyphs.sac.reality === 0) { - return baseEffect; - } - const increasedYield = formatPercents(value * Effects.sum(GlyphSacrifice.reality), 2, 2); - return `${baseEffect} (${increasedYield} after Glyph Sacrifice)`; + // T2 resources (combinations of pairs of T1 resources) + "cardinality": { + id: ALCHEMY_RESOURCE.CARDINALITY, + name: "Cardinality", + symbol: "α", + isBaseResource: false, + effect: amount => 1 + 0.2 / (1 + amount / 20000), + tier: 2, + uiOrder: 3, + unlockedAt: 8, + get description() { return `reduces the slowdown per ${format(Number.MAX_VALUE, 2)} Replicanti`; }, + formatEffect: value => `Replicanti interval increases slower ${formatX(1.2, 1, 1)} ➜ + ${formatX(value, 4, 4)} per ${format(Number.MAX_VALUE, 2)}`, + reagents: [ + { + resource: ALCHEMY_RESOURCE.TIME, + amount: 8 }, - reagents: [ - { - resource: ALCHEMY_RESOURCE.EFFARIG, - amount: 3 - }, - { - resource: ALCHEMY_RESOURCE.REPLICATION, - amount: 16 - }, - { - resource: ALCHEMY_RESOURCE.INFINITY, - amount: 14 - } - ] - }, - [ALCHEMY_RESOURCE.MOMENTUM]: { - name: "Momentum", - symbol: "μ", - isBaseResource: false, - effect: amount => 1 + amount / 125000, - tier: 3, - uiOrder: 3, - unlockedAt: 15, - description: "provides a multiplier to all dimensions based on real time since unlock", - formatEffect: value => `All Dimensions ${formatPow(Ra.momentumValue, 4, 4)}, increasing by - ${format(0.002 * Achievement(175).effectOrDefault(1), 3, 3)} - per real-time hour after the resource is unlocked, up to a maximum of ${formatPow(value, 4, 4)}`, - reagents: [ - { - resource: ALCHEMY_RESOURCE.EFFARIG, - amount: 11 - }, - { - resource: ALCHEMY_RESOURCE.POWER, - amount: 4 - }, - { - resource: ALCHEMY_RESOURCE.TIME, - amount: 20 - } - ] - }, - [ALCHEMY_RESOURCE.DECOHERENCE]: { - name: "Decoherence", - symbol: "ξ", - isBaseResource: false, - effect: amount => 0.10 * Math.sqrt(amount / 10000), - tier: 3, - uiOrder: 4, - unlockedAt: 14, - description: "causes refining to give all basic Alchemy Resources", - formatEffect: value => `Refined Glyphs also give ${formatPercents(value, 2)} of their value ` + - "to all other base resources", - reagents: [ - { - resource: ALCHEMY_RESOURCE.EFFARIG, - amount: 13 - }, - { - resource: ALCHEMY_RESOURCE.ALTERNATION, - amount: 8 - } - ] - }, + { + resource: ALCHEMY_RESOURCE.REPLICATION, + amount: 7 + } + ] + }, + "eternity": { + id: ALCHEMY_RESOURCE.ETERNITY, + name: "Eternity", + symbol: "τ", + isBaseResource: false, + effect: amount => 1 + amount / 15000, + tier: 2, + uiOrder: 2, + unlockedAt: 9, + description: "increases Eternity generation", + formatEffect: value => `Eternity generation ${formatPow(value, 4, 4)}`, + reagents: [ + { + resource: ALCHEMY_RESOURCE.TIME, + amount: 11 + }, + { + resource: ALCHEMY_RESOURCE.INFINITY, + amount: 4 + } + ] + }, + "dimensionality": { + id: ALCHEMY_RESOURCE.DIMENSIONALITY, + name: "Dimensionality", + symbol: "ρ", + isBaseResource: false, + effect: amount => Decimal.pow10(5 * amount), + tier: 2, + uiOrder: 1, + unlockedAt: 10, + description: "provides a multiplier to all dimensions", + formatEffect: value => `All Dimensions ${formatX(value)}`, + reagents: [ + { + resource: ALCHEMY_RESOURCE.POWER, + amount: 10 + }, + { + resource: ALCHEMY_RESOURCE.INFINITY, + amount: 5 + } + ] + }, + "inflation": { + id: ALCHEMY_RESOURCE.INFLATION, + name: "Inflation", + symbol: "λ", + isBaseResource: false, + effect: amount => Decimal.pow10(6e9 - 3e5 * amount), + tier: 2, + uiOrder: 5, + unlockedAt: 11, + description: "increases multiplier effect over a threshold", + formatEffect: value => `All Antimatter Dimension multipliers are ${formatPow(1.05, 2, 2)} + if they are above ${format(value)} `, + reagents: [ + { + resource: ALCHEMY_RESOURCE.POWER, + amount: 9 + }, + { + resource: ALCHEMY_RESOURCE.DILATION, + amount: 6 + } + ] + }, + "alternation": { + id: ALCHEMY_RESOURCE.ALTERNATION, + name: "Alternation", + symbol: "ω", + isBaseResource: false, + effect: amount => amount / 200000, + tier: 2, + uiOrder: 4, + unlockedAt: 12, + description: "increases the strength of Tachyon Galaxies based on Replicanti", + formatEffect: value => `Tachyon Galaxies are ${formatPercents(value, 2, 2)} stronger + per ${format(DC.E1E6)} Replicanti`, + reagents: [ + { + resource: ALCHEMY_RESOURCE.REPLICATION, + amount: 5 + }, + { + resource: ALCHEMY_RESOURCE.DILATION, + amount: 10 + } + ] + }, - // T4 resources (resources which feed directly into the final resource) - [ALCHEMY_RESOURCE.EXPONENTIAL]: { - name: "Exponential", - symbol: "Γ", - isBaseResource: false, - effect: amount => 10 * Math.pow(amount / 10000, 2), - tier: 4, - uiOrder: 2, - unlockedAt: 18, - description: "multiplies Infinity Points by Replicanti", - formatEffect: value => `Infinity Points multiplied by Replicanti${formatPow(value, 2, 3)}`, - reagents: [ - { - resource: ALCHEMY_RESOURCE.INFLATION, - amount: 18 - }, - { - resource: ALCHEMY_RESOURCE.SYNERGISM, - amount: 3 - } - ] - }, - [ALCHEMY_RESOURCE.FORCE]: { - name: "Force", - symbol: "Φ", - isBaseResource: false, - effect: amount => 5 * amount, - tier: 4, - uiOrder: 2, - unlockedAt: 17, - description: "multiplies Antimatter Dimensions by Reality Machines", - formatEffect: value => `Multiply Antimatter Dimensions by Reality Machines${formatPow(value, 2, 2)}`, - reagents: [ - { - resource: ALCHEMY_RESOURCE.DIMENSIONALITY, - amount: 7 - }, - { - resource: ALCHEMY_RESOURCE.MOMENTUM, - amount: 8 - } - ] - }, - [ALCHEMY_RESOURCE.UNCOUNTABILITY]: { - name: "Uncountability", - symbol: "Θ", - isBaseResource: false, - effect: amount => Math.sqrt(amount), - tier: 4, - uiOrder: 3, - unlockedAt: 19, - description: "passively generates Realities and Perk Points", - formatEffect: value => `Generate ${format(value, 2, 2)} Realities and Perk Points per second`, - reagents: [ - { - resource: ALCHEMY_RESOURCE.INFINITY, - amount: 20 - }, - { - resource: ALCHEMY_RESOURCE.EFFARIG, - amount: 6 - }, - { - resource: ALCHEMY_RESOURCE.CARDINALITY, - amount: 16 - } - ] - }, - [ALCHEMY_RESOURCE.BOUNDLESS]: { - name: "Boundless", - symbol: "Π", - isBaseResource: false, - effect: amount => amount / 80000, - tier: 4, - uiOrder: 1, - unlockedAt: 20, - description: "makes Tesseracts stronger", - formatEffect: value => `Tesseracts are +${formatPercents(value, 2, 2)} stronger`, - reagents: [ - { - resource: ALCHEMY_RESOURCE.ETERNITY, - amount: 13 - }, - { - resource: ALCHEMY_RESOURCE.INFLATION, - amount: 18 - } - ] - }, - [ALCHEMY_RESOURCE.MULTIVERSAL]: { - name: "Multiversal", - symbol: "Σ", - isBaseResource: false, - effect: amount => 5 * Math.pow(amount / 10000, 2), - tier: 4, - uiOrder: 5, - unlockedAt: 16, - description: "makes each Reality simulate more Realities", - formatEffect: value => `Each Reality simulates ${format(value, 2, 3)} additional Realities, giving all - the same rewards as if it was amplified`, - reagents: [ - { - resource: ALCHEMY_RESOURCE.ALTERNATION, - amount: 16 - }, - { - resource: ALCHEMY_RESOURCE.DECOHERENCE, - amount: 3 - } - ] - }, - [ALCHEMY_RESOURCE.UNPREDICTABILITY]: { - name: "Unpredictability", - symbol: "Λ", - isBaseResource: false, - effect: amount => amount / (10000 + amount), - tier: 4, - uiOrder: 4, - unlockedAt: 21, - description: "makes each Alchemy Reaction have a chance to happen twice", - formatEffect: value => `Any alchemy reaction has a ${formatPercents(value, 2, 2)} - chance of triggering again`, - reagents: [ - { - resource: ALCHEMY_RESOURCE.EFFARIG, - amount: 15 - }, - { - resource: ALCHEMY_RESOURCE.DECOHERENCE, - amount: 3 - }, - { - resource: ALCHEMY_RESOURCE.SYNERGISM, - amount: 10 - } - ] + // T3 resources (Effarig and conbinations of T1/T2 with Effarig) + "effarig": { + id: ALCHEMY_RESOURCE.EFFARIG, + name: "Effarig", + symbol: "Ϙ", + isBaseResource: true, + effect: amount => Math.pow(10, amount / 2500), + tier: 2, + uiOrder: 3.5, + unlockedAt: 7, + description: "increases Relic Shard gain", + formatEffect: value => `Relic Shard gain is multiplied ${formatX(value, 2, 2)}` + }, + "synergism": { + id: ALCHEMY_RESOURCE.SYNERGISM, + name: "Synergism", + symbol: "π", + isBaseResource: false, + effect: amount => Math.clampMax(0.3 + Math.sqrt(amount / 15000), 1), + tier: 3, + uiOrder: 2, + unlockedAt: 13, + description: "increases the effectiveness of Alchemy Reactions", + formatEffect(value) { + const baseEffect = `Alchemy reaction efficiency ${formatPercents(0.3)} ➜ ${formatPercents(value, 2, 2)}`; + if (player.reality.glyphs.sac.reality === 0) { + return baseEffect; + } + const increasedYield = formatPercents(value * Effects.sum(GlyphSacrifice.reality), 2, 2); + return `${baseEffect} (${increasedYield} after Glyph Sacrifice)`; }, + reagents: [ + { + resource: ALCHEMY_RESOURCE.EFFARIG, + amount: 3 + }, + { + resource: ALCHEMY_RESOURCE.REPLICATION, + amount: 16 + }, + { + resource: ALCHEMY_RESOURCE.INFINITY, + amount: 14 + } + ] + }, + "momentum": { + id: ALCHEMY_RESOURCE.MOMENTUM, + name: "Momentum", + symbol: "μ", + isBaseResource: false, + effect: amount => 1 + amount / 125000, + tier: 3, + uiOrder: 3, + unlockedAt: 15, + description: "provides a multiplier to all dimensions based on real time since unlock", + formatEffect: value => `All Dimensions ${formatPow(Ra.momentumValue, 4, 4)}, increasing by + ${format(0.002 * Achievement(175).effectOrDefault(1), 3, 3)} + per real-time hour after the resource is unlocked, up to a maximum of ${formatPow(value, 4, 4)}`, + reagents: [ + { + resource: ALCHEMY_RESOURCE.EFFARIG, + amount: 11 + }, + { + resource: ALCHEMY_RESOURCE.POWER, + amount: 4 + }, + { + resource: ALCHEMY_RESOURCE.TIME, + amount: 20 + } + ] + }, + "decoherence": { + id: ALCHEMY_RESOURCE.DECOHERENCE, + name: "Decoherence", + symbol: "ξ", + isBaseResource: false, + effect: amount => 0.10 * Math.sqrt(amount / 10000), + tier: 3, + uiOrder: 4, + unlockedAt: 14, + description: "causes refining to give all basic Alchemy Resources", + formatEffect: value => `Refined Glyphs also give ${formatPercents(value, 2)} of their value ` + + "to all other base resources", + reagents: [ + { + resource: ALCHEMY_RESOURCE.EFFARIG, + amount: 13 + }, + { + resource: ALCHEMY_RESOURCE.ALTERNATION, + amount: 8 + } + ] + }, - // T5 (Reality) - [ALCHEMY_RESOURCE.REALITY]: { - name: "Reality", - symbol: "Ϟ", - isBaseResource: false, - effect: amount => Math.floor(amount), - tier: 5, - unlockedAt: 25, - description: "allows creation of Reality Glyphs", - formatEffect: value => `Consume all Reality resource to create a level ${formatInt(value)} Reality Glyph`, - reagents: [ - { - resource: ALCHEMY_RESOURCE.EXPONENTIAL, - amount: 1 - }, - { - resource: ALCHEMY_RESOURCE.FORCE, - amount: 1 - }, - { - resource: ALCHEMY_RESOURCE.UNCOUNTABILITY, - amount: 1 - }, - { - resource: ALCHEMY_RESOURCE.BOUNDLESS, - amount: 1 - }, - { - resource: ALCHEMY_RESOURCE.MULTIVERSAL, - amount: 1 - }, - { - resource: ALCHEMY_RESOURCE.UNPREDICTABILITY, - amount: 1 - } - ] - }, + // T4 resources (resources which feed directly into the final resource) + "exponential": { + id: ALCHEMY_RESOURCE.EXPONENTIAL, + name: "Exponential", + symbol: "Γ", + isBaseResource: false, + effect: amount => 10 * Math.pow(amount / 10000, 2), + tier: 4, + uiOrder: 2, + unlockedAt: 18, + description: "multiplies Infinity Points by Replicanti", + formatEffect: value => `Infinity Points multiplied by Replicanti${formatPow(value, 2, 3)}`, + reagents: [ + { + resource: ALCHEMY_RESOURCE.INFLATION, + amount: 18 + }, + { + resource: ALCHEMY_RESOURCE.SYNERGISM, + amount: 3 + } + ] + }, + "force": { + id: ALCHEMY_RESOURCE.FORCE, + name: "Force", + symbol: "Φ", + isBaseResource: false, + effect: amount => 5 * amount, + tier: 4, + uiOrder: 2, + unlockedAt: 17, + description: "multiplies Antimatter Dimensions by Reality Machines", + formatEffect: value => `Multiply Antimatter Dimensions by Reality Machines${formatPow(value, 2, 2)}`, + reagents: [ + { + resource: ALCHEMY_RESOURCE.DIMENSIONALITY, + amount: 7 + }, + { + resource: ALCHEMY_RESOURCE.MOMENTUM, + amount: 8 + } + ] + }, + "uncountability": { + id: ALCHEMY_RESOURCE.UNCOUNTABILITY, + name: "Uncountability", + symbol: "Θ", + isBaseResource: false, + effect: amount => Math.sqrt(amount), + tier: 4, + uiOrder: 3, + unlockedAt: 19, + description: "passively generates Realities and Perk Points", + formatEffect: value => `Generate ${format(value, 2, 2)} Realities and Perk Points per second`, + reagents: [ + { + resource: ALCHEMY_RESOURCE.INFINITY, + amount: 20 + }, + { + resource: ALCHEMY_RESOURCE.EFFARIG, + amount: 6 + }, + { + resource: ALCHEMY_RESOURCE.CARDINALITY, + amount: 16 + } + ] + }, + "boundless": { + id: ALCHEMY_RESOURCE.BOUNDLESS, + name: "Boundless", + symbol: "Π", + isBaseResource: false, + effect: amount => amount / 80000, + tier: 4, + uiOrder: 1, + unlockedAt: 20, + description: "makes Tesseracts stronger", + formatEffect: value => `Tesseracts are +${formatPercents(value, 2, 2)} stronger`, + reagents: [ + { + resource: ALCHEMY_RESOURCE.ETERNITY, + amount: 13 + }, + { + resource: ALCHEMY_RESOURCE.INFLATION, + amount: 18 + } + ] + }, + "multiversal": { + id: ALCHEMY_RESOURCE.MULTIVERSAL, + name: "Multiversal", + symbol: "Σ", + isBaseResource: false, + effect: amount => 5 * Math.pow(amount / 10000, 2), + tier: 4, + uiOrder: 5, + unlockedAt: 16, + description: "makes each Reality simulate more Realities", + formatEffect: value => `Each Reality simulates ${format(value, 2, 3)} additional Realities, giving all + the same rewards as if it was amplified`, + reagents: [ + { + resource: ALCHEMY_RESOURCE.ALTERNATION, + amount: 16 + }, + { + resource: ALCHEMY_RESOURCE.DECOHERENCE, + amount: 3 + } + ] + }, + "unpredictability": { + id: ALCHEMY_RESOURCE.UNPREDICTABILITY, + name: "Unpredictability", + symbol: "Λ", + isBaseResource: false, + effect: amount => amount / (10000 + amount), + tier: 4, + uiOrder: 4, + unlockedAt: 21, + description: "makes each Alchemy Reaction have a chance to happen twice", + formatEffect: value => `Any alchemy reaction has a ${formatPercents(value, 2, 2)} + chance of triggering again`, + reagents: [ + { + resource: ALCHEMY_RESOURCE.EFFARIG, + amount: 15 + }, + { + resource: ALCHEMY_RESOURCE.DECOHERENCE, + amount: 3 + }, + { + resource: ALCHEMY_RESOURCE.SYNERGISM, + amount: 10 + } + ] + }, + + // T5 (Reality) + "reality": { + id: ALCHEMY_RESOURCE.REALITY, + name: "Reality", + symbol: "Ϟ", + isBaseResource: false, + effect: amount => Math.floor(amount), + tier: 5, + unlockedAt: 25, + description: "allows creation of Reality Glyphs", + formatEffect: value => `Consume all Reality resource to create a level ${formatInt(value)} Reality Glyph`, + reagents: [ + { + resource: ALCHEMY_RESOURCE.EXPONENTIAL, + amount: 1 + }, + { + resource: ALCHEMY_RESOURCE.FORCE, + amount: 1 + }, + { + resource: ALCHEMY_RESOURCE.UNCOUNTABILITY, + amount: 1 + }, + { + resource: ALCHEMY_RESOURCE.BOUNDLESS, + amount: 1 + }, + { + resource: ALCHEMY_RESOURCE.MULTIVERSAL, + amount: 1 + }, + { + resource: ALCHEMY_RESOURCE.UNPREDICTABILITY, + amount: 1 + } + ] }, }; diff --git a/javascripts/core/secret-formula/game-database.js b/javascripts/core/secret-formula/game-database.js index 3bda43728..d400db021 100644 --- a/javascripts/core/secret-formula/game-database.js +++ b/javascripts/core/secret-formula/game-database.js @@ -10,6 +10,7 @@ export const GameDatabase = { glyphSacrifice: {}, }, celestials: { + alchemy: {}, pelle: {}, descriptions: {}, } From e83b5ff19719c48701e436cb3904420e4e1541a2 Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Wed, 18 May 2022 18:25:54 -0700 Subject: [PATCH 45/89] clean up effarig gamedatabase --- javascripts/core/celestials/effarig.js | 37 +----- .../core/secret-formula/celestials/effarig.js | 106 ++++++++++-------- .../core/secret-formula/game-database.js | 1 + 3 files changed, 66 insertions(+), 78 deletions(-) diff --git a/javascripts/core/celestials/effarig.js b/javascripts/core/celestials/effarig.js index 823a0984e..4e4ed474e 100644 --- a/javascripts/core/celestials/effarig.js +++ b/javascripts/core/celestials/effarig.js @@ -178,41 +178,14 @@ class EffarigUnlockState extends BitUpgradeState { purchase() { if (this.isUnlocked || !Currency.relicShards.purchase(this.cost)) return; this.unlock(); - switch (this) { - case EffarigUnlock.adjuster: - Effarig.quotes.show(Effarig.quotes.UNLOCK_WEIGHTS); - ui.view.tabs.reality.openGlyphWeights = true; - Tab.reality.glyphs.show(); - break; - case EffarigUnlock.glyphFilter: - Effarig.quotes.show(Effarig.quotes.UNLOCK_GLYPH_FILTER); - player.reality.showSidebarPanel = GLYPH_SIDEBAR_MODE.FILTER_SETTINGS; - break; - case EffarigUnlock.setSaves: - Effarig.quotes.show(Effarig.quotes.UNLOCK_SET_SAVES); - player.reality.showSidebarPanel = GLYPH_SIDEBAR_MODE.SAVED_SETS; - break; - case EffarigUnlock.run: - Effarig.quotes.show(Effarig.quotes.UNLOCK_RUN); - break; - default: - throw new Error("Unknown Effarig upgrade"); - } + this.config.onPurchased?.(); } } -export const EffarigUnlock = (function() { - const db = GameDatabase.celestials.effarig.unlocks; - return { - adjuster: new EffarigUnlockState(db.adjuster), - glyphFilter: new EffarigUnlockState(db.glyphFilter), - setSaves: new EffarigUnlockState(db.setSaves), - run: new EffarigUnlockState(db.run), - infinity: new EffarigUnlockState(db.infinity), - eternity: new EffarigUnlockState(db.eternity), - reality: new EffarigUnlockState(db.reality), - }; -}()); +export const EffarigUnlock = mapGameDataToObject( + GameDatabase.celestials.effarig.unlocks, + config => new EffarigUnlockState(config) +); EventHub.logic.on(GAME_EVENT.TAB_CHANGED, () => { if (Tab.celestials.effarig.isOpen) Effarig.quotes.show(Effarig.quotes.INITIAL); diff --git a/javascripts/core/secret-formula/celestials/effarig.js b/javascripts/core/secret-formula/celestials/effarig.js index 9c10719cf..408eef4d5 100644 --- a/javascripts/core/secret-formula/celestials/effarig.js +++ b/javascripts/core/secret-formula/celestials/effarig.js @@ -1,56 +1,70 @@ import { DC } from "../../constants"; import { GameDatabase } from "../game-database"; -GameDatabase.celestials.effarig = { - unlocks: { - adjuster: { - id: 0, - description: "Adjustable Glyph level factor weights", - cost: 1e7 - }, - glyphFilter: { - id: 1, - description: "Glyph Filtering", - cost: 2e8 - }, - setSaves: { - id: 2, - description: "Glyph Set Saves", - cost: 3e9 - }, - run: { - id: 3, - description: "Effarig's Reality", - cost: 5e11 - }, - infinity: { - id: 4, - label: "Infinity", - get description() { - if (Pelle.isDoomed) return "Any rewards from Effarig's Infinity have been disabled."; - return ` Infinities raise the Replicanti cap +GameDatabase.celestials.effarig.unlocks = { + adjuster: { + id: 0, + description: "Adjustable Glyph level factor weights", + cost: 1e7, + onPurchased: () => { + Effarig.quotes.show(Effarig.quotes.UNLOCK_WEIGHTS); + ui.view.tabs.reality.openGlyphWeights = true; + Tab.reality.glyphs.show(); + } + }, + glyphFilter: { + id: 1, + description: "Glyph Filtering", + cost: 2e8, + onPurchased: () => { + Effarig.quotes.show(Effarig.quotes.UNLOCK_GLYPH_FILTER); + player.reality.showSidebarPanel = GLYPH_SIDEBAR_MODE.FILTER_SETTINGS; + } + }, + setSaves: { + id: 2, + description: "Glyph Set Saves", + cost: 3e9, + onPurchased: () => { + Effarig.quotes.show(Effarig.quotes.UNLOCK_SET_SAVES); + player.reality.showSidebarPanel = GLYPH_SIDEBAR_MODE.SAVED_SETS; + } + }, + run: { + id: 3, + description: "Effarig's Reality", + cost: 5e11, + onPurchased: () => { + Effarig.quotes.show(Effarig.quotes.UNLOCK_RUN); + } + }, + infinity: { + id: 4, + label: "Infinity", + get description() { + if (Pelle.isDoomed) return "Any rewards from Effarig's Infinity have been disabled."; + return ` Infinities raise the Replicanti cap Infinities increase your max Replicanti Galaxies Base Infinity Point gain is capped at ${format(DC.E200)} in Effarig's Reality Each type of Infinity Point multiplier is capped at ${format(DC.E50)} in Effarig's Reality`; - }, }, - eternity: { - id: 5, - label: "Eternity", - get description() { - if (Pelle.isDoomed) return "Any rewards from Effarig's Eternity have been disabled."; - return ` Eternities generates Infinities - Infinity Points are no longer limited in any way in Effarig's Reality - You have unlocked The Enslaved Ones`; - }, + }, + eternity: { + id: 5, + label: "Eternity", + get description() { + if (Pelle.isDoomed) return "Any rewards from Effarig's Eternity have been disabled."; + return ` Eternities generates Infinities + Infinity Points are no longer limited in any way in Effarig's Reality + You have unlocked The Enslaved Ones`; + }, + }, + reality: { + id: 6, + label: "Reality", + get description() { + if (Pelle.isDoomed) return "Any rewards from Effarig's Reality have been disabled."; + return " You have unlocked Effarig Glyphs (You may equip at most one)"; }, - reality: { - id: 6, - label: "Reality", - get description() { - if (Pelle.isDoomed) return "Any rewards from Effarig's Reality have been disabled."; - return " You have unlocked Effarig Glyphs (You may equip at most one)"; - }, - } } }; diff --git a/javascripts/core/secret-formula/game-database.js b/javascripts/core/secret-formula/game-database.js index d400db021..392cde6c3 100644 --- a/javascripts/core/secret-formula/game-database.js +++ b/javascripts/core/secret-formula/game-database.js @@ -10,6 +10,7 @@ export const GameDatabase = { glyphSacrifice: {}, }, celestials: { + effarig: {}, alchemy: {}, pelle: {}, descriptions: {}, From a9a020abea5923152e751e79125e6bd1ee240f19 Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Wed, 18 May 2022 18:30:18 -0700 Subject: [PATCH 46/89] clean up enslaved gamedatabase --- javascripts/core/celestials/enslaved.js | 17 ++++------------- .../core/secret-formula/celestials/enslaved.js | 7 ++++--- src/components/modals/EnslavedHintsModal.vue | 6 +++--- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/javascripts/core/celestials/enslaved.js b/javascripts/core/celestials/enslaved.js index bf34196ec..a16b3cd3f 100644 --- a/javascripts/core/celestials/enslaved.js +++ b/javascripts/core/celestials/enslaved.js @@ -266,19 +266,10 @@ class EnslavedProgressState extends BitUpgradeState { } } -export const EnslavedProgress = (function() { - const db = GameDatabase.celestials.enslaved.progress; - return { - hintsUnlocked: new EnslavedProgressState(db.hintsUnlocked), - ec1: new EnslavedProgressState(db.ec1), - feelEternity: new EnslavedProgressState(db.feelEternity), - ec6: new EnslavedProgressState(db.ec6), - c10: new EnslavedProgressState(db.c10), - secretStudy: new EnslavedProgressState(db.secretStudy), - storedTime: new EnslavedProgressState(db.storedTime), - challengeCombo: new EnslavedProgressState(db.challengeCombo), - }; -}()); +export const EnslavedProgress = mapGameDataToObject( + GameDatabase.celestials.enslaved.progress, + config => new EnslavedProgressState(config) +); export const Tesseracts = { get bought() { diff --git a/javascripts/core/secret-formula/celestials/enslaved.js b/javascripts/core/secret-formula/celestials/enslaved.js index e3305e9a7..d77c655b6 100644 --- a/javascripts/core/secret-formula/celestials/enslaved.js +++ b/javascripts/core/secret-formula/celestials/enslaved.js @@ -60,7 +60,8 @@ GameDatabase.celestials.enslaved = { glyphHints: [ "Infinity and Dilation Glyphs seem confined too tightly to be useful at all.", "Power and Time Glyphs are particularly strong here.", - "Effarig Glyphs are only useful with the right effects, but you can complete the Reality without one. " + - "A Replication Glyph is very helpful, but it's not strictly necessary or quite as strong " + - "as Power and Time."] + `Effarig Glyphs are only useful with the right effects, but you can complete the Reality without one. + A Replication Glyph is very helpful, but it's not strictly necessary or quite as strong + as Power and Time.` + ] }; diff --git a/src/components/modals/EnslavedHintsModal.vue b/src/components/modals/EnslavedHintsModal.vue index 754a1f152..92cab4207 100644 --- a/src/components/modals/EnslavedHintsModal.vue +++ b/src/components/modals/EnslavedHintsModal.vue @@ -62,8 +62,8 @@ export default { this.canGetHint = this.currentStored >= this.nextHintCost; this.shownEntries = []; - this.realityHintsLeft = Object.values(EnslavedProgress).length; - for (const prog of Object.values(EnslavedProgress)) { + this.realityHintsLeft = EnslavedProgress.all.length; + for (const prog of EnslavedProgress.all) { if (prog.hasHint) { this.shownEntries.push([prog.hasProgress ? prog.config.progress @@ -82,7 +82,7 @@ export default { }, giveRealityHint(available) { if (available <= 0 || !Enslaved.spendTimeForHint()) return; - Object.values(EnslavedProgress).filter(prog => !prog.hasHint).randomElement().unlock(); + EnslavedProgress.all.filter(prog => !prog.hasHint).randomElement().unlock(); }, giveGlyphHint(available) { if (available <= 0 || !Enslaved.spendTimeForHint()) return; From 80d736d978c6c25603033dd38de9b047ded15165 Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Wed, 18 May 2022 19:23:08 -0700 Subject: [PATCH 47/89] drop unneeded IIFEs in gamedatabase declarations --- .../core/automator/automator-points.js | 30 +- .../celestials/galaxy-generator.js | 121 +- .../secret-formula/celestials/navigation.js | 3105 ++++++++--------- .../celestials/pelle-upgrades.js | 369 +- .../secret-formula/celestials/perk-shop.js | 165 +- .../eternity/dilation-upgrades.js | 369 +- .../time-studies/normal-time-studies.js | 1322 +++---- .../reality/imaginary-upgrades.js | 579 ++- .../reality/reality-upgrades.js | 676 ++-- 9 files changed, 3364 insertions(+), 3372 deletions(-) diff --git a/javascripts/core/automator/automator-points.js b/javascripts/core/automator/automator-points.js index 53993b9c5..d994f6ef4 100644 --- a/javascripts/core/automator/automator-points.js +++ b/javascripts/core/automator/automator-points.js @@ -35,19 +35,17 @@ export const AutomatorPoints = { } }; -GameDatabase.reality.otherAutomatorPoints = (function() { - return [ - { - name: "Reality Count", - automatorPoints: () => 2 * Math.clampMax(Currency.realities.value, 100), - shortDescription: () => `+${formatInt(2)} per Reality, up to ${formatInt(100)} Realities`, - symbol: "Ϟ", - }, - { - name: "Black Hole", - automatorPoints: () => (BlackHole(1).isUnlocked ? 10 : 0), - shortDescription: () => `Unlocking gives ${formatInt(10)} AP`, - symbol: "", - }, - ]; -}()); +GameDatabase.reality.otherAutomatorPoints = [ + { + name: "Reality Count", + automatorPoints: () => 2 * Math.clampMax(Currency.realities.value, 100), + shortDescription: () => `+${formatInt(2)} per Reality, up to ${formatInt(100)} Realities`, + symbol: "Ϟ", + }, + { + name: "Black Hole", + automatorPoints: () => (BlackHole(1).isUnlocked ? 10 : 0), + shortDescription: () => `Unlocking gives ${formatInt(10)} AP`, + symbol: "", + }, +]; diff --git a/javascripts/core/secret-formula/celestials/galaxy-generator.js b/javascripts/core/secret-formula/celestials/galaxy-generator.js index 3d6fbe98a..0cfbd57ac 100644 --- a/javascripts/core/secret-formula/celestials/galaxy-generator.js +++ b/javascripts/core/secret-formula/celestials/galaxy-generator.js @@ -1,66 +1,65 @@ import { GameDatabase } from "../game-database"; -GameDatabase.celestials.pelle.galaxyGeneratorUpgrades = (function() { - const formatCost = c => format(c, 2); +const formatCost = c => format(c, 2); - const rebuyable = config => { - const { id, description, cost, effect, formatEffect, currency, currencyLabel } = config; - return { - id, - description, - cost: () => cost(player.celestials.pelle.rebuyables[id]), - formatCost, - effect: (x = player.celestials.pelle.rebuyables[id]) => effect(x), - formatEffect, - currency, - currencyLabel - }; - }; +const rebuyable = config => { + const { id, description, cost, effect, formatEffect, currency, currencyLabel } = config; return { - additive: rebuyable({ - id: "galaxyGeneratorAdditive", - description: "Increase base Galaxy generation by 2", - cost: x => Math.pow(3, x), - effect: x => x * 2, - formatEffect: x => `${format(x, 2, 2)}/s`, - currency: () => Currency.galaxyGeneratorGalaxies, - currencyLabel: "Galaxy" - }), - multiplicative: rebuyable({ - id: "galaxyGeneratorMultiplicative", - description: "Multiply Galaxy generation", - cost: x => Math.pow(10, x), - effect: x => Decimal.pow(2.5, x), - formatEffect: x => formatX(x, 2, 1), - currency: () => Currency.galaxyGeneratorGalaxies, - currencyLabel: "Galaxy" - }), - antimatterMult: rebuyable({ - id: "galaxyGeneratorAntimatterMult", - description: "Multiply Galaxy generation", - cost: x => Decimal.pow("1e100000000", 10 ** x), - effect: x => Decimal.pow(2, x), - formatEffect: x => formatX(x, 2), - currency: () => Currency.antimatter, - currencyLabel: "Antimatter" - }), - IPMult: rebuyable({ - id: "galaxyGeneratorIPMult", - description: "Multiply Galaxy generation", - cost: x => Decimal.pow("1e2000000", 100 ** x), - effect: x => Decimal.pow(2, x), - formatEffect: x => formatX(x, 2), - currency: () => Currency.infinityPoints, - currencyLabel: "Infinity Point" - }), - EPMult: rebuyable({ - id: "galaxyGeneratorEPMult", - description: "Multiply Galaxy generation", - cost: x => Decimal.pow("1e10000", 1000 ** x), - effect: x => Decimal.pow(2, x), - formatEffect: x => formatX(x, 2), - currency: () => Currency.eternityPoints, - currencyLabel: "Eternity Point" - }), + id, + description, + cost: () => cost(player.celestials.pelle.rebuyables[id]), + formatCost, + effect: (x = player.celestials.pelle.rebuyables[id]) => effect(x), + formatEffect, + currency, + currencyLabel }; -}()); +}; + +GameDatabase.celestials.pelle.galaxyGeneratorUpgrades = { + additive: rebuyable({ + id: "galaxyGeneratorAdditive", + description: "Increase base Galaxy generation by 2", + cost: x => Math.pow(3, x), + effect: x => x * 2, + formatEffect: x => `${format(x, 2, 2)}/s`, + currency: () => Currency.galaxyGeneratorGalaxies, + currencyLabel: "Galaxy" + }), + multiplicative: rebuyable({ + id: "galaxyGeneratorMultiplicative", + description: "Multiply Galaxy generation", + cost: x => Math.pow(10, x), + effect: x => Decimal.pow(2.5, x), + formatEffect: x => formatX(x, 2, 1), + currency: () => Currency.galaxyGeneratorGalaxies, + currencyLabel: "Galaxy" + }), + antimatterMult: rebuyable({ + id: "galaxyGeneratorAntimatterMult", + description: "Multiply Galaxy generation", + cost: x => Decimal.pow("1e100000000", 10 ** x), + effect: x => Decimal.pow(2, x), + formatEffect: x => formatX(x, 2), + currency: () => Currency.antimatter, + currencyLabel: "Antimatter" + }), + IPMult: rebuyable({ + id: "galaxyGeneratorIPMult", + description: "Multiply Galaxy generation", + cost: x => Decimal.pow("1e2000000", 100 ** x), + effect: x => Decimal.pow(2, x), + formatEffect: x => formatX(x, 2), + currency: () => Currency.infinityPoints, + currencyLabel: "Infinity Point" + }), + EPMult: rebuyable({ + id: "galaxyGeneratorEPMult", + description: "Multiply Galaxy generation", + cost: x => Decimal.pow("1e10000", 1000 ** x), + effect: x => Decimal.pow(2, x), + formatEffect: x => formatX(x, 2), + currency: () => Currency.eternityPoints, + currencyLabel: "Eternity Point" + }), +}; diff --git a/javascripts/core/secret-formula/celestials/navigation.js b/javascripts/core/secret-formula/celestials/navigation.js index 69328ee3c..7b3a2c75e 100644 --- a/javascripts/core/secret-formula/celestials/navigation.js +++ b/javascripts/core/secret-formula/celestials/navigation.js @@ -29,1642 +29,1641 @@ export const CELESTIAL_NAV_DRAW_ORDER = { NODE_OVERLAYS: 3000, }; -GameDatabase.celestials.navigation = (function() { - const Positions = Object.freeze({ - teresa: new Vector(100, 100), - teresaPerkPointShop: new Vector(0, -50), +const Positions = Object.freeze({ + teresa: new Vector(100, 100), + teresaPerkPointShop: new Vector(0, -50), - effarigShop: new Vector(300, 0), - effarigRealityUnlock: new Vector(400, 50), - effarigNode: new Vector(550, 25), + effarigShop: new Vector(300, 0), + effarigRealityUnlock: new Vector(400, 50), + effarigNode: new Vector(550, 25), - enslavedReality: new Vector(650, 250), - enslavedGlyphLevel: new Vector(650 + 75 * Math.cos(Math.PI / 180 * -60), 250 + 75 * Math.sin(Math.PI / 180 * -60)), - enslavedGlyphRarity: new Vector(650 + 75 * Math.cos(Math.PI / 180 * 120), 250 + 75 * Math.sin(Math.PI / 180 * 120)), + enslavedReality: new Vector(650, 250), + enslavedGlyphLevel: new Vector(650 + 75 * Math.cos(Math.PI / 180 * -60), 250 + 75 * Math.sin(Math.PI / 180 * -60)), + enslavedGlyphRarity: new Vector(650 + 75 * Math.cos(Math.PI / 180 * 120), 250 + 75 * Math.sin(Math.PI / 180 * 120)), - vUnlockAchievement: new Vector(400, 350 + 50 * Math.sqrt(3)), - vAchievement0: new Vector(350, 350), - vAchievement1: new Vector(450, 350), - vAchievement2: new Vector(500, 350 + 50 * Math.sqrt(3)), - vAchievement3: new Vector(450, 350 + 100 * Math.sqrt(3)), - vAchievement4: new Vector(350, 350 + 100 * Math.sqrt(3)), - vAchievement5: new Vector(300, 350 + 50 * Math.sqrt(3)), + vUnlockAchievement: new Vector(400, 350 + 50 * Math.sqrt(3)), + vAchievement0: new Vector(350, 350), + vAchievement1: new Vector(450, 350), + vAchievement2: new Vector(500, 350 + 50 * Math.sqrt(3)), + vAchievement3: new Vector(450, 350 + 100 * Math.sqrt(3)), + vAchievement4: new Vector(350, 350 + 100 * Math.sqrt(3)), + vAchievement5: new Vector(300, 350 + 50 * Math.sqrt(3)), - raReality: new Vector(400, 200), - raPetTeresa: new Vector(400 + 85 * Math.sin(Math.PI / 180 * 252), 200 + 85 * Math.cos(Math.PI / 180 * 252)), - raPetEffarig: new Vector(400 + 85 * Math.sin(Math.PI / 180 * 140), 200 + 85 * Math.cos(Math.PI / 180 * 140)), - raPetEnslaved: new Vector(400 + 85 * Math.sin(Math.PI / 180 * 78), 200 + 85 * Math.cos(Math.PI / 180 * 78)), - raPetV: new Vector(400 + 85 * Math.sin(Math.PI / 180 * 0), 200 + 85 * Math.cos(Math.PI / 180 * 0)), + raReality: new Vector(400, 200), + raPetTeresa: new Vector(400 + 85 * Math.sin(Math.PI / 180 * 252), 200 + 85 * Math.cos(Math.PI / 180 * 252)), + raPetEffarig: new Vector(400 + 85 * Math.sin(Math.PI / 180 * 140), 200 + 85 * Math.cos(Math.PI / 180 * 140)), + raPetEnslaved: new Vector(400 + 85 * Math.sin(Math.PI / 180 * 78), 200 + 85 * Math.cos(Math.PI / 180 * 78)), + raPetV: new Vector(400 + 85 * Math.sin(Math.PI / 180 * 0), 200 + 85 * Math.cos(Math.PI / 180 * 0)), - laitelaFirstCenter: new Vector(150, 450), - laitelaFirstLeft: new Vector(100, 500), - laitelaFirstRight: new Vector(200, 500), - laitelaSecondCenter: new Vector(150, 550), - laitelaSecondLeft: new Vector(100, 600), - laitelaSecondRight: new Vector(200, 600), - laitelaThirdCenter: new Vector(150, 650), - }); - return { - "teresa-base": { - visible: () => true, - complete: () => 1, - node: { - clickAction: () => Tab.celestials.teresa.show(true), - completeClass: "c-celestial-nav__test-complete", - incompleteClass: "c-celestial-nav__test-incomplete", - position: Positions.teresa, - ring: { - rMajor: 78, - rMinor: 64, - }, - legend: { - text: "Teresa", - angle: 135, - diagonal: 32, - horizontal: 16, - }, - }, - }, - "teresa-reality-unlock": { - visible: () => true, - complete: () => (TeresaUnlocks.run.canBeApplied - ? 1 : Decimal.pLog10(Teresa.pouredAmount) / Math.log10(TeresaUnlocks.run.price)), - node: { - completeClass: "c-celestial-nav__test-complete", - incompleteClass: "c-celestial-nav__test-incomplete", - position: Positions.teresa, - ring: { - rMajor: 32, - rMinor: 22, - }, - legend: { - hideWhenCompleted: true, - text: () => { - const rm = Teresa.pouredAmount; - const cost = TeresaUnlocks.run.price; - return `Pour ${format(rm, 2)} / ${format(cost, 2)} RM`; - }, - angle: 135, - diagonal: 16, - horizontal: 16, - }, - }, - connector: (function() { - const pathStart = -Math.PI; - const pathEnd = Math.PI; - const path = LogarithmicSpiral.fromPolarEndpoints(Positions.teresa, -Math.PI, 69, Math.PI, 26); - const pathPadStart = path.angleFromRadius(64 - 3) - pathStart; - const pathPadEnd = pathEnd - path.angleFromRadius(34); - return { - pathStart, - pathEnd, - path, - pathPadStart, - pathPadEnd, - }; - }()), - }, - "teresa-reality": { - visible: () => true, - complete: () => (Teresa.runCompleted ? 1 : 0), - node: { - clickAction: () => Tab.celestials.teresa.show(true), - completeClass: "c-celestial-nav__test-complete", - incompleteClass: "c-celestial-nav__test-incomplete", - symbol: "Ϟ", - position: Positions.teresa, - ring: { - rMajor: 16, - }, - alwaysShowLegend: true, - legend: { - text: "Teresa's Reality", - angle: -135, - diagonal: 96, - horizontal: 16, - }, - } - }, - "teresa-pp-shop": { - visible: () => true, - complete: () => (TeresaUnlocks.shop.canBeApplied - ? 1 : Decimal.pLog10(Teresa.pouredAmount) / Math.log10(TeresaUnlocks.shop.price)), - node: { - clickAction: () => Tab.celestials.teresa.show(true), - completeClass: "c-celestial-nav__test-complete", - incompleteClass: "c-celestial-nav__test-incomplete", - position: Positions.teresaPerkPointShop, - ring: { - rMajor: 16, - rMinor: 0, - }, - legend: { - text: complete => { - if (complete >= 1) return "Perk Point Shop"; - const rm = Teresa.pouredAmount; - const cost = TeresaUnlocks.shop.price; - return [ - "Perk Point Shop", - `Pour ${format(rm, 2)} / ${format(cost, 2)} Reality Machines` - ]; - }, - angle: -35, - diagonal: 16, - horizontal: 16, - }, - }, - connector: { - pathStart: 0, - pathEnd: 1, - path: LinearPath.connectCircles(Positions.teresa, 78 - 1, Positions.teresaPerkPointShop, 16 - 1), - completeWidth: 6, - incompleteWidth: 4, - } - }, - "effarig-shop": { - visible: () => true, - complete: () => (TeresaUnlocks.effarig.canBeApplied - ? 1 : Decimal.pLog10(Teresa.pouredAmount) / Math.log10(TeresaUnlocks.effarig.price)), - node: { - clickAction: () => Tab.celestials.effarig.show(true), - completeClass: "c-celestial-nav__effarig", - incompleteClass: "c-celestial-nav__test-incomplete", - position: Positions.effarigShop, - ring: { - rMajor: 24, - }, - legend: { - text: complete => { - if (complete >= 1) return "Effarig's Shop"; - const rm = Teresa.pouredAmount; - const cost = TeresaUnlocks.effarig.price; - return [ - "Effarig", - `Pour ${format(rm, 2)} / ${format(cost, 2)} Reality Machines` - ]; - }, - angle: -135, - diagonal: 16, - horizontal: 16, - }, - }, - connector: { - pathStart: 0, - pathEnd: 1, - path: LinearPath.connectCircles(Positions.teresa, 78 - 1, Positions.effarigShop, 24 - 1), - fill: "url(#gradTeresaEffarig)", - } - }, - "effarig-reality-unlock": { - visible: () => TeresaUnlocks.effarig.canBeApplied, - // If the upgrade to unlock the reality isn't yet bought, clamp the progress at 99.9%, - // even if the player has enough relic shards to buy it. - complete: () => (EffarigUnlock.run.isUnlocked - ? 1 : Math.clampMax(0.999, Decimal.pLog10(Currency.relicShards.value) / - Math.log10(EffarigUnlock.run.cost))), - node: { - clickAction: () => Tab.celestials.effarig.show(true), - completeClass: "c-celestial-nav__effarig", - incompleteClass: "c-celestial-nav__test-incomplete", - position: Positions.effarigRealityUnlock, - ring: { - rMajor: 16, - }, - legend: { - text: complete => { - if (complete >= 1) return "Unlock Effarig's Reality"; - const rs = Currency.relicShards.value; - const cost = EffarigUnlock.run.cost; - return [ - "Unlock Effarig's Reality", - `Reach ${format(rs, 2)} / ${format(cost, 2)} Relic Shards` - ]; - }, - angle: 75, - diagonal: 40, - horizontal: 16, - }, - }, - connector: { - pathStart: 0, - pathEnd: 1, - path: LinearPath.connectCircles(Positions.effarigShop, 24 - 1, Positions.effarigRealityUnlock, 16 - 1), - fill: "#d13737", - } - }, - "effarig-infinity": { - visible: () => EffarigUnlock.run.isUnlocked, - complete: () => { - if (EffarigUnlock.infinity.isUnlocked) return 1; - if (!Effarig.isRunning) return 0; + laitelaFirstCenter: new Vector(150, 450), + laitelaFirstLeft: new Vector(100, 500), + laitelaFirstRight: new Vector(200, 500), + laitelaSecondCenter: new Vector(150, 550), + laitelaSecondLeft: new Vector(100, 600), + laitelaSecondRight: new Vector(200, 600), + laitelaThirdCenter: new Vector(150, 650), +}); - return Currency.antimatter.value.pLog10() / Decimal.NUMBER_MAX_VALUE.log10(); +GameDatabase.celestials.navigation = { + "teresa-base": { + visible: () => true, + complete: () => 1, + node: { + clickAction: () => Tab.celestials.teresa.show(true), + completeClass: "c-celestial-nav__test-complete", + incompleteClass: "c-celestial-nav__test-incomplete", + position: Positions.teresa, + ring: { + rMajor: 78, + rMinor: 64, }, - node: { - clickAction: () => Tab.celestials.effarig.show(true), - completeClass: "c-celestial-nav__effarig", - incompleteClass: "c-celestial-nav__test-incomplete", - position: Positions.effarigNode, - ring: { - rMajor: 60, - rMinor: 52, - }, - legend: { - text: complete => { - if (complete >= 1) return "Effarig's Infinity"; - if (complete === 0) return "Unlock Effarig's Reality"; - const am = Effarig.isRunning ? Currency.antimatter.value : 0; - return [ - "Effarig's Infinity", - `Reach ${format(am, 2)} / ${format(Number.MAX_VALUE, 2)}`, - "Antimatter inside Effarig's Reality." - ]; - }, - angle: 0, - diagonal: 100, - horizontal: 16, - }, - bgDrawOrder: CELESTIAL_NAV_DRAW_ORDER.NODE_BG + 750, + legend: { + text: "Teresa", + angle: 135, + diagonal: 32, + horizontal: 16, }, - connector: { - pathStart: 0, - pathEnd: 1, - path: LinearPath.connectCircles(Positions.effarigRealityUnlock, 16 - 1, Positions.effarigNode, 60 - 1), - fill: "#d13737", - } }, - "effarig-eternity": { - visible: () => EffarigUnlock.infinity.isUnlocked, - complete: () => { - if (EffarigUnlock.eternity.isUnlocked) return 1; - if (!Effarig.isRunning) return 0; + }, + "teresa-reality-unlock": { + visible: () => true, + complete: () => (TeresaUnlocks.run.canBeApplied + ? 1 : Decimal.pLog10(Teresa.pouredAmount) / Math.log10(TeresaUnlocks.run.price)), + node: { + completeClass: "c-celestial-nav__test-complete", + incompleteClass: "c-celestial-nav__test-incomplete", + position: Positions.teresa, + ring: { + rMajor: 32, + rMinor: 22, + }, + legend: { + hideWhenCompleted: true, + text: () => { + const rm = Teresa.pouredAmount; + const cost = TeresaUnlocks.run.price; + return `Pour ${format(rm, 2)} / ${format(cost, 2)} RM`; + }, + angle: 135, + diagonal: 16, + horizontal: 16, + }, + }, + connector: (function() { + const pathStart = -Math.PI; + const pathEnd = Math.PI; + const path = LogarithmicSpiral.fromPolarEndpoints(Positions.teresa, -Math.PI, 69, Math.PI, 26); + const pathPadStart = path.angleFromRadius(64 - 3) - pathStart; + const pathPadEnd = pathEnd - path.angleFromRadius(34); + return { + pathStart, + pathEnd, + path, + pathPadStart, + pathPadEnd, + }; + }()), + }, + "teresa-reality": { + visible: () => true, + complete: () => (Teresa.runCompleted ? 1 : 0), + node: { + clickAction: () => Tab.celestials.teresa.show(true), + completeClass: "c-celestial-nav__test-complete", + incompleteClass: "c-celestial-nav__test-incomplete", + symbol: "Ϟ", + position: Positions.teresa, + ring: { + rMajor: 16, + }, + alwaysShowLegend: true, + legend: { + text: "Teresa's Reality", + angle: -135, + diagonal: 96, + horizontal: 16, + }, + } + }, + "teresa-pp-shop": { + visible: () => true, + complete: () => (TeresaUnlocks.shop.canBeApplied + ? 1 : Decimal.pLog10(Teresa.pouredAmount) / Math.log10(TeresaUnlocks.shop.price)), + node: { + clickAction: () => Tab.celestials.teresa.show(true), + completeClass: "c-celestial-nav__test-complete", + incompleteClass: "c-celestial-nav__test-incomplete", + position: Positions.teresaPerkPointShop, + ring: { + rMajor: 16, + rMinor: 0, + }, + legend: { + text: complete => { + if (complete >= 1) return "Perk Point Shop"; + const rm = Teresa.pouredAmount; + const cost = TeresaUnlocks.shop.price; + return [ + "Perk Point Shop", + `Pour ${format(rm, 2)} / ${format(cost, 2)} Reality Machines` + ]; + }, + angle: -35, + diagonal: 16, + horizontal: 16, + }, + }, + connector: { + pathStart: 0, + pathEnd: 1, + path: LinearPath.connectCircles(Positions.teresa, 78 - 1, Positions.teresaPerkPointShop, 16 - 1), + completeWidth: 6, + incompleteWidth: 4, + } + }, + "effarig-shop": { + visible: () => true, + complete: () => (TeresaUnlocks.effarig.canBeApplied + ? 1 : Decimal.pLog10(Teresa.pouredAmount) / Math.log10(TeresaUnlocks.effarig.price)), + node: { + clickAction: () => Tab.celestials.effarig.show(true), + completeClass: "c-celestial-nav__effarig", + incompleteClass: "c-celestial-nav__test-incomplete", + position: Positions.effarigShop, + ring: { + rMajor: 24, + }, + legend: { + text: complete => { + if (complete >= 1) return "Effarig's Shop"; + const rm = Teresa.pouredAmount; + const cost = TeresaUnlocks.effarig.price; + return [ + "Effarig", + `Pour ${format(rm, 2)} / ${format(cost, 2)} Reality Machines` + ]; + }, + angle: -135, + diagonal: 16, + horizontal: 16, + }, + }, + connector: { + pathStart: 0, + pathEnd: 1, + path: LinearPath.connectCircles(Positions.teresa, 78 - 1, Positions.effarigShop, 24 - 1), + fill: "url(#gradTeresaEffarig)", + } + }, + "effarig-reality-unlock": { + visible: () => TeresaUnlocks.effarig.canBeApplied, + // If the upgrade to unlock the reality isn't yet bought, clamp the progress at 99.9%, + // even if the player has enough relic shards to buy it. + complete: () => (EffarigUnlock.run.isUnlocked + ? 1 : Math.clampMax(0.999, Decimal.pLog10(Currency.relicShards.value) / + Math.log10(EffarigUnlock.run.cost))), + node: { + clickAction: () => Tab.celestials.effarig.show(true), + completeClass: "c-celestial-nav__effarig", + incompleteClass: "c-celestial-nav__test-incomplete", + position: Positions.effarigRealityUnlock, + ring: { + rMajor: 16, + }, + legend: { + text: complete => { + if (complete >= 1) return "Unlock Effarig's Reality"; + const rs = Currency.relicShards.value; + const cost = EffarigUnlock.run.cost; + return [ + "Unlock Effarig's Reality", + `Reach ${format(rs, 2)} / ${format(cost, 2)} Relic Shards` + ]; + }, + angle: 75, + diagonal: 40, + horizontal: 16, + }, + }, + connector: { + pathStart: 0, + pathEnd: 1, + path: LinearPath.connectCircles(Positions.effarigShop, 24 - 1, Positions.effarigRealityUnlock, 16 - 1), + fill: "#d13737", + } + }, + "effarig-infinity": { + visible: () => EffarigUnlock.run.isUnlocked, + complete: () => { + if (EffarigUnlock.infinity.isUnlocked) return 1; + if (!Effarig.isRunning) return 0; - return Currency.infinityPoints.value.pLog10() / Decimal.NUMBER_MAX_VALUE.log10(); - }, - node: { - clickAction: () => Tab.celestials.effarig.show(true), - completeClass: "c-celestial-nav__effarig", - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#7131ec", - position: Positions.effarigNode, - ring: { - rMajor: 40, - rMinor: 30, - }, - legend: { - text: complete => { - if (complete >= 1) return "Effarig's Eternity"; - const ip = Effarig.isRunning ? Currency.infinityPoints.value : 0; - return [ - "Effarig's Eternity", - `Reach ${format(ip, 2)} / ${format(Number.MAX_VALUE, 2)}`, - "Infinity Points inside Effarig's Reality." - ]; - }, - angle: -45, - diagonal: 16, - horizontal: 16, - }, - }, - connector: (function() { - const pathStart = -Math.PI; - const pathEnd = 0; - const path = LogarithmicSpiral.fromPolarEndpoints(new Vector(560, 25), pathStart, 66, pathEnd, 26); - const pathPadStart = 0; - const pathPadEnd = pathEnd - path.angleFromRadius(30); - return { - pathStart, - pathEnd, - path, - pathPadStart, - pathPadEnd, - fill: "#d13737" - }; - }()) + return Currency.antimatter.value.pLog10() / Decimal.NUMBER_MAX_VALUE.log10(); }, - "effarig-reality": { - visible: () => EffarigUnlock.eternity.isUnlocked, - complete: () => { - if (EffarigUnlock.reality.isUnlocked) return 1; - if (!Effarig.isRunning) return 0; + node: { + clickAction: () => Tab.celestials.effarig.show(true), + completeClass: "c-celestial-nav__effarig", + incompleteClass: "c-celestial-nav__test-incomplete", + position: Positions.effarigNode, + ring: { + rMajor: 60, + rMinor: 52, + }, + legend: { + text: complete => { + if (complete >= 1) return "Effarig's Infinity"; + if (complete === 0) return "Unlock Effarig's Reality"; + const am = Effarig.isRunning ? Currency.antimatter.value : 0; + return [ + "Effarig's Infinity", + `Reach ${format(am, 2)} / ${format(Number.MAX_VALUE, 2)}`, + "Antimatter inside Effarig's Reality." + ]; + }, + angle: 0, + diagonal: 100, + horizontal: 16, + }, + bgDrawOrder: CELESTIAL_NAV_DRAW_ORDER.NODE_BG + 750, + }, + connector: { + pathStart: 0, + pathEnd: 1, + path: LinearPath.connectCircles(Positions.effarigRealityUnlock, 16 - 1, Positions.effarigNode, 60 - 1), + fill: "#d13737", + } + }, + "effarig-eternity": { + visible: () => EffarigUnlock.infinity.isUnlocked, + complete: () => { + if (EffarigUnlock.eternity.isUnlocked) return 1; + if (!Effarig.isRunning) return 0; - return Currency.eternityPoints.value.pLog10() / 4000; - }, - node: { - clickAction: () => Tab.celestials.effarig.show(true), - completeClass: "c-celestial-nav__effarig", - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#A101ec", - position: new Vector(550, 25), - ring: { - rMajor: 20, - rMinor: 0, - }, - symbol: "Ϙ", - alwaysShowLegend: true, - legend: { - text: complete => { - if (complete >= 1) return "Effarig's Reality"; - const ep = Effarig.isRunning ? Currency.eternityPoints.value : 0; - const goal = DC.E4000; - return [ - "Effarig's Reality", - `Reach ${format(ep, 2)} / ${format(goal, 2)}`, - "Eternity Points inside Effarig's Reality." - ]; - }, - angle: -120, - diagonal: 82, - horizontal: 16, - }, - }, - connector: (function() { - const pathStart = 0; - const pathEnd = Math.PI; - const path = LogarithmicSpiral.fromPolarEndpoints(new Vector(558, 25), pathStart, 26, pathEnd, 24); - const pathPadStart = 0; - const pathPadEnd = 0; - return { - pathStart, - pathEnd, - path, - pathPadStart, - pathPadEnd, - fill: "#d13737" - }; - }()) + return Currency.infinityPoints.value.pLog10() / Decimal.NUMBER_MAX_VALUE.log10(); }, - "enslaved": { - visible: () => EffarigUnlock.eternity.isUnlocked, - complete: () => (EffarigUnlock.eternity.isUnlocked ? 1 : 0), - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.enslaved.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffa337", - position: Positions.enslavedReality, - ring: { - rMajor: 80, - rMinor: 70, - gapCenterDeg: 15, - gapDeg: 200, - }, - alwaysShowLegend: false, - legend: { - text: "Enslaved", - angle: -90, - diagonal: 20, - horizontal: 16, - }, + node: { + clickAction: () => Tab.celestials.effarig.show(true), + completeClass: "c-celestial-nav__effarig", + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#7131ec", + position: Positions.effarigNode, + ring: { + rMajor: 40, + rMinor: 30, + }, + legend: { + text: complete => { + if (complete >= 1) return "Effarig's Eternity"; + const ip = Effarig.isRunning ? Currency.infinityPoints.value : 0; + return [ + "Effarig's Eternity", + `Reach ${format(ip, 2)} / ${format(Number.MAX_VALUE, 2)}`, + "Infinity Points inside Effarig's Reality." + ]; + }, + angle: -45, + diagonal: 16, + horizontal: 16, }, - connector: { - pathStart: 0, - pathEnd: 1, - drawOrder: CELESTIAL_NAV_DRAW_ORDER.NODE_BG + 500, - path: LinearPath.connectCircles(Positions.effarigNode, 40 - 1, Positions.enslavedReality, 80 - 1), - fill: "url(#gradEffarigEnslaved)", - } }, - "enslaved-unlock-glyph-level": { - visible: () => EffarigUnlock.eternity.isUnlocked, - complete: () => player.records.bestReality.glyphLevel / 5000, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.enslaved.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffa337", - position: Positions.enslavedGlyphLevel, - ring: { - rMajor: 24, - rMinor: 16, - gapCenterDeg: 40, - gapDeg: 60, - gapAngleDeg: 0, - }, - legend: { - text: complete => { - if (complete >= 1) return "Broken the chain with Glyph level"; - const goal = 5000; - return [ - "Break a chain", - `Reach Glyph level ${formatInt(Math.min(player.records.bestReality.glyphLevel, goal))}/${formatInt(goal)}` - ]; - }, - angle: -45, - diagonal: 16, - horizontal: 16, - }, - }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath( - new Vector(650 - 74 * Math.sqrt(0.75), 250 - 74 * 0.5), - Positions.enslavedGlyphLevel) - .trimEnd(23), - fill: "#ffa337", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "enslaved-unlock-glyph-rarity": { - visible: () => EffarigUnlock.eternity.isUnlocked, - complete: () => { - const bestRarity = strengthToRarity(player.records.bestReality.glyphStrength); - return bestRarity / 100; - }, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.enslaved.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffa337", - position: Positions.enslavedGlyphRarity, - ring: { - rMajor: 24, - rMinor: 16, - gapCenterDeg: 220, - gapDeg: 60, - gapAngleDeg: 0, - }, - legend: { - text: complete => { - if (complete >= 1) return "Broken the chain with Glyph rarity"; - const goal = 100; - return [ - "Break a chain", - `Reach Glyph rarity ${formatPercents(complete * goal / 100, 1)}/${formatPercents(goal / 100, 1)}` - ]; - }, - angle: 135, - diagonal: 32, - horizontal: 32, - }, - }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.enslavedGlyphRarity, Positions.enslavedGlyphLevel).trimStart(23).trimEnd(23), - fill: "#ffa337", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "enslaved-reality": { - visible: () => EffarigUnlock.eternity.isUnlocked, - complete: () => { - if (Enslaved.isCompleted) return 1; - if (!Enslaved.isRunning) return 0; + connector: (function() { + const pathStart = -Math.PI; + const pathEnd = 0; + const path = LogarithmicSpiral.fromPolarEndpoints(new Vector(560, 25), pathStart, 66, pathEnd, 26); + const pathPadStart = 0; + const pathPadEnd = pathEnd - path.angleFromRadius(30); + return { + pathStart, + pathEnd, + path, + pathPadStart, + pathPadEnd, + fill: "#d13737" + }; + }()) + }, + "effarig-reality": { + visible: () => EffarigUnlock.eternity.isUnlocked, + complete: () => { + if (EffarigUnlock.reality.isUnlocked) return 1; + if (!Effarig.isRunning) return 0; - return Currency.eternityPoints.value.pLog10() / 4000; - }, - node: { - clickAction: () => Tab.celestials.enslaved.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffa337", - position: Positions.enslavedReality, - ring: { - rMajor: 80, - rMinor: 70, - gapCenterDeg: 195, - gapDeg: 200, - }, - alwaysShowLegend: true, - legend: { - text: complete => { - if (complete >= 1) return "The Enslaved Ones' Reality"; - const ep = Enslaved.isRunning ? Currency.eternityPoints.value : 0; - const goal = DC.E4000; - return [ - "The Enslaved Ones' Reality", - `Reach ${format(ep, 2)} / ${format(goal, 2)}`, - "Eternity Points inside The Enslaved Ones' Reality." - ]; - }, - angle: 45, - diagonal: 16, - horizontal: 16, - }, - }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.enslavedGlyphRarity, new Vector(650 + 74 * Math.sqrt(0.75), 250 + 74 * 0.5)) - .trimStart(23), - fill: "#ffa337", - } + return Currency.eternityPoints.value.pLog10() / 4000; }, - "v-unlock-achievement": { - visible: () => EffarigUnlock.reality.isUnlocked, - complete: () => { - if (Achievement(151).isUnlocked) return 1; - if (!player.requirementChecks.infinity.noAD8) return 0; + node: { + clickAction: () => Tab.celestials.effarig.show(true), + completeClass: "c-celestial-nav__effarig", + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#A101ec", + position: new Vector(550, 25), + ring: { + rMajor: 20, + rMinor: 0, + }, + symbol: "Ϙ", + alwaysShowLegend: true, + legend: { + text: complete => { + if (complete >= 1) return "Effarig's Reality"; + const ep = Effarig.isRunning ? Currency.eternityPoints.value : 0; + const goal = DC.E4000; + return [ + "Effarig's Reality", + `Reach ${format(ep, 2)} / ${format(goal, 2)}`, + "Eternity Points inside Effarig's Reality." + ]; + }, + angle: -120, + diagonal: 82, + horizontal: 16, + }, + }, + connector: (function() { + const pathStart = 0; + const pathEnd = Math.PI; + const path = LogarithmicSpiral.fromPolarEndpoints(new Vector(558, 25), pathStart, 26, pathEnd, 24); + const pathPadStart = 0; + const pathPadEnd = 0; + return { + pathStart, + pathEnd, + path, + pathPadStart, + pathPadEnd, + fill: "#d13737" + }; + }()) + }, + "enslaved": { + visible: () => EffarigUnlock.eternity.isUnlocked, + complete: () => (EffarigUnlock.eternity.isUnlocked ? 1 : 0), + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.enslaved.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffa337", + position: Positions.enslavedReality, + ring: { + rMajor: 80, + rMinor: 70, + gapCenterDeg: 15, + gapDeg: 200, + }, + alwaysShowLegend: false, + legend: { + text: "Enslaved", + angle: -90, + diagonal: 20, + horizontal: 16, + }, + }, + connector: { + pathStart: 0, + pathEnd: 1, + drawOrder: CELESTIAL_NAV_DRAW_ORDER.NODE_BG + 500, + path: LinearPath.connectCircles(Positions.effarigNode, 40 - 1, Positions.enslavedReality, 80 - 1), + fill: "url(#gradEffarigEnslaved)", + } + }, + "enslaved-unlock-glyph-level": { + visible: () => EffarigUnlock.eternity.isUnlocked, + complete: () => player.records.bestReality.glyphLevel / 5000, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.enslaved.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffa337", + position: Positions.enslavedGlyphLevel, + ring: { + rMajor: 24, + rMinor: 16, + gapCenterDeg: 40, + gapDeg: 60, + gapAngleDeg: 0, + }, + legend: { + text: complete => { + if (complete >= 1) return "Broken the chain with Glyph level"; + const goal = 5000; + return [ + "Break a chain", + `Reach Glyph level ${formatInt(Math.min(player.records.bestReality.glyphLevel, goal))}/${formatInt(goal)}` + ]; + }, + angle: -45, + diagonal: 16, + horizontal: 16, + }, + }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath( + new Vector(650 - 74 * Math.sqrt(0.75), 250 - 74 * 0.5), + Positions.enslavedGlyphLevel) + .trimEnd(23), + fill: "#ffa337", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "enslaved-unlock-glyph-rarity": { + visible: () => EffarigUnlock.eternity.isUnlocked, + complete: () => { + const bestRarity = strengthToRarity(player.records.bestReality.glyphStrength); + return bestRarity / 100; + }, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.enslaved.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffa337", + position: Positions.enslavedGlyphRarity, + ring: { + rMajor: 24, + rMinor: 16, + gapCenterDeg: 220, + gapDeg: 60, + gapAngleDeg: 0, + }, + legend: { + text: complete => { + if (complete >= 1) return "Broken the chain with Glyph rarity"; + const goal = 100; + return [ + "Break a chain", + `Reach Glyph rarity ${formatPercents(complete * goal / 100, 1)}/${formatPercents(goal / 100, 1)}` + ]; + }, + angle: 135, + diagonal: 32, + horizontal: 32, + }, + }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.enslavedGlyphRarity, Positions.enslavedGlyphLevel).trimStart(23).trimEnd(23), + fill: "#ffa337", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "enslaved-reality": { + visible: () => EffarigUnlock.eternity.isUnlocked, + complete: () => { + if (Enslaved.isCompleted) return 1; + if (!Enslaved.isRunning) return 0; - return player.galaxies / 800; - }, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - symbol: "⌬", - symbolOffset: "2", - fill: "#ffe066", - position: Positions.vUnlockAchievement, - ring: { - rMajor: 20, - }, - alwaysShowLegend: true, - legend: { - text: complete => { - const goal = 800; - if (complete >= 1) return "V's Reality"; - const galaxies = player.requirementChecks.infinity.noAD8 ? player.galaxies : 0; - return [ - "V's unlock Achievement", - `Reach ${formatInt(galaxies)} / ${formatInt(goal)} Antimatter Galaxies without buying`, - "8th Antimatter Dimensions in your current Infinity" - ]; - }, - angle: 35, - diagonal: 60, - horizontal: 16, - }, - }, - connector: { - pathStart: 0, - pathEnd: 1, - path: LinearPath.connectCircles(Positions.enslavedReality, 80 - 1, Positions.vUnlockAchievement, 16 - 1), - fill: "url(#gradEnslavedV)", - completeWidth: 6, - incompleteWidth: 4, - } + return Currency.eternityPoints.value.pLog10() / 4000; }, - "v-unlock-1": { - visible: () => Achievement(151).isUnlocked || VUnlocks.vAchievementUnlock.isUnlocked, - complete: () => vUnlockProgress(1), - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffe066", - position: Positions.vAchievement1, - ring: { - rMajor: 8, - }, - legend: { - text: complete => vUnlockLegendLabel(complete, 1), - angle: -135, - diagonal: 16, - horizontal: 16, - }, + node: { + clickAction: () => Tab.celestials.enslaved.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffa337", + position: Positions.enslavedReality, + ring: { + rMajor: 80, + rMinor: 70, + gapCenterDeg: 195, + gapDeg: 200, }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.vUnlockAchievement, Positions.vAchievement1), - fill: "#ffe066", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "v-unlock-2": { - visible: () => Achievement(151).isUnlocked || VUnlocks.vAchievementUnlock.isUnlocked, - complete: () => vUnlockProgress(2), - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffe066", - position: Positions.vAchievement2, - ring: { - rMajor: 8, - }, - legend: { - text: complete => vUnlockLegendLabel(complete, 2), - angle: -135, - diagonal: 30, - horizontal: 16, + alwaysShowLegend: true, + legend: { + text: complete => { + if (complete >= 1) return "The Enslaved Ones' Reality"; + const ep = Enslaved.isRunning ? Currency.eternityPoints.value : 0; + const goal = DC.E4000; + return [ + "The Enslaved Ones' Reality", + `Reach ${format(ep, 2)} / ${format(goal, 2)}`, + "Eternity Points inside The Enslaved Ones' Reality." + ]; }, + angle: 45, + diagonal: 16, + horizontal: 16, }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.vUnlockAchievement, Positions.vAchievement2), - fill: "#ffe066", - completeWidth: 6, - incompleteWidth: 4, - } }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.enslavedGlyphRarity, new Vector(650 + 74 * Math.sqrt(0.75), 250 + 74 * 0.5)) + .trimStart(23), + fill: "#ffa337", + } + }, + "v-unlock-achievement": { + visible: () => EffarigUnlock.reality.isUnlocked, + complete: () => { + if (Achievement(151).isUnlocked) return 1; + if (!player.requirementChecks.infinity.noAD8) return 0; - "v-unlock-3": { - visible: () => Achievement(151).isUnlocked || VUnlocks.vAchievementUnlock.isUnlocked, - complete: () => vUnlockProgress(3), - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffe066", - position: Positions.vAchievement3, - ring: { - rMajor: 8, - }, - legend: { - text: complete => vUnlockLegendLabel(complete, 3), - angle: -135, - diagonal: 45, - horizontal: 16, - }, - }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.vUnlockAchievement, Positions.vAchievement3), - fill: "#ffe066", - completeWidth: 6, - incompleteWidth: 4, - } + return player.galaxies / 800; }, - "v-unlock-4": { - visible: () => Achievement(151).isUnlocked || VUnlocks.vAchievementUnlock.isUnlocked, - complete: () => vUnlockProgress(4), - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffe066", - position: Positions.vAchievement4, - ring: { - rMajor: 8, - }, - legend: { - text: complete => vUnlockLegendLabel(complete, 4), - angle: -135, - diagonal: 60, - horizontal: 16, - }, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + symbol: "⌬", + symbolOffset: "2", + fill: "#ffe066", + position: Positions.vUnlockAchievement, + ring: { + rMajor: 20, }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.vUnlockAchievement, Positions.vAchievement4), - fill: "#ffe066", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "v-unlock-5": { - visible: () => Achievement(151).isUnlocked || VUnlocks.vAchievementUnlock.isUnlocked, - complete: () => vUnlockProgress(5), - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffe066", - position: Positions.vAchievement5, - ring: { - rMajor: 8, - }, - legend: { - text: complete => vUnlockLegendLabel(complete, 5), - angle: -135, - diagonal: 75, - horizontal: 16, + alwaysShowLegend: true, + legend: { + text: complete => { + const goal = 800; + if (complete >= 1) return "V's Reality"; + const galaxies = player.requirementChecks.infinity.noAD8 ? player.galaxies : 0; + return [ + "V's unlock Achievement", + `Reach ${formatInt(galaxies)} / ${formatInt(goal)} Antimatter Galaxies without buying`, + "8th Antimatter Dimensions in your current Infinity" + ]; }, + angle: 35, + diagonal: 60, + horizontal: 16, }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.vUnlockAchievement, Positions.vAchievement5), - fill: "#ffe066", - completeWidth: 6, - incompleteWidth: 4, - } }, - "v-unlock-6": { - visible: () => Achievement(151).isUnlocked || VUnlocks.vAchievementUnlock.isUnlocked, - complete: () => vUnlockProgress(6), - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffe066", - position: Positions.vAchievement0, - ring: { - rMajor: 8, - }, - legend: { - text: complete => vUnlockLegendLabel(complete, 6), - angle: -135, - diagonal: 90, - horizontal: 16, - }, + connector: { + pathStart: 0, + pathEnd: 1, + path: LinearPath.connectCircles(Positions.enslavedReality, 80 - 1, Positions.vUnlockAchievement, 16 - 1), + fill: "url(#gradEnslavedV)", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "v-unlock-1": { + visible: () => Achievement(151).isUnlocked || VUnlocks.vAchievementUnlock.isUnlocked, + complete: () => vUnlockProgress(1), + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffe066", + position: Positions.vAchievement1, + ring: { + rMajor: 8, + }, + legend: { + text: complete => vUnlockLegendLabel(complete, 1), + angle: -135, + diagonal: 16, + horizontal: 16, }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.vUnlockAchievement, Positions.vAchievement0), - fill: "#ffe066", - completeWidth: 6, - incompleteWidth: 4, - } }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.vUnlockAchievement, Positions.vAchievement1), + fill: "#ffe066", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "v-unlock-2": { + visible: () => Achievement(151).isUnlocked || VUnlocks.vAchievementUnlock.isUnlocked, + complete: () => vUnlockProgress(2), + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffe066", + position: Positions.vAchievement2, + ring: { + rMajor: 8, + }, + legend: { + text: complete => vUnlockLegendLabel(complete, 2), + angle: -135, + diagonal: 30, + horizontal: 16, + }, + }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.vUnlockAchievement, Positions.vAchievement2), + fill: "#ffe066", + completeWidth: 6, + incompleteWidth: 4, + } + }, - "v-achievement-0": { - visible: () => VUnlocks.vAchievementUnlock.isUnlocked, - complete: () => VRunUnlocks.all[0].completions / 6, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffe066", - position: Positions.vAchievement0, - ring: { - rMajor: 8, - }, - legend: { - text: complete => { - const name = VRunUnlocks.all[0].config.name; - if (complete >= 1) return `V-Achievement "${name}"`; - const completions = VRunUnlocks.all[0].completions; - return [ - "V-Achievement", - `Reach ${formatInt(completions)} / ${formatInt(6)} completions in ${name}.` - ]; - }, - angle: -135, - diagonal: 16, - horizontal: 16, - }, + "v-unlock-3": { + visible: () => Achievement(151).isUnlocked || VUnlocks.vAchievementUnlock.isUnlocked, + complete: () => vUnlockProgress(3), + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffe066", + position: Positions.vAchievement3, + ring: { + rMajor: 8, }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.vAchievement5, Positions.vAchievement0), - fill: "#ffe066", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "v-achievement-1": { - visible: () => VUnlocks.vAchievementUnlock.isUnlocked, - complete: () => VRunUnlocks.all[1].completions / 6, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffe066", - position: Positions.vAchievement1, - ring: { - rMajor: 8, - }, - legend: { - text: complete => { - const name = VRunUnlocks.all[1].config.name; - if (complete >= 1) return `V-Achievement "${name}"`; - const completions = VRunUnlocks.all[1].completions; - return [ - "V-Achievement", - `Reach ${formatInt(completions)} / ${formatInt(6)} completions in ${name}.` - ]; - }, - angle: 20, - diagonal: 16, - horizontal: 16, - }, + legend: { + text: complete => vUnlockLegendLabel(complete, 3), + angle: -135, + diagonal: 45, + horizontal: 16, }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.vAchievement0, Positions.vAchievement1), - fill: "#ffe066", - completeWidth: 6, - incompleteWidth: 4, - } }, - "v-achievement-2": { - visible: () => VUnlocks.vAchievementUnlock.isUnlocked, - complete: () => VRunUnlocks.all[2].completions / 6, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffe066", - position: Positions.vAchievement2, - ring: { - rMajor: 8, - }, - legend: { - text: complete => { - const name = VRunUnlocks.all[2].config.name; - if (complete >= 1) return `V-Achievement "${name}"`; - const completions = VRunUnlocks.all[2].completions; - return [ - "V-Achievement", - `Reach ${formatInt(completions)} / ${formatInt(6)} completions in ${name}.` - ]; - }, - angle: 45, - diagonal: 16, - horizontal: 16, - }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.vUnlockAchievement, Positions.vAchievement3), + fill: "#ffe066", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "v-unlock-4": { + visible: () => Achievement(151).isUnlocked || VUnlocks.vAchievementUnlock.isUnlocked, + complete: () => vUnlockProgress(4), + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffe066", + position: Positions.vAchievement4, + ring: { + rMajor: 8, }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.vAchievement1, Positions.vAchievement2), - fill: "#ffe066", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "v-achievement-3": { - visible: () => VUnlocks.vAchievementUnlock.isUnlocked, - complete: () => VRunUnlocks.all[3].completions / 6, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffe066", - position: Positions.vAchievement3, - ring: { - rMajor: 8, - }, - legend: { - text: complete => { - const name = VRunUnlocks.all[3].config.name; - if (complete >= 1) return `V-Achievement "${name}"`; - const completions = VRunUnlocks.all[3].completions; - return [ - "V-Achievement", - `Reach ${formatInt(completions)} / ${formatInt(6)} completions in ${name}.` - ]; - }, - angle: 45, - diagonal: 16, - horizontal: 16, - }, + legend: { + text: complete => vUnlockLegendLabel(complete, 4), + angle: -135, + diagonal: 60, + horizontal: 16, }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.vAchievement2, Positions.vAchievement3), - fill: "#ffe066", - completeWidth: 6, - incompleteWidth: 4, - } }, - "v-achievement-4": { - visible: () => VUnlocks.vAchievementUnlock.isUnlocked, - complete: () => VRunUnlocks.all[4].completions / 6, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffe066", - position: Positions.vAchievement4, - ring: { - rMajor: 8, - }, - legend: { - text: complete => { - const name = VRunUnlocks.all[4].config.name; - if (complete >= 1) return `V-Achievement "${name}"`; - const completions = VRunUnlocks.all[4].completions; - return [ - "V-Achievement", - `Reach ${formatInt(completions)} / ${formatInt(6)} completions in ${name}.` - ]; - }, - angle: 45, - diagonal: 16, - horizontal: 16, - }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.vUnlockAchievement, Positions.vAchievement4), + fill: "#ffe066", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "v-unlock-5": { + visible: () => Achievement(151).isUnlocked || VUnlocks.vAchievementUnlock.isUnlocked, + complete: () => vUnlockProgress(5), + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffe066", + position: Positions.vAchievement5, + ring: { + rMajor: 8, }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.vAchievement3, Positions.vAchievement4), - fill: "#ffe066", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "v-achievement-5": { - visible: () => VUnlocks.vAchievementUnlock.isUnlocked, - complete: () => VRunUnlocks.all[5].completions / 6, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.v.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#ffe066", - position: Positions.vAchievement5, - ring: { - rMajor: 8, - }, - legend: { - text: complete => { - const name = VRunUnlocks.all[5].config.name; - if (complete >= 1) return `V-Achievement "${name}"`; - const completions = VRunUnlocks.all[5].completions; - return [ - "V-Achievement", - `Reach ${formatInt(completions)} / ${formatInt(6)} completions in ${name}.` - ]; - }, - angle: 100, - diagonal: 16, - horizontal: 16, - }, + legend: { + text: complete => vUnlockLegendLabel(complete, 5), + angle: -135, + diagonal: 75, + horizontal: 16, }, - connector: { - pathStart: 0, - pathEnd: 1, - path: new LinearPath(Positions.vAchievement4, Positions.vAchievement5), - fill: "#ffe066", - completeWidth: 6, - incompleteWidth: 4, - } }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.vUnlockAchievement, Positions.vAchievement5), + fill: "#ffe066", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "v-unlock-6": { + visible: () => Achievement(151).isUnlocked || VUnlocks.vAchievementUnlock.isUnlocked, + complete: () => vUnlockProgress(6), + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffe066", + position: Positions.vAchievement0, + ring: { + rMajor: 8, + }, + legend: { + text: complete => vUnlockLegendLabel(complete, 6), + angle: -135, + diagonal: 90, + horizontal: 16, + }, + }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.vUnlockAchievement, Positions.vAchievement0), + fill: "#ffe066", + completeWidth: 6, + incompleteWidth: 4, + } + }, - "ra": { - visible: () => VUnlocks.raUnlock.isUnlocked, - complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), - node: { - clickAction: () => Tab.celestials.ra.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - symbol: "\uf185", - symbolOffset: "2", - fill: "#9063de", - position: Positions.raReality, - ring: { - rMajor: 24, - }, - alwaysShowLegend: true, - legend: { - text: "Ra's Reality", - angle: 230, - diagonal: 85, - horizontal: 16, - }, - } - }, - "teresa-pet": { - visible: () => VUnlocks.raUnlock.isUnlocked, - complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.ra.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#9063de", - isStacked: true, - position: Positions.raPetTeresa, - ring: { - rMajor: 12, - }, - legend: { - text: () => { - const level = Ra.pets.teresa.level; - if (level === 25) return `Ra's Teresa Memories have all been returned`; - return [ - "Ra's Teresa Memory level", - `${formatInt(level)} / ${formatInt(25)}` - ]; - }, - angle: 142, - diagonal: 85, - horizontal: 16, - }, + "v-achievement-0": { + visible: () => VUnlocks.vAchievementUnlock.isUnlocked, + complete: () => VRunUnlocks.all[0].completions / 6, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffe066", + position: Positions.vAchievement0, + ring: { + rMajor: 8, }, - connector: { - pathStart: 0.05, - pathEnd: 0.95, - path: new LinearPath(Positions.raReality, Positions.raPetTeresa), - fill: "#9063de", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "teresa-pet-to-teresa": { - visible: () => VUnlocks.raUnlock.isUnlocked, - complete: () => Ra.pets.teresa.level / 25, - drawOrder: -1, - connector: { - pathStart: 0.05, - pathEnd: 0.70, - path: new LinearPath(Positions.raPetTeresa, Positions.teresa), - fill: "url(#gradRaTeresa)", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "effarig-pet": { - visible: () => VUnlocks.raUnlock.isUnlocked, - complete: () => Ra.pets.teresa.level / 8, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.ra.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#9063de", - isStacked: true, - position: Positions.raPetEffarig, - ring: { - rMajor: 12, - }, - legend: { - text: complete => { - const unlocked = Ra.pets.teresa.level; - const level = Ra.pets.effarig.level; - if (complete < 1) return `Ra's Teresa Memory level ${unlocked} / ${formatInt(8)}`; - if (level === 25) return `Ra's Effarig Memories have all been returned`; - return [ - "Ra's Effarig Memory level", - `${formatInt(level)} / ${formatInt(25)}` - ]; - }, - angle: 142, - diagonal: 85, - horizontal: 16, + legend: { + text: complete => { + const name = VRunUnlocks.all[0].config.name; + if (complete >= 1) return `V-Achievement "${name}"`; + const completions = VRunUnlocks.all[0].completions; + return [ + "V-Achievement", + `Reach ${formatInt(completions)} / ${formatInt(6)} completions in ${name}.` + ]; }, + angle: -135, + diagonal: 16, + horizontal: 16, }, - connector: { - pathStart: 0.05, - pathEnd: 0.95, - path: new LinearPath(Positions.raReality, Positions.raPetEffarig), - fill: "#9063de", - completeWidth: 6, - incompleteWidth: 4, - } }, - "effarig-pet-to-effarig": { - visible: () => Ra.unlocks.effarigUnlock.isUnlocked, - complete: () => Ra.pets.effarig.level / 25, - drawOrder: -1, - connector: { - pathStart: 0.05, - pathEnd: 0.60, - path: new LinearPath(Positions.raPetEffarig, Positions.effarigNode), - fill: "url(#gradRaEffarig)", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "enslaved-pet": { - visible: () => Ra.unlocks.effarigUnlock.isUnlocked, - complete: () => Ra.pets.effarig.level / 8, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.ra.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#9063de", - isStacked: true, - position: Positions.raPetEnslaved, - ring: { - rMajor: 12, - }, - legend: { - text: complete => { - const unlocked = Ra.pets.effarig.level; - const level = Ra.pets.enslaved.level; - if (complete < 1) return `Ra's Effarig Memory level ${unlocked} / ${formatInt(8)}`; - if (level === 25) return `Ra's Enslaved Memories have all been returned`; - return [ - "Ra's Enslaved Memory level", - `${formatInt(level)} / ${formatInt(25)}` - ]; - }, - angle: 142, - diagonal: 85, - horizontal: 16, - }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.vAchievement5, Positions.vAchievement0), + fill: "#ffe066", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "v-achievement-1": { + visible: () => VUnlocks.vAchievementUnlock.isUnlocked, + complete: () => VRunUnlocks.all[1].completions / 6, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffe066", + position: Positions.vAchievement1, + ring: { + rMajor: 8, }, - connector: { - pathStart: 0.05, - pathEnd: 0.95, - path: new LinearPath(Positions.raReality, Positions.raPetEnslaved), - fill: "#9063de", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "enslaved-pet-to-enslaved": { - visible: () => Ra.unlocks.enslavedUnlock.isUnlocked, - complete: () => Ra.pets.enslaved.level / 25, - drawOrder: -1, - connector: { - pathStart: 0.05, - pathEnd: 0.55, - path: new LinearPath(Positions.raPetEnslaved, Positions.enslavedReality), - fill: "url(#gradRaEnslaved)", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "v-pet": { - visible: () => Ra.unlocks.enslavedUnlock.isUnlocked, - complete: () => Ra.pets.enslaved.level / 8, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.ra.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#9063de", - isStacked: true, - position: Positions.raPetV, - ring: { - rMajor: 12, - }, - legend: { - text: complete => { - const unlocked = Ra.pets.enslaved.level; - const level = Ra.pets.v.level; - if (complete < 1) return `Ra's Enslaved Memory level ${unlocked} / ${formatInt(8)}`; - if (level === 25) return `Ra's V Memories have all been returned`; - return [ - "Ra's V Memory level", - `${formatInt(level)} / ${formatInt(25)}` - ]; - }, - angle: 142, - diagonal: 85, - horizontal: 16, + legend: { + text: complete => { + const name = VRunUnlocks.all[1].config.name; + if (complete >= 1) return `V-Achievement "${name}"`; + const completions = VRunUnlocks.all[1].completions; + return [ + "V-Achievement", + `Reach ${formatInt(completions)} / ${formatInt(6)} completions in ${name}.` + ]; }, + angle: 20, + diagonal: 16, + horizontal: 16, }, - connector: { - pathStart: 0.05, - pathEnd: 0.95, - path: new LinearPath(Positions.raReality, Positions.raPetV), - fill: "#9063de", - completeWidth: 6, - incompleteWidth: 4, - } }, - "v-pet-to-v": { - visible: () => Ra.unlocks.vUnlock.isUnlocked, - complete: () => Ra.pets.v.level / 25, - drawOrder: -1, - connector: { - pathStart: 0.05, - pathEnd: 0.42, - path: new LinearPath(Positions.raPetV, Positions.vUnlockAchievement), - fill: "url(#gradRaV)", - completeWidth: 6, - incompleteWidth: 4, - } - }, - "ra-ring-1": { - visible: () => VUnlocks.raUnlock.isUnlocked, - complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), - node: { - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#9063de", - position: Positions.raReality, - ring: { - rMajor: 90, - rMinor: 80, - gapCenterDeg: 74, - gapDeg: 268, - }, - } - }, - "ra-ring-2": { - visible: () => VUnlocks.raUnlock.isUnlocked, - complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), - node: { - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#9063de", - position: Positions.raReality, - ring: { - rMajor: 90, - rMinor: 80, - gapCenterDeg: 161, - gapDeg: 318, - }, - } - }, - "ra-ring-3": { - visible: () => VUnlocks.raUnlock.isUnlocked, - complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), - node: { - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#9063de", - position: Positions.raReality, - ring: { - rMajor: 90, - rMinor: 80, - gapCenterDeg: 231, - gapDeg: 301, - }, - } - }, - "ra-ring-4": { - visible: () => VUnlocks.raUnlock.isUnlocked, - complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), - node: { - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#9063de", - position: Positions.raReality, - ring: { - rMajor: 90, - rMinor: 80, - gapCenterDeg: 293, - gapDeg: 334, - }, - } - }, - "ra-ring-5": { - visible: () => VUnlocks.raUnlock.isUnlocked, - complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), - node: { - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "#9063de", - position: Positions.raReality, - ring: { - rMajor: 90, - rMinor: 80, - gapCenterDeg: -14, - gapDeg: 316, - }, - } - }, - "laitela-unlock": { - visible: () => Ra.unlocks.vUnlock.isUnlocked, - complete: () => { - if (DarkMatterDimension(1).unlockUpgrade.canBeBought || Laitela.isUnlocked) return 1; - if (MachineHandler.isIMUnlocked) { - if (player.requirementChecks.reality.maxID1.neq(0)) return 0.5; - return Math.clampMax(0.999, player.antimatter.exponent / 1.5e12); - } - return Math.clampMax(0.25, Currency.realityMachines.value.pLog10() / MachineHandler.baseRMCap.exponent); + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.vAchievement0, Positions.vAchievement1), + fill: "#ffe066", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "v-achievement-2": { + visible: () => VUnlocks.vAchievementUnlock.isUnlocked, + complete: () => VRunUnlocks.all[2].completions / 6, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffe066", + position: Positions.vAchievement2, + ring: { + rMajor: 8, }, - drawOrder: -1, - node: { - clickAction: () => Tab.celestials.laitela.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - symbol: "ᛝ", - symbolScale: 1.6, - symbolOffset: "0.6", - fill: "white", - position: Positions.laitelaFirstCenter, - ring: { - rMajor: 15, + legend: { + text: complete => { + const name = VRunUnlocks.all[2].config.name; + if (complete >= 1) return `V-Achievement "${name}"`; + const completions = VRunUnlocks.all[2].completions; + return [ + "V-Achievement", + `Reach ${formatInt(completions)} / ${formatInt(6)} completions in ${name}.` + ]; }, - alwaysShowLegend: true, - legend: { - text: complete => { - const realityName = "Lai'tela's Reality"; - if (complete >= 1) return [realityName]; + angle: 45, + diagonal: 16, + horizontal: 16, + }, + }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.vAchievement1, Positions.vAchievement2), + fill: "#ffe066", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "v-achievement-3": { + visible: () => VUnlocks.vAchievementUnlock.isUnlocked, + complete: () => VRunUnlocks.all[3].completions / 6, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffe066", + position: Positions.vAchievement3, + ring: { + rMajor: 8, + }, + legend: { + text: complete => { + const name = VRunUnlocks.all[3].config.name; + if (complete >= 1) return `V-Achievement "${name}"`; + const completions = VRunUnlocks.all[3].completions; + return [ + "V-Achievement", + `Reach ${formatInt(completions)} / ${formatInt(6)} completions in ${name}.` + ]; + }, + angle: 45, + diagonal: 16, + horizontal: 16, + }, + }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.vAchievement2, Positions.vAchievement3), + fill: "#ffe066", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "v-achievement-4": { + visible: () => VUnlocks.vAchievementUnlock.isUnlocked, + complete: () => VRunUnlocks.all[4].completions / 6, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffe066", + position: Positions.vAchievement4, + ring: { + rMajor: 8, + }, + legend: { + text: complete => { + const name = VRunUnlocks.all[4].config.name; + if (complete >= 1) return `V-Achievement "${name}"`; + const completions = VRunUnlocks.all[4].completions; + return [ + "V-Achievement", + `Reach ${formatInt(completions)} / ${formatInt(6)} completions in ${name}.` + ]; + }, + angle: 45, + diagonal: 16, + horizontal: 16, + }, + }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.vAchievement3, Positions.vAchievement4), + fill: "#ffe066", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "v-achievement-5": { + visible: () => VUnlocks.vAchievementUnlock.isUnlocked, + complete: () => VRunUnlocks.all[5].completions / 6, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.v.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#ffe066", + position: Positions.vAchievement5, + ring: { + rMajor: 8, + }, + legend: { + text: complete => { + const name = VRunUnlocks.all[5].config.name; + if (complete >= 1) return `V-Achievement "${name}"`; + const completions = VRunUnlocks.all[5].completions; + return [ + "V-Achievement", + `Reach ${formatInt(completions)} / ${formatInt(6)} completions in ${name}.` + ]; + }, + angle: 100, + diagonal: 16, + horizontal: 16, + }, + }, + connector: { + pathStart: 0, + pathEnd: 1, + path: new LinearPath(Positions.vAchievement4, Positions.vAchievement5), + fill: "#ffe066", + completeWidth: 6, + incompleteWidth: 4, + } + }, - if (!MachineHandler.isIMUnlocked) { - const realityMachines = Currency.realityMachines.value; - const realityMachineCap = MachineHandler.baseRMCap; - return [ - realityName, - "The limits of Reality Machines bind you", - `${format(realityMachines)} / ${format(realityMachineCap)}` - ]; - } + "ra": { + visible: () => VUnlocks.raUnlock.isUnlocked, + complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), + node: { + clickAction: () => Tab.celestials.ra.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + symbol: "\uf185", + symbolOffset: "2", + fill: "#9063de", + position: Positions.raReality, + ring: { + rMajor: 24, + }, + alwaysShowLegend: true, + legend: { + text: "Ra's Reality", + angle: 230, + diagonal: 85, + horizontal: 16, + }, + } + }, + "teresa-pet": { + visible: () => VUnlocks.raUnlock.isUnlocked, + complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.ra.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#9063de", + isStacked: true, + position: Positions.raPetTeresa, + ring: { + rMajor: 12, + }, + legend: { + text: () => { + const level = Ra.pets.teresa.level; + if (level === 25) return `Ra's Teresa Memories have all been returned`; + return [ + "Ra's Teresa Memory level", + `${formatInt(level)} / ${formatInt(25)}` + ]; + }, + angle: 142, + diagonal: 85, + horizontal: 16, + }, + }, + connector: { + pathStart: 0.05, + pathEnd: 0.95, + path: new LinearPath(Positions.raReality, Positions.raPetTeresa), + fill: "#9063de", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "teresa-pet-to-teresa": { + visible: () => VUnlocks.raUnlock.isUnlocked, + complete: () => Ra.pets.teresa.level / 25, + drawOrder: -1, + connector: { + pathStart: 0.05, + pathEnd: 0.70, + path: new LinearPath(Positions.raPetTeresa, Positions.teresa), + fill: "url(#gradRaTeresa)", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "effarig-pet": { + visible: () => VUnlocks.raUnlock.isUnlocked, + complete: () => Ra.pets.teresa.level / 8, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.ra.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#9063de", + isStacked: true, + position: Positions.raPetEffarig, + ring: { + rMajor: 12, + }, + legend: { + text: complete => { + const unlocked = Ra.pets.teresa.level; + const level = Ra.pets.effarig.level; + if (complete < 1) return `Ra's Teresa Memory level ${unlocked} / ${formatInt(8)}`; + if (level === 25) return `Ra's Effarig Memories have all been returned`; + return [ + "Ra's Effarig Memory level", + `${formatInt(level)} / ${formatInt(25)}` + ]; + }, + angle: 142, + diagonal: 85, + horizontal: 16, + }, + }, + connector: { + pathStart: 0.05, + pathEnd: 0.95, + path: new LinearPath(Positions.raReality, Positions.raPetEffarig), + fill: "#9063de", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "effarig-pet-to-effarig": { + visible: () => Ra.unlocks.effarigUnlock.isUnlocked, + complete: () => Ra.pets.effarig.level / 25, + drawOrder: -1, + connector: { + pathStart: 0.05, + pathEnd: 0.60, + path: new LinearPath(Positions.raPetEffarig, Positions.effarigNode), + fill: "url(#gradRaEffarig)", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "enslaved-pet": { + visible: () => Ra.unlocks.effarigUnlock.isUnlocked, + complete: () => Ra.pets.effarig.level / 8, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.ra.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#9063de", + isStacked: true, + position: Positions.raPetEnslaved, + ring: { + rMajor: 12, + }, + legend: { + text: complete => { + const unlocked = Ra.pets.effarig.level; + const level = Ra.pets.enslaved.level; + if (complete < 1) return `Ra's Effarig Memory level ${unlocked} / ${formatInt(8)}`; + if (level === 25) return `Ra's Enslaved Memories have all been returned`; + return [ + "Ra's Enslaved Memory level", + `${formatInt(level)} / ${formatInt(25)}` + ]; + }, + angle: 142, + diagonal: 85, + horizontal: 16, + }, + }, + connector: { + pathStart: 0.05, + pathEnd: 0.95, + path: new LinearPath(Positions.raReality, Positions.raPetEnslaved), + fill: "#9063de", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "enslaved-pet-to-enslaved": { + visible: () => Ra.unlocks.enslavedUnlock.isUnlocked, + complete: () => Ra.pets.enslaved.level / 25, + drawOrder: -1, + connector: { + pathStart: 0.05, + pathEnd: 0.55, + path: new LinearPath(Positions.raPetEnslaved, Positions.enslavedReality), + fill: "url(#gradRaEnslaved)", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "v-pet": { + visible: () => Ra.unlocks.enslavedUnlock.isUnlocked, + complete: () => Ra.pets.enslaved.level / 8, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.ra.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#9063de", + isStacked: true, + position: Positions.raPetV, + ring: { + rMajor: 12, + }, + legend: { + text: complete => { + const unlocked = Ra.pets.enslaved.level; + const level = Ra.pets.v.level; + if (complete < 1) return `Ra's Enslaved Memory level ${unlocked} / ${formatInt(8)}`; + if (level === 25) return `Ra's V Memories have all been returned`; + return [ + "Ra's V Memory level", + `${formatInt(level)} / ${formatInt(25)}` + ]; + }, + angle: 142, + diagonal: 85, + horizontal: 16, + }, + }, + connector: { + pathStart: 0.05, + pathEnd: 0.95, + path: new LinearPath(Positions.raReality, Positions.raPetV), + fill: "#9063de", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "v-pet-to-v": { + visible: () => Ra.unlocks.vUnlock.isUnlocked, + complete: () => Ra.pets.v.level / 25, + drawOrder: -1, + connector: { + pathStart: 0.05, + pathEnd: 0.42, + path: new LinearPath(Positions.raPetV, Positions.vUnlockAchievement), + fill: "url(#gradRaV)", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "ra-ring-1": { + visible: () => VUnlocks.raUnlock.isUnlocked, + complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), + node: { + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#9063de", + position: Positions.raReality, + ring: { + rMajor: 90, + rMinor: 80, + gapCenterDeg: 74, + gapDeg: 268, + }, + } + }, + "ra-ring-2": { + visible: () => VUnlocks.raUnlock.isUnlocked, + complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), + node: { + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#9063de", + position: Positions.raReality, + ring: { + rMajor: 90, + rMinor: 80, + gapCenterDeg: 161, + gapDeg: 318, + }, + } + }, + "ra-ring-3": { + visible: () => VUnlocks.raUnlock.isUnlocked, + complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), + node: { + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#9063de", + position: Positions.raReality, + ring: { + rMajor: 90, + rMinor: 80, + gapCenterDeg: 231, + gapDeg: 301, + }, + } + }, + "ra-ring-4": { + visible: () => VUnlocks.raUnlock.isUnlocked, + complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), + node: { + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#9063de", + position: Positions.raReality, + ring: { + rMajor: 90, + rMinor: 80, + gapCenterDeg: 293, + gapDeg: 334, + }, + } + }, + "ra-ring-5": { + visible: () => VUnlocks.raUnlock.isUnlocked, + complete: () => (VUnlocks.raUnlock.isUnlocked ? 1 : 0), + node: { + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "#9063de", + position: Positions.raReality, + ring: { + rMajor: 90, + rMinor: 80, + gapCenterDeg: -14, + gapDeg: 316, + }, + } + }, + "laitela-unlock": { + visible: () => Ra.unlocks.vUnlock.isUnlocked, + complete: () => { + if (DarkMatterDimension(1).unlockUpgrade.canBeBought || Laitela.isUnlocked) return 1; + if (MachineHandler.isIMUnlocked) { + if (player.requirementChecks.reality.maxID1.neq(0)) return 0.5; + return Math.clampMax(0.999, player.antimatter.exponent / 1.5e12); + } + return Math.clampMax(0.25, Currency.realityMachines.value.pLog10() / MachineHandler.baseRMCap.exponent); + }, + drawOrder: -1, + node: { + clickAction: () => Tab.celestials.laitela.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + symbol: "ᛝ", + symbolScale: 1.6, + symbolOffset: "0.6", + fill: "white", + position: Positions.laitelaFirstCenter, + ring: { + rMajor: 15, + }, + alwaysShowLegend: true, + legend: { + text: complete => { + const realityName = "Lai'tela's Reality"; + if (complete >= 1) return [realityName]; - const hasIDs = player.requirementChecks.reality.maxID1.neq(0); - if (hasIDs) return [ - realityName, - "The Power of Infinity Dimensions", - "blocks your path." - ]; - - const antimatter = Currency.antimatter.value; - const amGoal = DC.E1_5E12; + if (!MachineHandler.isIMUnlocked) { + const realityMachines = Currency.realityMachines.value; + const realityMachineCap = MachineHandler.baseRMCap; return [ realityName, - `${format(antimatter)} / ${format(amGoal)}` + "The limits of Reality Machines bind you", + `${format(realityMachines)} / ${format(realityMachineCap)}` ]; - }, - angle: 260, - diagonal: 15, - horizontal: 8, + } + + const hasIDs = player.requirementChecks.reality.maxID1.neq(0); + if (hasIDs) return [ + realityName, + "The Power of Infinity Dimensions", + "blocks your path." + ]; + + const antimatter = Currency.antimatter.value; + const amGoal = DC.E1_5E12; + return [ + realityName, + `${format(antimatter)} / ${format(amGoal)}` + ]; }, + angle: 260, + diagonal: 15, + horizontal: 8, }, - connector: { - pathStart: 0.05, - pathEnd: 1, - path: new LinearPath(Positions.raReality, Positions.laitelaFirstCenter), - fill: "url(#gradRaLaitela)", - completeWidth: 6, - incompleteWidth: 4, - } }, - "laitela-2nd-dim": { - visible: () => Laitela.isUnlocked, - complete: () => { - const upgrade = DarkMatterDimension(2).unlockUpgrade; - if (upgrade.canBeBought || upgrade.isBought) return 1; - if (upgrade.isAvailableForPurchase) return upgrade.currency.value / upgrade.cost; - return Laitela.difficultyTier < 1 - ? 0 - : 30 / player.celestials.laitela.fastestCompletion; + connector: { + pathStart: 0.05, + pathEnd: 1, + path: new LinearPath(Positions.raReality, Positions.laitelaFirstCenter), + fill: "url(#gradRaLaitela)", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "laitela-2nd-dim": { + visible: () => Laitela.isUnlocked, + complete: () => { + const upgrade = DarkMatterDimension(2).unlockUpgrade; + if (upgrade.canBeBought || upgrade.isBought) return 1; + if (upgrade.isAvailableForPurchase) return upgrade.currency.value / upgrade.cost; + return Laitela.difficultyTier < 1 + ? 0 + : 30 / player.celestials.laitela.fastestCompletion; + }, + node: { + clickAction: () => Tab.celestials.laitela.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "white", + position: Positions.laitelaFirstLeft, + ring: { + rMajor: 8, }, - node: { - clickAction: () => Tab.celestials.laitela.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "white", - position: Positions.laitelaFirstLeft, - ring: { - rMajor: 8, - }, - legend: { - text: complete => { - const dmdText = "2nd Dark Matter Dimension"; - const dim = DarkMatterDimension(2); - if (dim.isUnlocked) return [dmdText]; - - const goal = dim.adjustedStartingCost; - if (complete >= 1) return [ - dmdText, - `Dark Matter ${format(Currency.darkMatter.max.min(goal), dim.isUnlocked ? 0 : 2)} / ${format(goal)}` - ]; - - const upgrade = dim.unlockUpgrade; - if (upgrade.isAvailableForPurchase) return [ - dmdText, - `Imaginary Machines - ${format(Math.min(upgrade.currency.value, upgrade.cost), upgrade.canBeBought ? 0 : 2)} - / ${format(upgrade.cost)}` - ]; - - if (player.celestials.laitela.fastestCompletion > 30 && Laitela.difficultyTier < 0) return [ - dmdText, - `Beat Lai'tela's Reality in less that ${format(30)} seconds` - ]; - return [ - dmdText, - `Beat Lai'tela's Reality` - ]; - }, - angle: 135, - diagonal: 30, - horizontal: 16, + legend: { + text: complete => { + const dmdText = "2nd Dark Matter Dimension"; + const dim = DarkMatterDimension(2); + if (dim.isUnlocked) return [dmdText]; + + const goal = dim.adjustedStartingCost; + if (complete >= 1) return [ + dmdText, + `Dark Matter ${format(Currency.darkMatter.max.min(goal), dim.isUnlocked ? 0 : 2)} / ${format(goal)}` + ]; + + const upgrade = dim.unlockUpgrade; + if (upgrade.isAvailableForPurchase) return [ + dmdText, + `Imaginary Machines + ${format(Math.min(upgrade.currency.value, upgrade.cost), upgrade.canBeBought ? 0 : 2)} + / ${format(upgrade.cost)}` + ]; + + if (player.celestials.laitela.fastestCompletion > 30 && Laitela.difficultyTier < 0) return [ + dmdText, + `Beat Lai'tela's Reality in less that ${format(30)} seconds` + ]; + return [ + dmdText, + `Beat Lai'tela's Reality` + ]; }, + angle: 135, + diagonal: 30, + horizontal: 16, }, - connector: { - pathStart: 0.17, + }, + connector: { + pathStart: 0.17, + pathEnd: 0.89, + path: new LinearPath(Positions.laitelaFirstCenter, Positions.laitelaFirstLeft), + fill: "white", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "laitela-singularity": { + visible: () => Laitela.isUnlocked, + complete: () => (Currency.singularities.gte(1) + ? 1 + : Math.clampMax(0.999, Currency.darkEnergy.value / Singularity.cap)), + node: { + clickAction: () => Tab.celestials.laitela.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "white", + position: Positions.laitelaFirstRight, + ring: { + rMajor: 8, + }, + legend: { + text: complete => { + if (complete >= 1) return ["Obtain a Singularity"]; + const darkEnergy = Currency.darkEnergy.value; + const singularityGoal = Singularity.cap; + return [ + "Condense your Dark Energy", + "Into a Singularity", + `${format(darkEnergy)} / ${format(singularityGoal)}` + ]; + }, + angle: 45, + diagonal: 65, + horizontal: 16, + }, + }, + connector: { + pathStart: 0.17, + pathEnd: 0.89, + path: new LinearPath(Positions.laitelaFirstCenter, Positions.laitelaFirstRight), + fill: "white", + completeWidth: 6, + incompleteWidth: 4, + } + }, + "laitela-3rd-dim": { + visible: () => DarkMatterDimension(2).isUnlocked && Currency.singularities.gte(1), + complete: () => { + const upgrade = DarkMatterDimension(3).unlockUpgrade; + if (upgrade.canBeBought || upgrade.isBought) return 1; + if (upgrade.isAvailableForPurchase) return upgrade.currency.value / upgrade.cost; + if (!player.auto.singularity.isActive) return 0.5; + return Math.clampMax(0.999, Singularity.singularitiesGained / 20); + }, + node: { + clickAction: () => Tab.celestials.laitela.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "white", + position: Positions.laitelaSecondCenter, + ring: { + rMajor: 8, + }, + legend: { + text: complete => { + const dmdText = "3rd Dark Matter Dimension"; + const dim = DarkMatterDimension(3); + if (dim.isUnlocked) return [dmdText]; + + const goal = dim.adjustedStartingCost; + if (complete >= 1) return [ + dmdText, + `Dark Matter ${format(Currency.darkMatter.max.min(goal), dim.isUnlocked ? 0 : 2)} / ${format(goal)}` + ]; + + const upgrade = dim.unlockUpgrade; + if (upgrade.isAvailableForPurchase) return [ + dmdText, + `Imaginary Machines + ${format(Math.min(upgrade.currency.value, upgrade.cost), upgrade.canBeBought ? 0 : 2)} + / ${format(upgrade.cost)}` + ]; + + if (!player.auto.singularity.isActive) return [ + dmdText, + "Unlock Automatic Singularities", + `${format(Currency.singularities.value)} / ${format(SingularityMilestone.autoCondense.start)}` + ]; + + return [ + dmdText, + `Automatically Condense ${format(20)} Singularities at once`, + `${format(Math.clampMax(Singularity.singularitiesGained, 20))} / ${format(20)}` + ]; + }, + angle: 15, + diagonal: 30, + horizontal: 16, + }, + }, + connector: [ + { + pathStart: 0.10, pathEnd: 0.89, - path: new LinearPath(Positions.laitelaFirstCenter, Positions.laitelaFirstLeft), + path: new LinearPath(Positions.laitelaFirstLeft, Positions.laitelaSecondCenter), fill: "white", completeWidth: 6, incompleteWidth: 4, - } - }, - "laitela-singularity": { - visible: () => Laitela.isUnlocked, - complete: () => (Currency.singularities.gte(1) - ? 1 - : Math.clampMax(0.999, Currency.darkEnergy.value / Singularity.cap)), - node: { - clickAction: () => Tab.celestials.laitela.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "white", - position: Positions.laitelaFirstRight, - ring: { - rMajor: 8, - }, - legend: { - text: complete => { - if (complete >= 1) return ["Obtain a Singularity"]; - const darkEnergy = Currency.darkEnergy.value; - const singularityGoal = Singularity.cap; - return [ - "Condense your Dark Energy", - "Into a Singularity", - `${format(darkEnergy)} / ${format(singularityGoal)}` - ]; - }, - angle: 45, - diagonal: 65, - horizontal: 16, - }, - }, - connector: { - pathStart: 0.17, + }, { + pathStart: 0.10, pathEnd: 0.89, - path: new LinearPath(Positions.laitelaFirstCenter, Positions.laitelaFirstRight), + path: new LinearPath(Positions.laitelaFirstRight, Positions.laitelaSecondCenter), fill: "white", completeWidth: 6, incompleteWidth: 4, - } + + }, + ], + }, + "laitela-4th-dim": { + visible: () => DarkMatterDimension(3).isUnlocked, + complete: () => { + const upgrade = DarkMatterDimension(4).unlockUpgrade; + if (upgrade.canBeBought || upgrade.isBought) return 1; + if (upgrade.isAvailableForPurchase) return upgrade.currency.value / upgrade.cost; + return (Replicanti.galaxies.total + player.galaxies + player.dilation.totalTachyonGalaxies) / 80000; }, - "laitela-3rd-dim": { - visible: () => DarkMatterDimension(2).isUnlocked && Currency.singularities.gte(1), - complete: () => { - const upgrade = DarkMatterDimension(3).unlockUpgrade; - if (upgrade.canBeBought || upgrade.isBought) return 1; - if (upgrade.isAvailableForPurchase) return upgrade.currency.value / upgrade.cost; - if (!player.auto.singularity.isActive) return 0.5; - return Math.clampMax(0.999, Singularity.singularitiesGained / 20); + node: { + clickAction: () => Tab.celestials.laitela.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "white", + position: Positions.laitelaSecondLeft, + ring: { + rMajor: 8, }, - node: { - clickAction: () => Tab.celestials.laitela.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "white", - position: Positions.laitelaSecondCenter, - ring: { - rMajor: 8, - }, - legend: { - text: complete => { - const dmdText = "3rd Dark Matter Dimension"; - const dim = DarkMatterDimension(3); - if (dim.isUnlocked) return [dmdText]; - - const goal = dim.adjustedStartingCost; - if (complete >= 1) return [ - dmdText, - `Dark Matter ${format(Currency.darkMatter.max.min(goal), dim.isUnlocked ? 0 : 2)} / ${format(goal)}` - ]; - - const upgrade = dim.unlockUpgrade; - if (upgrade.isAvailableForPurchase) return [ - dmdText, - `Imaginary Machines - ${format(Math.min(upgrade.currency.value, upgrade.cost), upgrade.canBeBought ? 0 : 2)} - / ${format(upgrade.cost)}` - ]; - - if (!player.auto.singularity.isActive) return [ - dmdText, - "Unlock Automatic Singularities", - `${format(Currency.singularities.value)} / ${format(SingularityMilestone.autoCondense.start)}` - ]; - - return [ - dmdText, - `Automatically Condense ${format(20)} Singularities at once`, - `${format(Math.clampMax(Singularity.singularitiesGained, 20))} / ${format(20)}` - ]; - }, - angle: 15, - diagonal: 30, - horizontal: 16, + legend: { + text: complete => { + const dmdText = "4th Dark Matter Dimension"; + const dim = DarkMatterDimension(4); + if (dim.isUnlocked) return [dmdText]; + + const goal = dim.adjustedStartingCost; + if (complete >= 1) return [ + dmdText, + `Dark Matter ${format(Currency.darkMatter.max.min(goal), dim.isUnlocked ? 0 : 2)} / ${format(goal)}` + ]; + + const upgrade = dim.unlockUpgrade; + if (upgrade.isAvailableForPurchase) return [ + dmdText, + `Imaginary Machines + ${format(Math.min(upgrade.currency.value, upgrade.cost), upgrade.canBeBought ? 0 : 2)} + / ${format(upgrade.cost)}` + ]; + + const allGalaxies = Replicanti.galaxies.total + player.galaxies + player.dilation.totalTachyonGalaxies; + return [ + dmdText, + `Have ${format(80000)} total Galaxies`, + `${format(Math.clampMax(allGalaxies, 80000))} / ${format(80000)}` + ]; }, + angle: 135, + diagonal: 30, + horizontal: 16, }, - connector: [ - { - pathStart: 0.10, - pathEnd: 0.89, - path: new LinearPath(Positions.laitelaFirstLeft, Positions.laitelaSecondCenter), - fill: "white", - completeWidth: 6, - incompleteWidth: 4, - }, { - pathStart: 0.10, - pathEnd: 0.89, - path: new LinearPath(Positions.laitelaFirstRight, Positions.laitelaSecondCenter), - fill: "white", - completeWidth: 6, - incompleteWidth: 4, - - }, - ], }, - "laitela-4th-dim": { - visible: () => DarkMatterDimension(3).isUnlocked, - complete: () => { - const upgrade = DarkMatterDimension(4).unlockUpgrade; - if (upgrade.canBeBought || upgrade.isBought) return 1; - if (upgrade.isAvailableForPurchase) return upgrade.currency.value / upgrade.cost; - return (Replicanti.galaxies.total + player.galaxies + player.dilation.totalTachyonGalaxies) / 80000; + connector: { + pathStart: 0.11, + pathEnd: 0.89, + path: new LinearPath(Positions.laitelaSecondCenter, Positions.laitelaSecondLeft), + fill: "white", + completeWidth: 6, + incompleteWidth: 4, + }, + }, + "laitela-annihilation": { + visible: () => DarkMatterDimension(4).isUnlocked, + complete: () => { + const upgrade = ImaginaryUpgrade(19); + if (upgrade.canBeBought || upgrade.isBought) return 1; + if (upgrade.isAvailableForPurchase) return Currency.imaginaryMachines.value / upgrade.cost; + return upgrade.isPossible + ? Tickspeed.continuumValue / 3850000 + : 0; + }, + node: { + clickAction: () => Tab.celestials.laitela.show(true), + incompleteClass: "c-celestial-nav__test-incomplete", + fill: "white", + position: Positions.laitelaSecondRight, + ring: { + rMajor: 8, }, - node: { - clickAction: () => Tab.celestials.laitela.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "white", - position: Positions.laitelaSecondLeft, - ring: { - rMajor: 8, - }, - legend: { - text: complete => { - const dmdText = "4th Dark Matter Dimension"; - const dim = DarkMatterDimension(4); - if (dim.isUnlocked) return [dmdText]; - - const goal = dim.adjustedStartingCost; - if (complete >= 1) return [ - dmdText, - `Dark Matter ${format(Currency.darkMatter.max.min(goal), dim.isUnlocked ? 0 : 2)} / ${format(goal)}` - ]; - - const upgrade = dim.unlockUpgrade; - if (upgrade.isAvailableForPurchase) return [ - dmdText, - `Imaginary Machines - ${format(Math.min(upgrade.currency.value, upgrade.cost), upgrade.canBeBought ? 0 : 2)} - / ${format(upgrade.cost)}` - ]; - - const allGalaxies = Replicanti.galaxies.total + player.galaxies + player.dilation.totalTachyonGalaxies; - return [ - dmdText, - `Have ${format(80000)} total Galaxies`, - `${format(Math.clampMax(allGalaxies, 80000))} / ${format(80000)}` - ]; - }, - angle: 135, - diagonal: 30, - horizontal: 16, - }, + legend: { + text: [ + "Annihilate your", + "Dark Matter Dimensions" + ], + angle: 315, + diagonal: 30, + horizontal: 16, }, - connector: { + }, + connector: { + pathStart: 0.11, + pathEnd: 0.89, + path: new LinearPath(Positions.laitelaSecondCenter, Positions.laitelaSecondRight), + fill: "white", + completeWidth: 6, + incompleteWidth: 4, + }, + }, + "laitela-destabilization": { + visible: () => DarkMatterDimension(4).isUnlocked && ImaginaryUpgrade(19).isBought, + complete: () => Laitela.difficultyTier / 8, + node: { + incompleteClass: "c-celestial-nav__test-incomplete", + symbol: "ᛝ", + symbolScale: 1.6, + symbolOffset: "0.6", + fill: "white", + position: Positions.laitelaThirdCenter, + ring: { + rMajor: 15, + }, + alwaysShowLegend: true, + legend: { + text: complete => { + if (complete < 1) return [ + "Destabalize Lai'tela's Reality", + "To the point where you cannot", + "use any Dimensions", + `${format(Laitela.difficultyTier)} / ${format(8)}` + ]; + return [ + "Completely destabilized", + "Lai'tela's Reality", + ]; + }, + angle: 0, + diagonal: 15, + horizontal: 8, + }, + }, + connector: [ + { pathStart: 0.11, - pathEnd: 0.89, - path: new LinearPath(Positions.laitelaSecondCenter, Positions.laitelaSecondLeft), + pathEnd: 0.83, + path: new LinearPath(Positions.laitelaSecondLeft, Positions.laitelaThirdCenter), fill: "white", completeWidth: 6, incompleteWidth: 4, - }, - }, - "laitela-annihilation": { - visible: () => DarkMatterDimension(4).isUnlocked, - complete: () => { - const upgrade = ImaginaryUpgrade(19); - if (upgrade.canBeBought || upgrade.isBought) return 1; - if (upgrade.isAvailableForPurchase) return Currency.imaginaryMachines.value / upgrade.cost; - return upgrade.isPossible - ? Tickspeed.continuumValue / 3850000 - : 0; - }, - node: { - clickAction: () => Tab.celestials.laitela.show(true), - incompleteClass: "c-celestial-nav__test-incomplete", - fill: "white", - position: Positions.laitelaSecondRight, - ring: { - rMajor: 8, - }, - legend: { - text: [ - "Annihilate your", - "Dark Matter Dimensions" - ], - angle: 315, - diagonal: 30, - horizontal: 16, - }, - }, - connector: { + }, { pathStart: 0.11, - pathEnd: 0.89, - path: new LinearPath(Positions.laitelaSecondCenter, Positions.laitelaSecondRight), + pathEnd: 0.83, + path: new LinearPath(Positions.laitelaSecondRight, Positions.laitelaThirdCenter), fill: "white", completeWidth: 6, incompleteWidth: 4, - }, - }, - "laitela-destabilization": { - visible: () => DarkMatterDimension(4).isUnlocked && ImaginaryUpgrade(19).isBought, - complete: () => Laitela.difficultyTier / 8, - node: { - incompleteClass: "c-celestial-nav__test-incomplete", - symbol: "ᛝ", - symbolScale: 1.6, - symbolOffset: "0.6", - fill: "white", - position: Positions.laitelaThirdCenter, - ring: { - rMajor: 15, - }, - alwaysShowLegend: true, - legend: { - text: complete => { - if (complete < 1) return [ - "Destabalize Lai'tela's Reality", - "To the point where you cannot", - "use any Dimensions", - `${format(Laitela.difficultyTier)} / ${format(8)}` - ]; - return [ - "Completely destabilized", - "Lai'tela's Reality", - ]; - }, - angle: 0, - diagonal: 15, - horizontal: 8, - }, - }, - connector: [ - { - pathStart: 0.11, - pathEnd: 0.83, - path: new LinearPath(Positions.laitelaSecondLeft, Positions.laitelaThirdCenter), - fill: "white", - completeWidth: 6, - incompleteWidth: 4, - }, { - pathStart: 0.11, - pathEnd: 0.83, - path: new LinearPath(Positions.laitelaSecondRight, Positions.laitelaThirdCenter), - fill: "white", - completeWidth: 6, - incompleteWidth: 4, - } - ] - }, - }; -}()); + } + ] + }, +}; diff --git a/javascripts/core/secret-formula/celestials/pelle-upgrades.js b/javascripts/core/secret-formula/celestials/pelle-upgrades.js index b1c51007d..afa3886b5 100644 --- a/javascripts/core/secret-formula/celestials/pelle-upgrades.js +++ b/javascripts/core/secret-formula/celestials/pelle-upgrades.js @@ -1,190 +1,189 @@ import { GameDatabase } from "../game-database"; -GameDatabase.celestials.pelle.upgrades = (function() { - const formatCost = c => format(c, 2); - // eslint-disable-next-line max-params - const expWithIncreasedScale = (base1, base2, incScale, coeff, x) => - Decimal.pow(base1, x).times(Decimal.pow(base2, x - incScale).max(1)).times(coeff); +const formatCost = c => format(c, 2); +// eslint-disable-next-line max-params +const expWithIncreasedScale = (base1, base2, incScale, coeff, x) => + Decimal.pow(base1, x).times(Decimal.pow(base2, x - incScale).max(1)).times(coeff); - const rebuyable = config => { - const { id, description, cost, effect, formatEffect, cap } = config; - return { - id, - description, - cost: () => expWithIncreasedScale(...cost, player.celestials.pelle.rebuyables[id]), - formatCost, - cap, - effect: (x = player.celestials.pelle.rebuyables[id]) => effect(x), - formatEffect, - rebuyable: true - }; - }; +const rebuyable = config => { + const { id, description, cost, effect, formatEffect, cap } = config; return { - antimatterDimensionMult: rebuyable({ - id: "antimatterDimensionMult", - description: "Gain a multiplier to Antimatter Dimensions", - cost: [10, 1e3, 41, 100], - effect: x => Pelle.antimatterDimensionMult(x), - formatEffect: x => formatX(x, 2, 2), - cap: 44 - }), - timeSpeedMult: rebuyable({ - id: "timeSpeedMult", - description: "Gain a multiplier to game speed", - cost: [20, 1e3, 30, 1e5], - effect: x => Decimal.pow(1.3, x), - formatEffect: x => formatX(x, 2, 2), - cap: 35 - }), - glyphLevels: rebuyable({ - id: "glyphLevels", - description: "Increase the Glyph level allowed in Pelle", - cost: [30, 1e3, 25, 1e15], - effect: x => Math.floor(((3 * (x + 1)) - 2) ** 1.6), - formatEffect: x => formatInt(x), - cap: 26 - }), - infConversion: rebuyable({ - id: "infConversion", - description: "Increase Infinity Power conversion rate", - cost: [40, 1e3, 20, 1e18], - effect: x => (x * 3.5) ** 0.37, - formatEffect: x => `+${format(x, 2, 2)}`, - cap: 21 - }), - galaxyPower: rebuyable({ - id: "galaxyPower", - description: "Multiply Galaxy power", - cost: [1000, 1e3, 10, 1e30], - effect: x => 1 + x / 50, - formatEffect: x => formatX(x, 2, 2), - cap: 9 - }), - antimatterDimAutobuyers1: { - id: 0, - description: "Gain back Autobuyers for Antimatter Dimensions 1-4", - cost: 1e5, - formatCost, - }, - dimBoostAutobuyer: { - id: 1, - description: "Gain back the Autobuyer for Dimension Boosts", - cost: 5e5, - formatCost, - }, - keepAutobuyers: { - id: 2, - description: "Keep your Autobuyer upgrades on Armageddon", - cost: 5e6, - formatCost, - }, - antimatterDimAutobuyers2: { - id: 3, - description: "Gain back Autobuyers for Antimatter Dimensions 5-8", - cost: 2.5e7, - formatCost, - }, - galaxyAutobuyer: { - id: 4, - description: "Gain back the Autobuyer for Antimatter Galaxies", - cost: 1e8, - formatCost, - }, - tickspeedAutobuyer: { - id: 5, - description: "Gain back the Autobuyer for Tickspeed", - cost: 1e9, - formatCost, - }, - keepInfinityUpgrades: { - id: 6, - description: "Keep Infinity Upgrades on Armageddon", - cost: 1e10, - formatCost, - }, - keepBreakInfinityUpgrades: { - id: 7, - description: "Keep Break Infinity Upgrades on Armageddon", - cost: 1e12, - formatCost, - }, - IDAutobuyers: { - id: 8, - description: "Gain back Infinity Dimension Autobuyers", - cost: 1e14, - formatCost, - }, - keepInfinityChallenges: { - id: 9, - description: "You keep your Infinity Challenge unlocks and completions through Armageddons", - cost: 1e15, - formatCost, - }, - replicantiAutobuyers: { - id: 10, - description: "Gain back Replicanti Upgrade Autobuyers", - cost: 1e17, - formatCost, - }, - replicantiGalaxyNoReset: { - id: 11, - description: "Replicanti Galaxies don't reset on Infinity", - cost: 1e19, - formatCost, - }, - eternitiesNoReset: { - id: 12, - description: "Eternities do not reset on Armageddon", - cost: 1e20, - formatCost, - }, - timeStudiesNoReset: { - id: 13, - description: "Time Studies and Theorems do not reset on Armageddon", - cost: 1e21, - formatCost, - }, - replicantiStayUnlocked: { - id: 14, - description: "Replicanti stays unlocked on Armageddon", - cost: 1e22, - formatCost, - }, - keepEternityUpgrades: { - id: 15, - description: "Keep Eternity Upgrades on Armageddon", - cost: 1e24, - formatCost, - }, - TDAutobuyers: { - id: 16, - description: "Gain back Time Dimension Autobuyers", - cost: 1e25, - formatCost, - }, - keepEternityChallenges: { - id: 17, - description: "You keep your Eternity Challenge completions through Armageddons", - cost: 1e26, - formatCost, - }, - dimBoostResetsNothing: { - id: 18, - description: "Dimension Boosts no longer reset anything", - cost: 1e30, - formatCost, - }, - dilationUpgradesNoReset: { - id: 19, - description: "Keep Dilation Upgrades on Armageddon", - cost: 1e45, - formatCost, - }, - tachyonParticlesNoReset: { - id: 20, - description: "Keep Tachyon Particles on Armageddon", - cost: 1e50, - formatCost, - } + id, + description, + cost: () => expWithIncreasedScale(...cost, player.celestials.pelle.rebuyables[id]), + formatCost, + cap, + effect: (x = player.celestials.pelle.rebuyables[id]) => effect(x), + formatEffect, + rebuyable: true }; -}()); +}; + +GameDatabase.celestials.pelle.upgrades = { + antimatterDimensionMult: rebuyable({ + id: "antimatterDimensionMult", + description: "Gain a multiplier to Antimatter Dimensions", + cost: [10, 1e3, 41, 100], + effect: x => Pelle.antimatterDimensionMult(x), + formatEffect: x => formatX(x, 2, 2), + cap: 44 + }), + timeSpeedMult: rebuyable({ + id: "timeSpeedMult", + description: "Gain a multiplier to game speed", + cost: [20, 1e3, 30, 1e5], + effect: x => Decimal.pow(1.3, x), + formatEffect: x => formatX(x, 2, 2), + cap: 35 + }), + glyphLevels: rebuyable({ + id: "glyphLevels", + description: "Increase the Glyph level allowed in Pelle", + cost: [30, 1e3, 25, 1e15], + effect: x => Math.floor(((3 * (x + 1)) - 2) ** 1.6), + formatEffect: x => formatInt(x), + cap: 26 + }), + infConversion: rebuyable({ + id: "infConversion", + description: "Increase Infinity Power conversion rate", + cost: [40, 1e3, 20, 1e18], + effect: x => (x * 3.5) ** 0.37, + formatEffect: x => `+${format(x, 2, 2)}`, + cap: 21 + }), + galaxyPower: rebuyable({ + id: "galaxyPower", + description: "Multiply Galaxy power", + cost: [1000, 1e3, 10, 1e30], + effect: x => 1 + x / 50, + formatEffect: x => formatX(x, 2, 2), + cap: 9 + }), + antimatterDimAutobuyers1: { + id: 0, + description: "Gain back Autobuyers for Antimatter Dimensions 1-4", + cost: 1e5, + formatCost, + }, + dimBoostAutobuyer: { + id: 1, + description: "Gain back the Autobuyer for Dimension Boosts", + cost: 5e5, + formatCost, + }, + keepAutobuyers: { + id: 2, + description: "Keep your Autobuyer upgrades on Armageddon", + cost: 5e6, + formatCost, + }, + antimatterDimAutobuyers2: { + id: 3, + description: "Gain back Autobuyers for Antimatter Dimensions 5-8", + cost: 2.5e7, + formatCost, + }, + galaxyAutobuyer: { + id: 4, + description: "Gain back the Autobuyer for Antimatter Galaxies", + cost: 1e8, + formatCost, + }, + tickspeedAutobuyer: { + id: 5, + description: "Gain back the Autobuyer for Tickspeed", + cost: 1e9, + formatCost, + }, + keepInfinityUpgrades: { + id: 6, + description: "Keep Infinity Upgrades on Armageddon", + cost: 1e10, + formatCost, + }, + keepBreakInfinityUpgrades: { + id: 7, + description: "Keep Break Infinity Upgrades on Armageddon", + cost: 1e12, + formatCost, + }, + IDAutobuyers: { + id: 8, + description: "Gain back Infinity Dimension Autobuyers", + cost: 1e14, + formatCost, + }, + keepInfinityChallenges: { + id: 9, + description: "You keep your Infinity Challenge unlocks and completions through Armageddons", + cost: 1e15, + formatCost, + }, + replicantiAutobuyers: { + id: 10, + description: "Gain back Replicanti Upgrade Autobuyers", + cost: 1e17, + formatCost, + }, + replicantiGalaxyNoReset: { + id: 11, + description: "Replicanti Galaxies don't reset on Infinity", + cost: 1e19, + formatCost, + }, + eternitiesNoReset: { + id: 12, + description: "Eternities do not reset on Armageddon", + cost: 1e20, + formatCost, + }, + timeStudiesNoReset: { + id: 13, + description: "Time Studies and Theorems do not reset on Armageddon", + cost: 1e21, + formatCost, + }, + replicantiStayUnlocked: { + id: 14, + description: "Replicanti stays unlocked on Armageddon", + cost: 1e22, + formatCost, + }, + keepEternityUpgrades: { + id: 15, + description: "Keep Eternity Upgrades on Armageddon", + cost: 1e24, + formatCost, + }, + TDAutobuyers: { + id: 16, + description: "Gain back Time Dimension Autobuyers", + cost: 1e25, + formatCost, + }, + keepEternityChallenges: { + id: 17, + description: "You keep your Eternity Challenge completions through Armageddons", + cost: 1e26, + formatCost, + }, + dimBoostResetsNothing: { + id: 18, + description: "Dimension Boosts no longer reset anything", + cost: 1e30, + formatCost, + }, + dilationUpgradesNoReset: { + id: 19, + description: "Keep Dilation Upgrades on Armageddon", + cost: 1e45, + formatCost, + }, + tachyonParticlesNoReset: { + id: 20, + description: "Keep Tachyon Particles on Armageddon", + cost: 1e50, + formatCost, + } +}; diff --git a/javascripts/core/secret-formula/celestials/perk-shop.js b/javascripts/core/secret-formula/celestials/perk-shop.js index af1c23607..8d5d26a7a 100644 --- a/javascripts/core/secret-formula/celestials/perk-shop.js +++ b/javascripts/core/secret-formula/celestials/perk-shop.js @@ -1,87 +1,86 @@ import { GameDatabase } from "../game-database"; -GameDatabase.celestials.perkShop = (function() { - function rebuyableCost(initialCost, increment, id) { - return initialCost * Math.pow(increment, player.celestials.teresa.perkShop[id]); - } - function rebuyable(config) { - return { - id: config.id, - cost: () => (config.cost ? config.cost() : rebuyableCost(config.initialCost, config.increment, config.id)), - otherReq: config.otherReq, - cap: config.cap, - costCap: config.costCap, - description: config.description, - effect: () => config.effect(player.celestials.teresa.perkShop[config.id]), - formatEffect: config.formatEffect, - formatCost: config.formatCost, - rebuyable: true - }; - } +function rebuyableCost(initialCost, increment, id) { + return initialCost * Math.pow(increment, player.celestials.teresa.perkShop[id]); +} +function rebuyable(config) { return { - glyphLevel: rebuyable({ - id: 0, - initialCost: 1, - increment: 2, - description: () => `Increase Glyph levels by ${formatPercents(0.05)}`, - effect: bought => Math.pow(1.05, bought), - formatEffect: value => formatX(value, 2, 2), - formatCost: value => format(value, 2), - costCap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 1048576 : 2048), - cap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? Math.pow(1.05, 20) : Math.pow(1.05, 11)) - }), - rmMult: rebuyable({ - id: 1, - initialCost: 1, - increment: 2, - description: "Double Reality Machine gain", - effect: bought => Math.pow(2, bought), - formatEffect: value => formatX(value, 2), - formatCost: value => format(value, 2), - costCap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 1048576 : 2048), - cap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 1048576 : 2048) - }), - bulkDilation: rebuyable({ - id: 2, - initialCost: 100, - increment: 2, - description: "Buy twice as many Dilation Upgrades at once.", - effect: bought => Math.pow(2, bought), - formatEffect: value => formatX(value, 2), - formatCost: value => format(value, 2), - costCap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 1638400 : 1600), - cap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 16384 : 16), - }), - autoSpeed: rebuyable({ - id: 3, - initialCost: 1000, - increment: 2, - description: () => `Infinity Dimension, Time Dimension, Dilation, - and Replicanti autobuyers are ${formatX(2)} faster.`, - effect: bought => Math.pow(2, bought), - formatEffect: value => formatX(value, 2), - formatCost: value => format(value, 2), - costCap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 64000 : 4000), - cap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 64 : 4) - }), - musicGlyph: rebuyable({ - id: 4, - description: () => `Receive a Music Glyph of a random type that is ${formatPercents(0.8)} of your highest level. - (Try clicking it!)`, - cost: () => 1, - formatCost: value => formatInt(value), - costCap: () => Number.MAX_VALUE, - cap: () => Number.MAX_VALUE - }), - // Only appears with the perk shop increase upgrade - fillMusicGlyph: rebuyable({ - id: 5, - description: () => `Fill all empty slots in your inventory with Music Glyphs`, - cost: () => Math.clampMin(Glyphs.freeInventorySpace, 1), - otherReq: () => Glyphs.freeInventorySpace > 0, - formatCost: value => formatInt(value), - costCap: () => Number.MAX_VALUE, - cap: () => Number.MAX_VALUE - }), + id: config.id, + cost: () => (config.cost ? config.cost() : rebuyableCost(config.initialCost, config.increment, config.id)), + otherReq: config.otherReq, + cap: config.cap, + costCap: config.costCap, + description: config.description, + effect: () => config.effect(player.celestials.teresa.perkShop[config.id]), + formatEffect: config.formatEffect, + formatCost: config.formatCost, + rebuyable: true }; -}()); +} + +GameDatabase.celestials.perkShop = { + glyphLevel: rebuyable({ + id: 0, + initialCost: 1, + increment: 2, + description: () => `Increase Glyph levels by ${formatPercents(0.05)}`, + effect: bought => Math.pow(1.05, bought), + formatEffect: value => formatX(value, 2, 2), + formatCost: value => format(value, 2), + costCap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 1048576 : 2048), + cap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? Math.pow(1.05, 20) : Math.pow(1.05, 11)) + }), + rmMult: rebuyable({ + id: 1, + initialCost: 1, + increment: 2, + description: "Double Reality Machine gain", + effect: bought => Math.pow(2, bought), + formatEffect: value => formatX(value, 2), + formatCost: value => format(value, 2), + costCap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 1048576 : 2048), + cap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 1048576 : 2048) + }), + bulkDilation: rebuyable({ + id: 2, + initialCost: 100, + increment: 2, + description: "Buy twice as many Dilation Upgrades at once.", + effect: bought => Math.pow(2, bought), + formatEffect: value => formatX(value, 2), + formatCost: value => format(value, 2), + costCap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 1638400 : 1600), + cap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 16384 : 16), + }), + autoSpeed: rebuyable({ + id: 3, + initialCost: 1000, + increment: 2, + description: () => `Infinity Dimension, Time Dimension, Dilation, + and Replicanti autobuyers are ${formatX(2)} faster.`, + effect: bought => Math.pow(2, bought), + formatEffect: value => formatX(value, 2), + formatCost: value => format(value, 2), + costCap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 64000 : 4000), + cap: () => (Ra.unlocks.perkShopIncrease.canBeApplied ? 64 : 4) + }), + musicGlyph: rebuyable({ + id: 4, + description: () => `Receive a Music Glyph of a random type that is ${formatPercents(0.8)} of your highest level. + (Try clicking it!)`, + cost: () => 1, + formatCost: value => formatInt(value), + costCap: () => Number.MAX_VALUE, + cap: () => Number.MAX_VALUE + }), + // Only appears with the perk shop increase upgrade + fillMusicGlyph: rebuyable({ + id: 5, + description: () => `Fill all empty slots in your inventory with Music Glyphs`, + cost: () => Math.clampMin(Glyphs.freeInventorySpace, 1), + otherReq: () => Glyphs.freeInventorySpace > 0, + formatCost: value => formatInt(value), + costCap: () => Number.MAX_VALUE, + cap: () => Number.MAX_VALUE + }), +}; diff --git a/javascripts/core/secret-formula/eternity/dilation-upgrades.js b/javascripts/core/secret-formula/eternity/dilation-upgrades.js index 44db5a33a..741af3767 100644 --- a/javascripts/core/secret-formula/eternity/dilation-upgrades.js +++ b/javascripts/core/secret-formula/eternity/dilation-upgrades.js @@ -1,190 +1,189 @@ import { DC } from "../../constants"; import { GameDatabase } from "../game-database"; -GameDatabase.eternity.dilation = (function() { - function rebuyableCost(initialCost, increment, id) { - return Decimal.multiply(initialCost, Decimal.pow(increment, player.dilation.rebuyables[id])); - } - function rebuyable(config) { - return { - id: config.id, - cost: () => rebuyableCost(config.initialCost, config.increment, config.id), - initialCost: config.initialCost, - increment: config.increment, - description: config.description, - effect: () => config.effect(player.dilation.rebuyables[config.id]), - formatEffect: config.formatEffect, - formatCost: config.formatCost, - purchaseCap: config.purchaseCap, - reachedCap: () => player.dilation.rebuyables[config.id] >= config.purchaseCap, - pelleOnly: Boolean(config.pelleOnly), - rebuyable: true - }; - } +function rebuyableCost(initialCost, increment, id) { + return Decimal.multiply(initialCost, Decimal.pow(increment, player.dilation.rebuyables[id])); +} +function rebuyable(config) { return { - dtGain: rebuyable({ - id: 1, - initialCost: 1e5, - increment: 10, - description: () => - (SingularityMilestone.dilatedTimeFromSingularities.isUnlocked - ? `${formatX(2 * SingularityMilestone.dilatedTimeFromSingularities.effectValue, 2, 2)} Dilated Time gain` - : "Double Dilated Time gain"), - effect: bought => { - const base = SingularityMilestone.dilatedTimeFromSingularities.isUnlocked - ? 2 * SingularityMilestone.dilatedTimeFromSingularities.effectValue - : 2; - return Decimal.pow(base, bought); - }, - formatEffect: value => formatX(value, 2), - formatCost: value => format(value, 2), - purchaseCap: Number.MAX_VALUE - }), - galaxyThreshold: rebuyable({ - id: 2, - initialCost: 1e6, - increment: 100, - description: () => - (Perk.bypassTGReset.isBought - ? "Reset Tachyon Galaxies, but lower their threshold" - : "Reset Dilated Time and Tachyon Galaxies, but lower their threshold"), - // The 38th purchase is at 1e80, and is the last purchase. - effect: bought => (bought < 38 ? Math.pow(0.8, bought) : 0), - formatEffect: effect => { - if (effect === 0) return `${formatX(getTachyonGalaxyMult(effect), 4, 4)}`; - const nextEffect = effect === Math.pow(0.8, 37) ? 0 : 0.8 * effect; - return `${formatX(getTachyonGalaxyMult(effect), 4, 4)} ➜ - Next: ${formatX(getTachyonGalaxyMult(nextEffect), 4, 4)}`; - }, - formatCost: value => format(value, 2), - purchaseCap: 38 - }), - tachyonGain: rebuyable({ - id: 3, - initialCost: 1e7, - increment: 20, - description: () => { - if (Pelle.isDoomed) return `Multiply the amount of Tachyon Particles gained by ${formatInt(1)}`; - if (Enslaved.isRunning) return `Multiply the amount of Tachyon Particles gained - by ${Math.pow(3, Enslaved.tachyonNerf).toFixed(2)}`; - return "Triple the amount of Tachyon Particles gained"; - }, - effect: bought => { - if (Pelle.isDoomed) return DC.D1.pow(bought); - return DC.D3.pow(bought); - }, - formatEffect: value => formatX(value, 2), - formatCost: value => format(value, 2), - purchaseCap: Number.MAX_VALUE - }), - doubleGalaxies: { - id: 4, - cost: 5e6, - description: () => `Gain twice as many Tachyon Galaxies, up to ${formatInt(1000)}`, - effect: 2 - }, - tdMultReplicanti: { - id: 5, - cost: 1e9, - description: () => { - const rep10 = replicantiMult().pLog10(); - let multiplier = "0.1"; - if (rep10 > 9000) { - const ratio = DilationUpgrade.tdMultReplicanti.effectValue.pLog10() / rep10; - if (ratio < 0.095) { - multiplier = ratio.toFixed(2); - } - } - return `Time Dimensions are affected by Replicanti multiplier ${formatPow(multiplier, 1, 3)}, reduced - effect above ${formatX(DC.E9000)}`; - }, - effect: () => { - let rep10 = replicantiMult().pLog10() * 0.1; - rep10 = rep10 > 9000 ? 9000 + 0.5 * (rep10 - 9000) : rep10; - return Decimal.pow10(rep10); - }, - formatEffect: value => formatX(value, 2, 1) - }, - ndMultDT: { - id: 6, - cost: 5e7, - description: "Antimatter Dimension multiplier based on Dilated Time, unaffected by Time Dilation", - effect: () => Currency.dilatedTime.value.pow(308).clampMin(1), - formatEffect: value => formatX(value, 2, 1) - }, - ipMultDT: { - id: 7, - cost: 2e12, - description: "Gain a multiplier to Infinity Points based on Dilated Time", - effect: () => Currency.dilatedTime.value.pow(1000).clampMin(1), - formatEffect: value => formatX(value, 2, 1), - cap: () => Effarig.eternityCap - }, - timeStudySplit: { - id: 8, - cost: 1e10, - description: "You can buy all three Time Study paths from the Dimension Split" - }, - dilationPenalty: { - id: 9, - cost: 1e11, - description: () => `Reduce the Dilation penalty (${formatPow(1.05, 2, 2)} after reduction)`, - effect: 1.05, - }, - ttGenerator: { - id: 10, - cost: 1e15, - description: "Generate Time Theorems based on Tachyon Particles", - effect: () => Currency.tachyonParticles.value.div(20000), - formatEffect: value => `${format(value, 2, 1)}/sec` - }, - dtGainPelle: rebuyable({ - id: 11, - initialCost: 1e14, - increment: 100, - pelleOnly: true, - description: () => `${formatX(5)} Dilated Time gain`, - effect: bought => Decimal.pow(5, bought), - formatEffect: value => formatX(value, 2), - formatCost: value => format(value, 2), - purchaseCap: Number.MAX_VALUE - }), - galaxyMultiplier: rebuyable({ - id: 12, - initialCost: 1e15, - increment: 1000, - pelleOnly: true, - description: () => "Multiply Tachyon Galaxies gained", - effect: bought => bought + 1, - formatEffect: value => `${formatX(value, 2)} ➜ ${formatX(value + 1, 2)}`, - formatCost: value => format(value, 2), - purchaseCap: Number.MAX_VALUE - }), - tickspeedPower: rebuyable({ - id: 13, - initialCost: 1e16, - increment: 1e4, - pelleOnly: true, - description: () => `Gain a power to tickspeed effect`, - effect: bought => 1 + bought * 0.03, - formatEffect: value => `${formatPow(value, 2, 2)} ➜ ${formatPow(value + 0.03, 2, 2)}`, - formatCost: value => format(value, 2), - purchaseCap: Number.MAX_VALUE - }), - galaxyThresholdPelle: { - id: 14, - cost: 1e45, - pelleOnly: true, - description: "Cubic root Tachyon Galaxy threshold", - effect: 1 / 3 - }, - flatDilationMult: { - id: 15, - cost: 1e55, - pelleOnly: true, - description: () => `Gain more Dilated Time based on EP`, - effect: () => 1e9 ** Math.min((Math.max(player.eternityPoints.log10() - 1500, 0) / 2500) ** 1.2, 1), - formatEffect: value => formatX(value, 2, 2) - }, + id: config.id, + cost: () => rebuyableCost(config.initialCost, config.increment, config.id), + initialCost: config.initialCost, + increment: config.increment, + description: config.description, + effect: () => config.effect(player.dilation.rebuyables[config.id]), + formatEffect: config.formatEffect, + formatCost: config.formatCost, + purchaseCap: config.purchaseCap, + reachedCap: () => player.dilation.rebuyables[config.id] >= config.purchaseCap, + pelleOnly: Boolean(config.pelleOnly), + rebuyable: true }; -}()); +} + +GameDatabase.eternity.dilation = { + dtGain: rebuyable({ + id: 1, + initialCost: 1e5, + increment: 10, + description: () => + (SingularityMilestone.dilatedTimeFromSingularities.isUnlocked + ? `${formatX(2 * SingularityMilestone.dilatedTimeFromSingularities.effectValue, 2, 2)} Dilated Time gain` + : "Double Dilated Time gain"), + effect: bought => { + const base = SingularityMilestone.dilatedTimeFromSingularities.isUnlocked + ? 2 * SingularityMilestone.dilatedTimeFromSingularities.effectValue + : 2; + return Decimal.pow(base, bought); + }, + formatEffect: value => formatX(value, 2), + formatCost: value => format(value, 2), + purchaseCap: Number.MAX_VALUE + }), + galaxyThreshold: rebuyable({ + id: 2, + initialCost: 1e6, + increment: 100, + description: () => + (Perk.bypassTGReset.isBought + ? "Reset Tachyon Galaxies, but lower their threshold" + : "Reset Dilated Time and Tachyon Galaxies, but lower their threshold"), + // The 38th purchase is at 1e80, and is the last purchase. + effect: bought => (bought < 38 ? Math.pow(0.8, bought) : 0), + formatEffect: effect => { + if (effect === 0) return `${formatX(getTachyonGalaxyMult(effect), 4, 4)}`; + const nextEffect = effect === Math.pow(0.8, 37) ? 0 : 0.8 * effect; + return `${formatX(getTachyonGalaxyMult(effect), 4, 4)} ➜ + Next: ${formatX(getTachyonGalaxyMult(nextEffect), 4, 4)}`; + }, + formatCost: value => format(value, 2), + purchaseCap: 38 + }), + tachyonGain: rebuyable({ + id: 3, + initialCost: 1e7, + increment: 20, + description: () => { + if (Pelle.isDoomed) return `Multiply the amount of Tachyon Particles gained by ${formatInt(1)}`; + if (Enslaved.isRunning) return `Multiply the amount of Tachyon Particles gained + by ${Math.pow(3, Enslaved.tachyonNerf).toFixed(2)}`; + return "Triple the amount of Tachyon Particles gained"; + }, + effect: bought => { + if (Pelle.isDoomed) return DC.D1.pow(bought); + return DC.D3.pow(bought); + }, + formatEffect: value => formatX(value, 2), + formatCost: value => format(value, 2), + purchaseCap: Number.MAX_VALUE + }), + doubleGalaxies: { + id: 4, + cost: 5e6, + description: () => `Gain twice as many Tachyon Galaxies, up to ${formatInt(1000)}`, + effect: 2 + }, + tdMultReplicanti: { + id: 5, + cost: 1e9, + description: () => { + const rep10 = replicantiMult().pLog10(); + let multiplier = "0.1"; + if (rep10 > 9000) { + const ratio = DilationUpgrade.tdMultReplicanti.effectValue.pLog10() / rep10; + if (ratio < 0.095) { + multiplier = ratio.toFixed(2); + } + } + return `Time Dimensions are affected by Replicanti multiplier ${formatPow(multiplier, 1, 3)}, reduced + effect above ${formatX(DC.E9000)}`; + }, + effect: () => { + let rep10 = replicantiMult().pLog10() * 0.1; + rep10 = rep10 > 9000 ? 9000 + 0.5 * (rep10 - 9000) : rep10; + return Decimal.pow10(rep10); + }, + formatEffect: value => formatX(value, 2, 1) + }, + ndMultDT: { + id: 6, + cost: 5e7, + description: "Antimatter Dimension multiplier based on Dilated Time, unaffected by Time Dilation", + effect: () => Currency.dilatedTime.value.pow(308).clampMin(1), + formatEffect: value => formatX(value, 2, 1) + }, + ipMultDT: { + id: 7, + cost: 2e12, + description: "Gain a multiplier to Infinity Points based on Dilated Time", + effect: () => Currency.dilatedTime.value.pow(1000).clampMin(1), + formatEffect: value => formatX(value, 2, 1), + cap: () => Effarig.eternityCap + }, + timeStudySplit: { + id: 8, + cost: 1e10, + description: "You can buy all three Time Study paths from the Dimension Split" + }, + dilationPenalty: { + id: 9, + cost: 1e11, + description: () => `Reduce the Dilation penalty (${formatPow(1.05, 2, 2)} after reduction)`, + effect: 1.05, + }, + ttGenerator: { + id: 10, + cost: 1e15, + description: "Generate Time Theorems based on Tachyon Particles", + effect: () => Currency.tachyonParticles.value.div(20000), + formatEffect: value => `${format(value, 2, 1)}/sec` + }, + dtGainPelle: rebuyable({ + id: 11, + initialCost: 1e14, + increment: 100, + pelleOnly: true, + description: () => `${formatX(5)} Dilated Time gain`, + effect: bought => Decimal.pow(5, bought), + formatEffect: value => formatX(value, 2), + formatCost: value => format(value, 2), + purchaseCap: Number.MAX_VALUE + }), + galaxyMultiplier: rebuyable({ + id: 12, + initialCost: 1e15, + increment: 1000, + pelleOnly: true, + description: () => "Multiply Tachyon Galaxies gained", + effect: bought => bought + 1, + formatEffect: value => `${formatX(value, 2)} ➜ ${formatX(value + 1, 2)}`, + formatCost: value => format(value, 2), + purchaseCap: Number.MAX_VALUE + }), + tickspeedPower: rebuyable({ + id: 13, + initialCost: 1e16, + increment: 1e4, + pelleOnly: true, + description: () => `Gain a power to tickspeed effect`, + effect: bought => 1 + bought * 0.03, + formatEffect: value => `${formatPow(value, 2, 2)} ➜ ${formatPow(value + 0.03, 2, 2)}`, + formatCost: value => format(value, 2), + purchaseCap: Number.MAX_VALUE + }), + galaxyThresholdPelle: { + id: 14, + cost: 1e45, + pelleOnly: true, + description: "Cubic root Tachyon Galaxy threshold", + effect: 1 / 3 + }, + flatDilationMult: { + id: 15, + cost: 1e55, + pelleOnly: true, + description: () => `Gain more Dilated Time based on EP`, + effect: () => 1e9 ** Math.min((Math.max(player.eternityPoints.log10() - 1500, 0) / 2500) ** 1.2, 1), + formatEffect: value => formatX(value, 2, 2) + }, +}; diff --git a/javascripts/core/secret-formula/eternity/time-studies/normal-time-studies.js b/javascripts/core/secret-formula/eternity/time-studies/normal-time-studies.js index 3c42f10f6..6f6d3bd13 100644 --- a/javascripts/core/secret-formula/eternity/time-studies/normal-time-studies.js +++ b/javascripts/core/secret-formula/eternity/time-studies/normal-time-studies.js @@ -1,6 +1,21 @@ import { DC } from "../../../constants"; import { GameDatabase } from "../../game-database"; +const thisInfinityMult = thisInfinity => { + // All "this inf time" or "best inf time" mults are * 10 + const scaledInfinity = thisInfinity * 10 + 1; + const cappedInfinity = Math.min(Math.pow(scaledInfinity, 0.125), 500); + return DC.D15.pow(Math.log(scaledInfinity) * cappedInfinity); +}; +const passiveIPMult = () => { + const isEffarigLimited = Effarig.isRunning && Effarig.currentStage === EFFARIG_STAGES.ETERNITY; + const normalValue = Perk.studyPassive.isBought ? 1e50 : 1e25; + return isEffarigLimited + ? Math.min(normalValue, Effarig.eternityCap.toNumber()) + : normalValue; +}; + + /** * List of time study specifications and attributes * { @@ -17,669 +32,654 @@ import { GameDatabase } from "../../game-database"; * @property {String} formatEffect Formatting function for effects, if the default formatting isn't appropriate * } */ -GameDatabase.eternity.timeStudies.normal = (function() { - const thisInfinityMult = thisInfinity => { - // All "this inf time" or "best inf time" mults are * 10 - const scaledInfinity = thisInfinity * 10 + 1; - const cappedInfinity = Math.min(Math.pow(scaledInfinity, 0.125), 500); - return DC.D15.pow(Math.log(scaledInfinity) * cappedInfinity); - }; - const passiveIPMult = () => { - const isEffarigLimited = Effarig.isRunning && Effarig.currentStage === EFFARIG_STAGES.ETERNITY; - const normalValue = Perk.studyPassive.isBought ? 1e50 : 1e25; - return isEffarigLimited - ? Math.min(normalValue, Effarig.eternityCap.toNumber()) - : normalValue; - }; - return [ - { - id: 11, - cost: 1, - // All requirements of an empty array will always evaluate to true, so this study is always purchasable - requirement: [], - reqType: TS_REQUIREMENT_TYPE.ALL, - description: "Tickspeed affects 1st Time Dimension with reduced effect", - effect: () => { - const tickspeed = Tickspeed.current.dividedBy(1000); - const firstPart = tickspeed.pow(0.005).times(0.95); - const secondPart = tickspeed.pow(0.0003).times(0.05); - return firstPart.plus(secondPart).reciprocate(); - }, - cap: DC.E2500, - formatEffect: value => formatX(value, 2, 1) +GameDatabase.eternity.timeStudies.normal = [ + { + id: 11, + cost: 1, + // All requirements of an empty array will always evaluate to true, so this study is always purchasable + requirement: [], + reqType: TS_REQUIREMENT_TYPE.ALL, + description: "Tickspeed affects 1st Time Dimension with reduced effect", + effect: () => { + const tickspeed = Tickspeed.current.dividedBy(1000); + const firstPart = tickspeed.pow(0.005).times(0.95); + const secondPart = tickspeed.pow(0.0003).times(0.05); + return firstPart.plus(secondPart).reciprocate(); }, - { - id: 21, - cost: 3, - requirement: [11], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `Improve Replicanti multiplier formula to - (log2(x)${formatPow(2)})+x${formatPow(0.032, 3, 3)}`, - effect: () => Replicanti.amount.pow(0.032) + cap: DC.E2500, + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 21, + cost: 3, + requirement: [11], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `Improve Replicanti multiplier formula to + (log2(x)${formatPow(2)})+x${formatPow(0.032, 3, 3)}`, + effect: () => Replicanti.amount.pow(0.032) + }, + { + id: 22, + cost: 2, + requirement: [11], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `Replicanti interval limit ${formatInt(50)}ms ➜ ${formatInt(1)}ms`, + effect: 1 + }, + { + id: 31, + cost: 3, + requirement: [21], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `Powers up bonuses that are based on your Infinities (Bonuses${formatPow(4)})`, + effect: 4 + }, + { + id: 32, + cost: 2, + requirement: [22], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: `You gain more Infinities based on Dimension Boosts`, + effect: () => Math.max(DimBoost.totalBoosts, 1), + formatEffect: value => formatX(value) + }, + { + id: 33, + cost: 2, + requirement: [21], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: "You keep half of your Replicanti Galaxies on Infinity" + }, + { + id: 41, + cost: 4, + requirement: [31], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `All Galaxies give a ${formatX(DC.D1_2, 1, 1)} multiplier to Infinity Points gained`, + effect: () => DC.D1_2.pow(Replicanti.galaxies.total + player.galaxies + player.dilation.totalTachyonGalaxies), + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 42, + cost: 6, + requirement: [32], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `Antimatter Galaxy requirement increases by ${formatInt(52)} + 8th Dimensions instead of ${formatInt(60)}`, + effect: 52 + }, + { + id: 51, + cost: 3, + requirement: [41, 42], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `You gain ${formatX(1e15)} more Infinity Points`, + effect: 1e15 + }, + { + id: 61, + cost: 3, + requirement: [51], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `You gain ${formatX(15)} more Eternity Points`, + effect: 15 + }, + { + id: 62, + cost: 3, + requirement: [42, () => Perk.bypassEC5Lock.isBought || EternityChallenge(5).completions > 0], + reqType: TS_REQUIREMENT_TYPE.ALL, + description: () => `You gain Replicanti ${formatInt(3)} times faster`, + effect: 3 + }, + { + id: 71, + cost: 4, + requirement: [61, () => Perk.studyECRequirement.isBought || !EternityChallenge(12).isUnlocked], + reqType: TS_REQUIREMENT_TYPE.DIMENSION_PATH, + description: "Dimensional Sacrifice affects all other Antimatter Dimensions with reduced effect", + effect: () => Sacrifice.totalBoost.pow(0.25).clampMin(1), + cap: DC.E210000, + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 72, + cost: 6, + requirement: [61, + () => Perk.studyECRequirement.isBought || + (!EternityChallenge(11).isUnlocked && !EternityChallenge(12).isUnlocked)], + reqType: TS_REQUIREMENT_TYPE.DIMENSION_PATH, + description: "Dimensional Sacrifice affects 4th Infinity Dimension with greatly reduced effect", + effect: () => Sacrifice.totalBoost.pow(0.04).clampMin(1), + cap: DC.E30000, + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 73, + cost: 5, + requirement: [61, () => Perk.studyECRequirement.isBought || !EternityChallenge(11).isUnlocked], + reqType: TS_REQUIREMENT_TYPE.DIMENSION_PATH, + description: "Dimensional Sacrifice affects 3rd Time Dimension with greatly reduced effect", + effect: () => Sacrifice.totalBoost.pow(0.005).clampMin(1), + cap: DC.E1300, + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 81, + cost: 4, + requirement: [71], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `Base Dimension Boost power becomes ${formatX(10)}`, + effect: 10 + }, + { + id: 82, + cost: 6, + requirement: [72], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: "Dimension Boosts affect Infinity Dimensions", + effect: () => DC.D1_0000109.pow(Math.pow(DimBoost.totalBoosts, 2)), + cap: DC.E1E7, + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 83, + cost: 5, + requirement: [73], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: "Dimension Boost multiplier based on tick upgrades gained from TDs", + effect: () => DC.D1_0004.pow(player.totalTickGained), + cap: DC.E30, + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 91, + cost: 4, + requirement: [81], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: "Antimatter Dimension multiplier based on time spent in this Eternity", + effect: () => Decimal.pow10(Math.min(Time.thisEternity.totalMinutes, 20) * 15), + cap: DC.E300, + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 92, + cost: 5, + requirement: [82], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: "Infinity Dimension multiplier based on fastest Eternity time", + effect: () => DC.D2.pow(60 / Math.max(Time.bestEternity.totalSeconds, 2)), + cap: DC.C2P30, + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 93, + cost: 7, + requirement: [83], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: "Time Dimension multiplier based on tick upgrades gained", + effect: () => Decimal.pow(player.totalTickGained, 0.25).clampMin(1), + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 101, + cost: 4, + requirement: [91], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: "Antimatter Dimension multiplier equal to Replicanti amount", + effect: () => Decimal.max(Replicanti.amount, 1), + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 102, + cost: 6, + requirement: [92], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: "Replicanti Galaxies boost Replicanti multiplier", + effect: () => DC.D5.pow(player.replicanti.galaxies), + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 103, + cost: 6, + requirement: [93], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: "Time Dimension multiplier equal to Replicanti Galaxy amount", + effect: () => Math.max(player.replicanti.galaxies, 1), + formatEffect: value => formatX(value, 2, 0) + }, + { + id: 111, + cost: 12, + requirement: [101, 102, 103], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => (Achievement(103).canBeApplied + ? `Make the Infinity Point formula better log(x/${formatFloat(307.8, 1)}) ➜ log(x/${formatInt(285)})` + : `Make the Infinity Point formula better log(x/${formatInt(308)}) ➜ log(x/${formatInt(285)})`), + effect: 285 + }, + { + id: 121, + cost: 9, + STCost: 2, + requirement: [111], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [122, 123], + description: () => (Perk.studyActiveEP.isBought + ? `You gain ${formatX(50)} more Eternity Points` + : `You gain more EP based on how fast your last ten Eternities + were${PlayerProgress.realityUnlocked() ? " (real time)" : ""}`), + effect: () => (Perk.studyActiveEP.isBought + ? 50 + : Math.clamp(250 / Player.averageRealTimePerEternity, 1, 50)), + formatEffect: value => (Perk.studyActiveEP.isBought ? undefined : formatX(value, 1, 1)), + cap: 50 + }, + { + id: 122, + cost: 9, + STCost: 2, + requirement: [111], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [121, 123], + description: () => (Perk.studyPassive.isBought + ? `You gain ${formatX(50)} more Eternity Points` + : `You gain ${formatX(35)} more Eternity Points`), + effect: () => (Perk.studyPassive.isBought ? 50 : 35) + }, + { + id: 123, + cost: 9, + STCost: 2, + requirement: [111], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [121, 122], + description: "You gain more Eternity Points based on time spent this Eternity", + effect: () => { + const perkEffect = TimeSpan.fromMinutes(Perk.studyIdleEP.effectOrDefault(0)); + const totalSeconds = Time.thisEternity.plus(perkEffect).totalSeconds; + return Math.sqrt(1.39 * totalSeconds); }, - { - id: 22, - cost: 2, - requirement: [11], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `Replicanti interval limit ${formatInt(50)}ms ➜ ${formatInt(1)}ms`, - effect: 1 + formatEffect: value => formatX(value, 1, 1) + }, + { + id: 131, + cost: 5, + STCost: 8, + requirement: [121], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [132, 133], + description: () => (Achievement(138).isUnlocked + ? `You can get ${formatPercents(0.5)} more Replicanti Galaxies` + : `Automatic Replicanti Galaxies are disabled, but you can get ${formatPercents(0.5)} more`), + effect: () => Math.floor(player.replicanti.boughtGalaxyCap / 2) + }, + { + id: 132, + cost: 5, + STCost: 8, + requirement: [122], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [131, 133], + description: () => (Perk.studyPassive.isBought && !Pelle.isDoomed + ? `Replicanti Galaxies are ${formatPercents(0.4)} stronger and Replicanti are ${format(3)} times faster` + : `Replicanti Galaxies are ${formatPercents(0.4)} stronger`), + effect: 0.4 + }, + { + id: 133, + cost: 5, + STCost: 8, + requirement: [123], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [131, 132], + description: () => (Achievement(138).isUnlocked + ? `Replicanti Galaxies are ${formatPercents(0.5)} stronger` + : `Replicanti are ${formatX(10)} slower until ${format(Number.MAX_VALUE, 2)}` + + `, but Replicanti Galaxies are ${formatPercents(0.5)} stronger`), + effect: 0.5 + }, + { + id: 141, + cost: 4, + STCost: 2, + requirement: [131], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [142, 143], + description: () => (Perk.studyActiveEP.isBought + ? `You gain ${formatX(DC.E45)} more Infinity Points` + : "Multiplier to Infinity Points, which decays over this Infinity"), + effect: () => (Perk.studyActiveEP.isBought + ? DC.E45 + : DC.E45.divide(thisInfinityMult(Time.thisInfinity.totalSeconds)).clampMin(1)), + formatEffect: value => (Perk.studyActiveEP.isBought ? undefined : formatX(value, 2, 1)) + }, + { + id: 142, + cost: 4, + STCost: 2, + requirement: [132], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [141, 143], + description: () => `You gain ${formatX(passiveIPMult())} more Infinity Points`, + effect: passiveIPMult, + cap: () => (Effarig.eternityCap === undefined ? undefined : Effarig.eternityCap.toNumber()) + }, + { + id: 143, + cost: 4, + STCost: 2, + requirement: [133], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [141, 142], + description: "Multiplier to Infinity Points, which increases over this Infinity", + effect: () => { + const perkEffect = TimeSpan.fromMinutes(Perk.studyIdleEP.effectOrDefault(0)); + const totalSeconds = Time.thisInfinity.plus(perkEffect).totalSeconds; + return thisInfinityMult(totalSeconds); }, - { - id: 31, - cost: 3, - requirement: [21], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `Powers up bonuses that are based on your Infinities (Bonuses${formatPow(4)})`, - effect: 4 + formatEffect: value => formatX(value, 2, 1), + cap: () => Effarig.eternityCap + }, + { + id: 151, + cost: 8, + requirement: [141, 142, 143], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `${formatX(1e4)} multiplier on all Time Dimensions`, + effect: 1e4 + }, + { + id: 161, + cost: 7, + requirement: [151], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `${formatX(DC.E616)} multiplier on all Antimatter Dimensions`, + effect: () => DC.E616 + }, + { + id: 162, + cost: 7, + requirement: [151], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `${formatX(1e11)} multiplier on all Infinity Dimensions`, + effect: 1e11 + }, + { + id: 171, + cost: 15, + requirement: [161, 162], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `Time Shard requirement for the next Tickspeed upgrade goes up slower + ${formatX(1.33, 0, 2)} ➜ ${formatX(1.25, 0, 2)}`, + effect: () => TS171_MULTIPLIER + }, + { + id: 181, + cost: 200, + requirement: [171, + () => EternityChallenge(1).completions > 0 || Perk.bypassEC1Lock.isBought, + () => EternityChallenge(2).completions > 0 || Perk.bypassEC2Lock.isBought, + () => EternityChallenge(3).completions > 0 || Perk.bypassEC3Lock.isBought], + reqType: TS_REQUIREMENT_TYPE.ALL, + description: () => `You gain ${formatPercents(0.01)} of your Infinity Points gained on crunch each second`, + effect: () => gainedInfinityPoints().times(Time.deltaTime / 100) + .timesEffectOf(Ra.unlocks.continuousTTBoost.effects.autoPrestige) + }, + { + id: 191, + cost: 400, + requirement: [181, () => EternityChallenge(10).completions > 0], + reqType: TS_REQUIREMENT_TYPE.ALL, + description: () => `After Eternity you permanently keep ${formatPercents(0.05)} + of your Infinities as Banked Infinities`, + effect: () => Currency.infinities.value.times(0.05).floor() + }, + { + id: 192, + cost: 730, + requirement: [181, () => EternityChallenge(10).completions > 0, () => !Enslaved.isRunning], + reqType: TS_REQUIREMENT_TYPE.ALL, + description: () => (Enslaved.isRunning + ? "There is not enough space in this Reality" + : `Replicanti can go beyond ${format(replicantiCap(), 2, 1)}, but growth slows down at higher amounts`) + }, + { + id: 193, + cost: 300, + requirement: [181, () => EternityChallenge(10).completions > 0], + reqType: TS_REQUIREMENT_TYPE.ALL, + description: "Antimatter Dimension multiplier based on Eternities", + effect: () => (DC.E13000.pow(Currency.eternities.value.div(1e6).clampMax(1))), + cap: DC.E13000, + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 201, + cost: 900, + requirement: [192], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: "Pick a second path from the Dimension Split" + }, + { + id: 211, + cost: 120, + requirement: [191], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `Dimension Boost requirement scaling is reduced by ${formatInt(5)}`, + effect: 5 + }, + { + id: 212, + cost: 150, + requirement: [191], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: "All Galaxies are stronger based on your Time Shards", + effect: () => Math.pow(Currency.timeShards.value.clampMin(2).log2(), 0.005), + cap: 1.1, + formatEffect: value => `+${formatPercents(value - 1, 3)}` + }, + { + id: 213, + cost: 200, + requirement: [193], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: () => `You gain Replicanti ${formatInt(20)} times faster`, + effect: 20 + }, + { + id: 214, + cost: 120, + requirement: [193], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + description: "Dimensional Sacrifice boosts the 8th Antimatter Dimension even more", + effect: () => { + const totalBoost = Sacrifice.totalBoost; + const firstPart = totalBoost.pow(7.6).clampMaxExponent(44000); + const secondPart = totalBoost.pow(1.05).clampMaxExponent(120000); + return firstPart.times(secondPart); }, - { - id: 32, - cost: 2, - requirement: [22], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: `You gain more Infinities based on Dimension Boosts`, - effect: () => Math.max(DimBoost.totalBoosts, 1), - formatEffect: value => formatX(value) + cap: DC.E164000, + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 221, + cost: 900, + STCost: 4, + requirement: [211], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [222], + description: "Time Dimension multiplier based on Dimension Boosts", + effect: () => DC.D1_0025.pow(DimBoost.totalBoosts), + formatEffect: value => formatX(value, 2, 1) + }, + { + id: 222, + cost: 900, + STCost: 4, + requirement: [211], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [221], + description: () => `Dimension Boost costs scale by another ${formatInt(2)} less`, + effect: 2 + }, + { + id: 223, + cost: 900, + STCost: 4, + requirement: [212], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [224], + description: () => `Distant Galaxy cost scaling starts ${formatInt(7)} Galaxies later`, + effect: 7 + }, + { + id: 224, + cost: 900, + STCost: 4, + requirement: [212], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [223], + description() { + const effect = TimeStudy(224).effectValue; + return `Distant Galaxy cost scaling starts ${quantifyInt("Galaxy", effect)} later + (${formatInt(1)} per ${formatInt(2000)} Dim Boosts)`; }, - { - id: 33, - cost: 2, - requirement: [21], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: "You keep half of your Replicanti Galaxies on Infinity" - }, - { - id: 41, - cost: 4, - requirement: [31], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `All Galaxies give a ${formatX(DC.D1_2, 1, 1)} multiplier to Infinity Points gained`, - effect: () => DC.D1_2.pow(Replicanti.galaxies.total + player.galaxies + player.dilation.totalTachyonGalaxies), - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 42, - cost: 6, - requirement: [32], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `Antimatter Galaxy requirement increases by ${formatInt(52)} - 8th Dimensions instead of ${formatInt(60)}`, - effect: 52 - }, - { - id: 51, - cost: 3, - requirement: [41, 42], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `You gain ${formatX(1e15)} more Infinity Points`, - effect: 1e15 - }, - { - id: 61, - cost: 3, - requirement: [51], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `You gain ${formatX(15)} more Eternity Points`, - effect: 15 - }, - { - id: 62, - cost: 3, - requirement: [42, () => Perk.bypassEC5Lock.isBought || EternityChallenge(5).completions > 0], - reqType: TS_REQUIREMENT_TYPE.ALL, - description: () => `You gain Replicanti ${formatInt(3)} times faster`, - effect: 3 - }, - { - id: 71, - cost: 4, - requirement: [61, () => Perk.studyECRequirement.isBought || !EternityChallenge(12).isUnlocked], - reqType: TS_REQUIREMENT_TYPE.DIMENSION_PATH, - description: "Dimensional Sacrifice affects all other Antimatter Dimensions with reduced effect", - effect: () => Sacrifice.totalBoost.pow(0.25).clampMin(1), - cap: DC.E210000, - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 72, - cost: 6, - requirement: [61, - () => Perk.studyECRequirement.isBought || - (!EternityChallenge(11).isUnlocked && !EternityChallenge(12).isUnlocked)], - reqType: TS_REQUIREMENT_TYPE.DIMENSION_PATH, - description: "Dimensional Sacrifice affects 4th Infinity Dimension with greatly reduced effect", - effect: () => Sacrifice.totalBoost.pow(0.04).clampMin(1), - cap: DC.E30000, - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 73, - cost: 5, - requirement: [61, () => Perk.studyECRequirement.isBought || !EternityChallenge(11).isUnlocked], - reqType: TS_REQUIREMENT_TYPE.DIMENSION_PATH, - description: "Dimensional Sacrifice affects 3rd Time Dimension with greatly reduced effect", - effect: () => Sacrifice.totalBoost.pow(0.005).clampMin(1), - cap: DC.E1300, - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 81, - cost: 4, - requirement: [71], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `Base Dimension Boost power becomes ${formatX(10)}`, - effect: 10 - }, - { - id: 82, - cost: 6, - requirement: [72], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: "Dimension Boosts affect Infinity Dimensions", - effect: () => DC.D1_0000109.pow(Math.pow(DimBoost.totalBoosts, 2)), - cap: DC.E1E7, - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 83, - cost: 5, - requirement: [73], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: "Dimension Boost multiplier based on tick upgrades gained from TDs", - effect: () => DC.D1_0004.pow(player.totalTickGained), - cap: DC.E30, - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 91, - cost: 4, - requirement: [81], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: "Antimatter Dimension multiplier based on time spent in this Eternity", - effect: () => Decimal.pow10(Math.min(Time.thisEternity.totalMinutes, 20) * 15), - cap: DC.E300, - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 92, - cost: 5, - requirement: [82], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: "Infinity Dimension multiplier based on fastest Eternity time", - effect: () => DC.D2.pow(60 / Math.max(Time.bestEternity.totalSeconds, 2)), - cap: DC.C2P30, - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 93, - cost: 7, - requirement: [83], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: "Time Dimension multiplier based on tick upgrades gained", - effect: () => Decimal.pow(player.totalTickGained, 0.25).clampMin(1), - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 101, - cost: 4, - requirement: [91], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: "Antimatter Dimension multiplier equal to Replicanti amount", - effect: () => Decimal.max(Replicanti.amount, 1), - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 102, - cost: 6, - requirement: [92], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: "Replicanti Galaxies boost Replicanti multiplier", - effect: () => DC.D5.pow(player.replicanti.galaxies), - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 103, - cost: 6, - requirement: [93], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: "Time Dimension multiplier equal to Replicanti Galaxy amount", - effect: () => Math.max(player.replicanti.galaxies, 1), - formatEffect: value => formatX(value, 2, 0) - }, - { - id: 111, - cost: 12, - requirement: [101, 102, 103], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => (Achievement(103).canBeApplied - ? `Make the Infinity Point formula better log(x/${formatFloat(307.8, 1)}) ➜ log(x/${formatInt(285)})` - : `Make the Infinity Point formula better log(x/${formatInt(308)}) ➜ log(x/${formatInt(285)})`), - effect: 285 - }, - { - id: 121, - cost: 9, - STCost: 2, - requirement: [111], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [122, 123], - description: () => (Perk.studyActiveEP.isBought - ? `You gain ${formatX(50)} more Eternity Points` - : `You gain more EP based on how fast your last ten Eternities - were${PlayerProgress.realityUnlocked() ? " (real time)" : ""}`), - effect: () => (Perk.studyActiveEP.isBought - ? 50 - : Math.clamp(250 / Player.averageRealTimePerEternity, 1, 50)), - formatEffect: value => (Perk.studyActiveEP.isBought ? undefined : formatX(value, 1, 1)), - cap: 50 - }, - { - id: 122, - cost: 9, - STCost: 2, - requirement: [111], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [121, 123], - description: () => (Perk.studyPassive.isBought - ? `You gain ${formatX(50)} more Eternity Points` - : `You gain ${formatX(35)} more Eternity Points`), - effect: () => (Perk.studyPassive.isBought ? 50 : 35) - }, - { - id: 123, - cost: 9, - STCost: 2, - requirement: [111], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [121, 122], - description: "You gain more Eternity Points based on time spent this Eternity", - effect: () => { - const perkEffect = TimeSpan.fromMinutes(Perk.studyIdleEP.effectOrDefault(0)); - const totalSeconds = Time.thisEternity.plus(perkEffect).totalSeconds; - return Math.sqrt(1.39 * totalSeconds); - }, - formatEffect: value => formatX(value, 1, 1) - }, - { - id: 131, - cost: 5, - STCost: 8, - requirement: [121], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [132, 133], - description: () => (Achievement(138).isUnlocked - ? `You can get ${formatPercents(0.5)} more Replicanti Galaxies` - : `Automatic Replicanti Galaxies are disabled, but you can get ${formatPercents(0.5)} more`), - effect: () => Math.floor(player.replicanti.boughtGalaxyCap / 2) - }, - { - id: 132, - cost: 5, - STCost: 8, - requirement: [122], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [131, 133], - description: () => (Perk.studyPassive.isBought && !Pelle.isDoomed - ? `Replicanti Galaxies are ${formatPercents(0.4)} stronger and Replicanti are ${format(3)} times faster` - : `Replicanti Galaxies are ${formatPercents(0.4)} stronger`), - effect: 0.4 - }, - { - id: 133, - cost: 5, - STCost: 8, - requirement: [123], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [131, 132], - description: () => (Achievement(138).isUnlocked - ? `Replicanti Galaxies are ${formatPercents(0.5)} stronger` - : `Replicanti are ${formatX(10)} slower until ${format(Number.MAX_VALUE, 2)}` + - `, but Replicanti Galaxies are ${formatPercents(0.5)} stronger`), - effect: 0.5 - }, - { - id: 141, - cost: 4, - STCost: 2, - requirement: [131], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [142, 143], - description: () => (Perk.studyActiveEP.isBought - ? `You gain ${formatX(DC.E45)} more Infinity Points` - : "Multiplier to Infinity Points, which decays over this Infinity"), - effect: () => (Perk.studyActiveEP.isBought - ? DC.E45 - : DC.E45.divide(thisInfinityMult(Time.thisInfinity.totalSeconds)).clampMin(1)), - formatEffect: value => (Perk.studyActiveEP.isBought ? undefined : formatX(value, 2, 1)) - }, - { - id: 142, - cost: 4, - STCost: 2, - requirement: [132], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [141, 143], - description: () => `You gain ${formatX(passiveIPMult())} more Infinity Points`, - effect: passiveIPMult, - cap: () => (Effarig.eternityCap === undefined ? undefined : Effarig.eternityCap.toNumber()) - }, - { - id: 143, - cost: 4, - STCost: 2, - requirement: [133], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [141, 142], - description: "Multiplier to Infinity Points, which increases over this Infinity", - effect: () => { - const perkEffect = TimeSpan.fromMinutes(Perk.studyIdleEP.effectOrDefault(0)); - const totalSeconds = Time.thisInfinity.plus(perkEffect).totalSeconds; - return thisInfinityMult(totalSeconds); - }, - formatEffect: value => formatX(value, 2, 1), - cap: () => Effarig.eternityCap - }, - { - id: 151, - cost: 8, - requirement: [141, 142, 143], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `${formatX(1e4)} multiplier on all Time Dimensions`, - effect: 1e4 - }, - { - id: 161, - cost: 7, - requirement: [151], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `${formatX(DC.E616)} multiplier on all Antimatter Dimensions`, - effect: () => DC.E616 - }, - { - id: 162, - cost: 7, - requirement: [151], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `${formatX(1e11)} multiplier on all Infinity Dimensions`, - effect: 1e11 - }, - { - id: 171, - cost: 15, - requirement: [161, 162], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `Time Shard requirement for the next Tickspeed upgrade goes up slower - ${formatX(1.33, 0, 2)} ➜ ${formatX(1.25, 0, 2)}`, - effect: () => TS171_MULTIPLIER - }, - { - id: 181, - cost: 200, - requirement: [171, - () => EternityChallenge(1).completions > 0 || Perk.bypassEC1Lock.isBought, - () => EternityChallenge(2).completions > 0 || Perk.bypassEC2Lock.isBought, - () => EternityChallenge(3).completions > 0 || Perk.bypassEC3Lock.isBought], - reqType: TS_REQUIREMENT_TYPE.ALL, - description: () => `You gain ${formatPercents(0.01)} of your Infinity Points gained on crunch each second`, - effect: () => gainedInfinityPoints().times(Time.deltaTime / 100) - .timesEffectOf(Ra.unlocks.continuousTTBoost.effects.autoPrestige) - }, - { - id: 191, - cost: 400, - requirement: [181, () => EternityChallenge(10).completions > 0], - reqType: TS_REQUIREMENT_TYPE.ALL, - description: () => `After Eternity you permanently keep ${formatPercents(0.05)} - of your Infinities as Banked Infinities`, - effect: () => Currency.infinities.value.times(0.05).floor() - }, - { - id: 192, - cost: 730, - requirement: [181, () => EternityChallenge(10).completions > 0, () => !Enslaved.isRunning], - reqType: TS_REQUIREMENT_TYPE.ALL, - description: () => (Enslaved.isRunning - ? "There is not enough space in this Reality" - : `Replicanti can go beyond ${format(replicantiCap(), 2, 1)}, but growth slows down at higher amounts`) - }, - { - id: 193, - cost: 300, - requirement: [181, () => EternityChallenge(10).completions > 0], - reqType: TS_REQUIREMENT_TYPE.ALL, - description: "Antimatter Dimension multiplier based on Eternities", - effect: () => (DC.E13000.pow(Currency.eternities.value.div(1e6).clampMax(1))), - cap: DC.E13000, - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 201, - cost: 900, - requirement: [192], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: "Pick a second path from the Dimension Split" - }, - { - id: 211, - cost: 120, - requirement: [191], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `Dimension Boost requirement scaling is reduced by ${formatInt(5)}`, - effect: 5 - }, - { - id: 212, - cost: 150, - requirement: [191], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: "All Galaxies are stronger based on your Time Shards", - effect: () => Math.pow(Currency.timeShards.value.clampMin(2).log2(), 0.005), - cap: 1.1, - formatEffect: value => `+${formatPercents(value - 1, 3)}` - }, - { - id: 213, - cost: 200, - requirement: [193], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: () => `You gain Replicanti ${formatInt(20)} times faster`, - effect: 20 - }, - { - id: 214, - cost: 120, - requirement: [193], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - description: "Dimensional Sacrifice boosts the 8th Antimatter Dimension even more", - effect: () => { - const totalBoost = Sacrifice.totalBoost; - const firstPart = totalBoost.pow(7.6).clampMaxExponent(44000); - const secondPart = totalBoost.pow(1.05).clampMaxExponent(120000); - return firstPart.times(secondPart); - }, - cap: DC.E164000, - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 221, - cost: 900, - STCost: 4, - requirement: [211], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [222], - description: "Time Dimension multiplier based on Dimension Boosts", - effect: () => DC.D1_0025.pow(DimBoost.totalBoosts), - formatEffect: value => formatX(value, 2, 1) - }, - { - id: 222, - cost: 900, - STCost: 4, - requirement: [211], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [221], - description: () => `Dimension Boost costs scale by another ${formatInt(2)} less`, - effect: 2 - }, - { - id: 223, - cost: 900, - STCost: 4, - requirement: [212], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [224], - description: () => `Distant Galaxy cost scaling starts ${formatInt(7)} Galaxies later`, - effect: 7 - }, - { - id: 224, - cost: 900, - STCost: 4, - requirement: [212], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [223], - description() { - const effect = TimeStudy(224).effectValue; - return `Distant Galaxy cost scaling starts ${quantifyInt("Galaxy", effect)} later - (${formatInt(1)} per ${formatInt(2000)} Dim Boosts)`; - }, - effect: () => Math.floor(DimBoost.totalBoosts / 2000) - }, - { - id: 225, - cost: 900, - STCost: 4, - requirement: [213], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [226], - description: "You gain extra Replicanti Galaxies based on your Replicanti amount", - effect: () => Math.floor(Replicanti.amount.exponent / 1000), - formatEffect: value => `+${quantifyInt("RG", value)}` - }, - { - id: 226, - cost: 900, - STCost: 4, - requirement: [213], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [225], - description: "You gain extra Replicanti Galaxies based on their max", - effect: () => Math.floor(player.replicanti.boughtGalaxyCap / 15), - formatEffect: value => `+${quantifyInt("RG", value)}` - }, - { - id: 227, - cost: 900, - STCost: 4, - requirement: [214], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [228], - description: "Dimensional Sacrifice affects 4th Time Dimension with reduced effect", - effect: () => Math.max(Math.pow(Sacrifice.totalBoost.pLog10(), 10), 1), - formatEffect: value => formatX(value, 2, 2) - }, - { - id: 228, - cost: 900, - STCost: 4, - requirement: [214], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [227], - description: () => `Dimensional Sacrifice formula scales better - ${Sacrifice.getSacrificeDescription({ "TimeStudy228": false })} ➜ - ${Sacrifice.getSacrificeDescription({ "TimeStudy228": true })}`, - effect: 0.2 - }, - { - id: 231, - cost: 500, - STCost: 5, - requirement: [221, 222], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [232], - description: "Dimension Boosts are stronger based on their amount", - effect: () => Decimal.pow(DimBoost.totalBoosts, 0.3).clampMin(1), - formatEffect: value => formatX(value, 2, 2) - }, - { - id: 232, - cost: 500, - STCost: 5, - requirement: [223, 224], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [231], - description: "All Galaxies are stronger based on Antimatter Galaxies", - effect: () => Math.pow(1 + player.galaxies / 1000, 0.2), - formatEffect: value => `+${formatPercents(value - 1, 3)}` - }, - { - id: 233, - cost: 500, - STCost: 5, - requirement: [225, 226], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [234], - description: "Max Replicanti Galaxy upgrade is cheaper based on current Replicanti", - effect: () => Replicanti.amount.pow(0.3), - formatEffect: value => `/ ${format(value, 1, 2)}` - }, - { - id: 234, - cost: 500, - STCost: 5, - requirement: [227, 228], - reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, - requiresST: [233], - description: "Dimensional Sacrifice applies to 1st Antimatter Dimension", - effect: () => Sacrifice.totalBoost, - }, - // Note: These last 4 entries are the triad studies - { - id: 301, - cost: 0, - STCost: 12, - requirement: [() => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 1, 221, 222, 231], - reqType: TS_REQUIREMENT_TYPE.ALL, - requiresST: [221, 222, 231], - description: "Time Study 231 improves the effect of Time Study 221", - effect: () => TimeStudy(221).effectValue.pow(TimeStudy(231).effectValue.minus(1)).clampMin(1), - formatEffect: value => formatX(value, 2, 1), - unlocked: () => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 1 - }, - { - id: 302, - cost: 0, - STCost: 12, - requirement: [() => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 2, 223, 224, 232], - reqType: TS_REQUIREMENT_TYPE.ALL, - requiresST: [223, 224, 232], - description: () => `Distant Galaxy scaling threshold starts another ${formatInt(3000)} Antimatter Galaxies later`, - effect: 3000, - unlocked: () => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 2 - }, - { - id: 303, - cost: 0, - STCost: 12, - requirement: [() => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 3, 225, 226, 233], - reqType: TS_REQUIREMENT_TYPE.ALL, - requiresST: [225, 226, 233], - description: () => `Gain ${formatPercents(0.5)} more extra Replicanti Galaxies from Time Studies 225 and 226, - and from Effarig's Infinity`, - effect: 1.5, - unlocked: () => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 3 - }, - { - id: 304, - cost: 0, - STCost: 12, - requirement: [() => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 4, 227, 228, 234], - reqType: TS_REQUIREMENT_TYPE.ALL, - requiresST: [227, 228, 234], - description: "Dimensional Sacrifice multiplier is squared", - effect: 2, - unlocked: () => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 4 - } - ]; -}()); + effect: () => Math.floor(DimBoost.totalBoosts / 2000) + }, + { + id: 225, + cost: 900, + STCost: 4, + requirement: [213], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [226], + description: "You gain extra Replicanti Galaxies based on your Replicanti amount", + effect: () => Math.floor(Replicanti.amount.exponent / 1000), + formatEffect: value => `+${quantifyInt("RG", value)}` + }, + { + id: 226, + cost: 900, + STCost: 4, + requirement: [213], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [225], + description: "You gain extra Replicanti Galaxies based on their max", + effect: () => Math.floor(player.replicanti.boughtGalaxyCap / 15), + formatEffect: value => `+${quantifyInt("RG", value)}` + }, + { + id: 227, + cost: 900, + STCost: 4, + requirement: [214], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [228], + description: "Dimensional Sacrifice affects 4th Time Dimension with reduced effect", + effect: () => Math.max(Math.pow(Sacrifice.totalBoost.pLog10(), 10), 1), + formatEffect: value => formatX(value, 2, 2) + }, + { + id: 228, + cost: 900, + STCost: 4, + requirement: [214], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [227], + description: () => `Dimensional Sacrifice formula scales better + ${Sacrifice.getSacrificeDescription({ "TimeStudy228": false })} ➜ + ${Sacrifice.getSacrificeDescription({ "TimeStudy228": true })}`, + effect: 0.2 + }, + { + id: 231, + cost: 500, + STCost: 5, + requirement: [221, 222], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [232], + description: "Dimension Boosts are stronger based on their amount", + effect: () => Decimal.pow(DimBoost.totalBoosts, 0.3).clampMin(1), + formatEffect: value => formatX(value, 2, 2) + }, + { + id: 232, + cost: 500, + STCost: 5, + requirement: [223, 224], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [231], + description: "All Galaxies are stronger based on Antimatter Galaxies", + effect: () => Math.pow(1 + player.galaxies / 1000, 0.2), + formatEffect: value => `+${formatPercents(value - 1, 3)}` + }, + { + id: 233, + cost: 500, + STCost: 5, + requirement: [225, 226], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [234], + description: "Max Replicanti Galaxy upgrade is cheaper based on current Replicanti", + effect: () => Replicanti.amount.pow(0.3), + formatEffect: value => `/ ${format(value, 1, 2)}` + }, + { + id: 234, + cost: 500, + STCost: 5, + requirement: [227, 228], + reqType: TS_REQUIREMENT_TYPE.AT_LEAST_ONE, + requiresST: [233], + description: "Dimensional Sacrifice applies to 1st Antimatter Dimension", + effect: () => Sacrifice.totalBoost, + }, + // Note: These last 4 entries are the triad studies + { + id: 301, + cost: 0, + STCost: 12, + requirement: [() => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 1, 221, 222, 231], + reqType: TS_REQUIREMENT_TYPE.ALL, + requiresST: [221, 222, 231], + description: "Time Study 231 improves the effect of Time Study 221", + effect: () => TimeStudy(221).effectValue.pow(TimeStudy(231).effectValue.minus(1)).clampMin(1), + formatEffect: value => formatX(value, 2, 1), + unlocked: () => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 1 + }, + { + id: 302, + cost: 0, + STCost: 12, + requirement: [() => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 2, 223, 224, 232], + reqType: TS_REQUIREMENT_TYPE.ALL, + requiresST: [223, 224, 232], + description: () => `Distant Galaxy scaling threshold starts another ${formatInt(3000)} Antimatter Galaxies later`, + effect: 3000, + unlocked: () => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 2 + }, + { + id: 303, + cost: 0, + STCost: 12, + requirement: [() => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 3, 225, 226, 233], + reqType: TS_REQUIREMENT_TYPE.ALL, + requiresST: [225, 226, 233], + description: () => `Gain ${formatPercents(0.5)} more extra Replicanti Galaxies from Time Studies 225 and 226, + and from Effarig's Infinity`, + effect: 1.5, + unlocked: () => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 3 + }, + { + id: 304, + cost: 0, + STCost: 12, + requirement: [() => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 4, 227, 228, 234], + reqType: TS_REQUIREMENT_TYPE.ALL, + requiresST: [227, 228, 234], + description: "Dimensional Sacrifice multiplier is squared", + effect: 2, + unlocked: () => Ra.unlocks.unlockHardV.effectOrDefault(0) >= 4 + } +]; diff --git a/javascripts/core/secret-formula/reality/imaginary-upgrades.js b/javascripts/core/secret-formula/reality/imaginary-upgrades.js index 982bc7a9f..3f9f89017 100644 --- a/javascripts/core/secret-formula/reality/imaginary-upgrades.js +++ b/javascripts/core/secret-formula/reality/imaginary-upgrades.js @@ -1,293 +1,292 @@ import { DC } from "../../constants"; import { GameDatabase } from "../game-database"; -GameDatabase.reality.imaginaryUpgrades = (function() { - const rebuyable = props => { - props.cost = () => props.initialCost * Math.pow(props.costMult, player.reality.imaginaryRebuyables[props.id]); - const { effect } = props; - if (props.isDecimal) props.effect = () => Decimal.pow(effect, player.reality.imaginaryRebuyables[props.id]); - else props.effect = () => effect * player.reality.imaginaryRebuyables[props.id]; - if (!props.formatEffect) props.formatEffect = value => `+${format(value, 2, 2)}`; - props.formatCost = value => format(value, 2, 0); - return props; - }; - return [ - rebuyable({ - name: "Temporal Intensifier", - id: 1, - initialCost: 3, - costMult: 60, - description: () => `Increase Temporal Amplifier multiplier by +${format(0.15, 2, 2)}`, - effect: 0.15 - }), - rebuyable({ - name: "Replicative Intensifier", - id: 2, - initialCost: 4, - costMult: 60, - description: () => `Increase Replicative Amplifier multiplier by +${format(0.15, 2, 2)}`, - effect: 0.15 - }), - rebuyable({ - name: "Eternal Intensifier", - id: 3, - initialCost: 1, - costMult: 40, - description: () => `Increase Eternal Amplifier multiplier by +${format(0.4, 2, 2)}`, - effect: 0.4 - }), - rebuyable({ - name: "Superluminal Intensifier", - id: 4, - initialCost: 5, - costMult: 80, - description: () => `Increase Superluminal Amplifier multiplier by +${format(0.15, 2, 2)}`, - effect: 0.15 - }), - rebuyable({ - name: "Boundless Intensifier", - id: 5, - initialCost: 1, - costMult: 30, - description: () => `Increase Boundless Amplifier multiplier by +${format(0.6, 2, 2)}`, - effect: 0.6 - }), - rebuyable({ - name: "Elliptic Materiality", - id: 6, - initialCost: 1e4, - costMult: 500, - description: () => `Increase the Reality Machine cap by ${formatX(1e100)}`, - effect: 1e100, - formatEffect: value => `${formatX(value)}`, - isDecimal: true - }), - rebuyable({ - name: "Runic Assurance", - id: 7, - initialCost: 2e5, - costMult: 500, - description: () => `Delay Glyph Instability starting level by ${formatInt(200)}`, - effect: 200, - formatEffect: value => `+${formatInt(value)} levels` - }), - rebuyable({ - name: "Hyperbolic Apeirogon", - id: 8, - initialCost: 1e7, - costMult: 800, - description: () => `Multiply Infinity Dimensions by ${format("1e100000")}`, - effect: DC.E100000, - formatEffect: value => `${formatX(value)}`, - isDecimal: true - }), - rebuyable({ - name: "Cosmic Filament", - id: 9, - initialCost: 1e9, - costMult: 1000, - description: () => `Increase Galaxy strength`, - effect: 0.03, - formatEffect: value => `+${formatPercents(value)}` - }), - rebuyable({ - name: "Entropic Condensing", - id: 10, - initialCost: 8e9, - costMult: 2000, - description: () => `Increase Singularity gain`, - effect: 1, - formatEffect: value => `${formatX(1 + value, 2)}`, - }), - { - name: "Suspicion of Interference", - id: 11, - cost: 5e7, - requirement: () => `${format(1e90)} total Relic Shards - (You have ${format(player.celestials.effarig.relicShards, 2)})`, - hasFailed: () => false, - checkRequirement: () => player.celestials.effarig.relicShards >= 1e90, - checkEvent: GAME_EVENT.REALITY_RESET_AFTER, - description: "Time Dimension power based on total antimatter", - effect: () => 1 + Math.log10(player.records.totalAntimatter.log10()) / 100, - formatEffect: value => `${formatPow(value, 0, 4)}`, - }, - { - name: "Consequences of Illusions", - id: 12, - cost: 5e7, - requirement: () => `Make a level ${formatInt(9000)} Glyph with a single Glyph level factor weight at - ${formatInt(100)}`, - hasFailed: () => false, - checkRequirement: () => Object.values(player.celestials.effarig.glyphWeights).some(w => w === 100) && - gainedGlyphLevel().actualLevel >= 9000, - checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, - description: "Gain free Dimboosts based on Imaginary rebuyable count", - effect: () => 2e4 * ImaginaryUpgrades.totalRebuyables, - formatEffect: value => `${format(value, 1)}`, - }, - { - name: "Transience of Information", - id: 13, - cost: 5e7, - requirement: () => `Reach ${format(Number.MAX_VALUE, 2)} projected Reality Machines within - The Enslaved Ones' Reality`, - hasFailed: () => !Enslaved.isRunning, - checkRequirement: () => Enslaved.isRunning && MachineHandler.uncappedRM.gte(Number.MAX_VALUE), - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: "Increase Imaginary Machine Cap based on Imaginary Upgrades purchased", - effect: () => 1 + ImaginaryUpgrades.totalRebuyables / 20 + ImaginaryUpgrades.totalSinglePurchase / 2, - formatEffect: value => `${formatX(value, 2, 1)}`, - }, - { - name: "Recollection of Intrusion", - id: 14, - cost: 3.5e8, - requirement: () => `Reach a tickspeed of ${format("1e75000000000")} / sec within Eternity Challenge 5`, - hasFailed: () => false, - checkRequirement: () => EternityChallenge(5).isRunning && Tickspeed.perSecond.exponent >= 7.5e10, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: () => `Raise all Dimension per-purchase multipliers to ${formatPow(1.5, 0, 1)}`, - effect: 1.5 - }, - { - name: "Fabrication of Ideals", - id: 15, - cost: 1e9, - requirement: () => `Reach ${format("1e1500000000000")} antimatter without - ever having any 1st Infinity Dimensions`, - hasFailed: () => player.requirementChecks.reality.maxID1.gt(0), - checkRequirement: () => player.requirementChecks.reality.maxID1.eq(0) && player.antimatter.exponent >= 1.5e12, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: "Convert Antimatter Dimensions to Continuum and unlock Lai'tela, Celestial of Dimensions", - }, - { - name: "Massless Momentum", - id: 16, - cost: 3.5e9, - formatCost: x => format(x, 1), - requirement: () => `Destabilize Lai'tela's Reality in under ${formatInt(30)} seconds twice`, - hasFailed: () => false, - checkRequirement: () => Laitela.maxAllowedDimension <= 6, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: "Unlock the 2nd Dark Matter Dimension", - }, - { - name: "Chiral Oscillation", - id: 17, - cost: 6e9, - requirement: () => `Automatically condense at least ${formatInt(20)} Singularities at once`, - hasFailed: () => false, - checkRequirement: () => Singularity.singularitiesGained >= 20 && - Currency.darkEnergy.gte(Singularity.cap * SingularityMilestone.autoCondense.effectValue), - checkEvent: GAME_EVENT.SINGULARITY_RESET_BEFORE, - description: "Unlock the 3rd Dark Matter Dimension", - }, - { - name: "Dimensional Symmetry", - id: 18, - cost: 1.5e10, - formatCost: x => format(x, 1), - requirement: () => `Have ${formatInt(80000)} total Galaxies`, - hasFailed: () => false, - checkRequirement: () => Replicanti.galaxies.total + player.galaxies + - player.dilation.totalTachyonGalaxies >= 80000, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: "Unlock the 4th Dark Matter Dimension", - }, - { - name: "Deterministic Radiation", - id: 19, - cost: 2.8e10, - formatCost: x => format(x, 1), - requirement: () => `Reach ${formatInt(3.85e6)} Tickspeed Continuum without ever having more than - ${formatInt(8)} Time Studies in this Reality`, - hasFailed: () => player.requirementChecks.reality.maxStudies > 8, - checkRequirement: () => player.requirementChecks.reality.maxStudies <= 8 && - Tickspeed.continuumValue >= 3.85e6, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: "Unlock Dark Matter Annihilation", - }, - { - name: "Vacuum Acceleration", - id: 20, - cost: 3e12, - requirement: () => `Have a Continuum increase of at least ${formatPercents(1)}`, - hasFailed: () => false, - checkRequirement: () => Laitela.matterExtraPurchaseFactor >= 2, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: () => `Unlock Autobuyers for repeatable Imaginary Upgrades and generate Imaginary Machines - ${formatInt(10)} times faster`, - effect: 10, - }, - { - name: "Existential Elimination", - id: 21, - cost: 1e13, - requirement: () => `Reach ${format("1e7400000000000")} antimatter with Continuum disabled`, - hasFailed: () => !player.requirementChecks.reality.noContinuum, - checkRequirement: () => player.requirementChecks.reality.noContinuum && - Currency.antimatter.value.log10() >= 7.4e12, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: "Annihilation multiplier gain is improved based on Imaginary Machines", - effect: () => Math.clampMin(Math.pow(Math.log10(Currency.imaginaryMachines.value) - 10, 3), 1), - formatEffect: value => `${formatX(value, 2, 1)}`, - }, - { - name: "Total Termination", - id: 22, - cost: 1.5e14, - formatCost: x => format(x, 1), - requirement: () => `Reach ${format("1e150000000000")} antimatter in Effarig's Reality with - at least ${formatInt(4)} Cursed Glyphs equipped`, - // Note: 4 cursed glyphs is -12 glyph count, but equipping a positive glyph in the last slot is allowed - hasFailed: () => !Effarig.isRunning || player.requirementChecks.reality.maxGlyphs > -10, - checkRequirement: () => Effarig.isRunning && player.requirementChecks.reality.maxGlyphs < -10 && - Currency.antimatter.value.exponent >= 1.5e11, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: () => `Glyph Sacrifice totals for basic Glyphs are increased to ${format(1e100)}`, - effect: 1e100, - }, - { - name: "Planar Purification", - id: 23, - cost: 6e14, - requirement: () => `Reach Glyph level ${formatInt(20000)} in Ra's Reality with - at most ${formatInt(0)} Glyphs equipped`, - hasFailed: () => !Ra.isRunning || player.requirementChecks.reality.maxGlyphs > 0, - checkRequirement: () => Ra.isRunning && player.requirementChecks.reality.maxGlyphs <= 0 && - gainedGlyphLevel().actualLevel >= 20000, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: "Increase free Dimboost count based on Tesseract count", - effect: () => Math.floor(0.25 * Math.pow(Tesseracts.effectiveCount, 2)), - formatEffect: value => `${formatX(value)}`, - }, - { - name: "Absolute Annulment", - id: 24, - cost: 6e14, - requirement: () => `Have ${formatInt(13000)} Antimatter Galaxies in Ra's Reality - with a fully inverted Black Hole`, - hasFailed: () => !Ra.isRunning || player.requirementChecks.reality.slowestBH > 1e-300, - checkRequirement: () => Ra.isRunning && player.requirementChecks.reality.slowestBH <= 1e-300 && - player.galaxies >= 13000, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: "Increase free Dimboost strength based on Singularity count", - effect: () => Decimal.pow(player.celestials.laitela.singularities, 300), - formatEffect: value => `${formatX(value, 2, 1)}`, - }, - { - name: "Omnipresent Obliteration", - id: 25, - cost: 1.6e15, - formatCost: x => format(x, 1), - requirement: () => `Reach Reality in Lai'tela's Reality with all Dimensions disabled and - at least ${formatInt(4)} empty Glyph slots`, - hasFailed: () => !Laitela.isRunning || Laitela.maxAllowedDimension !== 0 || Glyphs.activeList.length > 1, - checkRequirement: () => Laitela.isRunning && Laitela.maxAllowedDimension === 0 && - Glyphs.activeList.length <= 1, - checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, - description: "Unlock Pelle, Celestial of Antimatter", - }, - ]; -}()); +const rebuyable = props => { + props.cost = () => props.initialCost * Math.pow(props.costMult, player.reality.imaginaryRebuyables[props.id]); + const { effect } = props; + if (props.isDecimal) props.effect = () => Decimal.pow(effect, player.reality.imaginaryRebuyables[props.id]); + else props.effect = () => effect * player.reality.imaginaryRebuyables[props.id]; + if (!props.formatEffect) props.formatEffect = value => `+${format(value, 2, 2)}`; + props.formatCost = value => format(value, 2, 0); + return props; +}; + +GameDatabase.reality.imaginaryUpgrades = [ + rebuyable({ + name: "Temporal Intensifier", + id: 1, + initialCost: 3, + costMult: 60, + description: () => `Increase Temporal Amplifier multiplier by +${format(0.15, 2, 2)}`, + effect: 0.15 + }), + rebuyable({ + name: "Replicative Intensifier", + id: 2, + initialCost: 4, + costMult: 60, + description: () => `Increase Replicative Amplifier multiplier by +${format(0.15, 2, 2)}`, + effect: 0.15 + }), + rebuyable({ + name: "Eternal Intensifier", + id: 3, + initialCost: 1, + costMult: 40, + description: () => `Increase Eternal Amplifier multiplier by +${format(0.4, 2, 2)}`, + effect: 0.4 + }), + rebuyable({ + name: "Superluminal Intensifier", + id: 4, + initialCost: 5, + costMult: 80, + description: () => `Increase Superluminal Amplifier multiplier by +${format(0.15, 2, 2)}`, + effect: 0.15 + }), + rebuyable({ + name: "Boundless Intensifier", + id: 5, + initialCost: 1, + costMult: 30, + description: () => `Increase Boundless Amplifier multiplier by +${format(0.6, 2, 2)}`, + effect: 0.6 + }), + rebuyable({ + name: "Elliptic Materiality", + id: 6, + initialCost: 1e4, + costMult: 500, + description: () => `Increase the Reality Machine cap by ${formatX(1e100)}`, + effect: 1e100, + formatEffect: value => `${formatX(value)}`, + isDecimal: true + }), + rebuyable({ + name: "Runic Assurance", + id: 7, + initialCost: 2e5, + costMult: 500, + description: () => `Delay Glyph Instability starting level by ${formatInt(200)}`, + effect: 200, + formatEffect: value => `+${formatInt(value)} levels` + }), + rebuyable({ + name: "Hyperbolic Apeirogon", + id: 8, + initialCost: 1e7, + costMult: 800, + description: () => `Multiply Infinity Dimensions by ${format("1e100000")}`, + effect: DC.E100000, + formatEffect: value => `${formatX(value)}`, + isDecimal: true + }), + rebuyable({ + name: "Cosmic Filament", + id: 9, + initialCost: 1e9, + costMult: 1000, + description: () => `Increase Galaxy strength`, + effect: 0.03, + formatEffect: value => `+${formatPercents(value)}` + }), + rebuyable({ + name: "Entropic Condensing", + id: 10, + initialCost: 8e9, + costMult: 2000, + description: () => `Increase Singularity gain`, + effect: 1, + formatEffect: value => `${formatX(1 + value, 2)}`, + }), + { + name: "Suspicion of Interference", + id: 11, + cost: 5e7, + requirement: () => `${format(1e90)} total Relic Shards + (You have ${format(player.celestials.effarig.relicShards, 2)})`, + hasFailed: () => false, + checkRequirement: () => player.celestials.effarig.relicShards >= 1e90, + checkEvent: GAME_EVENT.REALITY_RESET_AFTER, + description: "Time Dimension power based on total antimatter", + effect: () => 1 + Math.log10(player.records.totalAntimatter.log10()) / 100, + formatEffect: value => `${formatPow(value, 0, 4)}`, + }, + { + name: "Consequences of Illusions", + id: 12, + cost: 5e7, + requirement: () => `Make a level ${formatInt(9000)} Glyph with a single Glyph level factor weight at + ${formatInt(100)}`, + hasFailed: () => false, + checkRequirement: () => Object.values(player.celestials.effarig.glyphWeights).some(w => w === 100) && + gainedGlyphLevel().actualLevel >= 9000, + checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, + description: "Gain free Dimboosts based on Imaginary rebuyable count", + effect: () => 2e4 * ImaginaryUpgrades.totalRebuyables, + formatEffect: value => `${format(value, 1)}`, + }, + { + name: "Transience of Information", + id: 13, + cost: 5e7, + requirement: () => `Reach ${format(Number.MAX_VALUE, 2)} projected Reality Machines within + The Enslaved Ones' Reality`, + hasFailed: () => !Enslaved.isRunning, + checkRequirement: () => Enslaved.isRunning && MachineHandler.uncappedRM.gte(Number.MAX_VALUE), + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: "Increase Imaginary Machine Cap based on Imaginary Upgrades purchased", + effect: () => 1 + ImaginaryUpgrades.totalRebuyables / 20 + ImaginaryUpgrades.totalSinglePurchase / 2, + formatEffect: value => `${formatX(value, 2, 1)}`, + }, + { + name: "Recollection of Intrusion", + id: 14, + cost: 3.5e8, + requirement: () => `Reach a tickspeed of ${format("1e75000000000")} / sec within Eternity Challenge 5`, + hasFailed: () => false, + checkRequirement: () => EternityChallenge(5).isRunning && Tickspeed.perSecond.exponent >= 7.5e10, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: () => `Raise all Dimension per-purchase multipliers to ${formatPow(1.5, 0, 1)}`, + effect: 1.5 + }, + { + name: "Fabrication of Ideals", + id: 15, + cost: 1e9, + requirement: () => `Reach ${format("1e1500000000000")} antimatter without + ever having any 1st Infinity Dimensions`, + hasFailed: () => player.requirementChecks.reality.maxID1.gt(0), + checkRequirement: () => player.requirementChecks.reality.maxID1.eq(0) && player.antimatter.exponent >= 1.5e12, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: "Convert Antimatter Dimensions to Continuum and unlock Lai'tela, Celestial of Dimensions", + }, + { + name: "Massless Momentum", + id: 16, + cost: 3.5e9, + formatCost: x => format(x, 1), + requirement: () => `Destabilize Lai'tela's Reality in under ${formatInt(30)} seconds twice`, + hasFailed: () => false, + checkRequirement: () => Laitela.maxAllowedDimension <= 6, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: "Unlock the 2nd Dark Matter Dimension", + }, + { + name: "Chiral Oscillation", + id: 17, + cost: 6e9, + requirement: () => `Automatically condense at least ${formatInt(20)} Singularities at once`, + hasFailed: () => false, + checkRequirement: () => Singularity.singularitiesGained >= 20 && + Currency.darkEnergy.gte(Singularity.cap * SingularityMilestone.autoCondense.effectValue), + checkEvent: GAME_EVENT.SINGULARITY_RESET_BEFORE, + description: "Unlock the 3rd Dark Matter Dimension", + }, + { + name: "Dimensional Symmetry", + id: 18, + cost: 1.5e10, + formatCost: x => format(x, 1), + requirement: () => `Have ${formatInt(80000)} total Galaxies`, + hasFailed: () => false, + checkRequirement: () => Replicanti.galaxies.total + player.galaxies + + player.dilation.totalTachyonGalaxies >= 80000, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: "Unlock the 4th Dark Matter Dimension", + }, + { + name: "Deterministic Radiation", + id: 19, + cost: 2.8e10, + formatCost: x => format(x, 1), + requirement: () => `Reach ${formatInt(3.85e6)} Tickspeed Continuum without ever having more than + ${formatInt(8)} Time Studies in this Reality`, + hasFailed: () => player.requirementChecks.reality.maxStudies > 8, + checkRequirement: () => player.requirementChecks.reality.maxStudies <= 8 && + Tickspeed.continuumValue >= 3.85e6, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: "Unlock Dark Matter Annihilation", + }, + { + name: "Vacuum Acceleration", + id: 20, + cost: 3e12, + requirement: () => `Have a Continuum increase of at least ${formatPercents(1)}`, + hasFailed: () => false, + checkRequirement: () => Laitela.matterExtraPurchaseFactor >= 2, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: () => `Unlock Autobuyers for repeatable Imaginary Upgrades and generate Imaginary Machines + ${formatInt(10)} times faster`, + effect: 10, + }, + { + name: "Existential Elimination", + id: 21, + cost: 1e13, + requirement: () => `Reach ${format("1e7400000000000")} antimatter with Continuum disabled`, + hasFailed: () => !player.requirementChecks.reality.noContinuum, + checkRequirement: () => player.requirementChecks.reality.noContinuum && + Currency.antimatter.value.log10() >= 7.4e12, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: "Annihilation multiplier gain is improved based on Imaginary Machines", + effect: () => Math.clampMin(Math.pow(Math.log10(Currency.imaginaryMachines.value) - 10, 3), 1), + formatEffect: value => `${formatX(value, 2, 1)}`, + }, + { + name: "Total Termination", + id: 22, + cost: 1.5e14, + formatCost: x => format(x, 1), + requirement: () => `Reach ${format("1e150000000000")} antimatter in Effarig's Reality with + at least ${formatInt(4)} Cursed Glyphs equipped`, + // Note: 4 cursed glyphs is -12 glyph count, but equipping a positive glyph in the last slot is allowed + hasFailed: () => !Effarig.isRunning || player.requirementChecks.reality.maxGlyphs > -10, + checkRequirement: () => Effarig.isRunning && player.requirementChecks.reality.maxGlyphs < -10 && + Currency.antimatter.value.exponent >= 1.5e11, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: () => `Glyph Sacrifice totals for basic Glyphs are increased to ${format(1e100)}`, + effect: 1e100, + }, + { + name: "Planar Purification", + id: 23, + cost: 6e14, + requirement: () => `Reach Glyph level ${formatInt(20000)} in Ra's Reality with + at most ${formatInt(0)} Glyphs equipped`, + hasFailed: () => !Ra.isRunning || player.requirementChecks.reality.maxGlyphs > 0, + checkRequirement: () => Ra.isRunning && player.requirementChecks.reality.maxGlyphs <= 0 && + gainedGlyphLevel().actualLevel >= 20000, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: "Increase free Dimboost count based on Tesseract count", + effect: () => Math.floor(0.25 * Math.pow(Tesseracts.effectiveCount, 2)), + formatEffect: value => `${formatX(value)}`, + }, + { + name: "Absolute Annulment", + id: 24, + cost: 6e14, + requirement: () => `Have ${formatInt(13000)} Antimatter Galaxies in Ra's Reality + with a fully inverted Black Hole`, + hasFailed: () => !Ra.isRunning || player.requirementChecks.reality.slowestBH > 1e-300, + checkRequirement: () => Ra.isRunning && player.requirementChecks.reality.slowestBH <= 1e-300 && + player.galaxies >= 13000, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: "Increase free Dimboost strength based on Singularity count", + effect: () => Decimal.pow(player.celestials.laitela.singularities, 300), + formatEffect: value => `${formatX(value, 2, 1)}`, + }, + { + name: "Omnipresent Obliteration", + id: 25, + cost: 1.6e15, + formatCost: x => format(x, 1), + requirement: () => `Reach Reality in Lai'tela's Reality with all Dimensions disabled and + at least ${formatInt(4)} empty Glyph slots`, + hasFailed: () => !Laitela.isRunning || Laitela.maxAllowedDimension !== 0 || Glyphs.activeList.length > 1, + checkRequirement: () => Laitela.isRunning && Laitela.maxAllowedDimension === 0 && + Glyphs.activeList.length <= 1, + checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, + description: "Unlock Pelle, Celestial of Antimatter", + }, +]; diff --git a/javascripts/core/secret-formula/reality/reality-upgrades.js b/javascripts/core/secret-formula/reality/reality-upgrades.js index 7f35f3233..e40ee731b 100644 --- a/javascripts/core/secret-formula/reality/reality-upgrades.js +++ b/javascripts/core/secret-formula/reality/reality-upgrades.js @@ -1,345 +1,345 @@ import { DC } from "../../constants"; import { GameDatabase } from "../game-database"; -GameDatabase.reality.upgrades = (function() { - const rebuyable = props => { - props.cost = () => getHybridCostScaling( - player.reality.rebuyables[props.id], - 1e30, - props.initialCost, - props.costMult, - props.costMult / 10, - DC.E309, - 1e3, - props.initialCost * props.costMult - ); - const { effect } = props; - props.effect = () => Math.pow( - effect + ImaginaryUpgrade(props.id).effectOrDefault(0), - player.reality.rebuyables[props.id] * getAdjustedGlyphEffect("realityrow1pow")); - props.description = () => props.textTemplate.replace("{value}", - ImaginaryUpgrade(props.id).effectValue === 0 - ? formatInt(effect) - : format(effect + ImaginaryUpgrade(props.id).effectValue, 2, 2)); - props.formatEffect = value => formatX(value, 2, 0); - props.formatCost = value => format(value, 2, 0); - return props; - }; - return [ - rebuyable({ - name: "Temporal Amplifier", - id: 1, - initialCost: 1, - costMult: 30, - textTemplate: "You gain Dilated Time {value} times faster", - effect: 3 - }), - rebuyable({ - name: "Replicative Amplifier", - id: 2, - initialCost: 1, - costMult: 30, - textTemplate: "You gain Replicanti {value} times faster", - effect: 3 - }), - rebuyable({ - name: "Eternal Amplifier", - id: 3, - initialCost: 2, - costMult: 30, - textTemplate: "You gain {value} times more Eternities", - effect: 3 - }), - rebuyable({ - name: "Superluminal Amplifier", - id: 4, - initialCost: 2, - costMult: 30, - textTemplate: "You gain {value} times more Tachyon Particles", - effect: 3 - }), - rebuyable({ - name: "Boundless Amplifier", - id: 5, - initialCost: 3, - costMult: 50, - textTemplate: "You gain {value} times more Infinities", - effect: 5 - }), - { - name: "Cosmically Duplicate", - id: 6, - cost: 15, - requirement: "Complete your first Eternity without using Replicanti Galaxies", - // Note that while noRG resets on eternity, the reality-level check will be false after the first eternity. - // The noRG variable is eternity-level as it's also used for an achievement check - hasFailed: () => !(player.requirementChecks.eternity.noRG && player.requirementChecks.reality.noEternities), - checkRequirement: () => player.requirementChecks.eternity.noRG && player.requirementChecks.reality.noEternities, - checkEvent: GAME_EVENT.ETERNITY_RESET_BEFORE, - description: "Replicanti speed is multiplied based on Replicanti Galaxies", - effect: () => 1 + Replicanti.galaxies.total / 50, - formatEffect: value => formatX(value, 2, 2) +const rebuyable = props => { + props.cost = () => getHybridCostScaling( + player.reality.rebuyables[props.id], + 1e30, + props.initialCost, + props.costMult, + props.costMult / 10, + DC.E309, + 1e3, + props.initialCost * props.costMult + ); + const { effect } = props; + props.effect = () => Math.pow( + effect + ImaginaryUpgrade(props.id).effectOrDefault(0), + player.reality.rebuyables[props.id] * getAdjustedGlyphEffect("realityrow1pow")); + props.description = () => props.textTemplate.replace("{value}", + ImaginaryUpgrade(props.id).effectValue === 0 + ? formatInt(effect) + : format(effect + ImaginaryUpgrade(props.id).effectValue, 2, 2)); + props.formatEffect = value => formatX(value, 2, 0); + props.formatCost = value => format(value, 2, 0); + return props; +}; + + +GameDatabase.reality.upgrades = [ + rebuyable({ + name: "Temporal Amplifier", + id: 1, + initialCost: 1, + costMult: 30, + textTemplate: "You gain Dilated Time {value} times faster", + effect: 3 + }), + rebuyable({ + name: "Replicative Amplifier", + id: 2, + initialCost: 1, + costMult: 30, + textTemplate: "You gain Replicanti {value} times faster", + effect: 3 + }), + rebuyable({ + name: "Eternal Amplifier", + id: 3, + initialCost: 2, + costMult: 30, + textTemplate: "You gain {value} times more Eternities", + effect: 3 + }), + rebuyable({ + name: "Superluminal Amplifier", + id: 4, + initialCost: 2, + costMult: 30, + textTemplate: "You gain {value} times more Tachyon Particles", + effect: 3 + }), + rebuyable({ + name: "Boundless Amplifier", + id: 5, + initialCost: 3, + costMult: 50, + textTemplate: "You gain {value} times more Infinities", + effect: 5 + }), + { + name: "Cosmically Duplicate", + id: 6, + cost: 15, + requirement: "Complete your first Eternity without using Replicanti Galaxies", + // Note that while noRG resets on eternity, the reality-level check will be false after the first eternity. + // The noRG variable is eternity-level as it's also used for an achievement check + hasFailed: () => !(player.requirementChecks.eternity.noRG && player.requirementChecks.reality.noEternities), + checkRequirement: () => player.requirementChecks.eternity.noRG && player.requirementChecks.reality.noEternities, + checkEvent: GAME_EVENT.ETERNITY_RESET_BEFORE, + description: "Replicanti speed is multiplied based on Replicanti Galaxies", + effect: () => 1 + Replicanti.galaxies.total / 50, + formatEffect: value => formatX(value, 2, 2) + }, + { + name: "Innumerably Construct", + id: 7, + cost: 15, + requirement: "Complete your first Infinity with at most 1 Antimatter Galaxy", + hasFailed: () => !(player.galaxies <= 1 && player.requirementChecks.reality.noInfinities), + checkRequirement: () => player.galaxies <= 1 && player.requirementChecks.reality.noInfinities, + checkEvent: GAME_EVENT.BIG_CRUNCH_BEFORE, + description: "Infinity gain is boosted from Antimatter Galaxy count", + effect: () => 1 + player.galaxies / 30, + formatEffect: value => formatX(value, 2, 2) + }, + { + name: "Paradoxically Attain", + id: 8, + cost: 15, + requirement: "Get to Eternity without any automatic Achievements", + hasFailed: () => player.reality.gainedAutoAchievements, + checkRequirement: () => !player.reality.gainedAutoAchievements, + checkEvent: GAME_EVENT.ETERNITY_RESET_BEFORE, + description: "Tachyon Particle gain is boosted based on Achievement multiplier", + effect: () => Math.sqrt(Achievements.power), + formatEffect: value => formatX(value, 2, 2) + }, + { + name: "Linguistically Expand", + id: 9, + cost: 15, + requirement: () => `Eternity for ${format("1e4000")} Eternity Points using + only a single level ${formatInt(3)}+ Glyph.`, + hasFailed: () => { + const invalidEquippedGlyphs = Glyphs.activeList.length > 1 || + (Glyphs.activeList.length === 1 && Glyphs.activeList[0].level < 3); + const hasValidGlyphInInventory = Glyphs.inventory.countWhere(g => g && g.level >= 3) > 0; + return invalidEquippedGlyphs || (Glyphs.activeList.length === 0 && !hasValidGlyphInInventory); }, - { - name: "Innumerably Construct", - id: 7, - cost: 15, - requirement: "Complete your first Infinity with at most 1 Antimatter Galaxy", - hasFailed: () => !(player.galaxies <= 1 && player.requirementChecks.reality.noInfinities), - checkRequirement: () => player.galaxies <= 1 && player.requirementChecks.reality.noInfinities, - checkEvent: GAME_EVENT.BIG_CRUNCH_BEFORE, - description: "Infinity gain is boosted from Antimatter Galaxy count", - effect: () => 1 + player.galaxies / 30, - formatEffect: value => formatX(value, 2, 2) + checkRequirement: () => Currency.eternityPoints.exponent >= 4000 && + Glyphs.activeList.length === 1 && Glyphs.activeList[0].level >= 3, + checkEvent: GAME_EVENT.ETERNITY_RESET_AFTER, + description: "Gain another Glyph slot", + effect: () => 1 + }, + { + name: "Existentially Prolong", + id: 10, + cost: 15, + requirement: () => `Complete your first Eternity with at least ${formatPostBreak(DC.E450)} Infinity Points`, + hasFailed: () => !player.requirementChecks.reality.noEternities, + checkRequirement: () => Currency.infinityPoints.exponent >= 450 && + player.requirementChecks.reality.noEternities, + checkEvent: GAME_EVENT.ETERNITY_RESET_BEFORE, + description: () => `Start every Reality with ${formatInt(100)} Eternities (also applies to current Reality)`, + automatorPoints: 15, + shortDescription: () => `Start with ${formatInt(100)} Eternities`, + effect: () => 100 + }, + { + name: "The Boundless Flow", + id: 11, + cost: 50, + requirement: () => `${format(Currency.infinitiesBanked.value, 2)}/${format(DC.E12)} Banked Infinities`, + checkRequirement: () => Currency.infinitiesBanked.exponent >= 12, + checkEvent: [GAME_EVENT.ETERNITY_RESET_AFTER, GAME_EVENT.REALITY_FIRST_UNLOCKED], + description: "Every second, gain 10% of the Infinities you would normally gain by Infinitying", + automatorPoints: 5, + shortDescription: () => `Continuous Infinity generation`, + effect: () => gainedInfinities().times(0.1), + formatEffect: value => `${format(value)} per second` + }, + { + name: "The Knowing Existence", + id: 12, + cost: 50, + requirement: () => `Eternity for ${format(DC.E70)} Eternity Points without Eternity Challenge 1`, + hasFailed: () => EternityChallenge(1).completions !== 0, + checkRequirement: () => Currency.eternityPoints.exponent >= 70 && EternityChallenge(1).completions === 0, + checkEvent: GAME_EVENT.ETERNITY_RESET_AFTER, + description: "Eternity Point multiplier based on Reality and Time Theorem count", + effect: () => Currency.timeTheorems.value + .minus(DC.E3).clampMin(2) + .pow(Math.log2(Math.min(Currency.realities.value, 1e4))).clampMin(1), + formatEffect: value => formatX(value, 2, 2) + }, + { + name: "The Telemechanical Process", + id: 13, + cost: 50, + requirement: () => `Eternity for ${format(DC.E4000)} Eternity Points without Time Dimensions 5-8`, + hasFailed: () => !Array.range(5, 4).every(i => TimeDimension(i).amount.equals(0)), + checkRequirement: () => Currency.eternityPoints.exponent >= 4000 && + Array.range(5, 4).every(i => TimeDimension(i).amount.equals(0)), + checkEvent: GAME_EVENT.ETERNITY_RESET_AFTER, + description: () => `Unlock Time Dimension, ${formatX(5)} Eternity Point multiplier, + and improved Eternity autobuyers`, + automatorPoints: 10, + shortDescription: () => `TD and ${formatX(5)} EP Autobuyers, improved Eternity Autobuyer`, + }, + { + name: "The Eternal Flow", + id: 14, + cost: 50, + requirement: () => `${format(Currency.eternities.value, 2)}/${format(1e7)} Eternities`, + checkRequirement: () => Currency.eternities.gte(1e7), + checkEvent: [GAME_EVENT.ETERNITY_RESET_AFTER, GAME_EVENT.REALITY_FIRST_UNLOCKED], + description: "Gain Eternities per second equal to your Reality count", + automatorPoints: 5, + shortDescription: () => `Continuous Eternity generation`, + effect: () => Currency.realities.value * Ra.unlocks.continuousTTBoost.effects.eternity.effectOrDefault(1), + formatEffect: value => `${format(value)} per second` + }, + { + name: "The Paradoxical Forever", + id: 15, + cost: 50, + requirement: () => `Have ${format(DC.E10)} Eternity Points without purchasing + the ${formatX(5)} Eternity Point upgrade`, + hasFailed: () => player.epmultUpgrades !== 0, + checkRequirement: () => Currency.eternityPoints.exponent >= 10 && player.epmultUpgrades === 0, + checkEvent: GAME_EVENT.ETERNITY_RESET_AFTER, + description: () => `Boost Tachyon Particle gain based on ${formatX(5)} Eternity Point multiplier`, + effect: () => Math.max(Math.sqrt(Decimal.log10(EternityUpgrade.epMult.effectValue)) / 3, 1), + formatEffect: value => formatX(value, 2, 2) + }, + { + name: "Disparity of Rarity", + id: 16, + cost: 1500, + requirement: () => `Reality with ${formatInt(4)} Glyphs equipped of uncommon or better rarity + (${formatInt(Glyphs.activeList.countWhere(g => g && g.strength >= 1.5))} equipped)`, + hasFailed: () => { + const availableGlyphs = Glyphs.inventory.countWhere(g => g && g.strength >= 1.5); + const equipped = Glyphs.activeList.countWhere(g => g.strength >= 1.5); + const availableSlots = Glyphs.activeSlotCount - Glyphs.activeList.length; + return equipped + Math.min(availableGlyphs, availableSlots) < 4; }, - { - name: "Paradoxically Attain", - id: 8, - cost: 15, - requirement: "Get to Eternity without any automatic Achievements", - hasFailed: () => player.reality.gainedAutoAchievements, - checkRequirement: () => !player.reality.gainedAutoAchievements, - checkEvent: GAME_EVENT.ETERNITY_RESET_BEFORE, - description: "Tachyon Particle gain is boosted based on Achievement multiplier", - effect: () => Math.sqrt(Achievements.power), - formatEffect: value => formatX(value, 2, 2) + checkRequirement: () => Glyphs.activeList.countWhere(g => g.strength >= 1.5) === 4, + checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, + description: "Improve the Glyph rarity formula", + effect: 1.3, + formatCost: value => format(value, 1, 0) + }, + { + name: "Duplicity of Potency", + id: 17, + cost: 1500, + requirement: () => `Reality with ${formatInt(4)} Glyphs equipped, each having at least ${formatInt(2)} effects + (${formatInt(Glyphs.activeList.countWhere(g => g && countValuesFromBitmask(g.effects) >= 2))} equipped)`, + hasFailed: () => { + const availableGlyphs = Glyphs.inventory.countWhere(g => g && countValuesFromBitmask(g.effects) >= 2); + const equipped = Glyphs.activeList.countWhere(g => countValuesFromBitmask(g.effects) >= 2); + const availableSlots = Glyphs.activeSlotCount - Glyphs.activeList.length; + return equipped + Math.min(availableGlyphs, availableSlots) < 4; }, - { - name: "Linguistically Expand", - id: 9, - cost: 15, - requirement: () => `Eternity for ${format("1e4000")} Eternity Points using - only a single level ${formatInt(3)}+ Glyph.`, - hasFailed: () => { - const invalidEquippedGlyphs = Glyphs.activeList.length > 1 || - (Glyphs.activeList.length === 1 && Glyphs.activeList[0].level < 3); - const hasValidGlyphInInventory = Glyphs.inventory.countWhere(g => g && g.level >= 3) > 0; - return invalidEquippedGlyphs || (Glyphs.activeList.length === 0 && !hasValidGlyphInInventory); - }, - checkRequirement: () => Currency.eternityPoints.exponent >= 4000 && - Glyphs.activeList.length === 1 && Glyphs.activeList[0].level >= 3, - checkEvent: GAME_EVENT.ETERNITY_RESET_AFTER, - description: "Gain another Glyph slot", - effect: () => 1 + checkRequirement: () => Glyphs.activeList.countWhere(g => countValuesFromBitmask(g.effects) >= 2) === 4, + checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, + description: () => `${formatPercents(0.5)} chance to get an additional effect on Glyphs`, + effect: 0.5, + formatCost: value => format(value, 1, 0) + }, + { + name: "Measure of Forever", + id: 18, + cost: 1500, + requirement: () => `Reality with ${formatInt(4)} Glyphs equipped, each at level ${formatInt(10)} or higher + (${formatInt(Glyphs.activeList.countWhere(g => g && g.level >= 10))} equipped)`, + hasFailed: () => { + const availableGlyphs = Glyphs.inventory.countWhere(g => g && g.level >= 10); + const equipped = Glyphs.activeList.countWhere(g => g.level >= 10); + const availableSlots = Glyphs.activeSlotCount - Glyphs.activeList.length; + return equipped + Math.min(availableGlyphs, availableSlots) < 4; }, - { - name: "Existentially Prolong", - id: 10, - cost: 15, - requirement: () => `Complete your first Eternity with at least ${formatPostBreak(DC.E450)} Infinity Points`, - hasFailed: () => !player.requirementChecks.reality.noEternities, - checkRequirement: () => Currency.infinityPoints.exponent >= 450 && - player.requirementChecks.reality.noEternities, - checkEvent: GAME_EVENT.ETERNITY_RESET_BEFORE, - description: () => `Start every Reality with ${formatInt(100)} Eternities (also applies to current Reality)`, - automatorPoints: 15, - shortDescription: () => `Start with ${formatInt(100)} Eternities`, - effect: () => 100 - }, - { - name: "The Boundless Flow", - id: 11, - cost: 50, - requirement: () => `${format(Currency.infinitiesBanked.value, 2)}/${format(DC.E12)} Banked Infinities`, - checkRequirement: () => Currency.infinitiesBanked.exponent >= 12, - checkEvent: [GAME_EVENT.ETERNITY_RESET_AFTER, GAME_EVENT.REALITY_FIRST_UNLOCKED], - description: "Every second, gain 10% of the Infinities you would normally gain by Infinitying", - automatorPoints: 5, - shortDescription: () => `Continuous Infinity generation`, - effect: () => gainedInfinities().times(0.1), - formatEffect: value => `${format(value)} per second` - }, - { - name: "The Knowing Existence", - id: 12, - cost: 50, - requirement: () => `Eternity for ${format(DC.E70)} Eternity Points without Eternity Challenge 1`, - hasFailed: () => EternityChallenge(1).completions !== 0, - checkRequirement: () => Currency.eternityPoints.exponent >= 70 && EternityChallenge(1).completions === 0, - checkEvent: GAME_EVENT.ETERNITY_RESET_AFTER, - description: "Eternity Point multiplier based on Reality and Time Theorem count", - effect: () => Currency.timeTheorems.value - .minus(DC.E3).clampMin(2) - .pow(Math.log2(Math.min(Currency.realities.value, 1e4))).clampMin(1), - formatEffect: value => formatX(value, 2, 2) - }, - { - name: "The Telemechanical Process", - id: 13, - cost: 50, - requirement: () => `Eternity for ${format(DC.E4000)} Eternity Points without Time Dimensions 5-8`, - hasFailed: () => !Array.range(5, 4).every(i => TimeDimension(i).amount.equals(0)), - checkRequirement: () => Currency.eternityPoints.exponent >= 4000 && - Array.range(5, 4).every(i => TimeDimension(i).amount.equals(0)), - checkEvent: GAME_EVENT.ETERNITY_RESET_AFTER, - description: () => `Unlock Time Dimension, ${formatX(5)} Eternity Point multiplier, - and improved Eternity autobuyers`, - automatorPoints: 10, - shortDescription: () => `TD and ${formatX(5)} EP Autobuyers, improved Eternity Autobuyer`, - }, - { - name: "The Eternal Flow", - id: 14, - cost: 50, - requirement: () => `${format(Currency.eternities.value, 2)}/${format(1e7)} Eternities`, - checkRequirement: () => Currency.eternities.gte(1e7), - checkEvent: [GAME_EVENT.ETERNITY_RESET_AFTER, GAME_EVENT.REALITY_FIRST_UNLOCKED], - description: "Gain Eternities per second equal to your Reality count", - automatorPoints: 5, - shortDescription: () => `Continuous Eternity generation`, - effect: () => Currency.realities.value * Ra.unlocks.continuousTTBoost.effects.eternity.effectOrDefault(1), - formatEffect: value => `${format(value)} per second` - }, - { - name: "The Paradoxical Forever", - id: 15, - cost: 50, - requirement: () => `Have ${format(DC.E10)} Eternity Points without purchasing - the ${formatX(5)} Eternity Point upgrade`, - hasFailed: () => player.epmultUpgrades !== 0, - checkRequirement: () => Currency.eternityPoints.exponent >= 10 && player.epmultUpgrades === 0, - checkEvent: GAME_EVENT.ETERNITY_RESET_AFTER, - description: () => `Boost Tachyon Particle gain based on ${formatX(5)} Eternity Point multiplier`, - effect: () => Math.max(Math.sqrt(Decimal.log10(EternityUpgrade.epMult.effectValue)) / 3, 1), - formatEffect: value => formatX(value, 2, 2) - }, - { - name: "Disparity of Rarity", - id: 16, - cost: 1500, - requirement: () => `Reality with ${formatInt(4)} Glyphs equipped of uncommon or better rarity - (${formatInt(Glyphs.activeList.countWhere(g => g && g.strength >= 1.5))} equipped)`, - hasFailed: () => { - const availableGlyphs = Glyphs.inventory.countWhere(g => g && g.strength >= 1.5); - const equipped = Glyphs.activeList.countWhere(g => g.strength >= 1.5); - const availableSlots = Glyphs.activeSlotCount - Glyphs.activeList.length; - return equipped + Math.min(availableGlyphs, availableSlots) < 4; - }, - checkRequirement: () => Glyphs.activeList.countWhere(g => g.strength >= 1.5) === 4, - checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, - description: "Improve the Glyph rarity formula", - effect: 1.3, - formatCost: value => format(value, 1, 0) - }, - { - name: "Duplicity of Potency", - id: 17, - cost: 1500, - requirement: () => `Reality with ${formatInt(4)} Glyphs equipped, each having at least ${formatInt(2)} effects - (${formatInt(Glyphs.activeList.countWhere(g => g && countValuesFromBitmask(g.effects) >= 2))} equipped)`, - hasFailed: () => { - const availableGlyphs = Glyphs.inventory.countWhere(g => g && countValuesFromBitmask(g.effects) >= 2); - const equipped = Glyphs.activeList.countWhere(g => countValuesFromBitmask(g.effects) >= 2); - const availableSlots = Glyphs.activeSlotCount - Glyphs.activeList.length; - return equipped + Math.min(availableGlyphs, availableSlots) < 4; - }, - checkRequirement: () => Glyphs.activeList.countWhere(g => countValuesFromBitmask(g.effects) >= 2) === 4, - checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, - description: () => `${formatPercents(0.5)} chance to get an additional effect on Glyphs`, - effect: 0.5, - formatCost: value => format(value, 1, 0) - }, - { - name: "Measure of Forever", - id: 18, - cost: 1500, - requirement: () => `Reality with ${formatInt(4)} Glyphs equipped, each at level ${formatInt(10)} or higher - (${formatInt(Glyphs.activeList.countWhere(g => g && g.level >= 10))} equipped)`, - hasFailed: () => { - const availableGlyphs = Glyphs.inventory.countWhere(g => g && g.level >= 10); - const equipped = Glyphs.activeList.countWhere(g => g.level >= 10); - const availableSlots = Glyphs.activeSlotCount - Glyphs.activeList.length; - return equipped + Math.min(availableGlyphs, availableSlots) < 4; - }, - checkRequirement: () => Glyphs.activeList.countWhere(g => g.level >= 10) === 4, - checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, - description: "Eternity count boosts Glyph level", - effect: () => Math.max(Math.sqrt(Currency.eternities.value.plus(1).log10()) * 0.45, 1), - formatCost: value => format(value, 1, 0) - }, - { - name: "Scour to Empower", - id: 19, - cost: 1500, - requirement: () => `Have a total of ${formatInt(30)} or more Glyphs at once - (You have ${formatInt(Glyphs.allGlyphs.countWhere(g => g))})`, - hasFailed: () => Glyphs.allGlyphs.countWhere(g => g) < 30, - checkRequirement: () => Glyphs.allGlyphs.countWhere(g => g) >= 30, - checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, - description: "You can sacrifice Glyphs for permanent bonuses (Shift + click)", - formatCost: value => format(value, 1, 0) - }, - { - name: "Parity of Singularity", - id: 20, - cost: 1500, - requirement: () => `${formatInt(1)} year total play time and the Black Hole unlocked - (Currently: ${Time.totalTimePlayed.toStringShort(false)})`, - hasFailed: () => !BlackHole(1).isUnlocked && Currency.realityMachines.lt(100), - checkRequirement: () => Time.totalTimePlayed.totalYears >= 1 && BlackHole(1).isUnlocked, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: "Unlock Black Hole 2", - automatorPoints: 10, - shortDescription: () => `Second Black Hole`, - formatCost: value => format(value, 1, 0) - }, - { - name: "Cosmic Conglomerate", - id: 21, - cost: 100000, - requirement: () => `${formatInt(Replicanti.galaxies.total + player.galaxies + - player.dilation.totalTachyonGalaxies)}/${formatInt(2800)} total Galaxies from all types`, - checkRequirement: () => - Replicanti.galaxies.total + player.galaxies + player.dilation.totalTachyonGalaxies >= 2800, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: () => `Remote Antimatter Galaxy scaling is moved to ${formatInt(1e5)} galaxies`, - effect: 1e5 - }, - { - name: "Temporal Transcendence", - id: 22, - cost: 100000, - requirement: () => `${format(Currency.timeShards.value, 1)}/${format(DC.E28000)} Time Shards`, - checkRequirement: () => Currency.timeShards.exponent >= 28000, - checkEvent: GAME_EVENT.GAME_TICK_AFTER, - description: "Time Dimension multiplier based on days spent in this Reality", - effect: () => Decimal.pow10(Math.pow(1 + 2 * Math.log10(Time.thisReality.totalDays + 1), 1.6)), - formatEffect: value => formatX(value, 2, 2) - }, - { - name: "Replicative Rapidity", - id: 23, - cost: 100000, - requirement: () => `Reality in under ${formatInt(15)} minutes (Best: ${Time.bestReality.toStringShort()})`, - hasFailed: () => Time.thisReality.totalMinutes >= 15, - checkRequirement: () => Time.thisReality.totalMinutes < 15, - checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, - description: "Replicanti speed is boosted based on your fastest Reality", - effect: () => 15 / Math.clamp(Time.bestReality.totalMinutes, 1 / 12, 15), - cap: 180, - formatEffect: value => formatX(value, 2, 2) - }, - { - name: "Synthetic Symbolism", - id: 24, - cost: 100000, - requirement: () => `Reality for ${formatInt(5000)} Reality Machines without Glyphs`, - hasFailed: () => Glyphs.activeList.length > 0, - checkRequirement: () => MachineHandler.gainedRealityMachines.gte(5000) && Glyphs.activeList.length === 0, - checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, - description: "Gain another Glyph slot", - effect: () => 1 - }, - { - name: "Effortless Existence", - id: 25, - cost: 100000, - requirement: () => `Reach ${format(DC.E11111)} EP (Best: ${format(player.records.bestReality.bestEP, 2)} EP)`, - checkRequirement: () => player.records.bestReality.bestEP.exponent >= 11111, - checkEvent: GAME_EVENT.ETERNITY_RESET_AFTER, - description: "Unlock the Reality autobuyer and Automator command", - automatorPoints: 100, - shortDescription: () => `Reality Autobuyer`, - }, - ]; -}()); + checkRequirement: () => Glyphs.activeList.countWhere(g => g.level >= 10) === 4, + checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, + description: "Eternity count boosts Glyph level", + effect: () => Math.max(Math.sqrt(Currency.eternities.value.plus(1).log10()) * 0.45, 1), + formatCost: value => format(value, 1, 0) + }, + { + name: "Scour to Empower", + id: 19, + cost: 1500, + requirement: () => `Have a total of ${formatInt(30)} or more Glyphs at once + (You have ${formatInt(Glyphs.allGlyphs.countWhere(g => g))})`, + hasFailed: () => Glyphs.allGlyphs.countWhere(g => g) < 30, + checkRequirement: () => Glyphs.allGlyphs.countWhere(g => g) >= 30, + checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, + description: "You can sacrifice Glyphs for permanent bonuses (Shift + click)", + formatCost: value => format(value, 1, 0) + }, + { + name: "Parity of Singularity", + id: 20, + cost: 1500, + requirement: () => `${formatInt(1)} year total play time and the Black Hole unlocked + (Currently: ${Time.totalTimePlayed.toStringShort(false)})`, + hasFailed: () => !BlackHole(1).isUnlocked && Currency.realityMachines.lt(100), + checkRequirement: () => Time.totalTimePlayed.totalYears >= 1 && BlackHole(1).isUnlocked, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: "Unlock Black Hole 2", + automatorPoints: 10, + shortDescription: () => `Second Black Hole`, + formatCost: value => format(value, 1, 0) + }, + { + name: "Cosmic Conglomerate", + id: 21, + cost: 100000, + requirement: () => `${formatInt(Replicanti.galaxies.total + player.galaxies + + player.dilation.totalTachyonGalaxies)}/${formatInt(2800)} total Galaxies from all types`, + checkRequirement: () => + Replicanti.galaxies.total + player.galaxies + player.dilation.totalTachyonGalaxies >= 2800, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: () => `Remote Antimatter Galaxy scaling is moved to ${formatInt(1e5)} galaxies`, + effect: 1e5 + }, + { + name: "Temporal Transcendence", + id: 22, + cost: 100000, + requirement: () => `${format(Currency.timeShards.value, 1)}/${format(DC.E28000)} Time Shards`, + checkRequirement: () => Currency.timeShards.exponent >= 28000, + checkEvent: GAME_EVENT.GAME_TICK_AFTER, + description: "Time Dimension multiplier based on days spent in this Reality", + effect: () => Decimal.pow10(Math.pow(1 + 2 * Math.log10(Time.thisReality.totalDays + 1), 1.6)), + formatEffect: value => formatX(value, 2, 2) + }, + { + name: "Replicative Rapidity", + id: 23, + cost: 100000, + requirement: () => `Reality in under ${formatInt(15)} minutes (Best: ${Time.bestReality.toStringShort()})`, + hasFailed: () => Time.thisReality.totalMinutes >= 15, + checkRequirement: () => Time.thisReality.totalMinutes < 15, + checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, + description: "Replicanti speed is boosted based on your fastest Reality", + effect: () => 15 / Math.clamp(Time.bestReality.totalMinutes, 1 / 12, 15), + cap: 180, + formatEffect: value => formatX(value, 2, 2) + }, + { + name: "Synthetic Symbolism", + id: 24, + cost: 100000, + requirement: () => `Reality for ${formatInt(5000)} Reality Machines without Glyphs`, + hasFailed: () => Glyphs.activeList.length > 0, + checkRequirement: () => MachineHandler.gainedRealityMachines.gte(5000) && Glyphs.activeList.length === 0, + checkEvent: GAME_EVENT.REALITY_RESET_BEFORE, + description: "Gain another Glyph slot", + effect: () => 1 + }, + { + name: "Effortless Existence", + id: 25, + cost: 100000, + requirement: () => `Reach ${format(DC.E11111)} EP (Best: ${format(player.records.bestReality.bestEP, 2)} EP)`, + checkRequirement: () => player.records.bestReality.bestEP.exponent >= 11111, + checkEvent: GAME_EVENT.ETERNITY_RESET_AFTER, + description: "Unlock the Reality autobuyer and Automator command", + automatorPoints: 100, + shortDescription: () => `Reality Autobuyer`, + }, +]; From 07b692d281e9256788b09aaaf5b26b7fffb4ee19 Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Wed, 18 May 2022 19:26:26 -0700 Subject: [PATCH 48/89] clean up perk shop upgrade gamedatabase --- javascripts/core/celestials/teresa.js | 15 ++++----------- .../core/secret-formula/celestials/perk-shop.js | 15 ++++++++------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/javascripts/core/celestials/teresa.js b/javascripts/core/celestials/teresa.js index e8e99da69..e33d7d3cb 100644 --- a/javascripts/core/celestials/teresa.js +++ b/javascripts/core/celestials/teresa.js @@ -173,17 +173,10 @@ export const TeresaUnlocks = mapGameDataToObject( config => new TeresaUnlockState(config) ); -export const PerkShopUpgrade = (function() { - const db = GameDatabase.celestials.perkShop; - return { - glyphLevel: new PerkShopUpgradeState(db.glyphLevel), - rmMult: new PerkShopUpgradeState(db.rmMult), - bulkDilation: new PerkShopUpgradeState(db.bulkDilation), - autoSpeed: new PerkShopUpgradeState(db.autoSpeed), - musicGlyph: new PerkShopUpgradeState(db.musicGlyph), - fillMusicGlyph: new PerkShopUpgradeState(db.fillMusicGlyph), - }; -}()); +export const PerkShopUpgrade = mapGameDataToObject( + GameDatabase.celestials.perkShop, + config => new PerkShopUpgradeState(config) +); EventHub.logic.on(GAME_EVENT.TAB_CHANGED, () => { if (Tab.celestials.teresa.isOpen) Teresa.quotes.show(Teresa.quotes.INITIAL); diff --git a/javascripts/core/secret-formula/celestials/perk-shop.js b/javascripts/core/secret-formula/celestials/perk-shop.js index 8d5d26a7a..6e0696d9f 100644 --- a/javascripts/core/secret-formula/celestials/perk-shop.js +++ b/javascripts/core/secret-formula/celestials/perk-shop.js @@ -4,16 +4,17 @@ function rebuyableCost(initialCost, increment, id) { return initialCost * Math.pow(increment, player.celestials.teresa.perkShop[id]); } function rebuyable(config) { + const { id, otherReq, cap, costCap, description, formatEffect, formatCost } = config; return { - id: config.id, + id, cost: () => (config.cost ? config.cost() : rebuyableCost(config.initialCost, config.increment, config.id)), - otherReq: config.otherReq, - cap: config.cap, - costCap: config.costCap, - description: config.description, + otherReq, + cap, + costCap, + description, effect: () => config.effect(player.celestials.teresa.perkShop[config.id]), - formatEffect: config.formatEffect, - formatCost: config.formatCost, + formatEffect, + formatCost, rebuyable: true }; } From 81a14eee42878c28c7d0609d5c856ff9360cd741 Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Wed, 18 May 2022 20:10:32 -0700 Subject: [PATCH 49/89] apply mapGameDataToObject to more places --- .../infinity-dimension-autobuyer.js | 2 +- .../core/celestials/laitela/singularity.js | 49 ++++----------- javascripts/core/dilation.js | 34 +++-------- javascripts/core/eternity.js | 61 ++++--------------- javascripts/core/kong.js | 15 ++--- javascripts/core/perks.js | 58 ++---------------- .../achievements/normal-achievements.js | 2 +- .../secret-formula/speedrun-milestones.js | 2 +- javascripts/core/ui/tab-notifications.js | 20 ++---- javascripts/game.js | 2 +- .../tabs/glyphs/RealityReminder.vue | 2 +- 11 files changed, 48 insertions(+), 199 deletions(-) diff --git a/javascripts/core/autobuyers/infinity-dimension-autobuyer.js b/javascripts/core/autobuyers/infinity-dimension-autobuyer.js index fa3e5a0eb..8fb98a8b7 100644 --- a/javascripts/core/autobuyers/infinity-dimension-autobuyer.js +++ b/javascripts/core/autobuyers/infinity-dimension-autobuyer.js @@ -28,7 +28,7 @@ class InfinityDimensionAutobuyerState extends IntervaledAutobuyerState { } get isUnlocked() { - return EternityMilestone.autobuyerID(this.tier).isReached || PelleUpgrade.IDAutobuyers.canBeApplied; + return EternityMilestone[`autobuyerID${this.tier}`].isReached || PelleUpgrade.IDAutobuyers.canBeApplied; } get resetTickOn() { diff --git a/javascripts/core/celestials/laitela/singularity.js b/javascripts/core/celestials/laitela/singularity.js index bfc172164..809617688 100644 --- a/javascripts/core/celestials/laitela/singularity.js +++ b/javascripts/core/celestials/laitela/singularity.js @@ -31,14 +31,18 @@ class SingularityMilestoneState extends GameMechanicState { return Currency.singularities.gte(this.start); } + get increaseThreshold() { + return this.config.increaseThreshold; + } + nerfCompletions(completions) { - const softcap = this.config.increaseThreshold; + const softcap = this.increaseThreshold; if (!softcap || (completions < softcap)) return completions; return softcap + (completions - softcap) / 3; } unnerfCompletions(completions) { - const softcap = this.config.increaseThreshold; + const softcap = this.increaseThreshold; if (!softcap || (completions < softcap)) return completions; return softcap + (completions - softcap) * 3; } @@ -95,42 +99,13 @@ class SingularityMilestoneState extends GameMechanicState { } } -export const SingularityMilestone = (function() { - const db = GameDatabase.celestials.singularityMilestones; - return { - continuumMult: new SingularityMilestoneState(db.continuumMult), - darkMatterMult: new SingularityMilestoneState(db.darkMatterMult), - darkEnergyMult: new SingularityMilestoneState(db.darkEnergyMult), - darkDimensionCostReduction: new SingularityMilestoneState(db.darkDimensionCostReduction), - singularityMult: new SingularityMilestoneState(db.singularityMult), - darkDimensionIntervalReduction: new SingularityMilestoneState(db.darkDimensionIntervalReduction), - ascensionIntervalScaling: new SingularityMilestoneState(db.ascensionIntervalScaling), - autoCondense: new SingularityMilestoneState(db.autoCondense), - darkDimensionAutobuyers: new SingularityMilestoneState(db.darkDimensionAutobuyers), - darkAutobuyerSpeed: new SingularityMilestoneState(db.darkAutobuyerSpeed), - improvedSingularityCap: new SingularityMilestoneState(db.improvedSingularityCap), - darkFromTesseracts: new SingularityMilestoneState(db.darkFromTesseracts), - dilatedTimeFromSingularities: new SingularityMilestoneState(db.dilatedTimeFromSingularities), - darkFromGlyphLevel: new SingularityMilestoneState(db.darkFromGlyphLevel), - gamespeedFromSingularities: new SingularityMilestoneState(db.gamespeedFromSingularities), - darkFromTheorems: new SingularityMilestoneState(db.darkFromTheorems), - dim4Generation: new SingularityMilestoneState(db.dim4Generation), - darkFromDM4: new SingularityMilestoneState(db.darkFromDM4), - theoremPowerFromSingularities: new SingularityMilestoneState(db.theoremPowerFromSingularities), - darkFromGamespeed: new SingularityMilestoneState(db.darkFromGamespeed), - glyphLevelFromSingularities: new SingularityMilestoneState(db.glyphLevelFromSingularities), - darkFromDilatedTime: new SingularityMilestoneState(db.darkFromDilatedTime), - tesseractMultFromSingularities: new SingularityMilestoneState(db.tesseractMultFromSingularities), - improvedAscensionDM: new SingularityMilestoneState(db.improvedAscensionDM), - realityDEMultiplier: new SingularityMilestoneState(db.realityDEMultiplier), - intervalCostScalingReduction: new SingularityMilestoneState(db.intervalCostScalingReduction), - multFromInfinitied: new SingularityMilestoneState(db.multFromInfinitied), - infinitiedPow: new SingularityMilestoneState(db.infinitiedPow), - }; -}()); +export const SingularityMilestone = mapGameDataToObject( + GameDatabase.celestials.singularityMilestones, + config => new SingularityMilestoneState(config) +); export const SingularityMilestones = { - all: Object.values(SingularityMilestone), + all: SingularityMilestone.all, lastNotified: player.celestials.laitela.lastCheckedMilestones, get sorted() { @@ -228,7 +203,7 @@ export const SingularityMilestones = { // Sorted list of all the values where a singularity milestone exists, used for "new milestone" styling const SingularityMilestoneThresholds = (function() { - return Object.values(GameDatabase.celestials.singularityMilestones) + return SingularityMilestones.all .map(m => Array.range(0, Math.min(50, m.limit)) .filter(r => !m.increaseThreshold || r <= m.increaseThreshold || (r > m.increaseThreshold && ((r - m.increaseThreshold) % 3) === 2)) diff --git a/javascripts/core/dilation.js b/javascripts/core/dilation.js index 00e780749..2be445ee1 100644 --- a/javascripts/core/dilation.js +++ b/javascripts/core/dilation.js @@ -227,26 +227,12 @@ class RebuyableDilationUpgradeState extends RebuyableMechanicState { } } -export const DilationUpgrade = (function() { - const db = GameDatabase.eternity.dilation; - return { - dtGain: new RebuyableDilationUpgradeState(db.dtGain), - galaxyThreshold: new RebuyableDilationUpgradeState(db.galaxyThreshold), - tachyonGain: new RebuyableDilationUpgradeState(db.tachyonGain), - doubleGalaxies: new DilationUpgradeState(db.doubleGalaxies), - tdMultReplicanti: new DilationUpgradeState(db.tdMultReplicanti), - ndMultDT: new DilationUpgradeState(db.ndMultDT), - ipMultDT: new DilationUpgradeState(db.ipMultDT), - timeStudySplit: new DilationUpgradeState(db.timeStudySplit), - dilationPenalty: new DilationUpgradeState(db.dilationPenalty), - ttGenerator: new DilationUpgradeState(db.ttGenerator), - dtGainPelle: new RebuyableDilationUpgradeState(db.dtGainPelle), - galaxyMultiplier: new RebuyableDilationUpgradeState(db.galaxyMultiplier), - tickspeedPower: new RebuyableDilationUpgradeState(db.tickspeedPower), - galaxyThresholdPelle: new DilationUpgradeState(db.galaxyThresholdPelle), - flatDilationMult: new DilationUpgradeState(db.flatDilationMult), - }; -}()); +export const DilationUpgrade = mapGameDataToObject( + GameDatabase.eternity.dilation, + config => (config.rebuyable + ? new RebuyableDilationUpgradeState(config) + : new DilationUpgradeState(config)) +); export const DilationUpgrades = { rebuyable: [ @@ -254,11 +240,5 @@ export const DilationUpgrades = { DilationUpgrade.galaxyThreshold, DilationUpgrade.tachyonGain, ], - fromId: (function() { - const upgradesById = []; - for (const upgrade of Object.values(DilationUpgrade)) { - upgradesById[upgrade.id] = upgrade; - } - return id => upgradesById[id]; - }()), + fromId: id => DilationUpgrade.all.find(x => x.id === id) }; diff --git a/javascripts/core/eternity.js b/javascripts/core/eternity.js index 0475eb0cc..1cb2509b2 100644 --- a/javascripts/core/eternity.js +++ b/javascripts/core/eternity.js @@ -196,44 +196,12 @@ export class EternityMilestoneState { return Currency.eternities.gte(this.config.eternities); } } - -export const EternityMilestone = (function() { - const db = GameDatabase.eternity.milestones; - const infinityDims = Array.dimensionTiers - .map(tier => new EternityMilestoneState(db[`autobuyerID${tier}`])); - return { - autobuyerIPMult: new EternityMilestoneState(db.autobuyerIPMult), - keepAutobuyers: new EternityMilestoneState(db.keepAutobuyers), - autobuyerReplicantiGalaxy: new EternityMilestoneState(db.autobuyerReplicantiGalaxy), - keepInfinityUpgrades: new EternityMilestoneState(db.keepInfinityUpgrades), - bigCrunchModes: new EternityMilestoneState(db.bigCrunchModes), - autoEP: new EternityMilestoneState(db.autoEP), - autoIC: new EternityMilestoneState(db.autoIC), - autobuyMaxGalaxies: new EternityMilestoneState(db.autobuyMaxGalaxies), - unlockReplicanti: new EternityMilestoneState(db.unlockReplicanti), - autobuyerID: tier => infinityDims[tier - 1], - keepBreakUpgrades: new EternityMilestoneState(db.keepBreakUpgrades), - autoUnlockID: new EternityMilestoneState(db.autoUnlockID), - unlockAllND: new EternityMilestoneState(db.unlockAllND), - replicantiNoReset: new EternityMilestoneState(db.replicantiNoReset), - autobuyerReplicantiChance: new EternityMilestoneState(db.autobuyerReplicantiChance), - autobuyerReplicantiInterval: new EternityMilestoneState(db.autobuyerReplicantiInterval), - autobuyerReplicantiMaxGalaxies: new EternityMilestoneState(db.autobuyerReplicantiMaxGalaxies), - autobuyerEternity: new EternityMilestoneState(db.autobuyerEternity), - autoEternities: new EternityMilestoneState(db.autoEternities), - autoInfinities: new EternityMilestoneState(db.autoInfinities), - }; -}()); - -export const EternityMilestones = { - // This is a bit of a hack because autobuyerID is a function that returns EternityMilestoneState objects instead of a - // EternityMilestoneState object itself - all: Object.values(EternityMilestone) - .filter(m => typeof m !== "function") - .concat(Array.dimensionTiers - .map(tier => new EternityMilestoneState(GameDatabase.eternity.milestones[`autobuyerID${tier}`])) - ) -}; +export const EternityMilestone = mapGameDataToObject( + GameDatabase.eternity.milestones, + config => (config.isBaseResource + ? new EternityMilestoneState(config) + : new EternityMilestoneState(config)) +); class EternityUpgradeState extends SetPurchasableMechanicState { get currency() { @@ -321,16 +289,9 @@ class EPMultiplierState extends GameMechanicState { } } +export const EternityUpgrade = mapGameDataToObject( + GameDatabase.eternity.upgrades, + config => new EternityUpgradeState(config) +); -export const EternityUpgrade = (function() { - const db = GameDatabase.eternity.upgrades; - return { - idMultEP: new EternityUpgradeState(db.idMultEP), - idMultEternities: new EternityUpgradeState(db.idMultEternities), - idMultICRecords: new EternityUpgradeState(db.idMultICRecords), - tdMultAchs: new EternityUpgradeState(db.tdMultAchs), - tdMultTheorems: new EternityUpgradeState(db.tdMultTheorems), - tdMultRealTime: new EternityUpgradeState(db.tdMultRealTime), - epMult: new EPMultiplierState(), - }; -}()); +EternityUpgrade.epMult = new EPMultiplierState(); diff --git a/javascripts/core/kong.js b/javascripts/core/kong.js index f38387381..fa5914162 100644 --- a/javascripts/core/kong.js +++ b/javascripts/core/kong.js @@ -60,17 +60,10 @@ class ShopPurchaseState extends RebuyableMechanicState { } } -export const ShopPurchase = (function() { - const db = GameDatabase.shopPurchases; - return { - dimPurchases: new ShopPurchaseState(db.dimPurchases), - IPPurchases: new ShopPurchaseState(db.IPPurchases), - EPPurchases: new ShopPurchaseState(db.EPPurchases), - allDimPurchases: new ShopPurchaseState(db.allDimPurchases) - }; -}()); - -ShopPurchase.all = Object.values(ShopPurchase); +export const ShopPurchase = mapGameDataToObject( + GameDatabase.shopPurchases, + config => new ShopPurchaseState(config) +); kong.purchaseTimeSkip = function(cost) { if (player.IAP.totalSTD - player.IAP.spentSTD < cost) return; diff --git a/javascripts/core/perks.js b/javascripts/core/perks.js index 2606bb25c..895196b64 100644 --- a/javascripts/core/perks.js +++ b/javascripts/core/perks.js @@ -49,61 +49,13 @@ class PerkState extends SetPurchasableMechanicState { } } -export const Perk = (function() { - const db = GameDatabase.reality.perks; - return { - firstPerk: new PerkState(db.firstPerk), - startAM: new PerkState(db.startAM), - startIP1: new PerkState(db.startIP1), - startIP2: new PerkState(db.startIP2), - startEP1: new PerkState(db.startEP1), - startEP2: new PerkState(db.startEP2), - startEP3: new PerkState(db.startEP3), - startTP: new PerkState(db.startTP), - antimatterNoReset: new PerkState(db.antimatterNoReset), - studyPassive: new PerkState(db.studyPassive), - autounlockEU1: new PerkState(db.autounlockEU1), - autounlockEU2: new PerkState(db.autounlockEU2), - autounlockDilation1: new PerkState(db.autounlockDilation1), - autounlockDilation2: new PerkState(db.autounlockDilation2), - autounlockDilation3: new PerkState(db.autounlockDilation3), - autounlockTD: new PerkState(db.autounlockTD), - autounlockReality: new PerkState(db.autounlockReality), - bypassIDAntimatter: new PerkState(db.bypassIDAntimatter), - bypassTGReset: new PerkState(db.bypassTGReset), - bypassECDilation: new PerkState(db.bypassECDilation), - bypassEC1Lock: new PerkState(db.bypassEC1Lock), - bypassEC2Lock: new PerkState(db.bypassEC2Lock), - bypassEC3Lock: new PerkState(db.bypassEC3Lock), - bypassEC5Lock: new PerkState(db.bypassEC5Lock), - autocompleteEC1: new PerkState(db.autocompleteEC1), - autocompleteEC2: new PerkState(db.autocompleteEC2), - autocompleteEC3: new PerkState(db.autocompleteEC3), - studyActiveEP: new PerkState(db.studyActiveEP), - studyIdleEP: new PerkState(db.studyIdleEP), - studyECRequirement: new PerkState(db.studyECRequirement), - studyECBulk: new PerkState(db.studyECBulk), - retroactiveTP1: new PerkState(db.retroactiveTP1), - retroactiveTP2: new PerkState(db.retroactiveTP2), - retroactiveTP3: new PerkState(db.retroactiveTP3), - retroactiveTP4: new PerkState(db.retroactiveTP4), - autobuyerDilation: new PerkState(db.autobuyerDilation), - autobuyerFasterID: new PerkState(db.autobuyerFasterID), - autobuyerFasterReplicanti: new PerkState(db.autobuyerFasterReplicanti), - autobuyerFasterDilation: new PerkState(db.autobuyerFasterDilation), - ttFree: new PerkState(db.ttFree), - ttBuySingle: new PerkState(db.ttBuySingle), - ttBuyMax: new PerkState(db.ttBuyMax), - achievementGroup1: new PerkState(db.achievementGroup1), - achievementGroup2: new PerkState(db.achievementGroup2), - achievementGroup3: new PerkState(db.achievementGroup3), - achievementGroup4: new PerkState(db.achievementGroup4), - achievementGroup5: new PerkState(db.achievementGroup5) - }; -}()); +export const Perk = mapGameDataToObject( + GameDatabase.reality.perks, + config => new PerkState(config) +); export const Perks = { - all: Object.values(Perk), + all: Perk.all, /** * @param {number} id * @returns {PerkState} diff --git a/javascripts/core/secret-formula/achievements/normal-achievements.js b/javascripts/core/secret-formula/achievements/normal-achievements.js index 07bc75268..e2d79fa82 100644 --- a/javascripts/core/secret-formula/achievements/normal-achievements.js +++ b/javascripts/core/secret-formula/achievements/normal-achievements.js @@ -702,7 +702,7 @@ GameDatabase.achievements.normal = [ id: 102, name: "This mile took an eternity", description: "Get all Eternity milestones.", - checkRequirement: () => EternityMilestones.all.every(m => m.isReached), + checkRequirement: () => EternityMilestone.all.every(m => m.isReached), checkEvent: GAME_EVENT.GAME_TICK_AFTER }, { diff --git a/javascripts/core/secret-formula/speedrun-milestones.js b/javascripts/core/secret-formula/speedrun-milestones.js index 226453045..3f9138baf 100644 --- a/javascripts/core/secret-formula/speedrun-milestones.js +++ b/javascripts/core/secret-formula/speedrun-milestones.js @@ -86,7 +86,7 @@ GameDatabase.speedrunMilestones = [ key: "allEternityMilestones", name: "All Eternity Milestones", description: "Unlock all Eternity Milestones", - checkRequirement: () => EternityMilestones.all.every(m => m.isReached), + checkRequirement: () => EternityMilestone.all.every(m => m.isReached), checkEvent: GAME_EVENT.ETERNITY_RESET_AFTER, }, { diff --git a/javascripts/core/ui/tab-notifications.js b/javascripts/core/ui/tab-notifications.js index a4555759d..1c5836dab 100644 --- a/javascripts/core/ui/tab-notifications.js +++ b/javascripts/core/ui/tab-notifications.js @@ -30,19 +30,7 @@ class TabNotificationState { } } -export const TabNotification = (function() { - const db = GameDatabase.tabNotifications; - return { - firstInfinity: new TabNotificationState(db.firstInfinity), - IDUnlock: new TabNotificationState(db.ICUnlock), - ICUnlock: new TabNotificationState(db.ICUnlock), - breakInfinity: new TabNotificationState(db.breakInfinity), - firstEternity: new TabNotificationState(db.firstEternity), - dilationAfterUnlock: new TabNotificationState(db.dilationAfterUnlock), - realityUnlock: new TabNotificationState(db.realityUnlock), - blackHoleUnlock: new TabNotificationState(db.blackHoleUnlock), - automatorUnlock: new TabNotificationState(db.automatorUnlock), - teresaUnlock: new TabNotificationState(db.teresaUnlock), - alchemyUnlock: new TabNotificationState(db.alchemyUnlock), - }; -}()); +export const TabNotification = mapGameDataToObject( + GameDatabase.tabNotifications, + config => new TabNotificationState(config) +); diff --git a/javascripts/game.js b/javascripts/game.js index f56e8d19e..c6c603624 100644 --- a/javascripts/game.js +++ b/javascripts/game.js @@ -683,7 +683,7 @@ function applyAutoUnlockPerks() { if (Perk.autounlockDilation3.isBought) buyDilationUpgrade(DilationUpgrade.ttGenerator.id); if (Perk.autounlockReality.isBought) TimeStudy.reality.purchase(true); if (player.eternityUpgrades.size < 6 && Perk.autounlockEU2.isBought) { - const secondRow = Object.values(EternityUpgrade).filter(u => u.id > 3); + const secondRow = EternityUpgrade.all.filter(u => u.id > 3); for (const upgrade of secondRow) { if (player.eternityPoints.gte(upgrade.cost / 1e10)) player.eternityUpgrades.add(upgrade.id); } diff --git a/src/components/tabs/glyphs/RealityReminder.vue b/src/components/tabs/glyphs/RealityReminder.vue index 42c0479f3..118188e4a 100644 --- a/src/components/tabs/glyphs/RealityReminder.vue +++ b/src/components/tabs/glyphs/RealityReminder.vue @@ -82,7 +82,7 @@ export default { this.ecCount = EternityChallenges.completions; this.missingAchievements = Achievements.preReality.countWhere(a => !a.isUnlocked); // Repeatable dilation upgrades don't have isBought, but do have boughtAmount - this.unpurchasedDilationUpgrades = Object.values(DilationUpgrade) + this.unpurchasedDilationUpgrades = DilationUpgrade.all .countWhere(u => (u.isBought === undefined ? u.boughtAmount === 0 : !u.isBought) && !u.config.pelleOnly); this.currLog10EP = player.eternityPoints.log10(); this.cheapestLog10TD = Math.min(...TimeDimensions.all.map(x => x.cost.log10())); From a4ef05596d2dc330a43264a19fcfa7c179c4a6b9 Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Wed, 18 May 2022 20:13:38 -0700 Subject: [PATCH 50/89] clean up glyph sacrifice gamedatabase --- javascripts/core/glyphs/glyph-core.js | 16 ++++--------- .../reality/glyph-sacrifices.js | 24 ++++++++++++------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/javascripts/core/glyphs/glyph-core.js b/javascripts/core/glyphs/glyph-core.js index 131cf7f77..b462181ff 100644 --- a/javascripts/core/glyphs/glyph-core.js +++ b/javascripts/core/glyphs/glyph-core.js @@ -640,18 +640,10 @@ export const Glyphs = { class GlyphSacrificeState extends GameMechanicState { } -export const GlyphSacrifice = (function() { - const db = GameDatabase.reality.glyphSacrifice; - return { - time: new GlyphSacrificeState(db.time), - dilation: new GlyphSacrificeState(db.dilation), - replication: new GlyphSacrificeState(db.replication), - infinity: new GlyphSacrificeState(db.infinity), - power: new GlyphSacrificeState(db.power), - effarig: new GlyphSacrificeState(db.effarig), - reality: new GlyphSacrificeState(db.reality), - }; -}()); +export const GlyphSacrifice = mapGameDataToObject( + GameDatabase.reality.glyphSacrifice, + config => new GlyphSacrificeState(config) +); export function recalculateAllGlyphs() { for (let i = 0; i < player.reality.glyphs.active.length; i++) { diff --git a/javascripts/core/secret-formula/reality/glyph-sacrifices.js b/javascripts/core/secret-formula/reality/glyph-sacrifices.js index 7f54e1008..8a34c4d6b 100644 --- a/javascripts/core/secret-formula/reality/glyph-sacrifices.js +++ b/javascripts/core/secret-formula/reality/glyph-sacrifices.js @@ -1,7 +1,7 @@ import { GameDatabase } from "../game-database"; -GameDatabase.reality.glyphSacrifice = [ - { +GameDatabase.reality.glyphSacrifice = { + "power": { id: "power", effect: added => { if (Pelle.isDisabled("glyphsac")) return 0; @@ -19,7 +19,8 @@ GameDatabase.reality.glyphSacrifice = [ : ""; return `Distant Galaxy scaling starts ${formatInt(amount)} later${nextGalaxyText}`; } - }, { + }, + "infinity": { id: "infinity", effect: added => { if (Pelle.isDisabled("glyphsac")) return 1; @@ -31,7 +32,8 @@ GameDatabase.reality.glyphSacrifice = [ if (Pelle.isDisabled("glyphsac")) return `Glyph Sacrifice is disabled in Pelle`; return `${formatX(amount, 2, 2)} bigger multiplier when buying 8th Infinity Dimension.`; } - }, { + }, + "time": { id: "time", effect: added => { if (Pelle.isDisabled("glyphsac")) return 1; @@ -43,7 +45,8 @@ GameDatabase.reality.glyphSacrifice = [ if (Pelle.isDisabled("glyphsac")) return `Glyph Sacrifice is disabled in Pelle`; return `${formatX(amount, 2, 2)} bigger multiplier when buying 8th Time Dimension.`; } - }, { + }, + "replication": { id: "replication", effect: added => { if (Pelle.isDisabled("glyphsac")) return 0; @@ -61,7 +64,8 @@ GameDatabase.reality.glyphSacrifice = [ : ""; return `Replicanti Galaxy scaling starts ${formatInt(amount)} later${nextGalaxyText}`; } - }, { + }, + "dilation": { id: "dilation", effect: added => { if (Pelle.isDisabled("glyphsac")) return 1; @@ -75,7 +79,8 @@ GameDatabase.reality.glyphSacrifice = [ if (Pelle.isDisabled("glyphsac")) return `Glyph Sacrifice is disabled in Pelle`; return `Multiply Tachyon Particle gain by ${formatX(amount, 2, 2)}`; } - }, { + }, + "effarig": { id: "effarig", effect: added => { if (Pelle.isDisabled("glyphsac")) return 0; @@ -87,7 +92,8 @@ GameDatabase.reality.glyphSacrifice = [ if (Pelle.isDisabled("glyphsac")) return `Glyph Sacrifice is disabled in Pelle`; return `+${formatPercents(amount / 100, 2)} additional Glyph rarity`; } - }, { + }, + "reality": { id: "reality", effect: added => { if (Pelle.isDisabled("glyphsac")) return 0; @@ -99,4 +105,4 @@ GameDatabase.reality.glyphSacrifice = [ return `${formatPercents(amount - 1, 2)} increased Alchemy yield`; } } -].mapToObject(g => g.id, g => g); +}; From c6eb545007a5bf71c8680ab8bb33995557f72a7f Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Wed, 18 May 2022 21:28:39 -0700 Subject: [PATCH 51/89] drop 4 more unneeded IIFEs related to mapGameDataToObject --- .../core/celestials/pelle/galaxy-generator.js | 10 ++++------ javascripts/core/celestials/pelle/pelle.js | 16 +++++++--------- javascripts/core/celestials/pelle/rifts.js | 10 ++++------ javascripts/core/celestials/pelle/strikes.js | 10 ++++------ 4 files changed, 19 insertions(+), 27 deletions(-) diff --git a/javascripts/core/celestials/pelle/galaxy-generator.js b/javascripts/core/celestials/pelle/galaxy-generator.js index b5249e0ad..6b1405e2e 100644 --- a/javascripts/core/celestials/pelle/galaxy-generator.js +++ b/javascripts/core/celestials/pelle/galaxy-generator.js @@ -115,9 +115,7 @@ export class GalaxyGeneratorUpgrade extends RebuyableMechanicState { } } -export const GalaxyGeneratorUpgrades = (function() { - return mapGameDataToObject( - GameDatabase.celestials.pelle.galaxyGeneratorUpgrades, - config => new GalaxyGeneratorUpgrade(config) - ); -}()); +export const GalaxyGeneratorUpgrades = mapGameDataToObject( + GameDatabase.celestials.pelle.galaxyGeneratorUpgrades, + config => new GalaxyGeneratorUpgrade(config) +); diff --git a/javascripts/core/celestials/pelle/pelle.js b/javascripts/core/celestials/pelle/pelle.js index e9d522e41..9761b24c0 100644 --- a/javascripts/core/celestials/pelle/pelle.js +++ b/javascripts/core/celestials/pelle/pelle.js @@ -455,15 +455,13 @@ export class PelleUpgradeState extends SetPurchasableMechanicState { } -export const PelleUpgrade = (function() { - return mapGameDataToObject( - GameDatabase.celestials.pelle.upgrades, - config => (config.rebuyable - ? new RebuyablePelleUpgradeState(config) - : new PelleUpgradeState(config) - ) - ); -}()); +export const PelleUpgrade = mapGameDataToObject( + GameDatabase.celestials.pelle.upgrades, + config => (config.rebuyable + ? new RebuyablePelleUpgradeState(config) + : new PelleUpgradeState(config) + ) +); PelleUpgrade.rebuyables = PelleUpgrade.all.filter(u => u.isRebuyable); PelleUpgrade.singles = PelleUpgrade.all.filter(u => !u.isRebuyable); diff --git a/javascripts/core/celestials/pelle/rifts.js b/javascripts/core/celestials/pelle/rifts.js index 3682e67fd..b1bd9bbc8 100644 --- a/javascripts/core/celestials/pelle/rifts.js +++ b/javascripts/core/celestials/pelle/rifts.js @@ -170,11 +170,9 @@ class RiftState extends GameMechanicState { } } -export const PelleRifts = (function() { - return mapGameDataToObject( - GameDatabase.celestials.pelle.rifts, - config => new RiftState(config) - ); -}()); +export const PelleRifts = mapGameDataToObject( + GameDatabase.celestials.pelle.rifts, + config => new RiftState(config) +); PelleRifts.totalMilestones = () => PelleRifts.all.flatMap(x => x.milestones).countWhere(x => x.canBeApplied); diff --git a/javascripts/core/celestials/pelle/strikes.js b/javascripts/core/celestials/pelle/strikes.js index b0a5ce7e8..9f9500ffa 100644 --- a/javascripts/core/celestials/pelle/strikes.js +++ b/javascripts/core/celestials/pelle/strikes.js @@ -56,9 +56,7 @@ class PelleStrikeState extends BitUpgradeState { } } -export const PelleStrikes = (function() { - return mapGameDataToObject( - GameDatabase.celestials.pelle.strikes, - config => new PelleStrikeState(config) - ); -}()); +export const PelleStrikes = mapGameDataToObject( + GameDatabase.celestials.pelle.strikes, + config => new PelleStrikeState(config) +); From 205697d45560382c093ab4116b6c760d3a611911 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Sun, 24 Apr 2022 22:21:31 +0800 Subject: [PATCH 52/89] Fix some TimeStudyTree bug (see desc) `73, 83, 103, 93`, for example, would get shortened to `time`, even though time has the behaviour of `73, 83, 93, 103`, which is different This matters especially for orderings of light/dark studies --- javascripts/core/time-studies/time-study-tree.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/javascripts/core/time-studies/time-study-tree.js b/javascripts/core/time-studies/time-study-tree.js index b994426c0..784d70447 100644 --- a/javascripts/core/time-studies/time-study-tree.js +++ b/javascripts/core/time-studies/time-study-tree.js @@ -110,16 +110,11 @@ export class TimeStudyTree { static formatStudyList(input) { let internal = input.toLowerCase().replaceAll(" ", ""); - // \\b means 0-width word boundry, meaning "target = 11" doesnt match 111 - const testRegex = target => new RegExp(`\\b${target}\\b,?`, "gu"); - // If the studylist has all IDs, replace the first instance with the shorthand, then remove the rest + // If the studylist has the exact order of the ids, replace them with the shorthand this.sets.forEach((ids, name) => { - const hasAllIds = ids.every(x => testRegex(x).test(internal)); - if (hasAllIds) { - internal = internal.replace(testRegex(ids[0]), `${name},`); - for (const i of ids) { - internal = internal.replace(testRegex(i), ""); - } + const testString = ids.join(","); + if (internal.includes(testString)) { + internal = internal.replaceAll(testString, `${name}`); } }); return internal.replaceAll(",", ", ").replace("|", " | "); From 2de66f459eaf7e62fe4d1ea13188cab9e8e482c8 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Tue, 3 May 2022 20:11:28 +0800 Subject: [PATCH 53/89] Make conversion of shorthands manual --- .../core/time-studies/time-study-tree.js | 20 ++++++++++++++----- src/components/modals/StudyStringModal.vue | 13 +++++++++++- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/javascripts/core/time-studies/time-study-tree.js b/javascripts/core/time-studies/time-study-tree.js index 784d70447..d6327cc6d 100644 --- a/javascripts/core/time-studies/time-study-tree.js +++ b/javascripts/core/time-studies/time-study-tree.js @@ -109,12 +109,22 @@ export class TimeStudyTree { } static formatStudyList(input) { - let internal = input.toLowerCase().replaceAll(" ", ""); - // If the studylist has the exact order of the ids, replace them with the shorthand + const internal = input.toLowerCase().replaceAll(" ", ""); + return internal.replaceAll(",", ", ").replace("|", " | "); + } + + static collapseStudyShorthands(input) { + let internal = input.replaceAll(" ", ""); + // \\b means 0-width word boundry, meaning "target = 11" doesnt match 111 + const testRegex = target => new RegExp(`\\b${target}\\b,?`, "gu"); + // If the studylist has all IDs, replace the first instance with the shorthand, then remove the rest this.sets.forEach((ids, name) => { - const testString = ids.join(","); - if (internal.includes(testString)) { - internal = internal.replaceAll(testString, `${name}`); + const hasAllIds = ids.every(x => testRegex(x).test(internal)); + if (hasAllIds) { + internal = internal.replace(testRegex(ids[0]), `${name},`); + for (const i of ids) { + internal = internal.replace(testRegex(i), ""); + } } }); return internal.replaceAll(",", ", ").replace("|", " | "); diff --git a/src/components/modals/StudyStringModal.vue b/src/components/modals/StudyStringModal.vue index 420b02f72..567146b58 100644 --- a/src/components/modals/StudyStringModal.vue +++ b/src/components/modals/StudyStringModal.vue @@ -2,13 +2,15 @@ import { sha512_256 } from "js-sha512"; import ModalWrapperChoice from "@/components/modals/ModalWrapperChoice"; +import PrimaryButton from "@/components/PrimaryButton"; import StudyStringLine from "@/components/modals/StudyStringLine"; export default { name: "StudyStringModal", components: { ModalWrapperChoice, - StudyStringLine + StudyStringLine, + PrimaryButton }, props: { modalConfig: { @@ -131,6 +133,9 @@ export default { if (this.isImporting) this.importTree(); else this.savePreset(); }, + convertInputShorthands() { + this.input = TimeStudyTree.collapseStudyShorthands(this.input); + }, importTree() { if (!this.inputIsValid) return; if (this.inputIsSecret) SecretAchievement(37).unlock(); @@ -216,6 +221,12 @@ export default { Not a valid tree +
+
+ + Collapse Study ID list Shorthands + +
From dd0ba847041e16e7d90e94ba861cd45831d1b0fd Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 5 May 2022 20:42:49 +0800 Subject: [PATCH 54/89] Remove all auto study string formatting --- javascripts/core/time-studies/time-study-tree.js | 5 ----- src/components/modals/StudyStringModal.vue | 4 ++-- .../tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/javascripts/core/time-studies/time-study-tree.js b/javascripts/core/time-studies/time-study-tree.js index d6327cc6d..3a5e14268 100644 --- a/javascripts/core/time-studies/time-study-tree.js +++ b/javascripts/core/time-studies/time-study-tree.js @@ -109,11 +109,6 @@ export class TimeStudyTree { } static formatStudyList(input) { - const internal = input.toLowerCase().replaceAll(" ", ""); - return internal.replaceAll(",", ", ").replace("|", " | "); - } - - static collapseStudyShorthands(input) { let internal = input.replaceAll(" ", ""); // \\b means 0-width word boundry, meaning "target = 11" doesnt match 111 const testRegex = target => new RegExp(`\\b${target}\\b,?`, "gu"); diff --git a/src/components/modals/StudyStringModal.vue b/src/components/modals/StudyStringModal.vue index 567146b58..aee83ad80 100644 --- a/src/components/modals/StudyStringModal.vue +++ b/src/components/modals/StudyStringModal.vue @@ -134,7 +134,7 @@ export default { else this.savePreset(); }, convertInputShorthands() { - this.input = TimeStudyTree.collapseStudyShorthands(this.input); + this.input = TimeStudyTree.formatStudyList(this.input); }, importTree() { if (!this.inputIsValid) return; @@ -146,7 +146,7 @@ export default { }, savePreset() { if (this.inputIsValid) { - player.timestudy.presets[this.modalConfig.id].studies = TimeStudyTree.formatStudyList(this.input); + player.timestudy.presets[this.modalConfig.id].studies = this.input; GameUI.notify.eternity(`Study Tree ${this.name} successfully edited.`); this.emitClose(); } diff --git a/src/components/tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue b/src/components/tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue index ac1919924..3bddf7093 100644 --- a/src/components/tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue +++ b/src/components/tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue @@ -35,7 +35,7 @@ export default { }, save() { this.hideContextMenu(); - this.preset.studies = TimeStudyTree.formatStudyList(GameCache.currentStudyTree.value.exportString); + this.preset.studies = GameCache.currentStudyTree.value.exportString; const presetName = this.name ? `Study preset "${this.name}"` : "Study preset"; GameUI.notify.eternity(`${presetName} saved in slot ${this.saveslot}`); }, From 66d00bcf6f64c6bd94c52a62e8c98f7b9d742de4 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 5 May 2022 22:26:59 +0800 Subject: [PATCH 55/89] Add back missing toLowerCase brain farted --- javascripts/core/time-studies/time-study-tree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascripts/core/time-studies/time-study-tree.js b/javascripts/core/time-studies/time-study-tree.js index 3a5e14268..b994426c0 100644 --- a/javascripts/core/time-studies/time-study-tree.js +++ b/javascripts/core/time-studies/time-study-tree.js @@ -109,7 +109,7 @@ export class TimeStudyTree { } static formatStudyList(input) { - let internal = input.replaceAll(" ", ""); + let internal = input.toLowerCase().replaceAll(" ", ""); // \\b means 0-width word boundry, meaning "target = 11" doesnt match 111 const testRegex = target => new RegExp(`\\b${target}\\b,?`, "gu"); // If the studylist has all IDs, replace the first instance with the shorthand, then remove the rest From 957c7b124304c176209d2e113432ab782ab7c2d6 Mon Sep 17 00:00:00 2001 From: L4R5W <66326188+L4R5W@users.noreply.github.com> Date: Thu, 19 May 2022 12:14:51 +0200 Subject: [PATCH 56/89] keep infinity broken on eternity in doomed (#2607) --- javascripts/core/eternity.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascripts/core/eternity.js b/javascripts/core/eternity.js index 0475eb0cc..07bf10b35 100644 --- a/javascripts/core/eternity.js +++ b/javascripts/core/eternity.js @@ -89,7 +89,7 @@ export function eternity(force, auto, specialConditions = {}) { initializeChallengeCompletions(); initializeResourcesAfterEternity(); - if (!EternityMilestone.keepAutobuyers.isReached) { + if (!EternityMilestone.keepAutobuyers.isReached && !(Pelle.isDoomed && PelleUpgrade.keepAutobuyers.canBeApplied)) { // Fix infinity because it can only break after big crunch autobuyer interval is maxed player.break = false; } From eb4b7acca14625800a3b63bffcf609f041a25cd1 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 19 May 2022 18:26:19 +0800 Subject: [PATCH 57/89] Codefactor likes my import statements now --- javascripts/core/devtools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascripts/core/devtools.js b/javascripts/core/devtools.js index 44b92d59b..3b4e0d497 100644 --- a/javascripts/core/devtools.js +++ b/javascripts/core/devtools.js @@ -1,7 +1,7 @@ import { sha512_256 } from "js-sha512"; -import FullScreenAnimationHandler from "./full-screen-animation-handler"; import { DC } from "./constants"; +import FullScreenAnimationHandler from "./full-screen-animation-handler"; /* eslint-disable no-console */ // Disabling no-console here seems From 6f80704e421bc1af9016e9ab250fd5ea100110b7 Mon Sep 17 00:00:00 2001 From: Hirame1 <56225774+Hirame1@users.noreply.github.com> Date: Sat, 30 Apr 2022 21:20:32 +0700 Subject: [PATCH 58/89] Force re-render alchemy chart on toggle all --- src/components/tabs/alchemy/AlchemyTab.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/tabs/alchemy/AlchemyTab.vue b/src/components/tabs/alchemy/AlchemyTab.vue index 989f7706d..95e63b064 100644 --- a/src/components/tabs/alchemy/AlchemyTab.vue +++ b/src/components/tabs/alchemy/AlchemyTab.vue @@ -162,6 +162,7 @@ export default { reaction.isActive = false; } } + this.$forceUpdate(); } } }; From 50600e7c5edc99b9a4ff3631e7ceb2dde19981ab Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Sat, 30 Apr 2022 22:57:28 +0800 Subject: [PATCH 59/89] Remove $forceUpdate, implement better-ish solution --- src/components/tabs/alchemy/AlchemyTab.vue | 26 ++++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/components/tabs/alchemy/AlchemyTab.vue b/src/components/tabs/alchemy/AlchemyTab.vue index 95e63b064..e3b10eddd 100644 --- a/src/components/tabs/alchemy/AlchemyTab.vue +++ b/src/components/tabs/alchemy/AlchemyTab.vue @@ -21,6 +21,7 @@ export default { alchemyCap: 0, capFactor: 0, createdRealityGlyph: false, + allReactionsDisabled: false }; }, computed: { @@ -46,6 +47,12 @@ export default { "tutorial--glow": !this.createdRealityGlyph }; }, + reactions() { + return AlchemyReactions.all.compact().filter(r => r._product.isUnlocked); + } + }, + created() { + this.updateReactionData(); }, methods: { update() { @@ -79,6 +86,7 @@ export default { } if (resource.isBaseResource) return; resource.reaction.isActive = !resource.reaction.isActive; + this.updateReactionData(); GameUI.update(); }, isUnlocked(reactionArrow) { @@ -151,18 +159,22 @@ export default { Modal.h2p.show(); }, toggleAllReactions() { - const reactions = AlchemyReactions.all.compact().filter(r => r._product.isUnlocked); - const allReactionsDisabled = reactions.every(reaction => !reaction.isActive); - if (allReactionsDisabled) { - for (const reaction of reactions) { + if (this.allReactionsDisabled) { + for (const reaction of this.reactions) { reaction.isActive = true; } } else { - for (const reaction of reactions) { + for (const reaction of this.reactions) { reaction.isActive = false; } } - this.$forceUpdate(); + // This is moreso here to force an update than anything but it also adds some info to the "Toggle all reactions" + // button, since its behaviour is unclear to the player- Would it want to disable/enable all if only some were on? + // This switches it to outright say disabled/enabled instead of toggle and also updates the reaction path colours + this.updateReactionData(); + }, + updateReactionData() { + this.allReactionsDisabled = this.reactions.every(reaction => !reaction.isActive); } } }; @@ -181,7 +193,7 @@ export default { class="o-primary-btn--subtab-option" @click="toggleAllReactions" > - Toggle all reactions + {{ allReactionsDisabled ? "Enable" : "Disable" }} all reactions Date: Tue, 3 May 2022 19:20:53 +0700 Subject: [PATCH 60/89] Address PR feedbacks --- src/components/tabs/alchemy/AlchemyTab.vue | 25 +++++----------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/src/components/tabs/alchemy/AlchemyTab.vue b/src/components/tabs/alchemy/AlchemyTab.vue index e3b10eddd..9919ad40e 100644 --- a/src/components/tabs/alchemy/AlchemyTab.vue +++ b/src/components/tabs/alchemy/AlchemyTab.vue @@ -48,12 +48,9 @@ export default { }; }, reactions() { - return AlchemyReactions.all.compact().filter(r => r._product.isUnlocked); + return AlchemyReactions.all.compact().filter(r => r.product.isUnlocked); } }, - created() { - this.updateReactionData(); - }, methods: { update() { this.reactionsAvailable = AlchemyResources.all.filter(res => !res.isBaseResource && res.isUnlocked).length !== 0; @@ -62,6 +59,7 @@ export default { this.alchemyCap = Ra.alchemyResourceCap; this.capFactor = 1 / GlyphSacrificeHandler.glyphRefinementEfficiency; this.createdRealityGlyph = player.reality.glyphs.createdRealityGlyph; + this.allReactionsDisabled = this.reactions.every(reaction => !reaction.isActive); }, orbitSize(orbit) { const maxRadius = this.layout.orbits.map(o => o.radius).max(); @@ -86,7 +84,6 @@ export default { } if (resource.isBaseResource) return; resource.reaction.isActive = !resource.reaction.isActive; - this.updateReactionData(); GameUI.update(); }, isUnlocked(reactionArrow) { @@ -159,23 +156,11 @@ export default { Modal.h2p.show(); }, toggleAllReactions() { - if (this.allReactionsDisabled) { - for (const reaction of this.reactions) { - reaction.isActive = true; - } - } else { - for (const reaction of this.reactions) { - reaction.isActive = false; - } + const setIsActive = this.allReactionsDisabled; + for (const reaction of this.reactions) { + reaction.isActive = setIsActive; } - // This is moreso here to force an update than anything but it also adds some info to the "Toggle all reactions" - // button, since its behaviour is unclear to the player- Would it want to disable/enable all if only some were on? - // This switches it to outright say disabled/enabled instead of toggle and also updates the reaction path colours - this.updateReactionData(); }, - updateReactionData() { - this.allReactionsDisabled = this.reactions.every(reaction => !reaction.isActive); - } } }; From 94c4014e7a02c876368390575a525e085128f249 Mon Sep 17 00:00:00 2001 From: Hirame1 <56225774+Hirame1@users.noreply.github.com> Date: Wed, 4 May 2022 23:54:19 +0700 Subject: [PATCH 61/89] Improve design of Reality Glyph creation modal --- .../modals/RealityGlyphCreationModal.vue | 85 +++++++++++-------- 1 file changed, 50 insertions(+), 35 deletions(-) diff --git a/src/components/modals/RealityGlyphCreationModal.vue b/src/components/modals/RealityGlyphCreationModal.vue index 76f5a0925..8702bf625 100644 --- a/src/components/modals/RealityGlyphCreationModal.vue +++ b/src/components/modals/RealityGlyphCreationModal.vue @@ -51,44 +51,59 @@ export default { + + \ No newline at end of file From be1a7de3bf5a5bfd625890609e941db8a7056490 Mon Sep 17 00:00:00 2001 From: Hirame1 <56225774+Hirame1@users.noreply.github.com> Date: Thu, 5 May 2022 18:59:03 +0700 Subject: [PATCH 62/89] Adjust layout for consistency --- public/stylesheets/styles.css | 2 -- src/components/modals/RealityGlyphCreationModal.vue | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index 1eb4d4f27..a56ed48de 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -7768,8 +7768,6 @@ kbd { display: flex; flex-direction: column; width: 60rem; - text-align: left; - font-size: 1.2rem; padding: 0.25rem 1rem; } diff --git a/src/components/modals/RealityGlyphCreationModal.vue b/src/components/modals/RealityGlyphCreationModal.vue index 8702bf625..dbf50de26 100644 --- a/src/components/modals/RealityGlyphCreationModal.vue +++ b/src/components/modals/RealityGlyphCreationModal.vue @@ -64,7 +64,7 @@ export default { Reality Glyphs can also be sacrificed to increase the yield from alchemy reactions. Like Effarig Glyphs, you cannot equip more than one at the same time. -
+
Available Effects:
@@ -83,7 +83,6 @@ export default { Create a Reality Glyph! @@ -99,7 +98,7 @@ export default { \ No newline at end of file + diff --git a/src/components/modals/PopupModal.vue b/src/components/modals/PopupModal.vue index c831348cb..17ae175f8 100644 --- a/src/components/modals/PopupModal.vue +++ b/src/components/modals/PopupModal.vue @@ -35,6 +35,7 @@ export default {
diff --git a/src/components/modals/ReplaceGlyphModal.vue b/src/components/modals/ReplaceGlyphModal.vue index 7ab57cedb..49af966dc 100644 --- a/src/components/modals/ReplaceGlyphModal.vue +++ b/src/components/modals/ReplaceGlyphModal.vue @@ -7,21 +7,25 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + targetSlot: { + type: Number, + required: true + }, + inventoryIndex: { + type: Number, required: true } }, data() { return { - targetSlot: 0, + target: 0, idx: 0, }; }, methods: { update() { - this.targetSlot = this.modalConfig.targetSlot; - this.idx = this.modalConfig.inventoryIndex; + this.target = this.targetSlot; + this.idx = this.inventoryIndex; this.glyph = Glyphs.findByInventoryIndex(this.idx); }, handleYesClick() { diff --git a/src/components/modals/StudyStringModal.vue b/src/components/modals/StudyStringModal.vue index aee83ad80..072c284a4 100644 --- a/src/components/modals/StudyStringModal.vue +++ b/src/components/modals/StudyStringModal.vue @@ -13,8 +13,8 @@ export default { PrimaryButton }, props: { - modalConfig: { - type: Object, + id: { + type: Number, required: true, } }, @@ -28,7 +28,7 @@ export default { // This modal is used by both study importing and preset editing but only has a prop actually passed in when // editing (which is the preset index). Needs to be an undefined check because index can be zero isImporting() { - return this.modalConfig.id === undefined; + return this.id === undefined; }, // This represents the state reached from importing into an empty tree importedTree() { @@ -121,7 +121,7 @@ export default { }, // Needs to be assigned in created() or else they will end up being undefined when importing created() { - const preset = player.timestudy.presets[this.modalConfig.id]; + const preset = player.timestudy.presets[this.id]; this.input = preset ? preset.studies : ""; this.name = preset ? preset.name : ""; }, @@ -146,7 +146,7 @@ export default { }, savePreset() { if (this.inputIsValid) { - player.timestudy.presets[this.modalConfig.id].studies = this.input; + player.timestudy.presets[this.id].studies = this.input; GameUI.notify.eternity(`Study Tree ${this.name} successfully edited.`); this.emitClose(); } diff --git a/src/components/modals/glyph-management/DeleteGlyphModal.vue b/src/components/modals/glyph-management/DeleteGlyphModal.vue index ec045a845..baaf8b86b 100644 --- a/src/components/modals/glyph-management/DeleteGlyphModal.vue +++ b/src/components/modals/glyph-management/DeleteGlyphModal.vue @@ -7,8 +7,8 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + idx: { + type: Number, required: true } }, @@ -19,12 +19,12 @@ export default { }, computed: { glyph() { - return Glyphs.findByInventoryIndex(this.modalConfig.idx); + return Glyphs.findByInventoryIndex(this.idx); }, }, methods: { update() { - const newGlyph = Glyphs.findByInventoryIndex(this.modalConfig.idx); + const newGlyph = Glyphs.findByInventoryIndex(this.idx); if (this.glyph !== newGlyph && this.confirmedDelete) { // Why is confirmedDelete here: refer to SacrificeGlyphModal.vue diff --git a/src/components/modals/glyph-management/PurgeGlyphModal.vue b/src/components/modals/glyph-management/PurgeGlyphModal.vue index a6717d05a..a087018b7 100644 --- a/src/components/modals/glyph-management/PurgeGlyphModal.vue +++ b/src/components/modals/glyph-management/PurgeGlyphModal.vue @@ -7,8 +7,8 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + harsh: { + type: Boolean, required: true } }, @@ -19,9 +19,6 @@ export default { }; }, computed: { - harsh() { - return this.modalConfig.harsh; - }, threshold() { return this.harsh ? 1 : 5; }, diff --git a/src/components/modals/glyph-management/RefineGlyphModal.vue b/src/components/modals/glyph-management/RefineGlyphModal.vue index 9feac2c93..cb2a72ebb 100644 --- a/src/components/modals/glyph-management/RefineGlyphModal.vue +++ b/src/components/modals/glyph-management/RefineGlyphModal.vue @@ -7,8 +7,8 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + idx: { + type: Number, required: true } }, @@ -24,7 +24,7 @@ export default { }, computed: { glyph() { - return Glyphs.findByInventoryIndex(this.modalConfig.idx); + return Glyphs.findByInventoryIndex(this.idx); }, resource() { return GlyphSacrificeHandler.glyphAlchemyResource(this.glyph); @@ -43,7 +43,7 @@ export default { this.after = this.resourceAmount + this.gain; - const newGlyph = Glyphs.findByInventoryIndex(this.modalConfig.idx); + const newGlyph = Glyphs.findByInventoryIndex(this.idx); if (this.glyph !== newGlyph && !this.confirmedRefine) { // Why is confirmedRefine here: refer to SacrificeGlyphModal.vue diff --git a/src/components/modals/glyph-management/SacrificeGlyphModal.vue b/src/components/modals/glyph-management/SacrificeGlyphModal.vue index 20f3a62bd..daecc81d6 100644 --- a/src/components/modals/glyph-management/SacrificeGlyphModal.vue +++ b/src/components/modals/glyph-management/SacrificeGlyphModal.vue @@ -7,8 +7,8 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + idx: { + type: Number, required: true } }, @@ -21,7 +21,7 @@ export default { }, computed: { glyph() { - return Glyphs.findByInventoryIndex(this.modalConfig.idx); + return Glyphs.findByInventoryIndex(this.idx); }, message() { return `Do you really want to sacrifice this Glyph? Your total power of sacrificed ${this.glyph.type} @@ -34,7 +34,7 @@ export default { this.currentGlyphSacrifice = player.reality.glyphs.sac[this.glyph.type]; this.gain = GlyphSacrificeHandler.glyphSacrificeGain(this.glyph); - const newGlyph = Glyphs.findByInventoryIndex(this.modalConfig.idx); + const newGlyph = Glyphs.findByInventoryIndex(this.idx); if (this.glyph !== newGlyph && !this.confirmedSacrifice) { // ConfirmedSacrifice is here because when you sac a glyph with confirmation it diff --git a/src/components/modals/prestige/AntimatterGalaxyModal.vue b/src/components/modals/prestige/AntimatterGalaxyModal.vue index 293a6c805..0bbfe8acd 100644 --- a/src/components/modals/prestige/AntimatterGalaxyModal.vue +++ b/src/components/modals/prestige/AntimatterGalaxyModal.vue @@ -7,8 +7,8 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + bulk: { + type: Number, required: true, } }, @@ -21,7 +21,6 @@ export default { }; }, computed: { - bulk() { return this.modalConfig.bulk; }, topLabel() { if (this.bulk) return `You are about to purchase ${quantifyInt("Antimatter Galaxy", this.newGalaxies)}`; return `You are about to purchase an Antimatter Galaxy`; diff --git a/src/components/modals/prestige/DimensionBoostModal.vue b/src/components/modals/prestige/DimensionBoostModal.vue index 22c3157f3..2ffed8ef7 100644 --- a/src/components/modals/prestige/DimensionBoostModal.vue +++ b/src/components/modals/prestige/DimensionBoostModal.vue @@ -7,13 +7,12 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + bulk: { + type: Number, required: true, } }, computed: { - bulk() { return this.modalConfig.bulk; }, topLabel() { return `You are about to do a Dimension Boost Reset`; }, diff --git a/src/components/modals/prestige/EnterCelestialsModal.vue b/src/components/modals/prestige/EnterCelestialsModal.vue index 1d248f41b..34f921385 100644 --- a/src/components/modals/prestige/EnterCelestialsModal.vue +++ b/src/components/modals/prestige/EnterCelestialsModal.vue @@ -9,20 +9,24 @@ export default { EnterCelestialsRaPet, }, props: { - modalConfig: { - type: Object, + number: { + type: Number, required: true, + }, + name: { + type: String, + required: true } }, computed: { description() { - return GameDatabase.celestials.descriptions[this.modalConfig.number].description().split("\n"); + return GameDatabase.celestials.descriptions[this.number].description().split("\n"); }, topLabel() { - return `${this.modalConfig.name} Reality`; + return `${this.name} Reality`; }, message() { - return `Perform a Reality reset, and enter ${this.modalConfig.name} Reality, in which`; + return `Perform a Reality reset, and enter ${this.name} Reality, in which`; }, }, methods: { @@ -37,7 +41,7 @@ export default { const laitelaFastest = player.celestials.laitela.fastestCompletion; const laitalaTime = TimeSpan.fromSeconds(laitelaFastest).toStringShort(); - switch (this.modalConfig.number) { + switch (this.number) { case 0: return `Your highest Teresa completetion was for ${format(teresaBestAM, 2, 2)} antimatter, gaining you a ${formatX(teresaRunMult, 2)} multiplier to Glyph Sacrifice power.`; case 1: return `${effarigDone @@ -64,7 +68,7 @@ export default { }, handleYesClick() { beginProcessReality(getRealityProps(true)); - switch (this.modalConfig.number) { + switch (this.number) { case 0: return Teresa.initializeRun(); case 1: return Effarig.initializeRun(); case 2: return Enslaved.initializeRun(); @@ -95,7 +99,7 @@ export default {
{{ extraLine() }}
- + Date: Mon, 16 May 2022 12:13:17 -0700 Subject: [PATCH 64/89] remove excess $viewModel and convert rest to props --- javascripts/core/app/modal.js | 3 +-- .../modals/DeleteAutomatorScriptModal.vue | 5 ----- .../challenges/EternityChallengeStartModal.vue | 13 ++++++++----- .../challenges/InfinityChallengeStartModal.vue | 15 +++++++++------ .../challenges/NormalChallengeStartModal.vue | 13 ++++++++----- .../DeleteCompanionGlyphModal.vue | 3 --- .../modals/prestige/EnterDilationModal.vue | 3 --- 7 files changed, 26 insertions(+), 29 deletions(-) diff --git a/javascripts/core/app/modal.js b/javascripts/core/app/modal.js index faaf3ad85..4b881e243 100644 --- a/javascripts/core/app/modal.js +++ b/javascripts/core/app/modal.js @@ -132,8 +132,7 @@ export class Modal { class ChallengeConfirmationModal extends Modal { show(id) { - this.id = id; - super.show(); + super.show({ id }); } } diff --git a/src/components/modals/DeleteAutomatorScriptModal.vue b/src/components/modals/DeleteAutomatorScriptModal.vue index b8ed75570..e9e6e4ba1 100644 --- a/src/components/modals/DeleteAutomatorScriptModal.vue +++ b/src/components/modals/DeleteAutomatorScriptModal.vue @@ -12,11 +12,6 @@ export default { required: true } }, - computed: { - modal() { - return this.$viewModel.modal.current; - }, - }, methods: { handleYesClick() { const script = this.scriptID; diff --git a/src/components/modals/challenges/EternityChallengeStartModal.vue b/src/components/modals/challenges/EternityChallengeStartModal.vue index 38e108bc3..7ebbd5827 100644 --- a/src/components/modals/challenges/EternityChallengeStartModal.vue +++ b/src/components/modals/challenges/EternityChallengeStartModal.vue @@ -6,16 +6,19 @@ export default { components: { ModalWrapperChoice }, + props: { + id: { + type: Number, + required: true + } + }, computed: { challenge() { - return EternityChallenge(this.modal.id); + return EternityChallenge(this.id); }, challengeIsCompleted() { return this.challenge.isFullyCompleted; }, - modal() { - return this.$viewModel.modal.current; - }, message() { return `You will Eternity, if possible, and start a new Eternity within the Challenge, with all the Challenge-specific restrictions and modifiers active. @@ -25,7 +28,7 @@ export default { ${formatInt(5)} times, with increasing goals and bonuses.`; }, entranceLabel() { - return `You are about to enter Eternity Challenge ${this.modal.id}`; + return `You are about to enter Eternity Challenge ${this.id}`; }, reward() { let rewardDescription = this.challenge._config.reward.description; diff --git a/src/components/modals/challenges/InfinityChallengeStartModal.vue b/src/components/modals/challenges/InfinityChallengeStartModal.vue index 4e725aa3b..12f8b6a38 100644 --- a/src/components/modals/challenges/InfinityChallengeStartModal.vue +++ b/src/components/modals/challenges/InfinityChallengeStartModal.vue @@ -6,26 +6,29 @@ export default { components: { ModalWrapperChoice }, + props: { + id: { + type: Number, + required: true + } + }, computed: { challenge() { - return InfinityChallenge(this.modal.id); + return InfinityChallenge(this.id); }, challengeIsCompleted() { return this.challenge.isCompleted; }, - modal() { - return this.$viewModel.modal.current; - }, message() { return `You will Big Crunch, if possible, and start a new Infinity within the Challenge, with all the Challenge-specific restrictions and modifiers active. To complete the Challenge${this.challengeIsCompleted ? "" : " and gain its reward"}, you must reach the Challenge goal of - ${format(InfinityChallenge(this.modal.id).goal)} Antimatter. + ${format(InfinityChallenge(this.id).goal)} Antimatter. You do not start with any Dimension Boosts or Galaxies, regardless of upgrades.`; }, entranceLabel() { - return `You are about to enter Infinity Challenge ${this.modal.id}`; + return `You are about to enter Infinity Challenge ${this.id}`; }, reward() { let rewardDescription = this.challenge._config.reward.description; diff --git a/src/components/modals/challenges/NormalChallengeStartModal.vue b/src/components/modals/challenges/NormalChallengeStartModal.vue index 3b22d2da6..38f965994 100644 --- a/src/components/modals/challenges/NormalChallengeStartModal.vue +++ b/src/components/modals/challenges/NormalChallengeStartModal.vue @@ -6,16 +6,19 @@ export default { components: { ModalWrapperChoice }, + props: { + id: { + type: Number, + required: true + } + }, computed: { challenge() { - return NormalChallenge(this.modal.id); + return NormalChallenge(this.id); }, challengeIsCompleted() { return this.challenge.isCompleted; }, - modal() { - return this.$viewModel.modal.current; - }, message() { return `You will Big Crunch, if possible, and start a new Infinity within the Challenge, with all the Challenge-specific restrictions and modifiers active. @@ -24,7 +27,7 @@ export default { You do not start with any Dimension Boosts or Galaxies, regardless of upgrades.`; }, entranceLabel() { - return `You are about to enter Challenge ${this.modal.id}`; + return `You are about to enter Challenge ${this.id}`; }, reward() { return `The reward for completing this challenge is: ${this.challenge._config.reward}`; diff --git a/src/components/modals/glyph-management/DeleteCompanionGlyphModal.vue b/src/components/modals/glyph-management/DeleteCompanionGlyphModal.vue index f406af7f3..eb3828711 100644 --- a/src/components/modals/glyph-management/DeleteCompanionGlyphModal.vue +++ b/src/components/modals/glyph-management/DeleteCompanionGlyphModal.vue @@ -12,9 +12,6 @@ export default { }; }, computed: { - modal() { - return this.$viewModel.modal.current; - }, message() { switch (this.messageIndex) { case 0: return "Are you sure you want to get rid of your Companion Glyph?"; diff --git a/src/components/modals/prestige/EnterDilationModal.vue b/src/components/modals/prestige/EnterDilationModal.vue index daf1cac5c..ef5375d74 100644 --- a/src/components/modals/prestige/EnterDilationModal.vue +++ b/src/components/modals/prestige/EnterDilationModal.vue @@ -7,9 +7,6 @@ export default { ModalWrapperChoice }, computed: { - modal() { - return this.$viewModel.modal.current; - }, message() { return `Dilating time will start a new Eternity, and all Dimension multiplier's exponents and tickspeed multiplier's exponent will be reduced to ${formatPow(0.75, 2, 2)}. If you can Eternity while Dilated, From c0877fb30807f0ae4298b5ac2943fb8fbb4ba8d0 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 19 May 2022 22:18:37 +0800 Subject: [PATCH 65/89] Add info to tell users what "collapse shorthands" does, subject to change by future tweaks to its functionality --- src/components/modals/StudyStringModal.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/modals/StudyStringModal.vue b/src/components/modals/StudyStringModal.vue index aee83ad80..dcf4b0a9c 100644 --- a/src/components/modals/StudyStringModal.vue +++ b/src/components/modals/StudyStringModal.vue @@ -223,8 +223,13 @@ export default {

- - Collapse Study ID list Shorthands + + Format String and Collapse Shorthands
- - From ada8dc36bfff29da6d4f8bd71f283b6f81dde406 Mon Sep 17 00:00:00 2001 From: Hirame1 <56225774+Hirame1@users.noreply.github.com> Date: Wed, 18 May 2022 23:15:16 +0700 Subject: [PATCH 78/89] Fix disclaimer text overflaw --- src/components/tabs/automator/AutomatorDocs.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/tabs/automator/AutomatorDocs.vue b/src/components/tabs/automator/AutomatorDocs.vue index c987762e9..50f9839a4 100644 --- a/src/components/tabs/automator/AutomatorDocs.vue +++ b/src/components/tabs/automator/AutomatorDocs.vue @@ -211,10 +211,11 @@ export default { @click="infoPaneID = 4" /> - Switching will stop scripts +
+ Switching will stop scripts +
@@ -282,9 +283,9 @@ export default {