插件推荐 : koishi-plugin-game-mini 一款为 Koishi 聊天机器人框架开发的轻量级多功能小游戏插件,包含经典猜数字、猜王者荣耀英雄、看图猜成语、成语接龙、算24点五款趣味游戏

koishi-plugin-game-mini

项目介绍 (Project Introduction)

中文

这是一款为 Koishi 聊天机器人框架开发的轻量级多功能小游戏插件,包含经典猜数字、猜王者荣耀英雄、看图猜成语、成语接龙、算24点五款趣味游戏

English

This is a lightweight, multi-functional mini-game plugin developed for the Koishi chatbot framework. It includes five fun games: Guess the Number, Guess the King of Glory Hero, Guess the Idiom from the Picture, Idiom Chain, and 24 Points.

使用说明 (Usage)

中文

命令 (Command) 功能说明 (Description)
猜数字游戏
猜数字 开始 启动猜数字游戏,初始范围为配置的最小值-最大值
直接输入数字 游戏运行时输入纯数字即可猜测,系统会实时提示“猜大了/猜小了”并缩小范围,或提示“猜对了”并开始新回合
猜数字 结束 停止当前猜数字游戏
王者英雄猜谜
猜王者英雄 开始 启动王者英雄猜谜游戏,使用配置的默认难度
输入英雄名称 游戏运行时输入英雄名猜测答案,系统会返回结果提示
输入“提示” 获取当前英雄的线索提示(有次数限制)
猜王者英雄 结束 停止当前王者英雄猜谜游戏
看图猜成语
看图猜成语 开始 启动看图猜成语游戏,获取初始题目和图片链接
输入成语 游戏运行时输入猜测的成语答案
输入“提示” 获取当前题目的提示(使用配置的默认提示级别)
看图猜成语 结束 停止当前看图猜成语游戏
成语接龙
成语接龙 开始 启动成语接龙游戏,Bot 先出第一个成语
输入成语 直接输入成语参与接龙
成语接龙 结束 停止当前成语接龙游戏
算24点
算24点 开始 启动算24点游戏,使用配置的默认难度
输入算式 输入算式如 (6-2)*(8-2),支持小括号、中括号、大括号
输入“换题” 更换当前题目
算24点 结束 停止当前算24点游戏

English

Command Description
Number Guessing Game
猜数字 开始 Start the number guessing game with the initial range of configured min-max values
Enter number directly Enter a pure number during the game to guess; the system will prompt “too big/too small” in real time and narrow the range, or prompt “correct” and start a new round
猜数字 结束 Stop the current number guessing game
King of Glory Hero Guessing
猜王者英雄 开始 Start the King of Glory hero guessing game, using the configured default difficulty
Enter hero name Enter the hero name to guess the answer during the game, the system will return result prompts
Enter “提示” Get clue hints for the current hero (limited times)
猜王者英雄 结束 Stop the current King of Glory hero guessing game
Idiom Guessing from Pictures
看图猜成语 开始 Start the idiom guessing game from pictures, get initial question and image link
Enter idiom Enter the guessed idiom answer during the game
Enter “提示” Get hints for the current question (using configured default hint level)
看图猜成语 结束 Stop the current idiom guessing game from pictures
Idiom Solitaire
成语接龙 开始 Start the idiom solitaire game, Bot will give the first idiom
Enter idiom Directly enter an idiom to participate in solitaire
成语接龙 结束 Stop the current idiom solitaire game
24-Point Calculation
算24点 开始 Start the 24-point calculation game, using the configured default difficulty
Enter formula Enter formula like (6-2)*(8-2), supports parentheses, square brackets, curly braces
Enter “换题” Change current question
算24点 结束 Stop the current 24-point calculation game

配置说明 (Configuration)

中文

