/* TGC Reference - "buildings": buildingID based collection of "Building" objects; - "units": unitID based collection of "Unit" objects; - "villages": villageID based collection of "Village" objects; - "bonuses": buildingID based collection of "Bonus" objects; */ Village = { id: "someVillageID", name: "Some Village Name", x: 547, y: 758, continent: 'K77', points: 888, wood: 1000, stone: 1000, iron: 1000, storage: 5000, population: 100, maxPopulation: 999, buildings: { // "buildingID" : "buildingLevel" main: 1, place: 1, wood: 10, iron: 11, ... }, queue: { // lists are ordered by ETA! main: [ { ref: [Building], num: [Number], // level end: [epoch] } //, ... ], // garrage, stable, snob - same barracks: [ { ref: [Unit], num: [Number], end: [epoch] } //, ... ], garage: [ { ref: [Unit], num: [Number], end: [epoch] } //, ... ], smith: [ { ref: [Unit], num: 1, end: [epoch] } //, ... ], snob: [ { ref: [Unit], // "snob" num: 1, end: [epoch] } //, ... ], stable: [ { ref: [Unit], num: [Number], end: [epoch] } //, ... ] } }; Building = { id: "main", name: "Cl\u0103direa principal\u0103", icon: "graphic/buildings/main.png", help: "popup_building.php?building=main", desc: "\xCEn cl\u0103direa principal\u0103 pot fi construite cl\u0103diri noi sau \xEEmbun\u0103t\u0103\u0163ite cl\u0103dirile existente. Cu c\xE2t mai \xEEnalt nivelul, cu at\xE2t mai repede pot fi construite cl\u0103diri noi. \xCEn momentul \xEEn care cl\u0103direa principal\u0103 a atins nivelul 15, ai posibilitatea s\u0103 demolezi cl\u0103diri.", levels: [ {}, // dummy level for "level 0", for the ease of coding ;-) { level: 1, points: 10, wood: 90, stone: 80, iron: 70, workersL: 5, // workers required "for the level" workers: 5, // total workers bonus: 95 }, ... ] }; Unit = { id: "spear", name: "L\u0103ncier", icon: "graphic/unit/unit_spear.png", help: "popup_unit.php?unit=spear", wood: 50, stone: 30, iron: 10, workers: 1, attack: 10, defense: 15, defenseCavalry: 45, defenseArchery: 20, speed: 9, booty: 25 }; Bonus = { desc:'Timp de construc\u0163ie', template:'#{bonus}%' };