mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-01-19 03:51:37 +00:00
Hook up new books
This commit is contained in:
parent
b939a1573d
commit
899289cdee
2 changed files with 22 additions and 9 deletions
|
@ -33,6 +33,7 @@ import plastic from "./plastic";
|
|||
import dyes from "./dyes";
|
||||
import management from "./management";
|
||||
import workshop from "./workshop";
|
||||
import paper from "./paper";
|
||||
|
||||
const id = "metal";
|
||||
const day = 7;
|
||||
|
@ -378,7 +379,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const oreDrill = createBuyable(() => ({
|
||||
resource: noPersist(metal),
|
||||
cost() {
|
||||
return Decimal.pow(1.15, this.amount.value).times(10);
|
||||
let v = new Decimal(this.amount.value);
|
||||
v = Decimal.pow(0.95, paper.books.metalBook.totalAmount.value).times(v);
|
||||
return Decimal.pow(1.15, v).times(10);
|
||||
},
|
||||
display: {
|
||||
title: "Metal Drill",
|
||||
|
@ -402,7 +405,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const industrialCrucible = createBuyable(() => ({
|
||||
resource: noPersist(metal),
|
||||
cost() {
|
||||
return Decimal.pow(1.15, Decimal.times(this.amount.value, 10)).times(10);
|
||||
let v = new Decimal(this.amount.value);
|
||||
v = Decimal.pow(0.95, paper.books.metalBook.totalAmount.value).times(v);
|
||||
return Decimal.pow(1.15, Decimal.times(v, 10)).times(10);
|
||||
},
|
||||
display: {
|
||||
title: "Industrial Crucible",
|
||||
|
@ -426,7 +431,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const hotterForge = createBuyable(() => ({
|
||||
resource: coal.coal,
|
||||
cost() {
|
||||
return Decimal.pow(10, this.amount.value).times(1e12);
|
||||
let v = new Decimal(this.amount.value);
|
||||
v = Decimal.pow(0.95, paper.books.metalBook.totalAmount.value).times(v);
|
||||
return Decimal.pow(10, v).times(1e12);
|
||||
},
|
||||
display: {
|
||||
title: "Hotter Forges",
|
||||
|
|
|
@ -92,7 +92,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const buildHeavy = createBuyable(() => ({
|
||||
resource: metal.metal,
|
||||
cost() {
|
||||
const v = new Decimal(this.amount.value);
|
||||
let v = new Decimal(this.amount.value);
|
||||
v = Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value).times(v);
|
||||
return Decimal.pow(1.3, v).times(2.5e4);
|
||||
},
|
||||
display: jsx(() => (
|
||||
|
@ -135,7 +136,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const buildHeavy2 = createBuyable(() => ({
|
||||
resource: metal.metal,
|
||||
cost() {
|
||||
const v = new Decimal(this.amount.value);
|
||||
let v = new Decimal(this.amount.value);
|
||||
v = Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value).times(v);
|
||||
return Decimal.pow(2, v).times(1e5);
|
||||
},
|
||||
display: jsx(() => (
|
||||
|
@ -181,7 +183,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const buildExtractor = createBuyable(() => ({
|
||||
resource: metal.metal,
|
||||
cost() {
|
||||
const v = new Decimal(this.amount.value);
|
||||
let v = new Decimal(this.amount.value);
|
||||
v = Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value).times(v);
|
||||
return Decimal.pow(8, v).times(2e5);
|
||||
},
|
||||
display: jsx(() => (
|
||||
|
@ -237,7 +240,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const buildPump = createBuyable(() => ({
|
||||
resource: metal.metal,
|
||||
cost() {
|
||||
const v = new Decimal(this.amount.value);
|
||||
let v = new Decimal(this.amount.value);
|
||||
v = Decimal.pow(0.95, paper.books.oilBook.totalAmount.value).times(v);
|
||||
let price = Decimal.pow(16, v).times(2e6);
|
||||
if (row2Upgrades[4].bought.value)
|
||||
price = price.div(Decimal.add(totalOil.value, 1).root(6));
|
||||
|
@ -286,7 +290,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const buildBurner = createBuyable(() => ({
|
||||
resource: noPersist(oil),
|
||||
cost() {
|
||||
const v = new Decimal(this.amount.value);
|
||||
let v = new Decimal(this.amount.value);
|
||||
v = Decimal.pow(0.95, paper.books.oilBook.totalAmount.value).times(v);
|
||||
return Decimal.pow(2, v).times(50);
|
||||
},
|
||||
display: jsx(() => (
|
||||
|
@ -338,7 +343,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const buildSmelter = createBuyable(() => ({
|
||||
resource: metal.metal,
|
||||
cost() {
|
||||
const v = new Decimal(this.amount.value);
|
||||
let v = new Decimal(this.amount.value);
|
||||
v = Decimal.pow(0.95, paper.books.oilBook.totalAmount.value).times(v);
|
||||
let price = Decimal.pow(10, v).times(1e7);
|
||||
if (row2Upgrades[4].bought.value)
|
||||
price = price.div(Decimal.add(totalOil.value, 1).root(6));
|
||||
|
|
Loading…
Add table
Reference in a new issue