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:
parent
b214f6b8bd
commit
02b14b88c8
|
|
@ -1014,7 +1014,7 @@ export default class CivilizationGame extends Phaser.Scene {
|
|||
|
||||
tryCaravan(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);
|
||||
if (out) {
|
||||
this.announceStatus(`Trade route: ${out.from.name} ↔ ${out.to.name} (+${out.bonus} gold & beakers)`);
|
||||
|
|
|
|||
|
|
@ -1344,7 +1344,7 @@ export function makeContacts(rules, state, civIdx, x, y) {
|
|||
// ---------------------------------------------------------------------------
|
||||
// Trade routes (caravans)
|
||||
|
||||
export const TRADE_ROUTE_MIN_DIST = 8;
|
||||
export const TRADE_ROUTE_MIN_DIST = 6;
|
||||
export const MAX_ROUTES = 3;
|
||||
|
||||
export function canEstablishRoute(rules, state, unit) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue