mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-25 01:41:48 +00:00
Cleaned up
This commit is contained in:
parent
0c0de62a83
commit
850ccdbd5f
5 changed files with 14 additions and 12 deletions
|
@ -48,16 +48,15 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Notif from "components/Notif.vue";
|
import Notif from "components/Notif.vue";
|
||||||
import Tooltip from "features/tooltips/Tooltip.vue";
|
import Tooltip from "features/tooltips/Tooltip.vue";
|
||||||
import Decimal from "util/bignum";
|
|
||||||
import { layers } from "game/layers";
|
import { layers } from "game/layers";
|
||||||
import { Direction } from "util/common";
|
import Decimal from "util/bignum";
|
||||||
import { formatTime } from "util/break_eternity";
|
import { formatTime } from "util/break_eternity";
|
||||||
|
import { Direction } from "util/common";
|
||||||
import { ProcessedComputable } from "util/computed";
|
import { ProcessedComputable } from "util/computed";
|
||||||
import { Ref, Transition } from "vue";
|
import { computed, Ref, Transition, unref } from "vue";
|
||||||
import { computed, unref } from "vue";
|
|
||||||
import { main } from "./projEntry";
|
|
||||||
import coal from "./layers/coal";
|
import coal from "./layers/coal";
|
||||||
import dyes from "./layers/dyes";
|
import dyes from "./layers/dyes";
|
||||||
|
import { main } from "./projEntry";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
day: number;
|
day: number;
|
||||||
|
@ -77,7 +76,7 @@ const emit = defineEmits<{
|
||||||
|
|
||||||
const canOpen = computed(
|
const canOpen = computed(
|
||||||
() =>
|
() =>
|
||||||
props.layer &&
|
props.layer != null &&
|
||||||
Decimal.gte(main.day.value, props.day) &&
|
Decimal.gte(main.day.value, props.day) &&
|
||||||
new Date().getMonth() === 11 &&
|
new Date().getMonth() === 11 &&
|
||||||
new Date().getDate() >= props.day
|
new Date().getDate() >= props.day
|
||||||
|
@ -88,14 +87,14 @@ const includeMastery = computed(
|
||||||
() =>
|
() =>
|
||||||
props.mastered.value ||
|
props.mastered.value ||
|
||||||
main.currentlyMastering.value == layers[props.layer ?? ""] ||
|
main.currentlyMastering.value == layers[props.layer ?? ""] ||
|
||||||
["wrappingPaper", "ribbon"].includes(props.layer || "") ||
|
["wrappingPaper", "ribbon"].includes(props.layer ?? "") ||
|
||||||
(coal.mastered.value && props.layer == "elves") ||
|
(coal.mastered.value && props.layer == "elves") ||
|
||||||
(dyes.mastered.value && props.layer == "elves")
|
(dyes.mastered.value && props.layer == "elves")
|
||||||
);
|
);
|
||||||
const masteryLock = computed(() => isMastering.value && !includeMastery.value);
|
const masteryLock = computed(() => isMastering.value && !includeMastery.value);
|
||||||
|
|
||||||
function tryUnlock() {
|
function tryUnlock() {
|
||||||
if (canOpen.value) {
|
if (canOpen.value === true) {
|
||||||
emit("unlockLayer");
|
emit("unlockLayer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -404,7 +404,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
createAdditiveModifier(() => ({
|
createAdditiveModifier(() => ({
|
||||||
addend: 1,
|
addend: 1,
|
||||||
description: "Automated Spade",
|
description: "Automated Spade",
|
||||||
enabled: autoPlantUpgrade1.bought.value
|
enabled: autoPlantUpgrade1.bought
|
||||||
})),
|
})),
|
||||||
createAdditiveModifier(() => ({
|
createAdditiveModifier(() => ({
|
||||||
addend: () => Decimal.div(autoPlantingBuyable1.amount.value, 2),
|
addend: () => Decimal.div(autoPlantingBuyable1.amount.value, 2),
|
||||||
|
|
|
@ -49,7 +49,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
scaling: addHardcap(
|
scaling: addHardcap(
|
||||||
addSoftcap(addSoftcap(createPolynomialScaling(250, 1.5), 5423, 1 / 1e10), 1e20, 3e8),
|
addSoftcap(addSoftcap(createPolynomialScaling(250, 1.5), 5423, 1 / 1e10), 1e20, 3e8),
|
||||||
computed(() =>
|
computed(() =>
|
||||||
toys.row1Upgrades[2].bought
|
toys.row1Upgrades[2].bought.value
|
||||||
? 1200
|
? 1200
|
||||||
: management.elfTraining.expandersElfTraining.milestones[2].earned.value
|
: management.elfTraining.expandersElfTraining.milestones[2].earned.value
|
||||||
? 1000
|
? 1000
|
||||||
|
|
|
@ -278,7 +278,10 @@ const layer = createLayer(id, () => {
|
||||||
beach1: computed(() =>
|
beach1: computed(() =>
|
||||||
main.isMastery.value
|
main.isMastery.value
|
||||||
? 1
|
? 1
|
||||||
: Decimal.add(wrappingPaper.beach.buyable.amount.value, 1).log10().add(1).pow(toys.milestones.milestone3.earned.value ? 1.6 : 1)
|
: Decimal.add(wrappingPaper.beach.buyable.amount.value, 1)
|
||||||
|
.log10()
|
||||||
|
.add(1)
|
||||||
|
.pow(toys.milestones.milestone3.earned.value ? 1.6 : 1)
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
const wrappingPaperSum = createResource(
|
const wrappingPaperSum = createResource(
|
||||||
|
|
|
@ -224,7 +224,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
||||||
openDay(layer ?? "trees");
|
openDay(layer ?? "trees");
|
||||||
},
|
},
|
||||||
onUnlockLayer() {
|
onUnlockLayer() {
|
||||||
if (layer) {
|
if (layer != null) {
|
||||||
opened.value = true;
|
opened.value = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loreScene.value = -1;
|
loreScene.value = -1;
|
||||||
|
|
Loading…
Reference in a new issue