[SPOILER]#the AI automatically satisfies the condition
def aiColonySpawn():
pNewYork = cyMap.plot(30, 48)
pPhiladelphia = cyMap.plot(28, 47)
pBoston = cyMap.plot(31, 49)
if isDate(1500):
#Arabs
if not gc.getTeam(11).isHuman:
if gc.getPlayer(11).isAlive():
PyPlayer(11).initUnit(4, 99, 27, 1)
PyPlayer(11).initUnit(5, 99, 27, 2)
PyPlayer(11).initUnit(42, 99, 27, 5)
PyPlayer(11).initUnit(4, 104, 27, 1)
PyPlayer(11).initUnit(5, 104, 27, 2)
PyPlayer(11).initUnit(42, 104, 27, 5)
PyPlayer(11).initUnit(4, 71, 25, 1)
PyPlayer(11).initUnit(5, 71, 25, 2)
PyPlayer(11).initUnit(42, 71, 25, 5)
if gc.getPlayer(11).getStateReligion() == 0:
PyPlayer(11).initUnit(17, 99, 27, 1)
PyPlayer(11).initUnit(17, 104, 27, 1)
PyPlayer(11).initUnit(17, 71, 25, 1)
if gc.getPlayer(11).getStateReligion() == 1:
PyPlayer(11).initUnit(18, 99, 27, 1)
PyPlayer(11).initUnit(18, 104, 27, 1)
PyPlayer(11).initUnit(18, 71, 25, 1)
if gc.getPlayer(11).getStateReligion() == 2:
PyPlayer(11).initUnit(19, 99, 27, 1)
PyPlayer(11).initUnit(19, 104, 27, 1)
PyPlayer(11).initUnit(19, 71, 25, 1)
if gc.getPlayer(11).getStateReligion() == 3:
PyPlayer(11).initUnit(20, 99, 27, 1)
PyPlayer(11).initUnit(20, 104, 27, 1)
PyPlayer(11).initUnit(20, 71, 25, 1)
if gc.getPlayer(11).getStateReligion() == 4:
PyPlayer(11).initUnit(21, 99, 27, 1)
PyPlayer(11).initUnit(21, 104, 27, 1)
PyPlayer(11).initUnit(21, 71, 25, 1)
if gc.getPlayer(11).getStateReligion() == 5:
PyPlayer(11).initUnit(22, 99, 27, 1)
PyPlayer(11).initUnit(22, 104, 27, 1)
PyPlayer(11).initUnit(22, 71, 25, 1)
if gc.getPlayer(11).getStateReligion() == 6:
PyPlayer(11).initUnit(23, 99, 27, 1)
PyPlayer(11).initUnit(23, 104, 27, 1)
PyPlayer(11).initUnit(23, 71, 25, 1)
#English
if not gc.getTeam(12).isHuman:
if PyPlayer(12).isAlive():
for tCoords in getAdjacentList((30, 48)):
x, y = tCoords
pCurrentPlot = cyMap.plot(x, y)
if pCurrentPlot.isCity():
pCity = pCurrentPlot.getPlotCity()
pCity.kill()
for tCoords in getAdjacentList((28, 47)):
x, y = tCoords
pCurrentPlot = cyMap.plot(x, y)
if pCurrentPlot.isCity():
pCity = pCurrentPlot.getPlotCity()
pCity.kill()
for tCoords in getAdjacentList((31, 49)):
x, y = tCoords
pCurrentPlot = cyMap.plot(x, y)
if pCurrentPlot.isCity():
pCity = pCurrentPlot.getPlotCity()
pCity.kill()
PyPlayer(12).initCity(30, 48)
pNewYork.getPlotCity().setName("New York", 1)
PyPlayer(12).initUnit(5, 30, 48, 2)
PyPlayer(12).initUnit(47, 30, 48, 5)
PyPlayer(12).initCity(28, 47)
pPhiladelphia.getPlotCity().setName("Philadelphia", 1)
PyPlayer(12).initUnit(5, 28, 47, 2)
PyPlayer(12).initUnit(47, 28, 47, 5)
PyPlayer(12).initCity(31, 49)
pBoston.getPlotCity().setName("Boston", 1)
PyPlayer(12).initUnit(5, 31, 49, 2)
PyPlayer(12).initUnit(47, 31, 49, 5)
PyPlayer(12).initUnit(4, 25, 52, 1)
PyPlayer(12).initUnit(5, 25, 52, 2)
PyPlayer(12).initUnit(47, 25, 52, 5)
PyPlayer(12).initUnit(4, 64, 12, 1)
PyPlayer(12).initUnit(5, 64, 12, 2)
PyPlayer(12).initUnit(47, 64, 12, 5)
PyPlayer(12).initUnit(4, 118, 13, 1)
PyPlayer(12).initUnit(5, 118, 13, 2)
PyPlayer(12).initUnit(47, 118, 13, 5)
if gc.getPlayer(12).getStateReligion() == 0:
PyPlayer(12).initUnit(17, 30, 48, 1)
PyPlayer(12).initUnit(17, 28, 47, 1)
PyPlayer(12).initUnit(17, 31, 49, 1)
PyPlayer(12).initUnit(17, 28, 51, 1)
PyPlayer(12).initUnit(17, 64, 12, 1)
PyPlayer(12).initUnit(17, 118, 13, 1)
if gc.getPlayer(12).getStateReligion() == 1:
PyPlayer(12).initUnit(18, 30, 48, 1)
PyPlayer(12).initUnit(18, 28, 47, 1)
PyPlayer(12).initUnit(18, 31, 49, 1)
PyPlayer(12).initUnit(18, 28, 51, 1)
PyPlayer(12).initUnit(18, 64, 12, 1)
PyPlayer(12).initUnit(18, 118, 13, 1)
if gc.getPlayer(12).getStateReligion() == 2:
PyPlayer(12).initUnit(19, 30, 48, 1)
PyPlayer(12).initUnit(19, 28, 47, 1)
PyPlayer(12).initUnit(19, 31, 49, 1)
PyPlayer(12).initUnit(19, 28, 51, 1)
PyPlayer(12).initUnit(19, 64, 12, 1)
PyPlayer(12).initUnit(19, 118, 13, 1)
if gc.getPlayer(12).getStateReligion() == 3:
PyPlayer(12).initUnit(20, 30, 48, 1)
PyPlayer(12).initUnit(20, 28, 47, 1)
PyPlayer(12).initUnit(20, 31, 49, 1)
PyPlayer(12).initUnit(20, 28, 51, 1)
PyPlayer(12).initUnit(20, 64, 12, 1)
PyPlayer(12).initUnit(20, 118, 13, 1)
if gc.getPlayer(12).getStateReligion() == 4:
PyPlayer(12).initUnit(21, 30, 48, 1)
PyPlayer(12).initUnit(21, 28, 47, 1)
PyPlayer(12).initUnit(21, 31, 49, 1)
PyPlayer(12).initUnit(21, 28, 51, 1)
PyPlayer(12).initUnit(21, 64, 12, 1)
PyPlayer(12).initUnit(21, 118, 13, 1)
if gc.getPlayer(12).getStateReligion() == 5:
PyPlayer(12).initUnit(22, 30, 48, 1)
PyPlayer(12).initUnit(22, 28, 47, 1)
PyPlayer(12).initUnit(22, 31, 49, 1)
PyPlayer(12).initUnit(22, 28, 51, 1)
PyPlayer(12).initUnit(22, 64, 12, 1)
PyPlayer(12).initUnit(22, 118, 13, 1)
if gc.getPlayer(12).getStateReligion() == 6:
PyPlayer(12).initUnit(23, 30, 48, 1)
PyPlayer(12).initUnit(23, 28, 47, 1)
PyPlayer(12).initUnit(23, 31, 49, 1)
PyPlayer(12).initUnit(23, 28, 51, 1)
PyPlayer(12).initUnit(23, 64, 12, 1)
PyPlayer(12).initUnit(23, 118, 13, 1)
#Celts get the colonies if they meet the requirements and England is dead
if not gc.getTeam(0).isHuman:
if PyPlayer(0).isAlive():
if not PyPlayer(12).isAlive():
for tCoords in getAdjacentList((30, 48)):
x, y = tCoords
pCurrentPlot = cyMap.plot(x, y)
if pCurrentPlot.isCity():
pCity = pCurrentPlot.getPlotCity()
pCity.kill()
for tCoords in getAdjacentList((28, 47)):
x, y = tCoords
pCurrentPlot = cyMap.plot(x, y)
if pCurrentPlot.isCity():
pCity = pCurrentPlot.getPlotCity()
pCity.kill()
for tCoords in getAdjacentList((31, 49)):
x, y = tCoords
pCurrentPlot = cyMap.plot(x, y)
if pCurrentPlot.isCity():
pCity = pCurrentPlot.getPlotCity()
pCity.kill()
PyPlayer(0).initCity(30, 48)
pNewYork.getPlotCity().setName("New York", 1)
PyPlayer(0).initUnit(5, 30, 48, 2)
PyPlayer(0).initunit(42, 30, 48, 5)
PyPlayer(0).initCity(28, 47)
pPhiladelphia.getPlotCity().setName("Philadelphia", 1)
PyPlayer(0).initUnit(5, 28, 47, 2)
PyPlayer(0).initunit(42, 28, 47, 5)
PyPlayer(0).initCity(31, 49)
pBoston.getPlotCity().setName("Boston", 1)
PyPlayer(0).initUnit(5, 31, 49, 2)
PyPlayer(0).initunit(42, 31, 49, 5)
PyPlayer(0).initUnit(4, 25, 52, 1)
PyPlayer(0).initUnit(5, 25, 52, 2)
PyPlayer(0).initunit(42, 25, 52, 5)
PyPlayer(0).initUnit(4, 64, 12, 1)
PyPlayer(0).initUnit(5, 64, 12, 2)
PyPlayer(0).initunit(42, 64, 12, 5)
PyPlayer(0).initUnit(4, 118, 13, 1)
PyPlayer(0).initUnit(5, 118, 13, 2)
PyPlayer(0).initunit(42, 118, 13, 5)
if gc.getPlayer(0).getStateReligion() == 0:
PyPlayer(0).initUnit(17, 30, 48, 1)
PyPlayer(0).initUnit(17, 28, 47, 1)
PyPlayer(0).initUnit(17, 31, 49, 1)
PyPlayer(0).initUnit(17, 28, 51, 1)
PyPlayer(0).initUnit(17, 64, 12, 1)
PyPlayer(0).initUnit(17, 118, 13, 1)
if gc.getPlayer(0).getStateReligion() == 1:
PyPlayer(0).initUnit(18, 30, 48, 1)
PyPlayer(0).initUnit(18, 28, 47, 1)
PyPlayer(0).initUnit(18, 31, 49, 1)
PyPlayer(0).initUnit(18, 28, 51, 1)
PyPlayer(0).initUnit(18, 64, 12, 1)
PyPlayer(0).initUnit(18, 118, 13, 1)
if gc.getPlayer(0).getStateReligion() == 2:
PyPlayer(0).initUnit(19, 30, 48, 1)
PyPlayer(0).initUnit(19, 28, 47, 1)
PyPlayer(0).initUnit(19, 31, 49, 1)
PyPlayer(0).initUnit(19, 28, 51, 1)
PyPlayer(0).initUnit(19, 64, 12, 1)
PyPlayer(0).initUnit(19, 118, 13, 1)
if gc.getPlayer(0).getStateReligion() == 3:
PyPlayer(0).initUnit(20, 30, 48, 1)
PyPlayer(0).initUnit(20, 28, 47, 1)
PyPlayer(0).initUnit(20, 31, 49, 1)
PyPlayer(0).initUnit(20, 28, 51, 1)
PyPlayer(0).initUnit(20, 64, 12, 1)
PyPlayer(0).initUnit(20, 118, 13, 1)
if gc.getPlayer(0).getStateReligion() == 4:
PyPlayer(0).initUnit(21, 30, 48, 1)
PyPlayer(0).initUnit(21, 28, 47, 1)
PyPlayer(0).initUnit(21, 31, 49, 1)
PyPlayer(0).initUnit(21, 28, 51, 1)
PyPlayer(0).initUnit(21, 64, 12, 1)
PyPlayer(0).initUnit(21, 118, 13, 1)
if gc.getPlayer(0).getStateReligion() == 5:
PyPlayer(0).initUnit(22, 30, 48, 1)
PyPlayer(0).initUnit(22, 28, 47, 1)
PyPlayer(0).initUnit(22, 31, 49, 1)
PyPlayer(0).initUnit(22, 28, 51, 1)
PyPlayer(0).initUnit(22, 64, 12, 1)
PyPlayer(0).initUnit(22, 118, 13, 1)
if gc.getPlayer(0).getStateReligion() == 6:
PyPlayer(0).initUnit(23, 30, 48, 1)
PyPlayer(0).initUnit(23, 28, 47, 1)
PyPlayer(0).initUnit(23, 31, 49, 1)
PyPlayer(0).initUnit(23, 28, 51, 1)
PyPlayer(0).initUnit(23, 64, 12, 1)
PyPlayer(0).initUnit(23, 118, 13, 1)
#French
if not gc.getTeam(13).isHuman:
if gc.getPlayer(13).isAlive():
PyPlayer(13).initUnit(4, 30, 37, 1)
PyPlayer(13).initUnit(5, 30, 37, 2)
PyPlayer(13).initUnit(43, 30, 37, 5)
PyPlayer(13).initUnit(4, 31, 53, 1)
PyPlayer(13).initUnit(5, 31, 53, 2)
PyPlayer(13).initUnit(43, 31, 53, 5)
PyPlayer(13).initUnit(4, 33, 32, 1)
PyPlayer(13).initUnit(5, 33, 32, 2)
PyPlayer(13).initUnit(43, 33, 32, 5)
PyPlayer(13).initUnit(4, 57, 27, 1)
PyPlayer(13).initUnit(5, 57, 27, 2)
PyPlayer(13).initUnit(43, 57, 27, 5)
if gc.getPlayer(13).getStateReligion() == 0:
PyPlayer(13).initUnit(17, 30, 37, 1)
PyPlayer(13).initUnit(17, 31, 53, 1)
PyPlayer(13).initUnit(17, 33, 32, 1)
PyPlayer(13).initUnit(17, 57, 27, 1)
if gc.getPlayer(13).getStateReligion() == 1:
PyPlayer(13).initUnit(18, 30, 37, 1)
PyPlayer(13).initUnit(18, 31, 53, 1)
PyPlayer(13).initUnit(18, 33, 32, 1)
PyPlayer(13).initUnit(17, 57, 27, 1)
if gc.getPlayer(13).getStateReligion() == 2:
PyPlayer(13).initUnit(19, 30, 37, 1)
PyPlayer(13).initUnit(19, 31, 53, 1)
PyPlayer(13).initUnit(19, 33, 32, 1)
PyPlayer(13).initUnit(17, 57, 27, 1)
if gc.getPlayer(13).getStateReligion() == 3:
PyPlayer(13).initUnit(20, 30, 37, 1)
PyPlayer(13).initUnit(20, 31, 53, 1)
PyPlayer(13).initUnit(20, 33, 32, 1)
PyPlayer(13).initUnit(17, 57, 27, 1)
if gc.getPlayer(13).getStateReligion() == 4:
PyPlayer(13).initUnit(21, 30, 37, 1)
PyPlayer(13).initUnit(21, 31, 53, 1)
PyPlayer(13).initUnit(21, 33, 32, 1)
PyPlayer(13).initUnit(17, 57, 27, 1)
if gc.getPlayer(13).getStateReligion() == 5:
PyPlayer(13).initUnit(22, 30, 37, 1)
PyPlayer(13).initUnit(22, 31, 53, 1)
PyPlayer(13).initUnit(22, 33, 32, 1)
PyPlayer(13).initUnit(17, 57, 27, 1)
if gc.getPlayer(13).getStateReligion() == 6:
PyPlayer(13).initUnit(23, 30, 37, 1)
PyPlayer(13).initUnit(23, 31, 53, 1)
PyPlayer(13).initUnit(23, 33, 32, 1)
PyPlayer(13).initUnit(17, 57, 27, 1)
for tCoords in getPlotList((48, 25), (61, 39)):
x, y = tCoords
pCurrentPlot = cyMap.plot(x,y)
pPotentialCity = pCurrentPlot.getPlotCity()
iUnhappy = pPotentialCity.unhappyLevel(0)
if pPotentialCity != None:
iHappy = pPotentialCity.happyLevel()
if iUnhappy * 4 >= iHappy:
pCurrentPlot.setOwner(13)
#Spanish
if not gc.getTeam(14).isHuman:
if gc.getPlayer(14).isAlive():
PyPlayer(14).initUnit(4, 27, 38, 1)
PyPlayer(14).initUnit(5, 27, 38, 2)
PyPlayer(14).initUnit(42, 27, 38, 5)
PyPlayer(14).initUnit(4, 17, 38, 1)
PyPlayer(14).initUnit(5, 17, 38, 2)
PyPlayer(14).initUnit(42, 17, 38, 5)
PyPlayer(14).initUnit(4, 41, 18, 1)
PyPlayer(14).initUnit(5, 41, 18, 2)
PyPlayer(14).initUnit(42, 41, 18, 5)
PyPlayer(14).initUnit(4, 35, 12, 1)
PyPlayer(14).initUnit(5, 35, 12, 2)
PyPlayer(14).initUnit(42, 35, 12, 5)
if gc.getPlayer(14).getStateReligion() == 0:
PyPlayer(14).initUnit(17, 27, 38, 1)
PyPlayer(14).initUnit(17, 17, 38, 1)
PyPlayer(14).initUnit(17, 41, 18, 1)
PyPlayer(14).initUnit(17, 35, 12, 1)
if gc.getPlayer(14).getStateReligion() == 1:
PyPlayer(14).initUnit(18, 27, 38, 1)
PyPlayer(14).initUnit(18, 17, 38, 1)
PyPlayer(14).initUnit(18, 41, 18, 1)
PyPlayer(14).initUnit(17, 35, 12, 1)
if gc.getPlayer(14).getStateReligion() == 2:
PyPlayer(14).initUnit(19, 27, 38, 1)
PyPlayer(14).initUnit(19, 17, 38, 1)
PyPlayer(14).initUnit(19, 41, 18, 1)
PyPlayer(14).initUnit(17, 35, 12, 1)
if gc.getPlayer(14).getStateReligion() == 3:
PyPlayer(14).initUnit(20, 27, 38, 1)
PyPlayer(14).initUnit(20, 17, 38, 1)
PyPlayer(14).initUnit(20, 41, 18, 1)
PyPlayer(14).initUnit(17, 35, 12, 1)
if gc.getPlayer(14).getStateReligion() == 4:
PyPlayer(14).initUnit(21, 27, 38, 1)
PyPlayer(14).initUnit(21, 17, 38, 1)
PyPlayer(14).initUnit(21, 41, 18, 1)
PyPlayer(14).initUnit(17, 35, 12, 1)
if gc.getPlayer(14).getStateReligion() == 5:
PyPlayer(14).initUnit(22, 27, 38, 1)
PyPlayer(14).initUnit(22, 17, 38, 1)
PyPlayer(14).initUnit(22, 41, 18, 1)
PyPlayer(14).initUnit(17, 35, 12, 1)
if gc.getPlayer(14).getStateReligion() == 6:
PyPlayer(14).initUnit(23, 27, 38, 1)
PyPlayer(14).initUnit(23, 17, 38, 1)
PyPlayer(14).initUnit(23, 41, 18, 1)
PyPlayer(14).initUnit(17, 35, 12, 1)
#Russia
if not gc.getTeam(16).isHuman:
for tCoords in getPlotList((66, 48), (1, 64)):
x, y = tCoords
pCurrentPlot = cyMap.plot(x,y)
pPotentialCity = pCurrentPlot.getPlotCity()
iUnhappy = pPotentialCity.unhappyLevel(0)
if pPotentialCity != None:
iHappy = pPotentialCity.happyLevel()
if iUnhappy * 4 >= iHappy:
pCurrentPlot.setOwner(16)
PyPlayer(16).initUnit(4, 110, 52, 1)
PyPlayer(16).initUnit(5, 110, 52, 2)
PyPlayer(16).initUnit(42, 110, 52, 5)
PyPlayer(16).initUnit(4, 80, 53, 1)
PyPlayer(16).initUnit(5, 80, 53, 2)
PyPlayer(16).initUnit(42, 80, 53, 5)
PyPlayer(16).initUnit(4, 96, 58, 1)
PyPlayer(16).initUnit(5, 96, 58, 2)
PyPlayer(16).initUnit(42, 96, 58, 5)
if gc.getPlayer(16).getStateReligion() == 0:
PyPlayer(16).initUnit(17, 110, 52, 1)
PyPlayer(16).initUnit(17, 80, 53, 1)
PyPlayer(16).initUnit(17, 96, 58, 1)
if gc.getPlayer(16).getStateReligion() == 1:
PyPlayer(16).initUnit(18, 110, 52, 1)
PyPlayer(16).initUnit(18, 80, 53, 1)
PyPlayer(16).initUnit(18, 96, 58, 1)
if gc.getPlayer(16).getStateReligion() == 2:
PyPlayer(16).initUnit(19, 110, 52, 1)
PyPlayer(16).initUnit(19, 80, 53, 1)
PyPlayer(16).initUnit(19, 96, 58, 1)
if gc.getPlayer(16).getStateReligion() == 3:
PyPlayer(16).initUnit(20, 110, 52, 1)
PyPlayer(16).initUnit(20, 80, 53, 1)
PyPlayer(16).initUnit(20, 96, 58, 1)
if gc.getPlayer(16).getStateReligion() == 4:
PyPlayer(16).initUnit(21, 110, 52, 1)
PyPlayer(16).initUnit(21, 80, 53, 1)
PyPlayer(16).initUnit(21, 96, 58, 1)
if gc.getPlayer(16).getStateReligion() == 5:
PyPlayer(16).initUnit(22, 110, 52, 1)
PyPlayer(16).initUnit(22, 80, 53, 1)
PyPlayer(16).initUnit(22, 96, 58, 1)
if gc.getPlayer(16).getStateReligion() == 6:
PyPlayer(16).initUnit(23, 110, 52, 1)
PyPlayer(16).initUnit(23, 80, 53, 1)
PyPlayer(16).initUnit(23, 96, 58, 1)[/SPOILER]