From 2151d267fae3637cec8e79cb026aef0c48286de9 Mon Sep 17 00:00:00 2001 From: Doo Date: Tue, 3 Jun 2025 16:22:13 +0200 Subject: [PATCH] Fixnukeboatbug (#1011) ## Description: Fixes : https://github.com/openfrontio/OpenFrontIO/issues/958 Use the actual troop count on the boat unit when it lands, not the original this.troops value. Tested locally with all nukes type and it works fine. ## 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: .doo --------- Co-authored-by: rldtech Co-authored-by: tnhnblgl <51187395+tnhnblgl@users.noreply.github.com> --- src/core/execution/TransportShipExecution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/execution/TransportShipExecution.ts b/src/core/execution/TransportShipExecution.ts index 8d59d34d9..8851d8fdf 100644 --- a/src/core/execution/TransportShipExecution.ts +++ b/src/core/execution/TransportShipExecution.ts @@ -176,7 +176,7 @@ export class TransportShipExecution implements Execution { switch (result.type) { case PathFindResultType.Completed: if (this.mg.owner(this.dst) === this.attacker) { - this.attacker.addTroops(this.troops); + this.attacker.addTroops(this.boat.troops()); this.boat.delete(false); this.active = false;