mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-02-16 09:31:43 +00:00
Implement oil mastery effect
This commit is contained in:
parent
0e8d63557b
commit
3d477d5809
5 changed files with 62 additions and 15 deletions
|
@ -686,7 +686,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
<Spacer />
|
||||
{masteryEffectActive.value ? (
|
||||
<>
|
||||
<div class="decoration-effect">
|
||||
<div class="decoration-effect ribbon">
|
||||
Decoration effect:
|
||||
<br />
|
||||
Performing any action performs all actions and spinning doesn't spend
|
||||
|
|
|
@ -789,6 +789,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
exponent: 1.05,
|
||||
description: "Jack Level 2",
|
||||
enabled: management.elfTraining.heatedCutterElfTraining.milestones[1].earned
|
||||
})),
|
||||
createAdditiveModifier(() => ({
|
||||
addend: oil.burnerCoal,
|
||||
description: "Oil Decoration",
|
||||
enabled: oil.masteryEffectActive
|
||||
}))
|
||||
]) as WithRequired<Modifier, "description" | "revert">;
|
||||
const computedCoalGain = computed(() => coalGain.apply(0));
|
||||
|
|
|
@ -87,12 +87,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
|
||||
const activeHeavy = persistent<DecimalSource>(0);
|
||||
const heavyCoal = computed(() =>
|
||||
Decimal.times(
|
||||
Decimal.pow(activeHeavy.value, heavy2Power.value).pow(
|
||||
management.elfTraining.coalDrillElfTraining.milestones[0].earned.value ? 2.5 : 2
|
||||
),
|
||||
1e14
|
||||
)
|
||||
masteryEffectActive.value
|
||||
? 0
|
||||
: Decimal.times(
|
||||
Decimal.pow(activeHeavy.value, heavy2Power.value).pow(
|
||||
management.elfTraining.coalDrillElfTraining.milestones[0].earned.value
|
||||
? 2.5
|
||||
: 2
|
||||
),
|
||||
1e14
|
||||
)
|
||||
);
|
||||
const heavyPower = computed(() =>
|
||||
Decimal.times(Decimal.pow(activeHeavy.value, heavy2Power.value), 1)
|
||||
|
@ -223,7 +227,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
});
|
||||
|
||||
const activeExtractor = persistent<DecimalSource>(0);
|
||||
const extractorPower = computed(() => Decimal.pow(1 / 3, activeExtractor.value));
|
||||
const extractorPower = computed(() =>
|
||||
masteryEffectActive.value ? 1 : Decimal.pow(1 / 3, activeExtractor.value)
|
||||
);
|
||||
const extractorCoal = computed(() => Decimal.pow(2, activeExtractor.value));
|
||||
const extractorOre = computed(() => Decimal.pow(1.2, activeExtractor.value));
|
||||
const buildExtractor = createBuyable(() => ({
|
||||
|
@ -280,7 +286,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
|
||||
const activePump = persistent<DecimalSource>(0);
|
||||
const pumpCoal = computed(() =>
|
||||
Decimal.pow(row2Upgrades[3].bought.value ? 4 : 5, activePump.value)
|
||||
masteryEffectActive.value
|
||||
? 1
|
||||
: Decimal.pow(row2Upgrades[3].bought.value ? 4 : 5, activePump.value)
|
||||
);
|
||||
const pumpOil = computed(() =>
|
||||
Decimal.add(activePump.value, computedExtraOilPumps.value)
|
||||
|
@ -368,7 +376,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
}
|
||||
return burners;
|
||||
});
|
||||
const burnerOil = computed(() => Decimal.pow(effectiveBurners.value, 2));
|
||||
const burnerOil = computed(() =>
|
||||
masteryEffectActive.value ? 0 : Decimal.pow(effectiveBurners.value, 2)
|
||||
);
|
||||
const burnerCoal = computed(() => Decimal.pow(effectiveBurners.value, 3).mul(1e19));
|
||||
const burnerMetal = computed(() => Decimal.add(effectiveBurners.value, 1));
|
||||
const buildBurner = createBuyable(() => ({
|
||||
|
@ -430,7 +440,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
});
|
||||
|
||||
const activeSmelter = persistent<DecimalSource>(0);
|
||||
const smelterOil = computed(() => Decimal.pow(activeSmelter.value, 2).mul(100));
|
||||
const smelterOil = computed(() =>
|
||||
masteryEffectActive.value ? 0 : Decimal.pow(activeSmelter.value, 2).mul(100)
|
||||
);
|
||||
const smelterMetal = computed(() => Decimal.add(activeSmelter.value, 1));
|
||||
const buildSmelter = createBuyable(() => ({
|
||||
resource: metal.metal,
|
||||
|
@ -1164,6 +1176,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
buildExtractor,
|
||||
activePump,
|
||||
buildPump,
|
||||
burnerCoal,
|
||||
activeBurner,
|
||||
effectiveBurners,
|
||||
buildBurner,
|
||||
|
@ -1205,6 +1218,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
<>
|
||||
{render(trackerDisplay)}
|
||||
<Spacer />
|
||||
{masteryEffectActive.value ? (
|
||||
<>
|
||||
<div class="decoration-effect ribbon">
|
||||
Decoration effect:
|
||||
<br />
|
||||
Remove all negative effects of mining drills and oil machines, and
|
||||
oil burner produces coal
|
||||
</div>
|
||||
<Spacer />
|
||||
</>
|
||||
) : null}
|
||||
{Decimal.lt(coalEffectiveness.value, 1) ? (
|
||||
<div>
|
||||
Coal efficiency: {format(Decimal.mul(coalEffectiveness.value, 100))}%
|
||||
|
@ -1350,7 +1374,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
</div>
|
||||
)),
|
||||
mastery,
|
||||
mastered
|
||||
mastered,
|
||||
masteryEffectActive
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -126,7 +126,9 @@ const layer = createLayer(id, () => {
|
|||
const { collapseMilestones, display: milestonesDisplay } =
|
||||
createCollapsibleMilestones(milestones);
|
||||
|
||||
const masteryReq = computed(() => Decimal.times(2, Decimal.sub(masteredDays.value, 5)));
|
||||
const masteryReq = computed(() =>
|
||||
Decimal.sub(masteredDays.value, 5).times(Decimal.sub(masteredDays.value, 4).div(2))
|
||||
);
|
||||
const enterMasteryButton = createClickable(() => ({
|
||||
display: () => ({
|
||||
title: `${main.isMastery.value ? "Stop Decorating" : "Begin Decorating"} ${
|
||||
|
|
19
src/main.css
19
src/main.css
|
@ -142,8 +142,23 @@ ul {
|
|||
}
|
||||
|
||||
.decoration-effect {
|
||||
border: solid 8px rgba(0, 0, 255, .8);
|
||||
border: solid 8px darkred;
|
||||
padding: 4px;
|
||||
border-image: repeating-linear-gradient(-45deg, rgb(255, 76, 76) 0 10px, rgb(255, 255, 255) 10px 20px, rgb(65, 255, 95) 20px 30px, rgb(255, 255, 255) 30px 40px, rgb(255, 76, 76) 40px 50px, rgb(255, 255, 255) 50px 60px, rgb(65, 255, 95) 60px 70px, rgb(255, 255, 255) 70px 80px ) 12/10px;
|
||||
width: 576px;
|
||||
position: relative;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.decoration-effect:not(.ribbon) {
|
||||
border-image: repeating-linear-gradient(-45deg, rgb(255, 76, 76) 0 10px, rgb(255, 255, 255) 10px 20px, rgb(65, 255, 95) 20px 30px, rgb(255, 255, 255) 30px 40px, rgb(255, 76, 76) 40px 50px, rgb(255, 255, 255) 50px 60px, rgb(65, 255, 95) 60px 70px, rgb(255, 255, 255) 70px 80px ) 12/10px;
|
||||
}
|
||||
|
||||
.decoration-effect.ribbon::before {
|
||||
content: "🎀";
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
left: -20px;
|
||||
font-size: xx-large;
|
||||
transform: rotateZ(-45deg);
|
||||
z-index: 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue