Balancing pass

This commit is contained in:
thepaperpilot 2022-12-18 22:59:27 -06:00
parent 056dfa5b03
commit 7dfce2ca06
6 changed files with 51 additions and 33 deletions

View file

@ -627,7 +627,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const { total: totalBoxes, trackerDisplay } = setUpDailyProgressTracker({
resource: boxes,
goal: 5e4,
masteryGoal: 1e9,
masteryGoal: 5e5,
name,
day,
color,

View file

@ -984,7 +984,6 @@ const layer = createLayer(id, function (this: BaseLayer) {
const { total: totalCoal, trackerDisplay } = setUpDailyProgressTracker({
resource: coal,
goal: 1e7,
masteryGoal: 1e9,
name,
day,
color: colorCoal,

View file

@ -192,14 +192,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
totalAmount: ComputedRef<DecimalSource>;
};
switch (options.color) {
case 'red':
case 'yellow':
case 'blue':
case "red":
case "yellow":
case "blue":
dyeBook = paper.books.primaryDyeBook;
break;
case 'orange':
case 'green':
case 'purple':
case "orange":
case "green":
case "purple":
dyeBook = paper.books.secondaryDyeBook;
break;
}
@ -260,12 +260,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
let v = buyable.amount.value;
if (Decimal.gte(v, 25)) v = Decimal.pow(v, 2).div(20); // intentional price jump #2
if (Decimal.gte(v, 10)) v = Decimal.pow(v, 2).div(5); // intentional price jump
if (Decimal.gte(v, 3125)) v = Decimal.pow(v, 2).div(3125);
v = Decimal.mul(v, Decimal.pow(0.95, dyeBook.totalAmount.value));
return Decimal.div(v, 10).plus(1);
},
inverseCostPre(x: DecimalSource) {
let v = Decimal.sub(x, 1).mul(10);
v = v.div(Decimal.pow(0.95, dyeBook.totalAmount.value));
if (Decimal.gte(v, 3125)) v = Decimal.mul(v, 3125).root(2);
if (Decimal.gte(v, 10)) v = Decimal.mul(v, 5).root(2);
if (Decimal.gte(v, 25)) v = Decimal.mul(v, 20).root(2);
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
@ -300,15 +302,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
onPurchase(cost?: DecimalSource) {
let buyMax = false;
switch (options.color) {
case 'red':
case 'yellow':
case 'blue':
buyMax = management.elfTraining.dyeElfTraining.milestones[2].earned.value;
case "red":
case "yellow":
case "blue":
buyMax =
management.elfTraining.dyeElfTraining.milestones[2].earned.value;
break;
case 'orange':
case 'green':
case 'purple':
buyMax = management.elfTraining.dyeElfTraining.milestones[4].earned.value;
case "orange":
case "green":
case "purple":
buyMax =
management.elfTraining.dyeElfTraining.milestones[4].earned.value;
break;
}
@ -316,13 +320,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
const buyAmount = this.inverseCost().sub(this.amount.value).plus(1);
if (buyAmount.lte(0)) return;
amount.value = Decimal.times(2, buyable.amount.value).plus(buyAmount).plus(1)
.times(buyAmount).div(2)
.times(computedToGenerate.value).div(Decimal.add(buyable.amount.value, 1))
.plus(amount.value);
amount.value = Decimal.times(2, buyable.amount.value)
.plus(buyAmount)
.plus(1)
.times(buyAmount)
.div(2)
.times(computedToGenerate.value)
.div(Decimal.add(buyable.amount.value, 1))
.plus(amount.value);
buyable.amount.value = Decimal.add(buyable.amount.value, buyAmount);
}
else {
} else {
amount.value = Decimal.add(amount.value, computedToGenerate.value);
buyable.amount.value = Decimal.add(buyable.amount.value, 1);
}

View file

@ -639,6 +639,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
computedAutoBuyCooldown,
amountOfTimesDone,
name: options.name,
canAfford() {
return (
Decimal.gte(coal.coal.value, unref(trainingCost)) && !main.isMastery.value
);
},
display: () => ({
title: options.name,
description: jsx(() => (
@ -911,20 +916,25 @@ const layer = createLayer(id, function (this: BaseLayer) {
"Carol will automatically purchase all dyes you can afford, without actually spending any resources.",
buyable: Object.values(dyes.dyes).map(dye => dye.buyable),
cooldownModifier: dyeCooldown, // Note: Buy max will be unlocked at this point
visibility: () => showIf(wrappingPaper.unlockDyeElfMilestone.earned.value),
visibility: () =>
showIf(wrappingPaper.unlockDyeElfMilestone.earned.value && !main.isMastery.value),
buyMax: () => management.elfTraining.dyeElfTraining.milestones[2].earned.value,
onAutoPurchase(buyable, amount) {
onAutoPurchase(buyable, amount) {
buyable.amount.value = Decimal.sub(buyable.amount.value, amount);
if (["orange", "green", "purple"].includes(dyeColors[buyable.id])) {
if (!ribbon.milestones.secondaryDyeElf.earned.value) {
return
return;
}
}
const dye = dyes.dyes[dyeColors[buyable.id]];
dye.amount.value = Decimal.times(2, buyable.amount.value).plus(amount).plus(1)
.times(amount).div(2)
.times(dye.computedToGenerate.value).div(Decimal.add(buyable.amount.value, 1))
.plus(dye.amount.value)
dye.amount.value = Decimal.times(2, buyable.amount.value)
.plus(amount)
.plus(1)
.times(amount)
.div(2)
.times(dye.computedToGenerate.value)
.div(Decimal.add(buyable.amount.value, 1))
.plus(dye.amount.value);
buyable.amount.value = Decimal.add(buyable.amount.value, amount);
}

View file

@ -471,7 +471,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const { total: totalPaper, trackerDisplay } = setUpDailyProgressTracker({
resource: paper,
goal: 5e3,
masteryGoal: 1e10,
masteryGoal: 5e7,
name,
day,
color,

View file

@ -283,16 +283,18 @@ const layer = createLayer(id, () => {
const unlockDyeElfMilestone = createMilestone(() => ({
display: {
requirement: "10 Total Wrapping Paper",
requirement: "80 Total Wrapping Paper",
effectDisplay: "Unlock a new elf to help with dyes"
},
shouldEarn: () => Decimal.gte(wrappingPaperSum.value, 10),
shouldEarn: () => Decimal.gte(wrappingPaperSum.value, 80),
onComplete() {
main.days[3].recentlyUpdated.value = true;
}
}));
const masteryReq = computed(() => Decimal.pow(2, masteredDays.value).times(30));
const masteryReq = computed(() =>
Decimal.add(masteredDays.value, 1).pow(0.6).times(10).add(120)
);
const enterMasteryButton = createClickable(() => ({
display: () => ({