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-09-04 23:16:32 -05:00
|
|
|
/// <reference path="./Infrastructure.ts" />
|
|
|
|
|
|
|
|
class MegaChurch extends Infrastructure {
|
|
|
|
constructor () {
|
|
|
|
super('MegaChurches',
|
|
|
|
'Room for 5 pastors');
|
|
|
|
this.cost.money = 7500000;
|
|
|
|
this._costMultiplier.money = 1.01;
|
|
|
|
}
|
|
|
|
|
2021-09-05 14:45:37 -05:00
|
|
|
public max: (state: GameState) => number = (state) =>
|
|
|
|
state.config.cfgStartingMegaChurchMax;
|
|
|
|
|
2021-09-04 23:16:32 -05:00
|
|
|
public isUnlocked (state: GameState): boolean {
|
|
|
|
if (this._isUnlocked) return true;
|
|
|
|
const permit: IResource = state.getResource('blpmt');
|
|
|
|
if (permit.value > 0) {
|
|
|
|
this._isUnlocked = true;
|
|
|
|
}
|
|
|
|
return this._isUnlocked;
|
|
|
|
}
|
|
|
|
}
|