Added PASS admin command
Fixed current longest check for messaging Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
30bb9870da
commit
fecb9c00ba
@ -587,6 +587,17 @@ const adminActions = (game, action, value) => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "pass":
|
||||||
|
let name = game.turn.name;
|
||||||
|
const next = getNextPlayer(game, name);
|
||||||
|
game.turn = {
|
||||||
|
name: next,
|
||||||
|
color: getColorFromName(game, next)
|
||||||
|
};
|
||||||
|
addChatMessage(game, null, `The admin skipped ${name}'s turn.`);
|
||||||
|
addChatMessage(game, null, `It is ${next}'s turn.`);
|
||||||
|
break;
|
||||||
|
|
||||||
case "kick":
|
case "kick":
|
||||||
switch (value) {
|
switch (value) {
|
||||||
@ -945,7 +956,7 @@ const calculateRoadLengths = (game, session) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const checkForTies = false;
|
const checkForTies = false;
|
||||||
if (currentLongest && game.players[game.currentLongest].roadLength < currentLength) {
|
if (currentLongest && game.players[currentLongest].roadLength < currentLength) {
|
||||||
addChatMessage(game, session, `${getPlayerNameFromColor(game, game.currentLongest)} had their longest road split!`);
|
addChatMessage(game, session, `${getPlayerNameFromColor(game, game.currentLongest)} had their longest road split!`);
|
||||||
checkForTies = true;
|
checkForTies = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user