Module: features/conversion
Interfaces
Type aliases
Conversion
Ƭ Conversion<T
>: Replace
<T
& BaseConversion
, { buyMax
: GetComputableTypeWithDefault
<T
["buyMax"
], true
> ; currentGain
: GetComputableTypeWithDefault
<T
["currentGain"
], Ref
<DecimalSource
>> ; nextAt
: GetComputableTypeWithDefault
<T
["nextAt"
], Ref
<DecimalSource
>> ; roundUpCost
: GetComputableTypeWithDefault
<T
["roundUpCost"
], true
> }>
Type parameters
Name | Type |
---|---|
T | extends ConversionOptions |
Defined in
profectus/src/features/conversion.ts:30
GenericConversion
Ƭ GenericConversion: Replace
<Conversion
<ConversionOptions
>, { buyMax
: ProcessedComputable
<boolean
> ; currentGain
: ProcessedComputable
<DecimalSource
> ; nextAt
: ProcessedComputable
<DecimalSource
> ; roundUpCost
: ProcessedComputable
<boolean
> }>
Defined in
profectus/src/features/conversion.ts:40
ScalingFunction
Ƭ ScalingFunction: Object
Type declaration
Name | Type |
---|---|
currentGain | (conversion : GenericConversion ) => DecimalSource |
nextAt | (conversion : GenericConversion ) => DecimalSource |
Defined in
profectus/src/features/conversion.ts:93
Functions
addHardcap
▸ addHardcap(scaling
, cap
): ScalingFunction
Parameters
Name | Type |
---|---|
scaling | ScalingFunction |
cap | ProcessedComputable <DecimalSource > |
Returns
Defined in
profectus/src/features/conversion.ts:244
addSoftcap
▸ addSoftcap(scaling
, cap
, power?
): ScalingFunction
Parameters
Name | Type | Default value |
---|---|---|
scaling | ScalingFunction | undefined |
cap | ProcessedComputable <DecimalSource > | undefined |
power | ProcessedComputable <DecimalSource > | 0.5 |
Returns
Defined in
profectus/src/features/conversion.ts:232
createConversion
▸ createConversion<T
>(optionsFunc
): Conversion
<T
>
Type parameters
Name | Type |
---|---|
T | extends ConversionOptions |
Parameters
Name | Type |
---|---|
optionsFunc | () => T & ThisType <Conversion <T >> |
Returns
Conversion
<T
>
Defined in
profectus/src/features/conversion.ts:50
createCumulativeConversion
▸ createCumulativeConversion<S
>(optionsFunc
): Conversion
<S
>
Type parameters
Name | Type |
---|---|
S | extends ConversionOptions |
Parameters
Name | Type |
---|---|
optionsFunc | () => S & ThisType <Conversion <S >> |
Returns
Conversion
<S
>
Defined in
profectus/src/features/conversion.ts:166
createIndependentConversion
▸ createIndependentConversion<S
>(optionsFunc
): Conversion
<S
>
Type parameters
Name | Type |
---|---|
S | extends ConversionOptions |
Parameters
Name | Type |
---|---|
optionsFunc | () => S & ThisType <Conversion <S >> |
Returns
Conversion
<S
>
Defined in
profectus/src/features/conversion.ts:172
createLinearScaling
▸ createLinearScaling(base
, coefficient
): ScalingFunction
Parameters
Name | Type |
---|---|
base | DecimalSource | Ref <DecimalSource > |
coefficient | DecimalSource | Ref <DecimalSource > |
Returns
Defined in
profectus/src/features/conversion.ts:100
createPolynomialScaling
▸ createPolynomialScaling(base
, exponent
): ScalingFunction
Parameters
Name | Type |
---|---|
base | DecimalSource | Ref <DecimalSource > |
exponent | DecimalSource | Ref <DecimalSource > |
Returns
Defined in
profectus/src/features/conversion.ts:135
setupPassiveGeneration
▸ setupPassiveGeneration(layer
, conversion
, rate?
): void
Parameters
Name | Type | Default value |
---|---|---|
layer | GenericLayer | undefined |
conversion | GenericConversion | undefined |
rate | ProcessedComputable <DecimalSource > | 1 |
Returns
void