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:53:43 -05:00
|
|
|
/// <reference path="./Infrastructure.ts" />
|
|
|
|
|
|
|
|
class Compound extends Infrastructure {
|
|
|
|
constructor () {
|
|
|
|
super('Compounds',
|
2021-08-21 21:35:42 -05:00
|
|
|
'Provides space for tents and houses and a place to hide more money.');
|
2021-08-21 19:53:43 -05:00
|
|
|
this.cost.money = 15000;
|
|
|
|
this._costMultiplier.money = 1.5;
|
|
|
|
}
|
|
|
|
|
|
|
|
public isUnlocked (state: GameState): boolean {
|
|
|
|
if (this._isUnlocked) return true;
|
|
|
|
const tents: IResource = state.getResource('tents');
|
2021-08-22 11:07:49 -05:00
|
|
|
if (tents.value >= 5) {
|
2021-08-21 19:53:43 -05:00
|
|
|
this._isUnlocked = true;
|
|
|
|
}
|
|
|
|
return this._isUnlocked;
|
|
|
|
}
|
|
|
|
}
|