コード例 #1
0
	def checkTurn(self, iGameTurn):
		#self.decay(iIndia) #debug
		if utils.isYearIn(-2250, -680):
			i = (iGameTurn + data.iSeed/10 - 5) % len(tPool1)
			iCiv = tPool1[i]
			self.canDecay(iGameTurn, iCiv)
		elif utils.isYearIn(-680, 410): # edead: RFCM
			i = (iGameTurn + data.iSeed/10 - 5) % len(tPool2)
			iCiv = tPool2[i]
			self.canDecay(iGameTurn, iCiv)
		else:
			i = (iGameTurn + data.iSeed/10 - 5) % len(tPool3)
			j = ((iGameTurn + data.iSeed/10 - 5)+13) % len(tPool3)
			iCiv1 = tPool3[i]
			iCiv2 = tPool3[j]
			self.canDecay(iGameTurn, iCiv1)
			self.canDecay(iGameTurn, iCiv2)
コード例 #2
0
 def checkTurn(self, iGameTurn):
     #self.decay(iIndia) #debug
     if utils.isYearIn(-2250, -680):
         i = (iGameTurn + data.iSeed / 10 - 5) % len(tPool1)
         iCiv = tPool1[i]
         self.canDecay(iGameTurn, iCiv)
     elif utils.isYearIn(-680, 410):  # edead: RFCM
         i = (iGameTurn + data.iSeed / 10 - 5) % len(tPool2)
         iCiv = tPool2[i]
         self.canDecay(iGameTurn, iCiv)
     else:
         i = (iGameTurn + data.iSeed / 10 - 5) % len(tPool3)
         j = ((iGameTurn + data.iSeed / 10 - 5) + 13) % len(tPool3)
         iCiv1 = tPool3[i]
         iCiv2 = tPool3[j]
         self.canDecay(iGameTurn, iCiv1)
         self.canDecay(iGameTurn, iCiv2)
