mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-03-14 01:51:40 +00:00
remove off by 1 eeror
This commit is contained in:
parent
1d395163e1
commit
0b3cebee3f
3 changed files with 10 additions and 6 deletions
|
@ -589,7 +589,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
Decimal.sub(
|
||||
buyable.inverseCost(buyable.resource?.value),
|
||||
buyable.amount.value
|
||||
),
|
||||
).add(1),
|
||||
maxBuyAmount
|
||||
);
|
||||
|
||||
|
|
|
@ -180,15 +180,19 @@ const layer = createLayer(id, () => {
|
|||
if (elf.name == "Star" || elf.name == "Bell") {
|
||||
costMulti /= 3;
|
||||
}
|
||||
const costBase = Decimal.mul(paperElfMilestones[3].earned.value ? 2000 : 4000, costMulti);
|
||||
const expRequiredForNextLevel = computed(() => Decimal.pow(5, level.value).mul(costBase));
|
||||
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 level = computed(() =>
|
||||
Decimal.affordGeometricSeries(exp.value, costBase, 5, 0)
|
||||
Decimal.affordGeometricSeries(exp.value, costBase.value, 5, 0)
|
||||
.min(schools.amount.value)
|
||||
.toNumber()
|
||||
);
|
||||
const expToNextLevel = computed(() =>
|
||||
Decimal.sub(exp.value, Decimal.sumGeometricSeries(level.value, costBase, 5, 0))
|
||||
Decimal.sub(exp.value, Decimal.sumGeometricSeries(level.value, costBase.value, 5, 0))
|
||||
);
|
||||
const bar = createBar(() => ({
|
||||
direction: Direction.Right,
|
||||
|
|
|
@ -94,7 +94,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
management.elfTraining.expandersElfTraining.milestones[2].earned.value
|
||||
),
|
||||
canClick: () =>
|
||||
Decimal.gte(trees.logs.value, foundationConversion.currentAt.value) &&
|
||||
Decimal.gte(trees.logs.value, foundationConversion.nextAt.value) &&
|
||||
(Decimal.lt(foundationProgress.value, 100) ||
|
||||
management.elfTraining.expandersElfTraining.milestones[2].earned.value),
|
||||
onClick() {
|
||||
|
|
Loading…
Add table
Reference in a new issue