Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .lua trait
- function FaithUnitProduction(playerID)
- local player = Players[playerID]
- if player:GetCivilizationType() == GameInfoTypes["CIVILIZATION_PROTECTORATE"] and player:IsAlive() then
- for city in player:Cities() do
- local faithproductionAmount = math.floor(0.25 * player:GetTotalFaithPerTurn())
- city:SetNumRealBuilding(GameInfoTypes["BUILDING_PROTECTORATE_PRODUCTION"], faithproductionAmount)
- end
- end
- end
- GameEvents.PlayerDoTurn.Add(FaithUnitProduction)
- Dummy building xml
- <Buildings>
- <Row>
- <Type>BUILDING_DUMMY_PROTECTORATE</Type>
- <BuildingClass>BUILDINGCLASS_PROTECTORATE</BuildingClass>
- <Cost>-1</Cost>
- <FaithCost>-1</FaithCost>
- <PrereqTech>NULL</PrereqTech>
- <GreatWorkCount>-1</GreatWorkCount>
- <ArtDefineTag>NONE</ArtDefineTag>
- <MinAreaSize>-1</MinAreaSize>
- <NeverCapture>true</NeverCapture>
- <HurryCostModifier>-1</HurryCostModifier>
- <PortraitIndex>0</PortraitIndex>
- <IconAtlas>CIV_COLOR_ATLAS</IconAtlas>
- </Row>
- </Buildings>
- <BuildingClasses>
- <Row>
- <Type>BUILDINGCLASS_PROTECORATE_UA</Type>
- <DefaultBuilding>BUILDING_PROTECTORATE_UA</DefaultBuilding>
- </Row>
- </BuildingClasses>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement