Have trains produce more gold (#1759)

During the play test, trains did not produce enough gold. So increase
gold, and give 4x bonus for allies.

- [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
- [x] I have read and accepted the CLA agreement (only required once).

regression is found:

evan
This commit is contained in:
evanpelle
2025-08-08 18:38:16 -07:00
committed by Scott Anderson
parent 70b7464a4b
commit 0e0ec67dcd
4 changed files with 19 additions and 20 deletions
+5 -4
View File
@@ -16,7 +16,8 @@ describe("TrainStation", () => {
game = {
ticks: jest.fn().mockReturnValue(123),
config: jest.fn().mockReturnValue({
trainGold: () => BigInt(4000),
trainGold: (isFriendly: boolean) =>
isFriendly ? BigInt(1000) : BigInt(500),
}),
addUpdate: jest.fn(),
addExecution: jest.fn(),
@@ -50,7 +51,7 @@ describe("TrainStation", () => {
station.onTrainStop(trainExecution);
expect(unit.owner().addGold).toHaveBeenCalledWith(4000n, unit.tile());
expect(unit.owner().addGold).toHaveBeenCalledWith(1000n, unit.tile());
});
it("handles allied trade", () => {
@@ -60,9 +61,9 @@ describe("TrainStation", () => {
station.onTrainStop(trainExecution);
expect(unit.owner().addGold).toHaveBeenCalledWith(5000n, unit.tile());
expect(unit.owner().addGold).toHaveBeenCalledWith(2000n, unit.tile());
expect(trainExecution.owner().addGold).toHaveBeenCalledWith(
5000n,
2000n,
unit.tile(),
);
});