forked from profectus/Profectus
Updated prestige layer to new conversion
This commit is contained in:
parent
f717fe8db2
commit
572566c4c1
2 changed files with 4 additions and 5 deletions
|
@ -3,7 +3,7 @@
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
import { main } from "data/projEntry";
|
import { main } from "data/projEntry";
|
||||||
import { createCumulativeConversion, createPolynomialScaling } from "features/conversion";
|
import { createCumulativeConversion } from "features/conversion";
|
||||||
import { jsx } from "features/feature";
|
import { jsx } from "features/feature";
|
||||||
import { createHotkey } from "features/hotkey";
|
import { createHotkey } from "features/hotkey";
|
||||||
import { createReset } from "features/reset";
|
import { createReset } from "features/reset";
|
||||||
|
@ -23,10 +23,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
const points = createResource<DecimalSource>(0, "prestige points");
|
const points = createResource<DecimalSource>(0, "prestige points");
|
||||||
|
|
||||||
const conversion = createCumulativeConversion(() => ({
|
const conversion = createCumulativeConversion(() => ({
|
||||||
scaling: createPolynomialScaling(10, 0.5),
|
formula: x => x.div(10).sqrt(),
|
||||||
baseResource: main.points,
|
baseResource: main.points,
|
||||||
gainResource: points,
|
gainResource: points
|
||||||
roundUpCost: true
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const reset = createReset(() => ({
|
const reset = createReset(() => ({
|
||||||
|
|
|
@ -92,6 +92,7 @@ export interface BaseConversion {
|
||||||
export type Conversion<T extends ConversionOptions> = Replace<
|
export type Conversion<T extends ConversionOptions> = Replace<
|
||||||
T & BaseConversion,
|
T & BaseConversion,
|
||||||
{
|
{
|
||||||
|
formula: InvertibleFormula;
|
||||||
currentGain: GetComputableTypeWithDefault<T["currentGain"], Ref<DecimalSource>>;
|
currentGain: GetComputableTypeWithDefault<T["currentGain"], Ref<DecimalSource>>;
|
||||||
actualGain: GetComputableTypeWithDefault<T["actualGain"], Ref<DecimalSource>>;
|
actualGain: GetComputableTypeWithDefault<T["actualGain"], Ref<DecimalSource>>;
|
||||||
currentAt: GetComputableTypeWithDefault<T["currentAt"], Ref<DecimalSource>>;
|
currentAt: GetComputableTypeWithDefault<T["currentAt"], Ref<DecimalSource>>;
|
||||||
|
@ -105,7 +106,6 @@ export type Conversion<T extends ConversionOptions> = Replace<
|
||||||
export type GenericConversion = Replace<
|
export type GenericConversion = Replace<
|
||||||
Conversion<ConversionOptions>,
|
Conversion<ConversionOptions>,
|
||||||
{
|
{
|
||||||
formula: InvertibleFormula;
|
|
||||||
currentGain: ProcessedComputable<DecimalSource>;
|
currentGain: ProcessedComputable<DecimalSource>;
|
||||||
actualGain: ProcessedComputable<DecimalSource>;
|
actualGain: ProcessedComputable<DecimalSource>;
|
||||||
currentAt: ProcessedComputable<DecimalSource>;
|
currentAt: ProcessedComputable<DecimalSource>;
|
||||||
|
|
Loading…
Reference in a new issue