Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.64 KB | None | 0 0
  1. -- Religions
  2. -- Author: BigOz
  3. -- DateCreated: 22-Mar-15 2:44:56 PM
  4. --------------------------------------------------------------
  5. -- Find Berlin player and found Christianity in their city, returning the city
  6.  
  7. function EstablishCatholicism()
  8. if Game.GetElapsedGameTurns() == 0 then
  9.  
  10. function CreateCatholicHolyCity(pCity, religion, pantheonBelief, founderBelief, followerBelief, followerBelief2, enhancerBelief)
  11. local iPlayer = pCity:GetOwner()
  12. local iReligion = GameInfoTypes[religion]
  13.  
  14. -- Optional extra beliefs
  15. local iBelief4 = followerBelief2 and GameInfoTypes[followerBelief2] or -1
  16. local iBelief5 = enhancerBelief and GameInfoTypes[enhancerBelief] or -1
  17.  
  18. -- Game.FoundPantheon(iPlayer, GameInfoTypes[pantheonBelief])
  19. -- Game.FoundReligion(iPlayer, iReligion, nil, GameInfoTypes[founderBelief], GameInfoTypes[followerBelief], -1, -1, pCity)
  20. -- Game.EnhanceReligion(iPlayer, iReligion, GameInfoTypes[followerBelief2], GameInfoTypes[enhancerBelief]);
  21. Network.SendFoundReligion(iPlayer, iReligion, sCustomName, iBelief1, iBelief2, iBelief3, iBelief4, iHolyCityX, iHolyCityY);
  22. Network.SendEnhanceReligion(iPlayer, iReligion, sCustomName, iBelief5, iBelief6, iHolyCityX, iHolyCityY);
  23. end
  24.  
  25. function FoundCatholicism()
  26. for iPlayer=0, GameDefines.MAX_CIV_PLAYERS - 1 do
  27. local pPlayer = Players[iPlayer]
  28. if (pPlayer:IsEverAlive()) then
  29.  
  30. for pCity in pPlayer:Cities() do
  31.  
  32. -- City exists and has the proper name?
  33. if pCity ~= nil and pCity:GetName() == "Vatican City" then
  34.  
  35. CreateCatholicHolyCity(pCity, "RELIGION_CHRISTIANITY", "BELIEF_CATHOLIC_PANTHEON",
  36. "BELIEF_CATHOLIC_FOUNDER", "BELIEF_CATHOLIC_FOLLOWER_1", "BELIEF_CATHOLIC_FOLLOWER_2", "BELIEF_CATHOLIC_ENHANCER", "BELIEF_CATHOLIC_BONUS");
  37. print ("okay, Vatican is the Catholic holy city")
  38. return pCity
  39. end
  40. end
  41. end
  42. end
  43. end
  44.  
  45. local pCatholicPlot = FoundCatholicism():Plot()
  46.  
  47. end
  48. end
  49.  
  50. Events.SequenceGameInitComplete.Add(EstablishCatholicism)
  51. --------------------------------------------------------------
  52. -- Find Berlin player and found Christianity in their city, returning the city
  53.  
  54. function EstablishOrthodoxy()
  55. if Game.GetElapsedGameTurns() == 0 then
  56.  
  57. function CreateOrthodoxyHolyCity(pCity, religion, pantheonBelief, founderBelief, followerBelief, followerBelief2, enhancerBelief)
  58. local iPlayer = pCity:GetOwner()
  59. local iReligion = GameInfoTypes[religion]
  60.  
  61. -- Optional extra beliefs
  62. local iBelief4 = followerBelief2 and GameInfoTypes[followerBelief2] or -1
  63. local iBelief5 = enhancerBelief and GameInfoTypes[enhancerBelief] or -1
  64.  
  65. Game.FoundPantheon(iPlayer, GameInfoTypes[pantheonBelief])
  66. Game.FoundReligion(iPlayer, iReligion, nil, GameInfoTypes[founderBelief], GameInfoTypes[followerBelief], -1, -1, pCity)
  67. Game.EnhanceReligion(iPlayer, iReligion, GameInfoTypes[followerBelief2], GameInfoTypes[enhancerBelief]);
  68. end
  69.  
  70. function FoundOrthodoxy()
  71. for iPlayer=0, GameDefines.MAX_CIV_PLAYERS - 1 do
  72. local pPlayer = Players[iPlayer]
  73. if (pPlayer:IsEverAlive()) then
  74.  
  75. for pCity in pPlayer:Cities() do
  76.  
  77. -- City exists and has the proper name?
  78. if pCity ~= nil and pCity:GetName() == "Constantinople" then
  79.  
  80. CreateOrthodoxyHolyCity(pCity, "RELIGION_ORTHODOXY", "BELIEF_ORTHODOX_PANTHEON",
  81. "BELIEF_ORTHODOX_FOUNDER", "BELIEF_ORTHODOX_FOLLOWER_1", "BELIEF_ORTHODOX_FOLLOWER_2", "BELIEF_ORTHODOX_ENHANCER");
  82. print ("okay, Constantinople is the Eastern Orthodoxy holy city")
  83. return pCity
  84. end
  85. end
  86. end
  87. end
  88. end
  89.  
  90. local pOrthodoxyPlot = FoundOrthodoxy():Plot()
  91.  
  92. end
  93. end
  94.  
  95. Events.SequenceGameInitComplete.Add(EstablishOrthodoxy)
  96. --------------------------------------------------------------
  97. -- Find Berlin player and found Christianity in their city, returning the city
  98.  
  99. function EstablishSunni()
  100. if Game.GetElapsedGameTurns() == 0 then
  101.  
  102. function CreateSunniHolyCity(pCity, religion, pantheonBelief, founderBelief, followerBelief, followerBelief2, enhancerBelief)
  103. local iPlayer = pCity:GetOwner()
  104. local iReligion = GameInfoTypes[religion]
  105.  
  106. -- Optional extra beliefs
  107. local iBelief4 = followerBelief2 and GameInfoTypes[followerBelief2] or -1
  108. local iBelief5 = enhancerBelief and GameInfoTypes[enhancerBelief] or -1
  109.  
  110. Game.FoundPantheon(iPlayer, GameInfoTypes[pantheonBelief])
  111. Game.FoundReligion(iPlayer, iReligion, nil, GameInfoTypes[founderBelief], GameInfoTypes[followerBelief], -1, -1, pCity)
  112. Game.EnhanceReligion(iPlayer, iReligion, GameInfoTypes[followerBelief2], GameInfoTypes[enhancerBelief]);
  113. end
  114.  
  115. function FoundSunni()
  116. for iPlayer=0, GameDefines.MAX_CIV_PLAYERS - 1 do
  117. local pPlayer = Players[iPlayer]
  118. if (pPlayer:IsEverAlive()) then
  119.  
  120. for pCity in pPlayer:Cities() do
  121.  
  122. -- City exists and has the proper name?
  123. if pCity ~= nil and pCity:GetName() == "Cairo" then
  124.  
  125. CreateOrthodoxyHolyCity(pCity, "RELIGION_ISLAM", "BELIEF_SUNNI_PANTHEON",
  126. "BELIEF_SUNNI_FOUNDER", "BELIEF_SUNNI_FOLLOWER_1", "BELIEF_SUNNI_FOLLOWER_2", "BELIEF_SUNNI_ENHANCER");
  127. print ("okay, Cairo is the Sunni Islamic holy city")
  128. return pCity
  129. end
  130. end
  131. end
  132. end
  133. end
  134.  
  135. local pSunniPlot = FoundSunni():Plot()
  136.  
  137. end
  138. end
  139.  
  140. Events.SequenceGameInitComplete.Add(EstablishSunni)
  141. --------------------------------------------------------------
  142. -- Find Berlin player and found Christianity in their city, returning the city
  143.  
  144. function EstablishShia()
  145. if Game.GetElapsedGameTurns() == 0 then
  146.  
  147. function CreateShiaHolyCity(pCity, religion, pantheonBelief, founderBelief, followerBelief, followerBelief2, enhancerBelief)
  148. local iPlayer = pCity:GetOwner()
  149. local iReligion = GameInfoTypes[religion]
  150.  
  151. -- Optional extra beliefs
  152. local iBelief4 = followerBelief2 and GameInfoTypes[followerBelief2] or -1
  153. local iBelief5 = enhancerBelief and GameInfoTypes[enhancerBelief] or -1
  154.  
  155. Game.FoundPantheon(iPlayer, GameInfoTypes[pantheonBelief])
  156. Game.FoundReligion(iPlayer, iReligion, nil, GameInfoTypes[founderBelief], GameInfoTypes[followerBelief], -1, -1, pCity)
  157. Game.EnhanceReligion(iPlayer, iReligion, GameInfoTypes[followerBelief2], GameInfoTypes[enhancerBelief]);
  158. end
  159.  
  160. function FoundShia()
  161. for iPlayer=0, GameDefines.MAX_CIV_PLAYERS - 1 do
  162. local pPlayer = Players[iPlayer]
  163. if (pPlayer:IsEverAlive()) then
  164.  
  165. for pCity in pPlayer:Cities() do
  166.  
  167. -- City exists and has the proper name?
  168. if pCity ~= nil and pCity:GetName() == "Marrakech" then
  169.  
  170. CreateOrthodoxyHolyCity(pCity, "RELIGION_ZOROASTRIANISM", "BELIEF_SHIA_PANTHEON",
  171. "BELIEF_SHIA_FOUNDER", "BELIEF_SHIA_FOLLOWER_1", "BELIEF_SHIA_FOLLOWER_2", "BELIEF_SHIA_ENHANCER");
  172. print ("okay, Marrakech is the Shia Islamic holy city")
  173. return pCity
  174. end
  175. end
  176. end
  177. end
  178. end
  179.  
  180. local pShiaPlot = FoundShia():Plot()
  181.  
  182. end
  183. end
  184.  
  185. Events.SequenceGameInitComplete.Add(EstablishShia)
  186. --------------------------------------------------------------
  187. -- Find Berlin player and found Christianity in their city, returning the city
  188.  
  189. function EstablishJudaism()
  190. if Game.GetElapsedGameTurns() == 0 then
  191.  
  192. function CreateJudaismHolyCity(pCity, religion, pantheonBelief, founderBelief, followerBelief, followerBelief2, enhancerBelief)
  193. local iPlayer = pCity:GetOwner()
  194. local iReligion = GameInfoTypes[religion]
  195.  
  196. -- Optional extra beliefs
  197. local iBelief4 = followerBelief2 and GameInfoTypes[followerBelief2] or -1
  198. local iBelief5 = enhancerBelief and GameInfoTypes[enhancerBelief] or -1
  199.  
  200. Game.FoundPantheon(iPlayer, GameInfoTypes[pantheonBelief])
  201. Game.FoundReligion(iPlayer, iReligion, nil, GameInfoTypes[founderBelief], GameInfoTypes[followerBelief], -1, -1, pCity)
  202. Game.EnhanceReligion(iPlayer, iReligion, GameInfoTypes[followerBelief2], GameInfoTypes[enhancerBelief]);
  203. end
  204.  
  205. function FoundJudaism()
  206. for iPlayer=0, GameDefines.MAX_CIV_PLAYERS - 1 do
  207. local pPlayer = Players[iPlayer]
  208. if (pPlayer:IsEverAlive()) then
  209.  
  210. for pCity in pPlayer:Cities() do
  211.  
  212. -- City exists and has the proper name?
  213. if pCity ~= nil and pCity:GetName() == "Warsaw" then
  214.  
  215. CreateOrthodoxyHolyCity(pCity, "RELIGION_JUDAISM", "BELIEF_JEWISH_PANTHEON",
  216. "BELIEF_JEWISH_FOUNDER", "BELIEF_JEWISH_FOLLOWER_1", "BELIEF_JEWISH_FOLLOWER_2", "BELIEF_JEWISH_ENHANCER");
  217. print ("okay, Warsaw is the Jewish holy city")
  218. return pCity
  219. end
  220. end
  221. end
  222. end
  223. end
  224.  
  225. local pJudaismPlot = FoundJudaism():Plot()
  226.  
  227. end
  228. end
  229.  
  230. Events.SequenceGameInitComplete.Add(EstablishJudaism)
  231. --------------------------------------------------------------
  232. -- Find Berlin player and found Christianity in their city, returning the city
  233.  
  234. function EstablishDruidism()
  235. if Game.GetElapsedGameTurns() == 0 then
  236.  
  237. function CreateDruidismHolyCity(pCity, religion, pantheonBelief, founderBelief, followerBelief, followerBelief2, enhancerBelief)
  238. local iPlayer = pCity:GetOwner()
  239. local iReligion = GameInfoTypes[religion]
  240.  
  241. -- Optional extra beliefs
  242. local iBelief4 = followerBelief2 and GameInfoTypes[followerBelief2] or -1
  243. local iBelief5 = enhancerBelief and GameInfoTypes[enhancerBelief] or -1
  244.  
  245. Game.FoundPantheon(iPlayer, GameInfoTypes[pantheonBelief])
  246. Game.FoundReligion(iPlayer, iReligion, nil, GameInfoTypes[founderBelief], GameInfoTypes[followerBelief], -1, -1, pCity)
  247. Game.EnhanceReligion(iPlayer, iReligion, GameInfoTypes[followerBelief2], GameInfoTypes[enhancerBelief]);
  248. end
  249.  
  250. function FoundDruidism()
  251. for iPlayer=0, GameDefines.MAX_CIV_PLAYERS - 1 do
  252. local pPlayer = Players[iPlayer]
  253. if (pPlayer:IsEverAlive()) then
  254.  
  255. for pCity in pPlayer:Cities() do
  256.  
  257. -- City exists and has the proper name?
  258. if pCity ~= nil and pCity:GetName() == "Edinburgh" then
  259.  
  260. CreateOrthodoxyHolyCity(pCity, "RELIGION_BUDDHISM", "BELIEF_DRUIDISM_PANTHEON",
  261. "BELIEF_DRUIDISM_FOUNDER", "BELIEF_DRUIDISM_FOLLOWER_1", "BELIEF_DRUIDISM_FOLLOWER_2", "BELIEF_DRUIDISM_ENHANCER");
  262. print ("okay, Edinburgh is Druidic holy city")
  263. return pCity
  264. end
  265. end
  266. end
  267. end
  268. end
  269.  
  270. local pDruidismPlot = FoundDruidism():Plot()
  271.  
  272. end
  273. end
  274.  
  275. Events.SequenceGameInitComplete.Add(EstablishDruidism)
  276. --------------------------------------------------------------
  277. -- Find Berlin player and found Christianity in their city, returning the city
  278.  
  279. function EstablishPaganism()
  280. if Game.GetElapsedGameTurns() == 0 then
  281.  
  282. function CreatePaganismHolyCity(pCity, religion, pantheonBelief, founderBelief, followerBelief, followerBelief2, enhancerBelief)
  283. local iPlayer = pCity:GetOwner()
  284. local iReligion = GameInfoTypes[religion]
  285.  
  286. -- Optional extra beliefs
  287. local iBelief4 = followerBelief2 and GameInfoTypes[followerBelief2] or -1
  288. local iBelief5 = enhancerBelief and GameInfoTypes[enhancerBelief] or -1
  289.  
  290. Game.FoundPantheon(iPlayer, GameInfoTypes[pantheonBelief])
  291. Game.FoundReligion(iPlayer, iReligion, nil, GameInfoTypes[founderBelief], GameInfoTypes[followerBelief], -1, -1, pCity)
  292. Game.EnhanceReligion(iPlayer, iReligion, GameInfoTypes[followerBelief2], GameInfoTypes[enhancerBelief]);
  293. end
  294.  
  295. function FoundPaganism()
  296. for iPlayer=0, GameDefines.MAX_CIV_PLAYERS - 1 do
  297. local pPlayer = Players[iPlayer]
  298. if (pPlayer:IsEverAlive()) then
  299.  
  300. for pCity in pPlayer:Cities() do
  301.  
  302. -- City exists and has the proper name?
  303. if pCity ~= nil and pCity:GetName() == "Moscow" then
  304.  
  305. CreateOrthodoxyHolyCity(pCity, "RELIGION_CONFUCIANISM", "BELIEF_PAGAN_PANTHEON",
  306. "BELIEF_PAGAN_FOUNDER", "BELIEF_PAGAN_FOLLOWER_1", "BELIEF_PAGAN_FOLLOWER_2", "BELIEF_PAGAN_ENHANCER");
  307. print ("okay, Moscow is Pagan holy city")
  308. return pCity
  309. end
  310. end
  311. end
  312. end
  313. end
  314.  
  315. local pPaganismPlot = FoundPaganism():Plot()
  316.  
  317. end
  318. end
  319.  
  320. Events.SequenceGameInitComplete.Add(EstablishPaganism)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement