local bClassCathedral = GameInfoTypes.BUILDINGCLASS_CATHEDRAL;
local bClassMonastery = GameInfoTypes.BUILDINGCLASS_MONASTERY;
local bClassMosque = GameInfoTypes.BUILDINGCLASS_MOSQUE;
local bClassPagoda = GameInfoTypes.BUILDINGCLASS_PAGODA;
GameEvents.PlayerDoTurn.Add(
function(iPlayer)
local pPlayer = Players[iPlayer];
if (pPlayer:IsAlive()) then
if (pPlayer:GetCivilizationType() == GameInfoTypes.CIVILIZATION_WHATEVER) then
local cCathedral = pPlayer:GetBuildingClassCount(bClassCathedral);
local cMonastery = pPlayer:GetBuildingClassCount(bClassMonastery);
local cMosque = pPlayer:GetBuildingClassCount(bClassMosque);
local cPagoda = pPlayer:GetBuildingClassCount(bClassPagoda);
local cGABonus = cCathedral + cMonastery + cMosque + cPagoda;
if not pPlayer:IsGoldenAge() then
pPlayer:ChangeGoldenAgeProgressMeter(cGABonus);
end
end
end
end)