mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-08-27 19:44:50 -05:00
Scavenger games: Allow finishers to continue and announce correctly
This commit is contained in:
@@ -221,7 +221,7 @@ const MODES: {[k: string]: GameMode | string} = {
|
||||
|
||||
onJoin(user: User) {
|
||||
const game = this.room.scavgame!;
|
||||
if (game.playerlist && game.playerlist.includes(user.id)) {
|
||||
if (game.playerlist && !game.playerlist.includes(user.id)) {
|
||||
user.sendTo(this.room, 'You are not allowed to join this scavenger hunt.');
|
||||
return true;
|
||||
}
|
||||
@@ -230,7 +230,7 @@ const MODES: {[k: string]: GameMode | string} = {
|
||||
onAfterEnd() {
|
||||
const game = this.room.scavgame!;
|
||||
if (!this.completed.length) {
|
||||
this.announce('No one has completd the hunt - the round has been void.');
|
||||
this.announce('No one has completed the hunt - the round has been void.');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ const MODES: {[k: string]: GameMode | string} = {
|
||||
// elimination
|
||||
if (!game.playerlist) {
|
||||
game.playerlist = this.completed.map(entry => toID(entry.name));
|
||||
this.announce(`Round ${game.round} - ${Chat.toListString(this.players.map(p => `<em>${p.name}</em>`))} have successfully completed the last hunt and have moved on to the next round!`);
|
||||
this.announce(`Round ${game.round} - ${Chat.toListString(this.completed.map(p => `<em>${p.name}</em>`))} have successfully completed the last hunt and have moved on to the next round!`);
|
||||
} else {
|
||||
let eliminated = [];
|
||||
const completed = this.completed.map(entry => toID(entry.name)) as string[];
|
||||
|
||||
Reference in New Issue
Block a user