mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-16 08:32:49 +00:00
Merge branch 'v26'
This commit is contained in:
@@ -353,7 +353,7 @@ export class DefaultConfig implements Config {
|
||||
trainSpawnRate(numPlayerFactories: number): number {
|
||||
// hyperbolic decay, midpoint at 10 factories
|
||||
// expected number of trains = numPlayerFactories / trainSpawnRate(numPlayerFactories)
|
||||
return (numPlayerFactories + 10) * 20;
|
||||
return (numPlayerFactories + 10) * 16;
|
||||
}
|
||||
trainGold(rel: "self" | "team" | "ally" | "other"): Gold {
|
||||
switch (rel) {
|
||||
@@ -378,7 +378,8 @@ export class DefaultConfig implements Config {
|
||||
}
|
||||
|
||||
tradeShipGold(dist: number, numPorts: number): Gold {
|
||||
const baseGold = Math.floor(100_000 + 100 * dist);
|
||||
// Smooth anti-cheese formula: base reward scales with distance using rational function, heavily penalizing short trades while converging to original rewards at long distances
|
||||
const baseGold = Math.floor(100_000 * (dist / (dist + 50)) + 100 * dist);
|
||||
const numPortBonus = numPorts - 1;
|
||||
// Hyperbolic decay, midpoint at 5 ports, 3x bonus max.
|
||||
const bonus = 1 + 2 * (numPortBonus / (numPortBonus + 5));
|
||||
|
||||
Reference in New Issue
Block a user