This repository has been archived on 2022-01-16. You can view files and clone it, but cannot push or open issues or pull requests.
irreligious/src/model/resource/CryptoCurrency.ts

23 lines
634 B
TypeScript
Raw Normal View History

2021-08-21 19:02:57 -05:00
/// <reference path="./Purchasable.ts" />
class CryptoCurrency extends Purchasable {
public readonly resourceKey = ResourceKey.cryptoCurrency;
constructor(config: GameConfig) {
super(
'FaithCoin',
2021-09-06 08:51:41 -05:00
'faithcoin',
'faithcoins',
"A crypto coin that can't be spent directly, but provides a steady stream of passive income.",
true
);
2021-09-05 20:43:11 -05:00
this.cost.money = config.cfgInitialCost.cryptoCurrency;
this.valueInWholeNumbers = false;
2021-08-21 19:02:57 -05:00
}
2021-09-05 14:45:37 -05:00
public isUnlocked = (_state: GameState): boolean => true;
public max = (state: GameState): number =>
2021-09-05 20:43:11 -05:00
state.config.cfgInitialMax.cryptoCurrency ?? 0;
2021-08-21 19:02:57 -05:00
}