--Checks for a player for a project and converts citizens to catholics
function GreatSynodProject(iPlayer, iCity, iProject, bGold, bFaith)
print("...Beginning Great Synod Project...");
local pPlayer = Players[iPlayer]
if iProject == GameInfo.Projects.PROJECT_GREAT_SYNOD.ID then
print("...Working on Great Synod Project...");
Player = pPlayer
if (Player:IsAlive ()) then
for pCity in Player:Cities() do
Capital = Player:GetCapitalCity()
if pCity ~= nil and not pCity:IsCapital() then
pCity:ConvertPercentFollowers(2, -1, 100);
pCity:ConvertPercentFollowers(2, 0, 100);
pCity:ConvertPercentFollowers(2, 1, 100);
pCity:ConvertPercentFollowers(2, 3, 50);
pCity:ConvertPercentFollowers(2, 4, 50);
print(pCity:GetName(), "...is converting citizens to Catholic...");
end
if pCity ~= nil and pCity:IsCapital() then
pCity:ConvertPercentFollowers(2, -1, 100);
pCity:ConvertPercentFollowers(2, 0, 100);
pCity:ConvertPercentFollowers(2, 1, 100);
pCity:ConvertPercentFollowers(2, 3, 50);
pCity:ConvertPercentFollowers(2, 4, 50);
print(pCity:GetName(), "...the capital, is converting citizens to Catholic...");
Player:ChangeFaith(300);
Player:ChangeGoldenAgeTurns(Player:GetGoldenAgeLength())
print(Player:GetName(), "...is entering a golden age.");
end
end
end
end
end
GameEvents.CityCreated.Add(GreatSynodProject)