Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetVietnameseGreatPeopleRate(city)
- local greatPeopleRate = 0
- if city:IsHasBuilding(GameInfoTypes["BUILDING_WALLS"]) then
- greatPeopleRate = greatPeopleRate + 10
- end
- if city:IsHasBuilding(GameInfoTypes["BUILDING_CASTLE"]) then
- greatPeopleRate = greatPeopleRate + 10
- end
- if city:IsHasBuilding(GameInfoTypes["BUILDING_ARSENAL"]) then
- greatPeopleRate = greatPeopleRate + 10
- end
- if city:IsHasBuilding(GameInfoTypes["BUILDING_MILITARY_BASE"]) then
- greatPeopleRate = greatPeopleRate + 10
- end
- return greatPeopleRate
- end
- function VietnameseGreatArtists(playerID)
- local player = Players[playerID]
- if player:IsAlive() and player:GetCivilizationType() == GameInfoTypes["CIVILIZATION_VIETNAM"] then
- for city in player:Cities() do
- local greatPeopleRate = GetVietnameseGreatPeopleRate(city) * 100
- if greatPeopleRate > 0 then
- city:ChangeSpecialistGreatPersonProgressTimes100(GameInfoTypes["SPECIALIST_ARTIST"], greatPeopleRate)
- city:ChangeSpecialistGreatPersonProgressTimes100(GameInfoTypes["SPECIALIST_MUSICIAN"], greatPeopleRate)
- city:ChangeSpecialistGreatPersonProgressTimes100(GameInfoTypes["SPECIALIST_WRITIER"], greatPeopleRate)
- end
- end
- end
- end
- GameEvents.PlayerDoTurn.Add(VietnameseGreatArtists)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement