Ticket #1152: economy.js.patch
File economy.js.patch, 5.5 KB (added by , 12 years ago) |
---|
-
economy.js
14 14 // Greek building list 15 15 // Relative proportions of workers to assign to each resource type 16 16 this.gatherWeights = { 17 "food": 1 80,17 "food": 170, 18 18 "wood": 180, 19 19 "stone": 45, 20 "metal": 1 20,20 "metal": 110, 21 21 }; 22 22 }, 23 23 … … 25 25 if (gameState.displayCiv() == "hele"){ 26 26 this.villageBuildings = [ 27 27 { 28 "template": "structures/{civ}_ scout_tower",28 "template": "structures/{civ}_defense_tower", 29 29 "priority": 105, 30 30 "count": 1, 31 31 }, … … 50 50 else if (gameState.displayCiv() == "celt"){ 51 51 this.villageBuildings = [ 52 52 { 53 "template": "structures/{civ}_ scout_tower",53 "template": "structures/{civ}_defense_tower", 54 54 "priority": 105, 55 55 "count": 1, 56 56 }, … … 75 75 else if (gameState.displayCiv() == "cart"){ 76 76 this.villageBuildings = [ 77 77 { 78 "template": "structures/{civ}_ scout_tower",78 "template": "structures/{civ}_defense_tower", 79 79 "priority": 105, 80 80 "count": 1, 81 81 }, … … 100 100 else if (gameState.displayCiv() == "iber"){ 101 101 this.villageBuildings = [ 102 102 { 103 "template": "structures/{civ}_ scout_tower",103 "template": "structures/{civ}_defense_tower", 104 104 "priority": 105, 105 105 "count": 1, 106 106 }, … … 125 125 else if (gameState.displayCiv() == "pers"){ 126 126 this.villageBuildings = [ 127 127 { 128 "template": "structures/{civ}_ scout_tower",128 "template": "structures/{civ}_defense_tower", 129 129 "priority": 105, 130 130 "count": 1, 131 131 }, … … 147 147 ]; 148 148 } 149 149 150 // Roman building list 151 else if (gameState.displayCiv() == "rome"){ 152 this.villageBuildings = [ 153 { 154 "template": "structures/{civ}_barracks", 155 "priority": 105, 156 "count": 1, 157 }, 158 { 159 "template": "structures/{civ}_field", 160 "priority": 103, 161 "count": 1, 162 }, 163 { 164 "template": "structures/{civ}_defense_tower", 165 "priority": 101, 166 "count": 1, 167 }, 168 { 169 "template": "structures/{civ}_field", 170 "priority": 70, 171 "count": 2, 172 }, 173 ]; 174 } 150 175 // Fallback option just in case 151 176 else { 152 177 this.villageBuildings = [ 153 178 { 154 "template": "structures/{civ}_ scout_tower",179 "template": "structures/{civ}_defense_tower", 155 180 "priority": 105, 156 181 "count": 1, 157 182 }, … … 166 191 "count": 1, 167 192 }, 168 193 { 169 "template": "structures/{civ}_ scout_tower",194 "template": "structures/{civ}_defense_tower", 170 195 "priority": 60, 171 196 "count": 4, 172 197 }, … … 217 242 "priority": 80, 218 243 "count": 1, 219 244 }, 245 { 246 "template": "structures/{civ}_kennel", 247 "priority": 75, 248 "count": 1, 249 }, 220 250 ]; 221 251 } 222 252 // Carthage building list … … 249 279 }, 250 280 ]; 251 281 } 252 // Celtbuilding list282 // Iberian building list 253 283 else if (gameState.displayCiv() == "iber"){ 254 284 this.targetBuildings = [ 255 285 { … … 280 310 }, 281 311 ]; 282 312 } 313 // Roman building list 314 else if (gameState.displayCiv() == "rome"){ 315 this.targetBuildings = [ 316 { 317 "template": "structures/rome_army_camp", 318 "priority": 75, 319 "count": 1, 320 }, 321 { 322 "template": "structures/rome_fortress", 323 "priority": 80, 324 "count": 2, 325 } 326 ]; 327 } 283 328 // Fallback option just in case 284 329 else { 285 330 this.targetBuildings = [ … … 294 339 "count": 1, 295 340 }, 296 341 { 297 "template": "structures/{civ}_ scout_tower",342 "template": "structures/{civ}_defense_tower", 298 343 "priority": 60, 299 344 "count": 4, 300 345 }, … … 408 453 { 409 454 var priority = 140; 410 455 } 411 456 //Hele and Celt Training List 412 457 if (gameState.displayCiv() == "hele" || gameState.displayCiv() == "celt"){ 413 458 if (workNumMod < 0.95){ 414 459 planGroups.economyPersonnel.addPlan(priority, … … 429 474 ); 430 475 } 431 476 } 477 //Carthage Training List 432 478 else if (gameState.displayCiv() == "cart"){ 433 479 if (workNumMod < 0.95){ 434 480 planGroups.economyPersonnel.addPlan(priority, … … 449 495 ); 450 496 } 451 497 } 498 //Iberian Training List 452 499 else if (gameState.displayCiv() == "iber"){ 453 500 if (workNumMod < 0.95){ 454 501 planGroups.economyPersonnel.addPlan(priority, … … 469 516 ); 470 517 } 471 518 } 519 //Persian Training List 472 520 else if (gameState.displayCiv() == "pers"){ 473 521 if (workNumMod < 0.95){ 474 522 planGroups.economyPersonnel.addPlan(priority, … … 489 537 ); 490 538 } 491 539 } 540 //Roman Training List 541 else if (gameState.displayCiv() == "rome"){ 542 if (workNumMod < 0.95){ 543 planGroups.economyPersonnel.addPlan(priority, 544 new UnitTrainingPlan(gameState, 545 "units/{civ}_support_female_citizen", 2, { "role": "worker" }) 546 ); 547 } 548 else if (workNumMod > 1.3) { 549 planGroups.economyPersonnel.addPlan(priority, 550 new UnitTrainingPlan(gameState, 551 "units/{civ}_infantry_swordsman_b", 2, { "role": "militia" }) 552 ); 553 } 554 else if (workNumMod > 1.6) { 555 planGroups.economyPersonnel.addPlan(priority, 556 new UnitTrainingPlan(gameState, 557 "units/{civ}_infantry_spearman_a", 2, { "role": "militia" }) 558 ); 559 } 560 else { 561 planGroups.economyPersonnel.addPlan(priority, 562 new UnitTrainingPlan(gameState, 563 "units/{civ}_infantry_javelinist_b", 2, { "role": "militia" }) 564 ); 565 } 566 } 567 //Any Other Civ Training List 492 568 else { 493 569 planGroups.economyPersonnel.addPlan(priority, 494 570 new UnitTrainingPlan(gameState,