From ead83e4bde05ec05ca6ccfccdcc16106d7767aef Mon Sep 17 00:00:00 2001 From: dot-Comfey <84290266+dot-Comfey@users.noreply.github.com> Date: Tue, 16 Apr 2024 19:00:31 -0700 Subject: [PATCH] Empoleon's Empires: clear current player after removal (#89) --- src/games/empoleons-empires.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/games/empoleons-empires.ts b/src/games/empoleons-empires.ts index 3d563651..754fb0f3 100644 --- a/src/games/empoleons-empires.ts +++ b/src/games/empoleons-empires.ts @@ -24,10 +24,10 @@ class EmpoleonsEmpires extends ScriptedGame { onRemovePlayer(player: Player): void { if (this.started) { if (this.currentPlayer === player) { + this.currentPlayer = null; void this.nextRound(); return; } - if (this.getRemainingPlayerCount() < 2) this.end(); } } @@ -236,7 +236,8 @@ const commands: GameCommandDefinitions = { return false; } - this.removePlayer(targetPlayer.name); + this.removePlayer(targetPlayer.name, true); + targetPlayer.say("You were DQed from " + this.name + " by " + user.name + " for using an inappropriate alias."); (this.room as Room).modnote(user.name + " DQed " + targetPlayer.name + " from " + this.name + " for using the alias '" + target.trim() + "'."); return true;