示例#1
0
    def onProjectBuilt(self, argsList):
        city, iProjectType = argsList
        vic.onProjectBuilt(city.getOwner(), iProjectType)

        # Space Elevator effect: +5 commerce per space projectBuilt
        if gc.getProjectInfo(iProjectType).isSpaceship():
            city = utils.getBuildingEffectCity(iSpaceElevator)
            if city:
                city.changeBuildingYieldChange(
                    gc.getBuildingInfo(iSpaceElevator).getBuildingClassType(),
                    YieldTypes.YIELD_COMMERCE, 5)
示例#2
0
    def onUnitBuilt(self, argsList):
        city, unit = argsList

        if unit.getUnitType() == iSettler and city.getOwner(
        ) == iChina and utils.getHumanID() != iChina:
            utils.handleChineseCities(unit)

        # Leoreth: help AI by moving new slaves to the new world
        if unit.getUnitType() == iSlave and city.getRegionID() in [
                rIberia, rBritain, rEurope, rScandinavia, rRussia, rItaly,
                rBalkans, rMaghreb, rAnatolia
        ] and utils.getHumanID() != city.getOwner():
            utils.moveSlaveToNewWorld(city.getOwner(), unit)

        # Space Elevator effect: +1 commerce per satellite built
        if unit.getUnitType() == iSatellite:
            city = utils.getBuildingEffectCity(iSpaceElevator)
            if city:
                city.changeBuildingYieldChange(
                    gc.getBuildingInfo(iSpaceElevator).getBuildingClassType(),
                    YieldTypes.YIELD_COMMERCE, 1)