mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-03-22 22:21:41 +00:00
Implemented dye mastery effect
This commit is contained in:
parent
969b555043
commit
40b40dc9dd
4 changed files with 63 additions and 11 deletions
src/data/layers
|
@ -444,6 +444,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
multiplier: 2,
|
multiplier: 2,
|
||||||
description: "Carry cloth in boxes",
|
description: "Carry cloth in boxes",
|
||||||
enabled: boxes.row3Upgrades.clothUpgrade.bought
|
enabled: boxes.row3Upgrades.clothUpgrade.bought
|
||||||
|
})),
|
||||||
|
createMultiplicativeModifier(() => ({
|
||||||
|
multiplier: dyes.boosts.yellow2,
|
||||||
|
description: "Yellow Dye",
|
||||||
|
enabled: dyes.masteryEffectActive
|
||||||
}))
|
}))
|
||||||
]);
|
]);
|
||||||
const computedSheepGain = computed(() => sheepGain.apply(1));
|
const computedSheepGain = computed(() => sheepGain.apply(1));
|
||||||
|
@ -484,6 +489,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
multiplier: 2,
|
multiplier: 2,
|
||||||
description: "Carry cloth in boxes",
|
description: "Carry cloth in boxes",
|
||||||
enabled: boxes.row3Upgrades.clothUpgrade.bought
|
enabled: boxes.row3Upgrades.clothUpgrade.bought
|
||||||
|
})),
|
||||||
|
createMultiplicativeModifier(() => ({
|
||||||
|
multiplier: dyes.boosts.yellow2,
|
||||||
|
description: "Yellow Dye",
|
||||||
|
enabled: dyes.masteryEffectActive
|
||||||
}))
|
}))
|
||||||
]);
|
]);
|
||||||
const computedShearingAmount = computed(() => shearingAmount.apply(1));
|
const computedShearingAmount = computed(() => shearingAmount.apply(1));
|
||||||
|
@ -524,6 +534,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
multiplier: 2,
|
multiplier: 2,
|
||||||
description: "Carry cloth in boxes",
|
description: "Carry cloth in boxes",
|
||||||
enabled: boxes.row3Upgrades.clothUpgrade.bought
|
enabled: boxes.row3Upgrades.clothUpgrade.bought
|
||||||
|
})),
|
||||||
|
createMultiplicativeModifier(() => ({
|
||||||
|
multiplier: dyes.boosts.yellow2,
|
||||||
|
description: "Yellow Dye",
|
||||||
|
enabled: dyes.masteryEffectActive
|
||||||
}))
|
}))
|
||||||
]);
|
]);
|
||||||
const computedSpinningAmount = computed(() => spinningAmount.apply(1));
|
const computedSpinningAmount = computed(() => spinningAmount.apply(1));
|
||||||
|
|
|
@ -63,6 +63,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
const name = "Dyes";
|
const name = "Dyes";
|
||||||
const color = "#D4D4F4";
|
const color = "#D4D4F4";
|
||||||
|
|
||||||
|
const masteryEffectActive = computed(
|
||||||
|
() => mastered.value || main.currentlyMastering.value?.name === name
|
||||||
|
);
|
||||||
|
|
||||||
function createDye(
|
function createDye(
|
||||||
options: {
|
options: {
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -413,6 +417,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
boosts.red1.value
|
boosts.red1.value
|
||||||
)} effective Oil Pumps (does not impact coal consumption)`
|
)} effective Oil Pumps (does not impact coal consumption)`
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
visible: masteryEffectActive,
|
||||||
|
desc: computed(() => `x${format(boosts.red2.value)} drill power`)
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dyesToReset: []
|
dyesToReset: []
|
||||||
|
@ -437,6 +445,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
desc: computed(() => `x${format(boosts.yellow1.value)} Paper \& Plastic gain`)
|
desc: computed(() => `x${format(boosts.yellow1.value)} Paper \& Plastic gain`)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
visible: masteryEffectActive,
|
||||||
|
desc: computed(() => `x${format(boosts.yellow2.value)} cloth actions`)
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dyesToReset: []
|
dyesToReset: []
|
||||||
|
@ -465,8 +477,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
() =>
|
() =>
|
||||||
`+${formatWhole(
|
`+${formatWhole(
|
||||||
boosts.blue1.value
|
boosts.blue1.value
|
||||||
)} forest size (after all other modifiers).`
|
)} forest size (after all other modifiers)`
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
visible: masteryEffectActive,
|
||||||
|
desc: computed(() => `/${format(boosts.blue2.value)} plastic buyables cost`)
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dyesToReset: []
|
dyesToReset: []
|
||||||
|
@ -610,8 +626,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
upgrades.blueDyeUpg2.bought.value ? 1.5 : 1
|
upgrades.blueDyeUpg2.bought.value ? 1.5 : 1
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
red2: computed(() =>
|
||||||
|
Decimal.pow(
|
||||||
|
Decimal.add(dyes.red.amount.value, 1).log2().plus(1),
|
||||||
|
upgrades.blueDyeUpg2.bought.value ? 1.5 : 1
|
||||||
|
)
|
||||||
|
),
|
||||||
yellow1: computed(() => Decimal.add(dyes.yellow.amount.value, 1).log2().plus(1)),
|
yellow1: computed(() => Decimal.add(dyes.yellow.amount.value, 1).log2().plus(1)),
|
||||||
|
yellow2: computed(() => Decimal.add(dyes.yellow.amount.value, 1).log2().plus(1).times(3)),
|
||||||
blue1: computed(() => Decimal.add(dyes.blue.amount.value, 1).log2().sqrt().times(5e6)),
|
blue1: computed(() => Decimal.add(dyes.blue.amount.value, 1).log2().sqrt().times(5e6)),
|
||||||
|
blue2: computed(() => Decimal.add(dyes.blue.amount.value, 1).log2().plus(1).pow(2)),
|
||||||
|
|
||||||
orange1: computed(() =>
|
orange1: computed(() =>
|
||||||
Decimal.pow(2, Decimal.add(dyes.orange.amount.value, 1).log2().sqrt())
|
Decimal.pow(2, Decimal.add(dyes.orange.amount.value, 1).log2().sqrt())
|
||||||
|
@ -861,9 +885,6 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const mastered = persistent<boolean>(false);
|
const mastered = persistent<boolean>(false);
|
||||||
const masteryEffectActive = computed(
|
|
||||||
() => mastered.value || main.currentlyMastering.value?.name === name
|
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name,
|
name,
|
||||||
|
@ -881,6 +902,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
<>
|
<>
|
||||||
{render(trackerDisplay)}
|
{render(trackerDisplay)}
|
||||||
<Spacer />
|
<Spacer />
|
||||||
|
{masteryEffectActive.value ? (
|
||||||
|
<>
|
||||||
|
<div class="decoration-effect ribbon">
|
||||||
|
Decoration effect:
|
||||||
|
<br />
|
||||||
|
Each primary dye gains a second effect
|
||||||
|
</div>
|
||||||
|
<Spacer />
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
<div style="width: 620px">
|
<div style="width: 620px">
|
||||||
{renderRow(dyes.red.display, dyes.yellow.display, dyes.blue.display)}
|
{renderRow(dyes.red.display, dyes.yellow.display, dyes.blue.display)}
|
||||||
{renderRow(dyes.red.buyable, dyes.yellow.buyable, dyes.blue.buyable)}
|
{renderRow(dyes.red.buyable, dyes.yellow.buyable, dyes.blue.buyable)}
|
||||||
|
@ -898,7 +929,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
</>
|
</>
|
||||||
)),
|
)),
|
||||||
mastery,
|
mastery,
|
||||||
mastered
|
mastered,
|
||||||
|
masteryEffectActive
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -878,6 +878,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
multiplier: () => coalEffectiveness.value,
|
multiplier: () => coalEffectiveness.value,
|
||||||
description: "Effectiveness",
|
description: "Effectiveness",
|
||||||
enabled: () => Decimal.lt(coalEffectiveness.value, 1)
|
enabled: () => Decimal.lt(coalEffectiveness.value, 1)
|
||||||
|
})),
|
||||||
|
createMultiplicativeModifier(() => ({
|
||||||
|
multiplier: dyes.boosts.red2,
|
||||||
|
description: "Red Dye",
|
||||||
|
enabled: dyes.masteryEffectActive
|
||||||
}))
|
}))
|
||||||
]);
|
]);
|
||||||
const computedDrillPower = computed(() => drillPower.apply(0));
|
const computedDrillPower = computed(() => drillPower.apply(0));
|
||||||
|
|
|
@ -211,10 +211,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
cost() {
|
cost() {
|
||||||
let v = passivePaper.amount.value;
|
let v = passivePaper.amount.value;
|
||||||
v = Decimal.pow(0.95, paper.books.plasticBook.totalAmount.value).times(v);
|
v = Decimal.pow(0.95, paper.books.plasticBook.totalAmount.value).times(v);
|
||||||
return Decimal.pow(1.3, v).times(100);
|
return Decimal.pow(1.3, v).times(100).div(dyes.boosts.blue2.value);
|
||||||
},
|
},
|
||||||
inverseCost(x: DecimalSource) {
|
inverseCost(x: DecimalSource) {
|
||||||
let v = Decimal.div(x, 100).log(1.3);
|
let v = Decimal.times(x, dyes.boosts.blue2.value).div(100).log(1.3);
|
||||||
v = v.div(Decimal.pow(0.95, paper.books.plasticBook.totalAmount.value));
|
v = v.div(Decimal.pow(0.95, paper.books.plasticBook.totalAmount.value));
|
||||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||||
},
|
},
|
||||||
|
@ -244,10 +244,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
cost() {
|
cost() {
|
||||||
let v = passiveBoxes.amount.value;
|
let v = passiveBoxes.amount.value;
|
||||||
v = Decimal.pow(0.95, paper.books.plasticBook.totalAmount.value).times(v);
|
v = Decimal.pow(0.95, paper.books.plasticBook.totalAmount.value).times(v);
|
||||||
return Decimal.pow(1.3, v).times(100);
|
return Decimal.pow(1.3, v).times(100).div(dyes.boosts.blue2.value);
|
||||||
},
|
},
|
||||||
inverseCost(x: DecimalSource) {
|
inverseCost(x: DecimalSource) {
|
||||||
let v = Decimal.div(x, 100).log(1.3);
|
let v = Decimal.times(x, dyes.boosts.blue2.value).div(100).log(1.3);
|
||||||
v = v.div(Decimal.pow(0.95, paper.books.plasticBook.totalAmount.value));
|
v = v.div(Decimal.pow(0.95, paper.books.plasticBook.totalAmount.value));
|
||||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||||
},
|
},
|
||||||
|
@ -277,10 +277,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
cost() {
|
cost() {
|
||||||
let v = clothGains.amount.value;
|
let v = clothGains.amount.value;
|
||||||
v = Decimal.pow(0.95, paper.books.plasticBook.totalAmount.value).times(v);
|
v = Decimal.pow(0.95, paper.books.plasticBook.totalAmount.value).times(v);
|
||||||
return Decimal.pow(1.3, v).times(100);
|
return Decimal.pow(1.3, v).times(100).div(dyes.boosts.blue2.value);
|
||||||
},
|
},
|
||||||
inverseCost(x: DecimalSource) {
|
inverseCost(x: DecimalSource) {
|
||||||
let v = Decimal.div(x, 100).log(1.3);
|
let v = Decimal.times(x, dyes.boosts.blue2.value).div(100).log(1.3);
|
||||||
v = v.div(Decimal.pow(0.95, paper.books.plasticBook.totalAmount.value));
|
v = v.div(Decimal.pow(0.95, paper.books.plasticBook.totalAmount.value));
|
||||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue