//定义everyoneGetsAWagon数值,随机返回950-1000整数 int everyoneGetsAWagon = rmRandInt(950,1000);
//如果everyoneGetsAWagon不等于981,变更everyoneGetsAWagon数值 // Bonus Wagon if (everyoneGetsAWagon != 981) { if (rmRandFloat(0,1) <= 0.001) everyoneGetsAWagon = 111; // factory wagon if (rmRandFloat(0,1) <= 0.005) everyoneGetsAWagon = 69; // jeff wagons (1 food age 1, 1 wood age 3, 1 coin age 4, all 3 age 5) if (oceanRing == 1 && rmRandFloat(0,1) <= 0.25) everyoneGetsAWagon = 1001; // if (oceanOffCenter == 1 && rmRandFloat(0,1) <= 0.25 && bayChance == 1) if (rmRandFloat(0,1) <= 0.25 && bayChance == 1) everyoneGetsAWagon = 1001; // if (oceanMiddle == 1 && rmRandFloat(0,1) <= 0.25 && oceanChance == 1) if (rmRandFloat(0,1) <= 0.25 && oceanChance == 1) everyoneGetsAWagon = 1001; if (dekkanMap == 1 && rmRandFloat(0,1) <= 0.25 && rmGetIsTreaty() == true) everyoneGetsAWagon = 1002; if (trollMap == 1 || rmRandFloat(0,1) <= 0.001) everyoneGetsAWagon = 1003; if (tpORnot == 5 && rmRandFloat(0,1) <= 0.10) everyoneGetsAWagon = 990; if (rmRandFloat(0,1) <= 0.01) everyoneGetsAWagon = 666; // military wagon age 2 if (rmRandFloat(0,1) <= 0.001) everyoneGetsAWagon = 888; // crazy 8s - TC wagon plus BL+1 if (rmRandFloat(0,1) <= 0.001) everyoneGetsAWagon = 8888; // crazier 8s - TC wagon plus BL+1 when age up } rmEchoInfo("everyoneGetsAWagon = "+everyoneGetsAWagon);
if (rmRandFloat(0,1) <= 0.001 || trollMap == 1 || everyoneGetsAWagon == 888 || everyoneGetsAWagon == 8888) { rmSetNumberInitialColonies(rmRandInt(2,11)); }
int butOnlySometimes = rmRandInt(1,5); butOnlySometimes = 3; // for testing // nevermind let's keep it active always for some fun
//判断everyoneGetsAWagon数值,获取不同效果 int playerWagonID=rmCreateObjectDef("starting wagon"); if (everyoneGetsAWagon == 888) rmAddObjectDefItem(playerWagonID, "CoveredWagon", 1, 0.0); else if (everyoneGetsAWagon == 8888) rmAddObjectDefItem(playerWagonID, propz, 1, 0.0); else if (everyoneGetsAWagon == 666) { rmAddObjectDefItem(playerWagonID, "SPCCasualtyCart", 1, 2.0); rmAddObjectDefItem(playerWagonID, "deNatEUPropVilGuards", 1, 3.0); } else if (everyoneGetsAWagon == 69) { rmAddObjectDefItem(playerWagonID, "dePropsResourceCratesFood", 1, 3.0); rmAddObjectDefItem(playerWagonID, "FirewoodPile", 1, 3.0); rmAddObjectDefItem(playerWagonID, "dePropsResourceCratesGold", 1, 3.0); } else if (everyoneGetsAWagon == 111) rmAddObjectDefItem(playerWagonID, "FactoryWagon", 1, 0.0); else if (everyoneGetsAWagon <= 970) rmAddObjectDefItem(playerWagonID, "deTradingPostWagon", 1, 0.0); else if (everyoneGetsAWagon <= 971) { // rmAddObjectDefItem(playerWagonID, "ypChurchWagon", 1, 0.0); } else if (everyoneGetsAWagon <= 972) rmAddObjectDefItem(playerWagonID, "Envoy", 1, 0.0); else if (everyoneGetsAWagon == 973) rmAddObjectDefItem(playerWagonID, "deUniqueTowerBuilder", 1, 0.0); else if (everyoneGetsAWagon == 974) // 889 rmAddObjectDefItem(playerWagonID, "ypBerryWagon1", 1, 0.0); else if (everyoneGetsAWagon == 975) // 890 { if (autoCattle != 1) { rmAddObjectDefItem(playerWagonID, "ypVillageWagon", 1, 2.0); rmAddObjectDefItem(playerWagonID, livestockName, 1, 3.0); } else { everyoneGetsAWagon = 950; rmAddObjectDefItem(playerWagonID, "deTradingPostWagon", 1, 0.0); } } else if (everyoneGetsAWagon == 976) // 891 { if (autoCattle != 1) { rmAddObjectDefItem(playerWagonID, "deLivestockMarketWagon", 1, 2.0); rmAddObjectDefItem(playerWagonID, livestockName, 2, 3.0); } else { everyoneGetsAWagon = 950; rmAddObjectDefItem(playerWagonID, "deTradingPostWagon", 1, 0.0); } } else if (everyoneGetsAWagon == 977) // 892 { rmAddObjectDefItem(playerWagonID, "deMountainMonasteryBuilder", 1, 2.0); if (rmRandFloat(0,1) <= 0.01) rmAddObjectDefItem(playerWagonID, "deNatBerberSultan", 1, 3.0); else if (rmRandFloat(0,1) <= 0.10) rmAddObjectDefItem(playerWagonID, "deAbun", 1, 3.0); else rmAddObjectDefItem(playerWagonID, "deNatNomad", 1, 3.0); } else if (everyoneGetsAWagon == 978) // 893 { rmAddObjectDefItem(playerWagonID, "deBuilderKingdom", 1, 2.0); if (rmRandFloat(0,1) <= 0.01) rmAddObjectDefItem(playerWagonID, "deNatAkanWarchief", 1, 3.0); else if (rmRandFloat(0,1) <= 0.10) rmAddObjectDefItem(playerWagonID, "deGriot", 1, 3.0); else rmAddObjectDefItem(playerWagonID, "deNatNomad", 1, 3.0); } else if (everyoneGetsAWagon == 979) { // rmAddObjectDefItem(playerWagonID, "deAthosMonasteryWagon", 2, 4.0); } else if (everyoneGetsAWagon == 980) { rmAddObjectDefItem(playerWagonID, "NatHolcanSpearman", 1, 0.0); } else if (everyoneGetsAWagon == 981) rmAddObjectDefItem(playerWagonID, "dePropsResourceCratesGold", 1, 0.0); else if (everyoneGetsAWagon == 982) rmAddObjectDefItem(playerWagonID, "deCommanderyWagon", 2, 2.0); else if (everyoneGetsAWagon == 983) { if (autoCattle != 1) { rmAddObjectDefItem(playerWagonID, "ypSacredFieldWagon", 1, 2.0); rmAddObjectDefItem(playerWagonID, livestockName, 2, 3.0); } else { everyoneGetsAWagon = 950; rmAddObjectDefItem(playerWagonID, "deTradingPostWagon", 1, 0.0); } } else if (everyoneGetsAWagon == 984) rmAddObjectDefItem(playerWagonID, "deDepotWagon", 1, 0.0); else if (everyoneGetsAWagon == 985) rmAddObjectDefItem(playerWagonID, "SPCDamagedCannons", 1, 0.0); else if (everyoneGetsAWagon == 986) rmAddObjectDefItem(playerWagonID, "deCommandWagon", 1, 0.0); else if (everyoneGetsAWagon == 987) { rmAddObjectDefItem(playerWagonID, "deLombardWagon", 1, 2.0); rmAddObjectDefItem(playerWagonID, "deSPCCityGuard", 1, 2.0); } else if (everyoneGetsAWagon == 988) rmAddObjectDefItem(playerWagonID, "deBatteryTowerWagon", 1, 0.0); else if (everyoneGetsAWagon == 989) { rmAddObjectDefItem(playerWagonID, "deProspectorWagonCoal", 1, 2.0); rmAddObjectDefItem(playerWagonID, "deMiner", 1, 2.0); } else if (everyoneGetsAWagon == 990) { rmAddObjectDefItem(playerWagonID, "deEmbassyTravois", 1, 2.0); if (yellowRiverMap == 1) rmAddObjectDefItem(playerWagonID, "ypNativeScout", 1, 4.0); else if (rmRandFloat(0,1) <= 0.10) rmAddObjectDefItem(playerWagonID, "NativeScout", 1, 4.0); else rmAddObjectDefItem(playerWagonID, "deNatSPCLenapeVillager", 1, 4.0); } else if (everyoneGetsAWagon == 991) { if (autoCattle != 1) { rmAddObjectDefItem(playerWagonID, "deHaciendaWagon", 1, 2.0); rmAddObjectDefItem(playerWagonID, livestockName, 4, 4.0); } else { everyoneGetsAWagon = 950; rmAddObjectDefItem(playerWagonID, "deTradingPostWagon", 1, 0.0); } } else if (everyoneGetsAWagon == 992) { if (autoCattle != 1) { rmAddObjectDefItem(playerWagonID, "deHomesteadWagon", 1, 2.0); rmAddObjectDefItem(playerWagonID, livestockName, 7, 5.0); } else { everyoneGetsAWagon = 950; rmAddObjectDefItem(playerWagonID, "deTradingPostWagon", 1, 0.0); } } else if (everyoneGetsAWagon == 993) rmAddObjectDefItem(playerWagonID, "deImperialWagon", 1, 0.0); else if (everyoneGetsAWagon == 994) rmAddObjectDefItem(playerWagonID, "BankWagon", 1, 0.0); else if (everyoneGetsAWagon == 995) rmAddObjectDefItem(playerWagonID, "deTorpWagon", 1, 0.0); else if (everyoneGetsAWagon == 996) rmAddObjectDefItem(playerWagonID, "OutpostWagon", 1, 0.0); else if (everyoneGetsAWagon == 997) rmAddObjectDefItem(playerWagonID, "deRedSeaWagon", 1, 0.0); else if (everyoneGetsAWagon == 998) rmAddObjectDefItem(playerWagonID, "SettlerWagon", 1, 0.0); else if (everyoneGetsAWagon == 999) { if (autoCattle != 1) { rmAddObjectDefItem(playerWagonID, "ypShrineWagon", 1, 2.0); rmAddObjectDefItem(playerWagonID, livestockName, 4, 4.0); } else { everyoneGetsAWagon = 950; rmAddObjectDefItem(playerWagonID, "deTradingPostWagon", 1, 0.0); } } else if (everyoneGetsAWagon == 1000) { rmAddObjectDefItem(playerWagonID, "YPDojoWagon", 1, 2.0); rmAddObjectDefItem(playerWagonID, "ypIrregular", 1, 4.0); rmAddObjectDefItem(playerWagonID, "ypPeasant", 1, 4.0); } else if (everyoneGetsAWagon == 1001) { rmAddObjectDefItem(playerWagonID, "deDockWagon", 1, 0.0); rmAddObjectDefItem(playerWagonID, "deCrateofFish", 1, 4.0); } else if (everyoneGetsAWagon == 1002) rmAddObjectDefItem(playerWagonID, "YPGroveWagon", 1, 0.0); else rmAddObjectDefItem(playerWagonID, "deREVStarTrekWagon", 1, 0.0); rmSetObjectDefMinDistance(playerWagonID, 12.0); rmSetObjectDefMaxDistance(playerWagonID, 24.0); rmAddObjectDefConstraint(playerWagonID, shortAvoidImpassableLand); rmAddObjectDefConstraint(playerWagonID, avoidCommandPost); rmAddObjectDefConstraint(playerWagonID, avoidTC); rmAddObjectDefConstraint(playerWagonID, avoidCW); rmAddObjectDefConstraint(playerWagonID, avoidCanyon); rmAddObjectDefConstraint(playerWagonID, avoidTradeRouteSocketShort); rmAddObjectDefConstraint(playerWagonID, avoidTradeRoute); rmAddObjectDefConstraint(playerWagonID, avoidAll); rmAddObjectDefConstraint(playerWagonID, avoidEdge);
|