def register(self, playerConnection, game): connId = playerConnection.id self.playerList[connId] = Struct({ 'playerConnection': playerConnection, 'game': game, }) return self.playerList[connId]
'civilianType': self.civilianType, } def getCivilianType(typeName): return CIVILIAN_TYPES[typeName] def allCivilianTypeNames(): return CIVILIAN_TYPES.keys() CIVILIAN_TYPES = Struct({ CIVILIAN_TYPE_EXPLORER: CivilianType(CIVILIAN_TYPE_EXPLORER, [RESOURCE_PAPER], 500, [CIVILIAN_ACTION_REVEAL, CIVILIAN_ACTION_EXPLORE, CIVILIAN_ACTION_PROSPECT], canEnterTribe=True), CIVILIAN_TYPE_BUILDER: CivilianType(CIVILIAN_TYPE_BUILDER, [RESOURCE_PAPER], 500, [CIVILIAN_ACTION_BUILD_IMPROVEMENT, CIVILIAN_ACTION_UPGRADE_TOWN]), CIVILIAN_TYPE_ENGINEER: CivilianType(CIVILIAN_TYPE_ENGINEER, [RESOURCE_PAPER], 500, [CIVILIAN_ACTION_BUILD_ROAD, CIVILIAN_ACTION_BUILD_RAILROAD, CIVILIAN_ACTION_BUILD_PORT, CIVILIAN_ACTION_BUILD_FORT]), CIVILIAN_TYPE_MERCHANT: CivilianType(CIVILIAN_TYPE_MERCHANT, [RESOURCE_PAPER], 500, [CIVILIAN_ACTION_PURCHASE_LAND, CIVILIAN_ACTION_INCR_TRADE_CAP], canEnterTribe=True), CIVILIAN_TYPE_SPY: CivilianType(CIVILIAN_TYPE_SPY, [RESOURCE_PAPER], 500, [CIVILIAN_ACTION_SCOUT_GARRISON, CIVILIAN_ACTION_SCOUT_PROVINCE, CIVILIAN_ACTION_SPEED_UP_TECH, CIVILIAN_ACTION_INCR_DIPLO_LEVEL], canEnterForeign=True), }) CIVILIAN_ACTION_TYPES = Struct({ CIVILIAN_ACTION_MOVE: {'displayName': 'Move', 'inProgressName': 'Moving'}, CIVILIAN_ACTION_REVEAL: {'displayName': 'Reveal', 'inProgressName': 'Revealing'}, CIVILIAN_ACTION_EXPLORE: {'displayName': 'Explore', 'inProgressName': 'Exploring'}, CIVILIAN_ACTION_PROSPECT: {'displayName': 'Prospect', 'inProgressName': 'Prospecting'}, CIVILIAN_ACTION_BUILD_IMPROVEMENT: {'displayName': 'Improve', 'inProgressName': 'Improving'},
def labourOutput(workers): return sum(w.type.labourProvided for w in workers) WORKER_TYPES = Struct({ WORKER_TYPE_PEASANT: WorkerType(WORKER_TYPE_PEASANT, 300, defaultWorkerResourceCost, None, 1, [ (RESOURCE_GRAINS, RESOURCE_LIVESTOCK, 1), ]), WORKER_TYPE_APPRENTICE: WorkerType(WORKER_TYPE_APPRENTICE, 500, defaultWorkerResourceCost, WORKER_TYPE_PEASANT, 4, [ (RESOURCE_GRAINS, RESOURCE_LIVESTOCK, 1), (RESOURCE_REFINED_SUGAR, RESOURCE_COFFEE, 1), ]), WORKER_TYPE_JOURNEYMAN: WorkerType(WORKER_TYPE_JOURNEYMAN, 700, defaultWorkerResourceCost, WORKER_TYPE_APPRENTICE, 6, [ (RESOURCE_GRAINS, 1), (RESOURCE_LIVESTOCK, 1), (RESOURCE_CIGARS, 1), ]), WORKER_TYPE_ARTISAN: WorkerType(WORKER_TYPE_ARTISAN, 1000, defaultWorkerResourceCost, WORKER_TYPE_JOURNEYMAN, 8, [ (RESOURCE_GRAINS, 1), (RESOURCE_LIVESTOCK, 1), (RESOURCE_FUR_HATS, 1), ]) })
getStateDef(STATE_RESEARCH).exit(self.game) def on_enter_debt(self): getStateDef(STATE_DEBT).enter(self.game) def on_exit_debt(self): getStateDef(STATE_DEBT).exit(self.game) def on_enter_turn_end(self): getStateDef(STATE_TURN_END).enter(self.game) def on_exit_turn_end(self): getStateDef(STATE_TURN_END).exit(self.game) GAME_STATE_DEFS = Struct({ STATE_HUMAN_MOVE: StateHumanMoveDef(), STATE_TURN_START: StateTurnStartDef(), STATE_TRANSPORT: StateTransportDef(), STATE_PRODUCTION: StateProductionDef(), STATE_DEVELOPMENT: StateDevelopmentDef(), STATE_RESEARCH: StateResearchDef(), }) def getStateDef(name): if name in GAME_STATE_DEFS: return GAME_STATE_DEFS[name] else: return NoOp(name)
RESOURCES = Struct({ RESOURCE_COAL: Resource(RESOURCE_COAL, 'Coal', initialKnown=True), RESOURCE_IRON: Resource(RESOURCE_IRON, 'Iron', initialKnown=True), RESOURCE_WOOL: Resource(RESOURCE_WOOL, 'Wool', initialKnown=True), RESOURCE_TIMBER: Resource(RESOURCE_TIMBER, 'Timber', initialKnown=True), RESOURCE_TIN: Resource(RESOURCE_TIN, 'Tin', initialKnown=True), RESOURCE_COPPER: Resource(RESOURCE_COPPER, 'Copper', initialKnown=True), RESOURCE_HORSES: Resource(RESOURCE_HORSES, 'Horses', initialKnown=True), #RESOURCE_FISH: Resource(RESOURCE_FISH, 'Fish', initialKnown=True), RESOURCE_LIVESTOCK: Resource(RESOURCE_LIVESTOCK, 'Livestock', initialKnown=True), RESOURCE_GRAINS: Resource(RESOURCE_GRAINS, 'Grains', initialKnown=True), RESOURCE_CAST_IRON: Resource(RESOURCE_CAST_IRON, 'Cast Iron', transportable=False), RESOURCE_STEEL: Resource(RESOURCE_STEEL, 'Steel', transportable=False), RESOURCE_LUMBER: Resource(RESOURCE_LUMBER, 'Lumber', transportable=False, initialKnown=True), RESOURCE_PAPER: Resource(RESOURCE_PAPER, 'Paper', transportable=False, initialKnown=True), RESOURCE_FABRIC: Resource(RESOURCE_FABRIC, 'Fabric', transportable=False, initialKnown=True), RESOURCE_BRONZE: Resource(RESOURCE_BRONZE, 'Bronze', transportable=False, initialKnown=True), RESOURCE_SUGAR_CANE: Resource(RESOURCE_SUGAR_CANE, 'Sugar Cane'), RESOURCE_TOBACCO: Resource(RESOURCE_TOBACCO, 'Tobacco'), RESOURCE_FURS: Resource(RESOURCE_FURS, 'Furs'), #RESOURCE_COFFEE_BEANS: Resource(RESOURCE_COFFEE_BEANS, 'Coffee Beans'), RESOURCE_REFINED_SUGAR: Resource(RESOURCE_REFINED_SUGAR, 'Refined Sugar', transportable=False), RESOURCE_CIGARS: Resource(RESOURCE_CIGARS, 'Cigars', transportable=False), RESOURCE_FUR_HATS: Resource(RESOURCE_FUR_HATS, 'Fur Hats', transportable=False), #RESOURCE_COFFEE: Resource(RESOURCE_COFFEE, 'Coffee', transportable=False), RESOURCE_COTTON: Resource(RESOURCE_COTTON, 'Cotton'), RESOURCE_SPICES: Resource(RESOURCE_SPICES, 'Spices', cashValue=50), RESOURCE_SILVER: Resource(RESOURCE_SILVER, 'Silver', cashValue=200), RESOURCE_GOLD: Resource(RESOURCE_GOLD, 'Gold', cashValue=300), RESOURCE_GEMS: Resource(RESOURCE_GEMS, 'Gems', cashValue=150), RESOURCE_DIAMONDS: Resource(RESOURCE_DIAMONDS, 'Diamonds', cashValue=200), })
TERRAIN_TYPES = Struct({ TERRAIN_GRAIN_FARM: Terrain(TERRAIN_GRAIN_FARM, "Grain Farm", alwaysProduces=RESOURCE_GRAINS), TERRAIN_OPEN_RANGE: Terrain(TERRAIN_OPEN_RANGE, "Open Range", alwaysProduces=RESOURCE_LIVESTOCK), TERRAIN_FERTILE_HILLS: Terrain(TERRAIN_FERTILE_HILLS, "Fertile Hills", alwaysProduces=RESOURCE_WOOL), TERRAIN_HORSE_RANCH: Terrain(TERRAIN_HORSE_RANCH, "Horse Ranch", alwaysProduces=RESOURCE_HORSES), TERRAIN_SCRUB_FOREST: Terrain(TERRAIN_SCRUB_FOREST, "Scrub Forest", alwaysProduces=RESOURCE_TIMBER, maxDevLevel=1), TERRAIN_HARDWOOD_FOREST: Terrain(TERRAIN_HARDWOOD_FOREST, "Hardwood Forest", alwaysProduces=RESOURCE_TIMBER), TERRAIN_SUGAR_PLANTATION: Terrain(TERRAIN_SUGAR_PLANTATION, "Sugar Plantation", alwaysProduces=RESOURCE_SUGAR_CANE), TERRAIN_TOBACCO_PLANTATION: Terrain(TERRAIN_TOBACCO_PLANTATION, "Tobacco Plantation", alwaysProduces=RESOURCE_TOBACCO), TERRAIN_TUNDRA: Terrain(TERRAIN_TUNDRA, "Tundra", sometimesProduces=[RESOURCE_FURS, 15]), TERRAIN_COTTON_PLANTATION: Terrain(TERRAIN_COTTON_PLANTATION, "Cotton Plantation", alwaysProduces=RESOURCE_COTTON), #TERRAIN_COFFEE_PLANTATION: Terrain(TERRAIN_COFFEE_PLANTATION, "Coffee Plantation", alwaysProduces=RESOURCE_COFFEE_BEANS), TERRAIN_SPICE_ORCHARD: Terrain(TERRAIN_SPICE_ORCHARD, "Spice Orchard", alwaysProduces=RESOURCE_SPICES), TERRAIN_BARREN_HILLS: Terrain(TERRAIN_BARREN_HILLS, "Barren Hills", sometimesProduces=[ (RESOURCE_IRON, 15), (RESOURCE_COAL, 10), (RESOURCE_COPPER, 10), (RESOURCE_SILVER, 3), ]), TERRAIN_MOUNTAINS: Terrain(TERRAIN_MOUNTAINS, "Mountains", sometimesProduces=[ (RESOURCE_IRON, 20), (RESOURCE_COAL, 15), (RESOURCE_COPPER, 15), (RESOURCE_SILVER, 5), (RESOURCE_GOLD, 5), ]), TERRAIN_DESERT: Terrain(TERRAIN_DESERT, "Desert", sometimesProduces=[ (RESOURCE_DIAMONDS, 5), ]), TERRAIN_SWAMP: Terrain(TERRAIN_SWAMP, "Swamp", sometimesProduces=[ (RESOURCE_TIN, 15), ]), })
ROAD_LEVELS_SORTED = [ ROAD_LEVEL_NONE, ROAD_LEVEL_PRIMITIVE, ROAD_LEVEL_IMPROVED, ROAD_LEVEL_RAILROAD, ] ROAD_LEVELS = Struct({ ROAD_LEVEL_NONE: Road(ROAD_LEVEL_NONE, 0, 0, upgradesTo=ROAD_LEVEL_PRIMITIVE), ROAD_LEVEL_PRIMITIVE: Road(ROAD_LEVEL_PRIMITIVE, 1, 1, upgradesTo=ROAD_LEVEL_IMPROVED), ROAD_LEVEL_IMPROVED: Road(ROAD_LEVEL_IMPROVED, 2, 4, upgradesTo=ROAD_LEVEL_RAILROAD), ROAD_LEVEL_PORT: Road(ROAD_LEVEL_PORT, 4, 0), ROAD_LEVEL_RAILROAD: Road(ROAD_LEVEL_RAILROAD, 4, 8, requiredMaterials=[RESOURCE_STEEL, RESOURCE_COAL]), }) def getRoadLevel(roadLevel): return ROAD_LEVELS[roadLevel] def allRoadLevelNames(): return ROAD_LEVELS.keys()
TECHNOLOGIES = Struct({ TECH_ADV_HULL_DESIGN: Technology(TECH_ADV_HULL_DESIGN, 'Advanced Hull Design', [tp(TECH_UNIVERSITY), tp(TECH_IMPROVED_SAIL_DESIGN), tp(TECH_PRIVATEERING)]), TECH_ADV_IRON_WORKING: Technology(TECH_ADV_IRON_WORKING, 'Advanced Iron Working', [tp(TECH_SHIP_OF_THE_LINE), tp(TECH_IND_FDG_RESEARCH), tp(TECH_PADDLEWHEELS)]), TECH_APPRENTICE_WORKERS: Technology(TECH_APPRENTICE_WORKERS, 'Apprentice Workers', [tp(TECH_GRAIN_II), tp(TECH_SUGAR_REFINING)]), TECH_BANKING: Technology(TECH_BANKING, 'Banking', [tp(TECH_MASTER_ARTISANS), tp(TECH_TRADE_FAIRS)]), TECH_BAYONET: Technology(TECH_BAYONET, 'Bayonet', [tp(TECH_IMPROVED_IRON_WEAPONS), tp(TECH_CRUCIBLE_PROCESS)]), TECH_CATTLE_II: Technology(TECH_CATTLE_II, 'Crop Rotation', []), TECH_CATTLE_III: Technology(TECH_CATTLE_III, 'Animal Husbandry', [tp(TECH_CATTLE_II)]), TECH_CATTLE_IV: Technology(TECH_CATTLE_IV, 'Scientific Cattle Breeding', [tp(TECH_CATTLE_III), tp(TECH_UNIVERSITY)]), TECH_CIGAR_PRODUCTION: Technology(TECH_CIGAR_PRODUCTION, 'Cigar Production', [rp(RESOURCE_TOBACCO)]), TECH_CLIPPER_SHIPS: Technology(TECH_CLIPPER_SHIPS, 'Clipper Ships', [tp(TECH_ADV_HULL_DESIGN), tp(TECH_TIMBER_IV)]), TECH_COAL_I: Technology(TECH_COAL_I, 'Coal Mining', [tp(TECH_MINE_ENGINEERING)]), TECH_COAL_II: Technology(TECH_COAL_II, 'Square Set Timbering', [tp(TECH_COAL_I)]), TECH_COAL_III: Technology(TECH_COAL_III, 'Large Coal Mines', [tp(TECH_COAL_II), tp(TECH_IRON_MINING_III)]), TECH_COAL_IV: Technology(TECH_COAL_IV, 'Safety Lamp', [tp(TECH_COAL_III), tp(TECH_DYNAMITE)]), TECH_CONVOYING: Technology(TECH_CONVOYING, 'Convoying', [tp(TECH_MERCHANT_COMPANIES)]), TECH_COPPER_AND_TIN_II: Technology(TECH_COPPER_AND_TIN_II, 'Copper and Tin Mining', [tp(TECH_MINE_ENGINEERING)]), TECH_COPPER_AND_TIN_III: Technology(TECH_COPPER_AND_TIN_III, 'Large Copper and Tin Mines', [tp(TECH_COPPER_AND_TIN_II)]), TECH_COPPER_AND_TIN_IV: Technology(TECH_COPPER_AND_TIN_IV, 'Efficient Extraction of Copper and Tin', [tp(TECH_COAL_III), tp(TECH_COPPER_AND_TIN_III)]), TECH_COTTON_II: Technology(TECH_COTTON_II, 'Cotton Planting', [rp(RESOURCE_COTTON)]), TECH_COTTON_III: Technology(TECH_COTTON_III, 'Large Cotton Plantations', [tp(TECH_COTTON_II)]), TECH_COTTON_IV: Technology(TECH_COTTON_IV, 'Cotton Gin', [tp(TECH_COTTON_III), tp(TECH_TRAINED_JRNYMEN)]), TECH_COTTON_WEAVING: Technology(TECH_COTTON_WEAVING, 'Cotton Weaving', [rp(RESOURCE_COTTON)]), TECH_CRUCIBLE_PROCESS: Technology(TECH_CRUCIBLE_PROCESS, 'Crucible Process', [tp(TECH_COAL_II), tp(TECH_IRON_MINING_III)]), TECH_DIPLO_EXPERTISE: Technology(TECH_DIPLO_EXPERTISE, 'Diplomatic Expertise', []), TECH_DYNAMITE: Technology(TECH_DYNAMITE, 'Dynamite', [tp(TECH_LATE_STEAM_ENGINE), tp(TECH_BANKING), tp(TECH_EXPLOSIVES)]), TECH_EARLY_RIFLES: Technology(TECH_EARLY_RIFLES, 'Early Rifles', [tp(TECH_IMPROVED_INF_TACTICS), tp(TECH_CRUCIBLE_PROCESS)]), TECH_EARLY_STEAM_ENGINE: Technology(TECH_EARLY_STEAM_ENGINE, 'Early Steam Engine', [tp(TECH_ROAD_CONSTRUCTION), tp(TECH_COAL_II), tp(TECH_IRON_MINING_III)]), TECH_ELITE_MIL_TRAINING: Technology(TECH_ELITE_MIL_TRAINING, 'Elite Military Training', [tp(TECH_MODERN_MIL_FDG), tp(TECH_NEEDLE_GUNS), tp(TECH_EXPLOSIVES)]), TECH_EMPIRE_BUILDING: Technology(TECH_EMPIRE_BUILDING, 'Empire Building', [tp(TECH_NATIONALISM), tp(TECH_BANKING)]), TECH_EMPLACED_SIEGE_GUNS: Technology(TECH_EMPLACED_SIEGE_GUNS, 'Emplaced Siege Guns', [tp(TECH_HEAVY_ARTY), tp(TECH_HEAVY_EMPLACED_ARTY)]), TECH_FURS_II: Technology(TECH_FURS_II, 'Improved Trapping Techniques', [rp(RESOURCE_FURS)]), TECH_FURS_III: Technology(TECH_FURS_III, 'Riverboats', [tp(TECH_FURS_II), tp(TECH_EARLY_STEAM_ENGINE)]), TECH_FURS_IV: Technology(TECH_FURS_IV, 'Excessive Fur Harvesting', [tp(TECH_LATE_STEAM_ENGINE), tp(TECH_FURS_III)]), TECH_EXPLOSIVES: Technology(TECH_EXPLOSIVES, 'Explosives', [tp(TECH_WEAPON_CRAFT), tp(TECH_IND_MACHINERY)]), TECH_FIELD_ARTY_TACTICS: Technology(TECH_FIELD_ARTY_TACTICS, 'Field Artillery Tactics', [tp(TECH_LIGHT_ARTY_TACTICS), tp(TECH_MODERN_MIL_FDG)]), TECH_GRAIN_II: Technology(TECH_GRAIN_II, 'Land Enclosure', []), TECH_GRAIN_III: Technology(TECH_GRAIN_III, 'Seed Drill', [tp(TECH_GRAIN_II)]), TECH_GRAIN_IV: Technology(TECH_GRAIN_IV, 'Moldboard Plow', [tp(TECH_GRAIN_III)]), TECH_GEMS_AND_DIAMONDS_II: Technology(TECH_GEMS_AND_DIAMONDS_II, 'Precious Stone Mining', [op([rp(RESOURCE_GEMS), rp(RESOURCE_DIAMONDS)])]), TECH_GEMS_AND_DIAMONDS_III: Technology(TECH_GEMS_AND_DIAMONDS_III, 'Large Precious Stone Mines', [tp(TECH_GEMS_AND_DIAMONDS_II), tp(TECH_UNIVERSITY)]), TECH_GEMS_AND_DIAMONDS_IV: Technology(TECH_GEMS_AND_DIAMONDS_IV, 'Geological Prospecting', [tp(TECH_GEMS_AND_DIAMONDS_III), tp(TECH_DYNAMITE)]), TECH_HAT_PRODUCTION: Technology(TECH_HAT_PRODUCTION, 'Hat Production', [rp(RESOURCE_FURS)]), TECH_PRECIOUS_METALS_II: Technology(TECH_PRECIOUS_METALS_II, 'Precious Metals Mining', [op([rp(RESOURCE_GOLD), rp(RESOURCE_SILVER)])]), TECH_PRECIOUS_METALS_III: Technology(TECH_PRECIOUS_METALS_III, 'Extraction of Precious Metals', [tp(TECH_PRECIOUS_METALS_II), tp(TECH_UNIVERSITY)]), TECH_PRECIOUS_METALS_IV: Technology(TECH_PRECIOUS_METALS_IV, 'Amalgamation Process', [tp(TECH_PRECIOUS_METALS_III), tp(TECH_DYNAMITE)]), TECH_HEAVY_ARTY: Technology(TECH_HEAVY_ARTY, 'Heavy Artillery', [tp(TECH_MODERN_FORTS), tp(TECH_CRUCIBLE_PROCESS)]), TECH_HEAVY_EMPLACED_ARTY: Technology(TECH_HEAVY_EMPLACED_ARTY, 'Heavy Emplaced Artillery', [tp(TECH_ROAD_CONSTRUCTION), tp(TECH_NATL_BUREAU), tp(TECH_SIEGE_ENGINEERING)]), TECH_HIGH_GRADE_STEEL: Technology(TECH_HIGH_GRADE_STEEL, 'High Grade Steel', [tp(TECH_HEAVY_ARTY), tp(TECH_IND_FDG_RESEARCH), tp(TECH_MODERN_MIL_FDG)]), TECH_HORSE_ARTY: Technology(TECH_HORSE_ARTY, 'Horse Artillery', [tp(TECH_CATTLE_III), tp(TECH_COPPER_AND_TIN_II)]), TECH_HUSSARS: Technology(TECH_HUSSARS, 'Hussars', [tp(TECH_IMPROVED_CAV_TACTICS), tp(TECH_STEPPE)]), TECH_IMPROVED_CAV_TACTICS: Technology(TECH_IMPROVED_CAV_TACTICS, 'Improved Cavalry Tactics', [tp(TECH_PRINTING_PRESS), tp(TECH_CATTLE_III)]), TECH_IMPROVED_CAV_WEAPONS: Technology(TECH_IMPROVED_CAV_WEAPONS, 'Improved Cavalry Weapons', [tp(TECH_IND_MACHINERY), tp(TECH_CRUCIBLE_PROCESS), tp(TECH_IMPROVED_CAV_TACTICS)]), TECH_IMPROVED_INF_TACTICS: Technology(TECH_IMPROVED_INF_TACTICS, 'Improved Infantry Tactics', [tp(TECH_ORG_REGIMENTS), tp(TECH_PRINTING_PRESS)]), TECH_IMPROVED_IRON_WEAPONS: Technology(TECH_IMPROVED_IRON_WEAPONS, 'Improved Iron Weapons', [tp(TECH_ORG_REGIMENTS), tp(TECH_IRON_MINING_II)]), TECH_IMPROVED_SAIL_DESIGN: Technology(TECH_IMPROVED_SAIL_DESIGN, 'Improved Sail Design', [tp(TECH_TIMBER_III), tp(TECH_SUP_HULL_DESIGN)]), TECH_IND_FDG_RESEARCH: Technology(TECH_IND_FDG_RESEARCH, 'Industrial Funding of Research', [tp(TECH_IND_MACHINERY), tp(TECH_CRUCIBLE_PROCESS)]), TECH_IRON_MINING_II: Technology(TECH_IRON_MINING_II, 'Iron Mining', [tp(TECH_MINE_ENGINEERING)]), TECH_IRON_MINING_III: Technology(TECH_IRON_MINING_III, 'Steam in Mining', [tp(TECH_IRON_MINING_II)]), TECH_IRON_MINING_IV: Technology(TECH_IRON_MINING_IV, 'Industrial Iron Mining', [tp(TECH_IND_FDG_RESEARCH), tp(TECH_IRON_MINING_III)]), TECH_IND_MACHINERY: Technology(TECH_IND_MACHINERY, 'Industrial Machinery', [tp(TECH_TRAINED_JRNYMEN), tp(TECH_IRON_MINING_III), tp(TECH_UNIVERSITY)]), TECH_LARGE_HULLS: Technology(TECH_LARGE_HULLS, 'Large Hulls', [tp(TECH_TIMBER_III), tp(TECH_NAVIGATION), tp(TECH_CONVOYING)]), TECH_LATE_STEAM_ENGINE: Technology(TECH_LATE_STEAM_ENGINE, 'Late Steam Engine', [tp(TECH_EARLY_STEAM_ENGINE), tp(TECH_CRUCIBLE_PROCESS)]), TECH_LIGHT_ARTY_TACTICS: Technology(TECH_LIGHT_ARTY_TACTICS, 'Light Artillery Tactics', [tp(TECH_CRUCIBLE_PROCESS), tp(TECH_UNIVERSITY), tp(TECH_HORSE_ARTY)]), TECH_LONG_RANGE_RIFLES: Technology(TECH_LONG_RANGE_RIFLES, 'Long Range Rifles', [tp(TECH_EARLY_RIFLES), tp(TECH_CRUCIBLE_PROCESS)]), TECH_MASTER_ARTISANS: Technology(TECH_MASTER_ARTISANS, 'Master Artisans', [tp(TECH_TRAINED_JRNYMEN), tp(TECH_UNIVERSITY), tp(TECH_HAT_PRODUCTION)]), TECH_MERCHANT_COMPANIES: Technology(TECH_MERCHANT_COMPANIES, 'Merchant Companies', []), TECH_MERCHANT_STEAMSHIPS: Technology(TECH_MERCHANT_STEAMSHIPS, 'Merchant Steamships', [tp(TECH_PADDLEWHEELS), tp(TECH_FURS_III)]), TECH_MINE_ENGINEERING: Technology(TECH_MINE_ENGINEERING, 'Mine Engineering', []), TECH_MODERN_FORTS: Technology(TECH_MODERN_FORTS, 'Modern Fortifications', [tp(TECH_SIEGE_ENGINEERING), tp(TECH_UNIVERSITY)]), TECH_MODERN_MIL_FDG: Technology(TECH_MODERN_MIL_FDG, 'Modern Military Funding', [tp(TECH_BANKING), tp(TECH_GEMS_AND_DIAMONDS_III), tp(TECH_MODERN_FORTS)]), TECH_MONEY_LENDING: Technology(TECH_MONEY_LENDING, 'Money Lending', [tp(TECH_GRAIN_II)]), TECH_NATL_BUREAU: Technology(TECH_NATL_BUREAU, 'National Bureaucracy', [tp(TECH_PRINTING_PRESS), tp(TECH_MONEY_LENDING), tp(TECH_DIPLO_EXPERTISE)]), TECH_NATIONALISM: Technology(TECH_NATIONALISM, 'Nationalism', [tp(TECH_PROPAGANDA), tp(TECH_MASTER_ARTISANS), tp(TECH_MODERN_FORTS)]), TECH_NAVIGATION: Technology(TECH_NAVIGATION, 'Navigation', [tp(TECH_SUP_HULL_DESIGN)]), TECH_NEEDLE_GUNS: Technology(TECH_NEEDLE_GUNS, 'Needle Guns', [tp(TECH_IND_FDG_RESEARCH), tp(TECH_BAYONET), tp(TECH_EARLY_RIFLES)]), TECH_ORG_REGIMENTS: Technology(TECH_ORG_REGIMENTS, 'Organized Regiments', [tp(TECH_GRAIN_II)]), TECH_PADDLEWHEELS: Technology(TECH_PADDLEWHEELS, 'Paddlewheels', [tp(TECH_ADV_HULL_DESIGN), tp(TECH_EARLY_STEAM_ENGINE)]), TECH_PRINTING_PRESS: Technology(TECH_PRINTING_PRESS, 'Printing Press', [tp(TECH_TIMBER_II)]), TECH_PRIVATEERING: Technology(TECH_PRIVATEERING, 'Privateering Companies', [tp(TECH_NAVIGATION), tp(TECH_DIPLO_EXPERTISE)]), TECH_PROPAGANDA: Technology(TECH_PROPAGANDA, 'Propaganda', [tp(TECH_NATL_BUREAU), tp(TECH_UNIVERSITY)]), TECH_STEPPE: Technology(TECH_STEPPE, 'Steppe Horsemen', [tp(TECH_CATTLE_II)]), TECH_RPT_CAV_CARBINE: Technology(TECH_RPT_CAV_CARBINE, 'Repeating Cavalry Carbine', [tp(TECH_IND_FDG_RESEARCH), tp(TECH_IMPROVED_CAV_WEAPONS)]), TECH_ROAD_CONSTRUCTION: Technology(TECH_ROAD_CONSTRUCTION, 'Road Construction', [tp(TECH_TIMBER_II), tp(TECH_GRAIN_II), tp(TECH_IRON_MINING_II)]), TECH_SCOUTING: Technology(TECH_SCOUTING, 'Scouting', [tp(TECH_HUSSARS), tp(TECH_EARLY_RIFLES)]), TECH_SHIP_OF_THE_LINE: Technology(TECH_SHIP_OF_THE_LINE, 'Ship of the Line', [tp(TECH_LARGE_HULLS), tp(TECH_COPPER_AND_TIN_III)]), TECH_SIEGE_ENGINEERING: Technology(TECH_SIEGE_ENGINEERING, 'Siege Engineering', [tp(TECH_PRINTING_PRESS), tp(TECH_COPPER_AND_TIN_II)]), TECH_SPICE_II: Technology(TECH_SPICE_II, 'Improved Sea Routes', [rp(RESOURCE_SPICES)]), TECH_SPICE_III: Technology(TECH_SPICE_III, 'Large Spice Plantations', [tp(TECH_SPICE_II), tp(TECH_GRAIN_III)]), TECH_SPICE_IV: Technology(TECH_SPICE_IV, 'Improved Food Preservation', [tp(TECH_SPICE_III)]), TECH_SUGAR_II: Technology(TECH_SUGAR_II, 'Sugar Planting', [rp(RESOURCE_SUGAR_CANE)]), TECH_SUGAR_III: Technology(TECH_SUGAR_III, 'Large Sugar Plantations', [tp(TECH_SUGAR_II)]), TECH_SUGAR_IV: Technology(TECH_SUGAR_IV, 'Sugar Industry', [tp(TECH_SUGAR_III)]), TECH_SUGAR_REFINING: Technology(TECH_SUGAR_REFINING, 'Sugar Refining', [rp(RESOURCE_SUGAR_CANE)]), TECH_SUP_HULL_DESIGN: Technology(TECH_SUP_HULL_DESIGN, 'Superior Hull Design', []), TECH_TIMBER_II: Technology(TECH_TIMBER_II, 'Saw Mills', []), TECH_TIMBER_III: Technology(TECH_TIMBER_III, 'Wind Saw Mills', [tp(TECH_TIMBER_II)]), TECH_TIMBER_IV: Technology(TECH_TIMBER_IV, 'Circular Saw', [tp(TECH_TIMBER_III), tp(TECH_UNIVERSITY)]), TECH_TOBACCO_II: Technology(TECH_TOBACCO_II, 'Tobacco Planting', [rp(RESOURCE_TOBACCO)]), TECH_TOBACCO_III: Technology(TECH_TOBACCO_III, 'Large Tobacco Plantations', [tp(TECH_TOBACCO_II), tp(TECH_GRAIN_III)]), TECH_TOBACCO_IV: Technology(TECH_TOBACCO_IV, 'Tobacco Industry', [tp(TECH_EARLY_STEAM_ENGINE), tp(TECH_TOBACCO_III)]), TECH_TRADE_FAIRS: Technology(TECH_TRADE_FAIRS, 'Trade Fairs', [tp(TECH_MERCHANT_COMPANIES), tp(TECH_SUGAR_REFINING)]), TECH_TRAINED_JRNYMEN: Technology(TECH_TRAINED_JRNYMEN, 'Trained Journeymen', [tp(TECH_CIGAR_PRODUCTION), tp(TECH_PRINTING_PRESS)]), TECH_UNIVERSITY: Technology(TECH_UNIVERSITY, 'University', [tp(TECH_MONEY_LENDING), tp(TECH_APPRENTICE_WORKERS), tp(TECH_PRINTING_PRESS)]), TECH_WEAPON_CRAFT: Technology(TECH_WEAPON_CRAFT, 'Weapon Craftsmanship', [tp(TECH_ORG_REGIMENTS), tp(TECH_COPPER_AND_TIN_II)]), TECH_WOOL_II: Technology(TECH_WOOL_II, 'Sheep Ranching', [tp(TECH_CATTLE_II)]), TECH_WOOL_III: Technology(TECH_WOOL_III, 'Scientific Sheep Breeding', [tp(TECH_WOOL_II), tp(TECH_UNIVERSITY)]), TECH_WOOL_IV: Technology(TECH_WOOL_IV, 'Spinning Jenny', [tp(TECH_WOOL_III), tp(TECH_IND_MACHINERY)]), })