def foundColony(self, iPlayer, tPlot): x, y = tPlot plot = gc.getMap().plot(x, y) if plot.isOwned(): utils.convertPlotCulture(plot, iPlayer, 100, True) if utils.getHumanID() == iPlayer: utils.makeUnit(iSettler, iPlayer, tPlot, 1) else: gc.getPlayer(iPlayer).found(x, y) utils.createGarrisons(tPlot, iPlayer, 2)
def tradingCompanyCulture(self, city, iCiv, iPreviousOwner): tCity = (city.getX(), city.getY()) x, y = tCity for (i, j) in utils.surroundingPlots(tCity): pPlot = gc.getMap().plot(i, j) if (i, j) == tCity: utils.convertPlotCulture(pPlot, iCiv, 51, False) elif pPlot.isCity(): pass elif utils.calculateDistance(i, j, x, y) == 1: utils.convertPlotCulture(pPlot, iCiv, 65, True) else: if pPlot.getOwner() == iPreviousOwner: utils.convertPlotCulture(pPlot, iCiv, 15, False)
def ottomanUP(self, city, iCiv, iPreviousOwner): tPlot = (city.getX(), city.getY()) x, y = tPlot for (i, j) in utils.surroundingPlots(tPlot, 2): pPlot = gc.getMap().plot(i, j) if (i, j) == tPlot: utils.convertPlotCulture(pPlot, iCiv, 51, False) elif pPlot.isCity(): pass elif utils.calculateDistance(i, j, x, y) == 1: utils.convertPlotCulture(pPlot, iCiv, 80, True) else: if pPlot.getOwner() == iPreviousOwner: utils.convertPlotCulture(pPlot, iCiv, 20, False)
def tradingCompanyCulture(self, city, iCiv, iPreviousOwner): tCity = (city.getX(), city.getY()) x, y = tCity for (i, j) in utils.surroundingPlots(tCity): pPlot = gc.getMap().plot(i, j) if (i, j) == tCity: utils.convertPlotCulture(pPlot, iCiv, 51, False) elif pPlot.isCity(): pass elif utils.calculateDistance(i, j, x ,y) == 1: utils.convertPlotCulture(pPlot, iCiv, 65, True) else: if pPlot.getOwner() == iPreviousOwner: utils.convertPlotCulture(pPlot, iCiv, 15, False)
def turkishUP(self, city, iCiv, iPreviousOwner): tPlot = (city.getX(), city.getY()) x, y = tPlot for (i, j) in utils.surroundingPlots(tPlot, 2): pPlot = gc.getMap().plot(i, j) if (i, j) == tPlot: utils.convertPlotCulture(pPlot, iCiv, 51, False) elif pPlot.isCity(): pass elif utils.calculateDistance(i, j, x ,y) == 1: utils.convertPlotCulture(pPlot, iCiv, 80, True) else: if pPlot.getOwner() == iPreviousOwner: utils.convertPlotCulture(pPlot, iCiv, 20, False)