-- Can this player found a pantheon?
-- Return false if the player can never found a pantheon
function OnPlayerCanFoundPantheon(iPlayer)
print(string.format("Can player %i found a pantheon", iPlayer))
return true
end
GameEvents.PlayerCanFoundPantheon.Add(OnPlayerCanFoundPantheon)
-- Can this player found a religion with this city becomming the Holy City?
-- Returning false will permit the Great Prophet to move to another city
function OnPlayerCanFoundReligion(iPlayer, iCity)
print(string.format("Can player %i found a religion in city %i", iPlayer, iCity))
return true
end
GameEvents.PlayerCanFoundReligion.Add(OnPlayerCanFoundReligion)
-- Get the religion for this player to found
function OnGetReligionToFound(iPlayer, iPreferredReligion, bIsAlreadyFounded)
print(string.format("What religion shall we give to player %i (they would like %i)", iPlayer, iPreferredReligion))
return iPreferredReligion
end
GameEvents.GetReligionToFound.Add(OnGetReligionToFound)
-- Notification that this player has founded a pantheon
function OnPantheonFounded(iPlayer, iCapitalCity, iReligion, iBelief)
print(string.format("Player %i founded a pantheon with belief %i", iPlayer, iBelief))
end
GameEvents.PantheonFounded.Add(OnPantheonFounded)
-- Notification that this player has founded a religion
-- iBelief1 will be the pantheon belief
-- iBelief4 and iBelief5 will usually be -1, unless the religion was founded via Lua
function OnReligionFounded(iPlayer, iHolyCity, iReligion, iBelief1, iBelief2, iBelief3, iBelief4, iBelief5)
print(string.format("Player %i founded religion %i with beliefs %i, %i, %i", iPlayer, iReligion, iBelief1, iBelief2, iBelief3))
end
GameEvents.ReligionFounded.Add(OnReligionFounded)
-- Notification that this player has enhanced a religion
function OnReligionEnhanced(iPlayer, iReligion, iBelief1, iBelief2)
print(string.format("Player %i enhanced religion %i with beliefs %i and %i", iPlayer, iReligion, iBelief1, iBelief2))
end
GameEvents.ReligionEnhanced.Add(OnReligionEnhanced)
-- Can this player have this (pantheon) belief
function OnPlayerCanHaveBelief(iPlayer, iBelief)
print(string.format("Can player %i have pantheon belief %i", iPlayer, iBelief))
return true
end
GameEvents.PlayerCanHaveBelief.Add(OnPlayerCanHaveBelief)
-- Can this religion have this belief
function OnReligionCanHaveBelief(iReligion, iBelief)
print(string.format("Can religion %i have belief %i", iReligion, iBelief))
return true
end
GameEvents.ReligionCanHaveBelief.Add(OnReligionCanHaveBelief)