def foundMinorCities(self, iGameTurn): for i in range(len(tMinorCities)): iYear, tPlot, iPlayer, sName, iPopulation, iUnitType, iNumUnits = tMinorCities[ i] if iGameTurn < getTurnForYear(iYear): return if iGameTurn > getTurnForYear(iYear) + 10: continue if data.lMinorCityFounded[i]: continue x, y = tPlot plot = gc.getMap().plot(x, y) if plot.isCity(): continue # special cases if not self.canFoundCity(sName): continue lReligions = [] bForceSpawn = False if sName == 'Kyiv': lReligions = [iOrthodoxy, iCatholicism] if iPlayer == iCeltia and utils.getScenario() != i3000BC: iPlayer = iIndependent if sName == 'Buda': bForceSpawn = True if not self.isFreePlot(tPlot, bForceSpawn): continue utils.evacuate(tPlot) if self.foundCity(iPlayer, tPlot, sName, iPopulation, iUnitType, iNumUnits, lReligions): data.lMinorCityFounded[i] = True
def foundMinorCities(self, iGameTurn): for i in range(len(tMinorCities)): iYear, tPlot, iPlayer, sName, iPopulation, iUnitType, iNumUnits = tMinorCities[ i] if iGameTurn < getTurnForYear(iYear): return if iGameTurn > getTurnForYear(iYear) + 10: continue if data.lMinorCityFounded[i]: continue x, y = tPlot plot = gc.getMap().plot(x, y) if plot.isCity(): continue # special cases if not self.canFoundCity(sName): continue lReligions = [] bForceSpawn = True if sName == 'Kyiv': lReligions = [iOrthodoxy] if sName == 'Dvin': lReligions = [iOrthodoxy] if sName == 'Kilwa': lReligions = [iIslam] if sName == 'Vatapi': lReligions = [iIslam] if iPlayer == iCeltia and utils.getHumanID() == iCeltia: continue if iPlayer == iCeltia: iPlayer = iIndependent if sName in ['Vatapi', 'Dvin', 'Buda', 'Tucume', 'Chan Chan']: bForceSpawn = True if sName in ['Muqdisho', 'Bahrein']: lReligions = [iIslam] if not self.isFreePlot(tPlot, bForceSpawn): continue utils.evacuate(iPlayer, tPlot) if self.foundCity(iPlayer, tPlot, sName, iPopulation, iUnitType, iNumUnits, lReligions): data.lMinorCityFounded[i] = True