mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-28 05:49:47 +00:00
tweaked profits
This commit is contained in:
@@ -370,8 +370,8 @@ export class DefaultConfig implements Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
trainGoldRefillTime(): Tick {
|
trainGoldRefillTime(): Tick {
|
||||||
// Baseline: full refill in 60 ticks
|
// Baseline: full refill in x ticks
|
||||||
return 60;
|
return 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
trainStationMinRange(): number {
|
trainStationMinRange(): number {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { TileRef } from "./GameMap";
|
|||||||
import { GameUpdateType, RailTile, RailType } from "./GameUpdates";
|
import { GameUpdateType, RailTile, RailType } from "./GameUpdates";
|
||||||
import { TrainStation } from "./TrainStation";
|
import { TrainStation } from "./TrainStation";
|
||||||
|
|
||||||
const CONGESTION_EMA_ALPHA = 0.02;
|
const CONGESTION_EMA_ALPHA = 0.05;
|
||||||
|
|
||||||
export class Railroad {
|
export class Railroad {
|
||||||
private trainCount: number = 0;
|
private trainCount: number = 0;
|
||||||
@@ -75,7 +75,7 @@ export class Railroad {
|
|||||||
|
|
||||||
getFare(): bigint {
|
getFare(): bigint {
|
||||||
const baseLengthFare = 10;
|
const baseLengthFare = 10;
|
||||||
const baseCongestionFare = BigInt(1000);
|
const baseCongestionFare = BigInt(5000);
|
||||||
const lengthFare = BigInt(this.getLength() * baseLengthFare); // Base fare proportional to length
|
const lengthFare = BigInt(this.getLength() * baseLengthFare); // Base fare proportional to length
|
||||||
// Busy railroads should be more expensive: each train adds a congestion premium
|
// Busy railroads should be more expensive: each train adds a congestion premium
|
||||||
const effectiveCongestion = Math.max(0, Math.round(this.congestionEma));
|
const effectiveCongestion = Math.max(0, Math.round(this.congestionEma));
|
||||||
|
|||||||
Reference in New Issue
Block a user