messagebox '117DisseminationDiscovery' { Text(ID_DISSEMINATION_DISCOVERY) ; MessageType("KNOWLEDGE"); } //Setup ScienceDissemination trigger 'SetupScienceDissemination' when ((g.player == 0) && (g.year == 0)) { // This is the value from userprofile.txt that details the number of players that STARTED the game. // This may of course be very different from the number currently in the game. numberOfPlayers = Preference("NumPlayers"); } // Whenever Science is discovered there is a chance of it disseminating trigger 'DiscoveryDisseminates' when (discovery.type) { DisableTrigger('DiscoveryDisseminates' ); if (discovery.type == 0) { numberWithAgriculture = numberWithAgriculture + 1;} if (discovery.type == 1) { numberWithToolmaking = numberWithToolmaking + 1;} if (discovery.type == 2) { numberWithMining = numberWithMining + 1;} if (discovery.type == 3) { numberWithDomestication = numberWithDomestication + 1;} if (discovery.type == 4) { numberWithBronzeWorking = numberWithBronzeWorking + 1;} if (discovery.type == 5) { numberWithStoneWorking = numberWithStoneWorking + 1;} if (discovery.type == 6) { numberWithJurisprudence = numberWithJurisprudence + 1;} if (discovery.type == 7) { numberWithShipbuilding = numberWithShipbuilding + 1;} if (discovery.type == 8) { numberWithWriting = numberWithWriting + 1;} if (discovery.type == 9) { numberWithGeometry = numberWithGeometry + 1;} if (discovery.type == 10) { numberWithMonarchy = numberWithMonarchy + 1;} if (discovery.type == 11) { numberWithIronWorking = numberWithIronWorking + 1;} if (discovery.type == 12) { numberWithReligion = numberWithReligion + 1;} if (discovery.type == 13) { numberWithRepublic = numberWithRepublic + 1;} if (discovery.type == 14) { numberWithPhilosophy = numberWithPhilosophy + 1;} if (discovery.type == 15) { numberWithTrade = numberWithTrade + 1;} if (discovery.type == 16) { numberWithBureaucracy = numberWithBureaucracy + 1;} if (discovery.type == 17) { numberWithAstronomy = numberWithAstronomy + 1;} if (discovery.type == 18) { numberWithTheocracy = numberWithTheocracy + 1;} if (discovery.type == 19) { numberWithBanking = numberWithBanking + 1;} if (discovery.type == 20) { numberWithStirrup = numberWithStirrup + 1;} if (discovery.type == 21) { numberWithEngineering = numberWithEngineering + 1;} if (discovery.type == 22) { numberWithAlchemy = numberWithAlchemy + 1;} if (discovery.type == 23) { numberWithClassicalEducation = numberWithClassicalEducation + 1;} if (discovery.type == 24) { numberWithHullmaking = numberWithHullmaking + 1;} if (discovery.type == 25) { numberWithMedicine = numberWithMedicine + 1;} if (discovery.type == 26) { numberWithAgriculturalRevolution = numberWithAgriculturalRevolution + 1;} if (discovery.type == 27) { numberWithGunpowder = numberWithGunpowder + 1;} if (discovery.type == 28) { numberWithPerspective = numberWithPerspective + 1;} if (discovery.type == 29) { numberWithOceanFaring = numberWithOceanFaring + 1;} if (discovery.type == 30) { numberWithPrintingPress = numberWithPrintingPress + 1;} if (discovery.type == 31) { numberWithMachineTools = numberWithMachineTools + 1;} if (discovery.type == 32) { numberWithMuskets = numberWithMuskets + 1;} if (discovery.type == 33) { numberWithMechanicalClock = numberWithMechanicalClock + 1;} if (discovery.type == 34) { numberWithOptics = numberWithOptics + 1;} if (discovery.type == 35) { numberWithCavalryTactics = numberWithCavalryTactics + 1;} if (discovery.type == 36) { numberWithNationalism = numberWithNationalism + 1;} if (discovery.type == 37) { numberWithChemistry = numberWithChemistry + 1;} if (discovery.type == 38) { numberWithPhysics = numberWithPhysics + 1;} if (discovery.type == 39) { numberWithAgeofReason = numberWithAgeofReason + 1;} if (discovery.type == 40) { numberWithDemocracy = numberWithDemocracy + 1;} if (discovery.type == 41) { numberWithEconomics = numberWithEconomics + 1;} if (discovery.type == 42) { numberWithElectricity = numberWithElectricity + 1;} if (discovery.type == 43) { numberWithRailroad = numberWithRailroad + 1;} if (discovery.type == 44) { numberWithIndustrialRevolution = numberWithIndustrialRevolution + 1;} if (discovery.type == 45) { numberWithSteel = numberWithSteel + 1;} if (discovery.type == 46) { numberWithCorporation = numberWithCorporation + 1;} if (discovery.type == 47) { numberWithOilRefining = numberWithOilRefining + 1;} if (discovery.type == 48) { numberWithExplosives = numberWithExplosives + 1;} if (discovery.type == 49) { numberWithCommunism = numberWithCommunism + 1;} if (discovery.type == 50) { numberWithFascism = numberWithFascism + 1;} if (discovery.type == 51) { numberWithElectronics = numberWithElectronics + 1;} if (discovery.type == 52) { numberWithPharmaceuticals = numberWithPharmaceuticals + 1;} if (discovery.type == 53) { numberWithAerodynamics = numberWithAerodynamics + 1;} if (discovery.type == 54) { numberWithRocketry = numberWithRocketry + 1;} if (discovery.type == 55) { numberWithTankWarfare = numberWithTankWarfare + 1;} if (discovery.type == 56) { numberWithQuantumPhysics = numberWithQuantumPhysics + 1;} if (discovery.type == 57) { numberWithGlobalDefense = numberWithGlobalDefense + 1;} if (discovery.type == 58) { numberWithCombinedArms = numberWithCombinedArms + 1;} if (discovery.type == 59) { numberWithMassProduction = numberWithMassProduction + 1;} if (discovery.type == 60) { numberWithMassMedia = numberWithMassMedia + 1;} if (discovery.type == 61) { numberWithGenetics = numberWithGenetics + 1;} if (discovery.type == 62) { numberWithComputer = numberWithComputer + 1;} if (discovery.type == 63) { numberWithSpaceFlight = numberWithSpaceFlight + 1;} if (discovery.type == 64) { numberWithConservation = numberWithConservation + 1;} if (discovery.type == 65) { numberWithGlobeNet = numberWithGlobeNet + 1;} if (discovery.type == 66) { numberWithAdvancedComposites = numberWithAdvancedComposites + 1;} if (discovery.type == 67) { numberWithCorporateRepublic = numberWithCorporateRepublic + 1;} if (discovery.type == 68) { numberWithRobotics = numberWithRobotics + 1;} if (discovery.type == 69) { numberWithAISurveillance = numberWithAISurveillance + 1;} if (discovery.type == 70) { numberWithSubneuralAd = numberWithSubneuralAd + 1;} if (discovery.type == 71) { numberWithSmartMaterials = numberWithSmartMaterials + 1;} if (discovery.type == 72) { numberWithFuelCells = numberWithFuelCells + 1;} if (discovery.type == 73) { numberWithDigitalEncryption = numberWithDigitalEncryption + 1;} if (discovery.type == 74) { numberWithWormholes = numberWithWormholes + 1;} if (discovery.type == 75) { numberWithTechnocracy = numberWithTechnocracy + 1;} if (discovery.type == 76) { numberWithSuperconductor = numberWithSuperconductor + 1;} if (discovery.type == 77) { numberWithHumanCloning = numberWithHumanCloning + 1;} if (discovery.type == 78) { numberWithArcologies = numberWithArcologies + 1;} if (discovery.type == 79) { numberWithSeaColonies = numberWithSeaColonies + 1;} if (discovery.type == 80) { numberWithSpaceColonies = numberWithSpaceColonies + 1;} if (discovery.type == 81) { numberWithGeneticTailoring = numberWithGeneticTailoring + 1;} if (discovery.type == 82) { numberWithZeroGIndustry = numberWithZeroGIndustry + 1;} if (discovery.type == 83) { numberWithCryonics = numberWithCryonics + 1;} if (discovery.type == 84) { numberWithEcotopia = numberWithEcotopia + 1;} if (discovery.type == 85) { numberWithMindControl = numberWithMindControl + 1;} if (discovery.type == 86) { numberWithUltraPressureMachinery = numberWithUltraPressureMachinery + 1;} if (discovery.type == 87) { numberWithUnifiedPhysics = numberWithUnifiedPhysics + 1;} if (discovery.type == 88) { numberWithAsteroidMining = numberWithAsteroidMining + 1;} if (discovery.type == 89) { numberWithNanoAssembly = numberWithNanoAssembly + 1;} if (discovery.type == 90) { numberWithEdenProject = numberWithEdenProject + 1;} if (discovery.type == 91) { numberWithGaiaTheory = numberWithGaiaTheory + 1;} if (discovery.type == 92) { numberWithParticipatoryDemocracy = numberWithParticipatoryDemocracy + 1;} if (discovery.type == 93) { numberWithAlienArchaeology = numberWithAlienArchaeology + 1;} if (discovery.type == 94) { numberWithFusion = numberWithFusion + 1;} if (discovery.type == 95) { numberWithNeuralInterface = numberWithNeuralInterface + 1;} if (discovery.type == 96) { numberWithLifeExtension = numberWithLifeExtension + 1;} if (discovery.type == 97) { numberWithCloaking = numberWithCloaking + 1;} if (discovery.type == 137) { numberWithAlienLifeProject = numberWithAlienLifeProject + 1;} if (discovery.type == 138) { numberWithFundamentalism = numberWithFundamentalism + 1;} if (discovery.type == 139) { numberWithChivalry = numberWithChivalry + 1;} if (discovery.type == 140) { numberWithTheology = numberWithTheology + 1;} if (discovery.type == 141) { numberWithCeremonialBurial = numberWithCeremonialBurial + 1;} if (discovery.type == 142) { numberWithOralTraditions = numberWithOralTraditions + 1;} if (discovery.type == 143) { numberWithAppliedMathematics = numberWithAppliedMathematics + 1;} if (discovery.type == 144) { numberWithPolytheism = numberWithPolytheism + 1;} if (discovery.type == 145) { numberWithDrama = numberWithDrama + 1;} if (discovery.type == 146) { numberWithCurrency = numberWithCurrency + 1;} if (discovery.type == 147) { numberWithArabicNumerals = numberWithArabicNumerals + 1;} if (discovery.type == 148) { numberWithMapmaking = numberWithMapmaking + 1;} if (discovery.type == 149) { numberWithMonotheism = numberWithMonotheism + 1;} if (discovery.type == 150) { numberWithAstrolabe = numberWithAstrolabe + 1;} if (discovery.type == 151) { numberWithAlgebra = numberWithAlgebra + 1;} if (discovery.type == 152) { numberWithTrigonometry = numberWithTrigonometry + 1;} if (discovery.type == 153) { numberWithGothicArchitecture = numberWithGothicArchitecture + 1;} if (discovery.type == 154) { numberWithMagnetism = numberWithMagnetism + 1;} if (discovery.type == 155) { numberWithVernacularProse = numberWithVernacularProse + 1;} if (discovery.type == 156) { numberWithCalculus = numberWithCalculus + 1;} if (discovery.type == 157) { numberWithFirearms = numberWithFirearms + 1;} if (discovery.type == 158) { numberWithClassicalArts = numberWithClassicalArts + 1;} if (discovery.type == 159) { numberWithAnatomy = numberWithAnatomy + 1;} if (discovery.type == 160) { numberWithTheoryofGravity = numberWithTheoryofGravity + 1;} if (discovery.type == 161) { numberWithFlintlock = numberWithFlintlock + 1;} if (discovery.type == 162) { numberWithChronometer = numberWithChronometer + 1;} if (discovery.type == 163) { numberWithHumanism = numberWithHumanism + 1;} if (discovery.type == 164) { numberWithBiology = numberWithBiology + 1;} if (discovery.type == 165) { numberWithSteamEngine = numberWithSteamEngine + 1;} if (discovery.type == 166) { numberWithRomanticism = numberWithRomanticism + 1;} if (discovery.type == 167) { numberWithRepeatingRifles = numberWithRepeatingRifles + 1;} if (discovery.type == 168) { numberWithFlight = numberWithFlight + 1;} if (discovery.type == 169) { numberWithPublicEducation = numberWithPublicEducation + 1;} if (discovery.type == 170) { numberWithTelegraph = numberWithTelegraph + 1;} if (discovery.type == 171) { numberWithSanitation = numberWithSanitation + 1;} if (discovery.type == 172) { numberWithIndoorPlumbing = numberWithIndoorPlumbing + 1;} if (discovery.type == 173) { numberWithInternalCombustion = numberWithInternalCombustion + 1;} if (discovery.type == 174) { numberWithPsychology = numberWithPsychology + 1;} if (discovery.type == 175) { numberWithRadio = numberWithRadio + 1;} if (discovery.type == 176) { numberWithTelephone = numberWithTelephone + 1;} if (discovery.type == 177) { numberWithPublicWorks = numberWithPublicWorks + 1;} if (discovery.type == 178) { numberWithAmphibiousWarfare = numberWithAmphibiousWarfare + 1;} if (discovery.type == 179) { numberWithAutobahn = numberWithAutobahn + 1;} if (discovery.type == 180) { numberWithCombinedArms = numberWithCombinedArms + 1;} if (discovery.type == 181) { numberWithRefrigeration = numberWithRefrigeration + 1;} if (discovery.type == 182) { numberWithInternationalDiplomacy = numberWithInternationalDiplomacy + 1;} if (discovery.type == 183) { numberWithMicrocomputers = numberWithMicrocomputers + 1;} if (discovery.type == 184) { numberWithPlastics = numberWithPlastics + 1;} if (discovery.type == 185) { numberWithAdvMobileWarfare = numberWithAdvMobileWarfare + 1;} if (discovery.type == 186) { numberWithMicrorobotics = numberWithMicrorobotics + 1;} if (discovery.type == 187) { numberWithMolecularComputers = numberWithMolecularComputers + 1;} if (discovery.type == 188) { numberWithAdvPsychoanalysis = numberWithAdvPsychoanalysis + 1;} if (discovery.type == 189) { numberWithGlobalHealth = numberWithGlobalHealth + 1;} if (discovery.type == 190) { numberWithEvolutionaryTheory = numberWithEvolutionaryTheory + 1;} if (discovery.type == 191) { numberWithCybernetics = numberWithCybernetics + 1;} if (discovery.type == 192) { numberWithAdvCeramics = numberWithAdvCeramics + 1;} if (discovery.type == 193) { numberWithConMonarchy = numberWithConMonarchy + 1;} playerIndex = 0; // each player without this advance may get it. while (playerIndex < numberOfPlayers) { advanceGranted = 0; if (discovery.type == 0) {if (Random(2*numberOfPlayers)< numberWithAgriculture) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 1) {if (Random(2*numberOfPlayers)< numberWithToolmaking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 2) {if (Random(2*numberOfPlayers)< numberWithMining) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 3) {if (Random(2*numberOfPlayers)< numberWithDomestication) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 4) {if (Random(2*numberOfPlayers)< numberWithBronzeWorking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 5) {if (Random(2*numberOfPlayers)< numberWithStoneWorking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 6) {if (Random(2*numberOfPlayers)< numberWithJurisprudence) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 7) {if (Random(2*numberOfPlayers)< numberWithShipbuilding) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 8) {if (Random(2*numberOfPlayers)< numberWithWriting) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 9) {if (Random(2*numberOfPlayers)< numberWithGeometry) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 10) {if (Random(2*numberOfPlayers)< numberWithMonarchy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 11) {if (Random(2*numberOfPlayers)< numberWithIronWorking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 12) {if (Random(2*numberOfPlayers)< numberWithReligion) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 13) {if (Random(2*numberOfPlayers)< numberWithRepublic) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 14) {if (Random(2*numberOfPlayers)< numberWithPhilosophy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 15) {if (Random(2*numberOfPlayers)< numberWithTrade) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 16) {if (Random(2*numberOfPlayers)< numberWithBureaucracy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 17) {if (Random(2*numberOfPlayers)< numberWithAstronomy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 18) {if (Random(2*numberOfPlayers)< numberWithTheocracy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 19) {if (Random(2*numberOfPlayers)< numberWithBanking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 20) {if (Random(2*numberOfPlayers)< numberWithStirrup) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 21) {if (Random(2*numberOfPlayers)< numberWithEngineering) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 22) {if (Random(2*numberOfPlayers)< numberWithAlchemy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 23) {if (Random(2*numberOfPlayers)< numberWithClassicalEducation) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 24) {if (Random(2*numberOfPlayers)< numberWithHullmaking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 25) {if (Random(2*numberOfPlayers)< numberWithMedicine) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 26) {if (Random(2*numberOfPlayers)< numberWithAgriculturalRevolution) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 27) {if (Random(2*numberOfPlayers)< numberWithGunpowder) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 28) {if (Random(2*numberOfPlayers)< numberWithPerspective) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 29) {if (Random(2*numberOfPlayers)< numberWithOceanFaring) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 30) {if (Random(2*numberOfPlayers)< numberWithPrintingPress) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 31) {if (Random(2*numberOfPlayers)< numberWithMachineTools) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 32) {if (Random(2*numberOfPlayers)< numberWithMuskets) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 33) {if (Random(2*numberOfPlayers)< numberWithMechanicalClock) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 34) {if (Random(2*numberOfPlayers)< numberWithOptics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 35) {if (Random(2*numberOfPlayers)< numberWithCavalryTactics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 36) {if (Random(2*numberOfPlayers)< numberWithNationalism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 37) {if (Random(2*numberOfPlayers)< numberWithChemistry) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 38) {if (Random(2*numberOfPlayers)< numberWithPhysics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 39) {if (Random(2*numberOfPlayers)< numberWithAgeofReason) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 40) {if (Random(2*numberOfPlayers)< numberWithDemocracy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 41) {if (Random(2*numberOfPlayers)< numberWithEconomics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 42) {if (Random(2*numberOfPlayers)< numberWithElectricity) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 43) {if (Random(2*numberOfPlayers)< numberWithRailroad) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 44) {if (Random(2*numberOfPlayers)< numberWithIndustrialRevolution) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 45) {if (Random(2*numberOfPlayers)< numberWithSteel) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 46) {if (Random(2*numberOfPlayers)< numberWithCorporation) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 47) {if (Random(2*numberOfPlayers)< numberWithOilRefining) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 48) {if (Random(2*numberOfPlayers)< numberWithExplosives) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 49) {if (Random(2*numberOfPlayers)< numberWithCommunism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 50) {if (Random(2*numberOfPlayers)< numberWithFascism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 51) {if (Random(2*numberOfPlayers)< numberWithElectronics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 52) {if (Random(2*numberOfPlayers)< numberWithPharmaceuticals) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 53) {if (Random(2*numberOfPlayers)< numberWithAerodynamics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 54) {if (Random(2*numberOfPlayers)< numberWithRocketry) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 55) {if (Random(2*numberOfPlayers)< numberWithTankWarfare) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 56) {if (Random(2*numberOfPlayers)< numberWithQuantumPhysics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 57) {if (Random(2*numberOfPlayers)< numberWithGlobalDefense) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 58) {if (Random(2*numberOfPlayers)< numberWithCombinedArms) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 59) {if (Random(2*numberOfPlayers)< numberWithMassProduction) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 60) {if (Random(2*numberOfPlayers)< numberWithMassMedia) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 61) {if (Random(2*numberOfPlayers)< numberWithGenetics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 62) {if (Random(2*numberOfPlayers)< numberWithComputer) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 63) {if (Random(2*numberOfPlayers)< numberWithSpaceFlight) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 64) {if (Random(2*numberOfPlayers)< numberWithConservation) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 65) {if (Random(2*numberOfPlayers)< numberWithGlobeNet) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 66) {if (Random(2*numberOfPlayers)< numberWithAdvancedComposites) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 67) {if (Random(2*numberOfPlayers)< numberWithCorporateRepublic) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 68) {if (Random(2*numberOfPlayers)< numberWithRobotics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 69) {if (Random(2*numberOfPlayers)< numberWithAISurveillance) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 70) {if (Random(2*numberOfPlayers)< numberWithSubneuralAd) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 71) {if (Random(2*numberOfPlayers)< numberWithSmartMaterials) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 72) {if (Random(2*numberOfPlayers)< numberWithFuelCells) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 73) {if (Random(2*numberOfPlayers)< numberWithDigitalEncryption) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 74) {if (Random(2*numberOfPlayers)< numberWithWormholes) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 75) {if (Random(2*numberOfPlayers)< numberWithTechnocracy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 76) {if (Random(2*numberOfPlayers)< numberWithSuperconductor) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 77) {if (Random(2*numberOfPlayers)< numberWithHumanCloning) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 78) {if (Random(2*numberOfPlayers)< numberWithArcologies) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 79) {if (Random(2*numberOfPlayers)< numberWithSeaColonies) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 80) {if (Random(2*numberOfPlayers)< numberWithSpaceColonies) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 81) {if (Random(2*numberOfPlayers)< numberWithGeneticTailoring) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 82) {if (Random(2*numberOfPlayers)< numberWithZeroGIndustry) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 83) {if (Random(2*numberOfPlayers)< numberWithCryonics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 84) {if (Random(2*numberOfPlayers)< numberWithEcotopia) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 85) {if (Random(2*numberOfPlayers)< numberWithMindControl) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 86) {if (Random(2*numberOfPlayers)< numberWithUltraPressureMachinery) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 87) {if (Random(2*numberOfPlayers)< numberWithUnifiedPhysics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 88) {if (Random(2*numberOfPlayers)< numberWithAsteroidMining) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 89) {if (Random(2*numberOfPlayers)< numberWithNanoAssembly) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 90) {if (Random(2*numberOfPlayers)< numberWithEdenProject) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 91) {if (Random(2*numberOfPlayers)< numberWithGaiaTheory) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 92) {if (Random(2*numberOfPlayers)< numberWithParticipatoryDemocracy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 93) {if (Random(2*numberOfPlayers)< numberWithAlienArchaeology) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 94) {if (Random(2*numberOfPlayers)< numberWithFusion) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 95) {if (Random(2*numberOfPlayers)< numberWithNeuralInterface) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 96) {if (Random(2*numberOfPlayers)< numberWithLifeExtension) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 97) {if (Random(2*numberOfPlayers)< numberWithCloaking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 137) {if (Random(2*numberOfPlayers)< numberWithAlienLifeProject) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 138) {if (Random(2*numberOfPlayers)< numberWithFundamentalism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 139) {if (Random(2*numberOfPlayers)< numberWithChivalry) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 140) {if (Random(2*numberOfPlayers)< numberWithTheology) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 141) {if (Random(2*numberOfPlayers)< numberWithCeremonialBurial) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 142) {if (Random(2*numberOfPlayers)< numberWithOralTraditions) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 143) {if (Random(2*numberOfPlayers)< numberWithAppliedMathematics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 144) {if (Random(2*numberOfPlayers)< numberWithPolytheism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 145) {if (Random(2*numberOfPlayers)< numberWithDrama) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 146) {if (Random(2*numberOfPlayers)< numberWithCurrency) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 147) {if (Random(2*numberOfPlayers)< numberWithArabicNumerals) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 148) {if (Random(2*numberOfPlayers)< numberWithMapmaking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 149) {if (Random(2*numberOfPlayers)< numberWithMonotheism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 150) {if (Random(2*numberOfPlayers)< numberWithAstrolabe) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 151) {if (Random(2*numberOfPlayers)< numberWithAlgebra) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 152) {if (Random(2*numberOfPlayers)< numberWithTrigonometry) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 153) {if (Random(2*numberOfPlayers)< numberWithGothicArchitecture) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 154) {if (Random(2*numberOfPlayers)< numberWithMagnetism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 155) {if (Random(2*numberOfPlayers)< numberWithVernacularProse) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 156) {if (Random(2*numberOfPlayers)< numberWithCalculus) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 157) {if (Random(2*numberOfPlayers)< numberWithFirearms) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 158) {if (Random(2*numberOfPlayers)< numberWithClassicalArts) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 159) {if (Random(2*numberOfPlayers)< numberWithAnatomy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 160) {if (Random(2*numberOfPlayers)< numberWithTheoryofGravity) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 161) {if (Random(2*numberOfPlayers)< numberWithFlintlock) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 162) {if (Random(2*numberOfPlayers)< numberWithChronometer) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 163) {if (Random(2*numberOfPlayers)< numberWithHumanism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 164) {if (Random(2*numberOfPlayers)< numberWithBiology) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 165) {if (Random(2*numberOfPlayers)< numberWithSteamEngine) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 166) {if (Random(2*numberOfPlayers)< numberWithRomanticism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 167) {if (Random(2*numberOfPlayers)< numberWithRepeatingRifles) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 168) {if (Random(2*numberOfPlayers)< numberWithFlight) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 169) {if (Random(2*numberOfPlayers)< numberWithPublicEducation) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 170) {if (Random(2*numberOfPlayers)< numberWithTelegraph) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 171) {if (Random(2*numberOfPlayers)< numberWithSanitation) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 172) {if (Random(2*numberOfPlayers)< numberWithIndoorPlumbing) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 173) {if (Random(2*numberOfPlayers)< numberWithInternalCombustion) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 174) {if (Random(2*numberOfPlayers)< numberWithPsychology) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 175) {if (Random(2*numberOfPlayers)< numberWithRadio) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 176) {if (Random(2*numberOfPlayers)< numberWithTelephone) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 177) {if (Random(2*numberOfPlayers)< numberWithPublicWorks) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 178) {if (Random(2*numberOfPlayers)< numberWithAmphibiousWarfare) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 179) {if (Random(2*numberOfPlayers)< numberWithAutobahn) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 180) {if (Random(2*numberOfPlayers)< numberWithCombinedArms) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 181) {if (Random(2*numberOfPlayers)< numberWithRefrigeration) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 182) {if (Random(2*numberOfPlayers)< numberWithInternationalDiplomacy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 183) {if (Random(2*numberOfPlayers)< numberWithMicrocomputers) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 184) {if (Random(2*numberOfPlayers)< numberWithPlastics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 185) {if (Random(2*numberOfPlayers)< numberWithAdvMobileWarfare) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 186) {if (Random(2*numberOfPlayers)< numberWithMicrorobotics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 187) {if (Random(2*numberOfPlayers)< numberWithMolecularComputers) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 188) {if (Random(2*numberOfPlayers)< numberWithAdvPsychoanalysis) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 189) {if (Random(2*numberOfPlayers)< numberWithGlobalHealth) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 190) {if (Random(2*numberOfPlayers)< numberWithEvolutionaryTheory) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 191) {if (Random(2*numberOfPlayers)< numberWithCybernetics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 192) {if (Random(2*numberOfPlayers)< numberWithAdvCeramics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if (discovery.type == 193) {if (Random(2*numberOfPlayers)< numberWithConMonarchy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.type);}} if ((advanceGranted == 1) && (IsHumanPlayer(playerIndex) == 1)) {Message(playerIndex, '117DisseminationDiscovery');} playerIndex = playerIndex + 1; } EnableTrigger('DiscoveryDisseminates' ); } // Whenever Science is discovered there is a chance of it disseminating trigger 'TradeDisseminates' when (discovery.traded) { DisableTrigger('TradeDisseminates' ); if (discovery.traded == 0) { numberWithAgriculture = numberWithAgriculture + 1;} if (discovery.traded == 1) { numberWithToolmaking = numberWithToolmaking + 1;} if (discovery.traded == 2) { numberWithMining = numberWithMining + 1;} if (discovery.traded == 3) { numberWithDomestication = numberWithDomestication + 1;} if (discovery.traded == 4) { numberWithBronzeWorking = numberWithBronzeWorking + 1;} if (discovery.traded == 5) { numberWithStoneWorking = numberWithStoneWorking + 1;} if (discovery.traded == 6) { numberWithJurisprudence = numberWithJurisprudence + 1;} if (discovery.traded == 7) { numberWithShipbuilding = numberWithShipbuilding + 1;} if (discovery.traded == 8) { numberWithWriting = numberWithWriting + 1;} if (discovery.traded == 9) { numberWithGeometry = numberWithGeometry + 1;} if (discovery.traded == 10) { numberWithMonarchy = numberWithMonarchy + 1;} if (discovery.traded == 11) { numberWithIronWorking = numberWithIronWorking + 1;} if (discovery.traded == 12) { numberWithReligion = numberWithReligion + 1;} if (discovery.traded == 13) { numberWithRepublic = numberWithRepublic + 1;} if (discovery.traded == 14) { numberWithPhilosophy = numberWithPhilosophy + 1;} if (discovery.traded == 15) { numberWithTrade = numberWithTrade + 1;} if (discovery.traded == 16) { numberWithBureaucracy = numberWithBureaucracy + 1;} if (discovery.traded == 17) { numberWithAstronomy = numberWithAstronomy + 1;} if (discovery.traded == 18) { numberWithTheocracy = numberWithTheocracy + 1;} if (discovery.traded == 19) { numberWithBanking = numberWithBanking + 1;} if (discovery.traded == 20) { numberWithStirrup = numberWithStirrup + 1;} if (discovery.traded == 21) { numberWithEngineering = numberWithEngineering + 1;} if (discovery.traded == 22) { numberWithAlchemy = numberWithAlchemy + 1;} if (discovery.traded == 23) { numberWithClassicalEducation = numberWithClassicalEducation + 1;} if (discovery.traded == 24) { numberWithHullmaking = numberWithHullmaking + 1;} if (discovery.traded == 25) { numberWithMedicine = numberWithMedicine + 1;} if (discovery.traded == 26) { numberWithAgriculturalRevolution = numberWithAgriculturalRevolution + 1;} if (discovery.traded == 27) { numberWithGunpowder = numberWithGunpowder + 1;} if (discovery.traded == 28) { numberWithPerspective = numberWithPerspective + 1;} if (discovery.traded == 29) { numberWithOceanFaring = numberWithOceanFaring + 1;} if (discovery.traded == 30) { numberWithPrintingPress = numberWithPrintingPress + 1;} if (discovery.traded == 31) { numberWithMachineTools = numberWithMachineTools + 1;} if (discovery.traded == 32) { numberWithMuskets = numberWithMuskets + 1;} if (discovery.traded == 33) { numberWithMechanicalClock = numberWithMechanicalClock + 1;} if (discovery.traded == 34) { numberWithOptics = numberWithOptics + 1;} if (discovery.traded == 35) { numberWithCavalryTactics = numberWithCavalryTactics + 1;} if (discovery.traded == 36) { numberWithNationalism = numberWithNationalism + 1;} if (discovery.traded == 37) { numberWithChemistry = numberWithChemistry + 1;} if (discovery.traded == 38) { numberWithPhysics = numberWithPhysics + 1;} if (discovery.traded == 39) { numberWithAgeofReason = numberWithAgeofReason + 1;} if (discovery.traded == 40) { numberWithDemocracy = numberWithDemocracy + 1;} if (discovery.traded == 41) { numberWithEconomics = numberWithEconomics + 1;} if (discovery.traded == 42) { numberWithElectricity = numberWithElectricity + 1;} if (discovery.traded == 43) { numberWithRailroad = numberWithRailroad + 1;} if (discovery.traded == 44) { numberWithIndustrialRevolution = numberWithIndustrialRevolution + 1;} if (discovery.traded == 45) { numberWithSteel = numberWithSteel + 1;} if (discovery.traded == 46) { numberWithCorporation = numberWithCorporation + 1;} if (discovery.traded == 47) { numberWithOilRefining = numberWithOilRefining + 1;} if (discovery.traded == 48) { numberWithExplosives = numberWithExplosives + 1;} if (discovery.traded == 49) { numberWithCommunism = numberWithCommunism + 1;} if (discovery.traded == 50) { numberWithFascism = numberWithFascism + 1;} if (discovery.traded == 51) { numberWithElectronics = numberWithElectronics + 1;} if (discovery.traded == 52) { numberWithPharmaceuticals = numberWithPharmaceuticals + 1;} if (discovery.traded == 53) { numberWithAerodynamics = numberWithAerodynamics + 1;} if (discovery.traded == 54) { numberWithRocketry = numberWithRocketry + 1;} if (discovery.traded == 55) { numberWithTankWarfare = numberWithTankWarfare + 1;} if (discovery.traded == 56) { numberWithQuantumPhysics = numberWithQuantumPhysics + 1;} if (discovery.traded == 57) { numberWithGlobalDefense = numberWithGlobalDefense + 1;} if (discovery.traded == 58) { numberWithCombinedArms = numberWithCombinedArms + 1;} if (discovery.traded == 59) { numberWithMassProduction = numberWithMassProduction + 1;} if (discovery.traded == 60) { numberWithMassMedia = numberWithMassMedia + 1;} if (discovery.traded == 61) { numberWithGenetics = numberWithGenetics + 1;} if (discovery.traded == 62) { numberWithComputer = numberWithComputer + 1;} if (discovery.traded == 63) { numberWithSpaceFlight = numberWithSpaceFlight + 1;} if (discovery.traded == 64) { numberWithConservation = numberWithConservation + 1;} if (discovery.traded == 65) { numberWithGlobeNet = numberWithGlobeNet + 1;} if (discovery.traded == 66) { numberWithAdvancedComposites = numberWithAdvancedComposites + 1;} if (discovery.traded == 67) { numberWithCorporateRepublic = numberWithCorporateRepublic + 1;} if (discovery.traded == 68) { numberWithRobotics = numberWithRobotics + 1;} if (discovery.traded == 69) { numberWithAISurveillance = numberWithAISurveillance + 1;} if (discovery.traded == 70) { numberWithSubneuralAd = numberWithSubneuralAd + 1;} if (discovery.traded == 71) { numberWithSmartMaterials = numberWithSmartMaterials + 1;} if (discovery.traded == 72) { numberWithFuelCells = numberWithFuelCells + 1;} if (discovery.traded == 73) { numberWithDigitalEncryption = numberWithDigitalEncryption + 1;} if (discovery.traded == 74) { numberWithWormholes = numberWithWormholes + 1;} if (discovery.traded == 75) { numberWithTechnocracy = numberWithTechnocracy + 1;} if (discovery.traded == 76) { numberWithSuperconductor = numberWithSuperconductor + 1;} if (discovery.traded == 77) { numberWithHumanCloning = numberWithHumanCloning + 1;} if (discovery.traded == 78) { numberWithArcologies = numberWithArcologies + 1;} if (discovery.traded == 79) { numberWithSeaColonies = numberWithSeaColonies + 1;} if (discovery.traded == 80) { numberWithSpaceColonies = numberWithSpaceColonies + 1;} if (discovery.traded == 81) { numberWithGeneticTailoring = numberWithGeneticTailoring + 1;} if (discovery.traded == 82) { numberWithZeroGIndustry = numberWithZeroGIndustry + 1;} if (discovery.traded == 83) { numberWithCryonics = numberWithCryonics + 1;} if (discovery.traded == 84) { numberWithEcotopia = numberWithEcotopia + 1;} if (discovery.traded == 85) { numberWithMindControl = numberWithMindControl + 1;} if (discovery.traded == 86) { numberWithUltraPressureMachinery = numberWithUltraPressureMachinery + 1;} if (discovery.traded == 87) { numberWithUnifiedPhysics = numberWithUnifiedPhysics + 1;} if (discovery.traded == 88) { numberWithAsteroidMining = numberWithAsteroidMining + 1;} if (discovery.traded == 89) { numberWithNanoAssembly = numberWithNanoAssembly + 1;} if (discovery.traded == 90) { numberWithEdenProject = numberWithEdenProject + 1;} if (discovery.traded == 91) { numberWithGaiaTheory = numberWithGaiaTheory + 1;} if (discovery.traded == 92) { numberWithParticipatoryDemocracy = numberWithParticipatoryDemocracy + 1;} if (discovery.traded == 93) { numberWithAlienArchaeology = numberWithAlienArchaeology + 1;} if (discovery.traded == 94) { numberWithFusion = numberWithFusion + 1;} if (discovery.traded == 95) { numberWithNeuralInterface = numberWithNeuralInterface + 1;} if (discovery.traded == 96) { numberWithLifeExtension = numberWithLifeExtension + 1;} if (discovery.traded == 97) { numberWithCloaking = numberWithCloaking + 1;} if (discovery.traded == 137) { numberWithAlienLifeProject = numberWithAlienLifeProject + 1;} if (discovery.traded == 138) { numberWithFundamentalism = numberWithFundamentalism + 1;} if (discovery.traded == 139) { numberWithChivalry = numberWithChivalry + 1;} if (discovery.traded == 140) { numberWithTheology = numberWithTheology + 1;} if (discovery.traded == 141) { numberWithCeremonialBurial = numberWithCeremonialBurial + 1;} if (discovery.traded == 142) { numberWithOralTraditions = numberWithOralTraditions + 1;} if (discovery.traded == 143) { numberWithAppliedMathematics = numberWithAppliedMathematics + 1;} if (discovery.traded == 144) { numberWithPolytheism = numberWithPolytheism + 1;} if (discovery.traded == 145) { numberWithDrama = numberWithDrama + 1;} if (discovery.traded == 146) { numberWithCurrency = numberWithCurrency + 1;} if (discovery.traded == 147) { numberWithArabicNumerals = numberWithArabicNumerals + 1;} if (discovery.traded == 148) { numberWithMapmaking = numberWithMapmaking + 1;} if (discovery.traded == 149) { numberWithMonotheism = numberWithMonotheism + 1;} if (discovery.traded == 150) { numberWithAstrolabe = numberWithAstrolabe + 1;} if (discovery.traded == 151) { numberWithAlgebra = numberWithAlgebra + 1;} if (discovery.traded == 152) { numberWithTrigonometry = numberWithTrigonometry + 1;} if (discovery.traded == 153) { numberWithGothicArchitecture = numberWithGothicArchitecture + 1;} if (discovery.traded == 154) { numberWithMagnetism = numberWithMagnetism + 1;} if (discovery.traded == 155) { numberWithVernacularProse = numberWithVernacularProse + 1;} if (discovery.traded == 156) { numberWithCalculus = numberWithCalculus + 1;} if (discovery.traded == 157) { numberWithFirearms = numberWithFirearms + 1;} if (discovery.traded == 158) { numberWithClassicalArts = numberWithClassicalArts + 1;} if (discovery.traded == 159) { numberWithAnatomy = numberWithAnatomy + 1;} if (discovery.traded == 160) { numberWithTheoryofGravity = numberWithTheoryofGravity + 1;} if (discovery.traded == 161) { numberWithFlintlock = numberWithFlintlock + 1;} if (discovery.traded == 162) { numberWithChronometer = numberWithChronometer + 1;} if (discovery.traded == 163) { numberWithHumanism = numberWithHumanism + 1;} if (discovery.traded == 164) { numberWithBiology = numberWithBiology + 1;} if (discovery.traded == 165) { numberWithSteamEngine = numberWithSteamEngine + 1;} if (discovery.traded == 166) { numberWithRomanticism = numberWithRomanticism + 1;} if (discovery.traded == 167) { numberWithRepeatingRifles = numberWithRepeatingRifles + 1;} if (discovery.traded == 168) { numberWithFlight = numberWithFlight + 1;} if (discovery.traded == 169) { numberWithPublicEducation = numberWithPublicEducation + 1;} if (discovery.traded == 170) { numberWithTelegraph = numberWithTelegraph + 1;} if (discovery.traded == 171) { numberWithSanitation = numberWithSanitation + 1;} if (discovery.traded == 172) { numberWithIndoorPlumbing = numberWithIndoorPlumbing + 1;} if (discovery.traded == 173) { numberWithInternalCombustion = numberWithInternalCombustion + 1;} if (discovery.traded == 174) { numberWithPsychology = numberWithPsychology + 1;} if (discovery.traded == 175) { numberWithRadio = numberWithRadio + 1;} if (discovery.traded == 176) { numberWithTelephone = numberWithTelephone + 1;} if (discovery.traded == 177) { numberWithPublicWorks = numberWithPublicWorks + 1;} if (discovery.traded == 178) { numberWithAmphibiousWarfare = numberWithAmphibiousWarfare + 1;} if (discovery.traded == 179) { numberWithAutobahn = numberWithAutobahn + 1;} if (discovery.traded == 180) { numberWithCombinedArms = numberWithCombinedArms + 1;} if (discovery.traded == 181) { numberWithRefrigeration = numberWithRefrigeration + 1;} if (discovery.traded == 182) { numberWithInternationalDiplomacy = numberWithInternationalDiplomacy + 1;} if (discovery.traded == 183) { numberWithMicrocomputers = numberWithMicrocomputers + 1;} if (discovery.traded == 184) { numberWithPlastics = numberWithPlastics + 1;} if (discovery.traded == 185) { numberWithAdvMobileWarfare = numberWithAdvMobileWarfare + 1;} if (discovery.traded == 186) { numberWithMicrorobotics = numberWithMicrorobotics + 1;} if (discovery.traded == 187) { numberWithMolecularComputers = numberWithMolecularComputers + 1;} if (discovery.traded == 188) { numberWithAdvPsychoanalysis = numberWithAdvPsychoanalysis + 1;} if (discovery.traded == 189) { numberWithGlobalHealth = numberWithGlobalHealth + 1;} if (discovery.traded == 190) { numberWithEvolutionaryTheory = numberWithEvolutionaryTheory + 1;} if (discovery.traded == 191) { numberWithCybernetics = numberWithCybernetics + 1;} if (discovery.traded == 192) { numberWithAdvCeramics = numberWithAdvCeramics + 1;} if (discovery.traded == 193) { numberWithConMonarchy = numberWithConMonarchy + 1;} playerIndex = 0; // each player without this advance may get it. while (playerIndex < numberOfPlayers) { advanceGranted = 0; if (discovery.traded == 0) {if (Random(2*numberOfPlayers)< numberWithAgriculture) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 1) {if (Random(2*numberOfPlayers)< numberWithToolmaking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 2) {if (Random(2*numberOfPlayers)< numberWithMining) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 3) {if (Random(2*numberOfPlayers)< numberWithDomestication) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 4) {if (Random(2*numberOfPlayers)< numberWithBronzeWorking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 5) {if (Random(2*numberOfPlayers)< numberWithStoneWorking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 6) {if (Random(2*numberOfPlayers)< numberWithJurisprudence) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 7) {if (Random(2*numberOfPlayers)< numberWithShipbuilding) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 8) {if (Random(2*numberOfPlayers)< numberWithWriting) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 9) {if (Random(2*numberOfPlayers)< numberWithGeometry) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 10) {if (Random(2*numberOfPlayers)< numberWithMonarchy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 11) {if (Random(2*numberOfPlayers)< numberWithIronWorking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 12) {if (Random(2*numberOfPlayers)< numberWithReligion) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 13) {if (Random(2*numberOfPlayers)< numberWithRepublic) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 14) {if (Random(2*numberOfPlayers)< numberWithPhilosophy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 15) {if (Random(2*numberOfPlayers)< numberWithTrade) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 16) {if (Random(2*numberOfPlayers)< numberWithBureaucracy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 17) {if (Random(2*numberOfPlayers)< numberWithAstronomy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 18) {if (Random(2*numberOfPlayers)< numberWithTheocracy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 19) {if (Random(2*numberOfPlayers)< numberWithBanking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 20) {if (Random(2*numberOfPlayers)< numberWithStirrup) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 21) {if (Random(2*numberOfPlayers)< numberWithEngineering) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 22) {if (Random(2*numberOfPlayers)< numberWithAlchemy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 23) {if (Random(2*numberOfPlayers)< numberWithClassicalEducation) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 24) {if (Random(2*numberOfPlayers)< numberWithHullmaking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 25) {if (Random(2*numberOfPlayers)< numberWithMedicine) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 26) {if (Random(2*numberOfPlayers)< numberWithAgriculturalRevolution) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 27) {if (Random(2*numberOfPlayers)< numberWithGunpowder) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 28) {if (Random(2*numberOfPlayers)< numberWithPerspective) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 29) {if (Random(2*numberOfPlayers)< numberWithOceanFaring) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 30) {if (Random(2*numberOfPlayers)< numberWithPrintingPress) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 31) {if (Random(2*numberOfPlayers)< numberWithMachineTools) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 32) {if (Random(2*numberOfPlayers)< numberWithMuskets) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 33) {if (Random(2*numberOfPlayers)< numberWithMechanicalClock) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 34) {if (Random(2*numberOfPlayers)< numberWithOptics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 35) {if (Random(2*numberOfPlayers)< numberWithCavalryTactics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 36) {if (Random(2*numberOfPlayers)< numberWithNationalism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 37) {if (Random(2*numberOfPlayers)< numberWithChemistry) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 38) {if (Random(2*numberOfPlayers)< numberWithPhysics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 39) {if (Random(2*numberOfPlayers)< numberWithAgeofReason) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 40) {if (Random(2*numberOfPlayers)< numberWithDemocracy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 41) {if (Random(2*numberOfPlayers)< numberWithEconomics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 42) {if (Random(2*numberOfPlayers)< numberWithElectricity) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 43) {if (Random(2*numberOfPlayers)< numberWithRailroad) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 44) {if (Random(2*numberOfPlayers)< numberWithIndustrialRevolution) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 45) {if (Random(2*numberOfPlayers)< numberWithSteel) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 46) {if (Random(2*numberOfPlayers)< numberWithCorporation) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 47) {if (Random(2*numberOfPlayers)< numberWithOilRefining) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 48) {if (Random(2*numberOfPlayers)< numberWithExplosives) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 49) {if (Random(2*numberOfPlayers)< numberWithCommunism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 50) {if (Random(2*numberOfPlayers)< numberWithFascism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 51) {if (Random(2*numberOfPlayers)< numberWithElectronics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 52) {if (Random(2*numberOfPlayers)< numberWithPharmaceuticals) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 53) {if (Random(2*numberOfPlayers)< numberWithAerodynamics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 54) {if (Random(2*numberOfPlayers)< numberWithRocketry) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 55) {if (Random(2*numberOfPlayers)< numberWithTankWarfare) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 56) {if (Random(2*numberOfPlayers)< numberWithQuantumPhysics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 57) {if (Random(2*numberOfPlayers)< numberWithGlobalDefense) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 58) {if (Random(2*numberOfPlayers)< numberWithCombinedArms) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 59) {if (Random(2*numberOfPlayers)< numberWithMassProduction) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 60) {if (Random(2*numberOfPlayers)< numberWithMassMedia) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 61) {if (Random(2*numberOfPlayers)< numberWithGenetics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 62) {if (Random(2*numberOfPlayers)< numberWithComputer) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 63) {if (Random(2*numberOfPlayers)< numberWithSpaceFlight) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 64) {if (Random(2*numberOfPlayers)< numberWithConservation) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 65) {if (Random(2*numberOfPlayers)< numberWithGlobeNet) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 66) {if (Random(2*numberOfPlayers)< numberWithAdvancedComposites) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 67) {if (Random(2*numberOfPlayers)< numberWithCorporateRepublic) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 68) {if (Random(2*numberOfPlayers)< numberWithRobotics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 69) {if (Random(2*numberOfPlayers)< numberWithAISurveillance) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 70) {if (Random(2*numberOfPlayers)< numberWithSubneuralAd) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 71) {if (Random(2*numberOfPlayers)< numberWithSmartMaterials) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 72) {if (Random(2*numberOfPlayers)< numberWithFuelCells) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 73) {if (Random(2*numberOfPlayers)< numberWithDigitalEncryption) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 74) {if (Random(2*numberOfPlayers)< numberWithWormholes) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 75) {if (Random(2*numberOfPlayers)< numberWithTechnocracy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 76) {if (Random(2*numberOfPlayers)< numberWithSuperconductor) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 77) {if (Random(2*numberOfPlayers)< numberWithHumanCloning) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 78) {if (Random(2*numberOfPlayers)< numberWithArcologies) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 79) {if (Random(2*numberOfPlayers)< numberWithSeaColonies) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 80) {if (Random(2*numberOfPlayers)< numberWithSpaceColonies) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 81) {if (Random(2*numberOfPlayers)< numberWithGeneticTailoring) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 82) {if (Random(2*numberOfPlayers)< numberWithZeroGIndustry) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 83) {if (Random(2*numberOfPlayers)< numberWithCryonics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 84) {if (Random(2*numberOfPlayers)< numberWithEcotopia) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 85) {if (Random(2*numberOfPlayers)< numberWithMindControl) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 86) {if (Random(2*numberOfPlayers)< numberWithUltraPressureMachinery) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 87) {if (Random(2*numberOfPlayers)< numberWithUnifiedPhysics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 88) {if (Random(2*numberOfPlayers)< numberWithAsteroidMining) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 89) {if (Random(2*numberOfPlayers)< numberWithNanoAssembly) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 90) {if (Random(2*numberOfPlayers)< numberWithEdenProject) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 91) {if (Random(2*numberOfPlayers)< numberWithGaiaTheory) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 92) {if (Random(2*numberOfPlayers)< numberWithParticipatoryDemocracy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 93) {if (Random(2*numberOfPlayers)< numberWithAlienArchaeology) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 94) {if (Random(2*numberOfPlayers)< numberWithFusion) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 95) {if (Random(2*numberOfPlayers)< numberWithNeuralInterface) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 96) {if (Random(2*numberOfPlayers)< numberWithLifeExtension) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 97) {if (Random(2*numberOfPlayers)< numberWithCloaking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 137) {if (Random(2*numberOfPlayers)< numberWithAlienLifeProject) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 138) {if (Random(2*numberOfPlayers)< numberWithFundamentalism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 139) {if (Random(2*numberOfPlayers)< numberWithChivalry) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 140) {if (Random(2*numberOfPlayers)< numberWithTheology) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 141) {if (Random(2*numberOfPlayers)< numberWithCeremonialBurial) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 142) {if (Random(2*numberOfPlayers)< numberWithOralTraditions) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 143) {if (Random(2*numberOfPlayers)< numberWithAppliedMathematics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 144) {if (Random(2*numberOfPlayers)< numberWithPolytheism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 145) {if (Random(2*numberOfPlayers)< numberWithDrama) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 146) {if (Random(2*numberOfPlayers)< numberWithCurrency) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 147) {if (Random(2*numberOfPlayers)< numberWithArabicNumerals) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 148) {if (Random(2*numberOfPlayers)< numberWithMapmaking) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 149) {if (Random(2*numberOfPlayers)< numberWithMonotheism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 150) {if (Random(2*numberOfPlayers)< numberWithAstrolabe) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 151) {if (Random(2*numberOfPlayers)< numberWithAlgebra) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 152) {if (Random(2*numberOfPlayers)< numberWithTrigonometry) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 153) {if (Random(2*numberOfPlayers)< numberWithGothicArchitecture) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 154) {if (Random(2*numberOfPlayers)< numberWithMagnetism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 155) {if (Random(2*numberOfPlayers)< numberWithVernacularProse) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 156) {if (Random(2*numberOfPlayers)< numberWithCalculus) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 157) {if (Random(2*numberOfPlayers)< numberWithFirearms) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 158) {if (Random(2*numberOfPlayers)< numberWithClassicalArts) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 159) {if (Random(2*numberOfPlayers)< numberWithAnatomy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 160) {if (Random(2*numberOfPlayers)< numberWithTheoryofGravity) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 161) {if (Random(2*numberOfPlayers)< numberWithFlintlock) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 162) {if (Random(2*numberOfPlayers)< numberWithChronometer) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 163) {if (Random(2*numberOfPlayers)< numberWithHumanism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 164) {if (Random(2*numberOfPlayers)< numberWithBiology) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 165) {if (Random(2*numberOfPlayers)< numberWithSteamEngine) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 166) {if (Random(2*numberOfPlayers)< numberWithRomanticism) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 167) {if (Random(2*numberOfPlayers)< numberWithRepeatingRifles) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 168) {if (Random(2*numberOfPlayers)< numberWithFlight) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 169) {if (Random(2*numberOfPlayers)< numberWithPublicEducation) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 170) {if (Random(2*numberOfPlayers)< numberWithTelegraph) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 171) {if (Random(2*numberOfPlayers)< numberWithSanitation) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 172) {if (Random(2*numberOfPlayers)< numberWithIndoorPlumbing) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 173) {if (Random(2*numberOfPlayers)< numberWithInternalCombustion) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 174) {if (Random(2*numberOfPlayers)< numberWithPsychology) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 175) {if (Random(2*numberOfPlayers)< numberWithRadio) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 176) {if (Random(2*numberOfPlayers)< numberWithTelephone) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 177) {if (Random(2*numberOfPlayers)< numberWithPublicWorks) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 178) {if (Random(2*numberOfPlayers)< numberWithAmphibiousWarfare) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 179) {if (Random(2*numberOfPlayers)< numberWithAutobahn) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 180) {if (Random(2*numberOfPlayers)< numberWithCombinedArms) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 181) {if (Random(2*numberOfPlayers)< numberWithRefrigeration) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 182) {if (Random(2*numberOfPlayers)< numberWithInternationalDiplomacy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 183) {if (Random(2*numberOfPlayers)< numberWithMicrocomputers) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 184) {if (Random(2*numberOfPlayers)< numberWithPlastics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 185) {if (Random(2*numberOfPlayers)< numberWithAdvMobileWarfare) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 186) {if (Random(2*numberOfPlayers)< numberWithMicrorobotics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 187) {if (Random(2*numberOfPlayers)< numberWithMolecularComputers) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 188) {if (Random(2*numberOfPlayers)< numberWithAdvPsychoanalysis) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 189) {if (Random(2*numberOfPlayers)< numberWithGlobalHealth) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 190) {if (Random(2*numberOfPlayers)< numberWithEvolutionaryTheory) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 191) {if (Random(2*numberOfPlayers)< numberWithCybernetics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 192) {if (Random(2*numberOfPlayers)< numberWithAdvCeramics) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if (discovery.traded == 193) {if (Random(2*numberOfPlayers)< numberWithConMonarchy) {advanceGranted = 1; GrantAdvance(playerIndex, discovery.traded);}} if ((advanceGranted == 1) && (IsHumanPlayer(playerIndex) == 1)) {Message(playerIndex, '117DisseminationDiscovery');} playerIndex = playerIndex + 1; } EnableTrigger('TradeDisseminates' ); }