配置项 说明 默认值
:gear: 游戏开关
enableNumberGuess 启用猜数字游戏 true
enableWzHero 启用王者英雄猜谜 true
enableChengyuImage 启用看图猜成语 true
enableChengyuJielong 启用成语接龙 true
enableCalc24 启用算24点 true
:speech_balloon: 私聊游戏开关
privateGame.enableNumberGuess 允许私聊玩猜数字 true
privateGame.enableWzHero 允许私聊玩王者英雄 true
privateGame.enableChengyuImage 允许私聊玩看图猜成语 true
privateGame.enableChengyuJielong 允许私聊玩成语接龙 true
privateGame.enableCalc24 允许私聊玩算24点 true
:bar_chart: 排行榜配置
rank.enableCommand 启用排行榜指令 true
rank.maxDisplay 排行榜最多显示人数 10
rank.clearDataPermission 清零数据所需权限等级 5
rank.messages.title 排行榜标题 :bar_chart: 群游戏总排行榜”
rank.messages.empty 排行榜为空提示 “暂无玩家数据”
rank.messages.playerInfo 玩家信息格式 “{0}. {1} - 得分:{2}分 | 答对:{3}题 | 游玩:{4}次”
rank.messages.totalStats 总统计信息 “\n​:chart_with_upwards_trend: 总统计:共 {0} 位玩家 | 总得分:{1} | 总答对:{2} | 总游玩:{3}”
rank.messages.noPermission 无权限提示 :x: 你没有权限执行此操作”
rank.messages.clearSuccess 清零成功提示 :white_check_mark: 本群所有玩家数据已清零”
rank.messages.showTotalStats 是否显示总统计数据 true
:wrench: 调试配置
debug.enableLog 启用调试日志输出 false
:speech_balloon: 通用游戏消息配置
gameMessages.enabled 启用自定义通用消息 true
gameMessages.usage 用法错误提示 “用法错误!正确用法:{0}”
gameMessages.start 游戏开始提示 “比赛开始!本次共 {0} 回合~”
gameMessages.stop 游戏停止提示 “比赛已停止”
gameMessages.notStarted 游戏未开始提示 “比赛尚未开始,请输入 {0} 开始 开始游戏”
gameMessages.apiError API错误提示 “API请求失败,请稍后再试”
gameMessages.correct 答对提示 “答对啦!你获得 {0} 分~”
gameMessages.wrong 答错提示 “答错啦~正确答案是:{0},你不得分”
gameMessages.roundEnd 回合结束提示 “第 {0} 回合结束!剩余回合:{1}”
gameMessages.gameEnd 游戏结束提示 :tada: 比赛结束!:tada:
gameMessages.rankTitle 本局排行榜标题 :trophy: 本局排行榜 :trophy:
gameMessages.rankEmpty 本局排行榜为空提示 “暂无参与记录~”
gameMessages.disabled 功能禁用提示 “该功能已关闭,请联系管理员开启”
gameMessages.autoStop 自动停止提示 “太久没人玩啦,比赛自动结束~”
:speech_balloon: 猜数字专用消息
guessNumberMessages.outOfRange 数字超出范围提示 “数字超出当前范围 [{0}-{1}],请重新输入!”
guessNumberMessages.tooSmall 猜小了提示 “猜小啦!当前范围更新为 [{0}-{1}]”
guessNumberMessages.tooBig 猜大了提示 “猜大啦!当前范围更新为 [{0}-{1}]”
guessNumberMessages.correctDetail 猜中详细提示 “恭喜你猜中数字!\n猜中者扣 {0} 分,其他玩家各加 {1} 分”
:speech_balloon: 王者英雄专用消息
wzHeroMessages.hint 提示命令 “提示”
:speech_balloon: 看图猜成语专用消息
chengyuImageMessages.next 下一题提示 “第 {0} 题来啦!”
chengyuImageMessages.hintGet 获取提示成功 “【提示】{0}”
chengyuImageMessages.hintError 获取提示失败 “获取提示失败,请稍后再试”
:speech_balloon: 成语接龙专用消息
chengyuJielongMessages.botTurn 机器人回合提示 “该我了!我接:{0}”
chengyuJielongMessages.botWin 机器人赢提示 “哈哈我接不上了!本轮结束~”
chengyuJielongMessages.autoPlayTooMany 自动参与次数过多提示 “自动参与次数已达上限 {0}”
chengyuJielongMessages.notIdiom 非成语提示 “请输入4字成语”
:speech_balloon: 算24点专用消息
calc24Messages.generate 生成题目提示 :memo: 第 {0} 题({1}):用 {2} 通过加减乘除和括号算出24!”
calc24Messages.solved 已解决提示 “这组数已经被答对啦,换一组数字~”
:speech_balloon: 通用消息配置
commonMessages.gameRunning 游戏运行中提示 “当前已有游戏在运行中,请先结束当前游戏后再开始新游戏!”
commonMessages.paramError 参数错误提示 :x: 参数错误!请检查输入格式”
:game_die: 猜数字游戏配置
guessNumber.min 最小值 0
guessNumber.max 最大值 100
guessNumber.botParticipateInGroup 群聊中机器人是否参与 true
guessNumber.totalRounds 总回合数 10
guessNumber.showRank 游戏结束后显示本局排行榜 true
guessNumber.autoPlayDelay 机器人自动操作延迟(秒) 10
guessNumber.autoPlayMaxCount 机器人最大自动操作次数 5
guessNumber.autoStopInactiveTime 游戏无操作自动停止时间(秒) 60
guessNumber.enablePenalty 启用惩罚机制(猜中者扣分,其他人加分) true
guessNumber.penaltyScore 猜中者扣除分数 -1
guessNumber.rewardScore 其他人奖励分数 1
:crossed_swords: 王者英雄猜谜配置
wzHero.totalRounds 总回合数 10
wzHero.showRank 游戏结束后显示本局排行榜 true
wzHero.defaultDifficulty 默认难度 简单
wzHero.autoStopInactiveTime 游戏无操作自动停止时间(秒) 60
wzHero.rewardScore 答对奖励分数 1
:framed_picture: 看图猜成语配置
chengyuImage.totalRounds 总回合数 10
chengyuImage.showRank 游戏结束后显示本局排行榜 true
chengyuImage.defaultHintLevel 默认提示级别 1
chengyuImage.autoStopInactiveTime 游戏无操作自动停止时间(秒) 60
chengyuImage.rewardScore 答对奖励分数 1
:dragon: 成语接龙配置
chengyuJielong.totalRounds 总回合数 10
chengyuJielong.showRank 游戏结束后显示本局排行榜 false
chengyuJielong.autoPlayDelay 机器人自动操作延迟(秒) 10
chengyuJielong.autoPlayMaxCount 机器人最大自动操作次数 5
chengyuJielong.autoStopInactiveTime 游戏无操作自动停止时间(秒) 60
chengyuJielong.maxRounds 最大接龙回合数(0为无限) 10
chengyuJielong.botParticipate 机器人是否参与接龙 false
:abacus: 算24点配置
calc24.totalRounds 总回合数 5
calc24.showRank 游戏结束后显示本局排行榜 true
calc24.defaultDifficulty 默认难度 中等
calc24.difficultyLevels.easy.min 简单难度最小值 1
calc24.difficultyLevels.easy.max 简单难度最大值 8
calc24.difficultyLevels.medium.min 中等难度最小值 1
calc24.difficultyLevels.medium.max 中等难度最大值 10
calc24.difficultyLevels.hard.min 困难难度最小值 1
calc24.difficultyLevels.hard.max 困难难度最大值 13
calc24.autoStopInactiveTime 游戏无操作自动停止时间(秒) 60
calc24.rewardScore 答对奖励分数 1
:globe_with_meridians: API接口配置
apiConfig.timeout API请求超时时间(毫秒,0为不超时) 30000

