From af2fa309d98f5fae7c3f6a1746a7f64d4cdf9889 Mon Sep 17 00:00:00 2001 From: E-EE-E <38805542+E-EE-E@users.noreply.github.com> Date: Sat, 7 Jun 2025 12:57:41 +0900 Subject: [PATCH] Update PlayerImpl.ts (#1079) ## Description: The removeTroops function works with the given parameter value of 1. ## 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: _bjkim_ --- src/core/game/PlayerImpl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/game/PlayerImpl.ts b/src/core/game/PlayerImpl.ts index 2b4146b10..1faa13d93 100644 --- a/src/core/game/PlayerImpl.ts +++ b/src/core/game/PlayerImpl.ts @@ -698,7 +698,7 @@ export class PlayerImpl implements Player { this._troops += toInt(troops); } removeTroops(troops: number): number { - if (troops <= 1) { + if (troops <= 0) { return 0; } const toRemove = minInt(this._troops, toInt(troops));