Skip to content

Profectus / features/conversion / createIndependentConversion

Function: createIndependentConversion() ​

createIndependentConversion<T>(optionsFunc): object & Omit<Omit<T, "baseResource" | "gainResource" | "formula" | "currentGain" | "actualGain" | "currentAt" | "nextAt" | "convert" | "spend" | "buyMax" | "onConvert">, keyof ConversionOptions> & object

Creates a conversion that will replace the gainResource amount with the new amount upon converting. This is similar to the behavior of "static" layers in The Modding Tree.

Type Parameters ​

• T extends ConversionOptions

Parameters ​

optionsFunc ​

() => T

Converison options.

Returns ​

object & Omit<Omit<T, "baseResource" | "gainResource" | "formula" | "currentGain" | "actualGain" | "currentAt" | "nextAt" | "convert" | "spend" | "buyMax" | "onConvert">, keyof ConversionOptions> & object

Defined in ​

profectus/src/features/conversion.ts:233