diff --git a/src/modules/fortune/index.ts b/src/modules/fortune/index.ts index dac4c37..1cfe86d 100644 --- a/src/modules/fortune/index.ts +++ b/src/modules/fortune/index.ts @@ -3,7 +3,7 @@ import Module from '../../module'; import Message from '../../message'; import serifs from '../../serifs'; import * as seedrandom from 'seedrandom'; -import { blessing, itemPrefixes, items } from './vocabulary'; +import { blessing, itemPrefixes, items, and } from './vocabulary'; export default class extends Module { public readonly name = 'fortune'; @@ -22,9 +22,15 @@ export default class extends Module { const seed = `${date.getFullYear()}/${date.getMonth()}/${date.getDate()}@${msg.userId}`; const rng = seedrandom(seed); const omikuji = blessing[Math.floor(rng() * blessing.length)]; - const itemPrefix = Math.floor(rng() * 5) != 0 ? itemPrefixes[Math.floor(rng() * itemPrefixes.length)] : ''; - const item = items[Math.floor(rng() * items.length)]; - msg.reply(`**${omikuji}🎉**\nラッキーアイテム: ${itemPrefix}${item}`, serifs.fortune.cw(msg.friend.name)); + let item = ''; + if (Math.floor(rng() * 5) !== 0) item += itemPrefixes[Math.floor(rng() * itemPrefixes.length)]; + item += items[Math.floor(rng() * items.length)]; + if (Math.floor(rng() * 3) === 0) { + item += and[Math.floor(rng() * and.length)]; + if (Math.floor(rng() * 5) !== 0) item += itemPrefixes[Math.floor(rng() * itemPrefixes.length)]; + item += items[Math.floor(rng() * items.length)]; + } + msg.reply(`**${omikuji}🎉**\nラッキーアイテム: ${item}`, serifs.fortune.cw(msg.friend.name)); return true; } else { return false; diff --git a/src/modules/fortune/vocabulary.ts b/src/modules/fortune/vocabulary.ts index 8766ef4..583e041 100644 --- a/src/modules/fortune/vocabulary.ts +++ b/src/modules/fortune/vocabulary.ts @@ -210,4 +210,20 @@ export const items = [ '油圧ジャッキ', 'タピオカ', 'トイレットペーパーの芯', + 'ダンボール箱', + 'ハニワ', + 'ボールペン', + 'シャーペン', +]; + +export const and = [ + 'に擬態した', + '入りの', + 'が埋め込まれた', + 'を連想させる', + 'っぽい', + 'に見せかけて', + 'を虐げる', + 'が上に乗った', + 'のそばにある', ];