Make soldiers carry less resources.
This commit is contained in:
parent
2dffb2dcac
commit
42b8dae615
@ -9,6 +9,7 @@ export default [
|
|||||||
food: 0,
|
food: 0,
|
||||||
},
|
},
|
||||||
behavior: {
|
behavior: {
|
||||||
|
caryingCapacity: 2,
|
||||||
culturePerMinute: 1,
|
culturePerMinute: 1,
|
||||||
foodIntakePerMinute: 2,
|
foodIntakePerMinute: 2,
|
||||||
},
|
},
|
||||||
@ -23,6 +24,7 @@ export default [
|
|||||||
food: 0,
|
food: 0,
|
||||||
},
|
},
|
||||||
behavior: {
|
behavior: {
|
||||||
|
caryingCapacity: 4,
|
||||||
foodIntakePerMinute: 1,
|
foodIntakePerMinute: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import buildings from "../data/buildings";
|
import buildings from "../data/buildings";
|
||||||
import moves from "../moves";
|
import moves from "../moves";
|
||||||
import showBuildingCreator from "../stores/showBuildingCreator";
|
import showBuildingCreator from "../stores/showBuildingCreator";
|
||||||
|
import Cost from "./Cost.svelte";
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
showBuildingCreator.set(null);
|
showBuildingCreator.set(null);
|
||||||
@ -34,6 +35,7 @@
|
|||||||
{ #each constructible as building }
|
{ #each constructible as building }
|
||||||
<div>
|
<div>
|
||||||
<p>{ building.name }</p>
|
<p>{ building.name }</p>
|
||||||
|
<Cost cost={ building.cost(1) } />
|
||||||
<button on:click={ () => build(building.type) }>Build</button>
|
<button on:click={ () => build(building.type) }>Build</button>
|
||||||
</div>
|
</div>
|
||||||
{ /each }
|
{ /each }
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import type { OasisType, RegionType } from "./types";
|
import type { OasisType, RegionType } from "./types";
|
||||||
|
import { getUnitSource } from "./utils";
|
||||||
import type { VillageState } from "./village";
|
import type { VillageState } from "./village";
|
||||||
|
|
||||||
|
|
||||||
@ -26,6 +27,8 @@ function resolvePillageOasis(V: VillageState, region: OasisType) {
|
|||||||
return;
|
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;
|
delete region.state.mission;
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,7 @@ export interface UnitType {
|
|||||||
name: string;
|
name: string;
|
||||||
cost: CostType;
|
cost: CostType;
|
||||||
behavior: {
|
behavior: {
|
||||||
|
caryingCapacity: number;
|
||||||
foodIntakePerMinute: number;
|
foodIntakePerMinute: number;
|
||||||
culturePerMinute?: number;
|
culturePerMinute?: number;
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ function getInitialState() {
|
|||||||
}
|
}
|
||||||
const newBuilding = createBuilding(type);
|
const newBuilding = createBuilding(type);
|
||||||
newBuilding.tile = new Hex(x, y);
|
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.outsideTiles[y][x] = newBuilding.id;
|
||||||
state.buildings.push(newBuilding);
|
state.buildings.push(newBuilding);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user