From ee245cd7879615196ced1226fb47fa04b3bb8e0c Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 2 Sep 2018 19:06:39 +0900 Subject: [PATCH] Improve AI --- src/modules/core/index.ts | 11 +++++++++++ src/serifs.ts | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index 5b9630b..8041e20 100644 --- a/src/modules/core/index.ts +++ b/src/modules/core/index.ts @@ -33,6 +33,7 @@ export default class CoreModule implements IModule { this.greet(msg) || this.nadenade(msg) || this.kawaii(msg) || + this.humu(msg) || this.batou(msg) || this.ponkotu(msg) ); @@ -208,6 +209,16 @@ export default class CoreModule implements IModule { return true; } + private humu = (msg: MessageLike): boolean => { + if (!includes(msg.text, ['踏んで'])) return false; + + msg.reply( + msg.friend.love <= -3 ? serifs.core.humu.hate : + serifs.core.humu.normal); + + return true; + } + private batou = (msg: MessageLike): boolean => { if (!includes(msg.text, ['罵倒して', '罵って'])) return false; diff --git a/src/serifs.ts b/src/serifs.ts index f3b844d..00d0b0b 100644 --- a/src/serifs.ts +++ b/src/serifs.ts @@ -46,6 +46,12 @@ export default { hate: '…ありがとうございます' }, + humu: { + normal: 'え、えっと…… ふみふみ……… どうですか…?', + + hate: '…' + }, + batou: { love: 'AIに罵られたいって... ちょっと引きます',