Make soldiers carry less resources.
This commit is contained in:
parent
2dffb2dcac
commit
42b8dae615
@ -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,
|
||||
},
|
||||
},
|
||||
|
@ -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 }
|
||||
<div>
|
||||
<p>{ building.name }</p>
|
||||
<Cost cost={ building.cost(1) } />
|
||||
<button on:click={ () => build(building.type) }>Build</button>
|
||||
</div>
|
||||
{ /each }
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ export interface UnitType {
|
||||
name: string;
|
||||
cost: CostType;
|
||||
behavior: {
|
||||
caryingCapacity: number;
|
||||
foodIntakePerMinute: number;
|
||||
culturePerMinute?: number;
|
||||
}
|
||||
|
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user