コード例 #3
0
    def checkTurn(self, iGameTurn):

        #handicap level modifier
        iHandicap = gc.getHandicapInfo(
            gc.getGame().getHandicapType()).getBarbarianSpawnModifier()

        # Leoreth: buff certain cities if independent / barbarian (imported from SoI)
        if iGameTurn % 20 == 10:
            for tMinorState in tMinorStates:
                iStartYear, iEndYear, tPlot, lUnitList = tMinorState
                if utils.isYearIn(iStartYear, iEndYear):
                    x, y = tPlot
                    plot = gc.getMap().plot(x, y)
                    iOwner = plot.getOwner()
                    if plot.isCity(
                    ) and plot.getNumUnits() < 4 and iOwner >= iNumPlayers:
                        iUnit = utils.getRandomEntry(lUnitList)
                        utils.makeUnit(iUnit, iOwner, tPlot, 1)

        if utils.isYearIn(-3000, -850):
            if iHandicap >= 0:
                self.checkSpawn(iBarbarian, iWarrior, 1, (76, 46), (99, 53),
                                self.spawnMinors, iGameTurn, 5, 0)

            self.checkSpawn(iBarbarian, iWolf, 1, (75, 54), (104, 64),
                            self.spawnNatives, iGameTurn, 5, 2)
            self.checkSpawn(iBarbarian, iBear, 1, (75, 54), (104, 64),
                            self.spawnNatives, iGameTurn, 5, 4)
            self.checkLimitedSpawn(iBarbarian, iLion, 1, 5, (55, 10), (72, 29),
                                   self.spawnNatives, iGameTurn, 5, 1)
            self.checkLimitedSpawn(iBarbarian, iPanther, 1, 5, (55, 10),
                                   (72, 29), self.spawnNatives, iGameTurn, 5,
                                   3)

        #celts
        if utils.isYearIn(-650, -110):
            self.checkSpawn(iCeltia, iGallicWarrior, 1, (49, 46), (65, 52),
                            self.spawnMinors, iGameTurn, 6, 0)
            if iHandicap >= 0:
                self.checkSpawn(iCeltia, iAxeman, 1, (49, 46), (65, 52),
                                self.spawnMinors, iGameTurn, 8, 5,
                                ["TXT_KEY_ADJECTIVE_GAUL"])

        #norse
        if utils.isYearIn(-650, 550):
            self.checkSpawn(iBarbarian, iGalley, 1, (50, 49), (61, 55),
                            self.spawnPirates, iGameTurn, 20, 0,
                            ["TXT_KEY_ADJECTIVE_NORSE"])

        #mongolia
        if utils.isYearIn(-210, 300):
            self.checkSpawn(iBarbarian, iHorseman, 3 + iHandicap, (94, 48),
                            (107, 54), self.spawnNomads, iGameTurn,
                            8 - iHandicap, 0, ["TXT_KEY_ADJECTIVE_XIONGNU"])
        elif utils.isYearIn(300, 900):
            iNumUnits = 2 + iHandicap
            self.checkSpawn(
                iBarbarian, iHorseArcher, iNumUnits, (91, 50), (107, 54),
                self.spawnNomads, iGameTurn, 7 - iHandicap, 0,
                ["TXT_KEY_ADJECTIVE_GOKTURK", "TXT_KEY_ADJECTIVE_UIGHUR"])
        elif utils.isYearIn(900, 1100):
            iNumUnits = 1 + iHandicap
            self.checkSpawn(
                iBarbarian, iKeshik, iNumUnits, (94, 48), (107, 54),
                self.spawnInvaders, iGameTurn, 6, 0,
                ["TXT_KEY_ADJECTIVE_JURCHEN", "TXT_KEY_ADJECTIVE_KHITAN"])

        #tibet
        if utils.isYearIn(-350, 200):
            self.checkSpawn(iBarbarian, iLightSwordsman, 1 + iHandicap,
                            (92, 41), (99, 45), self.spawnMinors, iGameTurn,
                            10 - iHandicap, 3, ["TXT_KEY_ADJECTIVE_TIBETAN"])
        elif utils.isYearIn(200, 1100):
            self.checkSpawn(iBarbarian, iSwordsman, 1 + iHandicap, (92, 41),
                            (99, 45), self.spawnMinors, iGameTurn,
                            10 - iHandicap, 3, ["TXT_KEY_ADJECTIVE_TIBETAN"])

        # Deccan barbarians
        if utils.isYearIn(-1000, 1200):
            iUnit = iArcher
            iStrength = iHandicap
            if iGameTurn >= getTurnForYear(-500): iUnit = iAxeman
            if iGameTurn >= getTurnForYear(0): iStrength += 1
            if iGameTurn >= getTurnForYear(200): iUnit = iSwordsman

            self.checkSpawn(iBarbarian, iUnit, iStrength, (87, 23), (96, 37),
                            self.spawnInvaders, iGameTurn, 8 - iHandicap, 0,
                            ["Hindi"])

        # elephants in india pre-khmer
        if utils.isYearIn(-210, 700):
            self.checkSpawn(iBarbarian, iWarElephant, 1, (86, 31), (100, 41),
                            self.spawnInvaders, iGameTurn, 8 - iHandicap, 4)

        #Indo-Scythians
        if utils.isYearIn(-200, 400):
            self.checkSpawn(iBarbarian, iHorseman, 2, (84, 40), (89, 43),
                            self.spawnNomads, iGameTurn, 8 - iHandicap, 4,
                            ["TXT_KEY_ADJECTIVE_INDO_SCYTHIAN"])

        #Kushana
        if utils.isYearIn(30, 220):
            self.checkSpawn(iBarbarian, iAsvaka, 3 + iHandicap, (84, 40),
                            (89, 43), self.spawnInvaders, iGameTurn, 8, 3,
                            ["TXT_KEY_ADJECTIVE_KUSHANA"])

        #Hephtalites
        if utils.isYearIn(400, 550):
            self.checkSpawn(iBarbarian, iHorseArcher, 2 + iHandicap, (84, 40),
                            (89, 43), self.spawnInvaders, iGameTurn,
                            5 - iHandicap, 2,
                            ["TXT_KEY_ADJECTIVE_HEPHTHALITE"])

        # Holkans in classical Mesoamerica
        if utils.isYearIn(100, 600):
            self.checkSpawn(iBarbarian, iHolkan, 1, (17, 31), (25, 37),
                            self.spawnUprising, iGameTurn, 6, 4)
        elif utils.isYearIn(600, 1000):
            self.checkSpawn(iBarbarian, iHolkan, 1, (17, 31), (25, 37),
                            self.spawnUprising, iGameTurn, 4, 2)

        #pirates in Mediterranean
        if utils.isYearIn(-210, 50):
            self.checkSpawn(iBarbarian, iWarGalley, 1, (49, 37), (72, 44),
                            self.spawnPirates, iGameTurn, 8, 0)
        #pirates in Barbary coast
        if not gc.getPlayer(iMoors).isAlive():
            if utils.isYearIn(-50, 700):
                self.checkSpawn(iBarbarian, iWarGalley, 1, (46, 30), (62, 39),
                                self.spawnPirates, iGameTurn, 18, 0)
            elif utils.isYearIn(700, 1400):
                self.checkSpawn(iBarbarian, iWarGalley, 1, (46, 30), (62, 39),
                                self.spawnPirates, iGameTurn, 8, 0)
        #pirates in Indian ocean
        if utils.isYearIn(-650, 700):
            self.checkSpawn(iBarbarian, iWarGalley, 1, (72, 20), (91, 36),
                            self.spawnPirates, iGameTurn, 18, 0)
        elif utils.isYearIn(700, 1700):
            self.checkSpawn(iBarbarian, iHeavyGalley, 1, (72, 20), (91, 36),
                            self.spawnPirates, iGameTurn, 10, 0)

        # Leoreth: Barbarians in Anatolia (Hittites), replace Hattusas spawn
        if utils.isYearIn(-2000, -800):
            self.checkSpawn(iBarbarian, iHuluganni, 1 + iHandicap, (68, 42),
                            (74, 45), self.spawnInvaders, iGameTurn, 16, 0,
                            ["TXT_KEY_ADJECTIVE_HITTITE"])

        #barbarians in europe
        if utils.isYearIn(-210, 470):
            self.checkSpawn(iBarbarian, iAxeman, 3 + iHandicap, (50, 45),
                            (63, 52), self.spawnInvaders, iGameTurn, 10, 0,
                            ["TXT_KEY_ADJECTIVE_GERMANIC"])
            self.checkSpawn(iBarbarian, iAxeman, 2 + iHandicap, (64, 49),
                            (69, 55), self.spawnInvaders, iGameTurn, 12, 2,
                            ["TXT_KEY_ADJECTIVE_GERMANIC"])
        # Leoreth: begins 100 AD instead of 50 AD
        if utils.isYearIn(100, 470):
            self.checkSpawn(iBarbarian, iSwordsman, 3, (58, 45), (70, 55),
                            self.spawnInvaders, iGameTurn, 8, 5,
                            ["TXT_KEY_ADJECTIVE_GERMANIC"])
        if utils.isYearIn(300, 550):
            self.checkSpawn(iBarbarian, iAxeman, 4 + iHandicap, (49, 41),
                            (56, 52), self.spawnInvaders, iGameTurn, 5, 4,
                            ["TXT_KEY_ADJECTIVE_VISIGOTHIC"])
            self.checkSpawn(iBarbarian, iSwordsman, 4 + iHandicap, (49, 41),
                            (57, 52), self.spawnInvaders, iGameTurn, 5, 2,
                            ["TXT_KEY_ADJECTIVE_VISIGOTHIC"])
            self.checkSpawn(iBarbarian, iHorseArcher, 3, (55, 49), (65, 53),
                            self.spawnInvaders, iGameTurn, 5, 0,
                            ["TXT_KEY_ADJECTIVE_HUNNIC"])
        if utils.isYearIn(300, 700):
            self.checkSpawn(iBarbarian, iHorseArcher, 3 + iHandicap, (58, 50),
                            (88, 53), self.spawnInvaders, iGameTurn, 3, 2,
                            ["TXT_KEY_ADJECTIVE_HUNNIC"])

        #Leoreth: barbarians in Balkans / Black Sea until the High Middle Ages (Bulgarians, Cumans, Pechenegs)
        if utils.isYearIn(680, 1000):
            self.checkSpawn(
                iBarbarian, iHorseArcher, 3 + iHandicap, (64, 45), (69, 49),
                self.spawnInvaders, iGameTurn, 6, 2,
                ["TXT_KEY_ADJECTIVE_AVAR", "TXT_KEY_ADJECTIVE_BULGAR"])
        if utils.isYearIn(900, 1200):
            self.checkSpawn(iBarbarian, iHorseArcher, 3 + iHandicap, (68, 48),
                            (78, 50), self.spawnInvaders, iGameTurn, 8, 5,
                            ["TXT_KEY_ADJECTIVE_CUMAN"])

        #barbarians in central asia
        if utils.isYearIn(-1600, -850):
            self.checkLimitedSpawn(iBarbarian, iVulture, 1, 3, (74, 34),
                                   (78, 44), self.spawnNomads, iGameTurn,
                                   8 - iHandicap, 2,
                                   ["TXT_KEY_ADJECTIVE_ASSYRIAN"])
        elif utils.isYearIn(-850, 300):
            self.checkLimitedSpawn(iBarbarian, iVulture, 1, 4, (73, 38),
                                   (78, 44), self.spawnNomads, iGameTurn,
                                   10 - iHandicap, 2,
                                   ["TXT_KEY_ADJECTIVE_ASSYRIAN"])
            self.checkSpawn(iBarbarian, iHorseman, 2 + iHandicap, (79, 41),
                            (84, 49), self.spawnInvaders, iGameTurn,
                            7 - iHandicap, 2, ["TXT_KEY_ADJECTIVE_PARTHIAN"])
        elif utils.isYearIn(300, 700):
            #if utils.getScenario() == i3000BC:  #late start condition
            self.checkSpawn(iBarbarian, iHorseArcher, 2 + iHandicap, (78, 42),
                            (88, 50), self.spawnNomads, iGameTurn,
                            8 - iHandicap, 2, ["TXT_KEY_ADJECTIVE_TURKIC"])
        elif utils.isYearIn(700, 1040):
            #if utils.getScenario() == i3000BC:  #late start condition
            self.checkSpawn(iBarbarian, iHorseArcher, 2 + iHandicap, (78, 42),
                            (90, 52), self.spawnNomads, iGameTurn,
                            6 - iHandicap, 2, ["TXT_KEY_ADJECTIVE_TURKIC"])

        # late Central Asian barbarians
        iSteppeUnit = iKeshik
        iExtra = iHandicap

        if utils.isYearIn(1200, 1600):
            if not utils.getAreaCitiesCiv(
                    iMongolia, utils.getPlotList((70, 48), (80, 59))):
                self.checkSpawn(
                    iBarbarian, iSteppeUnit, 1 + iExtra, (74, 47), (81, 47),
                    self.spawnNomads, iGameTurn, 10 - iHandicap, 5,
                    ["TXT_KEY_ADJECTIVE_TATAR", "TXT_KEY_ADJECTIVE_NOGAI"])
        if utils.isYearIn(1400, 1700):
            if utils.getAreaCities(utils.getPlotList((80, 47), (88, 53))):
                self.checkSpawn(
                    iBarbarian, iSteppeUnit, 1 + iExtra, (80, 47), (88, 53),
                    self.spawnNomads, iGameTurn, 10 - 2 * iHandicap, 2,
                    ["TXT_KEY_ADJECTIVE_UZBEK", "TXT_KEY_ADJECTIVE_KAZAKH"])

        #barbarians in Elam
        if utils.isYearIn(-1600, -1000):
            self.checkSpawn(iBarbarian, iChariot, 1, (81, 37), (87, 45),
                            self.spawnMinors, iGameTurn, 9 - iHandicap, 0,
                            ["TXT_KEY_ADJECTIVE_ELAMITE"])

        #barbarians in north africa
        if utils.isYearIn(-210, 50):
            self.checkSpawn(iBarbarian, iNumidianCavalry, 1, (54, 31),
                            (67, 35), self.spawnNomads, iGameTurn,
                            9 - iHandicap, 3, ["TXT_KEY_ADJECTIVE_BERBER"])
        elif utils.isYearIn(50, 900):
            if utils.getScenario() == i3000BC:  #late start condition
                self.checkSpawn(iBarbarian, iNumidianCavalry, 1 + iHandicap,
                                (54, 31), (67, 35), self.spawnNomads,
                                iGameTurn, 10 - iHandicap, 5,
                                ["TXT_KEY_ADJECTIVE_BERBER"])
        elif utils.isYearIn(900, 1800):
            self.checkSpawn(iBarbarian, iCamelArcher, 1, (54, 27), (67, 35),
                            self.spawnNomads, iGameTurn, 10 - iHandicap, 4,
                            ["TXT_KEY_ADJECTIVE_BERBER"])

        #camels in arabia
        if utils.isYearIn(190, 550):
            self.checkSpawn(iBarbarian, iCamelArcher, 1, (73, 30), (82, 36),
                            self.spawnNomads, iGameTurn, 9 - iHandicap, 7,
                            ["TXT_KEY_ADJECTIVE_BEDOUIN"])
        if utils.isYearIn(-800, 1300):
            iNumUnits = iHandicap
            if utils.getScenario() == i3000BC: iNumUnits += 1
            self.checkSpawn(iBarbarian, iMedjay, iNumUnits, (66, 28), (71, 34),
                            self.spawnUprising, iGameTurn, 12, 4,
                            ["TXT_KEY_ADJECTIVE_NUBIAN"])
        if utils.isYearIn(450, 1600):
            if utils.getScenario() == i3000BC:
                self.checkSpawn(iNative, iImpi, 2 + iHandicap, (60, 10),
                                (72, 27), self.spawnNatives, iGameTurn, 10, 4)
            else:
                self.checkSpawn(iNative, iImpi, 2 + iHandicap, (60, 10),
                                (72, 27), self.spawnNatives, iGameTurn, 15, 4)
        elif utils.isYearIn(1600, 1800):
            self.checkSpawn(iNative, iPombos, 2 + iHandicap, (60, 10),
                            (72, 27), self.spawnNatives, iGameTurn, 10, 4)

        #west africa
        if utils.isYearIn(450, 1700):
            if iGameTurn < getTurnForYear(1300):
                sAdj = ["TXT_KEY_ADJECTIVE_GHANAIAN"]
            else:
                sAdj = ["TXT_KEY_ADJECTIVE_SONGHAI"]
            self.checkSpawn(iNative, iImpi, 2, (48, 22), (63, 29),
                            self.spawnMinors, iGameTurn, 16, 10, sAdj)

        if utils.isYearIn(1200, 1700):
            self.checkSpawn(iBarbarian, iFarari, 1, (48, 26), (65, 37),
                            self.spawnMinors, iGameTurn, 16, 4, sAdj)

        #American natives
        if utils.isYearIn(600, 1100):
            self.checkSpawn(iNative, iDogSoldier, 1 + iHandicap, (15, 38),
                            (24, 47), self.spawnNatives, iGameTurn, 20, 0)
            if utils.getScenario() == i3000BC:  #late start condition
                self.checkSpawn(iNative, iJaguar, 3, (15, 38), (24, 47),
                                self.spawnNatives, iGameTurn,
                                16 - 2 * iHandicap, 10)
            else:  #late start condition
                self.checkSpawn(iNative, iJaguar, 2, (15, 38), (24, 47),
                                self.spawnNatives, iGameTurn,
                                16 - 2 * iHandicap, 10)
        if utils.isYearIn(1300, 1600):
            self.checkSpawn(iNative, iDogSoldier, 2 + iHandicap, (15, 38),
                            (24, 47), self.spawnNatives, iGameTurn, 8, 0)
        if utils.isYearIn(1400, 1800):
            self.checkSpawn(iNative, iDogSoldier, 1 + iHandicap, (11, 44),
                            (33, 51), self.spawnUprising, iGameTurn, 12, 0)
            self.checkSpawn(iNative, iDogSoldier, 1 + iHandicap, (11, 44),
                            (33, 51), self.spawnUprising, iGameTurn, 12, 6)
        if utils.isYearIn(1300, 1600):
            if iGameTurn % 18 == 0:
                if not gc.getMap().plot(27, 29).isUnit():
                    utils.makeUnitAI(iDogSoldier, iNative, (27, 29),
                                     UnitAITypes.UNITAI_ATTACK, 2 + iHandicap)
            elif iGameTurn % 18 == 9:
                if not gc.getMap().plot(30, 13).isUnit():
                    utils.makeUnitAI(iDogSoldier, iNative, (30, 13),
                                     UnitAITypes.UNITAI_ATTACK, 2 + iHandicap)

        if utils.isYearIn(1700, 1900):
            self.checkSpawn(iNative, iMountedBrave, 1 + iHandicap, (15, 44),
                            (24, 52), self.spawnUprising, iGameTurn,
                            12 - iHandicap, 2)

        if utils.isYearIn(1500, 1850):
            self.checkSpawn(iNative, iMohawk, 1, (24, 46), (30, 51),
                            self.spawnUprising, iGameTurn, 8, 4)

        #pirates in the Caribbean
        if utils.isYearIn(1600, 1800):
            self.checkSpawn(iNative, iPrivateer, 1, (24, 32), (35, 46),
                            self.spawnPirates, iGameTurn, 5, 0)
        #pirates in Asia
        if utils.isYearIn(1500, 1900):
            self.checkSpawn(iNative, iPrivateer, 1, (72, 24), (110, 36),
                            self.spawnPirates, iGameTurn, 8, 0)

        if iGameTurn < getTurnForYear(
                tMinorCities[len(tMinorCities) - 1][0]) + 10:
            self.foundMinorCities(iGameTurn)

        if iGameTurn == getTurnForYear(tBirth[iInca]):
            if utils.getHumanID() == iInca:
                utils.makeUnit(iAucac, iNative, (24, 26), 1)
                utils.makeUnit(iAucac, iNative, (25, 23), 1)
