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/MegaChurch.ts

23 lines
584 B
TypeScript

/// <reference path="./Infrastructure.ts" />
class MegaChurch extends Infrastructure {
constructor () {
super('MegaChurches',
'Room for 5 pastors');
this.cost.money = 7500000;
this._costMultiplier.money = 1.01;
}
public max: (state: GameState) => number = (state) =>
state.config.cfgStartingMegaChurchMax;
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;
}
}