Improved Letters distribution. Added conundrum to mash.
This commit is contained in:
@@ -48,7 +48,12 @@ function start(length, context, attempt = 0) {
|
||||
|
||||
const newMash = mashes.get(context.room.id);
|
||||
|
||||
context.sendMessage(`Stomp stomp, here's your mash: ${style.bold(style.pink(newMash.anagram))}`, context.room.id);
|
||||
if (context.command === 'conundrum') {
|
||||
context.sendMessage(`Here is your conundrum: ${style.bold(style.pink(newMash.anagram))}`, context.room.id);
|
||||
} else {
|
||||
context.sendMessage(`Stomp stomp, here's your mash: ${style.bold(style.pink(newMash.anagram))}`, context.room.id);
|
||||
}
|
||||
|
||||
context.logger.info(`Mash started, '${anagram}' with answers ${answers.map((answer) => `'${answer.word}'`).join(', ')}`);
|
||||
}
|
||||
|
||||
@@ -193,6 +198,11 @@ function onCommand(args, context) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (context.command === 'conundrum') {
|
||||
start(9, context);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Number.isNaN(length)) {
|
||||
start(length, context);
|
||||
return;
|
||||
@@ -221,7 +231,7 @@ function onMessage(message, context) {
|
||||
|
||||
module.exports = {
|
||||
name: 'Mash',
|
||||
commands: ['mash', 'wordmash', ...defineCommands, ...resolveCommands],
|
||||
commands: ['mash', 'wordmash', 'conundrum', ...defineCommands, ...resolveCommands],
|
||||
onCommand,
|
||||
onMessage,
|
||||
help: `Resolve the anagram. Get a new mash with ${config.prefix}mash [length], look up definitions with ${config.prefix}define [word], resolve an anagram (that's not currently in play) with ${config.prefix}solve [anagram].`,
|
||||
|
||||
Reference in New Issue
Block a user