mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-25 18:00:25 +00:00
Fix fire cost not being based on bonfires
This commit is contained in:
parent
f670ffa6aa
commit
8c255e0e67
1 changed files with 3 additions and 3 deletions
|
@ -92,11 +92,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
const buildFire = createBuyable(() => ({
|
const buildFire = createBuyable(() => ({
|
||||||
resource: trees.logs,
|
resource: trees.logs,
|
||||||
cost() {
|
cost() {
|
||||||
let v = this.amount.value;
|
let v = Decimal.times(buildBonfire.amount.value, unref(buildBonfire.cost!)).plus(this.amount.value);
|
||||||
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100);
|
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100);
|
||||||
if (Decimal.gte(v, 10000)) v = Decimal.pow(v, 2).div(10000);
|
if (Decimal.gte(v, 10000)) v = Decimal.pow(v, 2).div(10000);
|
||||||
v = Decimal.pow(0.95, paper.books.smallFireBook.amount.value).times(v);
|
v = Decimal.pow(0.95, paper.books.smallFireBook.amount.value).times(v);
|
||||||
return Decimal.times(v, 10).plus(v).pow(1.5).times(1e4);
|
return v.pow(1.5).times(1e4);
|
||||||
},
|
},
|
||||||
display: jsx(() => (
|
display: jsx(() => (
|
||||||
<>
|
<>
|
||||||
|
@ -171,7 +171,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
const buildBonfire = createBuyable(() => ({
|
const buildBonfire = createBuyable(() => ({
|
||||||
resource: fireResource,
|
resource: fireResource,
|
||||||
cost() {
|
cost() {
|
||||||
return Decimal.times(10, Decimal.pow(0.95, paper.books.bonfireBook.amount.value));
|
return Decimal.pow(0.95, paper.books.bonfireBook.amount.value).times(10);
|
||||||
},
|
},
|
||||||
display: jsx(() => (
|
display: jsx(() => (
|
||||||
<>
|
<>
|
||||||
|
|
Loading…
Reference in a new issue