From 4626f4dc4ae8ff89ddb87d25745c505750bffd8a Mon Sep 17 00:00:00 2001 From: djmrFunnyMan <68905776+djmrFunnyMan@users.noreply.github.com> Date: Sat, 2 Aug 2025 07:22:12 +0200 Subject: [PATCH] Remove gold from dead players (#1450) Fixes #1519 ## Description: Currently if a player is killed via a nuke, they keep their gold despite being eliminated and other players have no way to access that gold as there is no territory to conquer. This PR fixes this by removing gold from dead players. This doesn't affect gameplay itself, because that gold was already inaccessible. It'll just be clearer to the remaining players now. Zrzut ekranu 2025-07-16 210908 ^ This is what this PR fixes ## 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 - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: aceralex --- src/core/execution/PlayerExecution.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/execution/PlayerExecution.ts b/src/core/execution/PlayerExecution.ts index 6405eb04d..913ea0c1d 100644 --- a/src/core/execution/PlayerExecution.ts +++ b/src/core/execution/PlayerExecution.ts @@ -41,7 +41,9 @@ export class PlayerExecution implements Execution { }); if (!this.player.isAlive()) { - // Player has no tiles, delete any remaining units + // Player has no tiles, delete any remaining units and gold + const gold = this.player.gold(); + this.player.removeGold(gold); this.player.units().forEach((u) => { if ( u.type() !== UnitType.AtomBomb &&