Reduce train gold from 50k->25k for teammates (#1933)

## Description:

Team games have been too fast because teammates can create large
networks. Reduce the bonus from 50k=>25k

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
This commit is contained in:
evanpelle
2025-08-25 16:35:15 -07:00
committed by GitHub
parent 0f60825b9f
commit 42f0b5cf69
3 changed files with 13 additions and 6 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ export interface Config {
numPlayerPorts: number,
numPlayerTradeShips: number,
): number;
trainGold(rel: "self" | "friendly" | "other"): Gold;
trainGold(rel: "self" | "team" | "ally" | "other"): Gold;
trainSpawnRate(numPlayerFactories: number): number;
trainStationMinRange(): number;
trainStationMaxRange(): number;
+3 -2
View File
@@ -333,10 +333,11 @@ export class DefaultConfig implements Config {
// expected number of trains = numPlayerFactories / trainSpawnRate(numPlayerFactories)
return (numPlayerFactories + 10) * 20;
}
trainGold(rel: "self" | "friendly" | "other"): Gold {
trainGold(rel: "self" | "team" | "ally" | "other"): Gold {
switch (rel) {
case "friendly":
case "ally":
return 50_000n;
case "team":
case "other":
return 25_000n;
case "self":
+9 -3
View File
@@ -233,12 +233,18 @@ export class Cluster {
}
}
function rel(player: Player, other: Player): "self" | "friendly" | "other" {
function rel(
player: Player,
other: Player,
): "self" | "team" | "ally" | "other" {
if (player === other) {
return "self";
}
if (player.isFriendly(other)) {
return "friendly";
if (player.isOnSameTeam(other)) {
return "team";
}
if (player.isAlliedWith(other)) {
return "ally";
}
return "other";
}