- Tile improvements (fortifications, radar towers, coastal cannons), trenches, zone of control, support-unit capture and launch transports, with parabolic barrage arcs drawn between attacker and target. - Focused research that pours points straight into the chosen technology, with per-technology progress kept when the focus changes, plus repeatable levels. - Popularity reworked to integer points, war and pillage effects, minority policies and month-over-month arrows on the nation summary. - City progress bars, square improvement buttons, a technology tab of wide short cards with progress bars, transport cargo readout and double-click to open a city panel.
92 lines
2.8 KiB
JavaScript
92 lines
2.8 KiB
JavaScript
// Player-buildable tile improvements. A tile carries at most one, laid down on
|
|
// land the civilisation controls: a road or a railway, the latter twice as fast
|
|
// again as a road. Both are bought outright and then cost an hourly maintenance
|
|
// for every tile of the network a nation holds.
|
|
|
|
export const TRANSPORT_IMPROVEMENTS = [
|
|
{
|
|
id: "road",
|
|
name: "Road",
|
|
// The texture the client draws the tile with.
|
|
texture: "road",
|
|
// Travel multiplier once a unit is on the tile. Unimproved grass is 1.0, so
|
|
// a road moves twice as fast and a railway twice as fast again (50% faster
|
|
// than a road).
|
|
movementCostMultiplier: 0.5,
|
|
buildCost: 50_000_000,
|
|
maintenance: 100_000,
|
|
icon: "icon_road.svg",
|
|
},
|
|
{
|
|
id: "railway",
|
|
name: "Railway",
|
|
texture: "rail",
|
|
movementCostMultiplier: 0.25,
|
|
buildCost: 150_000_000,
|
|
maintenance: 300_000,
|
|
icon: "icon_railway.svg",
|
|
},
|
|
];
|
|
|
|
export const TRANSPORT_BY_ID = Object.fromEntries(
|
|
TRANSPORT_IMPROVEMENTS.map((improvement) => [improvement.id, improvement])
|
|
);
|
|
|
|
export function transportImprovement(id) {
|
|
return TRANSPORT_BY_ID[id] || null;
|
|
}
|
|
|
|
// Player-buildable military tile improvements. Unlike transport, these take
|
|
// construction time (the same GDP-scaled formula as buildings and units) and
|
|
// cost an hourly maintenance. A tile may carry one of these plus a road or
|
|
// railway. `defense` is the extra fraction of base defense granted to units
|
|
// stationed there against melee and artillery fire.
|
|
export const TILE_IMPROVEMENTS = [
|
|
{
|
|
id: "fortifications",
|
|
name: "Fortifications",
|
|
description:
|
|
"Earthworks and bunkers. Holds a permanent area of control, shelters its garrison and takes damage in combat.",
|
|
buildCost: 200_000_000,
|
|
maintenance: 10_000,
|
|
vision: 2,
|
|
defense: { melee: 2.0, artillery: 4.0 },
|
|
permanentControl: true,
|
|
takesCombatDamage: true,
|
|
icon: "icon_fortifications.svg",
|
|
},
|
|
{
|
|
id: "radar_tower",
|
|
name: "Radar tower",
|
|
description:
|
|
"Watches five tiles out. A ranged hit damages it and an enemy walking onto it captures it.",
|
|
buildCost: 60_000_000,
|
|
maintenance: 1000,
|
|
vision: 5,
|
|
takesRangedDamage: true,
|
|
capturable: true,
|
|
icon: "icon_radar_tower.svg",
|
|
},
|
|
{
|
|
id: "coastal_cannon",
|
|
name: "Coastal cannon",
|
|
description:
|
|
"Automatically fires on hostile warships within two tiles. Only a coastal tile can carry one.",
|
|
buildCost: 120_000_000,
|
|
maintenance: 2000,
|
|
range: 2,
|
|
automatic: true,
|
|
takesDamage: true,
|
|
coastal: true,
|
|
icon: "icon_coastal_cannon.svg",
|
|
},
|
|
];
|
|
|
|
export const TILE_IMPROVEMENT_BY_ID = Object.fromEntries(
|
|
TILE_IMPROVEMENTS.map((improvement) => [improvement.id, improvement])
|
|
);
|
|
|
|
export function tileImprovementById(id) {
|
|
return TILE_IMPROVEMENT_BY_ID[id] || null;
|
|
}
|