Compare commits

..

No commits in common. "435ff3a4b5041737f6cecd7efa1711f1b9b7766c" and "d257f93f3ea93a2c93b36d8ca25773d14bdf89fd" have entirely different histories.

3 changed files with 7 additions and 12 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "schat2-clive",
"version": "1.19.1",
"version": "1.19.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "schat2-clive",
"version": "1.19.1",
"version": "1.19.0",
"license": "ISC",
"dependencies": {
"bhttp": "^1.2.8",

View File

@ -1,6 +1,6 @@
{
"name": "schat2-clive",
"version": "1.19.1",
"version": "1.19.0",
"description": "Game host for SChat 2-powered chat sites",
"main": "src/app.js",
"scripts": {

View File

@ -74,9 +74,7 @@ function playLetter(playedLetter, context) {
renderBoard(context);
if (game.partial.every((letter) => letter !== null)) {
context.sendMessage(`${style.bold('The word was completed.')} ${context.user.prefixedUsername} gets a point!`, context.room.id);
context.setPoints(context.user);
context.sendMessage(style.bold('The word was completed!'), context.room.id);
games.delete(context.room.id);
}
}
@ -93,10 +91,8 @@ function playWord(word, context) {
return;
}
if (Math.abs(game.word.length - word.length) <= 1 && word.split('').some((letter, index) => game.word[index] === letter)) {
context.sendMessage(`That's not it, ${context.user.prefixedUsername}.`, context.room.id);
progress(context);
}
context.sendMessage('That\'s not it', context.room.id);
progress(context);
}
function stop(context) {
@ -128,7 +124,7 @@ function onCommand(args, context) {
return;
}
context.logger.info(`Hangman played '${word.word}' with ${getGuesses(word)} guesses`);
context.logger.info(`Hangman played ${word.word} with ${getGuesses(word)} guesses`);
games.set(context.room.id, {
word: word.word,
@ -164,5 +160,4 @@ module.exports = {
onCommand,
onMessage,
commands: ['hangman'],
help: `Guess the word before the predator reaches its prey! Essentially, horizontal Hangman. Try ${config.prefix}hunt [length] for a specific word length.`,
};