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

98 lines
3.2 KiB
TypeScript
Raw Normal View History

2021-08-18 15:36:02 -05:00
/// <reference path="./GameState.ts" />
2021-09-04 23:16:32 -05:00
/// <reference path="./resource/BuildingPermit.ts" />
2021-08-22 11:07:49 -05:00
/// <reference path="./resource/Church.ts" />
/// <reference path="./resource/Compound.ts" />
2021-08-21 17:06:51 -05:00
/// <reference path="./resource/Credibility.ts" />
2021-08-21 19:02:57 -05:00
/// <reference path="./resource/CryptoCurrency.ts" />
2021-08-22 11:07:49 -05:00
/// <reference path="./resource/House.ts" />
2021-09-04 23:16:32 -05:00
/// <reference path="./resource/MegaChurch.ts" />
2021-08-20 17:12:32 -05:00
/// <reference path="./resource/Money.ts" />
2021-08-22 11:07:49 -05:00
/// <reference path="./resource/Pastor.ts" />
2021-08-21 17:06:51 -05:00
/// <reference path="./resource/PlayerOrg.ts" />
2021-08-18 10:09:19 -05:00
/// <reference path="./resource/Religion.ts" />
2021-08-21 19:53:43 -05:00
/// <reference path="./resource/Tent.ts" />
2021-08-18 10:09:19 -05:00
class GameConfig {
2021-09-04 22:21:14 -05:00
public worldPopulation = 790000000;
2021-08-18 10:09:19 -05:00
// religion configs
2021-09-04 22:21:14 -05:00
public relChristianitySharer = 0.325;
public relIslamShare = 0.215;
public relHinduismShare = 0.16;
public relBuddhismShare = 0.06;
public relSikhismShare = 0.04;
public relJudaismShare = 0.02;
public relOtherShare = 0.02;
public relNoneShare = 0.16;
2021-09-05 14:45:37 -05:00
public cfgStartingPlayerMax = 5;
public cfgStartingMoneyMax = 500000;
public cfgStartingTentMax = 5;
public cfgStartingCryptoMax = 1000;
public cfgStartingMegaChurchMax = 2;
2021-09-04 22:21:14 -05:00
public cfgTitheAmount = 10;
public cfgTimeBetweenTithes = 30000;
public cfgCryptoReturnAmount = 1;
public cfgCredibilityRestoreRate = 0.25;
2021-09-05 14:45:37 -05:00
public cfgPastorRecruitRate = 0.01;
public generateState (): GameState {
2021-09-05 14:45:37 -05:00
const state: GameState = new GameState(this);
2021-08-18 15:36:02 -05:00
2021-08-20 17:12:32 -05:00
// create player organization
2021-08-21 17:06:51 -05:00
state.addResource('plorg', new PlayerOrg());
2021-08-20 17:12:32 -05:00
2021-08-18 15:36:02 -05:00
// create world religions
state.addResource('xtian', new Religion(
'Christianity', 'God, Jesus, Bible, churches.',
2021-09-04 22:21:14 -05:00
this.relChristianitySharer * this.worldPopulation));
2021-08-18 15:36:02 -05:00
state.addResource('islam', new Religion(
'Islam', 'God, Muhammad, Quran, mosques.',
this.relIslamShare * this.worldPopulation));
state.addResource('hindu', new Religion(
'Hinduism', 'Dogma-free spiritualism.',
this.relHinduismShare * this.worldPopulation));
state.addResource('buddh', new Religion(
'Buddhism', 'The minimization of suffering.',
this.relBuddhismShare * this.worldPopulation));
state.addResource('sikhi', new Religion(
'Sikhism', 'Meditation and ten Gurus',
this.relSikhismShare * this.worldPopulation));
state.addResource('judah', new Religion(
'Judaism', 'God, Abraham, Torah, synagogues.',
this.relJudaismShare * this.worldPopulation));
state.addResource('other', new Religion(
'Other', 'A variety of belief systems.',
this.relOtherShare * this.worldPopulation));
state.addResource('agnos', new Religion(
'Non-Religious', 'Atheists and agnostics.',
this.relNoneShare * this.worldPopulation));
2021-08-22 11:07:49 -05:00
// add jobs
state.addResource('pstor', new Pastor());
2021-08-21 17:06:51 -05:00
// add resources
2021-08-22 11:07:49 -05:00
state.addResource('money', new Money(3.50));
2021-08-21 19:02:57 -05:00
state.addResource('crpto', new CryptoCurrency());
2021-08-21 19:53:43 -05:00
state.addResource('tents', new Tent());
state.addResource('house', new House());
2021-08-22 11:07:49 -05:00
state.addResource('chrch', new Church());
2021-08-22 13:48:48 -05:00
state.addResource('cmpnd', new Compound());
2021-09-04 23:16:32 -05:00
state.addResource('blpmt', new BuildingPermit());
state.addResource('mchch', new MegaChurch());
2021-08-20 17:12:32 -05:00
// add passive resources
2021-08-22 11:07:49 -05:00
state.addResource('creds', new Credibility());
2021-08-18 15:36:02 -05:00
return state;
}
2021-08-18 10:09:19 -05:00
}