mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-03-28 19:58:01 +00:00
coal balancing pass
This commit is contained in:
parent
e458a06ef2
commit
04d62411df
2 changed files with 20 additions and 4 deletions
|
@ -38,7 +38,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const totalCoal = trackTotal(coal);
|
||||
const ash = createResource<DecimalSource>(0, "ash");
|
||||
|
||||
const totalCoalGoal = 1e6;
|
||||
const totalCoalGoal = 1e7;
|
||||
|
||||
const dayProgress = createBar(() => ({
|
||||
direction: Direction.Right,
|
||||
|
@ -309,7 +309,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const heatedCutters = createBuyable(() => ({
|
||||
resource: coal,
|
||||
cost() {
|
||||
return Decimal.add(this.amount.value, 1).pow(2.5).times(10);
|
||||
let v = this.amount.value;
|
||||
if (Decimal.gte(v, 50)) v = Decimal.pow(v, 2).div(50);
|
||||
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100);
|
||||
if (Decimal.gte(v, 1000)) v = Decimal.pow(v, 2).div(1000);
|
||||
return Decimal.add(v, 1).pow(2.5).times(10);
|
||||
},
|
||||
display: {
|
||||
title: "Heated Cutters",
|
||||
|
@ -324,7 +328,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const heatedPlanters = createBuyable(() => ({
|
||||
resource: coal,
|
||||
cost() {
|
||||
return Decimal.add(this.amount.value, 1).pow(2.5).times(10);
|
||||
let v = this.amount.value;
|
||||
if (Decimal.gte(v, 50)) v = Decimal.pow(v, 2).div(50);
|
||||
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100);
|
||||
if (Decimal.gte(v, 1000)) v = Decimal.pow(v, 2).div(1000);
|
||||
return Decimal.add(v, 1).pow(2.5).times(10);
|
||||
},
|
||||
display: {
|
||||
title: "Heated Planters",
|
||||
|
@ -339,7 +347,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const moreFertilizer = createBuyable(() => ({
|
||||
resource: ash,
|
||||
cost() {
|
||||
return Decimal.add(this.amount.value, 1).pow(1.5).times(50000);
|
||||
let v = this.amount.value;
|
||||
if (Decimal.gte(v, 50)) v = Decimal.pow(v, 2).div(50);
|
||||
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100);
|
||||
if (Decimal.gte(v, 1000)) v = Decimal.pow(v, 2).div(1000);
|
||||
return Decimal.add(v, 1).pow(1.5).times(50000);
|
||||
},
|
||||
display: {
|
||||
title: "Fertilized Soil",
|
||||
|
|
|
@ -170,6 +170,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
cost() {
|
||||
let v = this.amount.value;
|
||||
if (Decimal.gte(v, 50)) v = Decimal.pow(v, 2).div(50);
|
||||
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100);
|
||||
if (Decimal.gte(v, 1000)) v = Decimal.pow(v, 2).div(1000);
|
||||
return Decimal.times(100, v).add(200);
|
||||
},
|
||||
display: {
|
||||
|
@ -183,6 +185,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
cost() {
|
||||
let v = this.amount.value;
|
||||
if (Decimal.gte(v, 50)) v = Decimal.pow(v, 2).div(50);
|
||||
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100);
|
||||
if (Decimal.gte(v, 1000)) v = Decimal.pow(v, 2).div(1000);
|
||||
return Decimal.times(100, v).add(200);
|
||||
},
|
||||
display: {
|
||||
|
|
Loading…
Add table
Reference in a new issue