24 lines
1.1 KiB
JavaScript
24 lines
1.1 KiB
JavaScript
// Road network tuning. Roads are tile improvements laid down once during world
|
|
// generation: they connect the cities with a sparse, near-shortest network and
|
|
// make movement cost the same on every terrain they cross.
|
|
|
|
import { TRANSPORT_BY_ID } from "./improvements.js";
|
|
|
|
export const ROADS = {
|
|
// Travel multiplier while a unit stands on a road tile, taken from the road
|
|
// improvement so the two stay in step. Like the railway it is flat, unlike the
|
|
// terrain multipliers, so a road levels out hills and forests.
|
|
movementCostMultiplier: TRANSPORT_BY_ID.road.movementCostMultiplier,
|
|
// A road tile's generation cost is costBase raised to the terrain's own
|
|
// movement multiplier, so hills and mountains are exponentially dearer to
|
|
// run a road through than plains.
|
|
costBase: 2.0,
|
|
// Cities already have a road, so they cost nothing to include in a route.
|
|
cityCost: 0,
|
|
// Stretch factor of the greedy geometric spanner that picks which city pairs
|
|
// are actually connected.
|
|
spannerStretch: 2,
|
|
// The label a road contributes to a tile's improvement list.
|
|
improvementName: "Road",
|
|
};
|