Files
Battle-for-Tismo/shared/data/roads.js
T
adrien 3acd2487df Added roads, regional taxation and a reworked budget view
Roads are pre-generated between cities with a greedy geometric spanner and flatten unit movement cost. City improvements now only affect the tiles their region controls, with per-region tax collection and a Cities tab. The budget is a grouped, scrollable table with 25%/year tax and a 10%-of-GDP opening treasury. Also merged the tile info into the city panel, kept conflict and budget expansion state across snapshots, added join notifications, filled border corners, drew battle sides as stacks and made tab overflow scroll.
2026-09-18 07:11:59 +02:00

21 lines
945 B
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.
export const ROADS = {
// Travel multiplier while a unit stands on a road tile. It is flat, unlike
// the terrain multipliers, so a road levels out hills and forests.
movementCostMultiplier: 1.0,
// 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",
};