mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-03-14 01:51:40 +00:00
Balance tweaks
This commit is contained in:
parent
1ccdbeeadc
commit
dfe9ea515c
2 changed files with 22 additions and 16 deletions
|
@ -40,7 +40,7 @@ import dyes from "./dyes";
|
|||
|
||||
export interface ElfBuyable extends GenericBuyable {
|
||||
/** The inverse function of the cost formula, used to calculate the maximum amount that can be bought by elves. */
|
||||
inverseCost: (x?: DecimalSource) => DecimalSource
|
||||
inverseCost: (x?: DecimalSource) => DecimalSource;
|
||||
}
|
||||
|
||||
const id = "elves";
|
||||
|
@ -538,7 +538,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
cost = Decimal.times(cost, 1e15);
|
||||
}
|
||||
if (Decimal.gte(totalElves.value, 12)) {
|
||||
cost = Decimal.times(cost, 1e18);
|
||||
cost = Decimal.times(cost, 1e15);
|
||||
}
|
||||
return cost;
|
||||
});
|
||||
|
@ -553,7 +553,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
cooldownModifier: Modifier;
|
||||
hasToggle?: boolean;
|
||||
toggleDesc?: string;
|
||||
onAutoPurchase?: (buyable: ElfBuyable & { resource?: Resource }, amount: DecimalSource) => void;
|
||||
onAutoPurchase?: (
|
||||
buyable: ElfBuyable & { resource?: Resource },
|
||||
amount: DecimalSource
|
||||
) => void;
|
||||
onPurchase?: VoidFunction; // Will get overriden by the custom onpurchase, but that's fine
|
||||
canBuy?: Computable<boolean>;
|
||||
buyMax?: Computable<boolean>;
|
||||
|
@ -583,7 +586,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
(isArray(options.buyable) ? options.buyable : [options.buyable]).forEach(
|
||||
buyable => {
|
||||
const buyAmount = Decimal.min(
|
||||
Decimal.sub(buyable.inverseCost(buyable.resource?.value), buyable.amount.value),
|
||||
Decimal.sub(
|
||||
buyable.inverseCost(buyable.resource?.value),
|
||||
buyable.amount.value
|
||||
),
|
||||
maxBuyAmount
|
||||
);
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ const layer = createLayer(id, () => {
|
|||
display: {
|
||||
title: "Advanced Training",
|
||||
description:
|
||||
"Time for some advanced training! Now that all the elves know the basics, you have a foundation you can truly build off of. Everyone seems to be learning 10x as quickly!"
|
||||
"Time for some advanced training! Now that all the elves know the basics, you have a foundation you can truly build off of. Everyone seems to be learning twice as quickly!"
|
||||
},
|
||||
visibility: () =>
|
||||
showIf(main.day.value >= advancedDay && main.days[advancedDay - 1].opened.value),
|
||||
|
@ -132,7 +132,7 @@ const layer = createLayer(id, () => {
|
|||
enabled: classroomUpgrade.bought
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: 10,
|
||||
multiplier: 2,
|
||||
description: "Advanced Training",
|
||||
enabled: advancedUpgrade.bought
|
||||
})),
|
||||
|
@ -196,20 +196,20 @@ const layer = createLayer(id, () => {
|
|||
height: 14,
|
||||
style: () => ({
|
||||
"margin-top": "8px",
|
||||
"background": color,
|
||||
"box-shadow":
|
||||
currentShown.value == elf.name ? "0 0 12px black"
|
||||
: focusTargets.value[elf.name] ? "0 0 12px white"
|
||||
: ""
|
||||
background: color,
|
||||
"box-shadow":
|
||||
currentShown.value == elf.name
|
||||
? "0 0 12px black"
|
||||
: focusTargets.value[elf.name]
|
||||
? "0 0 12px white"
|
||||
: ""
|
||||
}),
|
||||
baseStyle: "margin-top: -1px",
|
||||
fillStyle: () => ({
|
||||
"margin-top": "-1px",
|
||||
"transition-duration": "0s",
|
||||
"background": "white",
|
||||
"animation": focusTargets.value[elf.name]
|
||||
? ".5s focused-xp-bar linear infinite"
|
||||
: "",
|
||||
background: "white",
|
||||
animation: focusTargets.value[elf.name] ? ".5s focused-xp-bar linear infinite" : ""
|
||||
}),
|
||||
borderStyle: () =>
|
||||
Decimal.gte(level.value, schools.amount.value) ? "border-color: red" : "",
|
||||
|
@ -1368,7 +1368,7 @@ const layer = createLayer(id, () => {
|
|||
|
||||
const schoolCost = computed(() => {
|
||||
const schoolFactor = Decimal.pow(10, schools.amount.value);
|
||||
const nerfedSchoolFactor = Decimal.pow(5, schools.amount.value);
|
||||
const nerfedSchoolFactor = Decimal.pow(4, schools.amount.value);
|
||||
let woodFactor = Decimal.pow(2e4, Decimal.pow(schools.amount.value, 0.75));
|
||||
if (Decimal.gte(schools.amount.value, 4)) {
|
||||
woodFactor = woodFactor.div(1e3);
|
||||
|
|
Loading…
Add table
Reference in a new issue