chore: reduce minimum trade route distance from 8 to 6 tiles

Lower the minimum distance requirement for establishing trade routes
from 8 to 6 tiles, making caravan routes more accessible. Also refactors
the log message in CivilizationGame to use the TRADE_ROUTE_MIN_DIST
constant instead of a hardcoded value.
This commit is contained in:
Brian Fertig 2026-07-17 11:11:59 -06:00
parent b214f6b8bd
commit 02b14b88c8
2 changed files with 2 additions and 2 deletions

View File

@ -1014,7 +1014,7 @@ export default class CivilizationGame extends Phaser.Scene {
tryCaravan(unit) { tryCaravan(unit) {
const pair = Logic.canEstablishRoute(this.rules, this.state, unit); const pair = Logic.canEstablishRoute(this.rules, this.state, unit);
if (!pair) { this.logMessage('Caravans need a city 8+ tiles from home'); return; } if (!pair) { this.logMessage(`Caravans need a city ${Logic.TRADE_ROUTE_MIN_DIST}+ tiles from home`); return; }
const out = Logic.establishTradeRoute(this.rules, this.state, unit); const out = Logic.establishTradeRoute(this.rules, this.state, unit);
if (out) { if (out) {
this.announceStatus(`Trade route: ${out.from.name}${out.to.name} (+${out.bonus} gold & beakers)`); this.announceStatus(`Trade route: ${out.from.name}${out.to.name} (+${out.bonus} gold & beakers)`);

View File

@ -1344,7 +1344,7 @@ export function makeContacts(rules, state, civIdx, x, y) {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Trade routes (caravans) // Trade routes (caravans)
export const TRADE_ROUTE_MIN_DIST = 8; export const TRADE_ROUTE_MIN_DIST = 6;
export const MAX_ROUTES = 3; export const MAX_ROUTES = 3;
export function canEstablishRoute(rules, state, unit) { export function canEstablishRoute(rules, state, unit) {