mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-22 16:35:46 +00:00
Balance/bug fix pass
This commit is contained in:
parent
c2b352111a
commit
6d25877e48
6 changed files with 76 additions and 49 deletions
|
@ -240,7 +240,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
|
||||
let v = Decimal.mul(x, wrappingPaper.boosts.ocean1.value)
|
||||
.mul(dyes.boosts.orange2.value)
|
||||
.div(100).log(scaling);
|
||||
.div(100)
|
||||
.log(scaling);
|
||||
|
||||
v = v.div(Decimal.pow(0.95, paper.books.boxBook.totalAmount.value));
|
||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||
|
@ -295,8 +296,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
scaling--;
|
||||
}
|
||||
|
||||
let v = Decimal.mul(x, dyes.boosts.orange2.value)
|
||||
.div(1000).log(scaling);
|
||||
let v = Decimal.mul(x, dyes.boosts.orange2.value).div(1000).log(scaling);
|
||||
|
||||
v = v.div(Decimal.pow(0.95, paper.books.boxBook.totalAmount.value));
|
||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||
|
@ -351,8 +351,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
scaling--;
|
||||
}
|
||||
|
||||
let v = Decimal.mul(x, dyes.boosts.orange2.value)
|
||||
.div(1000).log(scaling);
|
||||
let v = Decimal.mul(x, dyes.boosts.orange2.value).div(1000).log(scaling);
|
||||
|
||||
v = v.div(Decimal.pow(0.95, paper.books.boxBook.totalAmount.value));
|
||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||
|
@ -413,7 +412,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
|
||||
let v = Decimal.mul(x, wrappingPaper.boosts.ocean1.value)
|
||||
.mul(dyes.boosts.orange2.value)
|
||||
.div(1e25).log(scaling);
|
||||
.div(1e25)
|
||||
.log(scaling);
|
||||
|
||||
v = v.div(Decimal.pow(0.95, paper.books.boxBook.totalAmount.value));
|
||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||
|
@ -468,8 +468,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
scaling--;
|
||||
}
|
||||
|
||||
let v = Decimal.mul(x, dyes.boosts.orange2.value)
|
||||
.div(1e28).log(scaling);
|
||||
let v = Decimal.mul(x, dyes.boosts.orange2.value).div(1e28).log(scaling);
|
||||
|
||||
v = v.div(Decimal.pow(0.95, paper.books.boxBook.totalAmount.value));
|
||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||
|
@ -524,8 +523,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
scaling--;
|
||||
}
|
||||
|
||||
let v = Decimal.mul(x, dyes.boosts.orange2.value)
|
||||
.div(1e31).log(scaling);
|
||||
let v = Decimal.mul(x, dyes.boosts.orange2.value).div(1e31).log(scaling);
|
||||
|
||||
v = v.div(Decimal.pow(0.95, paper.books.boxBook.totalAmount.value));
|
||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||
|
@ -614,7 +612,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
Object.values(row3Upgrades)
|
||||
)}
|
||||
<Spacer />
|
||||
{renderRow(...Object.values(buyables))}
|
||||
{renderGrid(Object.values(buyables), Object.values(buyables2))}
|
||||
</>
|
||||
)),
|
||||
minimizedDisplay: jsx(() => (
|
||||
|
|
|
@ -89,6 +89,23 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const elfReset = createReset(() => ({
|
||||
thingsToReset: [trees, workshop, coal],
|
||||
onReset() {
|
||||
const coalUpgrades = [
|
||||
"warmerCutters",
|
||||
"warmerPlanters",
|
||||
"basicFertilizer",
|
||||
"unlockBonfire",
|
||||
"dedicatedCutters",
|
||||
"dedicatedPlanters",
|
||||
"betterFertilizer",
|
||||
"unlockKiln",
|
||||
"efficientSmelther",
|
||||
"arsonistAssistance",
|
||||
"refinedCoal",
|
||||
"coloredFire"
|
||||
];
|
||||
const upgradeValues = coalUpgrades.map(
|
||||
upg => ((coal as any)[upg] as GenericUpgrade).bought.value
|
||||
);
|
||||
setTimeout(() => {
|
||||
if (treeUpgradesMilestone.earned.value) {
|
||||
trees.row1Upgrades.forEach(upg => (upg.bought.value = true));
|
||||
|
@ -101,6 +118,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
workshop.foundationProgress.value = 100;
|
||||
}
|
||||
if (coalUpgradesMilestone.earned.value) {
|
||||
coalUpgrades.forEach(
|
||||
(upg, i) =>
|
||||
(((coal as any)[upg] as GenericUpgrade).bought.value = upgradeValues[i])
|
||||
);
|
||||
coal.warmerCutters.bought.value = true;
|
||||
coal.warmerPlanters.bought.value = true;
|
||||
coal.basicFertilizer.bought.value = true;
|
||||
|
@ -503,7 +524,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
modifier: heavyDrillCooldown,
|
||||
base: 10,
|
||||
unit: "/s",
|
||||
visible: management.elfTraining.fertilizerElfTraining.milestones[4].earned.value
|
||||
visible: management.elfTraining.cutterElfTraining.milestones[4].earned.value
|
||||
},
|
||||
{
|
||||
title: "Cocoa Auto-Buy Frequency",
|
||||
|
@ -517,7 +538,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
modifier: metalCooldown,
|
||||
base: 10,
|
||||
unit: "/s",
|
||||
visible: management.elfTraining.expandersElfTraining.milestones[4].earned
|
||||
visible: management.elfTraining.fertilizerElfTraining.milestones[4].earned
|
||||
}
|
||||
]);
|
||||
const showModifiersModal = ref(false);
|
||||
|
@ -629,7 +650,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: jsx(() => (
|
||||
<>
|
||||
{options.description}
|
||||
{(upgrade.bought.value && (!["Peppermint", "Twinkle", "Cocoa", "Frosty"].includes(options.name))) ? null : (
|
||||
{upgrade.bought.value &&
|
||||
!["Peppermint", "Twinkle", "Cocoa", "Frosty"].includes(
|
||||
options.name
|
||||
) ? null : (
|
||||
<>
|
||||
{" "}
|
||||
Training this elf will require resetting all your progress from
|
||||
|
@ -652,8 +676,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
style: "width: 190px",
|
||||
onPurchase() {
|
||||
options.onPurchase?.();
|
||||
if(!["Peppermint", "Twinkle", "Cocoa", "Frosty"].includes(options.name)){
|
||||
elfReset.reset();}
|
||||
if (!["Peppermint", "Twinkle", "Cocoa", "Frosty"].includes(options.name)) {
|
||||
elfReset.reset();
|
||||
}
|
||||
}
|
||||
};
|
||||
}) as GenericUpgrade & {
|
||||
|
@ -824,7 +849,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
buyable: [oil.buildHeavy, oil.buildHeavy2, oil.buildExtractor],
|
||||
cooldownModifier: heavyDrillCooldown,
|
||||
visibility: () =>
|
||||
showIf(management.elfTraining.fertilizerElfTraining.milestones[4].earned.value),
|
||||
showIf(management.elfTraining.cutterElfTraining.milestones[4].earned.value),
|
||||
hasToggle: true,
|
||||
toggleDesc: "Activate auto-purchased oil drills",
|
||||
onAutoPurchase(buyable, amount) {
|
||||
|
@ -869,7 +894,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
buyable: [metal.oreDrill, metal.industrialCrucible, metal.hotterForge],
|
||||
cooldownModifier: metalCooldown,
|
||||
visibility: () =>
|
||||
showIf(management.elfTraining.expandersElfTraining.milestones[4].earned.value)
|
||||
showIf(management.elfTraining.fertilizerElfTraining.milestones[4].earned.value)
|
||||
});
|
||||
const managementElves2 = [metalElf];
|
||||
const dyeElf = createElf({
|
||||
|
|
|
@ -136,6 +136,11 @@ const layer = createLayer(id, () => {
|
|||
description: "Advanced Training",
|
||||
enabled: advancedUpgrade.bought
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: 2,
|
||||
description: "Star Level 4",
|
||||
enabled: paperElfMilestones[3].earned.value
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: 2,
|
||||
description: "Carry experience in boxes???",
|
||||
|
@ -180,19 +185,15 @@ const layer = createLayer(id, () => {
|
|||
if (elf.name == "Star" || elf.name == "Bell") {
|
||||
costMulti /= 3;
|
||||
}
|
||||
const costBase = computed(() => {
|
||||
return Decimal.mul(paperElfMilestones[3].earned.value ? 2000 : 4000, costMulti);
|
||||
});
|
||||
const expRequiredForNextLevel = computed(() =>
|
||||
Decimal.pow(5, level.value).mul(costBase.value)
|
||||
);
|
||||
const costBase = 4000 * costMulti;
|
||||
const expRequiredForNextLevel = computed(() => Decimal.pow(5, level.value).mul(costBase));
|
||||
const level = computed(() =>
|
||||
Decimal.affordGeometricSeries(exp.value, costBase.value, 5, 0)
|
||||
Decimal.affordGeometricSeries(exp.value, costBase, 5, 0)
|
||||
.min(schools.amount.value)
|
||||
.toNumber()
|
||||
);
|
||||
const expToNextLevel = computed(() =>
|
||||
Decimal.sub(exp.value, Decimal.sumGeometricSeries(level.value, costBase.value, 5, 0))
|
||||
Decimal.sub(exp.value, Decimal.sumGeometricSeries(level.value, costBase, 5, 0))
|
||||
);
|
||||
const bar = createBar(() => ({
|
||||
direction: Direction.Right,
|
||||
|
@ -340,7 +341,7 @@ const layer = createLayer(id, () => {
|
|||
createMilestone(() => ({
|
||||
display: {
|
||||
requirement: "Holly Level 5",
|
||||
effectDisplay: "Raise workshop expansion cost by 0.99"
|
||||
effectDisplay: "Unlock an elf that autobuys oil drills and extractors."
|
||||
},
|
||||
visibility: () => showIf(cutterElfMilestones[3].earned.value && main.day.value >= 13),
|
||||
shouldEarn: () => cutterElfTraining.level.value >= 5
|
||||
|
@ -431,7 +432,7 @@ const layer = createLayer(id, () => {
|
|||
createMilestone(() => ({
|
||||
display: {
|
||||
requirement: "Hope Level 5",
|
||||
effectDisplay: "Unlock an elf that autobuys metal buyables."
|
||||
effectDisplay: "Raise workshop expansion cost by 0.99"
|
||||
},
|
||||
visibility: () => showIf(expanderElfMilestones[3].earned.value && main.day.value >= 13),
|
||||
shouldEarn: () => expandersElfTraining.level.value >= 5
|
||||
|
@ -575,7 +576,7 @@ const layer = createLayer(id, () => {
|
|||
createMilestone(() => ({
|
||||
display: {
|
||||
requirement: "Noel Level 5",
|
||||
effectDisplay: "Unlock an elf that autobuys drills and extractors"
|
||||
effectDisplay: "Unlock an elf that autobuys metal buyables"
|
||||
},
|
||||
visibility: () =>
|
||||
showIf(fertilizerElfMilestones[3].earned.value && main.day.value >= 13),
|
||||
|
@ -734,7 +735,7 @@ const layer = createLayer(id, () => {
|
|||
createMilestone(() => ({
|
||||
display: {
|
||||
requirement: "Star Level 4",
|
||||
effectDisplay: "Halve xp requirements"
|
||||
effectDisplay: "Double all elf xp gain"
|
||||
},
|
||||
visibility: () => showIf(paperElfMilestones[2].earned.value && main.day.value >= 13),
|
||||
shouldEarn: () => paperElfTraining.level.value >= 4
|
||||
|
@ -742,7 +743,7 @@ const layer = createLayer(id, () => {
|
|||
createMilestone(() => ({
|
||||
display: {
|
||||
requirement: "Star Level 5",
|
||||
effectDisplay: "Gain 5 free books for all elves that are at level 5 or above."
|
||||
effectDisplay: "Gain 5 free books for all prior elves that are at level 5 or above."
|
||||
},
|
||||
visibility: () => showIf(paperElfMilestones[3].earned.value && main.day.value >= 13),
|
||||
shouldEarn: () => paperElfTraining.level.value >= 5
|
||||
|
|
|
@ -228,14 +228,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
cost() {
|
||||
let v = new Decimal(this.amount.value);
|
||||
if (Decimal.gte(v, 10)) v = Decimal.pow(v, 4).div(10 ** 3);
|
||||
if (Decimal.gte(v, 1e3)) v = Decimal.pow(v, 4).div(1e3 ** 3);
|
||||
v = Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value).times(v);
|
||||
return Decimal.pow(8, v).times(2e5);
|
||||
},
|
||||
inverseCost(x: DecimalSource) {
|
||||
let v = Decimal.div(x, 2e5).log(8);
|
||||
v = v.div(Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value));
|
||||
if (Decimal.gte(v, 1e3)) v = Decimal.mul(v, 1e3 ** 3).root(4);
|
||||
if (Decimal.gte(v, 10)) v = Decimal.mul(v, 10 ** 3).root(4);
|
||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||
},
|
||||
|
|
|
@ -125,8 +125,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
scaling--;
|
||||
}
|
||||
let cost = Decimal.pow(scaling, v).times(10);
|
||||
if(["Peppermint", "Twinkle", "Cocoa", "Frosty"].includes(options.elfName)){
|
||||
cost = cost.mul(1e31)
|
||||
if (["Peppermint", "Twinkle", "Cocoa", "Frosty"].includes(options.elfName)) {
|
||||
cost = cost.mul(1e31);
|
||||
}
|
||||
if (management.elfTraining.paperElfTraining.milestones[0].earned.value) {
|
||||
cost = Decimal.div(cost, sumBooks.value.max(1));
|
||||
|
@ -149,9 +149,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
scaling--;
|
||||
}
|
||||
|
||||
let v = Decimal.div(x, 10)
|
||||
if(["Peppermint", "Twinkle", "Cocoa", "Frosty"].includes(options.elfName)){
|
||||
v = v.div(1e31)
|
||||
let v = Decimal.div(x, 10);
|
||||
if (["Peppermint", "Twinkle", "Cocoa", "Frosty"].includes(options.elfName)) {
|
||||
v = v.div(1e31);
|
||||
}
|
||||
v = v.log(scaling);
|
||||
|
||||
|
@ -165,7 +165,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
},
|
||||
style: "width: 600px",
|
||||
freeLevels: computed(() =>
|
||||
management.elfTraining.paperElfTraining.milestones[4].earned.value
|
||||
management.elfTraining.paperElfTraining.milestones[4].earned.value &&
|
||||
![
|
||||
"Star",
|
||||
"Bell",
|
||||
"Gingersnap",
|
||||
"Peppermint",
|
||||
"Twinkle",
|
||||
"Cocoa",
|
||||
"Frosty"
|
||||
].includes(options.elfName)
|
||||
? Decimal.times(5, management.level5Elves.value)
|
||||
: 0
|
||||
),
|
||||
|
@ -248,29 +257,25 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
name: "Drills and Mills",
|
||||
elfName: "Peppermint",
|
||||
buyableName: "Coal Drill",
|
||||
visibility: () =>
|
||||
showIf(management.elfTraining.expandersElfTraining.milestones[3].earned.value)
|
||||
visibility: () => showIf(elves.elves.coalDrillElf.bought.value)
|
||||
});
|
||||
const heavyDrillBook = createBook({
|
||||
name: "Deep in the Earth",
|
||||
elfName: "Frosty",
|
||||
buyableName: "Oil Drills",
|
||||
visibility: () =>
|
||||
showIf(management.elfTraining.fertilizerElfTraining.milestones[4].earned.value)
|
||||
visibility: () => showIf(elves.elves.heavyDrillElf.bought.value)
|
||||
});
|
||||
const oilBook = createBook({
|
||||
name: "Burning the Midnight Oil",
|
||||
elfName: "Cocoa",
|
||||
buyableName: "Oil-Consuming Machines",
|
||||
visibility: () =>
|
||||
showIf(management.elfTraining.heatedCutterElfTraining.milestones[4].earned.value)
|
||||
visibility: () => showIf(elves.elves.oilElf.bought.value)
|
||||
});
|
||||
const metalBook = createBook({
|
||||
name: "Physical Metallurgy",
|
||||
elfName: "Twinkle",
|
||||
buyableName: "Metal Buyables",
|
||||
visibility: () =>
|
||||
showIf(management.elfTraining.expandersElfTraining.milestones[4].earned.value)
|
||||
visibility: () => showIf(elves.elves.metalElf.bought.value)
|
||||
});
|
||||
const dyeBook = createBook({
|
||||
name: "Arts and Crafts",
|
||||
|
|
|
@ -62,8 +62,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
})),
|
||||
createExponentialModifier(() => ({
|
||||
exponent: 1 / 0.99,
|
||||
description: "Holly Level 5",
|
||||
enabled: management.elfTraining.cutterElfTraining.milestones[4].earned
|
||||
description: "Hope Level 5",
|
||||
enabled: management.elfTraining.expandersElfTraining.milestones[4].earned
|
||||
}))
|
||||
])
|
||||
}));
|
||||
|
|
Loading…
Reference in a new issue