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.
2021-08-21 19:02:57 -05:00
|
|
|
/// <reference path="./Purchasable.ts" />
|
|
|
|
|
|
|
|
class CryptoCurrency extends Purchasable {
|
2021-09-12 13:58:57 -05:00
|
|
|
public readonly resourceKey = ResourceKey.cryptoCurrency;
|
|
|
|
|
2021-09-06 12:02:38 -05:00
|
|
|
constructor(config: GameConfig) {
|
2021-09-06 00:12:05 -05:00
|
|
|
super(
|
|
|
|
'FaithCoin',
|
2021-09-06 08:51:41 -05:00
|
|
|
'faithcoin',
|
|
|
|
'faithcoins',
|
2021-09-06 20:37:23 -05:00
|
|
|
"A crypto coin that can't be spent directly, but provides a steady stream of passive income.",
|
|
|
|
true
|
2021-09-06 12:02:38 -05:00
|
|
|
);
|
2021-09-05 20:43:11 -05:00
|
|
|
this.cost.money = config.cfgInitialCost.cryptoCurrency;
|
2021-08-22 11:51:16 -05:00
|
|
|
this.valueInWholeNumbers = false;
|
2021-08-21 19:02:57 -05:00
|
|
|
}
|
2021-09-05 14:45:37 -05:00
|
|
|
|
2021-09-06 22:44:00 -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
|
|
|
}
|