English

Config Item Description Default
:gear: Game Switches
enableNumberGuess Enable number guessing game true
enableWzHero Enable King of Glory hero guessing true
enableChengyuImage Enable idiom guessing from pictures true
enableChengyuJielong Enable idiom solitaire true
enableCalc24 Enable 24-point calculation true
:speech_balloon: Private Chat Switches
privateGame.enableNumberGuess Allow private chat for number guessing true
privateGame.enableWzHero Allow private chat for King of Glory hero guessing true
privateGame.enableChengyuImage Allow private chat for idiom guessing from pictures true
privateGame.enableChengyuJielong Allow private chat for idiom solitaire true
privateGame.enableCalc24 Allow private chat for 24-point calculation true
:bar_chart: Rank Configuration
rank.enableCommand Enable rank command true
rank.maxDisplay Maximum display count in rank 10
rank.clearDataPermission Authority level required to clear data 5
rank.messages.title Rank title :bar_chart: Group Game Total Rank”
rank.messages.empty Empty rank prompt “No player data”
rank.messages.playerInfo Player info format “{0}. {1} - Score: {2} | Correct: {3} | Played: {4}”
rank.messages.totalStats Total statistics “\n​:chart_with_upwards_trend: Total Stats: {0} players | Total Score: {1} | Total Correct: {2} | Total Played: {3}”
rank.messages.noPermission No permission prompt :x: You don’t have permission to do this”
rank.messages.clearSuccess Clear success prompt :white_check_mark: All player data in this group has been cleared”
rank.messages.showTotalStats Whether to show total statistics true
:wrench: Debug Configuration
debug.enableLog Enable debug log output false
:speech_balloon: Common Game Messages Configuration
gameMessages.enabled Enable custom common messages true
gameMessages.usage Usage error prompt “Usage error! Correct usage: {0}”
gameMessages.start Game start prompt “Game starts! Total {0} rounds~”
gameMessages.stop Game stop prompt “Game stopped”
gameMessages.notStarted Game not started prompt “Game not started yet, please enter {0} start to begin”
gameMessages.apiError API error prompt “API request failed, please try again later”
gameMessages.correct Correct answer prompt “Correct! You get {0} points~”
gameMessages.wrong Wrong answer prompt “Wrong~The correct answer is: {0}, you get no points”
gameMessages.roundEnd Round end prompt “Round {0} ends! Remaining rounds: {1}”
gameMessages.gameEnd Game end prompt :tada: Game Over! :tada:
gameMessages.rankTitle Round rank title :trophy: Round Ranking :trophy:
gameMessages.rankEmpty Round rank empty prompt “No participants~”
gameMessages.disabled Disabled prompt “This feature is disabled, please contact administrator”
gameMessages.autoStop Auto stop prompt “Too long no activity, game auto ended~”
:speech_balloon: Number Guessing Specific Messages
guessNumberMessages.outOfRange Number out of range prompt “Number out of current range [{0}-{1}], please enter again!”
guessNumberMessages.tooSmall Too small prompt “Too small! Current range updated to [{0}-{1}]”
guessNumberMessages.tooBig Too big prompt “Too big! Current range updated to [{0}-{1}]”
guessNumberMessages.correctDetail Correct detail prompt “Congratulations on guessing the number!\nGuesser loses {0} points, other players each gain {1} points”
:speech_balloon: King of Glory Hero Specific Messages
wzHeroMessages.hint Hint command “hint”
:speech_balloon: Idiom Guessing from Pictures Specific Messages
chengyuImageMessages.next Next question prompt “Question {0} is here!”
chengyuImageMessages.hintGet Hint success prompt “【Hint】{0}”
chengyuImageMessages.hintError Hint error prompt “Failed to get hint, please try again later”
:speech_balloon: Idiom Solitaire Specific Messages
chengyuJielongMessages.botTurn Bot turn prompt “My turn! I answer: {0}”
chengyuJielongMessages.botWin Bot win prompt “Haha I can’t continue! Round ends~”
chengyuJielongMessages.autoPlayTooMany Auto play too many prompt “Auto participation count has reached limit {0}”
chengyuJielongMessages.notIdiom Not idiom prompt “Please enter a 4-character idiom”
:speech_balloon: 24-Point Calculation Specific Messages
calc24Messages.generate Generate question prompt :memo: Question {0} ({1}): Use {2} with ±*/ and parentheses to calculate 24!”
calc24Messages.solved Solved prompt “This set of numbers has been solved, switching to another set~”
:speech_balloon: Common Messages Configuration
commonMessages.gameRunning Game running prompt “A game is already running, please end it first before starting a new one!”
commonMessages.paramError Parameter error prompt :x: Parameter error! Please check input format”
:game_die: Number Guessing Configuration
guessNumber.min Minimum value 0
guessNumber.max Maximum value 100
guessNumber.botParticipateInGroup Whether bot participates in group true
guessNumber.totalRounds Total rounds 10
guessNumber.showRank Show rank after game ends true
guessNumber.autoPlayDelay Bot auto operation delay (seconds) 10
guessNumber.autoPlayMaxCount Bot maximum auto operation count 5
guessNumber.autoStopInactiveTime Auto stop time due to inactivity (seconds) 60
guessNumber.enablePenalty Enable penalty mechanism (guesser loses points, others gain) true
guessNumber.penaltyScore Points deducted from guesser -1
guessNumber.rewardScore Points rewarded to others 1
:crossed_swords: King of Glory Hero Configuration
wzHero.totalRounds Total rounds 10
wzHero.showRank Show rank after game ends true
wzHero.defaultDifficulty Default difficulty easy
wzHero.autoStopInactiveTime Auto stop time due to inactivity (seconds) 60
wzHero.rewardScore Reward score for correct answer 1
:framed_picture: Idiom Guessing from Pictures Configuration
chengyuImage.totalRounds Total rounds 10
chengyuImage.showRank Show rank after game ends true
chengyuImage.defaultHintLevel Default hint level 1
chengyuImage.autoStopInactiveTime Auto stop time due to inactivity (seconds) 60
chengyuImage.rewardScore Reward score for correct answer 1
:dragon: Idiom Solitaire Configuration
chengyuJielong.totalRounds Total rounds 10
chengyuJielong.showRank Show rank after game ends false
chengyuJielong.autoPlayDelay Bot auto operation delay (seconds) 10
chengyuJielong.autoPlayMaxCount Bot maximum auto operation count 5
chengyuJielong.autoStopInactiveTime Auto stop time due to inactivity (seconds) 60
chengyuJielong.maxRounds Maximum solitaire rounds (0 for unlimited) 10
chengyuJielong.botParticipate Whether bot participates in solitaire false
:abacus: 24-Point Calculation Configuration
calc24.totalRounds Total rounds 5
calc24.showRank Show rank after game ends true
calc24.defaultDifficulty Default difficulty medium
calc24.difficultyLevels.easy.min Easy difficulty minimum value 1
calc24.difficultyLevels.easy.max Easy difficulty maximum value 8
calc24.difficultyLevels.medium.min Medium difficulty minimum value 1
calc24.difficultyLevels.medium.max Medium difficulty maximum value 10
calc24.difficultyLevels.hard.min Hard difficulty minimum value 1
calc24.difficultyLevels.hard.max Hard difficulty maximum value 13
calc24.autoStopInactiveTime Auto stop time due to inactivity (seconds) 60
calc24.rewardScore Reward score for correct answer 1
:globe_with_meridians: API Configuration
apiConfig.timeout API request timeout (milliseconds, 0 for no timeout) 30000

项目贡献者 (Contributors)

贡献者 贡献内容
Minecraft-1314 插件完整开发
慕名API 慕名API 支持
月下独酌API 月下独酌API 支持
(欢迎提交 PR 加入贡献者列表)

许可协议 (License)

本项目采用 MIT 开源许可证,您可自由使用、修改和分发,详情参见项目根目录的 LICENSE 文件。

This project is licensed under the MIT Open Source License. You are free to use, modify and distribute it. For details, see the LICENSE file in the project root directory.

支持我们 (Support Us)

如果这个项目对您有帮助,欢迎点亮仓库右上角的 Star :star: 支持我们,这将是对所有贡献者最大的鼓励!

If this project is helpful to you, please feel free to star the repository in the upper right corner :star: to support us, which will be the greatest encouragement to all contributors!