Implement the world wonder.
Before Width: | Height: | Size: 232 KiB After Width: | Height: | Size: 206 KiB |
BIN
public/img/buildings/great-granary.png
Normal file
After Width: | Height: | Size: 204 KiB |
BIN
public/img/buildings/great-warehouse.png
Normal file
After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 158 KiB |
BIN
public/img/buildings/wonder.png
Normal file
After Width: | Height: | Size: 289 KiB |
@ -353,4 +353,35 @@ export default [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'wonder',
|
||||
name: 'World Wonder',
|
||||
maxLevel: 1,
|
||||
unique: true,
|
||||
requiredTownhallLevel: 20,
|
||||
cost: () => {
|
||||
return {
|
||||
wood: 42000,
|
||||
stone: 42000,
|
||||
iron: 42000,
|
||||
food: 38000,
|
||||
};
|
||||
},
|
||||
timeToBuild: () => 120,
|
||||
behavior: {
|
||||
production: (V: VillageState, self: BuildingType) => {
|
||||
const prod = getEmptyResources();
|
||||
prod.food = self.level * -300;
|
||||
return prod;
|
||||
},
|
||||
triggers: {
|
||||
onLevelUp: (V: VillageState, self: BuildingType) => {
|
||||
if (self.level === 1) {
|
||||
// Gain a lot of culture.
|
||||
V.resources.culture += 18000;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -112,6 +112,7 @@ function getInitialState() {
|
||||
|
||||
// Create the Town hall.
|
||||
const townhall = createBuilding('townhall');
|
||||
// townhall.level = 20;
|
||||
state.villageTiles[0][0] = townhall.id;
|
||||
state.buildings.push(townhall);
|
||||
|
||||
@ -134,7 +135,7 @@ function getInitialState() {
|
||||
}
|
||||
const newBuilding = createBuilding(type);
|
||||
newBuilding.tile = new Hex(x, y);
|
||||
newBuilding.level = 20; //newBuilding.type === 'field' ? 1 : 10;
|
||||
newBuilding.level = 1; //20; //newBuilding.type === 'field' ? 1 : 10;
|
||||
state.outsideTiles[y][x] = newBuilding.id;
|
||||
state.buildings.push(newBuilding);
|
||||
});
|
||||
|