コード例 #4
0
    def checkTurn(self, iGameTurn):

        #handicap level modifier
        iHandicap = gc.getHandicapInfo(
            gc.getGame().getHandicapType()).getBarbarianSpawnModifier()

        # Leoreth: buff certain cities if independent / barbarian (imported from SoI)
        if iGameTurn % 20 == 10:
            for tMinorState in tMinorStates:
                iStartYear, iEndYear, tPlot, lUnitList = tMinorState
                if utils.isYearIn(iStartYear, iEndYear):
                    x, y = tPlot
                    plot = gc.getMap().plot(x, y)
                    iOwner = plot.getOwner()
                    if plot.isCity(
                    ) and plot.getNumUnits() < 4 and iOwner >= iNumPlayers:
                        iUnit = utils.getRandomEntry(lUnitList)
                        utils.makeUnit(iUnit, iOwner, tPlot, 1)

        if utils.isYearIn(-100, 1600):
            # Brown Bear in Chukchi
            self.checkLimitedSpawn(iBarbarian, iPolarBear, 1, 5, (140, 65),
                                   (148, 76), self.spawnBears, iGameTurn, 10,
                                   1)
            # Brown Bear and American Black Bear in Alaska and Western Canada
            self.checkLimitedSpawn(iBarbarian, iPolarBear, 1, 5, (0, 67),
                                   (24, 77), self.spawnBears, iGameTurn, 5, 3)
            # Polar Bear in Greenland and Eastern Canada
            self.checkLimitedSpawn(iBarbarian, iPolarBear, 1, 5, (25, 63),
                                   (44, 77), self.spawnBears, iGameTurn, 5, 5)

        if utils.isYearIn(-3000, -850):
            if iHandicap >= 0:
                self.checkSpawn(iBarbarian, iWarrior, 1, (92, 53), (116, 62),
                                self.spawnMinors, iGameTurn, 5, 0)

            # Wolves and Brown Bears in Russia and Siberia
            self.checkSpawn(iBarbarian, iWolf, 1, (89, 66), (125, 75),
                            self.spawnNatives, iGameTurn, 5, 2)
            self.checkSpawn(iBarbarian, iBear, 1, (89, 66), (125, 75),
                            self.spawnNatives, iGameTurn, 5, 4)

            # Panthers, Hyenas, and Lions in South Africa
            self.checkSpawn(iBarbarian, iLion, 1, (67, 12), (84, 34),
                            self.spawnNatives, iGameTurn, 4, 1)
            self.checkSpawn(iBarbarian, iPanther, 1, (67, 12), (84, 34),
                            self.spawnNatives, iGameTurn, 4, 3)
            self.checkLimitedSpawn(iBarbarian, iHyena, 1, 5, (67, 12),
                                   (84, 34), self.spawnNatives, iGameTurn, 5,
                                   3)

            # Panthers and Tigers in India, South China, Indochina, and Indonesia
            self.checkLimitedSpawn(iBarbarian, iPanther, 1, 5, (101, 32),
                                   (130, 49), self.spawnNatives, iGameTurn, 5,
                                   1)
            self.checkLimitedSpawn(iBarbarian, iTiger, 1, 5, (101, 32),
                                   (130, 49), self.spawnNatives, iGameTurn, 5,
                                   1)

            #Asian Black Bears in China, Japan, Manchuria, Vietnam, and Korea
            self.checkLimitedSpawn(iBarbarian, iBear, 1, 5, (120, 35),
                                   (141, 66), self.spawnNatives, iGameTurn, 5,
                                   3)

            # Jaguars in Brazil, Colombia, and Mesoamerica
            self.checkLimitedSpawn(iBarbarian, iJaguarAnimal, 1, 5, (34, 24),
                                   (49, 36), self.spawnNatives, iGameTurn, 5,
                                   1)
            self.checkLimitedSpawn(iBarbarian, iJaguarAnimal, 1, 5, (26, 29),
                                   (40, 38), self.spawnNatives, iGameTurn, 5,
                                   3)
            self.checkLimitedSpawn(iBarbarian, iJaguarAnimal, 1, 5, (19, 36),
                                   (30, 45), self.spawnNatives, iGameTurn, 5,
                                   3)

        #celts
        if utils.isYearIn(-650, -110):
            self.checkSpawn(iBarbarian, iSwordsman, 1, (57, 56), (76, 61),
                            self.spawnMinors, iGameTurn, 6, 0)
            if iHandicap >= 0:
                self.checkSpawn(iBarbarian, iAxeman, 1, (57, 56), (76, 61),
                                self.spawnMinors, iGameTurn, 8, 5,
                                ["TXT_KEY_ADJECTIVE_GAUL"])

        #norse
        if utils.isYearIn(-650, 550):
            self.checkSpawn(iBarbarian, iGalley, 1, (55, 59), (66, 68),
                            self.spawnPirates, iGameTurn, 20, 0,
                            ["TXT_KEY_ADJECTIVE_NORSE"])

        #mongolia
        if utils.isYearIn(-210, 400):
            self.checkSpawn(iBarbarian, iHorseArcher, 3 + iHandicap, (118, 55),
                            (129, 58), self.spawnNomads, iGameTurn,
                            7 - iHandicap, 0, ["TXT_KEY_ADJECTIVE_XIONGNU"])
        elif utils.isYearIn(-210, 400):
            self.checkSpawn(iBarbarian, iHorseArcher, 1 + iHandicap, (106, 54),
                            (114, 59), self.spawnNomads, iGameTurn,
                            7 - iHandicap, 0, ["TXT_KEY_ADJECTIVE_XIONGNU"])
        elif utils.isYearIn(-210, 400):
            self.checkSpawn(iBarbarian, iHorseArcher, 1 + iHandicap, (114, 60),
                            (125, 65), self.spawnNomads, iGameTurn,
                            7 - iHandicap, 0, ["TXT_KEY_ADJECTIVE_XIONGNU"])
        elif utils.isYearIn(400, 900):
            iNumUnits = 3 + iHandicap
            self.checkSpawn(
                iBarbarian, iHorseArcher, iNumUnits, (110, 58), (129, 65),
                self.spawnNomads, iGameTurn, 6 - iHandicap, 0,
                ["TXT_KEY_ADJECTIVE_GOKTURK", "TXT_KEY_ADJECTIVE_UIGHUR"])
        elif utils.isYearIn(900, 1100):
            iNumUnits = 3 + iHandicap
            self.checkSpawn(
                iBarbarian, iKeshik, iNumUnits, (110, 58), (129, 65),
                self.spawnInvaders, iGameTurn, 6, 0,
                ["TXT_KEY_ADJECTIVE_JURCHEN", "TXT_KEY_ADJECTIVE_KHITAN"])

        #tibet
        if utils.isYearIn(-350, 200):
            self.checkSpawn(iBarbarian, iLightSwordsman, 1 + iHandicap,
                            (107, 48), (116, 52), self.spawnMinors, iGameTurn,
                            10 - iHandicap, 3, ["TXT_KEY_ADJECTIVE_TIBETAN"])
        elif utils.isYearIn(200, 1100):
            self.checkSpawn(iBarbarian, iSwordsman, 1 + iHandicap, (107, 48),
                            (116, 52), self.spawnMinors, iGameTurn,
                            10 - iHandicap, 3, ["TXT_KEY_ADJECTIVE_TIBETAN"])

        # Deccan barbarians
        if utils.isYearIn(-1000, 1200):
            iUnit = iArcher
            iStrength = iHandicap
            if iGameTurn >= getTurnForYear(-500): iUnit = iAxeman
            if iGameTurn >= getTurnForYear(0): iStrength += 1
            if iGameTurn >= getTurnForYear(200): iUnit = iSwordsman

            self.checkSpawn(iBarbarian, iUnit, iStrength, (101, 31), (111, 42),
                            self.spawnInvaders, iGameTurn, 8 - iHandicap, 0,
                            ["Hindi"])

        # elephants in india pre-khmer
        if utils.isYearIn(-210, 700):
            self.checkSpawn(iBarbarian, iWarElephant, 1, (103, 35), (117, 45),
                            self.spawnInvaders, iGameTurn, 8 - iHandicap, 4)

        # elephants in africa
        if utils.isYearIn(1110, 1450):
            self.checkSpawn(iBarbarian, iWarElephant, 2, (75, 18), (83, 25),
                            self.spawnInvaders, iGameTurn, 8 - iHandicap, 4)

        # Longbowman in africa
        if utils.isYearIn(1450, 1600):
            self.checkSpawn(iBarbarian, iLongbowman, 2, (75, 18), (83, 25),
                            self.spawnInvaders, iGameTurn, 8 - iHandicap, 4)

        # OromoWarrior in africa
        if utils.isYearIn(1610, 1850):
            self.checkSpawn(iBarbarian, iOromoWarrior, 2, (75, 18), (83, 25),
                            self.spawnInvaders, iGameTurn, 8 - iHandicap, 4)

        #Indo-Scythians
        if utils.isYearIn(-200, 400):
            self.checkSpawn(iBarbarian, iHorseman, 2, (97, 47), (104, 51),
                            self.spawnNomads, iGameTurn, 8 - iHandicap, 4,
                            ["TXT_KEY_ADJECTIVE_INDO_SCYTHIAN"])

        #Kushana
        if utils.isYearIn(30, 220):
            self.checkSpawn(iBarbarian, iHorseman, 3 + iHandicap, (97, 47),
                            (104, 51), self.spawnInvaders, iGameTurn, 8, 3,
                            ["TXT_KEY_ADJECTIVE_KUSHANA"])

        #Hephtalites
        if utils.isYearIn(400, 550):
            self.checkSpawn(iBarbarian, iHorseArcher, 2 + iHandicap, (97, 47),
                            (104, 51), self.spawnInvaders, iGameTurn,
                            5 - iHandicap, 2,
                            ["TXT_KEY_ADJECTIVE_HEPHTHALITE"])

        # Holkans in classical Mesoamerica
        if utils.isYearIn(-200, 100):
            self.checkSpawn(iBarbarian, iHolkan, 1, (15, 36), (27, 44),
                            self.spawnUprising, iGameTurn, 7, 5)
        if utils.isYearIn(100, 600):
            self.checkSpawn(iBarbarian, iHolkan, 1, (15, 36), (27, 44),
                            self.spawnUprising, iGameTurn, 6, 4)
        elif utils.isYearIn(600, 1000):
            self.checkSpawn(iBarbarian, iHolkan, 1, (15, 36), (27, 44),
                            self.spawnUprising, iGameTurn, 4, 2)

    # Picta Aucacs in pre-Incan Andes
        if utils.isYearIn(800, 1100):
            self.checkSpawn(iBarbarian, iPictaAucac, 1, (29, 17), (33, 24),
                            self.spawnUprising, iGameTurn, 4, 2)

        # Jaguars in classical Mesoamerica
        if utils.isYearIn(150, 500):
            self.checkSpawn(iBarbarian, iJaguar, 1, (15, 36), (27, 44),
                            self.spawnUprising, iGameTurn, 6, 4)
        elif utils.isYearIn(500, 1150):
            self.checkSpawn(iBarbarian, iJaguar, 1, (15, 36), (27, 44),
                            self.spawnUprising, iGameTurn, 4, 2)

        #pirates in Mediterranean
        if utils.isYearIn(-210, 50):
            self.checkSpawn(iBarbarian, iWarGalley, 1, (55, 44), (84, 54),
                            self.spawnPirates, iGameTurn, 8, 0)

        #pirates in Barbary coast
        if not gc.getPlayer(iMoors).isAlive():
            if utils.isYearIn(-50, 700):
                self.checkSpawn(iBarbarian, iWarGalley, 1, (52, 41), (72, 49),
                                self.spawnPirates, iGameTurn, 18, 0)
            elif utils.isYearIn(700, 1400):
                self.checkSpawn(iBarbarian, iWarGalley, 1, (52, 41), (72, 49),
                                self.spawnPirates, iGameTurn, 8, 0)
        #pirates in Indian ocean
        if utils.isYearIn(-650, 700):
            self.checkSpawn(iBarbarian, iWarGalley, 1, (84, 24), (106, 42),
                            self.spawnPirates, iGameTurn, 18, 0)
        elif utils.isYearIn(700, 1700):
            self.checkSpawn(iBarbarian, iHeavyGalley, 1, (84, 24), (106, 42),
                            self.spawnPirates, iGameTurn, 10, 0)

        # Leoreth: Barbarians in Anatolia (Hittites), replace Hattusas spawn
        #if utils.isYearIn(-2000, -800):
        #self.checkSpawn(iBarbarian, iHuluganni, 1 + iHandicap, (81, 51), (86, 55), self.spawnInvaders, iGameTurn, 16, 0, ["TXT_KEY_ADJECTIVE_HITTITE"])
        if utils.isYearIn(-2000, -800):
            self.checkSpawn(iBarbarian, iChariot, 1 + iHandicap, (81, 51),
                            (86, 55), self.spawnInvaders, iGameTurn, 16, 0)

        #barbarians in europe
        if utils.isYearIn(-210, 470):
            self.checkSpawn(iBarbarian, iAxeman, 3 + iHandicap, (57, 55),
                            (74, 61), self.spawnInvaders, iGameTurn, 10, 0,
                            ["TXT_KEY_ADJECTIVE_GERMANIC"])
            self.checkSpawn(iBarbarian, iAxeman, 2 + iHandicap, (74, 58),
                            (81, 66), self.spawnInvaders, iGameTurn, 12, 2,
                            ["TXT_KEY_ADJECTIVE_GERMANIC"])
        # Leoreth: begins 100 AD instead of 50 AD
        if utils.isYearIn(100, 470):
            self.checkSpawn(iBarbarian, iSwordsman, 4, (66, 55), (82, 66),
                            self.spawnInvaders, iGameTurn, 8, 5,
                            ["TXT_KEY_ADJECTIVE_GERMANIC"])
        if utils.isYearIn(300, 550):
            self.checkSpawn(iBarbarian, iAxeman, 4 + iHandicap, (55, 49),
                            (63, 61), self.spawnInvaders, iGameTurn, 5, 4,
                            ["TXT_KEY_ADJECTIVE_VISIGOTHIC"])
            self.checkSpawn(iBarbarian, iSwordsman, 4 + iHandicap, (55, 49),
                            (63, 61), self.spawnInvaders, iGameTurn, 5, 2,
                            ["TXT_KEY_ADJECTIVE_VISIGOTHIC"])
            self.checkSpawn(iBarbarian, iHorseArcher, 4, (62, 58), (76, 64),
                            self.spawnInvaders, iGameTurn, 5, 0,
                            ["TXT_KEY_ADJECTIVE_HUNNIC"])
        if utils.isYearIn(300, 700):
            self.checkSpawn(iBarbarian, iHorseArcher, 3 + iHandicap, (65, 60),
                            (106, 63), self.spawnInvaders, iGameTurn, 3, 2,
                            ["TXT_KEY_ADJECTIVE_HUNNIC"])

        #Leoreth: barbarians in Balkans / Black Sea until the High Middle Ages (Bulgarians, Cumans, Pechenegs)
        if utils.isYearIn(680, 1000):
            self.checkSpawn(
                iBarbarian, iHorseArcher, 3 + iHandicap, (73, 55), (81, 60),
                self.spawnInvaders, iGameTurn, 6, 2,
                ["TXT_KEY_ADJECTIVE_AVAR", "TXT_KEY_ADJECTIVE_BULGAR"])
        if utils.isYearIn(900, 1200):
            self.checkSpawn(iBarbarian, iHorseArcher, 3 + iHandicap, (79, 58),
                            (92, 61), self.spawnInvaders, iGameTurn, 8, 5,
                            ["TXT_KEY_ADJECTIVE_CUMAN"])

        #1SDAN: Qarmatians (Abu Tahir al-Jannabi)
        if utils.isYearIn(900, 1000):
            self.checkSpawn(iBarbarian, iHorseArcher, 1 + iHandicap, (91, 39),
                            (95, 41), self.spawnInvaders, iGameTurn, 3, 2,
                            ["TXT_KEY_ADJECTIVE_QARMATIAN"])

        #barbarians in central asia
        if utils.isYearIn(-1600, -850):
            self.checkLimitedSpawn(iBarbarian, iVulture, 1, 3, (84, 42),
                                   (90, 44), self.spawnNomads, iGameTurn,
                                   8 - iHandicap, 2,
                                   ["TXT_KEY_ADJECTIVE_ASSYRIAN"])
        elif utils.isYearIn(-850, -200):
            self.checkSpawn(iBarbarian, iHorseman, 1 + iHandicap, (80, 56),
                            (90, 60), self.spawnInvaders, iGameTurn,
                            10 - 2 * iHandicap, 3,
                            ["TXT_KEY_ADJECTIVE_SCYTHIAN"])
        elif utils.isYearIn(-200, 600):
            self.checkSpawn(iBarbarian, iHorseman, 2 + iHandicap, (92, 49),
                            (98, 59), self.spawnInvaders, iGameTurn,
                            7 - iHandicap, 2, ["TXT_KEY_ADJECTIVE_PARTHIAN"])
        elif utils.isYearIn(600, 900):
            #if utils.getScenario() == i3000BC:  #late start condition
            self.checkSpawn(iBarbarian, iOghuz, 2 + iHandicap, (91, 50),
                            (103, 58), self.spawnNomads, iGameTurn,
                            8 - iHandicap, 2)
        elif utils.isYearIn(900, 1040):
            #if utils.getScenario() == i3000BC:  #late start condition
            self.checkSpawn(iBarbarian, iOghuz, 2 + iHandicap, (91, 50),
                            (106, 62), self.spawnNomads, iGameTurn,
                            6 - iHandicap, 2)

        # late Central Asian barbarians
        if utils.isYearIn(1200, 1600):
            if not utils.getAreaCitiesCiv(
                    iMongolia, utils.getPlotList((82, 58), (95, 70))):
                self.checkSpawn(
                    iBarbarian, iKeshik, 1 + iHandicap, (88, 57), (94, 61),
                    self.spawnNomads, iGameTurn, 10 - iHandicap, 5,
                    ["TXT_KEY_ADJECTIVE_TATAR", "TXT_KEY_ADJECTIVE_NOGAI"])
        if utils.isYearIn(1400, 1700):
            if utils.getAreaCities(utils.getPlotList((91, 58), (106, 62))):
                self.checkSpawn(
                    iBarbarian, iKeshik, 1 + iHandicap, (91, 58), (106, 62),
                    self.spawnNomads, iGameTurn, 10 - 2 * iHandicap, 2,
                    ["TXT_KEY_ADJECTIVE_UZBEK", "TXT_KEY_ADJECTIVE_KAZAKH"])

        #barbarians in Elam
        if utils.isYearIn(-1600, -1000):
            self.checkSpawn(iBarbarian, iChariot, 1, (92, 43), (99, 50),
                            self.spawnMinors, iGameTurn, 9 - iHandicap, 0,
                            ["TXT_KEY_ADJECTIVE_ELAMITE"])

        #barbarians in north africa
        if utils.isYearIn(-210, 50):
            self.checkSpawn(iBarbarian, iCamelRider, 1, (60, 38), (78, 42),
                            self.spawnNomads, iGameTurn, 9 - iHandicap, 3,
                            ["TXT_KEY_ADJECTIVE_BERBER"])
        elif utils.isYearIn(50, 900):
            if utils.getScenario() == i3000BC:  #late start condition
                self.checkSpawn(iBarbarian, iCamelRider, 1 + iHandicap,
                                (60, 38), (78, 42), self.spawnNomads,
                                iGameTurn, 10 - iHandicap, 5,
                                ["TXT_KEY_ADJECTIVE_BERBER"])
        elif utils.isYearIn(900, 1800):
            self.checkSpawn(iBarbarian, iCamelArcher, 1, (60, 33), (78, 42),
                            self.spawnNomads, iGameTurn, 10 - iHandicap, 4,
                            ["TXT_KEY_ADJECTIVE_BERBER"])

        #camels in arabia
        if utils.isYearIn(190, 550):
            self.checkSpawn(iBarbarian, iCamelArcher, 1, (85, 36), (96, 42),
                            self.spawnNomads, iGameTurn, 9 - iHandicap, 7,
                            ["TXT_KEY_ADJECTIVE_BEDOUIN"])
        if utils.isYearIn(-800, 1300) and self.includesActiveHuman(
            [iEgypt, iMamluks, iArabia]):
            iNumUnits = iHandicap
            if utils.getScenario() == i3000BC: iNumUnits += 1
            self.checkSpawn(iBarbarian, iMedjay, iNumUnits, (78, 33), (82, 41),
                            self.spawnUprising, iGameTurn, 12, 4,
                            ["TXT_KEY_ADJECTIVE_NUBIAN"])
        if utils.isYearIn(450, 1600):
            if utils.getScenario() == i3000BC:
                self.checkSpawn(iNative, iImpi, 2 + iHandicap, (68, 12),
                                (85, 31), self.spawnNatives, iGameTurn, 10, 4)
            else:
                self.checkSpawn(iNative, iImpi, 2 + iHandicap, (68, 12),
                                (85, 31), self.spawnNatives, iGameTurn, 15, 4)
        elif utils.isYearIn(1600, 1800):
            self.checkSpawn(iNative, iPombos, 2 + iHandicap, (68, 12),
                            (85, 31), self.spawnNatives, iGameTurn, 10, 4)

        #west africa
        if utils.isYearIn(450, 1700):
            if iGameTurn < getTurnForYear(1300):
                sAdj = ["TXT_KEY_ADJECTIVE_GHANAIAN"]
            else:
                sAdj = ["TXT_KEY_ADJECTIVE_SONGHAI"]
            self.checkSpawn(iNative, iImpi, 2, (55, 28), (70, 34),
                            self.spawnMinors, iGameTurn, 16, 10, sAdj)

        if utils.isYearIn(1200, 1700):
            self.checkSpawn(iBarbarian, iFarari, 2, (54, 31), (76, 43),
                            self.spawnMinors, iGameTurn, 16, 4, sAdj)

        #bulala in Chad
        if utils.isYearIn(1210, 1571):
            self.checkSpawn(iNative, iLongbowman, 1, (70, 33), (75, 37),
                            self.spawnNatives, iGameTurn, 5, 2,
                            ["TXT_KEY_ADJECTIVE_BULALA"])

        #American natives
        if utils.isYearIn(-100, 400):
            self.checkSpawn(iNative, iDogSoldier, 2 + iHandicap, (13, 46),
                            (24, 56), self.spawnNatives, iGameTurn, 20, 0)
        if utils.isYearIn(400, 1100):
            self.checkSpawn(iNative, iDogSoldier, 1 + iHandicap, (13, 46),
                            (24, 56), self.spawnNatives, iGameTurn, 20, 0)
            if utils.getScenario() == i3000BC:  #late start condition
                self.checkSpawn(iNative, iJaguar, 3, (12, 45), (24, 55),
                                self.spawnNatives, iGameTurn,
                                16 - 2 * iHandicap, 10)
            else:  #late start condition
                self.checkSpawn(iNative, iJaguar, 2, (12, 45), (24, 55),
                                self.spawnNatives, iGameTurn,
                                16 - 2 * iHandicap, 10)
        if utils.isYearIn(1300, 1600):
            self.checkSpawn(iNative, iDogSoldier, 2 + iHandicap, (12, 45),
                            (24, 55), self.spawnNatives, iGameTurn, 8, 0)
        if utils.isYearIn(1400, 1800):
            self.checkSpawn(iNative, iDogSoldier, 1 + iHandicap, (8, 50),
                            (34, 60), self.spawnUprising, iGameTurn, 12, 0)
            self.checkSpawn(iNative, iDogSoldier, 1 + iHandicap, (8, 50),
                            (34, 60), self.spawnUprising, iGameTurn, 12, 6)
        if utils.isYearIn(1300, 1600):
            if iGameTurn % 18 == 0:
                if not gc.getMap().plot(28, 31).isUnit():
                    utils.makeUnitAI(iChimuSuchucChiquiAucac, iNative,
                                     (28, 31), UnitAITypes.UNITAI_ATTACK,
                                     2 + iHandicap)
            elif iGameTurn % 18 == 9:
                if not gc.getMap().plot(34, 20).isUnit():
                    utils.makeUnitAI(iChimuSuchucChiquiAucac, iNative,
                                     (34, 20), UnitAITypes.UNITAI_ATTACK,
                                     2 + iHandicap)

        if self.includesActiveHuman(
            [iAmerica, iEngland, iFrance, iMississippi]):
            if utils.isYearIn(1700, 1900):
                self.checkSpawn(iNative, iMountedBrave, 1 + iHandicap,
                                (14, 52), (23, 62), self.spawnNomads,
                                iGameTurn, 12 - iHandicap, 2)

            if utils.isYearIn(1500, 1850):
                self.checkSpawn(iNative, iMohawk, 1, (24, 54), (31, 61),
                                self.spawnUprising, iGameTurn, 8, 4)

        # if iGameTurn == getTurnForYear(-500):
        # 	gc.getMap().plot(19, 41).setImprovementType(iHut)
        # 	utils.makeUnitAI(iHolkan, iNative, (19, 41), UnitAITypes.UNITAI_ATTACK, 2)

        # Oromos in the Horn of Africa
        if utils.isYearIn(1500, 1700):
            iNumUnits = 1
            if pEthiopia.isAlive():
                iNumUnits += 1
                if utils.isYearIn(1650, 1800): iNumUnits += 1
            self.checkSpawn(iBarbarian, iOromoWarrior, iNumUnits, (80, 29),
                            (85, 32), self.spawnInvaders, iGameTurn, 8, 3)

        #pirates in the Caribbean
        if utils.isYearIn(1600, 1800):
            self.checkSpawn(iNative, iPrivateer, 1, (25, 37), (38, 53),
                            self.spawnPirates, iGameTurn, 5, 0)
        #pirates in Asia
        if utils.isYearIn(1500, 1900):
            self.checkSpawn(iNative, iPrivateer, 1, (83, 24), (133, 42),
                            self.spawnPirates, iGameTurn, 8, 0)

        if iGameTurn < getTurnForYear(
                tMinorCities[len(tMinorCities) - 1][0]) + 10:
            self.foundMinorCities(iGameTurn)

        if iGameTurn == getTurnForYear(-1200):
            pJerusalem = gc.getGame().getHolyCity(iJudaism)
            if pJerusalem and pJerusalem.getOwner() >= iNumMajorPlayers:
                pJerusalem.setHasRealBuilding(iJewishShrine, True)