diff --git a/src/data/units.ts b/src/data/units.ts
index 47f4450..fbeb2ad 100644
--- a/src/data/units.ts
+++ b/src/data/units.ts
@@ -9,6 +9,7 @@ export default [
food: 0,
},
behavior: {
+ caryingCapacity: 2,
culturePerMinute: 1,
foodIntakePerMinute: 2,
},
@@ -23,6 +24,7 @@ export default [
food: 0,
},
behavior: {
+ caryingCapacity: 4,
foodIntakePerMinute: 1,
},
},
diff --git a/src/hud/BuildingCreator.svelte b/src/hud/BuildingCreator.svelte
index 4c411af..ad9ad9f 100644
--- a/src/hud/BuildingCreator.svelte
+++ b/src/hud/BuildingCreator.svelte
@@ -2,6 +2,7 @@
import buildings from "../data/buildings";
import moves from "../moves";
import showBuildingCreator from "../stores/showBuildingCreator";
+ import Cost from "./Cost.svelte";
function close() {
showBuildingCreator.set(null);
@@ -34,6 +35,7 @@
{ #each constructible as building }
{ building.name }
+
{ /each }
diff --git a/src/missions.ts b/src/missions.ts
index f38ee36..ca7a39d 100644
--- a/src/missions.ts
+++ b/src/missions.ts
@@ -1,4 +1,5 @@
import type { OasisType, RegionType } from "./types";
+import { getUnitSource } from "./utils";
import type { VillageState } from "./village";
@@ -26,6 +27,8 @@ function resolvePillageOasis(V: VillageState, region: OasisType) {
return;
}
- V.resources[region.resource] += mission.unitCount * 40;
+ const unit = getUnitSource('soldier');
+
+ V.resources[region.resource] += mission.unitCount * unit.behavior.caryingCapacity;
delete region.state.mission;
}
diff --git a/src/types.ts b/src/types.ts
index ef137e9..5260c9e 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -58,6 +58,7 @@ export interface UnitType {
name: string;
cost: CostType;
behavior: {
+ caryingCapacity: number;
foodIntakePerMinute: number;
culturePerMinute?: number;
}
diff --git a/src/village.ts b/src/village.ts
index fc5ad2d..e9b4952 100644
--- a/src/village.ts
+++ b/src/village.ts
@@ -119,7 +119,7 @@ function getInitialState() {
}
const newBuilding = createBuilding(type);
newBuilding.tile = new Hex(x, y);
- newBuilding.level = newBuilding.type === 'field' ? 1 : 10;
+ newBuilding.level = 1; //newBuilding.type === 'field' ? 1 : 10;
state.outsideTiles[y][x] = newBuilding.id;
state.buildings.push(newBuilding);
});